@neo4j-nvl/base 0.3.5-f46f9cc3 → 0.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/base.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see base.mjs.LICENSE.txt */
2
- import*as t from"@neo4j-nvl/layout-workers";import*as e from"@segment/analytics-next";var n={931:t=>{t.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},269:(t,e,n)=>{var r=n(931),i=n(975),o=Object.hasOwnProperty,a=Object.create(null);for(var s in r)o.call(r,s)&&(a[r[s]]=s);var u=t.exports={to:{},get:{}};function l(t,e,n){return Math.min(Math.max(e,t),n)}function c(t){var e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}u.get=function(t){var e,n;switch(t.substring(0,3).toLowerCase()){case"hsl":e=u.get.hsl(t),n="hsl";break;case"hwb":e=u.get.hwb(t),n="hwb";break;default:e=u.get.rgb(t),n="rgb"}return e?{model:n,value:e}:null},u.get.rgb=function(t){if(!t)return null;var e,n,i,a=[0,0,0,1];if(e=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(i=e[2],e=e[1],n=0;n<3;n++){var s=2*n;a[n]=parseInt(e.slice(s,s+2),16)}i&&(a[3]=parseInt(i,16)/255)}else if(e=t.match(/^#([a-f0-9]{3,4})$/i)){for(i=(e=e[1])[3],n=0;n<3;n++)a[n]=parseInt(e[n]+e[n],16);i&&(a[3]=parseInt(i+i,16)/255)}else if(e=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(n=0;n<3;n++)a[n]=parseInt(e[n+1],0);e[4]&&(e[5]?a[3]=.01*parseFloat(e[4]):a[3]=parseFloat(e[4]))}else{if(!(e=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(e=t.match(/^(\w+)$/))?"transparent"===e[1]?[0,0,0,0]:o.call(r,e[1])?((a=r[e[1]])[3]=1,a):null:null;for(n=0;n<3;n++)a[n]=Math.round(2.55*parseFloat(e[n+1]));e[4]&&(e[5]?a[3]=.01*parseFloat(e[4]):a[3]=parseFloat(e[4]))}for(n=0;n<3;n++)a[n]=l(a[n],0,255);return a[3]=l(a[3],0,1),a},u.get.hsl=function(t){if(!t)return null;var e=t.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(e){var n=parseFloat(e[4]);return[(parseFloat(e[1])%360+360)%360,l(parseFloat(e[2]),0,100),l(parseFloat(e[3]),0,100),l(isNaN(n)?1:n,0,1)]}return null},u.get.hwb=function(t){if(!t)return null;var e=t.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(e){var n=parseFloat(e[4]);return[(parseFloat(e[1])%360+360)%360,l(parseFloat(e[2]),0,100),l(parseFloat(e[3]),0,100),l(isNaN(n)?1:n,0,1)]}return null},u.to.hex=function(){var t=i(arguments);return"#"+c(t[0])+c(t[1])+c(t[2])+(t[3]<1?c(Math.round(255*t[3])):"")},u.to.rgb=function(){var t=i(arguments);return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},u.to.rgb.percent=function(){var t=i(arguments),e=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return t.length<4||1===t[3]?"rgb("+e+"%, "+n+"%, "+r+"%)":"rgba("+e+"%, "+n+"%, "+r+"%, "+t[3]+")"},u.to.hsl=function(){var t=i(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},u.to.hwb=function(){var t=i(arguments),e="";return t.length>=4&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},u.to.keyword=function(t){return a[t.slice(0,3)]}},792:(t,e,n)=>{var r=n(45),i=n(360),o=n(804);t.exports=function(t,e){if(!e)return t;var n=Object.keys(e);if(0===n.length)return t;for(var a=r(t),s=n.length-1;s>=0;s--){var u=n[s],l=String(e[u]);l&&(l=" "+l),o(a,{type:"preprocessor",data:"#define "+u+l})}return i(a)}},804:t=>{t.exports=function(t,i){Array.isArray(i)||(i=[i]);var o=function(t){for(var e=-1,n=0;n<t.length;n++){var i=t[n];if("preprocessor"===i.type)/^#(extension|version)/.test(i.data)&&(e=Math.max(e,n));else if("keyword"===i.type&&"precision"===i.data){var o=r(t,n);if(-1===o)throw new Error("precision statement not followed by any semicolons!");e=Math.max(e,o)}}return e+1}(t),a=o>0?t[o-1]:null;a&&n.test(a.data)&&t.splice(o++,0,e),t.splice.apply(t,[o,0].concat(i));var s=o+i.length;return t[s]&&/[^\r\n]$/.test(t[s].data)&&t.splice(s,0,e),t};var e={data:"\n",type:"whitespace"},n=/[^\r\n]$/;function r(t,e){for(var n=e;n<t.length;n++)if("operator"===t[n].type&&";"===t[n].data)return n;return-1}},360:t=>{t.exports=function(t){for(var e=[],n=0;n<t.length;n++)"eof"!==t[n].type&&e.push(t[n].data);return e.join("")}},206:(t,e,n)=>{t.exports=function(t){var e,n,S,T=0,A=0,O=u,E=[],P=[],k=1,j=0,C=0,D=!1,R=!1,I="",L=o,M=r;"300 es"===(t=t||{}).version&&(L=s,M=a);var N={},F={};for(T=0;T<L.length;T++)N[L[T]]=!0;for(T=0;T<M.length;T++)F[M[T]]=!0;return function(t){return P=[],null!==t?function(t){var n;for(T=0,t.toString&&(t=t.toString()),I+=t.replace(/\r\n/g,"\n"),S=I.length;e=I[T],T<S;){switch(n=T,O){case c:T=G();break;case f:case h:T=V();break;case d:T=W();break;case p:T=Y();break;case x:T=H();break;case v:T=$();break;case l:T=q();break;case b:T=B();break;case u:T=z()}n!==T&&("\n"===I[n]?(j=0,++k):++j)}return A+=T,I=I.slice(T),P}(t):(E.length&&U(E.join("")),O=w,U("(eof)"),P)};function U(t){t.length&&P.push({type:_[O],data:t,position:C,line:k,column:j})}function z(){return E=E.length?[]:E,"/"===n&&"*"===e?(C=A+T-1,O=c,n=e,T+1):"/"===n&&"/"===e?(C=A+T-1,O=f,n=e,T+1):"#"===e?(O=h,C=A+T,T):/\s/.test(e)?(O=b,C=A+T,T):(D=/\d/.test(e),R=/[^\w_]/.test(e),C=A+T,O=D?p:R?d:l,T)}function B(){return/[^\s]/g.test(e)?(U(E.join("")),O=u,T):(E.push(e),n=e,T+1)}function V(){return"\r"!==e&&"\n"!==e||"\\"===n?(E.push(e),n=e,T+1):(U(E.join("")),O=u,T)}function G(){return"/"===e&&"*"===n?(E.push(e),U(E.join("")),O=u,T+1):(E.push(e),n=e,T+1)}function W(){if("."===n&&/\d/.test(e))return O=v,T;if("/"===n&&"*"===e)return O=c,T;if("/"===n&&"/"===e)return O=f,T;if("."===e&&E.length){for(;X(E););return O=v,T}if(";"===e||")"===e||"("===e){if(E.length)for(;X(E););return U(e),O=u,T+1}var t=2===E.length&&"="!==e;if(/[\w_\d\s]/.test(e)||t){for(;X(E););return O=u,T}return E.push(e),n=e,T+1}function X(t){for(var e,n,r=0;;){if(e=i.indexOf(t.slice(0,t.length+r).join("")),n=i[e],-1===e){if(r--+t.length>0)continue;n=t.slice(0,1).join("")}return U(n),C+=n.length,(E=E.slice(n.length)).length}}function H(){return/[^a-fA-F0-9]/.test(e)?(U(E.join("")),O=u,T):(E.push(e),n=e,T+1)}function Y(){return"."===e||/[eE]/.test(e)?(E.push(e),O=v,n=e,T+1):"x"===e&&1===E.length&&"0"===E[0]?(O=x,E.push(e),n=e,T+1):/[^\d]/.test(e)?(U(E.join("")),O=u,T):(E.push(e),n=e,T+1)}function $(){return"f"===e&&(E.push(e),n=e,T+=1),/[eE]/.test(e)?(E.push(e),n=e,T+1):("-"!==e&&"+"!==e||!/[eE]/.test(n))&&/[^\d]/.test(e)?(U(E.join("")),O=u,T):(E.push(e),n=e,T+1)}function q(){if(/[^\d\w_]/.test(e)){var t=E.join("");return O=F[t]?g:N[t]?m:y,U(E.join("")),O=u,T}return E.push(e),n=e,T+1}};var r=n(704),i=n(63),o=n(192),a=n(784),s=n(592),u=999,l=9999,c=0,f=1,h=2,d=3,p=4,v=5,y=6,m=7,g=8,b=9,w=10,x=11,_=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},592:(t,e,n)=>{var r=n(192);r=r.slice().filter((function(t){return!/^(gl\_|texture)/.test(t)})),t.exports=r.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},192:t=>{t.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},784:(t,e,n)=>{var r=n(704);t.exports=r.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},704:t=>{t.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},63:t=>{t.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},45:(t,e,n)=>{var r=n(206);t.exports=function(t,e){var n=r(e),i=[];return(i=i.concat(n(t))).concat(n(null))}},250:function(t,e,n){var r;t=n.nmd(t),function(){var i,o="Expected a function",a="__lodash_hash_undefined__",s="__lodash_placeholder__",u=32,l=128,c=1/0,f=9007199254740991,h=NaN,d=4294967295,p=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],v="[object Arguments]",y="[object Array]",m="[object Boolean]",g="[object Date]",b="[object Error]",w="[object Function]",x="[object GeneratorFunction]",_="[object Map]",S="[object Number]",T="[object Object]",A="[object Promise]",O="[object RegExp]",E="[object Set]",P="[object String]",k="[object Symbol]",j="[object WeakMap]",C="[object ArrayBuffer]",D="[object DataView]",R="[object Float32Array]",I="[object Float64Array]",L="[object Int8Array]",M="[object Int16Array]",N="[object Int32Array]",F="[object Uint8Array]",U="[object Uint8ClampedArray]",z="[object Uint16Array]",B="[object Uint32Array]",V=/\b__p \+= '';/g,G=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,X=/&(?:amp|lt|gt|quot|#39);/g,H=/[&<>"']/g,Y=RegExp(X.source),$=RegExp(H.source),q=/<%-([\s\S]+?)%>/g,Z=/<%([\s\S]+?)%>/g,K=/<%=([\s\S]+?)%>/g,J=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Q=/^\w*$/,tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,et=/[\\^$.*+?()[\]{}|]/g,nt=RegExp(et.source),rt=/^\s+/,it=/\s/,ot=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,at=/\{\n\/\* \[wrapped with (.+)\] \*/,st=/,? & /,ut=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,lt=/[()=,{}\[\]\/\s]/,ct=/\\(\\)?/g,ft=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ht=/\w*$/,dt=/^[-+]0x[0-9a-f]+$/i,pt=/^0b[01]+$/i,vt=/^\[object .+?Constructor\]$/,yt=/^0o[0-7]+$/i,mt=/^(?:0|[1-9]\d*)$/,gt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,bt=/($^)/,wt=/['\n\r\u2028\u2029\\]/g,xt="\\ud800-\\udfff",_t="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",St="\\u2700-\\u27bf",Tt="a-z\\xdf-\\xf6\\xf8-\\xff",At="A-Z\\xc0-\\xd6\\xd8-\\xde",Ot="\\ufe0e\\ufe0f",Et="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Pt="["+xt+"]",kt="["+Et+"]",jt="["+_t+"]",Ct="\\d+",Dt="["+St+"]",Rt="["+Tt+"]",It="[^"+xt+Et+Ct+St+Tt+At+"]",Lt="\\ud83c[\\udffb-\\udfff]",Mt="[^"+xt+"]",Nt="(?:\\ud83c[\\udde6-\\uddff]){2}",Ft="[\\ud800-\\udbff][\\udc00-\\udfff]",Ut="["+At+"]",zt="\\u200d",Bt="(?:"+Rt+"|"+It+")",Vt="(?:"+Ut+"|"+It+")",Gt="(?:['’](?:d|ll|m|re|s|t|ve))?",Wt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Xt="(?:"+jt+"|"+Lt+")?",Ht="["+Ot+"]?",Yt=Ht+Xt+"(?:"+zt+"(?:"+[Mt,Nt,Ft].join("|")+")"+Ht+Xt+")*",$t="(?:"+[Dt,Nt,Ft].join("|")+")"+Yt,qt="(?:"+[Mt+jt+"?",jt,Nt,Ft,Pt].join("|")+")",Zt=RegExp("['’]","g"),Kt=RegExp(jt,"g"),Jt=RegExp(Lt+"(?="+Lt+")|"+qt+Yt,"g"),Qt=RegExp([Ut+"?"+Rt+"+"+Gt+"(?="+[kt,Ut,"$"].join("|")+")",Vt+"+"+Wt+"(?="+[kt,Ut+Bt,"$"].join("|")+")",Ut+"?"+Bt+"+"+Gt,Ut+"+"+Wt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ct,$t].join("|"),"g"),te=RegExp("["+zt+xt+_t+Ot+"]"),ee=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ne=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],re=-1,ie={};ie[R]=ie[I]=ie[L]=ie[M]=ie[N]=ie[F]=ie[U]=ie[z]=ie[B]=!0,ie[v]=ie[y]=ie[C]=ie[m]=ie[D]=ie[g]=ie[b]=ie[w]=ie[_]=ie[S]=ie[T]=ie[O]=ie[E]=ie[P]=ie[j]=!1;var oe={};oe[v]=oe[y]=oe[C]=oe[D]=oe[m]=oe[g]=oe[R]=oe[I]=oe[L]=oe[M]=oe[N]=oe[_]=oe[S]=oe[T]=oe[O]=oe[E]=oe[P]=oe[k]=oe[F]=oe[U]=oe[z]=oe[B]=!0,oe[b]=oe[w]=oe[j]=!1;var ae={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},se=parseFloat,ue=parseInt,le="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,ce="object"==typeof self&&self&&self.Object===Object&&self,fe=le||ce||Function("return this")(),he=e&&!e.nodeType&&e,de=he&&t&&!t.nodeType&&t,pe=de&&de.exports===he,ve=pe&&le.process,ye=function(){try{return de&&de.require&&de.require("util").types||ve&&ve.binding&&ve.binding("util")}catch(t){}}(),me=ye&&ye.isArrayBuffer,ge=ye&&ye.isDate,be=ye&&ye.isMap,we=ye&&ye.isRegExp,xe=ye&&ye.isSet,_e=ye&&ye.isTypedArray;function Se(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Te(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}function Ae(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Oe(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Ee(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Pe(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function ke(t,e){return!(null==t||!t.length)&&Ue(t,e,0)>-1}function je(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function Ce(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function De(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function Re(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function Ie(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function Le(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var Me=Ge("length");function Ne(t,e,n){var r;return n(t,(function(t,n,i){if(e(t,n,i))return r=n,!1})),r}function Fe(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function Ue(t,e,n){return e==e?function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):Fe(t,Be,n)}function ze(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function Be(t){return t!=t}function Ve(t,e){var n=null==t?0:t.length;return n?He(t,e)/n:h}function Ge(t){return function(e){return null==e?i:e[t]}}function We(t){return function(e){return null==t?i:t[e]}}function Xe(t,e,n,r,i){return i(t,(function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)})),n}function He(t,e){for(var n,r=-1,o=t.length;++r<o;){var a=e(t[r]);a!==i&&(n=n===i?a:n+a)}return n}function Ye(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function $e(t){return t?t.slice(0,hn(t)+1).replace(rt,""):t}function qe(t){return function(e){return t(e)}}function Ze(t,e){return Ce(e,(function(e){return t[e]}))}function Ke(t,e){return t.has(e)}function Je(t,e){for(var n=-1,r=t.length;++n<r&&Ue(e,t[n],0)>-1;);return n}function Qe(t,e){for(var n=t.length;n--&&Ue(e,t[n],0)>-1;);return n}var tn=We({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),en=We({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function nn(t){return"\\"+ae[t]}function rn(t){return te.test(t)}function on(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function an(t,e){return function(n){return t(e(n))}}function sn(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n];a!==e&&a!==s||(t[n]=s,o[i++]=n)}return o}function un(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function ln(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function cn(t){return rn(t)?function(t){for(var e=Jt.lastIndex=0;Jt.test(t);)++e;return e}(t):Me(t)}function fn(t){return rn(t)?function(t){return t.match(Jt)||[]}(t):function(t){return t.split("")}(t)}function hn(t){for(var e=t.length;e--&&it.test(t.charAt(e)););return e}var dn=We({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),pn=function t(e){var n,r=(e=null==e?fe:pn.defaults(fe.Object(),e,pn.pick(fe,ne))).Array,it=e.Date,xt=e.Error,_t=e.Function,St=e.Math,Tt=e.Object,At=e.RegExp,Ot=e.String,Et=e.TypeError,Pt=r.prototype,kt=_t.prototype,jt=Tt.prototype,Ct=e["__core-js_shared__"],Dt=kt.toString,Rt=jt.hasOwnProperty,It=0,Lt=(n=/[^.]+$/.exec(Ct&&Ct.keys&&Ct.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Mt=jt.toString,Nt=Dt.call(Tt),Ft=fe._,Ut=At("^"+Dt.call(Rt).replace(et,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),zt=pe?e.Buffer:i,Bt=e.Symbol,Vt=e.Uint8Array,Gt=zt?zt.allocUnsafe:i,Wt=an(Tt.getPrototypeOf,Tt),Xt=Tt.create,Ht=jt.propertyIsEnumerable,Yt=Pt.splice,$t=Bt?Bt.isConcatSpreadable:i,qt=Bt?Bt.iterator:i,Jt=Bt?Bt.toStringTag:i,te=function(){try{var t=uo(Tt,"defineProperty");return t({},"",{}),t}catch(t){}}(),ae=e.clearTimeout!==fe.clearTimeout&&e.clearTimeout,le=it&&it.now!==fe.Date.now&&it.now,ce=e.setTimeout!==fe.setTimeout&&e.setTimeout,he=St.ceil,de=St.floor,ve=Tt.getOwnPropertySymbols,ye=zt?zt.isBuffer:i,Me=e.isFinite,We=Pt.join,vn=an(Tt.keys,Tt),yn=St.max,mn=St.min,gn=it.now,bn=e.parseInt,wn=St.random,xn=Pt.reverse,_n=uo(e,"DataView"),Sn=uo(e,"Map"),Tn=uo(e,"Promise"),An=uo(e,"Set"),On=uo(e,"WeakMap"),En=uo(Tt,"create"),Pn=On&&new On,kn={},jn=No(_n),Cn=No(Sn),Dn=No(Tn),Rn=No(An),In=No(On),Ln=Bt?Bt.prototype:i,Mn=Ln?Ln.valueOf:i,Nn=Ln?Ln.toString:i;function Fn(t){if(ts(t)&&!Ga(t)&&!(t instanceof Vn)){if(t instanceof Bn)return t;if(Rt.call(t,"__wrapped__"))return Fo(t)}return new Bn(t)}var Un=function(){function t(){}return function(e){if(!Qa(e))return{};if(Xt)return Xt(e);t.prototype=e;var n=new t;return t.prototype=i,n}}();function zn(){}function Bn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=i}function Vn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Gn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Wn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Xn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Hn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Xn;++e<n;)this.add(t[e])}function Yn(t){var e=this.__data__=new Wn(t);this.size=e.size}function $n(t,e){var n=Ga(t),r=!n&&Va(t),i=!n&&!r&&Ya(t),o=!n&&!r&&!i&&us(t),a=n||r||i||o,s=a?Ye(t.length,Ot):[],u=s.length;for(var l in t)!e&&!Rt.call(t,l)||a&&("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||yo(l,u))||s.push(l);return s}function qn(t){var e=t.length;return e?t[Xr(0,e-1)]:i}function Zn(t,e){return Do(Oi(t),or(e,0,t.length))}function Kn(t){return Do(Oi(t))}function Jn(t,e,n){(n!==i&&!Ua(t[e],n)||n===i&&!(e in t))&&rr(t,e,n)}function Qn(t,e,n){var r=t[e];Rt.call(t,e)&&Ua(r,n)&&(n!==i||e in t)||rr(t,e,n)}function tr(t,e){for(var n=t.length;n--;)if(Ua(t[n][0],e))return n;return-1}function er(t,e,n,r){return cr(t,(function(t,i,o){e(r,t,n(t),o)})),r}function nr(t,e){return t&&Ei(e,js(e),t)}function rr(t,e,n){"__proto__"==e&&te?te(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function ir(t,e){for(var n=-1,o=e.length,a=r(o),s=null==t;++n<o;)a[n]=s?i:As(t,e[n]);return a}function or(t,e,n){return t==t&&(n!==i&&(t=t<=n?t:n),e!==i&&(t=t>=e?t:e)),t}function ar(t,e,n,r,o,a){var s,u=1&e,l=2&e,c=4&e;if(n&&(s=o?n(t,r,o,a):n(t)),s!==i)return s;if(!Qa(t))return t;var f=Ga(t);if(f){if(s=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Rt.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!u)return Oi(t,s)}else{var h=fo(t),d=h==w||h==x;if(Ya(t))return wi(t,u);if(h==T||h==v||d&&!o){if(s=l||d?{}:po(t),!u)return l?function(t,e){return Ei(t,co(t),e)}(t,function(t,e){return t&&Ei(e,Cs(e),t)}(s,t)):function(t,e){return Ei(t,lo(t),e)}(t,nr(s,t))}else{if(!oe[h])return o?t:{};s=function(t,e,n){var r,i=t.constructor;switch(e){case C:return xi(t);case m:case g:return new i(+t);case D:return function(t,e){var n=e?xi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case R:case I:case L:case M:case N:case F:case U:case z:case B:return _i(t,n);case _:return new i;case S:case P:return new i(t);case O:return function(t){var e=new t.constructor(t.source,ht.exec(t));return e.lastIndex=t.lastIndex,e}(t);case E:return new i;case k:return r=t,Mn?Tt(Mn.call(r)):{}}}(t,h,u)}}a||(a=new Yn);var p=a.get(t);if(p)return p;a.set(t,s),os(t)?t.forEach((function(r){s.add(ar(r,e,n,r,t,a))})):es(t)&&t.forEach((function(r,i){s.set(i,ar(r,e,n,i,t,a))}));var y=f?i:(c?l?eo:to:l?Cs:js)(t);return Ae(y||t,(function(r,i){y&&(r=t[i=r]),Qn(s,i,ar(r,e,n,i,t,a))})),s}function sr(t,e,n){var r=n.length;if(null==t)return!r;for(t=Tt(t);r--;){var o=n[r],a=e[o],s=t[o];if(s===i&&!(o in t)||!a(s))return!1}return!0}function ur(t,e,n){if("function"!=typeof t)throw new Et(o);return Po((function(){t.apply(i,n)}),e)}function lr(t,e,n,r){var i=-1,o=ke,a=!0,s=t.length,u=[],l=e.length;if(!s)return u;n&&(e=Ce(e,qe(n))),r?(o=je,a=!1):e.length>=200&&(o=Ke,a=!1,e=new Hn(e));t:for(;++i<s;){var c=t[i],f=null==n?c:n(c);if(c=r||0!==c?c:0,a&&f==f){for(var h=l;h--;)if(e[h]===f)continue t;u.push(c)}else o(e,f,r)||u.push(c)}return u}Fn.templateSettings={escape:q,evaluate:Z,interpolate:K,variable:"",imports:{_:Fn}},Fn.prototype=zn.prototype,Fn.prototype.constructor=Fn,Bn.prototype=Un(zn.prototype),Bn.prototype.constructor=Bn,Vn.prototype=Un(zn.prototype),Vn.prototype.constructor=Vn,Gn.prototype.clear=function(){this.__data__=En?En(null):{},this.size=0},Gn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Gn.prototype.get=function(t){var e=this.__data__;if(En){var n=e[t];return n===a?i:n}return Rt.call(e,t)?e[t]:i},Gn.prototype.has=function(t){var e=this.__data__;return En?e[t]!==i:Rt.call(e,t)},Gn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=En&&e===i?a:e,this},Wn.prototype.clear=function(){this.__data__=[],this.size=0},Wn.prototype.delete=function(t){var e=this.__data__,n=tr(e,t);return!(n<0||(n==e.length-1?e.pop():Yt.call(e,n,1),--this.size,0))},Wn.prototype.get=function(t){var e=this.__data__,n=tr(e,t);return n<0?i:e[n][1]},Wn.prototype.has=function(t){return tr(this.__data__,t)>-1},Wn.prototype.set=function(t,e){var n=this.__data__,r=tr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Xn.prototype.clear=function(){this.size=0,this.__data__={hash:new Gn,map:new(Sn||Wn),string:new Gn}},Xn.prototype.delete=function(t){var e=ao(this,t).delete(t);return this.size-=e?1:0,e},Xn.prototype.get=function(t){return ao(this,t).get(t)},Xn.prototype.has=function(t){return ao(this,t).has(t)},Xn.prototype.set=function(t,e){var n=ao(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Hn.prototype.add=Hn.prototype.push=function(t){return this.__data__.set(t,a),this},Hn.prototype.has=function(t){return this.__data__.has(t)},Yn.prototype.clear=function(){this.__data__=new Wn,this.size=0},Yn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Yn.prototype.get=function(t){return this.__data__.get(t)},Yn.prototype.has=function(t){return this.__data__.has(t)},Yn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Wn){var r=n.__data__;if(!Sn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Xn(r)}return n.set(t,e),this.size=n.size,this};var cr=ji(gr),fr=ji(br,!0);function hr(t,e){var n=!0;return cr(t,(function(t,r,i){return n=!!e(t,r,i)})),n}function dr(t,e,n){for(var r=-1,o=t.length;++r<o;){var a=t[r],s=e(a);if(null!=s&&(u===i?s==s&&!ss(s):n(s,u)))var u=s,l=a}return l}function pr(t,e){var n=[];return cr(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}function vr(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=vo),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?vr(s,e-1,n,r,i):De(i,s):r||(i[i.length]=s)}return i}var yr=Ci(),mr=Ci(!0);function gr(t,e){return t&&yr(t,e,js)}function br(t,e){return t&&mr(t,e,js)}function wr(t,e){return Pe(e,(function(e){return Za(t[e])}))}function xr(t,e){for(var n=0,r=(e=yi(e,t)).length;null!=t&&n<r;)t=t[Mo(e[n++])];return n&&n==r?t:i}function _r(t,e,n){var r=e(t);return Ga(t)?r:De(r,n(t))}function Sr(t){return null==t?t===i?"[object Undefined]":"[object Null]":Jt&&Jt in Tt(t)?function(t){var e=Rt.call(t,Jt),n=t[Jt];try{t[Jt]=i;var r=!0}catch(t){}var o=Mt.call(t);return r&&(e?t[Jt]=n:delete t[Jt]),o}(t):function(t){return Mt.call(t)}(t)}function Tr(t,e){return t>e}function Ar(t,e){return null!=t&&Rt.call(t,e)}function Or(t,e){return null!=t&&e in Tt(t)}function Er(t,e,n){for(var o=n?je:ke,a=t[0].length,s=t.length,u=s,l=r(s),c=1/0,f=[];u--;){var h=t[u];u&&e&&(h=Ce(h,qe(e))),c=mn(h.length,c),l[u]=!n&&(e||a>=120&&h.length>=120)?new Hn(u&&h):i}h=t[0];var d=-1,p=l[0];t:for(;++d<a&&f.length<c;){var v=h[d],y=e?e(v):v;if(v=n||0!==v?v:0,!(p?Ke(p,y):o(f,y,n))){for(u=s;--u;){var m=l[u];if(!(m?Ke(m,y):o(t[u],y,n)))continue t}p&&p.push(y),f.push(v)}}return f}function Pr(t,e,n){var r=null==(t=Ao(t,e=yi(e,t)))?t:t[Mo(qo(e))];return null==r?i:Se(r,t,n)}function kr(t){return ts(t)&&Sr(t)==v}function jr(t,e,n,r,o){return t===e||(null==t||null==e||!ts(t)&&!ts(e)?t!=t&&e!=e:function(t,e,n,r,o,a){var s=Ga(t),u=Ga(e),l=s?y:fo(t),c=u?y:fo(e),f=(l=l==v?T:l)==T,h=(c=c==v?T:c)==T,d=l==c;if(d&&Ya(t)){if(!Ya(e))return!1;s=!0,f=!1}if(d&&!f)return a||(a=new Yn),s||us(t)?Ji(t,e,n,r,o,a):function(t,e,n,r,i,o,a){switch(n){case D:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case C:return!(t.byteLength!=e.byteLength||!o(new Vt(t),new Vt(e)));case m:case g:case S:return Ua(+t,+e);case b:return t.name==e.name&&t.message==e.message;case O:case P:return t==e+"";case _:var s=on;case E:var u=1&r;if(s||(s=un),t.size!=e.size&&!u)return!1;var l=a.get(t);if(l)return l==e;r|=2,a.set(t,e);var c=Ji(s(t),s(e),r,i,o,a);return a.delete(t),c;case k:if(Mn)return Mn.call(t)==Mn.call(e)}return!1}(t,e,l,n,r,o,a);if(!(1&n)){var p=f&&Rt.call(t,"__wrapped__"),w=h&&Rt.call(e,"__wrapped__");if(p||w){var x=p?t.value():t,A=w?e.value():e;return a||(a=new Yn),o(x,A,n,r,a)}}return!!d&&(a||(a=new Yn),function(t,e,n,r,o,a){var s=1&n,u=to(t),l=u.length;if(l!=to(e).length&&!s)return!1;for(var c=l;c--;){var f=u[c];if(!(s?f in e:Rt.call(e,f)))return!1}var h=a.get(t),d=a.get(e);if(h&&d)return h==e&&d==t;var p=!0;a.set(t,e),a.set(e,t);for(var v=s;++c<l;){var y=t[f=u[c]],m=e[f];if(r)var g=s?r(m,y,f,e,t,a):r(y,m,f,t,e,a);if(!(g===i?y===m||o(y,m,n,r,a):g)){p=!1;break}v||(v="constructor"==f)}if(p&&!v){var b=t.constructor,w=e.constructor;b==w||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w||(p=!1)}return a.delete(t),a.delete(e),p}(t,e,n,r,o,a))}(t,e,n,r,jr,o))}function Cr(t,e,n,r){var o=n.length,a=o,s=!r;if(null==t)return!a;for(t=Tt(t);o--;){var u=n[o];if(s&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<a;){var l=(u=n[o])[0],c=t[l],f=u[1];if(s&&u[2]){if(c===i&&!(l in t))return!1}else{var h=new Yn;if(r)var d=r(c,f,l,t,e,h);if(!(d===i?jr(f,c,3,r,h):d))return!1}}return!0}function Dr(t){return!(!Qa(t)||(e=t,Lt&&Lt in e))&&(Za(t)?Ut:vt).test(No(t));var e}function Rr(t){return"function"==typeof t?t:null==t?nu:"object"==typeof t?Ga(t)?Fr(t[0],t[1]):Nr(t):fu(t)}function Ir(t){if(!xo(t))return vn(t);var e=[];for(var n in Tt(t))Rt.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Lr(t,e){return t<e}function Mr(t,e){var n=-1,i=Xa(t)?r(t.length):[];return cr(t,(function(t,r,o){i[++n]=e(t,r,o)})),i}function Nr(t){var e=so(t);return 1==e.length&&e[0][2]?So(e[0][0],e[0][1]):function(n){return n===t||Cr(n,t,e)}}function Fr(t,e){return go(t)&&_o(e)?So(Mo(t),e):function(n){var r=As(n,t);return r===i&&r===e?Os(n,t):jr(e,r,3)}}function Ur(t,e,n,r,o){t!==e&&yr(e,(function(a,s){if(o||(o=new Yn),Qa(a))!function(t,e,n,r,o,a,s){var u=Oo(t,n),l=Oo(e,n),c=s.get(l);if(c)Jn(t,n,c);else{var f=a?a(u,l,n+"",t,e,s):i,h=f===i;if(h){var d=Ga(l),p=!d&&Ya(l),v=!d&&!p&&us(l);f=l,d||p||v?Ga(u)?f=u:Ha(u)?f=Oi(u):p?(h=!1,f=wi(l,!0)):v?(h=!1,f=_i(l,!0)):f=[]:rs(l)||Va(l)?(f=u,Va(u)?f=ys(u):Qa(u)&&!Za(u)||(f=po(l))):h=!1}h&&(s.set(l,f),o(f,l,r,a,s),s.delete(l)),Jn(t,n,f)}}(t,e,s,n,Ur,r,o);else{var u=r?r(Oo(t,s),a,s+"",t,e,o):i;u===i&&(u=a),Jn(t,s,u)}}),Cs)}function zr(t,e){var n=t.length;if(n)return yo(e+=e<0?n:0,n)?t[e]:i}function Br(t,e,n){e=e.length?Ce(e,(function(t){return Ga(t)?function(e){return xr(e,1===t.length?t[0]:t)}:t})):[nu];var r=-1;e=Ce(e,qe(oo()));var i=Mr(t,(function(t,n,i){var o=Ce(e,(function(e){return e(t)}));return{criteria:o,index:++r,value:t}}));return function(t,e){var r=t.length;for(t.sort((function(t,e){return function(t,e,n){for(var r=-1,i=t.criteria,o=e.criteria,a=i.length,s=n.length;++r<a;){var u=Si(i[r],o[r]);if(u)return r>=s?u:u*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}));r--;)t[r]=t[r].value;return t}(i)}function Vr(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var a=e[r],s=xr(t,a);n(s,a)&&Zr(o,yi(a,t),s)}return o}function Gr(t,e,n,r){var i=r?ze:Ue,o=-1,a=e.length,s=t;for(t===e&&(e=Oi(e)),n&&(s=Ce(t,qe(n)));++o<a;)for(var u=0,l=e[o],c=n?n(l):l;(u=i(s,c,u,r))>-1;)s!==t&&Yt.call(s,u,1),Yt.call(t,u,1);return t}function Wr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;yo(i)?Yt.call(t,i,1):ui(t,i)}}return t}function Xr(t,e){return t+de(wn()*(e-t+1))}function Hr(t,e){var n="";if(!t||e<1||e>f)return n;do{e%2&&(n+=t),(e=de(e/2))&&(t+=t)}while(e);return n}function Yr(t,e){return ko(To(t,e,nu),t+"")}function $r(t){return qn(Us(t))}function qr(t,e){var n=Us(t);return Do(n,or(e,0,n.length))}function Zr(t,e,n,r){if(!Qa(t))return t;for(var o=-1,a=(e=yi(e,t)).length,s=a-1,u=t;null!=u&&++o<a;){var l=Mo(e[o]),c=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return t;if(o!=s){var f=u[l];(c=r?r(f,l,u):i)===i&&(c=Qa(f)?f:yo(e[o+1])?[]:{})}Qn(u,l,c),u=u[l]}return t}var Kr=Pn?function(t,e){return Pn.set(t,e),t}:nu,Jr=te?function(t,e){return te(t,"toString",{configurable:!0,enumerable:!1,value:Qs(e),writable:!0})}:nu;function Qr(t){return Do(Us(t))}function ti(t,e,n){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var a=r(o);++i<o;)a[i]=t[i+e];return a}function ei(t,e){var n;return cr(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function ni(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=t[o];null!==a&&!ss(a)&&(n?a<=e:a<e)?r=o+1:i=o}return i}return ri(t,e,nu,n)}function ri(t,e,n,r){var o=0,a=null==t?0:t.length;if(0===a)return 0;for(var s=(e=n(e))!=e,u=null===e,l=ss(e),c=e===i;o<a;){var f=de((o+a)/2),h=n(t[f]),d=h!==i,p=null===h,v=h==h,y=ss(h);if(s)var m=r||v;else m=c?v&&(r||d):u?v&&d&&(r||!p):l?v&&d&&!p&&(r||!y):!p&&!y&&(r?h<=e:h<e);m?o=f+1:a=f}return mn(a,4294967294)}function ii(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n],s=e?e(a):a;if(!n||!Ua(s,u)){var u=s;o[i++]=0===a?0:a}}return o}function oi(t){return"number"==typeof t?t:ss(t)?h:+t}function ai(t){if("string"==typeof t)return t;if(Ga(t))return Ce(t,ai)+"";if(ss(t))return Nn?Nn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function si(t,e,n){var r=-1,i=ke,o=t.length,a=!0,s=[],u=s;if(n)a=!1,i=je;else if(o>=200){var l=e?null:Hi(t);if(l)return un(l);a=!1,i=Ke,u=new Hn}else u=e?[]:s;t:for(;++r<o;){var c=t[r],f=e?e(c):c;if(c=n||0!==c?c:0,a&&f==f){for(var h=u.length;h--;)if(u[h]===f)continue t;e&&u.push(f),s.push(c)}else i(u,f,n)||(u!==s&&u.push(f),s.push(c))}return s}function ui(t,e){return null==(t=Ao(t,e=yi(e,t)))||delete t[Mo(qo(e))]}function li(t,e,n,r){return Zr(t,e,n(xr(t,e)),r)}function ci(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?ti(t,r?0:o,r?o+1:i):ti(t,r?o+1:0,r?i:o)}function fi(t,e){var n=t;return n instanceof Vn&&(n=n.value()),Re(e,(function(t,e){return e.func.apply(e.thisArg,De([t],e.args))}),n)}function hi(t,e,n){var i=t.length;if(i<2)return i?si(t[0]):[];for(var o=-1,a=r(i);++o<i;)for(var s=t[o],u=-1;++u<i;)u!=o&&(a[o]=lr(a[o]||s,t[u],e,n));return si(vr(a,1),e,n)}function di(t,e,n){for(var r=-1,o=t.length,a=e.length,s={};++r<o;){var u=r<a?e[r]:i;n(s,t[r],u)}return s}function pi(t){return Ha(t)?t:[]}function vi(t){return"function"==typeof t?t:nu}function yi(t,e){return Ga(t)?t:go(t,e)?[t]:Lo(ms(t))}var mi=Yr;function gi(t,e,n){var r=t.length;return n=n===i?r:n,!e&&n>=r?t:ti(t,e,n)}var bi=ae||function(t){return fe.clearTimeout(t)};function wi(t,e){if(e)return t.slice();var n=t.length,r=Gt?Gt(n):new t.constructor(n);return t.copy(r),r}function xi(t){var e=new t.constructor(t.byteLength);return new Vt(e).set(new Vt(t)),e}function _i(t,e){var n=e?xi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Si(t,e){if(t!==e){var n=t!==i,r=null===t,o=t==t,a=ss(t),s=e!==i,u=null===e,l=e==e,c=ss(e);if(!u&&!c&&!a&&t>e||a&&s&&l&&!u&&!c||r&&s&&l||!n&&l||!o)return 1;if(!r&&!a&&!c&&t<e||c&&n&&o&&!r&&!a||u&&n&&o||!s&&o||!l)return-1}return 0}function Ti(t,e,n,i){for(var o=-1,a=t.length,s=n.length,u=-1,l=e.length,c=yn(a-s,0),f=r(l+c),h=!i;++u<l;)f[u]=e[u];for(;++o<s;)(h||o<a)&&(f[n[o]]=t[o]);for(;c--;)f[u++]=t[o++];return f}function Ai(t,e,n,i){for(var o=-1,a=t.length,s=-1,u=n.length,l=-1,c=e.length,f=yn(a-u,0),h=r(f+c),d=!i;++o<f;)h[o]=t[o];for(var p=o;++l<c;)h[p+l]=e[l];for(;++s<u;)(d||o<a)&&(h[p+n[s]]=t[o++]);return h}function Oi(t,e){var n=-1,i=t.length;for(e||(e=r(i));++n<i;)e[n]=t[n];return e}function Ei(t,e,n,r){var o=!n;n||(n={});for(var a=-1,s=e.length;++a<s;){var u=e[a],l=r?r(n[u],t[u],u,n,t):i;l===i&&(l=t[u]),o?rr(n,u,l):Qn(n,u,l)}return n}function Pi(t,e){return function(n,r){var i=Ga(n)?Te:er,o=e?e():{};return i(n,t,oo(r,2),o)}}function ki(t){return Yr((function(e,n){var r=-1,o=n.length,a=o>1?n[o-1]:i,s=o>2?n[2]:i;for(a=t.length>3&&"function"==typeof a?(o--,a):i,s&&mo(n[0],n[1],s)&&(a=o<3?i:a,o=1),e=Tt(e);++r<o;){var u=n[r];u&&t(e,u,r,a)}return e}))}function ji(t,e){return function(n,r){if(null==n)return n;if(!Xa(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=Tt(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Ci(t){return function(e,n,r){for(var i=-1,o=Tt(e),a=r(e),s=a.length;s--;){var u=a[t?s:++i];if(!1===n(o[u],u,o))break}return e}}function Di(t){return function(e){var n=rn(e=ms(e))?fn(e):i,r=n?n[0]:e.charAt(0),o=n?gi(n,1).join(""):e.slice(1);return r[t]()+o}}function Ri(t){return function(e){return Re(Zs(Vs(e).replace(Zt,"")),t,"")}}function Ii(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Un(t.prototype),r=t.apply(n,e);return Qa(r)?r:n}}function Li(t){return function(e,n,r){var o=Tt(e);if(!Xa(e)){var a=oo(n,3);e=js(e),n=function(t){return a(o[t],t,o)}}var s=t(e,n,r);return s>-1?o[a?e[s]:s]:i}}function Mi(t){return Qi((function(e){var n=e.length,r=n,a=Bn.prototype.thru;for(t&&e.reverse();r--;){var s=e[r];if("function"!=typeof s)throw new Et(o);if(a&&!u&&"wrapper"==ro(s))var u=new Bn([],!0)}for(r=u?r:n;++r<n;){var l=ro(s=e[r]),c="wrapper"==l?no(s):i;u=c&&bo(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?u[ro(c[0])].apply(u,c[3]):1==s.length&&bo(s)?u[l]():u.thru(s)}return function(){var t=arguments,r=t[0];if(u&&1==t.length&&Ga(r))return u.plant(r).value();for(var i=0,o=n?e[i].apply(this,t):r;++i<n;)o=e[i].call(this,o);return o}}))}function Ni(t,e,n,o,a,s,u,c,f,h){var d=e&l,p=1&e,v=2&e,y=24&e,m=512&e,g=v?i:Ii(t);return function l(){for(var b=arguments.length,w=r(b),x=b;x--;)w[x]=arguments[x];if(y)var _=io(l),S=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}(w,_);if(o&&(w=Ti(w,o,a,y)),s&&(w=Ai(w,s,u,y)),b-=S,y&&b<h){var T=sn(w,_);return Wi(t,e,Ni,l.placeholder,n,w,T,c,f,h-b)}var A=p?n:this,O=v?A[t]:t;return b=w.length,c?w=function(t,e){for(var n=t.length,r=mn(e.length,n),o=Oi(t);r--;){var a=e[r];t[r]=yo(a,n)?o[a]:i}return t}(w,c):m&&b>1&&w.reverse(),d&&f<b&&(w.length=f),this&&this!==fe&&this instanceof l&&(O=g||Ii(O)),O.apply(A,w)}}function Fi(t,e){return function(n,r){return function(t,e,n,r){return gr(t,(function(t,i,o){e(r,n(t),i,o)})),r}(n,t,e(r),{})}}function Ui(t,e){return function(n,r){var o;if(n===i&&r===i)return e;if(n!==i&&(o=n),r!==i){if(o===i)return r;"string"==typeof n||"string"==typeof r?(n=ai(n),r=ai(r)):(n=oi(n),r=oi(r)),o=t(n,r)}return o}}function zi(t){return Qi((function(e){return e=Ce(e,qe(oo())),Yr((function(n){var r=this;return t(e,(function(t){return Se(t,r,n)}))}))}))}function Bi(t,e){var n=(e=e===i?" ":ai(e)).length;if(n<2)return n?Hr(e,t):e;var r=Hr(e,he(t/cn(e)));return rn(e)?gi(fn(r),0,t).join(""):r.slice(0,t)}function Vi(t){return function(e,n,o){return o&&"number"!=typeof o&&mo(e,n,o)&&(n=o=i),e=hs(e),n===i?(n=e,e=0):n=hs(n),function(t,e,n,i){for(var o=-1,a=yn(he((e-t)/(n||1)),0),s=r(a);a--;)s[i?a:++o]=t,t+=n;return s}(e,n,o=o===i?e<n?1:-1:hs(o),t)}}function Gi(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=vs(e),n=vs(n)),t(e,n)}}function Wi(t,e,n,r,o,a,s,l,c,f){var h=8&e;e|=h?u:64,4&(e&=~(h?64:u))||(e&=-4);var d=[t,e,o,h?a:i,h?s:i,h?i:a,h?i:s,l,c,f],p=n.apply(i,d);return bo(t)&&Eo(p,d),p.placeholder=r,jo(p,t,e)}function Xi(t){var e=St[t];return function(t,n){if(t=vs(t),(n=null==n?0:mn(ds(n),292))&&Me(t)){var r=(ms(t)+"e").split("e");return+((r=(ms(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var Hi=An&&1/un(new An([,-0]))[1]==c?function(t){return new An(t)}:su;function Yi(t){return function(e){var n=fo(e);return n==_?on(e):n==E?ln(e):function(t,e){return Ce(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function $i(t,e,n,a,c,f,h,d){var p=2&e;if(!p&&"function"!=typeof t)throw new Et(o);var v=a?a.length:0;if(v||(e&=-97,a=c=i),h=h===i?h:yn(ds(h),0),d=d===i?d:ds(d),v-=c?c.length:0,64&e){var y=a,m=c;a=c=i}var g=p?i:no(t),b=[t,e,n,a,c,y,m,f,h,d];if(g&&function(t,e){var n=t[1],r=e[1],i=n|r,o=i<131,a=r==l&&8==n||r==l&&256==n&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!o&&!a)return t;1&r&&(t[2]=e[2],i|=1&n?0:4);var u=e[3];if(u){var c=t[3];t[3]=c?Ti(c,u,e[4]):u,t[4]=c?sn(t[3],s):e[4]}(u=e[5])&&(c=t[5],t[5]=c?Ai(c,u,e[6]):u,t[6]=c?sn(t[5],s):e[6]),(u=e[7])&&(t[7]=u),r&l&&(t[8]=null==t[8]?e[8]:mn(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(b,g),t=b[0],e=b[1],n=b[2],a=b[3],c=b[4],!(d=b[9]=b[9]===i?p?0:t.length:yn(b[9]-v,0))&&24&e&&(e&=-25),e&&1!=e)w=8==e||16==e?function(t,e,n){var o=Ii(t);return function a(){for(var s=arguments.length,u=r(s),l=s,c=io(a);l--;)u[l]=arguments[l];var f=s<3&&u[0]!==c&&u[s-1]!==c?[]:sn(u,c);return(s-=f.length)<n?Wi(t,e,Ni,a.placeholder,i,u,f,i,i,n-s):Se(this&&this!==fe&&this instanceof a?o:t,this,u)}}(t,e,d):e!=u&&33!=e||c.length?Ni.apply(i,b):function(t,e,n,i){var o=1&e,a=Ii(t);return function e(){for(var s=-1,u=arguments.length,l=-1,c=i.length,f=r(c+u),h=this&&this!==fe&&this instanceof e?a:t;++l<c;)f[l]=i[l];for(;u--;)f[l++]=arguments[++s];return Se(h,o?n:this,f)}}(t,e,n,a);else var w=function(t,e,n){var r=1&e,i=Ii(t);return function e(){return(this&&this!==fe&&this instanceof e?i:t).apply(r?n:this,arguments)}}(t,e,n);return jo((g?Kr:Eo)(w,b),t,e)}function qi(t,e,n,r){return t===i||Ua(t,jt[n])&&!Rt.call(r,n)?e:t}function Zi(t,e,n,r,o,a){return Qa(t)&&Qa(e)&&(a.set(e,t),Ur(t,e,i,Zi,a),a.delete(e)),t}function Ki(t){return rs(t)?i:t}function Ji(t,e,n,r,o,a){var s=1&n,u=t.length,l=e.length;if(u!=l&&!(s&&l>u))return!1;var c=a.get(t),f=a.get(e);if(c&&f)return c==e&&f==t;var h=-1,d=!0,p=2&n?new Hn:i;for(a.set(t,e),a.set(e,t);++h<u;){var v=t[h],y=e[h];if(r)var m=s?r(y,v,h,e,t,a):r(v,y,h,t,e,a);if(m!==i){if(m)continue;d=!1;break}if(p){if(!Le(e,(function(t,e){if(!Ke(p,e)&&(v===t||o(v,t,n,r,a)))return p.push(e)}))){d=!1;break}}else if(v!==y&&!o(v,y,n,r,a)){d=!1;break}}return a.delete(t),a.delete(e),d}function Qi(t){return ko(To(t,i,Wo),t+"")}function to(t){return _r(t,js,lo)}function eo(t){return _r(t,Cs,co)}var no=Pn?function(t){return Pn.get(t)}:su;function ro(t){for(var e=t.name+"",n=kn[e],r=Rt.call(kn,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function io(t){return(Rt.call(Fn,"placeholder")?Fn:t).placeholder}function oo(){var t=Fn.iteratee||ru;return t=t===ru?Rr:t,arguments.length?t(arguments[0],arguments[1]):t}function ao(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function so(t){for(var e=js(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,_o(i)]}return e}function uo(t,e){var n=function(t,e){return null==t?i:t[e]}(t,e);return Dr(n)?n:i}var lo=ve?function(t){return null==t?[]:(t=Tt(t),Pe(ve(t),(function(e){return Ht.call(t,e)})))}:pu,co=ve?function(t){for(var e=[];t;)De(e,lo(t)),t=Wt(t);return e}:pu,fo=Sr;function ho(t,e,n){for(var r=-1,i=(e=yi(e,t)).length,o=!1;++r<i;){var a=Mo(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&Ja(i)&&yo(a,i)&&(Ga(t)||Va(t))}function po(t){return"function"!=typeof t.constructor||xo(t)?{}:Un(Wt(t))}function vo(t){return Ga(t)||Va(t)||!!($t&&t&&t[$t])}function yo(t,e){var n=typeof t;return!!(e=null==e?f:e)&&("number"==n||"symbol"!=n&&mt.test(t))&&t>-1&&t%1==0&&t<e}function mo(t,e,n){if(!Qa(n))return!1;var r=typeof e;return!!("number"==r?Xa(n)&&yo(e,n.length):"string"==r&&e in n)&&Ua(n[e],t)}function go(t,e){if(Ga(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!ss(t))||Q.test(t)||!J.test(t)||null!=e&&t in Tt(e)}function bo(t){var e=ro(t),n=Fn[e];if("function"!=typeof n||!(e in Vn.prototype))return!1;if(t===n)return!0;var r=no(n);return!!r&&t===r[0]}(_n&&fo(new _n(new ArrayBuffer(1)))!=D||Sn&&fo(new Sn)!=_||Tn&&fo(Tn.resolve())!=A||An&&fo(new An)!=E||On&&fo(new On)!=j)&&(fo=function(t){var e=Sr(t),n=e==T?t.constructor:i,r=n?No(n):"";if(r)switch(r){case jn:return D;case Cn:return _;case Dn:return A;case Rn:return E;case In:return j}return e});var wo=Ct?Za:vu;function xo(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||jt)}function _o(t){return t==t&&!Qa(t)}function So(t,e){return function(n){return null!=n&&n[t]===e&&(e!==i||t in Tt(n))}}function To(t,e,n){return e=yn(e===i?t.length-1:e,0),function(){for(var i=arguments,o=-1,a=yn(i.length-e,0),s=r(a);++o<a;)s[o]=i[e+o];o=-1;for(var u=r(e+1);++o<e;)u[o]=i[o];return u[e]=n(s),Se(t,this,u)}}function Ao(t,e){return e.length<2?t:xr(t,ti(e,0,-1))}function Oo(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Eo=Co(Kr),Po=ce||function(t,e){return fe.setTimeout(t,e)},ko=Co(Jr);function jo(t,e,n){var r=e+"";return ko(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(ot,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return Ae(p,(function(n){var r="_."+n[0];e&n[1]&&!ke(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(at);return e?e[1].split(st):[]}(r),n)))}function Co(t){var e=0,n=0;return function(){var r=gn(),o=16-(r-n);if(n=r,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(i,arguments)}}function Do(t,e){var n=-1,r=t.length,o=r-1;for(e=e===i?r:e;++n<e;){var a=Xr(n,o),s=t[a];t[a]=t[n],t[n]=s}return t.length=e,t}var Ro,Io,Lo=(Ro=Ra((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(tt,(function(t,n,r,i){e.push(r?i.replace(ct,"$1"):n||t)})),e}),(function(t){return 500===Io.size&&Io.clear(),t})),Io=Ro.cache,Ro);function Mo(t){if("string"==typeof t||ss(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function No(t){if(null!=t){try{return Dt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Fo(t){if(t instanceof Vn)return t.clone();var e=new Bn(t.__wrapped__,t.__chain__);return e.__actions__=Oi(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Uo=Yr((function(t,e){return Ha(t)?lr(t,vr(e,1,Ha,!0)):[]})),zo=Yr((function(t,e){var n=qo(e);return Ha(n)&&(n=i),Ha(t)?lr(t,vr(e,1,Ha,!0),oo(n,2)):[]})),Bo=Yr((function(t,e){var n=qo(e);return Ha(n)&&(n=i),Ha(t)?lr(t,vr(e,1,Ha,!0),i,n):[]}));function Vo(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:ds(n);return i<0&&(i=yn(r+i,0)),Fe(t,oo(e,3),i)}function Go(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=r-1;return n!==i&&(o=ds(n),o=n<0?yn(r+o,0):mn(o,r-1)),Fe(t,oo(e,3),o,!0)}function Wo(t){return null!=t&&t.length?vr(t,1):[]}function Xo(t){return t&&t.length?t[0]:i}var Ho=Yr((function(t){var e=Ce(t,pi);return e.length&&e[0]===t[0]?Er(e):[]})),Yo=Yr((function(t){var e=qo(t),n=Ce(t,pi);return e===qo(n)?e=i:n.pop(),n.length&&n[0]===t[0]?Er(n,oo(e,2)):[]})),$o=Yr((function(t){var e=qo(t),n=Ce(t,pi);return(e="function"==typeof e?e:i)&&n.pop(),n.length&&n[0]===t[0]?Er(n,i,e):[]}));function qo(t){var e=null==t?0:t.length;return e?t[e-1]:i}var Zo=Yr(Ko);function Ko(t,e){return t&&t.length&&e&&e.length?Gr(t,e):t}var Jo=Qi((function(t,e){var n=null==t?0:t.length,r=ir(t,e);return Wr(t,Ce(e,(function(t){return yo(t,n)?+t:t})).sort(Si)),r}));function Qo(t){return null==t?t:xn.call(t)}var ta=Yr((function(t){return si(vr(t,1,Ha,!0))})),ea=Yr((function(t){var e=qo(t);return Ha(e)&&(e=i),si(vr(t,1,Ha,!0),oo(e,2))})),na=Yr((function(t){var e=qo(t);return e="function"==typeof e?e:i,si(vr(t,1,Ha,!0),i,e)}));function ra(t){if(!t||!t.length)return[];var e=0;return t=Pe(t,(function(t){if(Ha(t))return e=yn(t.length,e),!0})),Ye(e,(function(e){return Ce(t,Ge(e))}))}function ia(t,e){if(!t||!t.length)return[];var n=ra(t);return null==e?n:Ce(n,(function(t){return Se(e,i,t)}))}var oa=Yr((function(t,e){return Ha(t)?lr(t,e):[]})),aa=Yr((function(t){return hi(Pe(t,Ha))})),sa=Yr((function(t){var e=qo(t);return Ha(e)&&(e=i),hi(Pe(t,Ha),oo(e,2))})),ua=Yr((function(t){var e=qo(t);return e="function"==typeof e?e:i,hi(Pe(t,Ha),i,e)})),la=Yr(ra),ca=Yr((function(t){var e=t.length,n=e>1?t[e-1]:i;return n="function"==typeof n?(t.pop(),n):i,ia(t,n)}));function fa(t){var e=Fn(t);return e.__chain__=!0,e}function ha(t,e){return e(t)}var da=Qi((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,o=function(e){return ir(e,t)};return!(e>1||this.__actions__.length)&&r instanceof Vn&&yo(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:ha,args:[o],thisArg:i}),new Bn(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(i),t}))):this.thru(o)})),pa=Pi((function(t,e,n){Rt.call(t,n)?++t[n]:rr(t,n,1)})),va=Li(Vo),ya=Li(Go);function ma(t,e){return(Ga(t)?Ae:cr)(t,oo(e,3))}function ga(t,e){return(Ga(t)?Oe:fr)(t,oo(e,3))}var ba=Pi((function(t,e,n){Rt.call(t,n)?t[n].push(e):rr(t,n,[e])})),wa=Yr((function(t,e,n){var i=-1,o="function"==typeof e,a=Xa(t)?r(t.length):[];return cr(t,(function(t){a[++i]=o?Se(e,t,n):Pr(t,e,n)})),a})),xa=Pi((function(t,e,n){rr(t,n,e)}));function _a(t,e){return(Ga(t)?Ce:Mr)(t,oo(e,3))}var Sa=Pi((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]})),Ta=Yr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&mo(t,e[0],e[1])?e=[]:n>2&&mo(e[0],e[1],e[2])&&(e=[e[0]]),Br(t,vr(e,1),[])})),Aa=le||function(){return fe.Date.now()};function Oa(t,e,n){return e=n?i:e,e=t&&null==e?t.length:e,$i(t,l,i,i,i,i,e)}function Ea(t,e){var n;if("function"!=typeof e)throw new Et(o);return t=ds(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=i),n}}var Pa=Yr((function(t,e,n){var r=1;if(n.length){var i=sn(n,io(Pa));r|=u}return $i(t,r,e,n,i)})),ka=Yr((function(t,e,n){var r=3;if(n.length){var i=sn(n,io(ka));r|=u}return $i(e,r,t,n,i)}));function ja(t,e,n){var r,a,s,u,l,c,f=0,h=!1,d=!1,p=!0;if("function"!=typeof t)throw new Et(o);function v(e){var n=r,o=a;return r=a=i,f=e,u=t.apply(o,n)}function y(t){var n=t-c;return c===i||n>=e||n<0||d&&t-f>=s}function m(){var t=Aa();if(y(t))return g(t);l=Po(m,function(t){var n=e-(t-c);return d?mn(n,s-(t-f)):n}(t))}function g(t){return l=i,p&&r?v(t):(r=a=i,u)}function b(){var t=Aa(),n=y(t);if(r=arguments,a=this,c=t,n){if(l===i)return function(t){return f=t,l=Po(m,e),h?v(t):u}(c);if(d)return bi(l),l=Po(m,e),v(c)}return l===i&&(l=Po(m,e)),u}return e=vs(e)||0,Qa(n)&&(h=!!n.leading,s=(d="maxWait"in n)?yn(vs(n.maxWait)||0,e):s,p="trailing"in n?!!n.trailing:p),b.cancel=function(){l!==i&&bi(l),f=0,r=c=a=l=i},b.flush=function(){return l===i?u:g(Aa())},b}var Ca=Yr((function(t,e){return ur(t,1,e)})),Da=Yr((function(t,e,n){return ur(t,vs(e)||0,n)}));function Ra(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new Et(o);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Ra.Cache||Xn),n}function Ia(t){if("function"!=typeof t)throw new Et(o);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Ra.Cache=Xn;var La=mi((function(t,e){var n=(e=1==e.length&&Ga(e[0])?Ce(e[0],qe(oo())):Ce(vr(e,1),qe(oo()))).length;return Yr((function(r){for(var i=-1,o=mn(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return Se(t,this,r)}))})),Ma=Yr((function(t,e){var n=sn(e,io(Ma));return $i(t,u,i,e,n)})),Na=Yr((function(t,e){var n=sn(e,io(Na));return $i(t,64,i,e,n)})),Fa=Qi((function(t,e){return $i(t,256,i,i,i,e)}));function Ua(t,e){return t===e||t!=t&&e!=e}var za=Gi(Tr),Ba=Gi((function(t,e){return t>=e})),Va=kr(function(){return arguments}())?kr:function(t){return ts(t)&&Rt.call(t,"callee")&&!Ht.call(t,"callee")},Ga=r.isArray,Wa=me?qe(me):function(t){return ts(t)&&Sr(t)==C};function Xa(t){return null!=t&&Ja(t.length)&&!Za(t)}function Ha(t){return ts(t)&&Xa(t)}var Ya=ye||vu,$a=ge?qe(ge):function(t){return ts(t)&&Sr(t)==g};function qa(t){if(!ts(t))return!1;var e=Sr(t);return e==b||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!rs(t)}function Za(t){if(!Qa(t))return!1;var e=Sr(t);return e==w||e==x||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Ka(t){return"number"==typeof t&&t==ds(t)}function Ja(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=f}function Qa(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function ts(t){return null!=t&&"object"==typeof t}var es=be?qe(be):function(t){return ts(t)&&fo(t)==_};function ns(t){return"number"==typeof t||ts(t)&&Sr(t)==S}function rs(t){if(!ts(t)||Sr(t)!=T)return!1;var e=Wt(t);if(null===e)return!0;var n=Rt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Dt.call(n)==Nt}var is=we?qe(we):function(t){return ts(t)&&Sr(t)==O},os=xe?qe(xe):function(t){return ts(t)&&fo(t)==E};function as(t){return"string"==typeof t||!Ga(t)&&ts(t)&&Sr(t)==P}function ss(t){return"symbol"==typeof t||ts(t)&&Sr(t)==k}var us=_e?qe(_e):function(t){return ts(t)&&Ja(t.length)&&!!ie[Sr(t)]},ls=Gi(Lr),cs=Gi((function(t,e){return t<=e}));function fs(t){if(!t)return[];if(Xa(t))return as(t)?fn(t):Oi(t);if(qt&&t[qt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[qt]());var e=fo(t);return(e==_?on:e==E?un:Us)(t)}function hs(t){return t?(t=vs(t))===c||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function ds(t){var e=hs(t),n=e%1;return e==e?n?e-n:e:0}function ps(t){return t?or(ds(t),0,d):0}function vs(t){if("number"==typeof t)return t;if(ss(t))return h;if(Qa(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Qa(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=$e(t);var n=pt.test(t);return n||yt.test(t)?ue(t.slice(2),n?2:8):dt.test(t)?h:+t}function ys(t){return Ei(t,Cs(t))}function ms(t){return null==t?"":ai(t)}var gs=ki((function(t,e){if(xo(e)||Xa(e))Ei(e,js(e),t);else for(var n in e)Rt.call(e,n)&&Qn(t,n,e[n])})),bs=ki((function(t,e){Ei(e,Cs(e),t)})),ws=ki((function(t,e,n,r){Ei(e,Cs(e),t,r)})),xs=ki((function(t,e,n,r){Ei(e,js(e),t,r)})),_s=Qi(ir),Ss=Yr((function(t,e){t=Tt(t);var n=-1,r=e.length,o=r>2?e[2]:i;for(o&&mo(e[0],e[1],o)&&(r=1);++n<r;)for(var a=e[n],s=Cs(a),u=-1,l=s.length;++u<l;){var c=s[u],f=t[c];(f===i||Ua(f,jt[c])&&!Rt.call(t,c))&&(t[c]=a[c])}return t})),Ts=Yr((function(t){return t.push(i,Zi),Se(Rs,i,t)}));function As(t,e,n){var r=null==t?i:xr(t,e);return r===i?n:r}function Os(t,e){return null!=t&&ho(t,e,Or)}var Es=Fi((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Mt.call(e)),t[e]=n}),Qs(nu)),Ps=Fi((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Mt.call(e)),Rt.call(t,e)?t[e].push(n):t[e]=[n]}),oo),ks=Yr(Pr);function js(t){return Xa(t)?$n(t):Ir(t)}function Cs(t){return Xa(t)?$n(t,!0):function(t){if(!Qa(t))return function(t){var e=[];if(null!=t)for(var n in Tt(t))e.push(n);return e}(t);var e=xo(t),n=[];for(var r in t)("constructor"!=r||!e&&Rt.call(t,r))&&n.push(r);return n}(t)}var Ds=ki((function(t,e,n){Ur(t,e,n)})),Rs=ki((function(t,e,n,r){Ur(t,e,n,r)})),Is=Qi((function(t,e){var n={};if(null==t)return n;var r=!1;e=Ce(e,(function(e){return e=yi(e,t),r||(r=e.length>1),e})),Ei(t,eo(t),n),r&&(n=ar(n,7,Ki));for(var i=e.length;i--;)ui(n,e[i]);return n})),Ls=Qi((function(t,e){return null==t?{}:function(t,e){return Vr(t,e,(function(e,n){return Os(t,n)}))}(t,e)}));function Ms(t,e){if(null==t)return{};var n=Ce(eo(t),(function(t){return[t]}));return e=oo(e),Vr(t,n,(function(t,n){return e(t,n[0])}))}var Ns=Yi(js),Fs=Yi(Cs);function Us(t){return null==t?[]:Ze(t,js(t))}var zs=Ri((function(t,e,n){return e=e.toLowerCase(),t+(n?Bs(e):e)}));function Bs(t){return qs(ms(t).toLowerCase())}function Vs(t){return(t=ms(t))&&t.replace(gt,tn).replace(Kt,"")}var Gs=Ri((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Ws=Ri((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Xs=Di("toLowerCase"),Hs=Ri((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()})),Ys=Ri((function(t,e,n){return t+(n?" ":"")+qs(e)})),$s=Ri((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),qs=Di("toUpperCase");function Zs(t,e,n){return t=ms(t),(e=n?i:e)===i?function(t){return ee.test(t)}(t)?function(t){return t.match(Qt)||[]}(t):function(t){return t.match(ut)||[]}(t):t.match(e)||[]}var Ks=Yr((function(t,e){try{return Se(t,i,e)}catch(t){return qa(t)?t:new xt(t)}})),Js=Qi((function(t,e){return Ae(e,(function(e){e=Mo(e),rr(t,e,Pa(t[e],t))})),t}));function Qs(t){return function(){return t}}var tu=Mi(),eu=Mi(!0);function nu(t){return t}function ru(t){return Rr("function"==typeof t?t:ar(t,1))}var iu=Yr((function(t,e){return function(n){return Pr(n,t,e)}})),ou=Yr((function(t,e){return function(n){return Pr(t,n,e)}}));function au(t,e,n){var r=js(e),i=wr(e,r);null!=n||Qa(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=wr(e,js(e)));var o=!(Qa(n)&&"chain"in n&&!n.chain),a=Za(t);return Ae(i,(function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__);return(n.__actions__=Oi(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,De([this.value()],arguments))})})),t}function su(){}var uu=zi(Ce),lu=zi(Ee),cu=zi(Le);function fu(t){return go(t)?Ge(Mo(t)):function(t){return function(e){return xr(e,t)}}(t)}var hu=Vi(),du=Vi(!0);function pu(){return[]}function vu(){return!1}var yu,mu=Ui((function(t,e){return t+e}),0),gu=Xi("ceil"),bu=Ui((function(t,e){return t/e}),1),wu=Xi("floor"),xu=Ui((function(t,e){return t*e}),1),_u=Xi("round"),Su=Ui((function(t,e){return t-e}),0);return Fn.after=function(t,e){if("function"!=typeof e)throw new Et(o);return t=ds(t),function(){if(--t<1)return e.apply(this,arguments)}},Fn.ary=Oa,Fn.assign=gs,Fn.assignIn=bs,Fn.assignInWith=ws,Fn.assignWith=xs,Fn.at=_s,Fn.before=Ea,Fn.bind=Pa,Fn.bindAll=Js,Fn.bindKey=ka,Fn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Ga(t)?t:[t]},Fn.chain=fa,Fn.chunk=function(t,e,n){e=(n?mo(t,e,n):e===i)?1:yn(ds(e),0);var o=null==t?0:t.length;if(!o||e<1)return[];for(var a=0,s=0,u=r(he(o/e));a<o;)u[s++]=ti(t,a,a+=e);return u},Fn.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i},Fn.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],i=t;i--;)e[i-1]=arguments[i];return De(Ga(n)?Oi(n):[n],vr(e,1))},Fn.cond=function(t){var e=null==t?0:t.length,n=oo();return t=e?Ce(t,(function(t){if("function"!=typeof t[1])throw new Et(o);return[n(t[0]),t[1]]})):[],Yr((function(n){for(var r=-1;++r<e;){var i=t[r];if(Se(i[0],this,n))return Se(i[1],this,n)}}))},Fn.conforms=function(t){return function(t){var e=js(t);return function(n){return sr(n,t,e)}}(ar(t,1))},Fn.constant=Qs,Fn.countBy=pa,Fn.create=function(t,e){var n=Un(t);return null==e?n:nr(n,e)},Fn.curry=function t(e,n,r){var o=$i(e,8,i,i,i,i,i,n=r?i:n);return o.placeholder=t.placeholder,o},Fn.curryRight=function t(e,n,r){var o=$i(e,16,i,i,i,i,i,n=r?i:n);return o.placeholder=t.placeholder,o},Fn.debounce=ja,Fn.defaults=Ss,Fn.defaultsDeep=Ts,Fn.defer=Ca,Fn.delay=Da,Fn.difference=Uo,Fn.differenceBy=zo,Fn.differenceWith=Bo,Fn.drop=function(t,e,n){var r=null==t?0:t.length;return r?ti(t,(e=n||e===i?1:ds(e))<0?0:e,r):[]},Fn.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?ti(t,0,(e=r-(e=n||e===i?1:ds(e)))<0?0:e):[]},Fn.dropRightWhile=function(t,e){return t&&t.length?ci(t,oo(e,3),!0,!0):[]},Fn.dropWhile=function(t,e){return t&&t.length?ci(t,oo(e,3),!0):[]},Fn.fill=function(t,e,n,r){var o=null==t?0:t.length;return o?(n&&"number"!=typeof n&&mo(t,e,n)&&(n=0,r=o),function(t,e,n,r){var o=t.length;for((n=ds(n))<0&&(n=-n>o?0:o+n),(r=r===i||r>o?o:ds(r))<0&&(r+=o),r=n>r?0:ps(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},Fn.filter=function(t,e){return(Ga(t)?Pe:pr)(t,oo(e,3))},Fn.flatMap=function(t,e){return vr(_a(t,e),1)},Fn.flatMapDeep=function(t,e){return vr(_a(t,e),c)},Fn.flatMapDepth=function(t,e,n){return n=n===i?1:ds(n),vr(_a(t,e),n)},Fn.flatten=Wo,Fn.flattenDeep=function(t){return null!=t&&t.length?vr(t,c):[]},Fn.flattenDepth=function(t,e){return null!=t&&t.length?vr(t,e=e===i?1:ds(e)):[]},Fn.flip=function(t){return $i(t,512)},Fn.flow=tu,Fn.flowRight=eu,Fn.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},Fn.functions=function(t){return null==t?[]:wr(t,js(t))},Fn.functionsIn=function(t){return null==t?[]:wr(t,Cs(t))},Fn.groupBy=ba,Fn.initial=function(t){return null!=t&&t.length?ti(t,0,-1):[]},Fn.intersection=Ho,Fn.intersectionBy=Yo,Fn.intersectionWith=$o,Fn.invert=Es,Fn.invertBy=Ps,Fn.invokeMap=wa,Fn.iteratee=ru,Fn.keyBy=xa,Fn.keys=js,Fn.keysIn=Cs,Fn.map=_a,Fn.mapKeys=function(t,e){var n={};return e=oo(e,3),gr(t,(function(t,r,i){rr(n,e(t,r,i),t)})),n},Fn.mapValues=function(t,e){var n={};return e=oo(e,3),gr(t,(function(t,r,i){rr(n,r,e(t,r,i))})),n},Fn.matches=function(t){return Nr(ar(t,1))},Fn.matchesProperty=function(t,e){return Fr(t,ar(e,1))},Fn.memoize=Ra,Fn.merge=Ds,Fn.mergeWith=Rs,Fn.method=iu,Fn.methodOf=ou,Fn.mixin=au,Fn.negate=Ia,Fn.nthArg=function(t){return t=ds(t),Yr((function(e){return zr(e,t)}))},Fn.omit=Is,Fn.omitBy=function(t,e){return Ms(t,Ia(oo(e)))},Fn.once=function(t){return Ea(2,t)},Fn.orderBy=function(t,e,n,r){return null==t?[]:(Ga(e)||(e=null==e?[]:[e]),Ga(n=r?i:n)||(n=null==n?[]:[n]),Br(t,e,n))},Fn.over=uu,Fn.overArgs=La,Fn.overEvery=lu,Fn.overSome=cu,Fn.partial=Ma,Fn.partialRight=Na,Fn.partition=Sa,Fn.pick=Ls,Fn.pickBy=Ms,Fn.property=fu,Fn.propertyOf=function(t){return function(e){return null==t?i:xr(t,e)}},Fn.pull=Zo,Fn.pullAll=Ko,Fn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Gr(t,e,oo(n,2)):t},Fn.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Gr(t,e,i,n):t},Fn.pullAt=Jo,Fn.range=hu,Fn.rangeRight=du,Fn.rearg=Fa,Fn.reject=function(t,e){return(Ga(t)?Pe:pr)(t,Ia(oo(e,3)))},Fn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=oo(e,3);++r<o;){var a=t[r];e(a,r,t)&&(n.push(a),i.push(r))}return Wr(t,i),n},Fn.rest=function(t,e){if("function"!=typeof t)throw new Et(o);return Yr(t,e=e===i?e:ds(e))},Fn.reverse=Qo,Fn.sampleSize=function(t,e,n){return e=(n?mo(t,e,n):e===i)?1:ds(e),(Ga(t)?Zn:qr)(t,e)},Fn.set=function(t,e,n){return null==t?t:Zr(t,e,n)},Fn.setWith=function(t,e,n,r){return r="function"==typeof r?r:i,null==t?t:Zr(t,e,n,r)},Fn.shuffle=function(t){return(Ga(t)?Kn:Qr)(t)},Fn.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&mo(t,e,n)?(e=0,n=r):(e=null==e?0:ds(e),n=n===i?r:ds(n)),ti(t,e,n)):[]},Fn.sortBy=Ta,Fn.sortedUniq=function(t){return t&&t.length?ii(t):[]},Fn.sortedUniqBy=function(t,e){return t&&t.length?ii(t,oo(e,2)):[]},Fn.split=function(t,e,n){return n&&"number"!=typeof n&&mo(t,e,n)&&(e=n=i),(n=n===i?d:n>>>0)?(t=ms(t))&&("string"==typeof e||null!=e&&!is(e))&&!(e=ai(e))&&rn(t)?gi(fn(t),0,n):t.split(e,n):[]},Fn.spread=function(t,e){if("function"!=typeof t)throw new Et(o);return e=null==e?0:yn(ds(e),0),Yr((function(n){var r=n[e],i=gi(n,0,e);return r&&De(i,r),Se(t,this,i)}))},Fn.tail=function(t){var e=null==t?0:t.length;return e?ti(t,1,e):[]},Fn.take=function(t,e,n){return t&&t.length?ti(t,0,(e=n||e===i?1:ds(e))<0?0:e):[]},Fn.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?ti(t,(e=r-(e=n||e===i?1:ds(e)))<0?0:e,r):[]},Fn.takeRightWhile=function(t,e){return t&&t.length?ci(t,oo(e,3),!1,!0):[]},Fn.takeWhile=function(t,e){return t&&t.length?ci(t,oo(e,3)):[]},Fn.tap=function(t,e){return e(t),t},Fn.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new Et(o);return Qa(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),ja(t,e,{leading:r,maxWait:e,trailing:i})},Fn.thru=ha,Fn.toArray=fs,Fn.toPairs=Ns,Fn.toPairsIn=Fs,Fn.toPath=function(t){return Ga(t)?Ce(t,Mo):ss(t)?[t]:Oi(Lo(ms(t)))},Fn.toPlainObject=ys,Fn.transform=function(t,e,n){var r=Ga(t),i=r||Ya(t)||us(t);if(e=oo(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:Qa(t)&&Za(o)?Un(Wt(t)):{}}return(i?Ae:gr)(t,(function(t,r,i){return e(n,t,r,i)})),n},Fn.unary=function(t){return Oa(t,1)},Fn.union=ta,Fn.unionBy=ea,Fn.unionWith=na,Fn.uniq=function(t){return t&&t.length?si(t):[]},Fn.uniqBy=function(t,e){return t&&t.length?si(t,oo(e,2)):[]},Fn.uniqWith=function(t,e){return e="function"==typeof e?e:i,t&&t.length?si(t,i,e):[]},Fn.unset=function(t,e){return null==t||ui(t,e)},Fn.unzip=ra,Fn.unzipWith=ia,Fn.update=function(t,e,n){return null==t?t:li(t,e,vi(n))},Fn.updateWith=function(t,e,n,r){return r="function"==typeof r?r:i,null==t?t:li(t,e,vi(n),r)},Fn.values=Us,Fn.valuesIn=function(t){return null==t?[]:Ze(t,Cs(t))},Fn.without=oa,Fn.words=Zs,Fn.wrap=function(t,e){return Ma(vi(e),t)},Fn.xor=aa,Fn.xorBy=sa,Fn.xorWith=ua,Fn.zip=la,Fn.zipObject=function(t,e){return di(t||[],e||[],Qn)},Fn.zipObjectDeep=function(t,e){return di(t||[],e||[],Zr)},Fn.zipWith=ca,Fn.entries=Ns,Fn.entriesIn=Fs,Fn.extend=bs,Fn.extendWith=ws,au(Fn,Fn),Fn.add=mu,Fn.attempt=Ks,Fn.camelCase=zs,Fn.capitalize=Bs,Fn.ceil=gu,Fn.clamp=function(t,e,n){return n===i&&(n=e,e=i),n!==i&&(n=(n=vs(n))==n?n:0),e!==i&&(e=(e=vs(e))==e?e:0),or(vs(t),e,n)},Fn.clone=function(t){return ar(t,4)},Fn.cloneDeep=function(t){return ar(t,5)},Fn.cloneDeepWith=function(t,e){return ar(t,5,e="function"==typeof e?e:i)},Fn.cloneWith=function(t,e){return ar(t,4,e="function"==typeof e?e:i)},Fn.conformsTo=function(t,e){return null==e||sr(t,e,js(e))},Fn.deburr=Vs,Fn.defaultTo=function(t,e){return null==t||t!=t?e:t},Fn.divide=bu,Fn.endsWith=function(t,e,n){t=ms(t),e=ai(e);var r=t.length,o=n=n===i?r:or(ds(n),0,r);return(n-=e.length)>=0&&t.slice(n,o)==e},Fn.eq=Ua,Fn.escape=function(t){return(t=ms(t))&&$.test(t)?t.replace(H,en):t},Fn.escapeRegExp=function(t){return(t=ms(t))&&nt.test(t)?t.replace(et,"\\$&"):t},Fn.every=function(t,e,n){var r=Ga(t)?Ee:hr;return n&&mo(t,e,n)&&(e=i),r(t,oo(e,3))},Fn.find=va,Fn.findIndex=Vo,Fn.findKey=function(t,e){return Ne(t,oo(e,3),gr)},Fn.findLast=ya,Fn.findLastIndex=Go,Fn.findLastKey=function(t,e){return Ne(t,oo(e,3),br)},Fn.floor=wu,Fn.forEach=ma,Fn.forEachRight=ga,Fn.forIn=function(t,e){return null==t?t:yr(t,oo(e,3),Cs)},Fn.forInRight=function(t,e){return null==t?t:mr(t,oo(e,3),Cs)},Fn.forOwn=function(t,e){return t&&gr(t,oo(e,3))},Fn.forOwnRight=function(t,e){return t&&br(t,oo(e,3))},Fn.get=As,Fn.gt=za,Fn.gte=Ba,Fn.has=function(t,e){return null!=t&&ho(t,e,Ar)},Fn.hasIn=Os,Fn.head=Xo,Fn.identity=nu,Fn.includes=function(t,e,n,r){t=Xa(t)?t:Us(t),n=n&&!r?ds(n):0;var i=t.length;return n<0&&(n=yn(i+n,0)),as(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Ue(t,e,n)>-1},Fn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:ds(n);return i<0&&(i=yn(r+i,0)),Ue(t,e,i)},Fn.inRange=function(t,e,n){return e=hs(e),n===i?(n=e,e=0):n=hs(n),function(t,e,n){return t>=mn(e,n)&&t<yn(e,n)}(t=vs(t),e,n)},Fn.invoke=ks,Fn.isArguments=Va,Fn.isArray=Ga,Fn.isArrayBuffer=Wa,Fn.isArrayLike=Xa,Fn.isArrayLikeObject=Ha,Fn.isBoolean=function(t){return!0===t||!1===t||ts(t)&&Sr(t)==m},Fn.isBuffer=Ya,Fn.isDate=$a,Fn.isElement=function(t){return ts(t)&&1===t.nodeType&&!rs(t)},Fn.isEmpty=function(t){if(null==t)return!0;if(Xa(t)&&(Ga(t)||"string"==typeof t||"function"==typeof t.splice||Ya(t)||us(t)||Va(t)))return!t.length;var e=fo(t);if(e==_||e==E)return!t.size;if(xo(t))return!Ir(t).length;for(var n in t)if(Rt.call(t,n))return!1;return!0},Fn.isEqual=function(t,e){return jr(t,e)},Fn.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:i)?n(t,e):i;return r===i?jr(t,e,i,n):!!r},Fn.isError=qa,Fn.isFinite=function(t){return"number"==typeof t&&Me(t)},Fn.isFunction=Za,Fn.isInteger=Ka,Fn.isLength=Ja,Fn.isMap=es,Fn.isMatch=function(t,e){return t===e||Cr(t,e,so(e))},Fn.isMatchWith=function(t,e,n){return n="function"==typeof n?n:i,Cr(t,e,so(e),n)},Fn.isNaN=function(t){return ns(t)&&t!=+t},Fn.isNative=function(t){if(wo(t))throw new xt("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Dr(t)},Fn.isNil=function(t){return null==t},Fn.isNull=function(t){return null===t},Fn.isNumber=ns,Fn.isObject=Qa,Fn.isObjectLike=ts,Fn.isPlainObject=rs,Fn.isRegExp=is,Fn.isSafeInteger=function(t){return Ka(t)&&t>=-9007199254740991&&t<=f},Fn.isSet=os,Fn.isString=as,Fn.isSymbol=ss,Fn.isTypedArray=us,Fn.isUndefined=function(t){return t===i},Fn.isWeakMap=function(t){return ts(t)&&fo(t)==j},Fn.isWeakSet=function(t){return ts(t)&&"[object WeakSet]"==Sr(t)},Fn.join=function(t,e){return null==t?"":We.call(t,e)},Fn.kebabCase=Gs,Fn.last=qo,Fn.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=ds(n))<0?yn(r+o,0):mn(o,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,o):Fe(t,Be,o,!0)},Fn.lowerCase=Ws,Fn.lowerFirst=Xs,Fn.lt=ls,Fn.lte=cs,Fn.max=function(t){return t&&t.length?dr(t,nu,Tr):i},Fn.maxBy=function(t,e){return t&&t.length?dr(t,oo(e,2),Tr):i},Fn.mean=function(t){return Ve(t,nu)},Fn.meanBy=function(t,e){return Ve(t,oo(e,2))},Fn.min=function(t){return t&&t.length?dr(t,nu,Lr):i},Fn.minBy=function(t,e){return t&&t.length?dr(t,oo(e,2),Lr):i},Fn.stubArray=pu,Fn.stubFalse=vu,Fn.stubObject=function(){return{}},Fn.stubString=function(){return""},Fn.stubTrue=function(){return!0},Fn.multiply=xu,Fn.nth=function(t,e){return t&&t.length?zr(t,ds(e)):i},Fn.noConflict=function(){return fe._===this&&(fe._=Ft),this},Fn.noop=su,Fn.now=Aa,Fn.pad=function(t,e,n){t=ms(t);var r=(e=ds(e))?cn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return Bi(de(i),n)+t+Bi(he(i),n)},Fn.padEnd=function(t,e,n){t=ms(t);var r=(e=ds(e))?cn(t):0;return e&&r<e?t+Bi(e-r,n):t},Fn.padStart=function(t,e,n){t=ms(t);var r=(e=ds(e))?cn(t):0;return e&&r<e?Bi(e-r,n)+t:t},Fn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),bn(ms(t).replace(rt,""),e||0)},Fn.random=function(t,e,n){if(n&&"boolean"!=typeof n&&mo(t,e,n)&&(e=n=i),n===i&&("boolean"==typeof e?(n=e,e=i):"boolean"==typeof t&&(n=t,t=i)),t===i&&e===i?(t=0,e=1):(t=hs(t),e===i?(e=t,t=0):e=hs(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var o=wn();return mn(t+o*(e-t+se("1e-"+((o+"").length-1))),e)}return Xr(t,e)},Fn.reduce=function(t,e,n){var r=Ga(t)?Re:Xe,i=arguments.length<3;return r(t,oo(e,4),n,i,cr)},Fn.reduceRight=function(t,e,n){var r=Ga(t)?Ie:Xe,i=arguments.length<3;return r(t,oo(e,4),n,i,fr)},Fn.repeat=function(t,e,n){return e=(n?mo(t,e,n):e===i)?1:ds(e),Hr(ms(t),e)},Fn.replace=function(){var t=arguments,e=ms(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Fn.result=function(t,e,n){var r=-1,o=(e=yi(e,t)).length;for(o||(o=1,t=i);++r<o;){var a=null==t?i:t[Mo(e[r])];a===i&&(r=o,a=n),t=Za(a)?a.call(t):a}return t},Fn.round=_u,Fn.runInContext=t,Fn.sample=function(t){return(Ga(t)?qn:$r)(t)},Fn.size=function(t){if(null==t)return 0;if(Xa(t))return as(t)?cn(t):t.length;var e=fo(t);return e==_||e==E?t.size:Ir(t).length},Fn.snakeCase=Hs,Fn.some=function(t,e,n){var r=Ga(t)?Le:ei;return n&&mo(t,e,n)&&(e=i),r(t,oo(e,3))},Fn.sortedIndex=function(t,e){return ni(t,e)},Fn.sortedIndexBy=function(t,e,n){return ri(t,e,oo(n,2))},Fn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=ni(t,e);if(r<n&&Ua(t[r],e))return r}return-1},Fn.sortedLastIndex=function(t,e){return ni(t,e,!0)},Fn.sortedLastIndexBy=function(t,e,n){return ri(t,e,oo(n,2),!0)},Fn.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=ni(t,e,!0)-1;if(Ua(t[n],e))return n}return-1},Fn.startCase=Ys,Fn.startsWith=function(t,e,n){return t=ms(t),n=null==n?0:or(ds(n),0,t.length),e=ai(e),t.slice(n,n+e.length)==e},Fn.subtract=Su,Fn.sum=function(t){return t&&t.length?He(t,nu):0},Fn.sumBy=function(t,e){return t&&t.length?He(t,oo(e,2)):0},Fn.template=function(t,e,n){var r=Fn.templateSettings;n&&mo(t,e,n)&&(e=i),t=ms(t),e=ws({},e,r,qi);var o,a,s=ws({},e.imports,r.imports,qi),u=js(s),l=Ze(s,u),c=0,f=e.interpolate||bt,h="__p += '",d=At((e.escape||bt).source+"|"+f.source+"|"+(f===K?ft:bt).source+"|"+(e.evaluate||bt).source+"|$","g"),p="//# sourceURL="+(Rt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++re+"]")+"\n";t.replace(d,(function(e,n,r,i,s,u){return r||(r=i),h+=t.slice(c,u).replace(wt,nn),n&&(o=!0,h+="' +\n__e("+n+") +\n'"),s&&(a=!0,h+="';\n"+s+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=u+e.length,e})),h+="';\n";var v=Rt.call(e,"variable")&&e.variable;if(v){if(lt.test(v))throw new xt("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(a?h.replace(V,""):h).replace(G,"$1").replace(W,"$1;"),h="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var y=Ks((function(){return _t(u,p+"return "+h).apply(i,l)}));if(y.source=h,qa(y))throw y;return y},Fn.times=function(t,e){if((t=ds(t))<1||t>f)return[];var n=d,r=mn(t,d);e=oo(e),t-=d;for(var i=Ye(r,e);++n<t;)e(n);return i},Fn.toFinite=hs,Fn.toInteger=ds,Fn.toLength=ps,Fn.toLower=function(t){return ms(t).toLowerCase()},Fn.toNumber=vs,Fn.toSafeInteger=function(t){return t?or(ds(t),-9007199254740991,f):0===t?t:0},Fn.toString=ms,Fn.toUpper=function(t){return ms(t).toUpperCase()},Fn.trim=function(t,e,n){if((t=ms(t))&&(n||e===i))return $e(t);if(!t||!(e=ai(e)))return t;var r=fn(t),o=fn(e);return gi(r,Je(r,o),Qe(r,o)+1).join("")},Fn.trimEnd=function(t,e,n){if((t=ms(t))&&(n||e===i))return t.slice(0,hn(t)+1);if(!t||!(e=ai(e)))return t;var r=fn(t);return gi(r,0,Qe(r,fn(e))+1).join("")},Fn.trimStart=function(t,e,n){if((t=ms(t))&&(n||e===i))return t.replace(rt,"");if(!t||!(e=ai(e)))return t;var r=fn(t);return gi(r,Je(r,fn(e))).join("")},Fn.truncate=function(t,e){var n=30,r="...";if(Qa(e)){var o="separator"in e?e.separator:o;n="length"in e?ds(e.length):n,r="omission"in e?ai(e.omission):r}var a=(t=ms(t)).length;if(rn(t)){var s=fn(t);a=s.length}if(n>=a)return t;var u=n-cn(r);if(u<1)return r;var l=s?gi(s,0,u).join(""):t.slice(0,u);if(o===i)return l+r;if(s&&(u+=l.length-u),is(o)){if(t.slice(u).search(o)){var c,f=l;for(o.global||(o=At(o.source,ms(ht.exec(o))+"g")),o.lastIndex=0;c=o.exec(f);)var h=c.index;l=l.slice(0,h===i?u:h)}}else if(t.indexOf(ai(o),u)!=u){var d=l.lastIndexOf(o);d>-1&&(l=l.slice(0,d))}return l+r},Fn.unescape=function(t){return(t=ms(t))&&Y.test(t)?t.replace(X,dn):t},Fn.uniqueId=function(t){var e=++It;return ms(t)+e},Fn.upperCase=$s,Fn.upperFirst=qs,Fn.each=ma,Fn.eachRight=ga,Fn.first=Xo,au(Fn,(yu={},gr(Fn,(function(t,e){Rt.call(Fn.prototype,e)||(yu[e]=t)})),yu),{chain:!1}),Fn.VERSION="4.17.21",Ae(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Fn[t].placeholder=Fn})),Ae(["drop","take"],(function(t,e){Vn.prototype[t]=function(n){n=n===i?1:yn(ds(n),0);var r=this.__filtered__&&!e?new Vn(this):this.clone();return r.__filtered__?r.__takeCount__=mn(n,r.__takeCount__):r.__views__.push({size:mn(n,d),type:t+(r.__dir__<0?"Right":"")}),r},Vn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),Ae(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Vn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:oo(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),Ae(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Vn.prototype[t]=function(){return this[n](1).value()[0]}})),Ae(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Vn.prototype[t]=function(){return this.__filtered__?new Vn(this):this[n](1)}})),Vn.prototype.compact=function(){return this.filter(nu)},Vn.prototype.find=function(t){return this.filter(t).head()},Vn.prototype.findLast=function(t){return this.reverse().find(t)},Vn.prototype.invokeMap=Yr((function(t,e){return"function"==typeof t?new Vn(this):this.map((function(n){return Pr(n,t,e)}))})),Vn.prototype.reject=function(t){return this.filter(Ia(oo(t)))},Vn.prototype.slice=function(t,e){t=ds(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Vn(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==i&&(n=(e=ds(e))<0?n.dropRight(-e):n.take(e-t)),n)},Vn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Vn.prototype.toArray=function(){return this.take(d)},gr(Vn.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),o=Fn[r?"take"+("last"==e?"Right":""):e],a=r||/^find/.test(e);o&&(Fn.prototype[e]=function(){var e=this.__wrapped__,s=r?[1]:arguments,u=e instanceof Vn,l=s[0],c=u||Ga(e),f=function(t){var e=o.apply(Fn,De([t],s));return r&&h?e[0]:e};c&&n&&"function"==typeof l&&1!=l.length&&(u=c=!1);var h=this.__chain__,d=!!this.__actions__.length,p=a&&!h,v=u&&!d;if(!a&&c){e=v?e:new Vn(this);var y=t.apply(e,s);return y.__actions__.push({func:ha,args:[f],thisArg:i}),new Bn(y,h)}return p&&v?t.apply(this,s):(y=this.thru(f),p?r?y.value()[0]:y.value():y)})})),Ae(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Pt[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Fn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(Ga(i)?i:[],t)}return this[n]((function(n){return e.apply(Ga(n)?n:[],t)}))}})),gr(Vn.prototype,(function(t,e){var n=Fn[e];if(n){var r=n.name+"";Rt.call(kn,r)||(kn[r]=[]),kn[r].push({name:e,func:n})}})),kn[Ni(i,2).name]=[{name:"wrapper",func:i}],Vn.prototype.clone=function(){var t=new Vn(this.__wrapped__);return t.__actions__=Oi(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Oi(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Oi(this.__views__),t},Vn.prototype.reverse=function(){if(this.__filtered__){var t=new Vn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Vn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Ga(t),r=e<0,i=n?t.length:0,o=function(t,e,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=mn(e,t+a);break;case"takeRight":t=yn(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,s=o.end,u=s-a,l=r?s:a-1,c=this.__iteratees__,f=c.length,h=0,d=mn(u,this.__takeCount__);if(!n||!r&&i==u&&d==u)return fi(t,this.__actions__);var p=[];t:for(;u--&&h<d;){for(var v=-1,y=t[l+=e];++v<f;){var m=c[v],g=m.iteratee,b=m.type,w=g(y);if(2==b)y=w;else if(!w){if(1==b)continue t;break t}}p[h++]=y}return p},Fn.prototype.at=da,Fn.prototype.chain=function(){return fa(this)},Fn.prototype.commit=function(){return new Bn(this.value(),this.__chain__)},Fn.prototype.next=function(){this.__values__===i&&(this.__values__=fs(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?i:this.__values__[this.__index__++]}},Fn.prototype.plant=function(t){for(var e,n=this;n instanceof zn;){var r=Fo(n);r.__index__=0,r.__values__=i,e?o.__wrapped__=r:e=r;var o=r;n=n.__wrapped__}return o.__wrapped__=t,e},Fn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Vn){var e=t;return this.__actions__.length&&(e=new Vn(this)),(e=e.reverse()).__actions__.push({func:ha,args:[Qo],thisArg:i}),new Bn(e,this.__chain__)}return this.thru(Qo)},Fn.prototype.toJSON=Fn.prototype.valueOf=Fn.prototype.value=function(){return fi(this.__wrapped__,this.__actions__)},Fn.prototype.first=Fn.prototype.head,qt&&(Fn.prototype[qt]=function(){return this}),Fn}();fe._=pn,(r=function(){return pn}.call(e,n,e,t))===i||(t.exports=r)}.call(this)},880:function(t,e,n){var r,i;r=function(){var t=function(){},e="undefined",n=typeof window!==e&&typeof window.navigator!==e&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=["trace","debug","info","warn","error"],i={},o=null;function a(t,e){var n=t[e];if("function"==typeof n.bind)return n.bind(t);try{return Function.prototype.bind.call(n,t)}catch(e){return function(){return Function.prototype.apply.apply(n,[t,arguments])}}}function s(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function u(){for(var n=this.getLevel(),i=0;i<r.length;i++){var o=r[i];this[o]=i<n?t:this.methodFactory(o,n,this.name)}if(this.log=this.debug,typeof console===e&&n<this.levels.SILENT)return"No console available for logging"}function l(t){return function(){typeof console!==e&&(u.call(this),this[t].apply(this,arguments))}}function c(r,i,o){return function(r){return"debug"===r&&(r="log"),typeof console!==e&&("trace"===r&&n?s:void 0!==console[r]?a(console,r):void 0!==console.log?a(console,"log"):t)}(r)||l.apply(this,arguments)}function f(t,n){var a,s,l,f=this,h="loglevel";function d(){var t;if(typeof window!==e&&h){try{t=window.localStorage[h]}catch(t){}if(typeof t===e)try{var n=window.document.cookie,r=encodeURIComponent(h),i=n.indexOf(r+"=");-1!==i&&(t=/^([^;]+)/.exec(n.slice(i+r.length+1))[1])}catch(t){}return void 0===f.levels[t]&&(t=void 0),t}}function p(t){var e=t;if("string"==typeof e&&void 0!==f.levels[e.toUpperCase()]&&(e=f.levels[e.toUpperCase()]),"number"==typeof e&&e>=0&&e<=f.levels.SILENT)return e;throw new TypeError("log.setLevel() called with invalid level: "+t)}"string"==typeof t?h+=":"+t:"symbol"==typeof t&&(h=void 0),f.name=t,f.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},f.methodFactory=n||c,f.getLevel=function(){return null!=l?l:null!=s?s:a},f.setLevel=function(t,n){return l=p(t),!1!==n&&function(t){var n=(r[t]||"silent").toUpperCase();if(typeof window!==e&&h){try{return void(window.localStorage[h]=n)}catch(t){}try{window.document.cookie=encodeURIComponent(h)+"="+n+";"}catch(t){}}}(l),u.call(f)},f.setDefaultLevel=function(t){s=p(t),d()||f.setLevel(t,!1)},f.resetLevel=function(){l=null,function(){if(typeof window!==e&&h){try{window.localStorage.removeItem(h)}catch(t){}try{window.document.cookie=encodeURIComponent(h)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(t){}}}(),u.call(f)},f.enableAll=function(t){f.setLevel(f.levels.TRACE,t)},f.disableAll=function(t){f.setLevel(f.levels.SILENT,t)},f.rebuild=function(){if(o!==f&&(a=p(o.getLevel())),u.call(f),o===f)for(var t in i)i[t].rebuild()},a=p(o?o.getLevel():"WARN");var v=d();null!=v&&(l=p(v)),u.call(f)}(o=new f).getLogger=function(t){if("symbol"!=typeof t&&"string"!=typeof t||""===t)throw new TypeError("You must supply a name when creating a logger.");var e=i[t];return e||(e=i[t]=new f(t,o.methodFactory)),e};var h=typeof window!==e?window.log:void 0;return o.noConflict=function(){return typeof window!==e&&window.log===o&&(window.log=h),o},o.getLoggers=function(){return i},o.default=o,o},void 0===(i=r.call(e,n,e,t))||(t.exports=i)},481:(t,e,n)=>{t.exports=n(137)},137:t=>{t.exports=class{constructor(t,e,n,r){let i;if("object"==typeof t){let o=t;t=o.k_p,e=o.k_i,n=o.k_d,r=o.dt,i=o.i_max}this.k_p="number"==typeof t?t:1,this.k_i=e||0,this.k_d=n||0,this.dt=r||0,this.i_max=i||0,this.sumError=0,this.lastError=0,this.lastTime=0,this.target=0}setTarget(t){this.target=t}update(t){this.currentValue=t;let e=this.dt;if(!e){let t=Date.now();e=0===this.lastTime?0:(t-this.lastTime)/1e3,this.lastTime=t}"number"==typeof e&&0!==e||(e=1);let n=this.target-this.currentValue;if(this.sumError=this.sumError+n*e,this.i_max>0&&Math.abs(this.sumError)>this.i_max){let t=this.sumError>0?1:-1;this.sumError=t*this.i_max}let r=(n-this.lastError)/e;return this.lastError=n,this.k_p*n+this.k_i*this.sumError+this.k_d*r}reset(){this.sumError=0,this.lastError=0,this.lastTime=0}}},803:t=>{var e,n,r=document.attachEvent,i=!1;function o(t){var e=t.__resizeTriggers__,n=e.firstElementChild,r=e.lastElementChild,i=n.firstElementChild;r.scrollLeft=r.scrollWidth,r.scrollTop=r.scrollHeight,i.style.width=n.offsetWidth+1+"px",i.style.height=n.offsetHeight+1+"px",n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight}function a(t){var e=this;o(this),this.__resizeRAF__&&u(this.__resizeRAF__),this.__resizeRAF__=s((function(){(function(t){return t.offsetWidth!=t.__resizeLast__.width||t.offsetHeight!=t.__resizeLast__.height})(e)&&(e.__resizeLast__.width=e.offsetWidth,e.__resizeLast__.height=e.offsetHeight,e.__resizeListeners__.forEach((function(n){n.call(e,t)})))}))}if(!r){var s=(n=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(t){return window.setTimeout(t,20)},function(t){return n(t)}),u=(e=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.clearTimeout,function(t){return e(t)}),l=!1,c="",f="animationstart",h="Webkit Moz O ms".split(" "),d="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),p=document.createElement("fakeelement");if(void 0!==p.style.animationName&&(l=!0),!1===l)for(var v=0;v<h.length;v++)if(void 0!==p.style[h[v]+"AnimationName"]){c="-"+h[v].toLowerCase()+"-",f=d[v],l=!0;break}var y="resizeanim",m="@"+c+"keyframes "+y+" { from { opacity: 0; } to { opacity: 0; } } ",g=c+"animation: 1ms "+y+"; "}t.exports=function(t,e){return r?t.attachEvent("onresize",e):(t.__resizeTriggers__||("static"==getComputedStyle(t).position&&(t.style.position="relative"),function(){if(!i){var t=(m||"")+".resize-triggers { "+(g||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',e=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t)),e.appendChild(n),i=!0}}(),t.__resizeLast__={},t.__resizeListeners__=[],(t.__resizeTriggers__=document.createElement("div")).className="resize-triggers",t.__resizeTriggers__.innerHTML='<div class="expand-trigger"><div></div></div><div class="contract-trigger"></div>',t.appendChild(t.__resizeTriggers__),o(t),t.addEventListener("scroll",a,!0),f&&t.__resizeTriggers__.addEventListener(f,(function(e){e.animationName==y&&o(t)}))),t.__resizeListeners__.push(e)),function(){r?t.detachEvent("onresize",e):(t.__resizeListeners__.splice(t.__resizeListeners__.indexOf(e),1),t.__resizeListeners__.length||(t.removeEventListener("scroll",a),t.__resizeTriggers__=!t.removeChild(t.__resizeTriggers__)))}}},975:(t,e,n)=>{var r=n(101),i=Array.prototype.concat,o=Array.prototype.slice,a=t.exports=function(t){for(var e=[],n=0,a=t.length;n<a;n++){var s=t[n];r(s)?e=i.call(e,o.call(s)):e.push(s)}return e};a.wrap=function(t){return function(){return t(a(arguments))}}},101:t=>{t.exports=function(t){return!(!t||"string"==typeof t)&&(t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&"String"!==t.constructor.name))}},716:e=>{e.exports=t}},r={};function i(t){var e=r[t];if(void 0!==e)return e.exports;var o=r[t]={id:t,loaded:!1,exports:{}};return n[t].call(o.exports,o,o.exports,i),o.loaded=!0,o.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var o={};(()=>{i.d(o,{RL:()=>Mi,wK:()=>ua,x_:()=>fa,lv:()=>ca,YQ:()=>la,BP:()=>kf,GZ:()=>Mf,Vw:()=>ha,Ay:()=>Nf,_G:()=>zs});var t=i(250);function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,a(r.key),r)}}function a(t){var e=function(t,e){if("object"!=n(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,"string");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:String(e)}var s=["onLayoutDone","onLayoutStep","onError","onLayoutComputing","onWebGLContextLost","onZoomTransitionDone","restart"],u=function(){function t(){var e,n,r,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,r=void 0,(n=a(n="callbacks"))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,this.callbacks=i}var e,n;return e=t,n=[{key:"onZoomTransitionDone",value:function(){this.isValidFunction(this.callbacks.onZoomTransitionDone)&&this.callbacks.onZoomTransitionDone()}},{key:"onLayoutDone",value:function(){this.isValidFunction(this.callbacks.onLayoutDone)&&this.callbacks.onLayoutDone()}},{key:"onLayoutStep",value:function(t){this.isValidFunction(this.callbacks.onLayoutStep)&&this.callbacks.onLayoutStep(t)}},{key:"onLayoutComputing",value:function(t){this.isValidFunction(this.callbacks.onLayoutComputing)&&this.callbacks.onLayoutComputing(t)}},{key:"onError",value:function(t){this.isValidFunction(this.callbacks.onError)&&this.callbacks.onError(t)}},{key:"onWebGLContextLost",value:function(t){this.isValidFunction(this.callbacks.onWebGLContextLost)&&this.callbacks.onWebGLContextLost(t)}},{key:"isValidFunction",value:function(t){return void 0!==t&&"function"==typeof t}}],n&&r(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};function c(t,e){function n(){this.constructor=t}l(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var f=function(){function t(t){void 0===t&&(t="Atom@"+ne()),this.name=t,this.isPendingUnobservation=!0,this.observers=[],this.observersIndexes={},this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=Te.NOT_TRACKING}return t.prototype.onBecomeUnobserved=function(){},t.prototype.reportObserved=function(){Xe(this)},t.prototype.reportChanged=function(){Ge(),function(t){if(t.lowestObserverState!==Te.STALE){t.lowestObserverState=Te.STALE;for(var e=t.observers,n=e.length;n--;){var r=e[n];r.dependenciesState===Te.UP_TO_DATE&&(r.isTracing!==Ae.NONE&&He(r,t),r.onBecomeStale()),r.dependenciesState=Te.STALE}}}(this),We()},t.prototype.toString=function(){return this.name},t}(),h=function(t){function e(e,n,r){void 0===e&&(e="Atom@"+ne()),void 0===n&&(n=ue),void 0===r&&(r=ue);var i=t.call(this,e)||this;return i.name=e,i.onBecomeObservedHandler=n,i.onBecomeUnobservedHandler=r,i.isPendingUnobservation=!1,i.isBeingTracked=!1,i}return c(e,t),e.prototype.reportObserved=function(){return Ge(),t.prototype.reportObserved.call(this),this.isBeingTracked||(this.isBeingTracked=!0,this.onBecomeObservedHandler()),We(),!!Pe.trackingDerivation},e.prototype.onBecomeUnobserved=function(){this.isBeingTracked=!1,this.onBecomeUnobservedHandler()},e}(f),d=we("Atom",f);function p(t){return t.interceptors&&t.interceptors.length>0}function v(t,e){var n=t.interceptors||(t.interceptors=[]);return n.push(e),se((function(){var t=n.indexOf(e);-1!==t&&n.splice(t,1)}))}function y(t,e){var n=nn();try{var r=t.interceptors;if(r)for(var i=0,o=r.length;i<o&&(ie(!(e=r[i](e))||e.type,"Intercept handlers should return nothing or a change object"),e);i++);return e}finally{rn(n)}}function m(t){return t.changeListeners&&t.changeListeners.length>0}function g(t,e){var n=t.changeListeners||(t.changeListeners=[]);return n.push(e),se((function(){var t=n.indexOf(e);-1!==t&&n.splice(t,1)}))}function b(t,e){var n=nn(),r=t.changeListeners;if(r){for(var i=0,o=(r=r.slice()).length;i<o;i++)r[i](e);rn(n)}}function w(){return!!Pe.spyListeners.length}function x(t){if(Pe.spyListeners.length)for(var e=Pe.spyListeners,n=0,r=e.length;n<r;n++)e[n](t)}function _(t){x(de({},t,{spyReportStart:!0}))}var S={spyReportEnd:!0};function T(t){x(t?de({},t,S):S)}function A(t){return Pe.spyListeners.push(t),se((function(){var e=Pe.spyListeners.indexOf(t);-1!==e&&Pe.spyListeners.splice(e,1)}))}var O="__$$iterating";function E(t){ie(!0!==t[O],"Illegal state: cannot recycle array as iterator"),me(t,O,!0);var e=-1;return me(t,"next",(function(){return{done:++e>=this.length,value:e<this.length?this[e]:void 0}})),t}function P(t,e){me(t,"function"==typeof Symbol&&Symbol.iterator||"@@iterator",e)}var k,j,C=function(){var t=!1,e={};return Object.defineProperty(e,"0",{set:function(){t=!0}}),Object.create(e)[0]=1,!1===t}(),D=0,R=function(){};k=R,j=Array.prototype,void 0!==Object.setPrototypeOf?Object.setPrototypeOf(k.prototype,j):void 0!==k.prototype.__proto__?k.prototype.__proto__=j:k.prototype=j,Object.isFrozen(Array)&&["constructor","push","shift","concat","pop","unshift","replace","find","findIndex","splice","reverse","sort"].forEach((function(t){Object.defineProperty(R.prototype,t,{configurable:!0,writable:!0,value:Array.prototype[t]})}));var I=function(){function t(t,e,n,r){this.array=n,this.owned=r,this.values=[],this.lastKnownLength=0,this.interceptors=null,this.changeListeners=null,this.atom=new f(t||"ObservableArray@"+ne()),this.enhancer=function(n,r){return e(n,r,t+"[..]")}}return t.prototype.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},t.prototype.dehanceValues=function(t){return void 0!==this.dehancer?t.map(this.dehancer):t},t.prototype.intercept=function(t){return v(this,t)},t.prototype.observe=function(t,e){return void 0===e&&(e=!1),e&&t({object:this.array,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),g(this,t)},t.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},t.prototype.setArrayLength=function(t){if("number"!=typeof t||t<0)throw new Error("[mobx.array] Out of range: "+t);var e=this.values.length;if(t!==e)if(t>e){for(var n=new Array(t-e),r=0;r<t-e;r++)n[r]=void 0;this.spliceWithArray(e,0,n)}else this.spliceWithArray(t,e-t)},t.prototype.updateArrayLength=function(t,e){if(t!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?");this.lastKnownLength+=e,e>0&&t+e+1>D&&U(t+e+1)},t.prototype.spliceWithArray=function(t,e,n){var r=this;Je(this.atom);var i=this.values.length;if(void 0===t?t=0:t>i?t=i:t<0&&(t=Math.max(0,i+t)),e=1===arguments.length?i-t:null==e?0:Math.max(0,Math.min(e,i-t)),void 0===n&&(n=[]),p(this)){var o=y(this,{object:this.array,type:"splice",index:t,removedCount:e,added:n});if(!o)return te;e=o.removedCount,n=o.added}var a=(n=n.map((function(t){return r.enhancer(t,void 0)}))).length-e;this.updateArrayLength(i,a);var s=this.spliceItemsIntoValues(t,e,n);return 0===e&&0===n.length||this.notifyArraySplice(t,n,s),this.dehanceValues(s)},t.prototype.spliceItemsIntoValues=function(t,e,n){if(n.length<1e4)return(r=this.values).splice.apply(r,[t,e].concat(n));var r,i=this.values.slice(t,t+e);return this.values=this.values.slice(0,t).concat(n,this.values.slice(t+e)),i},t.prototype.notifyArrayChildUpdate=function(t,e,n){var r=!this.owned&&w(),i=m(this),o=i||r?{object:this.array,type:"update",index:t,newValue:e,oldValue:n}:null;r&&_(o),this.atom.reportChanged(),i&&b(this,o),r&&T()},t.prototype.notifyArraySplice=function(t,e,n){var r=!this.owned&&w(),i=m(this),o=i||r?{object:this.array,type:"splice",index:t,removed:n,added:e,removedCount:n.length,addedCount:e.length}:null;r&&_(o),this.atom.reportChanged(),i&&b(this,o),r&&T()},t}(),L=function(t){function e(e,n,r,i){void 0===r&&(r="ObservableArray@"+ne()),void 0===i&&(i=!1);var o=t.call(this)||this,a=new I(r,n,o,i);return me(o,"$mobx",a),e&&e.length&&o.spliceWithArray(0,0,e),C&&Object.defineProperty(a.array,"0",M),o}return c(e,t),e.prototype.intercept=function(t){return this.$mobx.intercept(t)},e.prototype.observe=function(t,e){return void 0===e&&(e=!1),this.$mobx.observe(t,e)},e.prototype.clear=function(){return this.splice(0)},e.prototype.concat=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.$mobx.atom.reportObserved(),Array.prototype.concat.apply(this.peek(),t.map((function(t){return B(t)?t.peek():t})))},e.prototype.replace=function(t){return this.$mobx.spliceWithArray(0,this.$mobx.values.length,t)},e.prototype.toJS=function(){return this.slice()},e.prototype.toJSON=function(){return this.toJS()},e.prototype.peek=function(){return this.$mobx.atom.reportObserved(),this.$mobx.dehanceValues(this.$mobx.values)},e.prototype.find=function(t,e,n){void 0===n&&(n=0);var r=this.findIndex.apply(this,arguments);return-1===r?void 0:this.get(r)},e.prototype.findIndex=function(t,e,n){void 0===n&&(n=0);for(var r=this.peek(),i=r.length,o=n;o<i;o++)if(t.call(e,r[o],o,this))return o;return-1},e.prototype.splice=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];switch(arguments.length){case 0:return[];case 1:return this.$mobx.spliceWithArray(t);case 2:return this.$mobx.spliceWithArray(t,e)}return this.$mobx.spliceWithArray(t,e,n)},e.prototype.spliceWithArray=function(t,e,n){return this.$mobx.spliceWithArray(t,e,n)},e.prototype.push=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this.$mobx;return n.spliceWithArray(n.values.length,0,t),n.values.length},e.prototype.pop=function(){return this.splice(Math.max(this.$mobx.values.length-1,0),1)[0]},e.prototype.shift=function(){return this.splice(0,1)[0]},e.prototype.unshift=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this.$mobx;return n.spliceWithArray(0,0,t),n.values.length},e.prototype.reverse=function(){var t=this.slice();return t.reverse.apply(t,arguments)},e.prototype.sort=function(t){var e=this.slice();return e.sort.apply(e,arguments)},e.prototype.remove=function(t){var e=this.$mobx.dehanceValues(this.$mobx.values).indexOf(t);return e>-1&&(this.splice(e,1),!0)},e.prototype.move=function(t,e){function n(t){if(t<0)throw new Error("[mobx.array] Index out of bounds: "+t+" is negative");var e=this.$mobx.values.length;if(t>=e)throw new Error("[mobx.array] Index out of bounds: "+t+" is not smaller than "+e)}if(n.call(this,t),n.call(this,e),t!==e){var r,i=this.$mobx.values;r=t<e?i.slice(0,t).concat(i.slice(t+1,e+1),[i[t]],i.slice(e+1)):i.slice(0,e).concat([i[t]],i.slice(e,t),i.slice(t+1)),this.replace(r)}},e.prototype.get=function(t){var e=this.$mobx;if(e){if(t<e.values.length)return e.atom.reportObserved(),e.dehanceValue(e.values[t]);console.warn("[mobx.array] Attempt to read an array index ("+t+") that is out of bounds ("+e.values.length+"). Please check length first. Out of bound indices will not be tracked by MobX")}},e.prototype.set=function(t,e){var n=this.$mobx,r=n.values;if(t<r.length){Je(n.atom);var i=r[t];if(p(n)){var o=y(n,{type:"update",object:this,index:t,newValue:e});if(!o)return;e=o.newValue}(e=n.enhancer(e,i))!==i&&(r[t]=e,n.notifyArrayChildUpdate(t,e,i))}else{if(t!==r.length)throw new Error("[mobx.array] Index out of bounds, "+t+" is larger than "+r.length);n.spliceWithArray(t,0,[e])}},e}(R);P(L.prototype,(function(){return E(this.slice())})),Object.defineProperty(L.prototype,"length",{enumerable:!1,configurable:!0,get:function(){return this.$mobx.getArrayLength()},set:function(t){this.$mobx.setArrayLength(t)}}),["every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some","toString","toLocaleString"].forEach((function(t){var e=Array.prototype[t];ie("function"==typeof e,"Base function not defined on Array prototype: '"+t+"'"),ye(L.prototype,t,(function(){return e.apply(this.peek(),arguments)}))})),function(t,e){for(var n=0;n<e.length;n++)ye(t,e[n],t[e[n]])}(L.prototype,["constructor","intercept","observe","clear","concat","get","replace","toJS","toJSON","peek","find","findIndex","splice","spliceWithArray","push","pop","set","shift","unshift","reverse","sort","remove","move","toString","toLocaleString"]);var M=N(0);function N(t){return{enumerable:!1,configurable:!1,get:function(){return this.get(t)},set:function(e){this.set(t,e)}}}function F(t){Object.defineProperty(L.prototype,""+t,N(t))}function U(t){for(var e=D;e<t;e++)F(e);D=t}U(1e3);var z=we("ObservableArrayAdministration",I);function B(t){return fe(t)&&z(t.$mobx)}var V={},G=function(t){function e(e,n,r,i){void 0===r&&(r="ObservableValue@"+ne()),void 0===i&&(i=!0);var o=t.call(this,r)||this;return o.enhancer=n,o.hasUnreportedChange=!1,o.dehancer=void 0,o.value=n(e,void 0,r),i&&w()&&x({type:"create",object:o,newValue:o.value}),o}return c(e,t),e.prototype.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},e.prototype.set=function(t){var e=this.value;if((t=this.prepareNewValue(t))!==V){var n=w();n&&_({type:"update",object:this,newValue:t,oldValue:e}),this.setNewValue(t),n&&T()}},e.prototype.prepareNewValue=function(t){if(Je(this),p(this)){var e=y(this,{object:this,type:"update",newValue:t});if(!e)return V;t=e.newValue}return t=this.enhancer(t,this.value,this.name),this.value!==t?t:V},e.prototype.setNewValue=function(t){var e=this.value;this.value=t,this.reportChanged(),m(this)&&b(this,{type:"update",object:this,newValue:t,oldValue:e})},e.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},e.prototype.intercept=function(t){return v(this,t)},e.prototype.observe=function(t,e){return e&&t({object:this,type:"update",newValue:this.value,oldValue:void 0}),g(this,t)},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.value+"]"},e.prototype.valueOf=function(){return Se(this.get())},e}(f);G.prototype[_e()]=G.prototype.valueOf;var W=we("ObservableValue",G),X={m001:"It is not allowed to assign new values to @action fields",m002:"`runInAction` expects a function",m003:"`runInAction` expects a function without arguments",m004:"autorun expects a function",m005:"Warning: attempted to pass an action to autorun. Actions are untracked and will not trigger on state changes. Use `reaction` or wrap only your state modification code in an action.",m006:"Warning: attempted to pass an action to autorunAsync. Actions are untracked and will not trigger on state changes. Use `reaction` or wrap only your state modification code in an action.",m007:"reaction only accepts 2 or 3 arguments. If migrating from MobX 2, please provide an options object",m008:"wrapping reaction expression in `asReference` is no longer supported, use options object instead",m009:"@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'. It looks like it was used on a property.",m010:"@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'",m011:"First argument to `computed` should be an expression. If using computed as decorator, don't pass it arguments",m012:"computed takes one or two arguments if used as function",m013:"[mobx.expr] 'expr' should only be used inside other reactive functions.",m014:"extendObservable expected 2 or more arguments",m015:"extendObservable expects an object as first argument",m016:"extendObservable should not be used on maps, use map.merge instead",m017:"all arguments of extendObservable should be objects",m018:"extending an object with another observable (object) is not supported. Please construct an explicit propertymap, using `toJS` if need. See issue #540",m019:"[mobx.isObservable] isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.",m020:"modifiers can only be used for individual object properties",m021:"observable expects zero or one arguments",m022:"@observable can not be used on getters, use @computed instead",m024:"whyRun() can only be used if a derivation is active, or by passing an computed value / reaction explicitly. If you invoked whyRun from inside a computation; the computation is currently suspended but re-evaluating because somebody requested its value.",m025:"whyRun can only be used on reactions and computed values",m026:"`action` can only be invoked on functions",m028:"It is not allowed to set `useStrict` when a derivation is running",m029:"INTERNAL ERROR only onBecomeUnobserved shouldn't be called twice in a row",m030a:"Since strict-mode is enabled, changing observed observable values outside actions is not allowed. Please wrap the code in an `action` if this change is intended. Tried to modify: ",m030b:"Side effects like changing state are not allowed at this point. Are you trying to modify state from, for example, the render function of a React component? Tried to modify: ",m031:"Computed values are not allowed to cause side effects by changing observables that are already being observed. Tried to modify: ",m032:"* This computation is suspended (not in use by any reaction) and won't run automatically.\n\tDidn't expect this computation to be suspended at this point?\n\t 1. Make sure this computation is used by a reaction (reaction, autorun, observer).\n\t 2. Check whether you are using this computation synchronously (in the same stack as they reaction that needs it).",m033:"`observe` doesn't support the fire immediately property for observable maps.",m034:"`mobx.map` is deprecated, use `new ObservableMap` or `mobx.observable.map` instead",m035:"Cannot make the designated object observable; it is not extensible",m036:"It is not possible to get index atoms from arrays",m037:'Hi there! I\'m sorry you have just run into an exception.\nIf your debugger ends up here, know that some reaction (like the render() of an observer component, autorun or reaction)\nthrew an exception and that mobx caught it, to avoid that it brings the rest of your application down.\nThe original cause of the exception (the code that caused this reaction to run (again)), is still in the stack.\n\nHowever, more interesting is the actual stack trace of the error itself.\nHopefully the error is an instanceof Error, because in that case you can inspect the original stack of the error from where it was thrown.\nSee `error.stack` property, or press the very subtle "(...)" link you see near the console.error message that probably brought you here.\nThat stack is more interesting than the stack of this console.error itself.\n\nIf the exception you see is an exception you created yourself, make sure to use `throw new Error("Oops")` instead of `throw "Oops"`,\nbecause the javascript environment will only preserve the original stack trace in the first form.\n\nYou can also make sure the debugger pauses the next time this very same exception is thrown by enabling "Pause on caught exception".\n(Note that it might pause on many other, unrelated exception as well).\n\nIf that all doesn\'t help you out, feel free to open an issue https://github.com/mobxjs/mobx/issues!\n',m038:"Missing items in this list?\n 1. Check whether all used values are properly marked as observable (use isObservable to verify)\n 2. Make sure you didn't dereference values too early. MobX observes props, not primitives. E.g: use 'person.name' instead of 'name' in your computation.\n"};function H(t){return X[t]}function Y(t,e){ie("function"==typeof e,H("m026")),ie("string"==typeof t&&t.length>0,"actions should have valid names, got: '"+t+"'");var n=function(){return $(t,e,this,arguments)};return n.originalFn=e,n.isMobxAction=!0,n}function $(t,e,n,r){var i=function(t,e,n,r){var i=w()&&!!t,o=0;if(i){o=Date.now();var a=r&&r.length||0,s=new Array(a);if(a>0)for(var u=0;u<a;u++)s[u]=r[u];_({type:"action",name:t,fn:e,object:n,arguments:s})}var l=nn();return Ge(),{prevDerivation:l,prevAllowStateChanges:Z(!0),notifySpy:i,startTime:o}}(t,e,n,r);try{return e.apply(n,r)}finally{!function(t){K(t.prevAllowStateChanges),We(),rn(t.prevDerivation),t.notifySpy&&T({time:Date.now()-t.startTime})}(i)}}function q(t){ie(null===Pe.trackingDerivation,H("m028")),Pe.strictMode=t,Pe.allowStateChanges=!t}function Z(t){var e=Pe.allowStateChanges;return Pe.allowStateChanges=t,e}function K(t){Pe.allowStateChanges=t}function J(t,e,n,r,i){function o(o,a,s,u,l){if(void 0===l&&(l=0),ie(i||et(arguments),"This function is a decorator, but it wasn't invoked like a decorator"),s){ve(o,"__mobxLazyInitializers")||ye(o,"__mobxLazyInitializers",o.__mobxLazyInitializers&&o.__mobxLazyInitializers.slice()||[]);var c=s.value,f=s.initializer;return o.__mobxLazyInitializers.push((function(e){t(e,a,f?f.call(e):c,u,s)})),{enumerable:r,configurable:!0,get:function(){return!0!==this.__mobxDidRunLazyInitializers&&tt(this),e.call(this,a)},set:function(t){!0!==this.__mobxDidRunLazyInitializers&&tt(this),n.call(this,a,t)}}}var h={enumerable:r,configurable:!0,get:function(){return this.__mobxInitializedProps&&!0===this.__mobxInitializedProps[a]||Q(this,a,void 0,t,u,s),e.call(this,a)},set:function(e){this.__mobxInitializedProps&&!0===this.__mobxInitializedProps[a]?n.call(this,a,e):Q(this,a,e,t,u,s)}};return(arguments.length<3||5===arguments.length&&l<3)&&Object.defineProperty(o,a,h),h}return i?function(){if(et(arguments))return o.apply(null,arguments);var t=arguments,e=arguments.length;return function(n,r,i){return o(n,r,i,t,e)}}:o}function Q(t,e,n,r,i,o){ve(t,"__mobxInitializedProps")||ye(t,"__mobxInitializedProps",{}),t.__mobxInitializedProps[e]=!0,r(t,e,n,i,o)}function tt(t){!0!==t.__mobxDidRunLazyInitializers&&t.__mobxLazyInitializers&&(ye(t,"__mobxDidRunLazyInitializers",!0),t.__mobxDidRunLazyInitializers&&t.__mobxLazyInitializers.forEach((function(e){return e(t)})))}function et(t){return(2===t.length||3===t.length)&&"string"==typeof t[1]}var nt=J((function(t,e,n,r,i){var o=r&&1===r.length?r[0]:n.name||e||"<unnamed action>";ye(t,e,it(o,n))}),(function(t){return this[t]}),(function(){ie(!1,H("m001"))}),!1,!0),rt=J((function(t,e,n){st(t,e,n)}),(function(t){return this[t]}),(function(){ie(!1,H("m001"))}),!1,!1),it=function(t,e,n,r){return 1===arguments.length&&"function"==typeof t?Y(t.name||"<unnamed action>",t):2===arguments.length&&"function"==typeof e?Y(t,e):1===arguments.length&&"string"==typeof t?ot(t):ot(e).apply(null,arguments)};function ot(t){return function(e,n,r){if(r&&"function"==typeof r.value)return r.value=Y(t,r.value),r.enumerable=!1,r.configurable=!0,r;if(void 0!==r&&void 0!==r.get)throw new Error("[mobx] action is not expected to be used with getters");return nt(t).apply(this,arguments)}}function at(t){return"function"==typeof t&&!0===t.isMobxAction}function st(t,e,n){var r=function(){return $(e,n,t,arguments)};r.isMobxAction=!0,ye(t,e,r)}it.bound=function(t,e,n){if("function"==typeof t){var r=Y("<not yet bound action>",t);return r.autoBind=!0,r}return rt.apply(null,arguments)};var ut=Object.prototype.toString;function lt(t,e){return ct(t,e)}function ct(t,e,n,r){if(t===e)return 0!==t||1/t==1/e;if(null==t||null==e)return!1;if(t!=t)return e!=e;var i=typeof t;return("function"===i||"object"===i||"object"==typeof e)&&function(t,e,n,r){t=ft(t),e=ft(e);var i=ut.call(t);if(i!==ut.call(e))return!1;switch(i){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!=+t?+e!=+e:0==+t?1/+t==1/e:+t==+e;case"[object Date]":case"[object Boolean]":return+t==+e;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(t)===Symbol.valueOf.call(e)}var o="[object Array]"===i;if(!o){if("object"!=typeof t||"object"!=typeof e)return!1;var a=t.constructor,s=e.constructor;if(a!==s&&!("function"==typeof a&&a instanceof a&&"function"==typeof s&&s instanceof s)&&"constructor"in t&&"constructor"in e)return!1}r=r||[];for(var u=(n=n||[]).length;u--;)if(n[u]===t)return r[u]===e;if(n.push(t),r.push(e),o){if((u=t.length)!==e.length)return!1;for(;u--;)if(!ct(t[u],e[u],n,r))return!1}else{var l,c=Object.keys(t);if(u=c.length,Object.keys(e).length!==u)return!1;for(;u--;)if(!ht(e,l=c[u])||!ct(t[l],e[l],n,r))return!1}return n.pop(),r.pop(),!0}(t,e,n,r)}function ft(t){return B(t)?t.peek():Qt(t)?t.entries():xe(t)?function(t){for(var e=[];;){var n=t.next();if(n.done)break;e.push(n.value)}return e}(t.entries()):t}function ht(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function dt(t,e){return t===e}var pt={identity:dt,structural:function(t,e){return lt(t,e)},default:function(t,e){return function(t,e){return"number"==typeof t&&"number"==typeof e&&isNaN(t)&&isNaN(e)}(t,e)||dt(t,e)}};function vt(t,e,n){var r,i,o;"string"==typeof t?(r=t,i=e,o=n):(r=t.name||"Autorun@"+ne(),i=t,o=e),ie("function"==typeof i,H("m004")),ie(!1===at(i),H("m005")),o&&(i=i.bind(o));var a=new un(r,(function(){this.track(s)}));function s(){i(a)}return a.schedule(),a.getDisposer()}function yt(t,e,n){var r;arguments.length>3&&re(H("m007")),Gt(t)&&re(H("m008")),(r="object"==typeof n?n:{}).name=r.name||t.name||e.name||"Reaction@"+ne(),r.fireImmediately=!0===n||!0===r.fireImmediately,r.delay=r.delay||0,r.compareStructural=r.compareStructural||r.struct||!1,e=it(r.name,r.context?e.bind(r.context):e),r.context&&(t=t.bind(r.context));var i,o=!0,a=!1,s=r.equals?r.equals:r.compareStructural||r.struct?pt.structural:pt.default,u=new un(r.name,(function(){o||r.delay<1?l():a||(a=!0,setTimeout((function(){a=!1,l()}),r.delay))}));function l(){if(!u.isDisposed){var n=!1;u.track((function(){var e=t(u);n=o||!s(i,e),i=e})),o&&r.fireImmediately&&e(i,u),o||!0!==n||e(i,u),o&&(o=!1)}}return u.schedule(),u.getDisposer()}var mt=function(){function t(t,e,n,r,i){this.derivation=t,this.scope=e,this.equals=n,this.dependenciesState=Te.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isPendingUnobservation=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=Te.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+ne(),this.value=new $e(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=Ae.NONE,this.name=r||"ComputedValue@"+ne(),i&&(this.setter=Y(r+"-setter",i))}return t.prototype.onBecomeStale=function(){!function(t){if(t.lowestObserverState===Te.UP_TO_DATE){t.lowestObserverState=Te.POSSIBLY_STALE;for(var e=t.observers,n=e.length;n--;){var r=e[n];r.dependenciesState===Te.UP_TO_DATE&&(r.dependenciesState=Te.POSSIBLY_STALE,r.isTracing!==Ae.NONE&&He(r,t),r.onBecomeStale())}}}(this)},t.prototype.onBecomeUnobserved=function(){tn(this),this.value=void 0},t.prototype.get=function(){ie(!this.isComputing,"Cycle detected in computation "+this.name,this.derivation),0===Pe.inBatch?(Ge(),Ze(this)&&(this.isTracing!==Ae.NONE&&console.log("[mobx.trace] '"+this.name+"' is being read outside a reactive context and doing a full recompute"),this.value=this.computeValue(!1)),We()):(Xe(this),Ze(this)&&this.trackAndCompute()&&function(t){if(t.lowestObserverState!==Te.STALE){t.lowestObserverState=Te.STALE;for(var e=t.observers,n=e.length;n--;){var r=e[n];r.dependenciesState===Te.POSSIBLY_STALE?r.dependenciesState=Te.STALE:r.dependenciesState===Te.UP_TO_DATE&&(t.lowestObserverState=Te.UP_TO_DATE)}}}(this));var t=this.value;if(qe(t))throw t.cause;return t},t.prototype.peek=function(){var t=this.computeValue(!1);if(qe(t))throw t.cause;return t},t.prototype.set=function(t){if(this.setter){ie(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,t)}finally{this.isRunningSetter=!1}}else ie(!1,"[ComputedValue '"+this.name+"'] It is not possible to assign a new value to a computed value.")},t.prototype.trackAndCompute=function(){w()&&x({object:this.scope,type:"compute",fn:this.derivation});var t=this.value,e=this.dependenciesState===Te.NOT_TRACKING,n=this.value=this.computeValue(!0);return e||qe(t)||qe(n)||!this.equals(t,n)},t.prototype.computeValue=function(t){var e;if(this.isComputing=!0,Pe.computationDepth++,t)e=Qe(this,this.derivation,this.scope);else try{e=this.derivation.call(this.scope)}catch(t){e=new $e(t)}return Pe.computationDepth--,this.isComputing=!1,e},t.prototype.observe=function(t,e){var n=this,r=!0,i=void 0;return vt((function(){var o=n.get();if(!r||e){var a=nn();t({type:"update",object:n,newValue:o,oldValue:i}),rn(a)}r=!1,i=o}))},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},t.prototype.valueOf=function(){return Se(this.get())},t.prototype.whyRun=function(){var t=Boolean(Pe.trackingDerivation),e=le(this.isComputing?this.newObserving:this.observing).map((function(t){return t.name})),n=le(Ue(this).map((function(t){return t.name})));return"\nWhyRun? computation '"+this.name+"':\n * Running because: "+(t?"[active] the value of this computation is needed by a reaction":this.isComputing?"[get] The value of this computed was requested outside a reaction":"[idle] not running at the moment")+"\n"+(this.dependenciesState===Te.NOT_TRACKING?H("m032"):" * This computation will re-run if any of the following observables changes:\n "+ce(e)+"\n "+(this.isComputing&&t?" (... or any observable accessed during the remainder of the current run)":"")+"\n "+H("m038")+"\n\n * If the outcome of this computation changes, the following observers will be re-run:\n "+ce(n)+"\n")},t}();mt.prototype[_e()]=mt.prototype.valueOf;var gt=we("ComputedValue",mt),bt=function(){function t(t,e){this.target=t,this.name=e,this.values={},this.changeListeners=null,this.interceptors=null}return t.prototype.observe=function(t,e){return ie(!0!==e,"`observe` doesn't support the fire immediately property for observable objects."),g(this,t)},t.prototype.intercept=function(t){return v(this,t)},t}();function wt(t,e){if(kt(t)&&t.hasOwnProperty("$mobx"))return t.$mobx;ie(Object.isExtensible(t),H("m035")),he(t)||(e=(t.constructor.name||"ObservableObject")+"@"+ne()),e||(e="ObservableObject@"+ne());var n=new bt(t,e);return me(t,"$mobx",n),n}function xt(t,e,n,r){if(t.values[e]&&!gt(t.values[e]))return ie("value"in n,"The property "+e+" in "+t.name+" is already observable, cannot redefine it as computed property"),void(t.target[e]=n.value);if("value"in n)if(Gt(n.value)){var i=n.value;_t(t,e,i.initialValue,i.enhancer)}else at(n.value)&&!0===n.value.autoBind?st(t.target,e,n.value.originalFn):gt(n.value)?function(t,e,n){var r=t.name+"."+e;n.name=r,n.scope||(n.scope=t.target),t.values[e]=n,Object.defineProperty(t.target,e,Ot(e))}(t,e,n.value):_t(t,e,n.value,r);else St(t,e,n.get,n.set,pt.default,!0)}function _t(t,e,n,r){if(be(t.target,e),p(t)){var i=y(t,{object:t.target,name:e,type:"add",newValue:n});if(!i)return;n=i.newValue}n=(t.values[e]=new G(n,r,t.name+"."+e,!1)).value,Object.defineProperty(t.target,e,function(t){return Tt[t]||(Tt[t]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.values[t].get()},set:function(e){Et(this,t,e)}})}(e)),function(t,e,n,r){var i=m(t),o=w(),a=i||o?{type:"add",object:e,name:n,newValue:r}:null;o&&_(a),i&&b(t,a),o&&T()}(t,t.target,e,n)}function St(t,e,n,r,i,o){o&&be(t.target,e),t.values[e]=new mt(n,t.target,i,t.name+"."+e,r),o&&Object.defineProperty(t.target,e,Ot(e))}var Tt={},At={};function Ot(t){return At[t]||(At[t]={configurable:!0,enumerable:!1,get:function(){return this.$mobx.values[t].get()},set:function(e){return this.$mobx.values[t].set(e)}})}function Et(t,e,n){var r=t.$mobx,i=r.values[e];if(p(r)){if(!(s=y(r,{type:"update",object:t,name:e,newValue:n})))return;n=s.newValue}if((n=i.prepareNewValue(n))!==V){var o=m(r),a=w(),s=o||a?{type:"update",object:t,oldValue:i.value,name:e,newValue:n}:null;a&&_(s),i.setNewValue(n),o&&b(r,s),a&&T()}}var Pt=we("ObservableObjectAdministration",bt);function kt(t){return!!fe(t)&&(tt(t),Pt(t.$mobx))}function jt(t,e){if(null==t)return!1;if(void 0!==e){if(B(t)||Qt(t))throw new Error(H("m019"));if(kt(t)){var n=t.$mobx;return n.values&&!!n.values[e]}return!1}return kt(t)||!!t.$mobx||d(t)||pn(t)||gt(t)}function Ct(t){return ie(!!t,":("),J((function(e,n,r,i,o){be(e,n),ie(!o||!o.get,H("m022")),_t(wt(e,void 0),n,r,t)}),(function(t){var e=this.$mobx.values[t];if(void 0!==e)return e.get()}),(function(t,e){Et(this,t,e)}),!0,!1)}function Dt(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return It(t,Xt,e)}function Rt(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return It(t,Yt,e)}function It(t,e,n){ie(arguments.length>=2,H("m014")),ie("object"==typeof t,H("m015")),ie(!Qt(t),H("m016")),n.forEach((function(t){ie("object"==typeof t,H("m017")),ie(!jt(t),H("m018"))}));for(var r=wt(t),i={},o=n.length-1;o>=0;o--){var a=n[o];for(var s in a)if(!0!==i[s]&&ve(a,s)){if(i[s]=!0,t===a&&!ge(t,s))continue;xt(r,s,Object.getOwnPropertyDescriptor(a,s),e)}}return t}var Lt=Ct(Xt),Mt=Ct(Ht),Nt=Ct(Yt),Ft=Ct($t),Ut=Ct(qt),zt={box:function(t,e){return arguments.length>2&&Vt("box"),new G(t,Xt,e)},shallowBox:function(t,e){return arguments.length>2&&Vt("shallowBox"),new G(t,Yt,e)},array:function(t,e){return arguments.length>2&&Vt("array"),new L(t,Xt,e)},shallowArray:function(t,e){return arguments.length>2&&Vt("shallowArray"),new L(t,Yt,e)},map:function(t,e){return arguments.length>2&&Vt("map"),new Jt(t,Xt,e)},shallowMap:function(t,e){return arguments.length>2&&Vt("shallowMap"),new Jt(t,Yt,e)},object:function(t,e){arguments.length>2&&Vt("object");var n={};return wt(n,e),Dt(n,t),n},shallowObject:function(t,e){arguments.length>2&&Vt("shallowObject");var n={};return wt(n,e),Rt(n,t),n},ref:function(){return arguments.length<2?Wt(Yt,arguments[0]):Nt.apply(null,arguments)},shallow:function(){return arguments.length<2?Wt(Ht,arguments[0]):Mt.apply(null,arguments)},deep:function(){return arguments.length<2?Wt(Xt,arguments[0]):Lt.apply(null,arguments)},struct:function(){return arguments.length<2?Wt($t,arguments[0]):Ft.apply(null,arguments)}},Bt=function(t){if(void 0===t&&(t=void 0),"string"==typeof arguments[1])return Lt.apply(null,arguments);if(ie(arguments.length<=1,H("m021")),ie(!Gt(t),H("m020")),jt(t))return t;var e=Xt(t,0,void 0);return e!==t?e:Bt.box(t)};function Vt(t){re("Expected one or two arguments to observable."+t+". Did you accidentally try to use observable."+t+" as decorator?")}function Gt(t){return"object"==typeof t&&null!==t&&!0===t.isMobxModifierDescriptor}function Wt(t,e){return ie(!Gt(e),"Modifiers cannot be nested"),{isMobxModifierDescriptor:!0,initialValue:e,enhancer:t}}function Xt(t,e,n){return Gt(t)&&re("You tried to assign a modifier wrapped value to a collection, please define modifiers when creating the collection, not when modifying it"),jt(t)?t:Array.isArray(t)?Bt.array(t,n):he(t)?Bt.object(t,n):xe(t)?Bt.map(t,n):t}function Ht(t,e,n){return Gt(t)&&re("You tried to assign a modifier wrapped value to a collection, please define modifiers when creating the collection, not when modifying it"),null==t||kt(t)||B(t)||Qt(t)?t:Array.isArray(t)?Bt.shallowArray(t,n):he(t)?Bt.shallowObject(t,n):xe(t)?Bt.shallowMap(t,n):re("The shallow modifier / decorator can only used in combination with arrays, objects and maps")}function Yt(t){return t}function $t(t,e,n){if(lt(t,e))return e;if(jt(t))return t;if(Array.isArray(t))return new L(t,$t,n);if(xe(t))return new Jt(t,$t,n);if(he(t)){var r={};return wt(r,n),It(r,$t,[t]),r}return t}function qt(t,e,n){return lt(t,e)?e:t}function Zt(t,e){void 0===e&&(e=void 0),Ge();try{return t.apply(e)}finally{We()}}Object.keys(zt).forEach((function(t){return Bt[t]=zt[t]})),Bt.deep.struct=Bt.struct,Bt.ref.struct=function(){return arguments.length<2?Wt(qt,arguments[0]):Ut.apply(null,arguments)};var Kt={},Jt=function(){function t(t,e,n){void 0===e&&(e=Xt),void 0===n&&(n="ObservableMap@"+ne()),this.enhancer=e,this.name=n,this.$mobx=Kt,this._data=Object.create(null),this._hasMap=Object.create(null),this._keys=new L(void 0,Yt,this.name+".keys()",!0),this.interceptors=null,this.changeListeners=null,this.dehancer=void 0,this.merge(t)}return t.prototype._has=function(t){return void 0!==this._data[t]},t.prototype.has=function(t){return!!this.isValidKey(t)&&(t=""+t,this._hasMap[t]?this._hasMap[t].get():this._updateHasMapEntry(t,!1).get())},t.prototype.set=function(t,e){this.assertValidKey(t),t=""+t;var n=this._has(t);if(p(this)){var r=y(this,{type:n?"update":"add",object:this,newValue:e,name:t});if(!r)return this;e=r.newValue}return n?this._updateValue(t,e):this._addValue(t,e),this},t.prototype.delete=function(t){var e=this;if(this.assertValidKey(t),t=""+t,p(this)&&!(i=y(this,{type:"delete",object:this,name:t})))return!1;if(this._has(t)){var n=w(),r=m(this),i=r||n?{type:"delete",object:this,oldValue:this._data[t].value,name:t}:null;return n&&_(i),Zt((function(){e._keys.remove(t),e._updateHasMapEntry(t,!1),e._data[t].setNewValue(void 0),e._data[t]=void 0})),r&&b(this,i),n&&T(),!0}return!1},t.prototype._updateHasMapEntry=function(t,e){var n=this._hasMap[t];return n?n.setNewValue(e):n=this._hasMap[t]=new G(e,Yt,this.name+"."+t+"?",!1),n},t.prototype._updateValue=function(t,e){var n=this._data[t];if((e=n.prepareNewValue(e))!==V){var r=w(),i=m(this),o=i||r?{type:"update",object:this,oldValue:n.value,name:t,newValue:e}:null;r&&_(o),n.setNewValue(e),i&&b(this,o),r&&T()}},t.prototype._addValue=function(t,e){var n=this;Zt((function(){var r=n._data[t]=new G(e,n.enhancer,n.name+"."+t,!1);e=r.value,n._updateHasMapEntry(t,!0),n._keys.push(t)}));var r=w(),i=m(this),o=i||r?{type:"add",object:this,name:t,newValue:e}:null;r&&_(o),i&&b(this,o),r&&T()},t.prototype.get=function(t){return t=""+t,this.has(t)?this.dehanceValue(this._data[t].get()):this.dehanceValue(void 0)},t.prototype.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},t.prototype.keys=function(){return E(this._keys.slice())},t.prototype.values=function(){return E(this._keys.map(this.get,this))},t.prototype.entries=function(){var t=this;return E(this._keys.map((function(e){return[e,t.get(e)]})))},t.prototype.forEach=function(t,e){var n=this;this.keys().forEach((function(r){return t.call(e,n.get(r),r,n)}))},t.prototype.merge=function(t){var e=this;return Qt(t)&&(t=t.toJS()),Zt((function(){he(t)?Object.keys(t).forEach((function(n){return e.set(n,t[n])})):Array.isArray(t)?t.forEach((function(t){var n=t[0],r=t[1];return e.set(n,r)})):xe(t)?t.forEach((function(t,n){return e.set(n,t)})):null!=t&&re("Cannot initialize map from "+t)})),this},t.prototype.clear=function(){var t=this;Zt((function(){en((function(){t.keys().forEach(t.delete,t)}))}))},t.prototype.replace=function(t){var e=this;return Zt((function(){var n,r=he(n=t)?Object.keys(n):Array.isArray(n)?n.map((function(t){return t[0]})):xe(n)?Array.from(n.keys()):Qt(n)?n.keys():re("Cannot get keys from "+n);e.keys().filter((function(t){return-1===r.indexOf(t)})).forEach((function(t){return e.delete(t)})),e.merge(t)})),this},Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),t.prototype.toJS=function(){var t=this,e={};return this.keys().forEach((function(n){return e[n]=t.get(n)})),e},t.prototype.toJSON=function(){return this.toJS()},t.prototype.isValidKey=function(t){return null!=t&&("string"==typeof t||"number"==typeof t||"boolean"==typeof t)},t.prototype.assertValidKey=function(t){if(!this.isValidKey(t))throw new Error("[mobx.map] Invalid key: '"+t+"', only strings, numbers and booleans are accepted as key in observable maps.")},t.prototype.toString=function(){var t=this;return this.name+"[{ "+this.keys().map((function(e){return e+": "+t.get(e)})).join(", ")+" }]"},t.prototype.observe=function(t,e){return ie(!0!==e,H("m033")),g(this,t)},t.prototype.intercept=function(t){return v(this,t)},t}();P(Jt.prototype,(function(){return this.entries()}));var Qt=we("ObservableMap",Jt),te=[];function ee(){return"undefined"!=typeof window?window:i.g}function ne(){return++Pe.mobxGuid}function re(t,e){throw ie(!1,t,e),"X"}function ie(t,e,n){if(!t)throw new Error("[mobx] Invariant failed: "+e+(n?" in '"+n+"'":""))}Object.freeze(te);var oe=[];function ae(t){return-1===oe.indexOf(t)&&(oe.push(t),console.error("[mobx] Deprecated: "+t),!0)}function se(t){var e=!1;return function(){if(!e)return e=!0,t.apply(this,arguments)}}var ue=function(){};function le(t){var e=[];return t.forEach((function(t){-1===e.indexOf(t)&&e.push(t)})),e}function ce(t,e,n){return void 0===e&&(e=100),void 0===n&&(n=" - "),t?t.slice(0,e).join(n)+(t.length>e?" (... and "+(t.length-e)+"more)":""):""}function fe(t){return null!==t&&"object"==typeof t}function he(t){if(null===t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);return e===Object.prototype||null===e}function de(){for(var t=arguments[0],e=1,n=arguments.length;e<n;e++){var r=arguments[e];for(var i in r)ve(r,i)&&(t[i]=r[i])}return t}var pe=Object.prototype.hasOwnProperty;function ve(t,e){return pe.call(t,e)}function ye(t,e,n){Object.defineProperty(t,e,{enumerable:!1,writable:!0,configurable:!0,value:n})}function me(t,e,n){Object.defineProperty(t,e,{enumerable:!1,writable:!1,configurable:!0,value:n})}function ge(t,e){var n=Object.getOwnPropertyDescriptor(t,e);return!n||!1!==n.configurable&&!1!==n.writable}function be(t,e){ie(ge(t,e),"Cannot make property '"+e+"' observable, it is not configurable and writable in the target object")}function we(t,e){var n="isMobX"+t;return e.prototype[n]=!0,function(t){return fe(t)&&!0===t[n]}}function xe(t){return void 0!==ee().Map&&t instanceof ee().Map}function _e(){return"function"==typeof Symbol&&Symbol.toPrimitive||"@@toPrimitive"}function Se(t){return null===t?null:"object"==typeof t?""+t:t}var Te,Ae,Oe=["mobxGuid","resetId","spyListeners","strictMode","runId"],Ee=function(){this.version=5,this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.strictMode=!1,this.resetId=0,this.spyListeners=[],this.globalReactionErrorHandlers=[]},Pe=new Ee,ke=!1,je=!1,Ce=!1,De=ee();function Re(t,e){if("object"==typeof t&&null!==t){if(B(t))return ie(void 0===e,H("m036")),t.$mobx.atom;if(Qt(t)){var n=t;return void 0===e?Re(n._keys):(ie(!!(r=n._data[e]||n._hasMap[e]),"the entry '"+e+"' does not exist in the observable map '"+Le(t)+"'"),r)}var r;if(tt(t),e&&!t.$mobx&&t[e],kt(t))return e?(ie(!!(r=t.$mobx.values[e]),"no observable property '"+e+"' found on the observable object '"+Le(t)+"'"),r):re("please specify a property");if(d(t)||gt(t)||pn(t))return t}else if("function"==typeof t&&pn(t.$mobx))return t.$mobx;return re("Cannot obtain atom from "+t)}function Ie(t,e){return ie(t,"Expecting some object"),void 0!==e?Ie(Re(t,e)):d(t)||gt(t)||pn(t)||Qt(t)?t:(tt(t),t.$mobx?t.$mobx:void ie(!1,"Cannot obtain administration from "+t))}function Le(t,e){return(void 0!==e?Re(t,e):kt(t)||Qt(t)?Ie(t):Re(t)).name}function Me(t,e){return Ne(Re(t,e))}function Ne(t){var e={name:t.name};return t.observing&&t.observing.length>0&&(e.dependencies=le(t.observing).map(Ne)),e}function Fe(t){var e={name:t.name};return function(t){return t.observers&&t.observers.length>0}(t)&&(e.observers=Ue(t).map(Fe)),e}function Ue(t){return t.observers}function ze(t,e){var n=t.observers.length;n&&(t.observersIndexes[e.__mapid]=n),t.observers[n]=e,t.lowestObserverState>e.dependenciesState&&(t.lowestObserverState=e.dependenciesState)}function Be(t,e){if(1===t.observers.length)t.observers.length=0,Ve(t);else{var n=t.observers,r=t.observersIndexes,i=n.pop();if(i!==e){var o=r[e.__mapid]||0;o?r[i.__mapid]=o:delete r[i.__mapid],n[o]=i}delete r[e.__mapid]}}function Ve(t){t.isPendingUnobservation||(t.isPendingUnobservation=!0,Pe.pendingUnobservations.push(t))}function Ge(){Pe.inBatch++}function We(){if(0==--Pe.inBatch){hn();for(var t=Pe.pendingUnobservations,e=0;e<t.length;e++){var n=t[e];n.isPendingUnobservation=!1,0===n.observers.length&&n.onBecomeUnobserved()}Pe.pendingUnobservations=[]}}function Xe(t){var e=Pe.trackingDerivation;null!==e?e.runId!==t.lastAccessedBy&&(t.lastAccessedBy=e.runId,e.newObserving[e.unboundDepsCount++]=t):0===t.observers.length&&Ve(t)}function He(t,e){if(console.log("[mobx.trace] '"+t.name+"' is invalidated due to a change in: '"+e.name+"'"),t.isTracing===Ae.BREAK){var n=[];Ye(Me(t),n,1),new Function("debugger;\n/*\nTracing '"+t.name+"'\n\nYou are entering this break point because derivation '"+t.name+"' is being traced and '"+e.name+"' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n"+(t instanceof mt?t.derivation.toString():"")+"\n\nThe dependencies for this derivation are:\n\n"+n.join("\n")+"\n*/\n ")()}}function Ye(t,e,n){e.length>=1e3?e.push("(and many more)"):(e.push(""+new Array(n).join("\t")+t.name),t.dependencies&&t.dependencies.forEach((function(t){return Ye(t,e,n+1)})))}De.__mobxInstanceCount?(De.__mobxInstanceCount++,setTimeout((function(){ke||je||Ce||(Ce=!0,console.warn("[mobx] Warning: there are multiple mobx instances active. This might lead to unexpected results. See https://github.com/mobxjs/mobx/issues/1082 for details."))}),1)):De.__mobxInstanceCount=1,function(t){t[t.NOT_TRACKING=-1]="NOT_TRACKING",t[t.UP_TO_DATE=0]="UP_TO_DATE",t[t.POSSIBLY_STALE=1]="POSSIBLY_STALE",t[t.STALE=2]="STALE"}(Te||(Te={})),function(t){t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.BREAK=2]="BREAK"}(Ae||(Ae={}));var $e=function(t){this.cause=t};function qe(t){return t instanceof $e}function Ze(t){switch(t.dependenciesState){case Te.UP_TO_DATE:return!1;case Te.NOT_TRACKING:case Te.STALE:return!0;case Te.POSSIBLY_STALE:for(var e=nn(),n=t.observing,r=n.length,i=0;i<r;i++){var o=n[i];if(gt(o)){try{o.get()}catch(t){return rn(e),!0}if(t.dependenciesState===Te.STALE)return rn(e),!0}}return on(t),rn(e),!1}}function Ke(){return null!==Pe.trackingDerivation}function Je(t){var e=t.observers.length>0;Pe.computationDepth>0&&e&&re(H("m031")+t.name),!Pe.allowStateChanges&&e&&re(H(Pe.strictMode?"m030a":"m030b")+t.name)}function Qe(t,e,n){on(t),t.newObserving=new Array(t.observing.length+100),t.unboundDepsCount=0,t.runId=++Pe.runId;var r,i=Pe.trackingDerivation;Pe.trackingDerivation=t;try{r=e.call(n)}catch(t){r=new $e(t)}return Pe.trackingDerivation=i,function(t){for(var e=t.observing,n=t.observing=t.newObserving,r=Te.UP_TO_DATE,i=0,o=t.unboundDepsCount,a=0;a<o;a++)0===(s=n[a]).diffValue&&(s.diffValue=1,i!==a&&(n[i]=s),i++),s.dependenciesState>r&&(r=s.dependenciesState);for(n.length=i,t.newObserving=null,o=e.length;o--;)0===(s=e[o]).diffValue&&Be(s,t),s.diffValue=0;for(;i--;){var s;1===(s=n[i]).diffValue&&(s.diffValue=0,ze(s,t))}r!==Te.UP_TO_DATE&&(t.dependenciesState=r,t.onBecomeStale())}(t),r}function tn(t){var e=t.observing;t.observing=[];for(var n=e.length;n--;)Be(e[n],t);t.dependenciesState=Te.NOT_TRACKING}function en(t){var e=nn(),n=t();return rn(e),n}function nn(){var t=Pe.trackingDerivation;return Pe.trackingDerivation=null,t}function rn(t){Pe.trackingDerivation=t}function on(t){if(t.dependenciesState!==Te.UP_TO_DATE){t.dependenciesState=Te.UP_TO_DATE;for(var e=t.observing,n=e.length;n--;)e[n].lowestObserverState=Te.UP_TO_DATE}}function an(t){return console.log(t),t}function sn(t){switch(t.length){case 0:return Pe.trackingDerivation;case 1:return Re(t[0]);case 2:return Re(t[0],t[1])}}var un=function(){function t(t,e){void 0===t&&(t="Reaction@"+ne()),this.name=t,this.onInvalidate=e,this.observing=[],this.newObserving=[],this.dependenciesState=Te.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+ne(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=Ae.NONE}return t.prototype.onBecomeStale=function(){this.schedule()},t.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,Pe.pendingReactions.push(this),hn())},t.prototype.isScheduled=function(){return this._isScheduled},t.prototype.runReaction=function(){this.isDisposed||(Ge(),this._isScheduled=!1,Ze(this)&&(this._isTrackPending=!0,this.onInvalidate(),this._isTrackPending&&w()&&x({object:this,type:"scheduled-reaction"})),We())},t.prototype.track=function(t){Ge();var e,n=w();n&&(e=Date.now(),_({object:this,type:"reaction",fn:t})),this._isRunning=!0;var r=Qe(this,t,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&tn(this),qe(r)&&this.reportExceptionInDerivation(r.cause),n&&T({time:Date.now()-e}),We()},t.prototype.reportExceptionInDerivation=function(t){var e=this;if(this.errorHandler)this.errorHandler(t,this);else{var n="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this,r=H("m037");console.error(n||r,t),w()&&x({type:"error",message:n,error:t,object:this}),Pe.globalReactionErrorHandlers.forEach((function(n){return n(t,e)}))}},t.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(Ge(),tn(this),We()))},t.prototype.getDisposer=function(){var t=this.dispose.bind(this);return t.$mobx=this,t.onError=ln,t},t.prototype.toString=function(){return"Reaction["+this.name+"]"},t.prototype.whyRun=function(){var t=le(this._isRunning?this.newObserving:this.observing).map((function(t){return t.name}));return"\nWhyRun? reaction '"+this.name+"':\n * Status: ["+(this.isDisposed?"stopped":this._isRunning?"running":this.isScheduled()?"scheduled":"idle")+"]\n * This reaction will re-run if any of the following observables changes:\n "+ce(t)+"\n "+(this._isRunning?" (... or any observable accessed during the remainder of the current run)":"")+"\n\t"+H("m038")+"\n"},t.prototype.trace=function(t){void 0===t&&(t=!1),function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=!1;"boolean"==typeof t[t.length-1]&&(n=t.pop());var r=sn(t);if(!r)return re("'trace(break?)' can only be used inside a tracked computed value or a Reaction. Consider passing in the computed value or reaction explicitly");r.isTracing===Ae.NONE&&console.log("[mobx.trace] '"+r.name+"' tracing enabled"),r.isTracing=n?Ae.BREAK:Ae.LOG}(this,t)},t}();function ln(t){ie(this&&this.$mobx&&pn(this.$mobx),"Invalid `this`"),ie(!this.$mobx.errorHandler,"Only one onErrorHandler can be registered"),this.$mobx.errorHandler=t}var cn=100,fn=function(t){return t()};function hn(){Pe.inBatch>0||Pe.isRunningReactions||fn(dn)}function dn(){Pe.isRunningReactions=!0;for(var t=Pe.pendingReactions,e=0;t.length>0;){++e===cn&&(console.error("Reaction doesn't converge to a stable state after "+cn+" iterations. Probably there is a cycle in the reactive function: "+t[0]),t.splice(0));for(var n=t.splice(0),r=0,i=n.length;r<i;r++)n[r].runReaction()}Pe.isRunningReactions=!1}var pn=we("Reaction",un);function vn(t){return J((function(e,n,r,i,o){ie(void 0!==o,H("m009")),ie("function"==typeof o.get,H("m010")),St(wt(e,""),n,o.get,o.set,t,!1)}),(function(t){var e=this.$mobx.values[t];if(void 0!==e)return e.get()}),(function(t,e){this.$mobx.values[t].set(e)}),!1,!1)}var yn=vn(pt.default),mn=vn(pt.structural),gn=function(t,e,n){if("string"==typeof e)return yn.apply(null,arguments);ie("function"==typeof t,H("m011")),ie(arguments.length<3,H("m012"));var r="object"==typeof e?e:{};r.setter="function"==typeof e?e:r.setter;var i=r.equals?r.equals:r.compareStructural||r.struct?pt.structural:pt.default;return new mt(t,r.context,i,r.name||t.name||"",r.setter)};function bn(t,e,n){function r(r){return e&&n.push([t,r]),r}if(void 0===e&&(e=!0),void 0===n&&(n=[]),jt(t)){if(e&&null===n&&(n=[]),e&&null!==t&&"object"==typeof t)for(var i=0,o=n.length;i<o;i++)if(n[i][0]===t)return n[i][1];if(B(t)){var a=r([]),s=t.map((function(t){return bn(t,e,n)}));for(a.length=s.length,i=0,o=s.length;i<o;i++)a[i]=s[i];return a}if(kt(t)){for(var u in a=r({}),t)a[u]=bn(t[u],e,n);return a}if(Qt(t)){var l=r({});return t.forEach((function(t,r){return l[r]=bn(t,e,n)})),l}if(W(t))return bn(t.get(),e,n)}return t}gn.struct=mn,gn.equals=vn;var wn={allowStateChanges:function(t,e){var n,r=Z(t);try{n=e()}finally{K(r)}return n},deepEqual:lt,getAtom:Re,getDebugName:Le,getDependencyTree:Me,getAdministration:Ie,getGlobalState:function(){return Pe},getObserverTree:function(t,e){return Fe(Re(t,e))},interceptReads:function(t,e,n){var r;if(Qt(t)||B(t)||W(t))r=Ie(t);else{if(!kt(t))return re("Expected observable map, object or array as first array");if("string"!=typeof e)return re("InterceptReads can only be used with a specific property, not with an object in general");r=Ie(t,e)}return void 0!==r.dehancer?re("An intercept reader was already established"):(r.dehancer="function"==typeof e?e:n,function(){r.dehancer=void 0})},isComputingDerivation:Ke,isSpyEnabled:w,onReactionError:function(t){return Pe.globalReactionErrorHandlers.push(t),function(){var e=Pe.globalReactionErrorHandlers.indexOf(t);e>=0&&Pe.globalReactionErrorHandlers.splice(e,1)}},reserveArrayBuffer:U,resetGlobalState:function(){Pe.resetId++;var t=new Ee;for(var e in t)-1===Oe.indexOf(e)&&(Pe[e]=t[e]);Pe.allowStateChanges=!Pe.strictMode},isolateGlobalState:function(){je=!0,ee().__mobxInstanceCount--},shareGlobalState:function(){ae("Using `shareGlobalState` is not recommended, use peer dependencies instead. See https://github.com/mobxjs/mobx/issues/1082 for details."),ke=!0;var t=ee(),e=Pe;if(t.__mobservableTrackingStack||t.__mobservableViewStack)throw new Error("[mobx] An incompatible version of mobservable is already loaded.");if(t.__mobxGlobal&&t.__mobxGlobal.version!==e.version)throw new Error("[mobx] An incompatible version of mobx is already loaded.");t.__mobxGlobal?Pe=t.__mobxGlobal:t.__mobxGlobal=e},spyReport:x,spyReportEnd:T,spyReportStart:_,setReactionScheduler:function(t){var e=fn;fn=function(n){return t((function(){return e(n)}))}}},xn={Reaction:un,untracked:en,Atom:h,BaseAtom:f,useStrict:q,isStrictModeEnabled:function(){return Pe.strictMode},spy:A,comparer:pt,asReference:function(t){return ae("asReference is deprecated, use observable.ref instead"),Bt.ref(t)},asFlat:function(t){return ae("asFlat is deprecated, use observable.shallow instead"),Bt.shallow(t)},asStructure:function(t){return ae("asStructure is deprecated. Use observable.struct, computed.struct or reaction options instead."),Bt.struct(t)},asMap:function(t){return ae("asMap is deprecated, use observable.map or observable.shallowMap instead"),Bt.map(t||{})},isModifierDescriptor:Gt,isObservableObject:kt,isBoxedObservable:W,isObservableArray:B,ObservableMap:Jt,isObservableMap:Qt,map:function(t){return ae("`mobx.map` is deprecated, use `new ObservableMap` or `mobx.observable.map` instead"),Bt.map(t)},transaction:Zt,observable:Bt,computed:gn,isObservable:jt,isComputed:function(t,e){if(null==t)return!1;if(void 0!==e){if(!1===kt(t))return!1;if(!t.$mobx.values[e])return!1;var n=Re(t,e);return gt(n)}return gt(t)},extendObservable:Dt,extendShallowObservable:Rt,observe:function(t,e,n,r){return"function"==typeof n?function(t,e,n,r){return Ie(t,e).observe(n,r)}(t,e,n,r):function(t,e,n){return Ie(t).observe(e,n)}(t,e,n)},intercept:function(t,e,n){return"function"==typeof n?function(t,e,n){return Ie(t,e).intercept(n)}(t,e,n):function(t,e){return Ie(t).intercept(e)}(t,e)},autorun:vt,autorunAsync:function(t,e,n,r){var i,o,a,s;"string"==typeof t?(i=t,o=e,a=n,s=r):(i=t.name||"AutorunAsync@"+ne(),o=t,a=e,s=n),ie(!1===at(o),H("m006")),void 0===a&&(a=1),s&&(o=o.bind(s));var u=!1,l=new un(i,(function(){u||(u=!0,setTimeout((function(){u=!1,l.isDisposed||l.track(c)}),a))}));function c(){o(l)}return l.schedule(),l.getDisposer()},when:function(t,e,n,r){var i,o,a,s;return"string"==typeof t?(i=t,o=e,a=n,s=r):(i="When@"+ne(),o=t,a=e,s=n),vt(i,(function(t){if(o.call(s)){t.dispose();var e=nn();a.call(s),rn(e)}}))},reaction:yt,action:it,isAction:at,runInAction:function(t,e,n){var r="string"==typeof t?t:t.name||"<unnamed action>",i="function"==typeof t?t:e,o="function"==typeof t?e:n;return ie("function"==typeof i,H("m002")),ie(0===i.length,H("m003")),ie("string"==typeof r&&r.length>0,"actions should have valid names, got: '"+r+"'"),$(r,i,o,void 0)},expr:function(t,e){return Ke()||console.warn(H("m013")),gn(t,{context:e}).get()},toJS:bn,createTransformer:function(t,e){ie("function"==typeof t&&t.length<2,"createTransformer expects a function that accepts one argument");var n={},r=Pe.resetId,i=function(r){function i(e,n){var i=r.call(this,(function(){return t(n)}),void 0,pt.default,"Transformer-"+t.name+"-"+e,void 0)||this;return i.sourceIdentifier=e,i.sourceObject=n,i}return c(i,r),i.prototype.onBecomeUnobserved=function(){var t=this.value;r.prototype.onBecomeUnobserved.call(this),delete n[this.sourceIdentifier],e&&e(t,this.sourceObject)},i}(mt);return function(t){r!==Pe.resetId&&(n={},r=Pe.resetId);var e=function(t){if("string"==typeof t||"number"==typeof t)return t;if(null===t||"object"!=typeof t)throw new Error("[mobx] transform expected some kind of object or primitive value, got: "+t);var e=t.$transformId;return void 0===e&&ye(t,"$transformId",e=ne()),e}(t),o=n[e];return o?o.get():(o=n[e]=new i(e,t)).get()}},whyRun:function(t,e){return ae("`whyRun` is deprecated in favor of `trace`"),(t=sn(arguments))?gt(t)||pn(t)?an(t.whyRun()):re(H("m025")):an(H("m024"))},isArrayLike:function(t){return Array.isArray(t)||B(t)},extras:wn},_n=!1,Sn=function(t){var e=xn[t];Object.defineProperty(xn,t,{get:function(){return _n||(_n=!0,console.warn("Using default export (`import mobx from 'mobx'`) is deprecated and won’t work in mobx@4.0.0\nUse `import * as mobx from 'mobx'` instead")),e}})};for(var Tn in xn)Sn(Tn);"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:A,extras:wn});var An=i(803),On=i.n(An),En={value:()=>{}};function Pn(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new kn(r)}function kn(t){this._=t}function jn(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function Cn(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=En,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}kn.prototype=Pn.prototype={constructor:kn,on:function(t,e){var n,r,i=this._,o=(r=i,(t+"").trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");if(n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),a=-1,s=o.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<s;)if(n=(t=o[a]).type)i[n]=Cn(i[n],t.name,e);else if(null==e)for(n in i)i[n]=Cn(i[n],t.name,null);return this}for(;++a<s;)if((n=(t=o[a]).type)&&(n=jn(i[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new kn(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(r=this._[t]).length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};const Dn=Pn;var Rn,In,Ln=0,Mn=0,Nn=0,Fn=1e3,Un=0,zn=0,Bn=0,Vn="object"==typeof performance&&performance.now?performance:Date,Gn="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Wn(){return zn||(Gn(Xn),zn=Vn.now()+Bn)}function Xn(){zn=0}function Hn(){this._call=this._time=this._next=null}function Yn(t,e,n){var r=new Hn;return r.restart(t,e,n),r}function $n(){zn=(Un=Vn.now())+Bn,Ln=Mn=0;try{!function(){Wn(),++Ln;for(var t,e=Rn;e;)(t=zn-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Ln}()}finally{Ln=0,function(){for(var t,e,n=Rn,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Rn=e);In=t,Zn(r)}(),zn=0}}function qn(){var t=Vn.now(),e=t-Un;e>Fn&&(Bn-=e,Un=t)}function Zn(t){Ln||(Mn&&(Mn=clearTimeout(Mn)),t-zn>24?(t<1/0&&(Mn=setTimeout($n,t-Vn.now()-Bn)),Nn&&(Nn=clearInterval(Nn))):(Nn||(Un=Vn.now(),Nn=setInterval(qn,Fn)),Ln=1,Gn($n)))}Hn.prototype=Yn.prototype={constructor:Hn,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Wn():+n)+(null==e?0:+e),this._next||In===this||(In?In._next=this:Rn=this,In=this),this._call=t,this._time=n,Zn()},stop:function(){this._call&&(this._call=null,this._time=1/0,Zn())}};const Kn=4294967296;function Jn(t){return t.x}function Qn(t){return t.y}var tr=Math.PI*(3-Math.sqrt(5));function er(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,o,a,s,u,l,c,f,h,d=t._root,p={data:r},v=t._x0,y=t._y0,m=t._x1,g=t._y1;if(!d)return t._root=p,t;for(;d.length;)if((l=e>=(o=(v+m)/2))?v=o:m=o,(c=n>=(a=(y+g)/2))?y=a:g=a,i=d,!(d=d[f=c<<1|l]))return i[f]=p,t;if(s=+t._x.call(null,d.data),u=+t._y.call(null,d.data),e===s&&n===u)return p.next=d,i?i[f]=p:t._root=p,t;do{i=i?i[f]=new Array(4):t._root=new Array(4),(l=e>=(o=(v+m)/2))?v=o:m=o,(c=n>=(a=(y+g)/2))?y=a:g=a}while((f=c<<1|l)==(h=(u>=a)<<1|s>=o));return i[h]=d,i[f]=p,t}function nr(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function rr(t){return t[0]}function ir(t){return t[1]}function or(t,e,n){var r=new ar(null==e?rr:e,null==n?ir:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function ar(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function sr(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var ur=or.prototype=ar.prototype;function lr(t){return function(){return t}}function cr(t){return 1e-6*(t()-.5)}function fr(){var t,e,n,r,i,o=lr(-30),a=1,s=1/0,u=.81;function l(n){var i,o=t.length,a=or(t,Jn,Qn).visitAfter(f);for(r=n,i=0;i<o;++i)e=t[i],a.visit(h)}function c(){if(t){var e,n,r=t.length;for(i=new Array(r),e=0;e<r;++e)n=t[e],i[n.index]=+o(n,e,t)}}function f(t){var e,n,r,o,a,s=0,u=0;if(t.length){for(r=o=a=0;a<4;++a)(e=t[a])&&(n=Math.abs(e.value))&&(s+=e.value,u+=n,r+=n*e.x,o+=n*e.y);t.x=r/u,t.y=o/u}else{(e=t).x=e.data.x,e.y=e.data.y;do{s+=i[e.data.index]}while(e=e.next)}t.value=s}function h(t,o,l,c){if(!t.value)return!0;var f=t.x-e.x,h=t.y-e.y,d=c-o,p=f*f+h*h;if(d*d/u<p)return p<s&&(0===f&&(p+=(f=cr(n))*f),0===h&&(p+=(h=cr(n))*h),p<a&&(p=Math.sqrt(a*p)),e.vx+=f*t.value*r/p,e.vy+=h*t.value*r/p),!0;if(!(t.length||p>=s)){(t.data!==e||t.next)&&(0===f&&(p+=(f=cr(n))*f),0===h&&(p+=(h=cr(n))*h),p<a&&(p=Math.sqrt(a*p)));do{t.data!==e&&(d=i[t.data.index]*r/p,e.vx+=f*d,e.vy+=h*d)}while(t=t.next)}}return l.initialize=function(e,r){t=e,n=r,c()},l.strength=function(t){return arguments.length?(o="function"==typeof t?t:lr(+t),c(),l):o},l.distanceMin=function(t){return arguments.length?(a=t*t,l):Math.sqrt(a)},l.distanceMax=function(t){return arguments.length?(s=t*t,l):Math.sqrt(s)},l.theta=function(t){return arguments.length?(u=t*t,l):Math.sqrt(u)},l}function hr(t){return t.x+t.vx}function dr(t){return t.y+t.vy}function pr(t){return t.index}function vr(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}ur.copy=function(){var t,e,n=new ar(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=sr(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=sr(e));return n},ur.add=function(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return er(this.cover(e,n),e,n,t)},ur.addAll=function(t){var e,n,r,i,o=t.length,a=new Array(o),s=new Array(o),u=1/0,l=1/0,c=-1/0,f=-1/0;for(n=0;n<o;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(i=+this._y.call(null,e))||(a[n]=r,s[n]=i,r<u&&(u=r),r>c&&(c=r),i<l&&(l=i),i>f&&(f=i));if(u>c||l>f)return this;for(this.cover(u,l).cover(c,f),n=0;n<o;++n)er(this,a[n],s[n],t[n]);return this},ur.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,o=(r=Math.floor(e))+1;else{for(var a,s,u=i-n||1,l=this._root;n>t||t>=i||r>e||e>=o;)switch(s=(e<r)<<1|t<n,(a=new Array(4))[s]=l,l=a,u*=2,s){case 0:i=n+u,o=r+u;break;case 1:n=i-u,o=r+u;break;case 2:i=n+u,r=o-u;break;case 3:n=i-u,r=o-u}this._root&&this._root.length&&(this._root=l)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this},ur.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},ur.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},ur.find=function(t,e,n){var r,i,o,a,s,u,l,c=this._x0,f=this._y0,h=this._x1,d=this._y1,p=[],v=this._root;for(v&&p.push(new nr(v,c,f,h,d)),null==n?n=1/0:(c=t-n,f=e-n,h=t+n,d=e+n,n*=n);u=p.pop();)if(!(!(v=u.node)||(i=u.x0)>h||(o=u.y0)>d||(a=u.x1)<c||(s=u.y1)<f))if(v.length){var y=(i+a)/2,m=(o+s)/2;p.push(new nr(v[3],y,m,a,s),new nr(v[2],i,m,y,s),new nr(v[1],y,o,a,m),new nr(v[0],i,o,y,m)),(l=(e>=m)<<1|t>=y)&&(u=p[p.length-1],p[p.length-1]=p[p.length-1-l],p[p.length-1-l]=u)}else{var g=t-+this._x.call(null,v.data),b=e-+this._y.call(null,v.data),w=g*g+b*b;if(w<n){var x=Math.sqrt(n=w);c=t-x,f=e-x,h=t+x,d=e+x,r=v.data}}return r},ur.remove=function(t){if(isNaN(o=+this._x.call(null,t))||isNaN(a=+this._y.call(null,t)))return this;var e,n,r,i,o,a,s,u,l,c,f,h,d=this._root,p=this._x0,v=this._y0,y=this._x1,m=this._y1;if(!d)return this;if(d.length)for(;;){if((l=o>=(s=(p+y)/2))?p=s:y=s,(c=a>=(u=(v+m)/2))?v=u:m=u,e=d,!(d=d[f=c<<1|l]))return this;if(!d.length)break;(e[f+1&3]||e[f+2&3]||e[f+3&3])&&(n=e,h=f)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):e?(i?e[f]=i:delete e[f],(d=e[0]||e[1]||e[2]||e[3])&&d===(e[3]||e[2]||e[1]||e[0])&&!d.length&&(n?n[h]=d:this._root=d),this):(this._root=i,this)},ur.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},ur.root=function(){return this._root},ur.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},ur.visit=function(t){var e,n,r,i,o,a,s=[],u=this._root;for(u&&s.push(new nr(u,this._x0,this._y0,this._x1,this._y1));e=s.pop();)if(!t(u=e.node,r=e.x0,i=e.y0,o=e.x1,a=e.y1)&&u.length){var l=(r+o)/2,c=(i+a)/2;(n=u[3])&&s.push(new nr(n,l,c,o,a)),(n=u[2])&&s.push(new nr(n,r,c,l,a)),(n=u[1])&&s.push(new nr(n,l,i,o,c)),(n=u[0])&&s.push(new nr(n,r,i,l,c))}return this},ur.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new nr(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i=e.node;if(i.length){var o,a=e.x0,s=e.y0,u=e.x1,l=e.y1,c=(a+u)/2,f=(s+l)/2;(o=i[0])&&n.push(new nr(o,a,s,c,f)),(o=i[1])&&n.push(new nr(o,c,s,u,f)),(o=i[2])&&n.push(new nr(o,a,f,c,l)),(o=i[3])&&n.push(new nr(o,c,f,u,l))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},ur.x=function(t){return arguments.length?(this._x=t,this):this._x},ur.y=function(t){return arguments.length?(this._y=t,this):this._y};var yr=256,mr=4096,gr=25,br="#ededed",wr={position:"absolute",top:0,bottom:0,left:0,right:0},xr=function(){return window.devicePixelRatio||1},_r=["NVL_basic-wrapper","NVL_interactive-wrapper"];function Sr(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Tr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Tr(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Tr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Ar=function(e){var n=new Map;return e.forEach((function(t){var e=t.id,r=t.from,i=t.to,o=t.color,a=t.width,s=t.disabled,u=[r,i].sort(),l="".concat(u[0],".").concat(u[1]),c=n.get(l);c?c.bundledRels.push({id:e,color:null!=o?o:void 0,disabled:null!=s&&s,width:null!=a?a:1}):n.set(l,{bundledRels:[{id:e,color:null!=o?o:void 0,disabled:null!=s&&s,width:null!=a?a:1}],key:l,from:r,to:i,color:null!=o?o:void 0,disabled:null!=s&&s,width:0})})),n.forEach((function(e){var n=(0,t.uniqBy)(e.bundledRels,"disabled"),r=1===n.length&&!0===n[0].disabled,i=1===n.length&&!0!==n[0].disabled;if(r)e.color=br,e.width=1;else{var o=e.bundledRels.filter((function(t){return!0!==t.disabled})),a=(0,t.uniqBy)(o,"color");i?(e.color=a.length>1?void 0:e.bundledRels[0].color,e.bundledRels.forEach((function(t){e.width+=t.width}))):(e.color=1===a.length?a[0].color:void 0,e.disabled=!1,e.bundledRels.forEach((function(t){e.width+=!0!==t.disabled?t.width:0})))}})),Array.from(n.values())},Or=function(){return void 0!==(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).find((function(t){return"size"in t}))};function Er(t){return Er="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Er(t)}var Pr=function(t){var e,n;return"number"==typeof t.source||"number"==typeof t.target||"string"==typeof t.source||"string"==typeof t.target?45*devicePixelRatio:(null!==(e=t.source.size)&&void 0!==e?e:gr)+(null!==(n=t.target.size)&&void 0!==n?n:gr)+90*devicePixelRatio};function kr(t){return"object"===Er(t)}var jr=function(t){var e;return(null!==(e=t.size)&&void 0!==e?e:gr)+25*devicePixelRatio},Cr=function(){return-400*Math.pow(devicePixelRatio,2)},Dr=function(){return 2*Cr()};function Rr(t){return Rr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rr(t)}function Ir(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Lr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Mr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Nr(r.key),r)}}function Nr(t){var e=function(t,e){if("object"!=Rr(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=Rr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Rr(e)?e:String(e)}var Fr="d3ForceLayout",Ur=function(t){return t?bn(t):t},zr=function(){function e(t){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=t.state;this.state=r,this.d3Nodes={},this.d3RelList={},this.computing=!0,this.center={x:0,y:0},this.nodeRelCount=[];var i=this.state,o=i.nodes,a=i.rels;o.addChannel(Fr),a.addChannel(Fr),this.simulation=function(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,s=new Map,u=Yn(f),l=Dn("tick","end"),c=function(){let t=1;return()=>(t=(1664525*t+1013904223)%Kn)/Kn}();function f(){h(),l.call("tick",e),n<r&&(u.stop(),l.call("end",e))}function h(r){var u,l,c=t.length;void 0===r&&(r=1);for(var f=0;f<r;++f)for(n+=(o-n)*i,s.forEach((function(t){t(n)})),u=0;u<c;++u)null==(l=t[u]).fx?l.x+=l.vx*=a:(l.x=l.fx,l.vx=0),null==l.fy?l.y+=l.vy*=a:(l.y=l.fy,l.vy=0);return e}function d(){for(var e,n=0,r=t.length;n<r;++n){if((e=t[n]).index=n,null!=e.fx&&(e.x=e.fx),null!=e.fy&&(e.y=e.fy),isNaN(e.x)||isNaN(e.y)){var i=10*Math.sqrt(.5+n),o=n*tr;e.x=i*Math.cos(o),e.y=i*Math.sin(o)}(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}}function p(e){return e.initialize&&e.initialize(t,c),e}return null==t&&(t=[]),d(),e={tick:h,restart:function(){return u.restart(f),e},stop:function(){return u.stop(),e},nodes:function(n){return arguments.length?(t=n,d(),s.forEach(p),e):t},alpha:function(t){return arguments.length?(n=+t,e):n},alphaMin:function(t){return arguments.length?(r=+t,e):r},alphaDecay:function(t){return arguments.length?(i=+t,e):+i},alphaTarget:function(t){return arguments.length?(o=+t,e):o},velocityDecay:function(t){return arguments.length?(a=1-t,e):1-a},randomSource:function(t){return arguments.length?(c=t,s.forEach(p),e):c},force:function(t,n){return arguments.length>1?(null==n?s.delete(t):s.set(t,p(n)),e):s.get(t)},find:function(e,n,r){var i,o,a,s,u,l=0,c=t.length;for(null==r?r=1/0:r*=r,l=0;l<c;++l)(a=(i=e-(s=t[l]).x)*i+(o=n-s.y)*o)<r&&(u=s,r=a);return u},on:function(t,n){return arguments.length>1?(l.on(t,n),e):l.on(t)}}}().velocityDecay(.4).force("charge",fr().strength(Cr)).force("centerX",function(t){var e,n,r,i=lr(.1);function o(t){for(var i,o=0,a=e.length;o<a;++o)(i=e[o]).vx+=(r[o]-i.x)*n[o]*t}function a(){if(e){var o,a=e.length;for(n=new Array(a),r=new Array(a),o=0;o<a;++o)n[o]=isNaN(r[o]=+t(e[o],o,e))?0:+i(e[o],o,e)}}return"function"!=typeof t&&(t=lr(null==t?0:+t)),o.initialize=function(t){e=t,a()},o.strength=function(t){return arguments.length?(i="function"==typeof t?t:lr(+t),a(),o):i},o.x=function(e){return arguments.length?(t="function"==typeof e?e:lr(+e),a(),o):t},o}(0).strength(.03)).force("centerY",function(t){var e,n,r,i=lr(.1);function o(t){for(var i,o=0,a=e.length;o<a;++o)(i=e[o]).vy+=(r[o]-i.y)*n[o]*t}function a(){if(e){var o,a=e.length;for(n=new Array(a),r=new Array(a),o=0;o<a;++o)n[o]=isNaN(r[o]=+t(e[o],o,e))?0:+i(e[o],o,e)}}return"function"!=typeof t&&(t=lr(null==t?0:+t)),o.initialize=function(t){e=t,a()},o.strength=function(t){return arguments.length?(i="function"==typeof t?t:lr(+t),a(),o):i},o.y=function(e){return arguments.length?(t="function"==typeof e?e:lr(+e),a(),o):t},o}(0).strength(.03)).alpha(1).alphaMin(.05).on("end",(function(){n.simulationStopped=!0,n.shouldUpdate=!1,n.shouldReheatNodes=!1,n.shouldCountNodeRels=!1})).stop(),this.simulationStopped=!0,this.shouldUpdate=!0,this.shouldReheatNodes=!1,this.shouldCountNodeRels=!0,this.stateDisposers=[],this.stateDisposers.push(this.state.reaction((function(){return n.state.graphUpdates}),(function(){var t=o.channels[Fr];if(void 0!==o.version&&t){var e=Object.values(t.adds).length>0,r=Object.values(t.removes).length>0,i=Object.values(t.updates),s=Or(i);e||r||s?(n.shouldUpdate=!0,n.shouldReheatNodes=!0,n.shouldCountNodeRels=!0):n.shouldReheatNodes=!1}var u=a.channels[Fr];if(void 0!==a.version&&u){var l=Object.values(u.adds).length>0,c=Object.values(u.removes).length>0;(l||c)&&(n.shouldUpdate=!0,n.shouldReheatNodes=!0,n.shouldCountNodeRels=!0)}})))}var n,r;return n=e,r=[{key:"setOptions",value:function(t){}},{key:"updateNodes",value:function(t){var e=this;t.forEach((function(t){void 0===e.d3Nodes[t.id]&&(e.d3Nodes[t.id]={id:t.id}),null!=t&&t.pinned?(e.d3Nodes[t.id].fx=t.x,e.d3Nodes[t.id].fy=t.y):(e.d3Nodes[t.id].x=t.x,e.d3Nodes[t.id].y=t.y),e.d3Nodes[t.id].vy=0,e.d3Nodes[t.id].vx=0})),this.shouldUpdate=!0,this.simulation.tick().alpha(.2)}},{key:"update",value:function(){var t,e=this,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.shouldUpdate||n){var r=this.state,i=r.nodes,o=r.rels,a=i.channels[Fr],s=o.channels[Fr],u=Object.values(a.adds).length>0,l=Object.values(s.adds).length>0,c=Object.values(a.removes).length>0,f=Object.values(s.removes).length>0,h=Object.values(a.updates).length>0;if(u||l||c||f||h){var d=u&&0===Object.keys(this.d3Nodes).length,p=Ur(a.removes);Object.keys(p).forEach((function(t){delete e.d3Nodes[t]}));var v=Ur(a.adds);if(Object.keys(v).forEach((function(t){e.d3Nodes[t]=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Lr(Object(n),!0).forEach((function(e){var r,i,o;r=t,i=e,o=n[e],(i=Nr(i))in r?Object.defineProperty(r,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Lr(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},v[t])})),h&&Object.values(a.updates).forEach((function(t){!0===t.pinned?(e.d3Nodes[t.id].fx=e.d3Nodes[t.id].x,e.d3Nodes[t.id].fy=e.d3Nodes[t.id].y):!1===t.pinned&&(e.d3Nodes[t.id].fx=null,e.d3Nodes[t.id].fy=null),void 0!==t.size&&(e.d3Nodes[t.id].size=t.size)})),(l||f)&&(this.d3RelList=Ar(Ur(o.items)).filter((function(t){return t.from!==t.to})).map((function(t,e){return{source:t.from,target:t.to,index:e}}))),d){var y=Object.values(this.d3Nodes);!function(t,e,n){var r=t.filter((function(t){return void 0===t.x&&void 0===t.y}));r.forEach((function(t,i){t.x=e.x+n*Math.sin(2*Math.PI*i/r.length),t.y=e.y+n*Math.cos(2*Math.PI*i/r.length)}))}(y,this.center,(t=y.length,45*t/(2*Math.PI)))}this.layout(i.items,o.items,d)}i.clearChannel(Fr),o.clearChannel(Fr),this.shouldUpdate=!1,this.simulation.alpha()>this.simulation.alphaMin()&&(this.shouldUpdate=!0,this.simulationStopped&&(this.simulation.restart(),this.simulationStopped=!1))}}},{key:"layout",value:function(e,n,r){var i=this;if(!(0,t.isEmpty)(this.d3Nodes)){if(this.simulation.stop(),this.simulation.nodes(Object.values(this.d3Nodes)).force("collide",function(t){var e,n,r,i=1,o=1;function a(){for(var t,a,u,l,c,f,h,d=e.length,p=0;p<o;++p)for(a=or(e,hr,dr).visitAfter(s),t=0;t<d;++t)u=e[t],f=n[u.index],h=f*f,l=u.x+u.vx,c=u.y+u.vy,a.visit(v);function v(t,e,n,o,a){var s=t.data,d=t.r,p=f+d;if(!s)return e>l+p||o<l-p||n>c+p||a<c-p;if(s.index>u.index){var v=l-s.x-s.vx,y=c-s.y-s.vy,m=v*v+y*y;m<p*p&&(0===v&&(m+=(v=cr(r))*v),0===y&&(m+=(y=cr(r))*y),m=(p-(m=Math.sqrt(m)))/m*i,u.vx+=(v*=m)*(p=(d*=d)/(h+d)),u.vy+=(y*=m)*p,s.vx-=v*(p=1-p),s.vy-=y*p)}}}function s(t){if(t.data)return t.r=n[t.data.index];for(var e=t.r=0;e<4;++e)t[e]&&t[e].r>t.r&&(t.r=t[e].r)}function u(){if(e){var r,i,o=e.length;for(n=new Array(o),r=0;r<o;++r)i=e[r],n[i.index]=+t(i,r,e)}}return"function"!=typeof t&&(t=lr(null==t?1:+t)),a.initialize=function(t,n){e=t,r=n,u()},a.iterations=function(t){return arguments.length?(o=+t,a):o},a.strength=function(t){return arguments.length?(i=+t,a):i},a.radius=function(e){return arguments.length?(t="function"==typeof e?e:lr(+e),u(),a):t},a}().radius(jr)),this.shouldCountNodeRels&&(this.nodeRelCount=this.countNodeRels()),this.simulation.force("link",function(t){var e,n,r,i,o,a,s=pr,u=function(t){return 1/Math.min(i[t.source.index],i[t.target.index])},l=lr(30),c=1;function f(r){for(var i=0,s=t.length;i<c;++i)for(var u,l,f,h,d,p,v,y=0;y<s;++y)l=(u=t[y]).source,h=(f=u.target).x+f.vx-l.x-l.vx||cr(a),d=f.y+f.vy-l.y-l.vy||cr(a),h*=p=((p=Math.sqrt(h*h+d*d))-n[y])/p*r*e[y],d*=p,f.vx-=h*(v=o[y]),f.vy-=d*v,l.vx+=h*(v=1-v),l.vy+=d*v}function h(){if(r){var a,u,l=r.length,c=t.length,f=new Map(r.map(((t,e)=>[s(t,e,r),t])));for(a=0,i=new Array(l);a<c;++a)(u=t[a]).index=a,"object"!=typeof u.source&&(u.source=vr(f,u.source)),"object"!=typeof u.target&&(u.target=vr(f,u.target)),i[u.source.index]=(i[u.source.index]||0)+1,i[u.target.index]=(i[u.target.index]||0)+1;for(a=0,o=new Array(c);a<c;++a)u=t[a],o[a]=i[u.source.index]/(i[u.source.index]+i[u.target.index]);e=new Array(c),d(),n=new Array(c),p()}}function d(){if(r)for(var n=0,i=t.length;n<i;++n)e[n]=+u(t[n],n,t)}function p(){if(r)for(var e=0,i=t.length;e<i;++e)n[e]=+l(t[e],e,t)}return null==t&&(t=[]),f.initialize=function(t,e){r=t,a=e,h()},f.links=function(e){return arguments.length?(t=e,h(),f):t},f.id=function(t){return arguments.length?(s=t,f):s},f.iterations=function(t){return arguments.length?(c=+t,f):c},f.strength=function(t){return arguments.length?(u="function"==typeof t?t:lr(+t),d(),f):u},f.distance=function(t){return arguments.length?(l="function"==typeof t?t:lr(+t),p(),f):l},f}(this.d3RelList).id((function(t){return t.id})).distance(Pr).strength((function(t){return function(t,e){if(!kr(t.source)||!kr(t.target))return 1;var n=1.2/(Math.min(e[t.source.index],e[t.target.index])+(Math.max(e[t.source.index],e[t.target.index])-1)/100);return Math.max(Math.min(n,1),.06)}(t,i.nodeRelCount)}))),r){var o=0;this.simulation.force("charge",fr().strength(Dr));for(var a=performance.now();performance.now()-a<300&&o<200;)this.simulation.alpha(1),this.simulation.tick(1),o+=1;this.simulation.force("charge",fr().strength(Cr));for(var s=performance.now();performance.now()-s<100&&this.simulation.alpha()>=this.simulation.alphaMin();)this.simulation.tick(1);return this.computing=!1,void this.simulation.restart()}this.shouldReheatNodes?this.simulation.alpha(1).restart():this.simulation.restart()}}},{key:"getNodePositions",value:function(t){var e,n=[],r=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Ir(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ir(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(t);try{for(r.s();!(e=r.n()).done;){var i=e.value,o=this.d3Nodes[i.id];if(void 0!==o){var a={id:o.id,x:o.x,y:o.y};n.push(a)}}}catch(t){r.e(t)}finally{r.f()}return n}},{key:"getShouldUpdate",value:function(){return this.shouldUpdate}},{key:"getComputing",value:function(){return this.computing}},{key:"terminateUpdate",value:function(){this.simulation.alpha(this.simulation.alphaMin()).stop(),this.simulationStopped=!0}},{key:"destroy",value:function(){this.stateDisposers.forEach((function(t){t()})),this.state.nodes.removeChannel(Fr),this.state.rels.removeChannel(Fr),this.simulation.stop()}},{key:"setAlpha",value:function(t){this.simulation.alpha(t),this.simulation.restart(),this.simulation.shouldUpdate=!0}},{key:"countNodeRels",value:function(){for(var t=new Map(Object.entries(this.d3Nodes)),e=Object.values(this.d3RelList),n=new Array(t.length),r=0;r<e.length;++r){var i=e[r];i.index=r,"object"!==Rr(i.source)&&(i.source=t.get(i.source)),"object"!==Rr(i.target)&&(i.target=t.get(i.target)),n[i.source.index]=(n[i.source.index]||0)+1,n[i.target.index]=(n[i.target.index]||0)+1}return n}}],r&&Mr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),e}(),Br=i(880),Vr=i.n(Br)().getLogger("NVL");function Gr(t){return Gr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gr(t)}function Wr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Xr(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Wr(Object(n),!0).forEach((function(e){qr(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Wr(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Hr(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Yr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Yr(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Yr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function $r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Zr(r.key),r)}}function qr(t,e,n){return(e=Zr(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Zr(t){var e=function(t,e){if("object"!=Gr(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=Gr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Gr(e)?e:String(e)}var Kr=function(t,e,n){return t+(e-t)*function(t){return t*t*(3-2*t)}(n)},Jr=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),qr(this,"positions",void 0),qr(this,"oldPositions",void 0),qr(this,"startTime",void 0),qr(this,"t",void 0),qr(this,"currentT",void 0),qr(this,"state",void 0),qr(this,"shouldUpdateAnimator",void 0),qr(this,"parents",void 0),qr(this,"animationCompleteCallback",void 0),qr(this,"shouldUpdate",void 0);var n=e.state;this.positions={},this.oldPositions={},this.startTime=0,this.t=1,this.currentT=1,this.state=n,this.shouldUpdateAnimator=!1,this.parents={},this.animationCompleteCallback=e.animationCompleteCallback}var e,n;return e=t,n=[{key:"getPositionMapFromState",value:function(){var t,e=this.state.nodes,n=e.idToPosition,r={},i=Hr(e.items);try{for(i.s();!(t=i.n()).done;){var o=t.value,a=n[o.id];void 0!==a&&(r[o.id]={id:o.id,x:a.x,y:a.y})}}catch(t){i.e(t)}finally{i.f()}return r}},{key:"updatePositionsFromState",value:function(){this.positions=Xr({},this.getPositionMapFromState())}},{key:"updateOldPositionFromState",value:function(){this.oldPositions=Xr({},this.getPositionMapFromState())}},{key:"startAnimation",value:function(){this.updateOldPositionFromState(),this.startTime=Date.now(),this.t=0,this.currentT=0,this.shouldUpdateAnimator=!0}},{key:"update",value:function(){var t=this.shouldUpdateAnimator,e=(Date.now()-this.startTime)/400;this.t=Math.min(e,1),this.currentT<1?this.shouldUpdateAnimator=!0:(this.shouldUpdateAnimator=!1,t&&!this.shouldUpdateAnimator&&void 0!==this.animationCompleteCallback&&this.animationCompleteCallback(),this.shouldUpdateAnimator||this.updatePositionsFromState())}},{key:"updateNodes",value:function(t){var e,n=Hr(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;void 0!==r.x&&void 0!==r.y&&(this.positions[r.id]={id:r.id,x:r.x,y:r.y}),this.shouldUpdate=!0}}catch(t){n.e(t)}finally{n.f()}}},{key:"getNodePositions",value:function(t){var e,n=this.parents,r=this.state.nodes.idToPosition,i=function(t,e){for(var n={x:0,y:0},r=t.length,i=0,o=0;o<r;o++){var a=e[t[o].id];void 0===a||isNaN(a.x)||isNaN(a.y)||0===a.x||0===a.y||(n.x+=a.x,n.y+=a.y,i+=1)}return i>0?[n.x/i,n.y/i]:[0,0]}(t,r),o={x:i[0],y:i[1]},a=[],s=Hr(t);try{for(s.s();!(e=s.n()).done;){var u=e.value,l=this.positions[u.id],c=r[u.id],f={id:u.id};if(void 0!==l){for(var h,d,p,v=u.id,y=null!==(h=this.oldPositions[u.id])&&void 0!==h?h:Xr({},o);void 0===y&&void 0!==n[v];)v=n[v],y=this.oldPositions[v];y.x=null!==(d=y.x)&&void 0!==d?d:o.x,y.y=null!==(p=y.y)&&void 0!==p?p:o.y,f.x=Kr(y.x,l.x,this.t),f.y=Kr(y.y,l.y,this.t)}else void 0!==c&&(f.x=c.x||o.x,f.y=c.y||o.y);a.push(f)}}catch(t){s.e(t)}finally{s.f()}return this.currentT=this.t,a}}],n&&$r(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Qr(t){return Qr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qr(t)}function ti(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ei(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ti(Object(n),!0).forEach((function(e){vi(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ti(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function ni(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,l=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){l=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(t,e)||ii(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ri(t){return function(t){if(Array.isArray(t))return oi(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||ii(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ii(t,e){if(t){if("string"==typeof t)return oi(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?oi(t,e):void 0}}function oi(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function ai(){ai=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var o=e&&e.prototype instanceof m?e:m,a=Object.create(o.prototype),s=new j(r||[]);return i(a,"_invoke",{value:O(t,n,s)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=c;var h="suspendedStart",d="suspendedYield",p="executing",v="completed",y={};function m(){}function g(){}function b(){}var w={};l(w,a,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(C([])));_&&_!==n&&r.call(_,a)&&(w=_);var S=b.prototype=m.prototype=Object.create(w);function T(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function n(i,o,a,s){var u=f(t[i],t,o);if("throw"!==u.type){var l=u.arg,c=l.value;return c&&"object"==Qr(c)&&r.call(c,"__await")?e.resolve(c.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(c).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function O(e,n,r){var i=h;return function(o,a){if(i===p)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=E(s,r);if(u){if(u===y)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var l=f(e,n,r);if("normal"===l.type){if(i=r.done?v:d,l.arg===y)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=v,r.method="throw",r.arg=l.arg)}}}function E(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,E(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var o=f(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,y):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function C(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(Qr(e)+" is not iterable")}return g.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=l(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},T(A.prototype),l(A.prototype,s,(function(){return this})),e.AsyncIterator=A,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new A(c(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},T(S),l(S,u,"Generator"),l(S,a,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=C,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(k),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),k(n),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:C(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),y}},e}function si(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function ui(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,yi(r.key),r)}}function li(t,e,n){return e=di(e),function(t,e){if(e&&("object"===Qr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return fi(t)}(t,ci()?Reflect.construct(e,n||[],di(t).constructor):e.apply(t,n))}function ci(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ci=function(){return!!t})()}function fi(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function hi(){return hi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=di(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},hi.apply(this,arguments)}function di(t){return di=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},di(t)}function pi(t,e){return pi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},pi(t,e)}function vi(t,e,n){return(e=yi(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function yi(t){var e=function(t,e){if("object"!=Qr(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=Qr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Qr(e)?e:String(e)}var mi=function(t){return void 0!==t?bn(t):t},gi=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),vi(fi(n=li(this,e,[t])),"stateDisposers",void 0),vi(fi(n),"cytoCompleteCallback",void 0),vi(fi(n),"computing",void 0),vi(fi(n),"pendingLayoutData",void 0),vi(fi(n),"worker",void 0),n.stateDisposers=[],n.stateDisposers.push(n.state.reaction((function(){return n.state.graphUpdates}),(function(){void 0!==n.state.nodes.version&&(n.shouldUpdate=!0),void 0!==n.state.rels.version&&(n.shouldUpdate=!0)}))),n.cytoCompleteCallback=t.cytoCompleteCallback,n.shouldUpdate=!0,n.computing=!1,n.setOptions(),n.setupWorker().then((function(t){n.worker=t,n.worker.port.start(),n.pendingLayoutData=null})),n}var n,r,o,a;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&pi(t,e)}(e,t),n=e,r=[{key:"setupWorker",value:(o=ai().mark((function t(){var e,n,r,o,a;return ai().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Promise.resolve().then(i.bind(i,716));case 3:n=t.sent,r=n.createCoseBilkentLayoutWorker,e=r(),t.next=16;break;case 8:return t.prev=8,t.t0=t.catch(0),Vr.info("Failed to initialise shared worker: ",t.t0," Falling back to syncronous code."),t.next=13,Promise.resolve().then(i.bind(i,716));case 13:o=t.sent,a=o.coseBilkentLayoutFallbackWorker,e=a;case 16:return t.abrupt("return",new Promise((function(t,n){e||n("Cose-bilkent layout code could not be initialized"),t(e)})));case 17:case"end":return t.stop()}}),t,null,[[0,8]])})),a=function(){var t=this,e=arguments;return new Promise((function(n,r){var i=o.apply(t,e);function a(t){si(i,n,r,a,s,"next",t)}function s(t){si(i,n,r,a,s,"throw",t)}a(void 0)}))},function(){return a.apply(this,arguments)})},{key:"setOptions",value:function(){this.shouldUpdate=!0}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(this.shouldUpdate||t){var i=mi(n),o=mi(r);(i.length>0||o.length>0)&&(this.updatePositionsFromState(),this.layout(i,o))}hi(di(e.prototype),"update",this).call(this),this.shouldUpdate=!1}},{key:"getShouldUpdate",value:function(){return this.shouldUpdate||this.shouldUpdateAnimator}},{key:"getComputing",value:function(){return this.computing}},{key:"layout",value:function(t,e){var n=this;if(this.worker){if(t.length){var r=t.map((function(t){return{group:"nodes",data:{id:t.id}}})),i=e.map((function(t){return{group:"edges",data:{id:"rel".concat(t.id),source:t.from,target:t.to}}})),o={elements:[].concat(ri(r),ri(i)),spacingFactor:t.reduce((function(t,e){var n;return t+(null!==(n=e.size)&&void 0!==n?n:gr)}),0)/t.length*4.5/50*xr()};this.computing?this.pendingLayoutData=o:(this.computing=!0,this.worker.port.onmessage=function(t){var e=t.data.positions;if(n.computing){for(var r=0,i=Object.entries(e);r<i.length;r++){var o=ni(i[r],2),a=o[0],s=o[1];n.positions[a]=ei({id:a},s)}n.cytoCompleteCallback(),n.startAnimation()}n.computing=!1,n.shouldUpdate=!0},setTimeout((function(){n.computing&&n.worker.port.postMessage(o)}),0))}}else Vr.info("Cose-Bilkent layout code not yet initialised.")}},{key:"terminateUpdate",value:function(){this.computing=!1}},{key:"destroy",value:function(){var t;this.stateDisposers.forEach((function(t){t()})),null===(t=this.worker)||void 0===t||t.port.close()}}],r&&ui(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),e}(Jr),bi="undefined"!=typeof Float32Array?Float32Array:Array;function wi(){var t=new bi(16);return bi!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}Math.random,Math.PI,Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var xi=function(t,e,n,r,i,o,a){var s=1/(e-n),u=1/(r-i),l=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*l,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*u,t[14]=(a+o)*l,t[15]=1,t},_i=i(792),Si=i.n(_i);function Ti(t){return Ti="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ti(t)}function Ai(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ei(r.key),r)}}function Oi(t,e,n){return(e=Ei(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ei(t){var e=function(t,e){if("object"!=Ti(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=Ti(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ti(e)?e:String(e)}var Pi=function(){function e(n,r,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Oi(this,"shaderProgram",void 0),Oi(this,"gl",void 0),Oi(this,"curTexture",void 0),Oi(this,"attributeInfo",void 0),Oi(this,"uniformInfo",void 0);var a=n.createShader(n.FRAGMENT_SHADER);if(!n.isShader(a))throw new Error("Could not create shader object");var s=Si()(i,o);n.shaderSource(a,s),n.compileShader(a),(0,t.isNil)(n.getShaderParameter(a,n.COMPILE_STATUS))&&Vr.info(n.getShaderInfoLog(a));var u=n.createShader(n.VERTEX_SHADER);if(!n.isShader(u))throw new Error("Could not create shader object");var l=Si()(r,o);if(n.shaderSource(u,l),n.compileShader(u),(0,t.isNil)(n.getShaderParameter(u,n.COMPILE_STATUS))&&Vr.info(n.getShaderInfoLog(u)),this.shaderProgram=n.createProgram(),n.attachShader(this.shaderProgram,a),n.attachShader(this.shaderProgram,u),n.linkProgram(this.shaderProgram),(0,t.isNil)(n.getProgramParameter(this.shaderProgram,n.LINK_STATUS)))throw new Error("Could not initialise shader");this.gl=n,this.curTexture=0,this.scanUniforms(),this.scanAttributes()}var n,r;return n=e,r=[{key:"setUniform",value:function(t,e){var n=this.gl,r=this.uniformInfo[t];if(void 0===r)throw new Error("Shader.setUniform - Uniform ".concat(t," not found in shader"));switch(r.type){case n.INT:n.uniform1i(r.location,e);break;case n.INT_VEC2:n.uniform2iv(r.location,e);break;case n.INT_VEC3:n.uniform3iv(r.location,e);break;case n.INT_VEC4:n.uniform4iv(r.location,e);break;case n.SAMPLER_2D:n.activeTexture(n.TEXTURE0+r.texture),n.bindTexture(n.TEXTURE_2D,e),n.uniform1i(r.location,r.texture);break;case n.SAMPLER_CUBE:case n.FLOAT:n.uniform1f(r.location,e);break;case n.FLOAT_VEC2:n.uniform2fv(r.location,e);break;case n.FLOAT_VEC3:n.uniform3fv(r.location,e);break;case n.FLOAT_VEC4:n.uniform4fv(r.location,e);break;case n.FLOAT_MAT2:n.uniformMatrix2fv(r.location,!1,e);break;case n.FLOAT_MAT3:n.uniformMatrix3fv(r.location,!1,e);break;case n.FLOAT_MAT4:n.uniformMatrix4fv(r.location,!1,e)}}},{key:"setAttributePointer",value:function(t,e,n,r){var i=this.gl,o=this.attributeInfo[t],a=n*Float32Array.BYTES_PER_ELEMENT,s=r*Float32Array.BYTES_PER_ELEMENT;i.enableVertexAttribArray(o.position),i.vertexAttribPointer(o.position,e,i.FLOAT,!1,s,a)}},{key:"setAttributePointerFloat",value:function(t,e,n,r){var i=this.gl,o=this.attributeInfo[t];i.enableVertexAttribArray(o.position),i.vertexAttribPointer(o.position,e,i.FLOAT,!1,r,n)}},{key:"setAttributePointerUShort",value:function(t,e,n,r){var i=this.gl,o=this.attributeInfo[t];i.enableVertexAttribArray(o.position),i.vertexAttribPointer(o.position,e,i.UNSIGNED_SHORT,!1,r,n)}},{key:"setAttributePointerByteNorm",value:function(t,e,n,r){var i=this.gl,o=this.attributeInfo[t];i.enableVertexAttribArray(o.position),i.vertexAttribPointer(o.position,e,i.UNSIGNED_BYTE,!0,r,n)}},{key:"setAttributePointerByte",value:function(t,e,n,r){var i=this.gl,o=this.attributeInfo[t];i.enableVertexAttribArray(o.position),i.vertexAttribPointer(o.position,e,i.UNSIGNED_BYTE,!1,r,n)}},{key:"use",value:function(){this.gl.useProgram(this.shaderProgram)}},{key:"remove",value:function(){this.gl.deleteProgram(this.shaderProgram)}},{key:"scanAttributes",value:function(){var t=this.gl;this.attributeInfo={};for(var e,n,r=t.getProgramParameter(this.shaderProgram,t.ACTIVE_ATTRIBUTES),i=0;i<r;i++)e=t.getActiveAttrib(this.shaderProgram,i),n=t.getAttribLocation(this.shaderProgram,e.name),this.attributeInfo[e.name]={type:e.type,position:n}}},{key:"scanUniforms",value:function(){var t=this.gl;this.uniformInfo={};for(var e,n=t.getProgramParameter(this.shaderProgram,t.ACTIVE_UNIFORMS),r=0;r<n;r++){e=t.getActiveUniform(this.shaderProgram,r);var i=t.getUniformLocation(this.shaderProgram,e.name),o={type:e.type,location:i};e.type===t.SAMPLER_2D&&(o.texture=this.curTexture,this.curTexture+=1),this.uniformInfo[e.name]=o}}}],r&&Ai(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),e}();function ki(t){return ki="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ki(t)}function ji(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ci(r.key),r)}}function Ci(t){var e=function(t,e){if("object"!=ki(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=ki(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ki(e)?e:String(e)}function Di(t){var e="function"==typeof Map?new Map:void 0;return Di=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return function(t,e,n){if(Ri())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var i=new(t.bind.apply(t,r));return n&&Ii(i,n.prototype),i}(t,arguments,Li(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Ii(n,t)},Di(t)}function Ri(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ri=function(){return!!t})()}function Ii(t,e){return Ii=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ii(t,e)}function Li(t){return Li=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Li(t)}var Mi=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t=this,r=arguments,n=Li(n=e),function(t,e){if(e&&("object"===ki(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ri()?Reflect.construct(n,r||[],Li(t).constructor):n.apply(t,r));var t,n,r}var n,r;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ii(t,e)}(e,t),n=e,(r=[{key:"toString",value:function(){return this.message}}])&&ji(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),e}(Di(Error));const Ni="uniform mat4 u_projection;\n\nattribute vec2 a_position;\n//attribute float a_index;\n\n//varying highp float index;\n\nvoid main() {\n// index = a_index;\n gl_Position = u_projection * vec4(a_position, 0.0, 1.0);\n}";function Fi(t){return Fi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fi(t)}function Ui(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,zi(r.key),r)}}function zi(t){var e=function(t,e){if("object"!=Fi(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=Fi(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Fi(e)?e:String(e)}var Bi=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.graph=this.constructGraphObjects(e,n),this.subGraphs=[],this.sunMap={}}var e,n;return e=t,n=[{key:"constructGraphObjects",value:function(t,e){var n=new Array(t.nodes.length),r=new Array(t.rels.length),i={},o=[];return t.nodes.forEach((function(t,e){n[e]=[],r[e]=[],o.push(t)})),t.rels.forEach((function(t){var o=e[t.from],a=e[t.to];void 0!==o&&void 0!==a&&(n[o].push(a),n[a].push(o),r[o].push(t.id),r[a].push(t.id),i[t.id]=t)})),this.relIdMap=r,{nodes:o,relationships:n,idToRel:i}}},{key:"coarsenTo",value:function(t){for(var e=this.graph,n=e.nodes.length,r=0;e.nodes.length>t&&e.relationships.some((function(t){return t.length>0}));){var i=this.coarsen(e,0===r);if(0===r&&(this.nodeSortMap=i.nodeSortMap),this.subGraphs.push(i.sortedInput),0===(e=i.output).relationships.length||e.relationships.every((function(t){return 0===t.length}))||n===e.nodes.length)break;n=e.nodes.length,r++}return this.subGraphs.push(e),e}},{key:"coarsenBy",value:function(t){for(var e=this.graph,n=e.nodes.length,r=t;t>0;){var i=this.coarsen(e,t===r);if(this.subGraphs.push(i.sortedInput),0===(e=i.output).relationships.length||e.relationships.every((function(t){return 0===t.length}))||n===e.nodes.length)break;n=e.nodes.length,t--}return this.subGraphs.push(e),e}},{key:"coarsen",value:function(t,e){var n=this,r=t.nodes,i=t.relationships,o=r.map((function(t,e){return e})),a={},s={};r.forEach((function(t,e){a[e]=t,s[t.id]=e}));for(var u=i.map((function(t){return t.slice()})),l={suns:{},planets:{},moons:{}},c=[],f=[],h=function(){var t=o[0];o.splice(o.indexOf(t),1),i[t].forEach((function(e){var n=o.indexOf(e);n>=0&&o.splice(n,1);var r=-1,i=u[e];i.forEach((function(e,n){var i=o.indexOf(e);i>=0?o.splice(i,1):e===t&&(r=n)})),i.splice(r,1)}));var n={id:t};if(e)n.originalId=a[t].id;else{var r=a[t];n.finestIndex=r.finestIndex,n.originalId=r.originalId}c.push(n),l.suns[t]=n};o.length>0;)h();c.forEach((function(t,e){f[e]=[]})),c.forEach((function(t,n){var r={},o=[];i[t.id].forEach((function(i){if(i!==t.id&&!r[i]){var s={id:i,parent:t,sunId:n,moons:[]},u=a[i];s.size=function(){return s.moons.length+1},s.weight=u.weight||1,s.children=function(){return s.moons},e?s.originalId=u.id:(s.finestIndex=u.finestIndex,s.originalId=u.originalId),o.push(s),r[i]=!0}})),o.forEach((function(t){l.planets[t.id]=t})),t.planets=o,t.children=function(){return t.planets},t.weight=t.planets.reduce((function(t,e){return t+(e.weight||1)}),0)+(a[t.id].weight||1),t.size=function(){return t.planets.reduce((function(t,e){return t+e.size()}),0)+1}}));var d=r.filter((function(t,e){return!c.find((function(t){return t.id===e}))&&!l.planets[e]})),p=[];d.forEach((function(t){for(var n=s[t.id],r=u[n],i=null,o=-1,c=0;c<r.length;c++){var f=r[c];if(f!==n&&(i=l.planets[f])){o=c;break}}if(r.splice(o,1),i){var h={id:n,size:function(){return 0}};h.weight=a[n].weight||1,h.parent=i,h.sunId=i.sunId,e?h.originalId=t.id:(h.finestIndex=t.finestIndex,h.originalId=t.originalId),l.moons[n]=h,i.moons.push(h),i.weight+=h.weight,i.parent.weight+=h.weight;var d=u[i.id];d.splice(d.indexOf(n),1)}else p.push(t)})),u.forEach((function(t,e){if(!l.suns[e]){var n=l.planets[e]||l.moons[e];u[e].forEach((function(t){var e=l.planets[t];if(e||(e=l.moons[t]),n.sunId!==e.sunId){var r=f[n.sunId];r.includes(e.sunId)||r.push(e.sunId)}}))}}));var v=[],y=0,m={};c.forEach((function(t,i){var o=r[t.id];m[t.id]=y,t.previousIndex=i,t.id=y++,e&&(o.finestIndex=t.id,t.finestIndex=t.id),v.push(o),t.planets.forEach((function(i){var o=r[i.id];m[i.id]=y,i.id=y++,i.sunId=t.id,e&&(o.finestIndex=i.id),n.sunMap[i.originalId]=t.originalId,v.push(o),i.moons.forEach((function(i){var o=r[i.id];m[i.id]=y,i.id=y++,i.sunId=t.id,e&&(o.finestIndex=i.id),n.sunMap[i.originalId]=t.originalId,v.push(o)}))}))}));var g=[],b=[];return i.forEach((function(t,r){var i=m[r];g[i]=t.map((function(t){return m[t]})),e&&(b[i]=t.map((function(t,e){return n.relIdMap[r][e]})))})),b&&b.length>0&&(this.relIdMap=b),{output:{nodes:c,relationships:f},sortedInput:{nodes:v,relationships:g},nodeSortMap:m}}}],n&&Ui(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Vi=function(t,e,n){for(var r=2*Math.PI/n,i=[],o=0;o<n;o++){var a=r*o;i.push({x:t.x+e*Math.cos(a),y:t.y+e*Math.sin(a)})}return i};function Gi(t){return Gi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gi(t)}function Wi(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Xi(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xi(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Xi(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Hi(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,$i(r.key),r)}}function Yi(t,e,n){return(e=$i(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function $i(t){var e=function(t,e){if("object"!=Gi(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=Gi(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Gi(e)?e:String(e)}var qi="PhysLayout",Zi=new Float32Array(4),Ki=256,Ji=function(t){for(var e={},n={},r=0;r<t.length;r++)e[t[r].id]=r,n[r]=t[r].id;return{nodeIdToIndex:e,nodeIndexToId:n}},Qi=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Yi(this,"physVbo",void 0),Yi(this,"physSmallVbo",void 0),Yi(this,"physProjection",void 0),Yi(this,"physSmallProjection",void 0),Yi(this,"gl",void 0),Yi(this,"useReadpixelWorkaround",void 0),Yi(this,"averageNodeSize",void 0),Yi(this,"shouldUpdate",void 0),Yi(this,"iterationCount",void 0),Yi(this,"lastSpeedValues",void 0),Yi(this,"rollingAvgGraphSpeed",void 0),Yi(this,"nodeVariation",void 0),Yi(this,"nodeCenterPoint",void 0),Yi(this,"peakIterationMultiplier",void 0),Yi(this,"stateDisposers",void 0),Yi(this,"state",void 0),Yi(this,"dpr",void 0),Yi(this,"intelWorkaround",void 0),Yi(this,"simulationStopVelocitySquared",void 0),Yi(this,"gravity",void 0),Yi(this,"force",void 0),Yi(this,"nodeIdToIndex",void 0),Yi(this,"nodeIndexToId",void 0),Yi(this,"numNodes",void 0),Yi(this,"solarMerger",void 0),Yi(this,"subGraphs",void 0),Yi(this,"nodeSortMap",void 0),Yi(this,"firstUpdate",void 0),Yi(this,"curPhysData",void 0),Yi(this,"apprxRepForceShader",void 0),Yi(this,"levelsClusterTexture",void 0),Yi(this,"levelsFinestIndexTexture",void 0),Yi(this,"initalLevelTexture",void 0),Yi(this,"levelsData",void 0),Yi(this,"collisionDetectionMultiplier",void 0),Yi(this,"physShader",void 0),Yi(this,"physData",void 0),Yi(this,"workaroundData",void 0),Yi(this,"pinData",void 0),Yi(this,"updateData",void 0),Yi(this,"updateShader",void 0),Yi(this,"workaroundShader",void 0),Yi(this,"physPositions",void 0),Yi(this,"springTexture",void 0),Yi(this,"sizeTexture",void 0),Yi(this,"offsetTexture",void 0),Yi(this,"pinTexture",void 0),Yi(this,"addedNodes",void 0),Yi(this,"updateTexture",void 0),Yi(this,"enableVerlet",void 0);var r=e.state,i=e.webGLContext;if(Vr.info("layout - webGLContext",Boolean(i)),void 0===e.webGLContext)throw new Error("PhysLayout missing options: webGLContext - webgl context");if(void 0===e.state)throw new Error("PhysLayout missing options: state - state object");var o=i;this.checkCompatibility(o),this.printGlStats(o),this.physVbo=o.createBuffer(),o.bindBuffer(o.ARRAY_BUFFER,this.physVbo);var a=new Float32Array([0,0,yr,0,0,yr,yr,yr]);o.bufferData(o.ARRAY_BUFFER,a,o.STATIC_DRAW),this.physSmallVbo=o.createBuffer(),o.bindBuffer(o.ARRAY_BUFFER,this.physSmallVbo);var s=new Float32Array([0,0,Ki,0,0,Ki,Ki,Ki]);o.bufferData(o.ARRAY_BUFFER,s,o.STATIC_DRAW),this.physProjection=wi(),xi(this.physProjection,0,yr,yr,0,0,1e6),this.physSmallProjection=wi(),xi(this.physSmallProjection,0,Ki,Ki,0,0,1e6),o.disable(o.DEPTH_TEST),this.gl=o,this.useReadpixelWorkaround&&this.setupReadpixelWorkaround(),this.setupUpdates(),this.averageNodeSize=gr,this.shouldUpdate=!0,this.iterationCount=0,this.lastSpeedValues=[],this.rollingAvgGraphSpeed=0,this.nodeVariation=0,this.nodeCenterPoint=[0,0],this.peakIterationMultiplier=160,this.setOptions(e,!0),this.definePhysicsArrays();var u=r.nodes,l=r.rels;u.addChannel(qi),l.addChannel(qi),this.stateDisposers=[],this.stateDisposers.push(r.reaction((function(){return r.graphUpdates}),(function(){var t=u.channels[qi];if(void 0!==u.version&&t){var e=Object.values(t.adds).length>0,r=Object.values(t.removes).length>0,i=Object.values(t.updates),o=Or(i);(e||r||o)&&(n.shouldUpdate=!0,n.checkForUpdates())}var a=l.channels[qi];if(void 0!==l.version&&a){var s=Object.values(a.adds).length>0,c=Object.values(a.removes).length>0;(s||c)&&(n.shouldUpdate=!0,n.checkForUpdates())}}))),this.setData({nodes:u.items,rels:l.items}),this.state=r,this.dpr=window.devicePixelRatio||1}var e,n;return e=t,n=[{key:"setOptions",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t){var n=t.intelWorkaround,r=t.simulationStopVelocity,i=t.gravity,o=t.enableVerlet,a=void 0!==o&&o;e&&(this.intelWorkaround=n,this.enableVerlet=a);var s=this.enableVerlet?.1:null!=r?r:100;this.simulationStopVelocitySquared=s*s,this.gravity=null!=i?i:100,this.force=0}}},{key:"setData",value:function(t){var e=Ji(t.nodes),n=e.nodeIdToIndex,r=e.nodeIndexToId;return this.nodeIdToIndex=n,this.nodeIndexToId=r,this.numNodes=t.nodes.length,this.solarMerger=new Bi(t,n),this.solarMerger.coarsenTo(1),this.subGraphs=this.solarMerger.subGraphs,this.nodeSortMap=this.solarMerger.nodeSortMap,this.setupSprings(this.subGraphs[0]),this.setupSize(this.subGraphs[0]),this.setupPhysics(),this.firstUpdate=!0,this.curPhysData=0,this.shouldUpdate=!0,this.iterationCount=0,this.subGraphs[0]}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.gl;if(this.checkForUpdates(t),!this.shouldUpdate)return e.bindFramebuffer(e.FRAMEBUFFER,this.getPhysData(0).frameBuffer),e.readPixels(0,0,yr,yr,e.RGBA,e.FLOAT,this.physPositions),!1;e.disable(e.BLEND);for(var n=this.nodeVariation/(this.numNodes||1)>.3,r=this.getScaleNumber(this.iterationCount),i=this.subGraphs?this.subGraphs.length:0,o=this.getPhysData(0).texture,a=i-1;a>0;a--){var s=this.subGraphs[a].nodes.length,u=a===i-1;this.apprxRepForceShader.use(),this.apprxRepForceShader.setUniform("u_physData",o),this.apprxRepForceShader.setUniform("u_clusterData",this.levelsClusterTexture[a]),this.apprxRepForceShader.setUniform("u_finestIndexes",this.levelsFinestIndexTexture[a]),this.apprxRepForceShader.setUniform("u_prevForce",u?this.initalLevelTexture:this.levelsData[a+1].texture),this.apprxRepForceShader.setUniform("u_numNodes",s),this.apprxRepForceShader.setUniform("u_iterationMultiplier",r),this.apprxRepForceShader.setUniform("u_baseLength",this.getBaseLength(s)),this.apprxRepForceShader.setUniform("u_isTopLevel",u?1:0),e.bindBuffer(e.ARRAY_BUFFER,this.physSmallVbo),this.apprxRepForceShader.setAttributePointer("a_position",2,0,2),e.bindFramebuffer(e.FRAMEBUFFER,this.levelsData[a].frameBuffer),e.viewport(0,0,Ki,Ki),e.drawArrays(e.TRIANGLE_STRIP,0,4)}if(this.collisionDetectionMultiplier=0,this.collisionDetectionMultiplier=n?Math.min(this.iterationCount/Math.min(this.numNodes,300),1):1,this.force=i<=1?this.initalLevelTexture:this.levelsData[1].texture,this.physShader.use(),this.physShader.setUniform("u_prevForce",i<=1?this.initalLevelTexture:this.levelsData[1].texture),this.physShader.setUniform("u_connections",this.springTexture),this.physShader.setUniform("u_sizeTexture",this.sizeTexture),this.physShader.setUniform("u_connectionOffsets",this.offsetTexture),this.physShader.setUniform("u_physData",o),this.physShader.setUniform("u_pinnedNodes",this.pinTexture),this.physShader.setUniform("u_iterationMultiplier",r),this.physShader.setUniform("u_curIteration",this.iterationCount),this.physShader.setUniform("u_numNodes",this.numNodes),this.physShader.setUniform("u_clusterData",this.levelsClusterTexture[0]),this.physShader.setUniform("u_collisionMultiplier",this.collisionDetectionMultiplier),this.physShader.setUniform("u_baseLength",this.getBaseLength()),this.firstUpdate=!1,e.bindBuffer(e.ARRAY_BUFFER,this.physVbo),this.physShader.setAttributePointer("a_position",2,0,2),e.bindFramebuffer(e.FRAMEBUFFER,this.getPhysData(1).frameBuffer),e.viewport(0,0,yr,yr),e.drawArrays(e.TRIANGLE_STRIP,0,4),this.useReadpixelWorkaround?this.doReadpixelWorkaround():(e.bindFramebuffer(e.FRAMEBUFFER,this.getPhysData(0).frameBuffer),e.readPixels(0,0,yr,yr,e.RGBA,e.FLOAT,this.physPositions)),this.curPhysData=(this.curPhysData+1)%this.physData.length,this.iterationCount+=1,this.numNodes<2)this.shouldUpdate=!1,this.iterationCount=0;else if(this.iterationCount%5==0){var l=this.iterationCount<300,c=l?this.getMaxSpeedSquared():this.getMedianSpeedSquared(this.addedNodes);this.lastSpeedValues.push(c),this.rollingAvgGraphSpeed=this.lastSpeedValues.reduce((function(t,e){return t+e}),0)/this.lastSpeedValues.length;var f=l&&c>=this.rollingAvgGraphSpeed,h=this.simulationStopVelocitySquared&&this.rollingAvgGraphSpeed<this.simulationStopVelocitySquared;this.lastSpeedValues.length>20&&this.lastSpeedValues.shift(),!f&&!0===h&&this.iterationCount>2&&this.terminateUpdate()}return this.shouldUpdate}},{key:"terminateUpdate",value:function(){Vr.info("Cooling down after ".concat(this.iterationCount," iterations at graph speed of ").concat(Math.sqrt(this.rollingAvgGraphSpeed))),this.shouldUpdate=!1,this.iterationCount=0,this.rollingAvgGraphSpeed=0,this.lastSpeedValues=[],this.addedNodes=null,this.nodeVariation=0}},{key:"getShouldUpdate",value:function(){return this.shouldUpdate}},{key:"getComputing",value:function(){return!1}},{key:"getNodePositions",value:function(t){var e=[];if(this.useReadpixelWorkaround){var n,r=Wi(t);try{for(r.s();!(n=r.n()).done;){var i=n.value,o=this.nodeIdToIndex[i.id],a=i.id,s=void 0,u=void 0;void 0!==o&&(s=this.workaroundData[0].dataFloat[o],u=this.workaroundData[1].dataFloat[o]),e.push({id:a,x:s,y:u})}}catch(t){r.e(t)}finally{r.f()}}else{var l,c=Wi(t);try{for(c.s();!(l=c.n()).done;){var f=l.value,h=this.nodeIdToIndex[f.id],d=f.id,p=void 0,v=void 0;void 0!==h&&(p=this.physPositions[4*h+0],v=this.physPositions[4*h+1]),e.push({id:d,x:p,y:v})}}catch(t){c.e(t)}finally{c.f()}}return e}},{key:"reheat",value:function(t){this.setupSize(this.subGraphs[0]),this.shouldUpdate=!0,this.iterationCount=0,this.nodeVariation=t.nodes.length}},{key:"updateNodes",value:function(t){var e=this.gl,n=new Set;e.bindTexture(e.TEXTURE_2D,this.getPhysData().texture);var r,i=Wi(t);try{for(i.s();!(r=i.n()).done;){var o=r.value,a=this.nodeIdToIndex[o.id];if(void 0!==o.x&&void 0!==o.y){Zi[0]=o.x,Zi[1]=o.y,Zi[2]=0,Zi[3]=0;var s=a%yr,u=(a-s)/yr;e.texSubImage2D(e.TEXTURE_2D,0,s,u,1,1,e.RGBA,e.FLOAT,Zi),this.useReadpixelWorkaround?(this.workaroundData[0].dataFloat[a]=o.x,this.workaroundData[1].dataFloat[a]=o.y):(this.physPositions[4*a+0]=o.x,this.physPositions[4*a+1]=o.y)}void 0!==o.pinned&&(this.pinData[a]=o.pinned?255:0),Object.keys(o).forEach((function(t){return n.add(t)}))}}catch(t){i.e(t)}finally{i.f()}n.has("pinned")&&(e.bindTexture(e.TEXTURE_2D,this.pinTexture),e.texImage2D(e.TEXTURE_2D,0,e.ALPHA,yr,yr,0,e.ALPHA,e.UNSIGNED_BYTE,this.pinData)),(n.has("x")||n.has("y")||n.has("size"))&&(this.shouldUpdate=!0,this.iterationCount=0)}},{key:"addRemoveData",value:function(t,e){var n=this.gl;this.numNodes=t.nodes.length,this.physShader.use(),this.physShader.setUniform("u_numNodes",this.numNodes),this.physShader.setUniform("u_baseLength",this.getBaseLength());var r=Ji(t.nodes).nodeIdToIndex,i=new Bi(t,r);i.coarsenTo(1);var o=i.subGraphs[0],a=this.subGraphs[0],s=function(t){return a.nodes.findIndex((function(e){return e.id===t}))},u=Object.values(e.adds),l=Object.values(e.removes);this.addedNodes=u.length>0?{}:null,this.nodeVariation=u.length+l.length;for(var c,f=3*Math.sqrt(t.nodes.length),h={x:0,y:0},d=o.nodes.length,p=new Uint8Array(65536),v=0;v<d;v++){var y=0,m=0,g=o.nodes[v];if(c=g.id,Boolean(e.adds[c])){if(this.addedNodes[v]=g.id,y=g.position?g.position.x:void 0,m=g.position?g.position.y:void 0,void 0===y||void 0===m){var b=i.sunMap,w=void 0;for(w=b[g.id];void 0!==w;w=b[w]){var x=s(w);if(-1!==x){var _=this.getNodePosition(x);y=_.x+10*(Math.random()-.5),m=_.y+10*(Math.random()-.5);break}}void 0===w&&(y=this.nodeCenterPoint[0]+f*(Math.random()-.5),m=this.nodeCenterPoint[1]+f*(Math.random()-.5))}this.updateData[2*v]=y,this.updateData[2*v+1]=m,p[v]=g.pinned?255:0}else{var S=s(g.id),T=this.getNodePosition(S);y=T.x,m=T.y,this.updateData[2*v]=S,this.updateData[2*v+1]=999999,p[v]=this.pinData[S]}h.x+=y||0,h.y+=m||0}this.nodeCenterPoint=d?[h.x/d,h.y/d]:[0,0],this.pinData=p,this.subGraphs=i.subGraphs,this.nodeSortMap=i.nodeSortMap,this.setupSprings(this.subGraphs[0]),this.setupSize(this.subGraphs[0]);var A=Ji(this.subGraphs[0].nodes),O=A.nodeIdToIndex,E=A.nodeIndexToId;return this.nodeIdToIndex=O,this.nodeIndexToId=E,n.bindTexture(n.TEXTURE_2D,this.updateTexture),n.texImage2D(n.TEXTURE_2D,0,n.ALPHA,yr,yr,0,n.ALPHA,n.FLOAT,this.updateData),Vr.info("Setting gravity center to ",this.nodeCenterPoint),this.physShader.setUniform("u_gravityCenter",this.nodeCenterPoint),this.updateShader.use(),this.updateShader.setUniform("u_numNodesNew",o.nodes.length),this.updateShader.setUniform("u_physData",this.getPhysData(0).texture),this.updateShader.setUniform("u_updateData",this.updateTexture),n.disable(n.BLEND),n.bindBuffer(n.ARRAY_BUFFER,this.physVbo),this.updateShader.setAttributePointer("a_position",2,0,2),n.bindFramebuffer(n.FRAMEBUFFER,this.getPhysData(1).frameBuffer),n.viewport(0,0,yr,yr),n.drawArrays(n.TRIANGLE_STRIP,0,4),this.curPhysData=(this.curPhysData+1)%this.physData.length,this.useReadpixelWorkaround?this.doReadpixelWorkaround():(n.bindFramebuffer(n.FRAMEBUFFER,this.getPhysData().frameBuffer),n.readPixels(0,0,yr,yr,n.RGBA,n.FLOAT,this.physPositions)),(u.length>0||l.length>0)&&(n.bindTexture(n.TEXTURE_2D,this.pinTexture),n.texImage2D(n.TEXTURE_2D,0,n.ALPHA,yr,yr,0,n.ALPHA,n.UNSIGNED_BYTE,this.pinData)),this.shouldUpdate=!0,this.iterationCount=0,this.setupPhysicsForCoarse(),this.subGraphs[0]}},{key:"destroy",value:function(){var t=this;this.gl.deleteBuffer(this.physVbo),this.gl.deleteBuffer(this.physSmallVbo),this.physData.forEach((function(e){t.gl.deleteFramebuffer(e.frameBuffer),t.gl.deleteTexture(e.texture)})),this.levelsData.forEach((function(e){t.gl.deleteFramebuffer(e.frameBuffer),t.gl.deleteTexture(e.texture)})),this.levelsClusterTexture.forEach((function(e){t.gl.deleteTexture(e)})),this.levelsFinestIndexTexture.forEach((function(e){t.gl.deleteTexture(e)})),this.gl.deleteTexture(this.initalLevelTexture),this.gl.deleteTexture(this.sizeTexture),this.gl.deleteTexture(this.offsetTexture),this.gl.deleteTexture(this.springTexture),this.gl.deleteTexture(this.pinTexture),this.gl.deleteTexture(this.updateTexture),void 0!==this.apprxRepForceShader&&this.apprxRepForceShader.remove(),void 0!==this.updateShader&&this.updateShader.remove(),void 0!==this.physShader&&this.physShader.remove(),this.physPositions=null,this.gl=null,this.stateDisposers.forEach((function(t){t()})),this.state.nodes.removeChannel(qi),this.state.rels.removeChannel(qi)}},{key:"dumpTexture",value:function(t,e,n){var r=this.gl;Vr.info("--- Dumping texture ",n),r.bindFramebuffer(r.FRAMEBUFFER,t),r.readPixels(0,0,yr,yr,r.RGBA,r.FLOAT,this.physPositions);for(var i=0;i<e;i++)Vr.info(i,": ",this.physPositions[4*i+0],this.physPositions[4*i+1],this.physPositions[4*i+2],this.physPositions[4*i+3])}},{key:"getScaleNumber",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(t,e,n){return n+Math.pow(10,6)*Math.pow(t-120,-1.7)};return 0===t?0:t<300?200+-1/Math.pow(10,5)*3*Math.pow(Math.abs(t-200+12),3):e(t,200,10)}},{key:"getBaseLength",value:function(t){if(void 0===t||t===this.numNodes)return 100*this.dpr;var e=Math.pow(this.averageNodeSize/2,2)*Math.PI,n=this.numNodes/t*e;return(100+Math.sqrt(n/Math.PI)/2/t)*this.dpr}},{key:"checkForUpdates",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.state,n=e.nodes,r=e.rels,i={nodes:n.items,rels:r.items},o=Object.values(n.channels[qi].adds).length>0,a=Object.values(r.channels[qi].adds).length>0,s=Object.values(n.channels[qi].removes).length>0,u=Object.values(r.channels[qi].removes).length>0,l=Object.values(n.channels[qi].updates);(o||a||s||u)&&this.addRemoveData(i,{adds:n.channels[qi].adds,removes:n.channels[qi].removes}),t?(this.updateNodes(i.nodes),this.reheat(i)):l.length>0&&(this.updateNodes(l),Or(l)&&this.reheat(i)),n.clearChannel(qi),r.clearChannel(qi)}},{key:"getNodePosition",value:function(t){return this.useReadpixelWorkaround?{x:this.workaroundData[0].dataFloat[t],y:this.workaroundData[1].dataFloat[t]}:{x:this.physPositions[4*t+0],y:this.physPositions[4*t+1]}}},{key:"getMaxSpeedSquared",value:function(){var t=0;if(this.useReadpixelWorkaround)for(var e=0;e<this.numNodes;e++){var n=this.workaroundData[2].dataFloat[e],r=this.workaroundData[3].dataFloat[e],i=n*n+r*r;i>t&&(t=i)}else for(var o=0;o<this.numNodes;o++){var a=this.physPositions[4*o+2],s=this.physPositions[4*o+3],u=a*a+s*s;u>t&&(t=u)}return t}},{key:"getMedianSpeedSquared",value:function(t){var e=[];if(this.useReadpixelWorkaround)for(var n=0;n<this.numNodes;n++){var r=this.workaroundData[2].dataFloat[n],i=this.workaroundData[3].dataFloat[n],o=r*r+i*i;e[n]=o}else for(var a=0;a<this.numNodes;a++)if(!t||t[a]){var s=this.physPositions[4*a+2],u=this.physPositions[4*a+3],l=s*s+u*u;e.push(l)}return e.sort((function(t,e){return t-e})),e[Math.floor(e.length/2)]}},{key:"getPhysData",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.physData[(this.curPhysData+t)%this.physData.length]}},{key:"newTexture",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.FLOAT,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:t.RGBA,o=t.createTexture();return t.bindTexture(t.TEXTURE_2D,o),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texImage2D(t.TEXTURE_2D,0,i,n,n,0,i,r,e),o}},{key:"newFramebuffer",value:function(t,e){var n=t.createFramebuffer();return t.bindFramebuffer(t.FRAMEBUFFER,n),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,e,0),n}},{key:"checkCompatibility",value:function(t){function e(t){throw new Mi(t)}t||e("Could not initialize WebGL"),0===t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS)&&e("Vertex shader texture access not available"),t.getExtension("OES_texture_float")||e("OES_texture_float extension not available");var n=t.getParameter(t.MAX_TEXTURE_SIZE),r=Math.max(yr,mr);n<r&&e("Need larger WebGL texture support. Avaliable: ".concat(n," needed: ").concat(r));var i=new Float32Array(4),o=this.newTexture(t,i,1),a=this.newFramebuffer(t,o);t.bindFramebuffer(t.FRAMEBUFFER,a),t.readPixels(0,0,1,1,t.RGBA,t.FLOAT,i),t.getError()!==t.NO_ERROR&&(Vr.info("gl.readPixels doesnt work for float texture, activating workaround"),this.useReadpixelWorkaround=!0),t.bindFramebuffer(t.FRAMEBUFFER,null),t.deleteFramebuffer(a),t.deleteTexture(o)}},{key:"printGlStats",value:function(t){var e=t.getExtension("WEBGL_debug_renderer_info"),n="?",r="?";null!==e&&(n=t.getParameter(e.UNMASKED_VENDOR_WEBGL),r=t.getParameter(e.UNMASKED_RENDERER_WEBGL)),Vr.trace("Vendor: ".concat(n)),Vr.trace("Renderer: ".concat(r));var i=t.getParameter(t.ALIASED_LINE_WIDTH_RANGE);Vr.trace("Line width range: ".concat(i));var o=t.getSupportedExtensions();Vr.trace("Extentions:"),o.length>0&&o.forEach((function(t){return Vr.trace(t)}))}},{key:"adjustToGlSize",value:function(t){return t*this.dpr*2.5}},{key:"setupSize",value:function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{nodes:[]},e=new Float32Array(65536),n=t.nodes,r=n.length,i=0,o=0;o<r;o++){var a,s=parseInt(null!==(a=n[o].size)&&void 0!==a?a:gr,10);e[o]=this.adjustToGlSize(s),i+=s}this.averageNodeSize=r?i/r:gr;var u=this.gl;void 0===this.sizeTexture&&(this.sizeTexture=u.createTexture()),u.bindTexture(u.TEXTURE_2D,this.sizeTexture),u.texImage2D(u.TEXTURE_2D,0,u.ALPHA,yr,yr,0,u.ALPHA,u.FLOAT,e),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MAG_FILTER,u.NEAREST),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MIN_FILTER,u.NEAREST),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_S,u.CLAMP_TO_EDGE),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_T,u.CLAMP_TO_EDGE)}},{key:"setupSprings",value:function(t){var e,n,r=this.gl,i=t.relationships,o=new Float32Array(16777216),a=new Float32Array(65536),s=0;for(e=0;e<t.nodes.length;e++)for(a[e]=s,o[s]=i[e].length,s+=1,n=0;n<i[e].length;n++)o[s]=i[e][n],s+=1;for(n=s;n<o.length;n++)o[n]=1;for(n=e;n<a.length;n++)a[n]=0;void 0===this.offsetTexture&&(this.offsetTexture=r.createTexture()),r.bindTexture(r.TEXTURE_2D,this.offsetTexture),r.texImage2D(r.TEXTURE_2D,0,r.ALPHA,yr,yr,0,r.ALPHA,r.FLOAT,a),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.NEAREST),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.NEAREST),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),void 0===this.springTexture&&(this.springTexture=r.createTexture()),r.bindTexture(r.TEXTURE_2D,this.springTexture),r.texImage2D(r.TEXTURE_2D,0,r.ALPHA,mr,mr,0,r.ALPHA,r.FLOAT,o),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.NEAREST),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.NEAREST),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE)}},{key:"setupPhysics",value:function(){this.setupPhysicsForCoarse(),this.setupPhysicsForNodes(),this.physPositions=new Float32Array(262144),this.setupPinData()}},{key:"setupPhysicsForNodes",value:function(){var t=this.gl,e=this.subGraphs.length,n=this.subGraphs[0].nodes,r=3*Math.sqrt(n.length),i=new Float32Array(262144),o=new Float32Array(262144);this.numNodes=n.length;for(var a=0;a<262144;a++)i[a]=0,o[a]=0;for(var s=function(t,e,n,r){r[4*t+0]=e,r[4*t+1]=n,r[4*t+2]=0,r[4*t+3]=0},u=e-1;u>=0;u--){var l=u===e-1?[]:this.subGraphs[u+1].nodes;0===l.length?this.subGraphs[u].nodes.forEach((function(t,e){var n=t.placement?t.placement.x:r*(Math.random()-.5),o=t.placement?t.placement.y:r*(Math.random()-.5);s(void 0===t.finestIndex?e:t.finestIndex,n,o,i)})):l.forEach((function(t){var e=t.finestIndex,n=i[4*t.finestIndex],r=i[4*t.finestIndex+1],o=Vi({x:n,y:r},10,t.planets.length+1);e++,t.planets.forEach((function(t,n){var r=o[n];s(e++,r.x,r.y,i);var a=Vi({x:r.x,y:r.y},10,t.moons.length+1);t.moons.forEach((function(t,n){var r=a[n];s(e++,r.x,r.y,i)}))}))}))}this.physData=[];for(var c=0;c<2;c++){var f=this.newTexture(t,0===c?i:o,yr),h=this.newFramebuffer(t,f);this.physData.push({texture:f,frameBuffer:h})}var d=this.enableVerlet?"precision mediump float;\n\nuniform sampler2D u_physData;\nuniform sampler2D u_connections;\nuniform sampler2D u_connectionOffsets;\nuniform sampler2D u_pinnedNodes;\nuniform sampler2D u_sizeTexture;\nuniform float u_baseLength;\nuniform float u_curIteration;\nuniform float u_iterationMultiplier;\nuniform vec2 u_gravityCenter;\nuniform float u_numNodes;\nuniform float u_gravity;\n\nuniform sampler2D u_clusterData;\nuniform sampler2D u_prevForce;\nuniform float u_collisionMultiplier;\n\n\nfloat DAMP = 0.6;\nfloat COOL = 0.99998;\nfloat TEMP = max(0.02, pow(COOL, u_curIteration));\nfloat TIMESTEP = 1.0 / 30.0;\nfloat VELOCITYDECAY = 0.6;\nfloat accLimitLow = 500000.0;\nfloat accLimitHigh = 750000.0;\nfloat accLimitPosHigh = 10000000.0;\n\nconst float denseNodeThreshold = 1000.0;\nconst float MIN_DISTANCE = 0.00000001;\nconst float MAX_DISTANCE = 1000000000.0;\nconst float MAX_ACCELERATION = 50000.0;\n\nvec4 getTextureData(sampler2D texture, float index, float base) {\n float x = mod(index, base);\n float y = (index - x) / base;\n return texture2D(texture, vec2(x + 0.5, y + 0.5) / base);\n}\n\nbool isNan(float val) {\n return (val < 0.0 || 0.0 < val || val == 0.0) ? false : true;\n}\n\nconst float BIG_NUMBER = 999999999999999999.0;\nbool isInf(float val) {\n return val > BIG_NUMBER || val < -BIG_NUMBER;\n}\n\nvec2 getDelta(vec2 v1, vec2 v2) {\n vec2 delta = v1 - v2;\n float dist = length(delta);\n if (dist < MIN_DISTANCE || isNan(dist)) {\n return vec2(MIN_DISTANCE, MIN_DISTANCE);\n }\n if (dist > MAX_DISTANCE) {\n vec2 normDelta = delta / dist;\n return normDelta * MAX_DISTANCE;\n }\n return delta;\n}\n\nvec4 getOtherNodePosition(float i) {\n return getTextureData(u_physData, i, 256.0);\n}\n\nfloat getCombinedNodeSize(float i, float nodeSize) {\n float otherNodeSize = getTextureData(u_sizeTexture, i, 256.0).a;\n return nodeSize + otherNodeSize;\n}\n\nvec2 getSpringForce(float curConnection, float numConnections, float springFScale, vec4 myPosition, float i) {\n float curSpring = getTextureData(u_connections, curConnection + i, 4096.0).a;\n\n vec4 otherPosition = getTextureData(u_physData, curSpring, 256.0);\n float otherDataPosition = getTextureData(u_connectionOffsets, curSpring, 256.0).a;\n float avgDegree;\n#if INTEL_WORKAROUND\n avgDegree = max(numConnections, 4.0);\n#else\n float otherNumConnections = getTextureData(u_connections, otherDataPosition, 4096.0).a;\n avgDegree = max((otherNumConnections + numConnections * 3.0) / 4.0, 4.0);\n#endif\n\n vec2 delta = getDelta(myPosition.xy, otherPosition.xy);\n float dist = length(delta);\n\n float F = (dist * dist * springFScale) / (u_baseLength * avgDegree);\n if (u_collisionMultiplier > 0.0) {\n F *= u_collisionMultiplier;\n }\n return (-delta / dist) * F;\n}\n\nvec2 getCollisionForce(float combinedNodeSize, float dist, float fScale, vec2 delta) {\n float collisionForce = (combinedNodeSize - dist) / (dist);\n if (u_collisionMultiplier > 0.0) {\n collisionForce *= u_collisionMultiplier;\n }\n return (delta * collisionForce * fScale * combinedNodeSize) / (combinedNodeSize + 1.0);\n}\n\nvec2 getRepulsionForce(float dist, float fScale, vec2 delta) {\n float F = (u_baseLength * u_baseLength * fScale) / (dist);\n return (delta / dist) * F * 0.05;\n}\n\nvoid main(void) {\n float textureSide = 256.0; //#TEXTURE_SIDE#;\n float index = (gl_FragCoord.x - 0.5) + (gl_FragCoord.y - 0.5) * textureSide;\n\n if (index >= u_numNodes) {\n discard;\n }\n\n vec4 clusterData = getTextureData(u_clusterData, index, 256.0);\n\n float clusterIndex = clusterData.x;\n float clusterStartIndex = clusterData.y;\n float clusterSize = clusterData.z;\n float clusterWeight = clusterData.w;\n\n vec4 myPosition = getTextureData(u_physData, index, 256.0);\n vec4 previousForce = getTextureData(u_prevForce, clusterIndex, 256.0);\n\n vec2 acceleration = previousForce.xy;\n\n float isPinned = getTextureData(u_pinnedNodes, index, 256.0).a;\n float nodeSize = getTextureData(u_sizeTexture, index, 256.0).a;\n\n if (isPinned > 0.5) {\n gl_FragColor = vec4(myPosition.xy, 0.0, 0.0);\n return;\n }\n\n float curConnection = getTextureData(u_connectionOffsets, index, 256.0).a;\n float numConnections = getTextureData(u_connections, curConnection, 4096.0).a;\n\n float fScale = 1.0 + sqrt(u_iterationMultiplier);\n float springFScale = fScale;\n\n if (numConnections > denseNodeThreshold) {\n springFScale = sqrt(fScale);\n }\n\n float numOfRels = 0.0;\n\n // Springs\n for (float i = 1.0; i <= 256.0 * 256.0; i++) {\n if (numOfRels >= numConnections) {\n break;\n }\n acceleration += getSpringForce(curConnection, numConnections, springFScale, myPosition, i);\n numOfRels += 1.0;\n }\n\n // Repulsion && collision detection\n if (u_collisionMultiplier > 0.0) {\n float number_of_collisions = 0.0;\n for (float i = 0.0; i < 256.0 * 256.0; i++) {\n if (i >= u_numNodes) {\n break;\n }\n\n if (i == index) {\n continue;\n }\n\n vec4 otherPosition = getOtherNodePosition(i);\n vec2 delta = getDelta(myPosition.xy, otherPosition.xy);\n float dist = length(delta);\n float combinedNodeSize = getCombinedNodeSize(i, nodeSize) * 2.0;\n\n if (dist < combinedNodeSize && number_of_collisions < 40.0) {\n number_of_collisions++;\n acceleration += getCollisionForce(combinedNodeSize, dist, fScale, delta);\n }\n\n if (i >= clusterStartIndex && i < clusterStartIndex + clusterSize) {\n acceleration += getRepulsionForce(dist, fScale, delta);\n }\n }\n } else {\n for (float i = 0.0; i < 256.0 * 256.0; i++) {\n if (i >= clusterStartIndex + clusterSize || i >= u_numNodes) {\n break;\n }\n\n if (i < clusterStartIndex || i == index) {\n continue;\n }\n\n vec4 otherPosition = getOtherNodePosition(i);\n vec2 delta = getDelta(myPosition.xy, otherPosition.xy);\n float dist = length(delta);\n float combinedNodeSize = getCombinedNodeSize(i, nodeSize);\n\n if (dist < combinedNodeSize) {\n acceleration += getCollisionForce(combinedNodeSize, dist, fScale, delta);\n }\n\n acceleration += getRepulsionForce(dist, fScale, delta);\n }\n }\n\n // Gravity\n vec2 delta = getDelta(u_gravityCenter, myPosition.xy);\n float dist = length(delta);\n\n vec2 grav = (delta / dist) * u_gravity * fScale;\n acceleration += grav * smoothstep(0.0, 500.0, dist);\n\n float accMagnitude = length(acceleration);\n acceleration *= min(MAX_ACCELERATION, accMagnitude) / accMagnitude;\n\n float iterationFrictionThreshold = 1000.0;\n\n if (u_curIteration > iterationFrictionThreshold) {\n float friction = 1.0 + pow((u_curIteration - iterationFrictionThreshold), 2.0) / 100.0;\n acceleration *= 1.0 / friction;\n }\n\n if (u_curIteration == 0.0) {\n gl_FragColor = vec4(myPosition.xy, myPosition.zw);\n } else {\n vec2 prevVelocity = myPosition.zw;\n vec2 currentPos = myPosition.xy;\n vec2 prevPos = currentPos - prevVelocity;\n\n vec2 newPos = currentPos + TEMP * ( DAMP * (prevVelocity) + acceleration * TIMESTEP * TIMESTEP);\n vec2 newVelocity = newPos - currentPos;\n gl_FragColor = vec4(newPos, newVelocity);\n }\n}":"precision mediump float;\n\nuniform sampler2D u_physData;\nuniform sampler2D u_connections;\nuniform sampler2D u_connectionOffsets;\nuniform sampler2D u_pinnedNodes;\nuniform sampler2D u_sizeTexture;\nuniform float u_baseLength;\nuniform float u_curIteration;\nuniform float u_iterationMultiplier;\nuniform vec2 u_gravityCenter;\nuniform float u_numNodes;\nuniform float u_gravity;\n\nuniform sampler2D u_clusterData;\nuniform sampler2D u_prevForce;\nuniform float u_collisionMultiplier;\n\nfloat TIMESTEP = 1.0 / 30.0;\nfloat VELOCITYDECAY = 0.6;\nfloat accLimitLow = 500000.0;\nfloat accLimitHigh = 750000.0;\nfloat accLimitPosHigh = 10000000.0;\n\nconst float denseNodeThreshold = 1000.0;\nconst float MIN_DISTANCE = 0.00000001;\nconst float MAX_DISTANCE = 1000000000.0;\nconst float MAX_ACCELERATION = 500000.0;\n\nvec4 getTextureData(sampler2D texture, float index, float base) {\n float x = mod(index, base);\n float y = (index - x) / base;\n return texture2D(texture, vec2(x + 0.5, y + 0.5) / base);\n}\n\nbool isNan(float val) {\n return (val < 0.0 || 0.0 < val || val == 0.0) ? false : true;\n}\n\nconst float BIG_NUMBER = 999999999999999999.0;\nbool isInf(float val) {\n return val > BIG_NUMBER || val < -BIG_NUMBER;\n}\n\nvec2 getDelta(vec2 v1, vec2 v2) {\n vec2 delta = v1 - v2;\n float dist = length(delta);\n if (dist < MIN_DISTANCE || isNan(dist)) {\n return vec2(MIN_DISTANCE, MIN_DISTANCE);\n }\n if (dist > MAX_DISTANCE) {\n vec2 normDelta = delta / dist;\n return normDelta * MAX_DISTANCE;\n }\n return delta;\n}\n\nvec4 getOtherNodePosition(float i) {\n return getTextureData(u_physData, i, 256.0);\n}\n\nfloat getCombinedNodeSize(float i, float nodeSize) {\n float otherNodeSize = getTextureData(u_sizeTexture, i, 256.0).a;\n return nodeSize + otherNodeSize;\n}\n\nvec2 getSpringForce(float curConnection, float numConnections, float springFScale, vec4 myPosition, float i) {\n float curSpring = getTextureData(u_connections, curConnection + i, 4096.0).a;\n\n vec4 otherPosition = getTextureData(u_physData, curSpring, 256.0);\n float otherDataPosition = getTextureData(u_connectionOffsets, curSpring, 256.0).a;\n float avgDegree;\n#if INTEL_WORKAROUND\n avgDegree = max(numConnections, 4.0);\n#else\n float otherNumConnections = getTextureData(u_connections, otherDataPosition, 4096.0).a;\n avgDegree = max((otherNumConnections + numConnections * 3.0) / 4.0, 4.0);\n#endif\n\n vec2 delta = getDelta(myPosition.xy, otherPosition.xy);\n float dist = length(delta);\n\n float F = (dist * dist * springFScale) / (u_baseLength * avgDegree);\n if (u_collisionMultiplier > 0.0) {\n F *= u_collisionMultiplier;\n }\n return (-delta / dist) * F;\n}\n\nvec2 getCollisionForce(float combinedNodeSize, float dist, float fScale, vec2 delta) {\n float collisionForce = ((combinedNodeSize - dist) / dist);\n if (u_collisionMultiplier > 0.0) {\n collisionForce *= u_collisionMultiplier;\n }\n return (delta * collisionForce * fScale * combinedNodeSize) / (combinedNodeSize + 1.0);\n}\n\nvec2 getRepulsionForce(float dist, float fScale, vec2 delta) {\n float F = (u_baseLength * u_baseLength * (fScale / 1.5)) / dist;\n return (delta / dist) * F * 0.05;\n}\n\nvoid main(void) {\n float textureSide = 256.0; //#TEXTURE_SIDE#;\n float index = (gl_FragCoord.x - 0.5) + (gl_FragCoord.y - 0.5) * textureSide;\n\n if (index >= u_numNodes) {\n discard;\n }\n\n vec4 clusterData = getTextureData(u_clusterData, index, 256.0);\n\n float clusterIndex = clusterData.x;\n float clusterStartIndex = clusterData.y;\n float clusterSize = clusterData.z;\n float clusterWeight = clusterData.w;\n\n vec4 myPosition = getTextureData(u_physData, index, 256.0);\n vec4 previousForce = getTextureData(u_prevForce, clusterIndex, 256.0);\n\n vec2 acceleration = previousForce.xy;\n\n float isPinned = getTextureData(u_pinnedNodes, index, 256.0).a;\n float nodeSize = getTextureData(u_sizeTexture, index, 256.0).a;\n\n if (isPinned > 0.5) {\n gl_FragColor = vec4(myPosition.xy, 0.0, 0.0);\n return;\n }\n\n float curConnection = getTextureData(u_connectionOffsets, index, 256.0).a;\n float numConnections = getTextureData(u_connections, curConnection, 4096.0).a;\n\n float fScale = 1.0 + sqrt(u_iterationMultiplier);\n float springFScale = fScale;\n\n if (numConnections > denseNodeThreshold) {\n springFScale = sqrt(fScale);\n }\n\n float numOfRels = 0.0;\n\n // Springs\n for (float i = 1.0; i <= 256.0 * 256.0; i++) {\n if (numOfRels >= numConnections) {\n break;\n }\n acceleration += getSpringForce(curConnection, numConnections, springFScale, myPosition, i);\n numOfRels += 1.0;\n }\n\n // Repulsion && collision detection\n if (u_collisionMultiplier > 0.0) {\n float number_of_collisions = 0.0;\n for (float i = 0.0; i < 256.0 * 256.0; i++) {\n if (i >= u_numNodes) {\n break;\n }\n\n if (i == index) {\n continue;\n }\n\n vec4 otherPosition = getOtherNodePosition(i);\n vec2 delta = getDelta(myPosition.xy, otherPosition.xy);\n float dist = length(delta);\n float combinedNodeSize = getCombinedNodeSize(i, nodeSize) * 2.0;\n\n if (dist < combinedNodeSize && number_of_collisions < 40.0) {\n number_of_collisions++;\n acceleration += getCollisionForce(combinedNodeSize, dist, fScale, delta);\n }\n\n if (i >= clusterStartIndex && i < clusterStartIndex + clusterSize) {\n acceleration += getRepulsionForce(dist, fScale, delta);\n }\n }\n } else {\n for (float i = 0.0; i < 256.0 * 256.0; i++) {\n if (i >= clusterStartIndex + clusterSize || i >= u_numNodes) {\n break;\n }\n\n if (i < clusterStartIndex || i == index) {\n continue;\n }\n\n vec4 otherPosition = getOtherNodePosition(i);\n vec2 delta = getDelta(myPosition.xy, otherPosition.xy);\n float dist = length(delta);\n float combinedNodeSize = getCombinedNodeSize(i, nodeSize);\n\n if (dist < combinedNodeSize) {\n acceleration += getCollisionForce(combinedNodeSize, dist, fScale, delta);\n }\n\n acceleration += getRepulsionForce(dist, fScale, delta);\n }\n }\n\n // Gravity\n vec2 delta = getDelta(u_gravityCenter, myPosition.xy);\n float dist = length(delta);\n\n vec2 grav = (delta / dist) * u_gravity * fScale;\n acceleration += grav * smoothstep(0.0, 500.0, dist);\n\n float accMagnitude = length(acceleration);\n acceleration *= min(MAX_ACCELERATION, accMagnitude) / accMagnitude;\n\n float iterationFrictionThreshold = 1000.0;\n\n if (u_curIteration > iterationFrictionThreshold) {\n float friction = 1.0 + pow((u_curIteration - iterationFrictionThreshold), 2.0) / 100.0;\n acceleration *= 1.0 / friction;\n }\n\n if (u_curIteration == 0.0) {\n gl_FragColor = vec4(myPosition.xy, acceleration * TIMESTEP * 0.5);\n } else {\n myPosition.zw = myPosition.zw * VELOCITYDECAY;\n gl_FragColor = vec4(myPosition.xy + myPosition.zw * TIMESTEP, myPosition.zw + acceleration * TIMESTEP);\n }\n}";this.physShader=new Pi(t,Ni,d,{INTEL_WORKAROUND:this.intelWorkaround?1:0}),this.physShader.use(),this.physShader.setUniform("u_projection",this.physProjection),this.physShader.setUniform("u_baseLength",this.getBaseLength()),this.physShader.setUniform("u_connections",this.springTexture),this.physShader.setUniform("u_sizeTexture",this.sizeTexture),this.physShader.setUniform("u_connectionOffsets",this.offsetTexture),this.physShader.setUniform("u_pinnedNodes",this.pinTexture),this.physShader.setUniform("u_gravityCenter",this.nodeCenterPoint),this.physShader.setUniform("u_numNodes",this.numNodes),this.physShader.setUniform("u_gravity",this.gravity)}},{key:"setupPhysicsForCoarse",value:function(){var t=this,e=this.gl;this.levelsData=[],this.levelsClusterTexture=[],this.levelsFinestIndexTexture=[];var n,r,i=this.subGraphs.length,o=function(t,e,r,i,o){n[4*t+0]=e,n[4*t+1]=r,n[4*t+2]=o.size(),n[4*t+3]=i||1};if(1===i){n=new Float32Array(262144);var a=this.subGraphs[0].nodes;a.forEach((function(t,e){o(e,0,0,t.weight,{size:function(){return a.length}})})),this.levelsClusterTexture[0]=this.newTexture(e,n,Ki)}else for(var s=function(){var i=t.subGraphs[u].nodes,a=u===t.subGraphs.length-1?[]:t.subGraphs[u+1].nodes;n=new Float32Array(262144),r=new Float32Array(65536);var s=0;if(a.length>0){var l=a.slice();l.sort((function(t,e){return t.previousIndex-e.previousIndex})),l.forEach((function(t,e){var n=s,u=a.indexOf(t);o(s,u,n,i[t.id].weight,t),r[s]=i[s].finestIndex,s++,t.planets.forEach((function(e){o(s,u,n,e.weight,t),r[s]=i[s].finestIndex,s++,e.moons.forEach((function(e){o(s,u,n,e.weight,t),r[s]=i[s].finestIndex,s++}))}))}))}else i.forEach((function(t,e){o(e,0,0,t.weight,{size:function(){return i.length}}),r[e]=i[e].finestIndex}));var c=t.newTexture(e,null,Ki),f=t.newFramebuffer(e,c);t.levelsData[u]={texture:c,frameBuffer:f},t.levelsClusterTexture[u]=t.newTexture(e,n,Ki),t.levelsFinestIndexTexture[u]=t.newTexture(e,r,yr,e.FLOAT,e.ALPHA)},u=this.subGraphs.length-1;u>=0;u--)s();for(var l=new Float32Array(262144),c=0;c<l.length;c++)l[c]=0;this.initalLevelTexture=this.newTexture(e,l,Ki);var f=this.enableVerlet?"precision mediump float;\nuniform sampler2D u_physData;\nuniform sampler2D u_clusterData;\nuniform sampler2D u_finestIndexes;\nuniform sampler2D u_prevForce;\n\nuniform float u_baseLength;\nuniform float u_numNodes;\nuniform float u_iterationMultiplier;\nuniform float u_isTopLevel;\n\nfloat PI = 3.1415926535897932384626433832795;\nfloat TIMESTEP = 1.0 / 30.0;\nfloat VELOCITYDECAY = 0.6;\n\nvec4 getTextureData(sampler2D texture, float index, float base) {\n float x = mod(index, base);\n float y = (index - x) / base;\n return texture2D(texture, vec2(x + 0.5, y + 0.5) / base);\n}\n\nfloat getLogClusterWeight(float value) {\n return value / max(log(value), 1.0);\n}\n\nvoid main(void) {\n float index = (gl_FragCoord.x - 0.5) + (gl_FragCoord.y - 0.5) * 256.0;\n\n if (index >= u_numNodes) {\n discard;\n }\n\n vec4 clusterData = getTextureData(u_clusterData, index, 256.0);\n\n float clusterIndex = clusterData.x;\n float clusterStartIndex = clusterData.y;\n float clusterSize = clusterData.z;\n float clusterRadius = (clusterSize * 0.5) + u_baseLength;\n float clusterArea = PI * clusterRadius * clusterRadius;\n\n float finestIndex = getTextureData(u_finestIndexes, index, 256.0).a;\n vec4 myPosition = getTextureData(u_physData, finestIndex, 256.0);\n vec4 previousForce = getTextureData(u_prevForce, clusterIndex, 256.0);\n float fScale = 1.0 + sqrt(u_iterationMultiplier);\n\n vec2 acceleration = previousForce.xy;\n\n // Repulsion & Collision Detection\n for (float i = 0.0; i < 256.0 * 256.0; i++) {\n if (i >= clusterStartIndex + clusterSize || i >= u_numNodes) {\n break;\n }\n if (i < clusterStartIndex || i == index) {\n continue;\n }\n\n vec4 otherClusterData = getTextureData(u_clusterData, i, 256.0);\n float otherClusterWeight = getLogClusterWeight(otherClusterData.w);\n\n float otherFinestIndex = getTextureData(u_finestIndexes, i, 256.0).a;\n vec4 otherPosition = getTextureData(u_physData, otherFinestIndex, 256.0);\n\n vec2 delta = myPosition.xy - otherPosition.xy;\n float dist = max(length(delta), 0.0000001);\n float maxDist = 25.0;\n float repulsionForceScale = 0.1;\n\n float F = (clusterArea * fScale) / (dist * dist);\n\n if (u_isTopLevel == 1.0) {\n repulsionForceScale = 0.3;\n }\n\n acceleration += ((delta / sqrt(dist)) * F) * repulsionForceScale * otherClusterWeight;\n\n if (dist < maxDist) {\n float collide = (maxDist - dist) / (dist * dist);\n acceleration += delta * collide * fScale * maxDist / (maxDist + 1.0);\n }\n }\n\n gl_FragColor = vec4(acceleration, vec2(finestIndex, 0));\n}":"precision mediump float;\nuniform sampler2D u_physData;\nuniform sampler2D u_clusterData;\nuniform sampler2D u_finestIndexes;\nuniform sampler2D u_prevForce;\n\nuniform float u_baseLength;\nuniform float u_numNodes;\nuniform float u_iterationMultiplier;\nuniform float u_isTopLevel;\n\nfloat TIMESTEP = 1.0 / 30.0;\nfloat VELOCITYDECAY = 0.6;\n\nvec4 getTextureData(sampler2D texture, float index, float base) {\n float x = mod(index, base);\n float y = (index - x) / base;\n return texture2D(texture, vec2(x + 0.5, y + 0.5) / base);\n}\n\nfloat getLogClusterWeight(float value) {\n return value / max(log(value), 1.0);\n}\n\nvoid main(void) {\n float index = (gl_FragCoord.x - 0.5) + (gl_FragCoord.y - 0.5) * 256.0;\n\n if (index >= u_numNodes) {\n discard;\n }\n\n vec4 clusterData = getTextureData(u_clusterData, index, 256.0);\n\n float clusterIndex = clusterData.x;\n float clusterStartIndex = clusterData.y;\n float clusterSize = clusterData.z;\n\n float finestIndex = getTextureData(u_finestIndexes, index, 256.0).a;\n vec4 myPosition = getTextureData(u_physData, finestIndex, 256.0);\n vec4 previousForce = getTextureData(u_prevForce, clusterIndex, 256.0);\n float fScale = 1.0 + sqrt(u_iterationMultiplier);\n\n vec2 acceleration = previousForce.xy;\n\n // Repulsion & Collision Detection\n for (float i = 0.0; i < 256.0 * 256.0; i++) {\n if (i >= clusterStartIndex + clusterSize || i >= u_numNodes) {\n break;\n }\n if (i < clusterStartIndex || i == index) {\n continue;\n }\n\n vec4 otherClusterData = getTextureData(u_clusterData, i, 256.0);\n float otherClusterWeight = getLogClusterWeight(otherClusterData.w);\n\n float otherFinestIndex = getTextureData(u_finestIndexes, i, 256.0).a;\n vec4 otherPosition = getTextureData(u_physData, otherFinestIndex, 256.0);\n\n vec2 delta = myPosition.xy - otherPosition.xy;\n float dist = max(length(delta), 0.0000001);\n float maxDist = 25.0;\n float repulsionForceScale = 0.1;\n\n float F = ((u_baseLength * u_baseLength) * (fScale / 1.5)) / dist;\n\n if (u_isTopLevel == 1.0) {\n repulsionForceScale = 0.3;\n }\n\n acceleration += ((delta / dist) * F) * repulsionForceScale * otherClusterWeight;\n\n if (dist < maxDist) {\n float collide = (maxDist - dist) / dist;\n acceleration += delta * collide * fScale * maxDist / (maxDist + 1.0);\n }\n }\n\n gl_FragColor = vec4(acceleration, vec2(finestIndex, 0));\n}";this.apprxRepForceShader=new Pi(e,Ni,f),this.apprxRepForceShader.use(),this.apprxRepForceShader.setUniform("u_projection",this.physSmallProjection)}},{key:"setupPinData",value:function(){var t=this.gl;this.pinTexture=t.createTexture(),this.pinData=new Uint8Array(65536);for(var e=0;e<65536;e++)this.pinData[e]=0;t.bindTexture(t.TEXTURE_2D,this.pinTexture),t.texImage2D(t.TEXTURE_2D,0,t.ALPHA,yr,yr,0,t.ALPHA,t.UNSIGNED_BYTE,this.pinData),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE)}},{key:"setupUpdates",value:function(){var t=this.gl;this.updateData=new Float32Array(65536),this.updateTexture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.updateTexture),t.texImage2D(t.TEXTURE_2D,0,t.ALPHA,yr,yr,0,t.ALPHA,t.FLOAT,this.updateData),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),this.updateShader=new Pi(t,Ni,"precision mediump float;\n\nuniform sampler2D u_physData;\nuniform sampler2D u_updateData;\nuniform float u_numNodesNew;\n\nconst float INDEX_FLAG = 999999.0;\n\nvec4 getTextureData(sampler2D texture, float index, float base) {\n float x = mod(index, base);\n float y = (index - x) / base;\n return texture2D(texture, vec2(x + 0.5, y + 0.5) / base);\n}\n\nvoid main(void) {\n float textureSide = 256.0; //#TEXTURE_SIDE#;\n float index = (gl_FragCoord.x - 0.5) + (gl_FragCoord.y - 0.5)*textureSide;\n\n if (index >= u_numNodesNew) {\n discard;\n }\n\n float firstValue = getTextureData(u_updateData, index * 2.0, 256.0).a;\n float secondValue = getTextureData(u_updateData, index * 2.0 + 1.0, 256.0).a;\n\n if (secondValue == INDEX_FLAG) {\n vec4 myPosition = getTextureData(u_physData, firstValue, 256.0);\n gl_FragColor = myPosition;\n } else {\n gl_FragColor = vec4(firstValue, secondValue, 0.0, 0.0);\n }\n}\n"),this.updateShader.use(),this.updateShader.setUniform("u_projection",this.physProjection)}},{key:"setupReadpixelWorkaround",value:function(){var t=this.gl;this.workaroundShader=new Pi(t,Ni,"precision lowp float;\n\nuniform sampler2D u_physData;\nuniform float u_index;\n\nfloat shift_right (float v, float amt) { \n v = floor(v) + 0.5; \n return floor(v / exp2(amt)); \n}\n\nfloat shift_left (float v, float amt) { \n return floor(v * exp2(amt) + 0.5); \n}\n\nfloat mask_last (float v, float bits) { \n return mod(v, shift_left(1.0, bits)); \n}\n\nfloat extract_bits (float num, float from, float to) { \n from = floor(from + 0.5); to = floor(to + 0.5); \n return mask_last(shift_right(num, from), to - from); \n}\n\n// From https://stackoverflow.com/questions/17981163/webgl-read-pixels-from-floating-point-render-target\nvec4 encode_float (float val) { \n if (val == 0.0) return vec4(0, 0, 0, 0); \n float sign = val > 0.0 ? 0.0 : 1.0; \n val = abs(val); \n float exponent = floor(log2(val)); \n float biased_exponent = exponent + 127.0; \n float fraction = ((val / exp2(exponent)) - 1.0) * 8388608.0; \n float t = biased_exponent / 2.0; \n float last_bit_of_biased_exponent = fract(t) * 2.0; \n float remaining_bits_of_biased_exponent = floor(t); \n float byte4 = extract_bits(fraction, 0.0, 8.0) / 255.0; \n float byte3 = extract_bits(fraction, 8.0, 16.0) / 255.0; \n float byte2 = (last_bit_of_biased_exponent * 128.0 + extract_bits(fraction, 16.0, 23.0)) / 255.0; \n float byte1 = (sign * 128.0 + remaining_bits_of_biased_exponent) / 255.0; \n return vec4(byte4, byte3, byte2, byte1); \n}\n\nvoid main(void) {\n vec4 texData = texture2D(u_physData, gl_FragCoord.xy / 255.0);\n float data;\n if (u_index == 0.0) {\n data = texData.x;\n } else if (u_index == 1.0) {\n data = texData.y;\n } else if (u_index == 2.0) {\n data = texData.z;\n } else if (u_index == 3.0) {\n data = texData.w;\n }\n\n gl_FragColor = encode_float(data);\n}\n"),this.workaroundShader.use(),this.workaroundShader.setUniform("u_projection",this.physProjection),this.workaroundData=[];for(var e=0;e<4;e++){var n=new Uint8Array(262144),r=this.newTexture(t,null,yr,t.UNSIGNED_BYTE),i=this.newFramebuffer(t,r);this.workaroundData.push({dataByte:n,dataFloat:new Float32Array(n.buffer),texture:r,frameBuffer:i})}}},{key:"doReadpixelWorkaround",value:function(){for(var t=this.gl,e=0;e<4;e++){var n=this.workaroundData[e];t.bindFramebuffer(t.FRAMEBUFFER,n.frameBuffer),t.viewport(0,0,yr,yr),this.workaroundShader.use(),this.workaroundShader.setUniform("u_index",e),this.workaroundShader.setUniform("u_physData",this.getPhysData(0).texture),t.bindBuffer(t.ARRAY_BUFFER,this.physVbo),this.workaroundShader.setAttributePointer("a_position",2,0,2),t.drawArrays(t.TRIANGLE_STRIP,0,4),t.readPixels(0,0,yr,yr,t.RGBA,t.UNSIGNED_BYTE,n.dataByte)}}},{key:"definePhysicsArrays",value:function(){this.physData=[],this.levelsData=[],this.levelsClusterTexture=[],this.levelsFinestIndexTexture=[]}}],n&&Hi(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function to(t){return to="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},to(t)}function eo(t){return function(t){if(Array.isArray(t))return no(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return no(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?no(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function no(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function ro(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,oo(r.key),r)}}function io(t,e,n){return(e=oo(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function oo(t){var e=function(t,e){if("object"!=to(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=to(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==to(e)?e:String(e)}var ao="ForceCytoLayout",so="forceDirected",uo="coseBilkent",lo=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),io(this,"physLayout",void 0),io(this,"coseBilkentLayout",void 0),io(this,"state",void 0),io(this,"currentLayoutType",void 0),io(this,"enableCytoscape",void 0),io(this,"currentLayout",void 0);var r=e.state,i=e.enableCytoscape;this.enableCytoscape=null==i||i,this.physLayout=new Qi(e),this.coseBilkentLayout=new gi({state:r,cytoCompleteCallback:function(){for(n.physLayout.update(!0),n.copyLayoutPositions(n.state.nodes.items,n.coseBilkentLayout,n.physLayout);n.physLayout.update(!1););n.copyLayoutPositions(n.state.nodes.items,n.physLayout,n.coseBilkentLayout)},animationCompleteCallback:function(){n.currentLayoutType===uo&&setTimeout((function(){return n.setLayout(so)}),50)}}),this.currentLayout=this.physLayout,this.currentLayoutType=so;var o=r.nodes,a=r.rels;o.addChannel(ao),a.addChannel(ao),this.state=r}var e,n;return e=t,n=[{key:"setOptions",value:function(t){void 0!==t&&(this.currentLayout.setOptions(t),this.enableCytoscape=t.enableCytoscape)}},{key:"getLayout",value:function(t){return t===uo?this.coseBilkentLayout:this.physLayout}},{key:"setLayout",value:function(t){if(t!==this.currentLayoutType){Vr.info("Switching to layout: ".concat(t," in ForceCyto"));var e=this.getLayout(t);this.currentLayout=e,this.currentLayoutType=t}}},{key:"copyLayoutPositions",value:function(t,e,n){var r=e.getNodePositions(t);n.updateNodes(r)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.state,n=e.nodes,r=e.rels,i=n.channels[ao],o=r.channels[ao],a=Object.values(i.adds).length,s=Object.values(o.adds).length,u=Object.values(i.adds).map((function(t){return t.id})),l=Object.values(o.adds).map((function(t){return t.id})),c=new Set(Object.keys(i.adds)),f=new Set(Object.keys(o.adds));if(n.clearChannel(ao),r.clearChannel(ao),this.currentLayoutType===so&&this.enableCytoscape&&n.items.length<=100&&a<100&&a>0&&s>0){var h=n.items.map((function(t){return t.id})),d=new Set([].concat(eo(h),eo(u))),p=r.items.map((function(t){return t.id})),v=new Set([].concat(eo(p),eo(l)));if(d.size<=100&&v.size<=300){var y=function(t,e,n,r){var i,o=new Set(t),a=Sr(new Set(e));try{for(a.s();!(i=a.n()).done;){var s=i.value,u=r.idToItem[s];if(u){var l=u.from,c=u.to;o.add(l),o.add(c)}}}catch(t){a.e(t)}finally{a.f()}var f,h=function(t){var e,n={},r={},i=Sr(t);try{for(i.s();!(e=i.n()).done;){for(var o=e.value,a=o.from,s=o.to,u="".concat(a,"-").concat(s),l="".concat(s,"-").concat(a),c=0,f=[u,l];c<f.length;c++){var h=f[c];void 0!==r[h]?r[h].push(o):r[h]=[o]}n[a]||(n[a]=new Set),n[s]||(n[s]=new Set),n[a].add(s),n[s].add(a)}}catch(t){i.e(t)}finally{i.f()}return{adjNodesMap:n,relMap:r}}(r.items),d=h.adjNodesMap,p=h.relMap,v={},y={},m=function(t){var e=[];for(v[t]||e.push(t);e.length>0;){var r=e.shift();if(v[r]=n.idToItem[r],void 0!==d[r]){var i,o=Sr(d[r]);try{for(o.s();!(i=o.n()).done;){var a=i.value;if(!v[a]){e.push(a);var s=p["".concat(r,"-").concat(a)];if(s){var u,l=Sr(s);try{for(l.s();!(u=l.n()).done;){var c=u.value;y[c.id]||(y[c.id]=c)}}catch(t){l.e(t)}finally{l.f()}}}}}catch(t){o.e(t)}finally{o.f()}}}},g=Sr(o);try{for(g.s();!(f=g.n()).done;)m(f.value)}catch(t){g.e(t)}finally{g.f()}return{connectedNodes:v,connectedRels:y}}(c,f,n,r),m=y.connectedNodes,g=y.connectedRels,b=Object.values(m),w=Object.values(g),x=b.length,_=w.length;x===c.size&&_===f.size&&(f.size>0||c.size>0)?(this.setLayout(uo),this.coseBilkentLayout.update(!0,n.items,r.items)):_>0&&f.size/_>.25&&(this.setLayout(uo),this.coseBilkentLayout.update(!0,b,w))}}this.physLayout.update(t),this.coseBilkentLayout.update(t)}},{key:"getShouldUpdate",value:function(){return this.currentLayout.getShouldUpdate()}},{key:"getComputing",value:function(){return this.currentLayout.getComputing()}},{key:"updateNodes",value:function(t){this.setLayout(so),this.physLayout.updateNodes(t)}},{key:"getNodePositions",value:function(t){return this.currentLayout.getNodePositions(t)}},{key:"terminateUpdate",value:function(){this.physLayout.terminateUpdate(),this.coseBilkentLayout.terminateUpdate()}},{key:"destroy",value:function(){this.physLayout.destroy(),this.coseBilkentLayout.destroy()}}],n&&ro(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function co(t){return co="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},co(t)}function fo(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ho(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?fo(Object(n),!0).forEach((function(e){mo(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):fo(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function po(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return vo(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vo(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function vo(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function yo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,go(r.key),r)}}function mo(t,e,n){return(e=go(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function go(t){var e=function(t,e){if("object"!=co(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=co(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==co(e)?e:String(e)}var bo="FreeLayout",wo=function(){function e(t){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),mo(this,"state",void 0),mo(this,"positions",void 0),mo(this,"shouldUpdate",void 0),mo(this,"stateDisposers",void 0);var r=t.state;this.state=r,this.positions={},this.stateDisposers=[],this.stateDisposers.push(this.state.reaction((function(){return n.state.graphUpdates}),(function(){void 0!==n.state.nodes.version&&(n.shouldUpdate=!0),void 0!==n.state.rels.version&&(n.shouldUpdate=!0)})));var i=this.state,o=i.nodes,a=i.rels;o.addChannel(bo),a.addChannel(bo),this.shouldUpdate=!0,this.setOptions(),this.layout(o.items,o.idToItem,o.idToPosition)}var n,r;return n=e,r=[{key:"setOptions",value:function(){}},{key:"updateNodes",value:function(t){var e,n=po(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;void 0!==r.x&&void 0!==r.y&&(this.positions[r.id]={x:r.x,y:r.y}),this.shouldUpdate=!0}}catch(t){n.e(t)}finally{n.f()}}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.shouldUpdate||t){var e=this.state,n=e.nodes,r=e.rels,i=Object.values(n.channels[bo].adds).length>0,o=Object.values(r.channels[bo].adds).length>0,a=Object.values(n.channels[bo].removes).length>0,s=Object.values(r.channels[bo].removes).length>0;(i||o||a||s)&&this.layout(n.items,n.idToItem,n.idToPosition),n.clearChannel(bo),r.clearChannel(bo)}this.shouldUpdate=!1}},{key:"layout",value:function(e,n,r){var i,o=void 0!==(i=e)?bn(i):i;if(!(0,t.isEmpty)(o)){for(var a={},s=0;s<o.length;++s){var u,l=o[s].id,c=null!==(u=r[l])&&void 0!==u?u:{},f=c.x,h=void 0===f?0:f,d=c.y,p=void 0===d?0:d;a[l]={id:l,x:h,y:p}}this.positions=a,this.shouldUpdate=!1}}},{key:"setNodePositions",value:function(t){this.positions=t}},{key:"getNodePositions",value:function(t){var e,n=[],r=po(t);try{for(r.s();!(e=r.n()).done;){var i=e.value,o=this.positions[i.id],a=ho({id:i.id},o);n.push(a)}}catch(t){r.e(t)}finally{r.f()}return n}},{key:"getShouldUpdate",value:function(){return this.shouldUpdate}},{key:"getComputing",value:function(){return!1}},{key:"terminateUpdate",value:function(){}},{key:"destroy",value:function(){this.state.nodes.removeChannel(bo),this.state.rels.removeChannel(bo)}}],r&&yo(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),e}();function xo(t){return xo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xo(t)}function _o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function So(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?_o(Object(n),!0).forEach((function(e){var r,i,o;r=t,i=e,o=n[e],(i=Eo(i))in r?Object.defineProperty(r,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function To(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Ao(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ao(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Ao(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Oo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Eo(r.key),r)}}function Eo(t){var e=function(t,e){if("object"!=xo(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=xo(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==xo(e)?e:String(e)}var Po="GridLayout",ko=function(){function e(t){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=t.state;this.state=r,this.positions={},this.stateDisposers=[],this.stateDisposers.push(this.state.reaction((function(){return n.state.graphUpdates}),(function(){void 0!==n.state.nodes.version&&(n.shouldUpdate=!0),void 0!==n.state.rels.version&&(n.shouldUpdate=!0)})));var i=this.state,o=i.nodes,a=i.rels;o.addChannel(Po),a.addChannel(Po),this.shouldUpdate=!0,this.setOptions(t),this.layout(o.items,o.idToItem,o.idToPosition,a.items)}var n,r;return n=e,r=[{key:"setOptions",value:function(t){}},{key:"updateNodes",value:function(t){var e,n=To(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;void 0!==r.x&&void 0!==r.y&&(this.positions[r.id]={x:r.x,y:r.y}),this.shouldUpdate=!0}}catch(t){n.e(t)}finally{n.f()}}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.shouldUpdate||t){var e=this.state,n=e.nodes,r=e.rels,i=Object.values(n.channels[Po].adds).length>0,o=Object.values(r.channels[Po].adds).length>0,a=Object.values(n.channels[Po].removes).length>0,s=Object.values(r.channels[Po].removes).length>0;(i||o||a||s)&&(this.layout(n.items,n.idToItem,n.idToPosition,r.items),n.idToPosition=this.positions),n.clearChannel(Po),r.clearChannel(Po)}this.shouldUpdate=!1}},{key:"layout",value:function(e,n,r,i){var o;if(e=(o=e)?bn(o):o,!(0,t.isEmpty)(e)){for(var a=e.length,s=Math.ceil(Math.sqrt(a)),u=new Array(a),l=0,c=0;c<s;++c){for(var f=0;f<s&&(u[l]={y:0+150*c,x:0+150*f},++l!==a);++f);if(l===a)break}for(var h=e.sort(),d={},p=0;p<a;++p){var v=h[p],y=u[p];v.x===y.x&&v.y===y.y||(d[v.id]=So({id:v.id},y))}this.positions=d,this.shouldUpdate=!1}}},{key:"getNodePositions",value:function(t){var e,n=[],r=To(t);try{for(r.s();!(e=r.n()).done;){var i=e.value,o=this.positions[i.id],a=So({id:i.id},o);n.push(a)}}catch(t){r.e(t)}finally{r.f()}return n}},{key:"getShouldUpdate",value:function(){return this.shouldUpdate}},{key:"getComputing",value:function(){return!1}},{key:"terminateUpdate",value:function(){this.shouldUpdate=!1}},{key:"destroy",value:function(){this.state.nodes.removeChannel(Po),this.state.rels.removeChannel(Po)}}],r&&Oo(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),e}(),jo=i(269),Co=i.n(jo);function Do(t){return Do="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Do(t)}function Ro(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Io(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ro(Object(n),!0).forEach((function(e){var r,i,o;r=t,i=e,o=n[e],i=function(t){var e=function(t,e){if("object"!=Do(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=Do(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Do(e)?e:String(e)}(i),i in r?Object.defineProperty(r,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ro(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var Lo=function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n={minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0},r=0;r<t.length;r++)n.minX>t[r].x&&(n.minX=t[r].x),n.minY>t[r].y&&(n.minY=t[r].y),n.maxX<t[r].x&&(n.maxX=t[r].x),n.maxY<t[r].y&&(n.maxY=t[r].y);var i=(n.minX+n.maxX)/2,o=(n.minY+n.maxY)/2,a=2*e,s=xr()*a;return{centerX:i,centerY:o,nodesWidth:n.maxX-n.minX+a+s,nodesHeight:n.maxY-n.minY+a+s}},Mo=function(t,e,n,r){var i=1/0,o=1/0;return t>1&&(i=n/t),e>1&&(o=r/e),{zoomX:i,zoomY:o}},No=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1/0,i=Math.min(t,e);return Math.min(r,Math.max(n,i))},Fo=function(t,e,n,r){return Math.max(Math.min(e,n),Math.min(t,r))},Uo=function(t,e,n,r,i,o){var a=e;return function(t,e,n){return t<e&&t<n}(i,o,e)&&t.length>1?(a=function(t,e,n){var r=function(t){var e=new Array(4).fill(t[0]);return t.forEach((function(t){e[0]=t.x<e[0].x?e[0]:Io({},t),e[1]=t.y<e[1].y?e[1]:Io({},t),e[2]=t.x<e[2].x?Io({},t):e[2],e[3]=t.y<e[3].y?Io({},t):e[3]})),e}(t),i=function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=0,n=0,r=0;r<t.length;r++)for(var i=r+1;i<t.length;i++)e=Math.hypot(Math.abs(t[r].x-t[i].x),Math.abs(t[r].y-t[i].y)),n=Math.max(n,e);return n}(r),o=2*n,a=xr()*o,s=e.height<=e.width?e.height-o-a:e.width-o-a;return i>s?.9*s/i:.9*i/s}(t,r,25),Fo(i,o,Math.min(e,a),n)):Fo(i,o,e,n)};function zo(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Bo(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Bo(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Bo(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Vo(t){this.channels[t]={adds:{},updates:{},removes:{}}}function Go(t){delete this.channels[t]}function Wo(t){this.channels[t].adds={},this.channels[t].updates={},this.channels[t].removes={}}var Xo=function(t){return"html"in t?t.html:"captionHtml"in t?t.captionHtml:void 0};function Ho(e,n){var r,i=!1,o=zo(e);try{for(o.s();!(r=o.n()).done;){var a=r.value,s=a.id;if(void 0===this.idToItem[s]){if(a=(0,t.cloneDeep)(a),this.items.push(a),this.idToItem[s]=a,this.idToPosition[s]={id:s,x:0,y:0},"x"in a&&"y"in a){var u=a,l=u.x,c=u.y;isNaN(l)||isNaN(c)||(this.idToPosition[s].x=l,this.idToPosition[s].y=c)}var f=Xo(a);if(f instanceof HTMLElement){var h=document.createElement("div");Object.assign(h.style,{position:"absolute"}),h.appendChild(f),this.idToHtmlOverlay[s]=h}for(var d=Object.values(this.channels),p=0,v=d;p<v.length;p++){var y=v[p];void 0===y.removes[s]?y.adds[s]=a:(delete y.removes[s],y.updates[s]=a)}i=!0}}}catch(t){o.e(t)}finally{o.f()}i&&(this.version+=1,void 0!==n&&(n.added=!0))}function Yo(t,e){var n,r=!1,i=zo(t);try{for(i.s();!(n=i.n()).done;){var o=n.value,a=o.id,s=this.idToItem[a];if(void 0!==s){Object.assign(s,o);var u=Xo(o);if(u instanceof HTMLElement){var l;null===(l=this.idToHtmlOverlay[a])||void 0===l||l.remove(),delete this.idToHtmlOverlay[a];var c=document.createElement("div");Object.assign(c.style,{position:"absolute"}),c.appendChild(u),this.idToHtmlOverlay[a]=c}for(var f=Object.values(this.channels),h=0,d=f;h<d.length;h++){var p=d[h];if(void 0===p.adds[a]){var v=p.updates[a];void 0===v&&(v={id:a},p.updates[a]=v),Object.assign(v,o)}}void 0!==e&&(e.updated=!0)}r=!0}}catch(t){i.e(t)}finally{i.f()}r&&(this.version+=1)}function $o(t,e){var n,r=!1,i=zo(t);try{for(i.s();!(n=i.n()).done;){var o=n.value,a=this.idToItem[o];if(void 0!==a){var s;r=!0,delete this.idToItem[a.id],delete this.idToPosition[a.id],null===(s=this.idToHtmlOverlay[a.id])||void 0===s||s.remove(),delete this.idToHtmlOverlay[a.id],this.items.splice(this.items.indexOf(a),1);for(var u=Object.values(this.channels),l=0,c=u;l<c.length;l++){var f=c[l];void 0!==f.adds[o]?delete f.adds[o]:(delete f.updates[o],f.removes[o]=a)}}}}catch(t){i.e(t)}finally{i.f()}r&&(void 0!==e&&(e.removed=!0),this.version+=1)}function qo(t){var e,n=zo(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(void 0!==this.idToPosition[r.id]){var i=this.idToPosition[r.id];Object.assign(i,r)}else this.idToPosition[r.id]={id:r.id,x:r.x,y:r.y,pinned:r.pinned}}}catch(t){n.e(t)}finally{n.f()}}function Zo(t){for(var e in this.idToHtmlOverlay){var n=this.idToHtmlOverlay[e];t.appendChild(n)}}var Ko=function(){return{idToItem:Bt.shallow({}),items:Bt.shallow([]),channels:Bt.shallow({}),idToPosition:Bt.shallow({}),idToHtmlOverlay:Bt.shallow({}),version:0,addChannel:it(Vo),removeChannel:it(Go),clearChannel:it(Wo),add:it(Ho),update:it(Yo),remove:it($o),updatePositions:it(qo),updateHtmlOverlay:it(Zo)}};function Jo(t){return Jo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jo(t)}function Qo(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ta(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Qo(Object(n),!0).forEach((function(e){var r,i,o;r=t,i=e,o=n[e],i=function(t){var e=function(t,e){if("object"!=Jo(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=Jo(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Jo(e)?e:String(e)}(i),i in r?Object.defineProperty(r,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Qo(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var ea="#bbb",na="#fff",ra="#45bff8",ia={selected:{rings:[{widthFactor:.05,color:na},{widthFactor:.1,color:ra}],shadow:{width:10,opacity:1,color:ea}},default:{rings:[]}},oa={selected:{rings:[{color:na,width:2},{color:ra,width:4}],shadow:{width:18,opacity:1,color:ea}},default:{rings:[]}},aa=.75,sa=new Set(["direction","packing"]),ua="forceDirected",la="hierarchical",ca="grid",fa="free",ha="d3Force",da="webgl",pa="canvas";function va(t){return va="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},va(t)}function ya(t,e,n){return e=function(t){var e=function(t,e){if("object"!=va(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=va(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==va(e)?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ma="down",ga=ya(ya(ya(ya({},"up","BT"),ma,"TB"),"left","RL"),"right","LR"),ba="bin",wa=[ba,"stack"],xa=["html"],_a=["html"],Sa=["captionHtml"];function Ta(t){return Ta="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ta(t)}function Aa(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function Oa(){Oa=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var o=e&&e.prototype instanceof m?e:m,a=Object.create(o.prototype),s=new j(r||[]);return i(a,"_invoke",{value:O(t,n,s)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=c;var h="suspendedStart",d="suspendedYield",p="executing",v="completed",y={};function m(){}function g(){}function b(){}var w={};l(w,a,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(C([])));_&&_!==n&&r.call(_,a)&&(w=_);var S=b.prototype=m.prototype=Object.create(w);function T(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function n(i,o,a,s){var u=f(t[i],t,o);if("throw"!==u.type){var l=u.arg,c=l.value;return c&&"object"==Ta(c)&&r.call(c,"__await")?e.resolve(c.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(c).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function O(e,n,r){var i=h;return function(o,a){if(i===p)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=E(s,r);if(u){if(u===y)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var l=f(e,n,r);if("normal"===l.type){if(i=r.done?v:d,l.arg===y)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=v,r.method="throw",r.arg=l.arg)}}}function E(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,E(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var o=f(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,y):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function C(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(Ta(e)+" is not iterable")}return g.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=l(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},T(A.prototype),l(A.prototype,s,(function(){return this})),e.AsyncIterator=A,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new A(c(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},T(S),l(S,u,"Generator"),l(S,a,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=C,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(k),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),k(n),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:C(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),y}},e}function Ea(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function Pa(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ma(r.key),r)}}function ka(t,e,n){return e=Ra(e),function(t,e){if(e&&("object"===Ta(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Ca(t)}(t,ja()?Reflect.construct(e,n||[],Ra(t).constructor):e.apply(t,n))}function ja(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ja=function(){return!!t})()}function Ca(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Da(){return Da="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ra(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},Da.apply(this,arguments)}function Ra(t){return Ra=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ra(t)}function Ia(t,e){return Ia=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ia(t,e)}function La(t,e,n){return(e=Ma(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ma(t){var e=function(t,e){if("object"!=Ta(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=Ta(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ta(e)?e:String(e)}var Na="HierarchicalLayout",Fa=function(t){return void 0!==t?bn(t):t},Ua=function(t){function e(t){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),La(Ca(n=ka(this,e,[t])),"direction",void 0),La(Ca(n),"packing",void 0),La(Ca(n),"stateDisposers",void 0),La(Ca(n),"oldComputing",void 0),La(Ca(n),"computing",void 0),La(Ca(n),"pendingLayoutData",void 0),La(Ca(n),"worker",void 0),La(Ca(n),"directionChanged",void 0),La(Ca(n),"packingChanged",void 0),n.direction=ma,n.packing=ba;var r=n.state,i=r.nodes,o=r.rels;return i.addChannel(Na),o.addChannel(Na),n.stateDisposers=[n.state.reaction((function(){return n.state.graphUpdates}),(function(){if(void 0!==i.version){var t=i.channels[Na],e=Object.values(t.adds).length>0,r=Object.values(t.removes).length>0,a=Object.values(t.updates),s=Or(a);n.shouldUpdate=n.shouldUpdate||e||r||s}if(void 0!==o.version){var u=o.channels[Na],l=Object.values(u.adds).length>0,c=Object.values(u.removes).length>0;n.shouldUpdate=n.shouldUpdate||l||c}}))],n.shouldUpdate=!0,n.oldComputing=!1,n.computing=!1,n.setOptions(t),n.setupWorker().then((function(t){n.worker=t,n.worker.port.start(),n.pendingLayoutData=null,n.layout(i.items,i.idToItem,i.idToPosition,o.items)})),n}var n,r,o,a;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ia(t,e)}(e,t),n=e,r=[{key:"setupWorker",value:(o=Oa().mark((function t(){var e,n,r,o,a;return Oa().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Promise.resolve().then(i.bind(i,716));case 3:n=t.sent,r=n.createHierarchicalLayoutWorker,e=r(),t.next=16;break;case 8:return t.prev=8,t.t0=t.catch(0),Vr.info("Failed to initialise shared worker: ",t.t0," Falling back to syncronous code."),t.next=13,Promise.resolve().then(i.bind(i,716));case 13:o=t.sent,a=o.hierarchicalLayoutFallbackWorker,e=a;case 16:return t.abrupt("return",new Promise((function(t,n){e||n("Hierarchical layout code could not be initialised"),t(e)})));case 17:case"end":return t.stop()}}),t,null,[[0,8]])})),a=function(){var t=this,e=arguments;return new Promise((function(n,r){var i=o.apply(t,e);function a(t){Ea(i,n,r,a,s,"next",t)}function s(t){Ea(i,n,r,a,s,"throw",t)}a(void 0)}))},function(){return a.apply(this,arguments)})},{key:"setOptions",value:function(t){if(void 0!==t&&function(t){return Object.keys(t).every((function(t){return sa.has(t)}))}(t)){var e=t.direction,n=void 0===e?ma:e,r=t.packing,i=void 0===r?ba:r;Object.keys(ga).includes(n)&&(this.directionChanged=this.direction&&this.direction!==n,this.direction=n),wa.includes(i)&&(this.packingChanged=this.packing&&this.packing!==i,this.packing=i),this.shouldUpdate=this.directionChanged||this.packingChanged}}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.shouldUpdate||t){var n=this.state,r=n.nodes,i=n.rels,o=this.directionChanged,a=this.packingChanged,s=Object.values(r.channels[Na].adds).length>0,u=Object.values(i.channels[Na].adds).length>0,l=Object.values(r.channels[Na].removes).length>0,c=Object.values(i.channels[Na].removes).length>0,f=Object.values(r.channels[Na].updates),h=Or(f);(t||s||u||l||c||o||a||h)&&this.layout(r.items,r.idToItem,r.idToPosition,i.items),r.clearChannel(Na),i.clearChannel(Na),this.directionChanged=!1,this.packingChanged=!1}Da(Ra(e.prototype),"update",this).call(this),this.shouldUpdate=!1,this.oldComputing=this.computing}},{key:"getShouldUpdate",value:function(){return this.shouldUpdate||this.shouldUpdateAnimator}},{key:"getComputing",value:function(){return this.computing}},{key:"layout",value:function(t,e,n,r){var i=this;if(this.worker){var o=Fa(t).map((function(t){return t.html,Aa(t,xa)})),a=Fa(e),s={};Object.keys(a).forEach((function(t){var e=a[t],n=(e.html,Aa(e,_a));s[t]=n}));var u=Fa(r).map((function(t){return t.captionHtml,Aa(t,Sa)})),l=Fa(n),c=this.direction,f=this.packing,h=window.devicePixelRatio,d={nodes:o,nodeIds:s,idToPosition:l,rels:u,direction:c,packing:f,pixelRatio:h,forcedDelay:0};this.computing?this.pendingLayoutData=d:(this.worker.port.onmessage=function(t){var e=t.data,n=e.positions,r=e.parents,o=e.waypoints;i.computing&&(i.positions=n),i.parents=r,i.state.setWaypoints(o),null!==i.pendingLayoutData?(i.worker.port.postMessage(i.pendingLayoutData),i.pendingLayoutData=null):i.computing=!1,i.shouldUpdate=!0,i.startAnimation()},this.computing=!0,this.worker.port.postMessage(d))}else Vr.info("Hierarchical layout code not yet initialised.")}},{key:"terminateUpdate",value:function(){var t,e;this.computing=!1,this.shouldUpdate=!1,null===(t=this.state.nodes)||void 0===t||t.clearChannel(Na),null===(e=this.state.rels)||void 0===e||e.clearChannel(Na)}},{key:"destroy",value:function(){var t;this.stateDisposers.forEach((function(t){t()})),this.state.nodes.removeChannel(Na),this.state.rels.removeChannel(Na),null===(t=this.worker)||void 0===t||t.port.close()}}],r&&Pa(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),e}(Jr);function za(t){return za="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},za(t)}function Ba(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ga(r.key),r)}}function Va(t,e,n){return(e=Ga(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ga(t){var e=function(t,e){if("object"!=za(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=za(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==za(e)?e:String(e)}var Wa=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Va(this,"elementId",void 0),Va(this,"currentValue",void 0),Va(this,"startValue",void 0),Va(this,"currentTime",void 0),Va(this,"duration",void 0),Va(this,"status",void 0),Va(this,"endValue",void 0),Va(this,"startTime",void 0),Va(this,"endTime",void 0),Va(this,"hasNextAnimation",void 0),this.elementId=e,this.startValue=n,this.status=0,this.currentValue=n,this.duration=0}var e,n;return e=t,(n=[{key:"setDuration",value:function(t){this.duration=t,this.setEndTime(this.startTime+this.duration)}},{key:"getStatus",value:function(){return this.status}},{key:"advance",value:function(){if(1!==this.status)return!1;this.currentTime=(new Date).getTime();var t,e=this.endTime-this.startTime;return(t=e>0?(this.currentTime-this.startTime)/e:1)>=1?(this.currentValue=this.endValue,this.status=2):(this.currentValue=this.startValue+t*(this.endValue-this.startValue),this.hasNextAnimation=!0),this.hasNextAnimation}},{key:"setEndValue",value:function(t){this.endValue!==t&&(t-this.currentValue!=0?(this.currentTime=(new Date).getTime(),this.status=1,this.startValue=this.currentValue,this.endValue=t,this.startTime=this.currentTime,this.setEndTime(this.startTime+this.duration)):this.endValue=t)}},{key:"setEndTime",value:function(t){this.endTime=Math.max(t,this.startTime)}}])&&Ba(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Xa(t){return Xa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xa(t)}function Ha(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ya(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ha(Object(n),!0).forEach((function(e){qa(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ha(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function $a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Za(r.key),r)}}function qa(t,e,n){return(e=Za(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Za(t){var e=function(t,e){if("object"!=Xa(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=Xa(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Xa(e)?e:String(e)}var Ka=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),qa(this,"animations",void 0),qa(this,"durations",void 0),qa(this,"defaultDuration",void 0),qa(this,"hasNextAnimation",void 0),qa(this,"ignoreAnimationsFlag",void 0),this.animations=new Map,this.durations=[],this.durations[0]=0,this.durations[1]=0,this.defaultDuration=150,this.hasNextAnimation=!1,this.ignoreAnimationsFlag=!1}var e,n;return e=t,n=[{key:"advance",value:function(){var t=this;return this.hasNextAnimation=!1,this.animations.forEach((function(e){Object.values(e).forEach((function(e){e.advance()&&(t.hasNextAnimation=!0)}))})),this.hasNextAnimation}},{key:"ignoreAnimations",value:function(t){this.ignoreAnimationsFlag=t}},{key:"setOptions",value:function(t){void 0!==t.fadeDuration&&(this.durations[0]=t.fadeDuration),void 0!==t.sizeDuration&&(this.durations[1]=t.sizeDuration)}},{key:"needsToRun",value:function(){return this.hasNextAnimation}},{key:"getValueForAnimationName",value:function(t,e,n){var r,i,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(this.ignoreAnimationsFlag)return n;var a=null!==(r=this.getById(t))&&void 0!==r?r:{};if(void 0===a[e]){var s=1===o?this.createSizeAnimation(0,t,e):this.createFadeAnimation(0,t,e);s.setEndValue(n),i=s.currentValue}else{var u=a[e];if(u.currentValue===n)return n;u.setEndValue(n),i=u.currentValue}return this.hasNextAnimation=!0,i}},{key:"createAnimation",value:function(t,e,n){var r,i=new Wa(e,t),o=null!==(r=this.animations.get(e))&&void 0!==r?r:{};return this.animations.set(e,Ya(Ya({},o),{},qa({},n,i))),i}},{key:"getById",value:function(t){return this.animations.get(t)}},{key:"createFadeAnimation",value:function(t,e,n){var r,i=this.createAnimation(t,e,n);return i.setDuration(null!==(r=this.durations[0])&&void 0!==r?r:this.defaultDuration),i}},{key:"createSizeAnimation",value:function(t,e,n){var r,i=this.createAnimation(t,e,n);return i.setDuration(null!==(r=this.durations[1])&&void 0!==r?r:this.defaultDuration),i}}],n&&$a(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Ja(t){return Ja="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ja(t)}function Qa(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ts(r.key),r)}}function ts(t){var e=function(t,e){if("object"!=Ja(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=Ja(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ja(e)?e:String(e)}var es=64,ns=function(){function t(){var e,n,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,r=void 0,(n=ts(n="cache"))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,this.cache={}}var e,n;return e=t,n=[{key:"getImage",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.getOrCreateEntry(t),r=e?"inverted":"image",i=n[r];return void 0===i&&(i=this.loadImage(t),n[r]=i),this.drawIfNeeded(i,e),i.canvas}},{key:"getOrCreateEntry",value:function(t){return void 0===this.cache[t]&&(this.cache[t]={}),this.cache[t]}},{key:"invertCanvas",value:function(t){for(var e=t.getImageData(0,0,es,es),n=e.data,r=0;r<4096;r++){var i=4*r;n[i]^=255,n[i+1]^=255,n[i+2]^=255}t.putImageData(e,0,0)}},{key:"loadImage",value:function(t){var e=document.createElement("canvas");e.width=es,e.height=es;var n=new Image;return n.src=t,n.crossOrigin="anonymous",{canvas:e,image:n,drawn:!1}}},{key:"drawIfNeeded",value:function(t,e){var n=t.image,r=t.canvas;if(!t.drawn&&n.complete){var i=r.getContext("2d");try{i.drawImage(n,0,0,es,es)}catch(t){Vr.error("Failed to draw image",n.src,t),i.beginPath(),i.strokeStyle="black",i.rect(0,0,es,es),i.moveTo(0,0),i.lineTo(es,es),i.moveTo(0,es),i.lineTo(es,0),i.stroke(),i.closePath()}e&&this.invertCanvas(i),t.drawn=!0}}}],n&&Qa(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();const rs=ns;function is(t){return is="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},is(t)}function os(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function as(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,us(r.key),r)}}function ss(t,e,n){return(e=us(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function us(t){var e=function(t,e){if("object"!=is(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=is(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==is(e)?e:String(e)}var ls=function(){function e(t,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),ss(this,"key",void 0),ss(this,"rels",void 0),ss(this,"waypointPath",void 0),ss(this,"selfReferring",void 0),ss(this,"fromId",void 0),ss(this,"toId",void 0),ss(this,"angles",void 0),ss(this,"labelInfo",void 0),this.key=t,this.rels=[],this.selfReferring=n===r,this.fromId=n,this.toId=r,this.labelInfo={},this.angles=[]}var n,r;return n=e,r=[{key:"insert",value:function(t){this.rels.push({rel:t})}},{key:"setLabelInfo",value:function(t,e){this.labelInfo[t]=e}},{key:"remove",value:function(t){var e=t.id,n=this.rels,r=n.findIndex((function(t){return t.rel.id===e}));if(-1!==r&&(n.splice(r,1),0===r&&n.length>0)){var i=n[0].rel,o=i.from,a=i.to;this.fromId=o,this.toId=a}}},{key:"size",value:function(){return this.rels.length}},{key:"maxFontSize",value:function(){return Math.max.apply(Math,function(t){if(Array.isArray(t))return os(t)}(e=this.rels.map((function(e){var n=e.rel;return(0,t.isNumber)(n.captionSize)?n.captionSize:1})))||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(e)||function(t,e){if(t){if("string"==typeof t)return os(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?os(t,e):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());var e}},{key:"relIsOppositeDirection",value:function(t){var e=t.from,n=t.to,r=this.fromId,i=this.toId;return e!==r&&n!==i||e===i&&n===r}},{key:"indexOf",value:function(t){var e=t.id;return this.rels.findIndex((function(t){return t.rel.id===e}))}},{key:"getRel",value:function(t){var e=this.rels;return t<0||t>=e.length?null:e[t].rel}},{key:"setWaypoints",value:function(t){this.waypointPath=t}},{key:"setAngles",value:function(t){this.angles=t}}],r&&as(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),e}(),cs="#848484",fs=2*Math.PI/50,hs=.1*Math.PI,ds=br;function ps(t){return ps="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ps(t)}function vs(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return ys(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ys(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function ys(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function ms(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,bs(r.key),r)}}function gs(t,e,n){return(e=bs(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function bs(t){var e=function(t,e){if("object"!=ps(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=ps(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ps(e)?e:String(e)}var ws=function(t){var e=[];if(0===t.length)e.push({size:2*Math.PI,start:0});else{for(var n=t.length-1;n>=0;n--){var r=void 0,i=void 0;0===n?(i=t[t.length-1],r=t[n]-t[t.length-1]+2*Math.PI):(i=t[n-1],r=t[n]-t[n-1]),e.push({size:r,start:i})}e.sort((function(t,e){return e.size-t.size}))}return e},xs=function(t,e){for(;e>t.length||t[0].size>2*t[e-1].size;)t.push({size:t[0].size/2,start:t[0].start}),t.push({size:t[0].size/2,start:t[0].start+t[0].size/2}),t.shift(),t.sort((function(t,e){return e.size-t.size}));return t},_s=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),gs(this,"bundles",void 0),gs(this,"nodeToBundles",void 0),this.bundles={},this.nodeToBundles={};var r=e.reduce((function(t,e){return t[e.id]=e,t}),{});this.updateData(r,{},n)}var e,n;return e=t,n=[{key:"getBundle",value:function(t){var e=this.bundles,n=this.nodeToBundles,r=this.generatePairId(t.from,t.to),i=e[r];return void 0===i&&(i=new ls(r,t.from,t.to),e[r]=i,void 0===n[t.from]&&(n[t.from]=[]),void 0===n[t.to]&&(n[t.to]=[]),n[t.from].push(i),n[t.to].push(i)),i}},{key:"updateData",value:function(t,e,n){for(var r=this.bundles,i=this.nodeToBundles,o=function(t,e){var n=i[e].findIndex((function(e){return e===t}));-1!==n&&i[e].splice(n,1),0===i[e].length&&delete i[e]},a=Object.values(t),s=Object.values(e),u=0,l=a;u<l.length;u++){var c=l[u];this.getBundle(c).insert(c)}for(var f=0,h=s;f<h.length;f++){var d=h[f],p=this.getBundle(d);p.remove(d),0===p.size()&&(delete r[p.key],o(p,d.from),o(p,d.to))}for(var v=0,y=Object.keys(r);v<y.length;v++){var m=r[y[v]];m.setWaypoints(n["".concat(m.fromId,"-").concat(m.toId)])}}},{key:"updatePositions",value:function(t){for(var e=this.nodeToBundles,n=0,r=Object.keys(t);n<r.length;n++){var i,o=r[n],a=null!==(i=e[o])&&void 0!==i?i:[];if(0!==a.length){var s=a.find((function(t){return t.selfReferring})),u=a.filter((function(t){return!t.selfReferring}));if(void 0!==s){var l,c=[],f=vs(u);try{for(f.s();!(l=f.n()).done;){var h=l.value,d=t[h.fromId],p=t[h.toId];if(void 0!==d&&void 0!==p)for(var v=fs*h.size(),y=d.id===o?Math.atan2(p.y-d.y,p.x-d.x):Math.atan2(d.y-p.y,d.x-p.x),m=0;m<h.size();m++)c.push(y+v/2-m*fs);else{var g=void 0===d?h.fromId:h.toId;Vr.warn("Arrowbundler: Node with id ".concat(g," is not in position map"))}}}catch(t){f.e(t)}finally{f.f()}var b=c.map((function(t){return(t+2*Math.PI)%(2*Math.PI)})).sort(),w=ws(b);xs(w,s.size());var x=w.map((function(t){return t.start+t.size/2})).slice(0,s.size());s.setAngles(x)}}}}},{key:"generatePairId",value:function(t,e){return[t.toString(),e.toString()].sort((function(t,e){return t.localeCompare(e)})).join("-")}}],n&&ms(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Ss(t){return Ss="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ss(t)}function Ts(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function As(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Es(r.key),r)}}function Os(t,e,n){return(e=Es(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Es(t){var e=function(t,e){if("object"!=Ss(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=Ss(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ss(e)?e:String(e)}var Ps=function(e,n){return(0,t.isFinite)(e.x)&&(0,t.isFinite)(e.y)&&(0,t.isFinite)(n.x)&&(0,t.isFinite)(n.y)},ks=function(t,e){if(void 0===t||void 0===e||!Ps(t,e))return!1;var n=e.x-t.x,r=e.y-t.y,i=xr();return n*n+r*r<100*i*i},js=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Os(this,"p1",void 0),Os(this,"p2",void 0),Os(this,"unit",void 0),Os(this,"norm",void 0),Os(this,"length",void 0),Os(this,"vector",void 0),this.p1=e,this.p2=n,this.vector=this.getVector(),this.length=this.getLength(),this.unit=this.getUnitVector(),this.norm=this.getUnitNormalVector()}var e,n;return e=t,n=[{key:"getVector",value:function(){return{x:this.p2.x-this.p1.x,y:this.p2.y-this.p1.y}}},{key:"getLength",value:function(){var t=this.vector,e=t.x,n=t.y;return Math.sqrt(e*e+n*n)}},{key:"getUnitVector",value:function(){var t=this.vector,e=this.length;return{x:t.x/e,y:t.y/e}}},{key:"getUnitNormalVector",value:function(){return{x:this.unit.y,y:-this.unit.x}}}],n&&As(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Cs=function(e,n,r){var i={x:n.x-e.x,y:n.y-e.y},o=function(e,n){var r=(e.x*n.x+e.y*n.y)/(n.x*n.x+n.y*n.y);return(0,t.clamp)(r,0,1)}({x:r.x-e.x,y:r.y-e.y},i),a=e.x+o*i.x,s=e.y+o*i.y,u=a-r.x,l=s-r.y;return Math.sqrt(u*u+l*l)},Ds=function(t,e,n,r){if(e.x===n.x&&e.y===n.y)return e;var i=e.y-t.y,o=t.x-e.x,a=i*t.x+o*t.y,s=r.y-n.y,u=n.x-r.x,l=s*n.x+u*n.y,c=i*u-s*o;return 0===c?null:{x:(u*a-o*l)/c,y:(i*l-s*a)/c}},Rs=function(t,e,n,r){var i,o,a,s=1e9,u=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ts(Object(n),!0).forEach((function(e){Os(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ts(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t),l={x:0,y:0};for(o=1;o<10;o++)a=.1*o,l.x=Math.pow(1-a,2)*t.x+2*a*(1-a)*n.x+Math.pow(a,2)*e.x,l.y=Math.pow(1-a,2)*t.y+2*a*(1-a)*n.y+Math.pow(a,2)*e.y,o>0&&(s=(i=Cs(u,l,r))<s?i:s),u.x=l.x,u.y=l.y;return s};function Is(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Ls=[[.04,1],[100,2]],Ms=[[.8,1.1],[3,1.6],[8,2.5]],Ns=[[Ms[0][0],1],[100,1.25]],Fs=function(t,e){if(t.includes("rgba"))return t;if(t.includes("rgb")){var n=t.substr(t.indexOf("(")+1).replace(")","").split(",");return"rgba(".concat(n[0],",").concat(n[1],",").concat(n[2],",").concat(e,")")}var r=Co().get.rgb(t);return null===r?t:"rgba(".concat(r[0],",").concat(r[1],",").concat(r[2],",").concat(e,")")},Us=function(t,e,n,r){var i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a=r.headPosition,s=r.headAngle,u=r.headHeight,l=r.headChinHeight,c=r.headWidth;t.save(),t.lineWidth=e,t.strokeStyle=n,t.fillStyle=n,t.translate(a.x,a.y),t.rotate(s),function(t,e,n,r){if(t.beginPath(),e.length>0){var i=e[0];t.moveTo(i.x,i.y)}for(var o=1;o<e.length;o++){var a=e[o];t.lineTo(a.x,a.y)}t.closePath(),n&&t.fill(),r&&t.stroke()}(t,[{x:l-u,y:0},{x:-u,y:c/2},{x:0,y:0},{x:-u,y:-c/2}],i,o),t.restore()},zs=function(t,e,n,r,i){var o=r;i.forEach((function(r){var i=r.width,a=r.color,s=o+i;t.beginPath(),t.fillStyle=a,t.arc(e,n,s,0,2*Math.PI,!1),t.arc(e,n,o,2*Math.PI,0,!0),t.fill(),t.closePath(),o=s}))},Bs=function(t,e,n,r){t.beginPath(),t.arc(e,n,r,0,2*Math.PI,!1),t.closePath()},Vs=function(t,e,n,r,i){t.beginPath(),t.fillStyle=r,Bs(t,e,n,i),t.fill(),t.closePath()};function Gs(t,e){var n=e.find((function(e){return t<e[0]}));return void 0!==n?n[1]:e[e.length-1][1]}var Ws=function(t,e,n,r,i,o,a,s,u){var l,c=r,f=0,h=0,d=null===(l=t.measureText("..."))||void 0===l?void 0:l.width;e.forEach((function(e){var r;t.font="normal ".concat(i,"px ").concat(o);var l,p=-(null===(r=t.measureText(e.text))||void 0===r?void 0:r.width)/2,v=e.text?function(t){if(Array.isArray(t))return Is(t)}(l=e.text)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(l)||function(t,e){if(t){if("string"==typeof t)return Is(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Is(t,e):void 0}}(l)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}():[];e.hasHyphenChar||e.hasEllipsisChar||v.push(" "),v.forEach((function(r){var a,l,v,y,m,g;null!==(a=n[h])&&void 0!==a&&a.includes("italic")&&null!==(l=n[h])&&void 0!==l&&l.includes("bold")?t.font="italic 600 ".concat(i,"px ").concat(o):null!==(v=n[h])&&void 0!==v&&v.includes("italic")?t.font="italic 400 ".concat(i,"px ").concat(o):null!==(y=n[h])&&void 0!==y&&y.includes("bold")?t.font="bold ".concat(i,"px ").concat(o):t.font="normal ".concat(i,"px ").concat(o),null!==(m=n[h])&&void 0!==m&&m.includes("underline")&&t.fillRect(s+p+f,u+c+.2,null===(g=t.measureText(r))||void 0===g?void 0:g.width,.2),e.hasEllipsisChar?t.fillText(r,s+p+f-d/2,u+c):t.fillText(r,s+p+f,u+c),f+=t.measureText(r).width,h+=1})),t.font="normal ".concat(i,"px ").concat(o),e.hasHyphenChar&&t.fillText("-",s+p+f,u+c),e.hasEllipsisChar&&t.fillText("...",s+p+f-d/2,u+c),f=0,c+=a}))},Xs=function(t,e){return{x:t.x+e.x,y:t.y+e.y}},Hs=function(t,e){return{x:t.x-e.x,y:t.y-e.y}},Ys=function(t,e){return{x:t.x*e,y:t.y*e}},$s=function(t,e){return function(t){return Math.sqrt(t.x*t.x+t.y*t.y)}(Hs(t,e))},qs=function(t,e){return{x:Math.cos(t)*e,y:Math.sin(t)*e}};function Zs(t){return Zs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zs(t)}function Ks(t){return function(t){if(Array.isArray(t))return eu(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||tu(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Js(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Qs(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Js(Object(n),!0).forEach((function(e){var r,i,o;r=t,i=e,o=n[e],i=function(t){var e=function(t,e){if("object"!=Zs(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=Zs(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Zs(e)?e:String(e)}(i),i in r?Object.defineProperty(r,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Js(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function tu(t,e){if(t){if("string"==typeof t)return eu(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?eu(t,e):void 0}}function eu(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var nu=function(t){return!(!t||!isNaN(Number(t))||t.toLowerCase()===t.toUpperCase())&&t===t.toUpperCase()},ru=function(t){var e=t[t.length-1],n=t[t.length-2];return!(!e||!isNaN(Number(e))||e.toLowerCase()===e.toUpperCase())&&!(!n||!isNaN(Number(n))||n.toLowerCase()===n.toUpperCase())&&nu(e)&&!nu(n)},iu=function(t,e,n,r){for(var i,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=[],s=[],u=0,l=0,c=!1,f=!1,h=0;h<r;h++)a[h]=n(h,r);for(var d,p=function(){i=t.slice(u,v);var n,h,d=e(i),p=a[l];if(d>p||(h=t[v-1],"\n\r\v".includes(h))){if(!(l<r-1)){if(o)return{v:[]};for(var y=v;d>p;){for(y-=1;n=t[y-1]," \t\n\r\v".includes(n);)y-=1;if(!(y-u>1)){i="",f=!0,c=!1;break}i=t.slice(u,y),d=e(i),f=!0,c=!1}return s[l]={text:i,hasEllipsisChar:f,hasHyphenChar:c},{v:s}}c=!1,f=!1;var m=function(t){var e=t.length,n=Math.min(e-1,3);if(1===e)return{hyphen:!1,cnt:0};for(var r=0;r<n;r++){var i=t[t.length-(r+1)];if(" "===i||i.toLowerCase()===i.toUpperCase())return{hyphen:!1,cnt:r+1};var o=t.slice(0,t.length-r);if(ru(o))return{hyphen:!1,cnt:r+1}}return{hyphen:!0,cnt:1}}(i),g=v-m.cnt;if(m.hyphen)for(i=t.slice(u,g),d=e(i),c=!0;d>p;){if(!(g-u>1)){i=t[u],g=u+1,d=e(i),c=!1;break}g--,i=t.slice(u,g),d=e(i),c=!0}else i=(i=t.slice(u,g)).trim();s[l]={text:i,hasEllipsisChar:f,hasHyphenChar:c},u=g,l+=1}},v=1;v<=t.length;v++)if(d=p())return d.v;return i=t.slice(u,t.length),s[l]={text:i,hasEllipsisChar:f,hasHyphenChar:!1},s},ou=function(t,e,n,r,i,o,a,s){t.font="bold ".concat(r,"px ").concat(n).replace(/"/g,"");var u=function(e){var n;return null===(n=t.measureText(e))||void 0===n?void 0:n.width},l=2;a===Ms[1][1]?l=3:a===Ms[2][1]&&(l=4);for(var c=a<Ms[2][1]?["",""]:[""],f=o?c.length:0,h=function(t,e){return function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"top",i=.98*n,o=.89*n,a=.95*n;return 1===e?i:2===e?a:3===e&&"top"===r?0===t||2===t?o:i:4===e&&"top"===r?0===t||3===t?.78*n:a:5===e&&"top"===r?0===t||4===t?.65*n:1===t||3===t?o:a:i}(t+f,e+f,i)},d=1,p=[],v=function(){if(0===(p=function(t,e,n,r){var i,o=t.split(/\s/g).filter((function(t){return t.length>0})),a=[],s=null,u=function(t){return e(t)>n(a.length,r)},l=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=tu(t))){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(o);try{for(l.s();!(i=l.n()).done;){var c=i.value,f=s?"".concat(s," ").concat(c):c;if(e(f)<n(a.length,r))s=f;else{if(null!==s){var h=u(s);a.push({text:s,overflowed:h})}if(s=c,a.length>r)return[]}}}catch(t){l.e(t)}finally{l.f()}if(s){var d=u(s);a.push({text:s,overflowed:d})}return a.length<=r?a:[]}(e,u,h,d)).length)p=iu(e,u,h,d,l>d);else if(p.some((function(t){return t.overflowed}))){var t=d;p=p.reduce((function(e,n){var r=l-e.length;if(0===r){var i=e[e.length-1];return i.text.endsWith("…")||(u(i.text)+u("…")>h(e.length,t)?(e[e.length-1].text=i.text.slice(0,-2),e[e.length-1].hasEllipsisChar=!0):(e[e.length-1].text=i.text,e[e.length-1].hasEllipsisChar=!0)),e}if(n.overflowed){var o=iu(n.text,u,h,r);e=e.concat(o)}else e.push({text:n.text,hasEllipsisChar:!1,hasHyphenChar:!1});return e}),[])}else p=p.map((function(t){return Qs(Qs({},t),{},{hasEllipsisChar:!1,hasHyphenChar:!1})}));d+=1};0===p.length;)v();return Array.from(p)},au=function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce((function(t,e,n){var r=e.value;if(r){var i="".concat(n>0&&t.length?", ":"").concat(r);return[].concat(Ks(t),[Qs(Qs({},e),{},{value:i,chars:i.split("").map((function(r,i){var o,a;return 0!==n&&t.length?i<2?null:Ks(null!==(o=e.styles)&&void 0!==o?o:[]):Ks(null!==(a=e.styles)&&void 0!==a?a:[])}))})])}return[]}),[]);return{stylesPerChar:t.reduce((function(t,e){return[].concat(Ks(t),Ks(e.chars))}),[]),fullCaption:t.map((function(t){return t.value})).join("")}};function su(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return uu(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?uu(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function uu(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var lu=2*Math.PI,cu=Math.PI/2,fu=function(t,e,n,r,i,o){var a={x:(t.x+e.x)/2,y:(t.y+e.y)/2},s={x:t.x,y:t.y},u={x:e.x,y:e.y},l=new js(u,s),c=function(t,e){var n=0;return t&&(n+=t),e&&(n-=e),n}(r,n);a.x+=c/2*l.unit.x,a.y+=c/2*l.unit.y;var f=o.size()/2-o.indexOf(i);return a.x+=f*l.unit.x,a.y+=f*l.unit.y,a},hu=function(t){var e=xr(),n=t.size,r=t.selected;return((null!=n?n:gr)+4+(!0===r?4:0))*e},du=function(t,e){var n=xr();t.shadowColor=e.color,t.shadowBlur=e.width*n,t.shadowOffsetX=0,t.shadowOffsetY=0},pu=function(t){t.shadowColor="rgba(0,0,0,0)",t.shadowBlur=0,t.shadowOffsetX=0,t.shadowOffsetY=0},vu=function(t,e,n,r,i){var o,a,s=arguments.length>5&&void 0!==arguments[5]&&arguments[5],u=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.norm.x,r=t.norm.y;return e?{x:-n,y:-r}:t.norm},l=xr(),c=e.indexOf(t),f=(e.size()-1)/2,h=c>f,d=Math.abs(c-f),p=i?17*e.maxFontSize():8,v=(e.size()-1)*p*l,y=function(t,e,n,r,i,o,a){var s,u=arguments.length>7&&void 0!==arguments[7]&&arguments[7],l=xr(),c=t.size(),f=c>1,h=t.relIsOppositeDirection(o),d=h?n:e,p=h?e:n,v=t.waypointPath,y=null==v?void 0:v.points,m=null==v?void 0:v.from,g=null==v?void 0:v.to,b=ks(d,m)&&ks(p,g)||ks(p,m)&&ks(d,g),w=b?y[1]:null,x=b?y[y.length-2]:null,_=hu(d),S=hu(p),T=function(t,e){return Math.atan2(t.y-e.y,t.x-e.x)},A=Math.max(Math.PI,lu/(c/2)),O=f?r*A*(a?1:-1)/(null!==(s=d.size)&&void 0!==s?s:gr):0,E=T(b?w:p,d),P=b?T(p,x):E,k=function(t,e,n,r){return{x:t.x+Math.cos(e)*n*(r?-1:1),y:t.y+Math.sin(e)*n*(r?-1:1)}},j=function(t,e){return k(d,E+t,e,!1)},C=function(t,e){return k(p,P-t,e,!0)},D=function(t,e){return{x:t.x+(e.x-t.x)/2,y:t.y+(e.y-t.y)/2}},R=function(t,e){return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))*l},I=j(O,_),L=C(O,S),M=f?j(0,_):null,N=f?C(0,S):null,F=200*l,U=[];if(b){var z=R(I,w)<F;if(f&&!z){var B=D(M,w);U.push(new js(I,B)),U.push(new js(B,w))}else U.push(new js(I,w));for(var V=2;V<y.length-1;V++)U.push(new js(y[V-1],y[V]));var G=R(L,x)<F;if(f&&!G){var W=D(N,x);U.push(new js(x,W)),U.push(new js(W,L))}else U.push(new js(x,L))}else{var X=f?R(M,N):0;if(f&&X>2*(30*l+Math.min(_,S)))if(u){var H=fu(d,p,_,S,o,t);U.push(new js(I,H)),U.push(new js(H,L))}else{var Y=r*i,$=30+_,q=Math.sqrt($*$+Y*Y),Z=30+S,K=Math.sqrt(Z*Z+Y*Y),J=j(0,q),Q=C(0,K);U.push(new js(I,J)),U.push(new js(J,Q)),U.push(new js(Q,L))}else if(X>(_+S)/2){var tt=fu(d,p,_,S,o,t);U.push(new js(I,tt)),U.push(new js(tt,L))}else U.push(new js(I,L))}return U}(e,n,r,d,p,t,h,s),m=[],g=y[0],b=u(g,h);m.push({x:g.p1.x+b.x,y:g.p1.y+b.y});for(var w=1;w<y.length;w++)if(1===e.size())m.push(y[w-1].p2);else{var x=y[w-1],_=y[w],S=u(x,h),T=u(_,h),A=Xs(x.p1,Ys(S,v/2)),O=Xs(x.p2,Ys(S,v/2)),E=Xs(_.p1,Ys(T,v/2)),P=Xs(_.p2,Ys(T,v/2)),k=null;a=T,(o=S).x*a.x+o.y*a.y<.99&&(k=Ds(A,O,E,P));var j=null!==k?Hs(k,x.p2):Ys(S,v/2);m.push(Xs(x.p2,Ys(j,d/f)))}var C=y[y.length-1],D=u(C,h);return m.push({x:C.p2.x+D.x,y:C.p2.y+D.y}),e.relIsOppositeDirection(t)?m.reverse():m},yu=function(t,e,n,r,i,o){var a,s=arguments.length>6&&void 0!==arguments[6]&&arguments[6],u=xr(),l=i.selected,c=i.captions,f=void 0===c?[]:c,h=i.caption,d=void 0===h?"":h,p=i.width,v=i.disabled,y=i.captionAlign,m=void 0===y?"top":y,g=i.captionSize,b=void 0===g?1:g,w=f.length>0?null===(a=au(f))||void 0===a?void 0:a.fullCaption:d;if(void 0!==w){var x=!0===v?"#DDDDDD":"#848484",_=6*b*u,S=!0===l?"bold":"normal",T=w;t.fillStyle=x,t.font="".concat(S," ").concat(_,"px ").concat('"Open Sans", sans-serif');var A=function(e){return t.measureText(e).width},O=(null!=p?p:1)*(!0===l?1.5:1),E=A(T);if(E>r){var P=iu(T,A,(function(){return r}),1,!1)[0];T=!0===P.hasEllipsisChar?"".concat(P.text,"..."):T,E=r}t.save(),t.translate(e.x,e.y),s?(t.rotate(n-cu),t.translate(2*_,0),t.rotate(-cu)):t.rotate(n);var k=(1+b)*u,j="bottom"===m?_/2+O+k:-(O+k);t.fillText(T,-E/2,j),t.restore();var C=2*j*Math.sin(n),D=2*j*Math.cos(n),R={position:{x:e.x-C,y:e.y+D},rotation:s?n-Math.PI:n,width:r/u,height:(_+k)/u};o.setLabelInfo(i.id,R)}},mu=function(t,e,n,r,i){if(t.beginPath(),t.moveTo(e[0].x,e[0].y),i&&e.length>2){for(var o=1;o<e.length-2;){var a=(e[o].x+e[o+1].x)/2,s=(e[o].y+e[o+1].y)/2;t.quadraticCurveTo(e[o].x,e[o].y,a,s),o+=1}t.quadraticCurveTo(e[o].x,e[o].y,e[o+1].x,e[o+1].y)}else for(var u=1;u<e.length;u++)t.lineTo(e[u].x,e[u].y);t.lineWidth=n,t.strokeStyle=r,t.lineCap="round",t.stroke()},gu=function(t){return t.rings[0].width*xr()*1.5},bu=function(t){return 6*t*xr()},wu=function(t,e,n){var r,i;return{widthAlign:e/2*(null!==(r=t[0])&&void 0!==r?r:0),heightAlign:n/2*(null!==(i=t[1])&&void 0!==i?i:0)}},xu=function(t,e,n){var r,i,o=n.indexOf(t),a=null!==(r=n.angles[o])&&void 0!==r?r:0,s=a-hs/2,u=a+hs/2,l=null!==(i=t.width)&&void 0!==i?i:1,c=xr(),f=hu(e),h={x:e.x+Math.cos(s)*(f+l/2),y:e.y+Math.sin(s)*(f+l/2)},d={x:e.x+Math.cos(u)*(f+l/2),y:e.y+Math.sin(u)*(f+l/2)},p={x:e.x+Math.cos(a)*(f+35*c),y:e.y+Math.sin(a)*(f+35*c)};return{startAngle:s,endAngle:u,startPoint:h,endPoint:d,apexPoint:p,control1Point:{x:p.x+25*Math.cos(a-cu)*c/2,y:p.y+25*Math.sin(a-cu)*c/2},control2Point:{x:p.x+25*Math.cos(a+cu)*c/2,y:p.y+25*Math.sin(a+cu)*c/2}}},_u=function(t,e,n,r,i,o){t.beginPath(),t.moveTo(e.x,e.y),t.quadraticCurveTo(i.x,i.y,r.x,r.y),t.quadraticCurveTo(o.x,o.y,n.x,n.y),t.stroke()},Su=function(t,e,n,r,i,o,a,s){var u=!(arguments.length>8&&void 0!==arguments[8])||arguments[8];Ps(n,r)&&(n.id===r.id?function(t,e,n,r,i,o,a){var s=e.overlayIcon,u=e.selected,l=e.width,c=e.hovered,f=e.disabled,h=e.color,d=xu(e,n,r),p=d.startPoint,v=d.endPoint,y=d.apexPoint,m=d.control1Point,g=d.control2Point,b=a.rings,w=a.shadow,x=xr(),_=b[0].color,S=b[1].color,T=b[0].width*x,A=b[1].width*x,O=40*x,E=(null!=l?l:1)*x,P=E>1?E/2:1,k=9*P,j=2*P,C=7*P,D=!0===u,R=!0===f,I=void 0!==s,L=Math.atan2(v.y-g.y,v.x-g.x),M=D?T*Math.sqrt(1+2*k/C*(2*k/C)):0,N={x:v.x-Math.cos(L)*(.5*k-j+M),y:v.y-Math.sin(L)*(.5*k-j+M)},F={headPosition:{x:v.x+Math.cos(L)*(.5*k-j-M),y:v.y+Math.sin(L)*(.5*k-j-M)},headAngle:L,headHeight:k,headChinHeight:j,headWidth:C};if(t.save(),t.lineCap="round",D&&(du(t,w),t.lineWidth=E+A,t.strokeStyle=S,_u(t,p,N,y,m,g),Us(t,A,S,F,!1,!0),pu(t),t.lineWidth=E+T,t.strokeStyle=_,_u(t,p,N,y,m,g),Us(t,T,_,F,!1,!0)),t.lineWidth=E,!0===c&&!D&&!R){var U=w.color;du(t,w),t.strokeStyle=U,t.fillStyle=U,_u(t,p,N,y,m,g),Us(t,E,U,F),pu(t)}var z=R?ds:null!=h?h:cs;if(t.fillStyle=z,t.strokeStyle=z,_u(t,p,N,y,m,g),Us(t,E,z,F),o||I){var B,V=r.indexOf(e),G=null!==(B=r.angles[V])&&void 0!==B?B:0,W=y.x-Math.cos(L)*(M/4),X=y.y-Math.sin(L)*(M/4),H=(G+cu)%lu,Y=(G+lu)%lu<Math.PI;if(o&&yu(t,{x:W,y:X},H,O,e,r,Y),I){var $=s.position,q=void 0===$?[0,0]:$,Z=s.url,K=s.size,J=bu(void 0===K?1:K),Q=wu(q,O,J),tt=Q.widthAlign,et=Q.heightAlign+(D?gu(a):0)*(q[1]<0?-1:1);t.save(),t.translate(W,X),Y?(t.rotate(H-Math.PI),t.translate(2*-tt,2*-et)):t.rotate(H);var nt=J/2,rt=-nt+tt,it=-nt+et;t.drawImage(i.getImage(Z),rt,it,J,J),t.restore()}}t.restore()}(t,e,n,i,o,a,s):function(t,e,n,r,i,o,a,s,u){var l=e.overlayIcon,c=e.color,f=e.disabled,h=e.selected,d=e.width,p=e.hovered,v=e.captionAlign,y=!0===h,m=!0===f,g=void 0!==l,b=u.rings,w=u.shadow,x=vu(e,i,n,r,a,s),_=xr(),S=function(t){var e,n=!0===t.selected?1.5:1;return(null!==(e=t.width)&&void 0!==e?e:1)*n*xr()}(e),T=m?ds:null!=c?c:cs,A=b[0].width*_,O=b[1].width*_,E=_*(d>1?d/2:1),P=9*E,k=2*E,j=7*E,C=$s(x[x.length-2],x[x.length-1]),D=2*P,R=y?A*Math.sqrt(1+D/j*(D/j)):0,I=2-R,L=Math.floor(x.length/2);x.length>2&&y&&C<P+R-k&&(I+=C,R-=C/2+k,x.pop(),L=Math.floor(x.length/2));var M,N,F=x[x.length-2],U=x[x.length-1],z=(M=F,N=U,Math.atan2(N.y-M.y,N.x-M.x)),B=P/2+R,V=Math.cos(z),G=Math.sin(z);x[x.length-1]={x:U.x-V*B,y:U.y-G*B};var W,X={headPosition:{x:U.x+V*I,y:U.y+G*I},headAngle:z,headHeight:P,headChinHeight:k,headWidth:j},H=su(x);try{for(H.s();!(W=H.n()).done;){var Y=W.value;Y.x=Math.round(Y.x),Y.y=Math.round(Y.y)}}catch(t){H.e(t)}finally{H.f()}if(t.save(),y){var $=b[0].color,q=b[1].color,Z=Math.atan2(x[1].y-x[0].y,x[1].x-x[0].x),K=qs(Z,gu(u));x[0]=Xs(x[0],K),du(t,w),mu(t,x,S+O,q,s),Us(t,O,q,X,!1,!0),pu(t),mu(t,x,S+A,$,s),Us(t,A,$,X,!1,!0)}if(!0===p&&!y&&!m){var J=w.color;du(t,w),mu(t,x,S,J,s),Us(t,S,J,X),pu(t)}if(mu(t,x,S,T,s),Us(t,S,T,X),a||g){var Q,tt,et,nt,rt,it=n.x>r.x,ot=x[L];1==(1&x.length)?(Q=x[it?L+1:L-1],tt=x[it?L-1:L+1],s?(et=(ot.x+(Q.x+tt.x)/2)/2,nt=(ot.y+(Q.y+tt.y)/2)/2,rt=it?Math.atan2(n.y-r.y,n.x-r.x):Math.atan2(r.y-n.y,r.x-n.x)):($s(ot,Q)>$s(ot,tt)?tt=ot:Q=ot,et=(Q.x+tt.x)/2,nt=(Q.y+tt.y)/2,rt=Math.atan2(tt.y-Q.y,tt.x-Q.x))):(Q=x[it?L:L-1],tt=x[it?L-1:L],et=(Q.x+tt.x)/2,nt=(Q.y+tt.y)/2,rt=Math.atan2(tt.y-Q.y,tt.x-Q.x));var at=y?qs(rt+cu,gu(u)):{x:0,y:0},st=$s(Q,tt);if(a){var ut="bottom"===v?1:-1,lt={x:et+at.x*ut,y:nt+at.y*ut};yu(t,lt,rt,st,e,i)}if(g){var ct=l.position,ft=void 0===ct?[0,0]:ct,ht=l.url,dt=l.size,pt=bu(void 0===dt?1:dt),vt=wu(ft,st,pt),yt=vt.widthAlign,mt=vt.heightAlign,gt=ft[1]<0?-1:1,bt=at.x*gt,wt=at.y*gt,xt=pt/2;t.save(),t.translate(et,nt),t.rotate(rt);var _t=-xt+bt+yt,St=-xt+wt+mt;t.drawImage(o.getImage(ht),_t,St,pt,pt),t.restore()}}t.restore()}(t,e,n,r,i,o,a,u,s))},Tu=function(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=arguments.length>5&&void 0!==arguments[5]&&arguments[5];return Ps(n,r)?n.id===r.id?function(t,e,n){for(var r=xu(t,e,n),i={left:1/0,top:1/0,right:-1/0,bottom:-1/0},o=["startPoint","endPoint","apexPoint","control1Point","control2Point"],a=0;a<o.length;a++){var s=r[o[a]],u=s.x,l=s.y;u<i.left&&(i.left=u),u>i.right&&(i.right=u),l<i.top&&(i.top=l),l>i.bottom&&(i.bottom=l)}return i}(t,n,e):function(t,e,n,r,i,o){var a,s={left:1/0,top:1/0,right:-1/0,bottom:-1/0},u=su(vu(t,e,n,r,i,o));try{for(u.s();!(a=u.n()).done;){var l=a.value,c=l.x,f=l.y;c<s.left&&(s.left=c),c>s.right&&(s.right=c),f<s.top&&(s.top=f),f>s.bottom&&(s.bottom=f)}}catch(t){u.e(t)}finally{u.f()}return s}(t,e,n,r,i,o):null};function Au(t){return Au="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Au(t)}var Ou=/^\s+/,Eu=/\s+$/;function Pu(t,e){if(e=e||{},(t=t||"")instanceof Pu)return t;if(!(this instanceof Pu))return new Pu(t,e);var n=function(t){var e,n,r,i={r:0,g:0,b:0},o=1,a=null,s=null,u=null,l=!1,c=!1;return"string"==typeof t&&(t=function(t){t=t.replace(Ou,"").replace(Eu,"").toLowerCase();var e,n=!1;if(Xu[t])t=Xu[t],n=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};return(e=il.rgb.exec(t))?{r:e[1],g:e[2],b:e[3]}:(e=il.rgba.exec(t))?{r:e[1],g:e[2],b:e[3],a:e[4]}:(e=il.hsl.exec(t))?{h:e[1],s:e[2],l:e[3]}:(e=il.hsla.exec(t))?{h:e[1],s:e[2],l:e[3],a:e[4]}:(e=il.hsv.exec(t))?{h:e[1],s:e[2],v:e[3]}:(e=il.hsva.exec(t))?{h:e[1],s:e[2],v:e[3],a:e[4]}:(e=il.hex8.exec(t))?{r:Zu(e[1]),g:Zu(e[2]),b:Zu(e[3]),a:tl(e[4]),format:n?"name":"hex8"}:(e=il.hex6.exec(t))?{r:Zu(e[1]),g:Zu(e[2]),b:Zu(e[3]),format:n?"name":"hex"}:(e=il.hex4.exec(t))?{r:Zu(e[1]+""+e[1]),g:Zu(e[2]+""+e[2]),b:Zu(e[3]+""+e[3]),a:tl(e[4]+""+e[4]),format:n?"name":"hex8"}:!!(e=il.hex3.exec(t))&&{r:Zu(e[1]+""+e[1]),g:Zu(e[2]+""+e[2]),b:Zu(e[3]+""+e[3]),format:n?"name":"hex"}}(t)),"object"==Au(t)&&(ol(t.r)&&ol(t.g)&&ol(t.b)?(e=t.r,n=t.g,r=t.b,i={r:255*$u(e,255),g:255*$u(n,255),b:255*$u(r,255)},l=!0,c="%"===String(t.r).substr(-1)?"prgb":"rgb"):ol(t.h)&&ol(t.s)&&ol(t.v)?(a=Ju(t.s),s=Ju(t.v),i=function(t,e,n){t=6*$u(t,360),e=$u(e,100),n=$u(n,100);var r=Math.floor(t),i=t-r,o=n*(1-e),a=n*(1-i*e),s=n*(1-(1-i)*e),u=r%6;return{r:255*[n,a,o,o,s,n][u],g:255*[s,n,n,a,o,o][u],b:255*[o,o,s,n,n,a][u]}}(t.h,a,s),l=!0,c="hsv"):ol(t.h)&&ol(t.s)&&ol(t.l)&&(a=Ju(t.s),u=Ju(t.l),i=function(t,e,n){var r,i,o;function a(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}if(t=$u(t,360),e=$u(e,100),n=$u(n,100),0===e)r=i=o=n;else{var s=n<.5?n*(1+e):n+e-n*e,u=2*n-s;r=a(u,s,t+1/3),i=a(u,s,t),o=a(u,s,t-1/3)}return{r:255*r,g:255*i,b:255*o}}(t.h,a,u),l=!0,c="hsl"),t.hasOwnProperty("a")&&(o=t.a)),o=Yu(o),{ok:l,format:t.format||c,r:Math.min(255,Math.max(i.r,0)),g:Math.min(255,Math.max(i.g,0)),b:Math.min(255,Math.max(i.b,0)),a:o}}(t);this._originalInput=t,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=e.format||n.format,this._gradientType=e.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}function ku(t,e,n){t=$u(t,255),e=$u(e,255),n=$u(n,255);var r,i,o=Math.max(t,e,n),a=Math.min(t,e,n),s=(o+a)/2;if(o==a)r=i=0;else{var u=o-a;switch(i=s>.5?u/(2-o-a):u/(o+a),o){case t:r=(e-n)/u+(e<n?6:0);break;case e:r=(n-t)/u+2;break;case n:r=(t-e)/u+4}r/=6}return{h:r,s:i,l:s}}function ju(t,e,n){t=$u(t,255),e=$u(e,255),n=$u(n,255);var r,i,o=Math.max(t,e,n),a=Math.min(t,e,n),s=o,u=o-a;if(i=0===o?0:u/o,o==a)r=0;else{switch(o){case t:r=(e-n)/u+(e<n?6:0);break;case e:r=(n-t)/u+2;break;case n:r=(t-e)/u+4}r/=6}return{h:r,s:i,v:s}}function Cu(t,e,n,r){var i=[Ku(Math.round(t).toString(16)),Ku(Math.round(e).toString(16)),Ku(Math.round(n).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function Du(t,e,n,r){return[Ku(Qu(r)),Ku(Math.round(t).toString(16)),Ku(Math.round(e).toString(16)),Ku(Math.round(n).toString(16))].join("")}function Ru(t,e){e=0===e?0:e||10;var n=Pu(t).toHsl();return n.s-=e/100,n.s=qu(n.s),Pu(n)}function Iu(t,e){e=0===e?0:e||10;var n=Pu(t).toHsl();return n.s+=e/100,n.s=qu(n.s),Pu(n)}function Lu(t){return Pu(t).desaturate(100)}function Mu(t,e){e=0===e?0:e||10;var n=Pu(t).toHsl();return n.l+=e/100,n.l=qu(n.l),Pu(n)}function Nu(t,e){e=0===e?0:e||10;var n=Pu(t).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(-e/100*255))),n.g=Math.max(0,Math.min(255,n.g-Math.round(-e/100*255))),n.b=Math.max(0,Math.min(255,n.b-Math.round(-e/100*255))),Pu(n)}function Fu(t,e){e=0===e?0:e||10;var n=Pu(t).toHsl();return n.l-=e/100,n.l=qu(n.l),Pu(n)}function Uu(t,e){var n=Pu(t).toHsl(),r=(n.h+e)%360;return n.h=r<0?360+r:r,Pu(n)}function zu(t){var e=Pu(t).toHsl();return e.h=(e.h+180)%360,Pu(e)}function Bu(t,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var n=Pu(t).toHsl(),r=[Pu(t)],i=360/e,o=1;o<e;o++)r.push(Pu({h:(n.h+o*i)%360,s:n.s,l:n.l}));return r}function Vu(t){var e=Pu(t).toHsl(),n=e.h;return[Pu(t),Pu({h:(n+72)%360,s:e.s,l:e.l}),Pu({h:(n+216)%360,s:e.s,l:e.l})]}function Gu(t,e,n){e=e||6,n=n||30;var r=Pu(t).toHsl(),i=360/n,o=[Pu(t)];for(r.h=(r.h-(i*e>>1)+720)%360;--e;)r.h=(r.h+i)%360,o.push(Pu(r));return o}function Wu(t,e){e=e||6;for(var n=Pu(t).toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/e;e--;)a.push(Pu({h:r,s:i,v:o})),o=(o+s)%1;return a}Pu.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,e,n,r=this.toRgb();return t=r.r/255,e=r.g/255,n=r.b/255,.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))},setAlpha:function(t){return this._a=Yu(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=ju(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=ju(this._r,this._g,this._b),e=Math.round(360*t.h),n=Math.round(100*t.s),r=Math.round(100*t.v);return 1==this._a?"hsv("+e+", "+n+"%, "+r+"%)":"hsva("+e+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var t=ku(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=ku(this._r,this._g,this._b),e=Math.round(360*t.h),n=Math.round(100*t.s),r=Math.round(100*t.l);return 1==this._a?"hsl("+e+", "+n+"%, "+r+"%)":"hsla("+e+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(t){return Cu(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,e,n,r,i){var o=[Ku(Math.round(t).toString(16)),Ku(Math.round(e).toString(16)),Ku(Math.round(n).toString(16)),Ku(Qu(r))];return i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*$u(this._r,255))+"%",g:Math.round(100*$u(this._g,255))+"%",b:Math.round(100*$u(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*$u(this._r,255))+"%, "+Math.round(100*$u(this._g,255))+"%, "+Math.round(100*$u(this._b,255))+"%)":"rgba("+Math.round(100*$u(this._r,255))+"%, "+Math.round(100*$u(this._g,255))+"%, "+Math.round(100*$u(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(Hu[Cu(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+Du(this._r,this._g,this._b,this._a),n=e,r=this._gradientType?"GradientType = 1, ":"";if(t){var i=Pu(t);n="#"+Du(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+e+",endColorstr="+n+")"},toString:function(t){var e=!!t;t=t||this._format;var n=!1,r=this._a<1&&this._a>=0;return e||!r||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(n=this.toRgbString()),"prgb"===t&&(n=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(n=this.toHexString()),"hex3"===t&&(n=this.toHexString(!0)),"hex4"===t&&(n=this.toHex8String(!0)),"hex8"===t&&(n=this.toHex8String()),"name"===t&&(n=this.toName()),"hsl"===t&&(n=this.toHslString()),"hsv"===t&&(n=this.toHsvString()),n||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return Pu(this.toString())},_applyModification:function(t,e){var n=t.apply(null,[this].concat([].slice.call(e)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(Mu,arguments)},brighten:function(){return this._applyModification(Nu,arguments)},darken:function(){return this._applyModification(Fu,arguments)},desaturate:function(){return this._applyModification(Ru,arguments)},saturate:function(){return this._applyModification(Iu,arguments)},greyscale:function(){return this._applyModification(Lu,arguments)},spin:function(){return this._applyModification(Uu,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(Gu,arguments)},complement:function(){return this._applyCombination(zu,arguments)},monochromatic:function(){return this._applyCombination(Wu,arguments)},splitcomplement:function(){return this._applyCombination(Vu,arguments)},triad:function(){return this._applyCombination(Bu,[3])},tetrad:function(){return this._applyCombination(Bu,[4])}},Pu.fromRatio=function(t,e){if("object"==Au(t)){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]="a"===r?t[r]:Ju(t[r]));t=n}return Pu(t,e)},Pu.equals=function(t,e){return!(!t||!e)&&Pu(t).toRgbString()==Pu(e).toRgbString()},Pu.random=function(){return Pu.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},Pu.mix=function(t,e,n){n=0===n?0:n||50;var r=Pu(t).toRgb(),i=Pu(e).toRgb(),o=n/100;return Pu({r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a})},Pu.readability=function(t,e){var n=Pu(t),r=Pu(e);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},Pu.isReadable=function(t,e,n){var r,i,o,a,s,u=Pu.readability(t,e);switch(i=!1,"AA"!==(a=((o=(o=n)||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==a&&(a="AA"),"small"!==(s=(o.size||"small").toLowerCase())&&"large"!==s&&(s="small"),(r={level:a,size:s}).level+r.size){case"AAsmall":case"AAAlarge":i=u>=4.5;break;case"AAlarge":i=u>=3;break;case"AAAsmall":i=u>=7}return i},Pu.mostReadable=function(t,e,n){var r,i,o,a,s=null,u=0;i=(n=n||{}).includeFallbackColors,o=n.level,a=n.size;for(var l=0;l<e.length;l++)(r=Pu.readability(t,e[l]))>u&&(u=r,s=Pu(e[l]));return Pu.isReadable(t,s,{level:o,size:a})||!i?s:(n.includeFallbackColors=!1,Pu.mostReadable(t,["#fff","#000"],n))};var Xu=Pu.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Hu=Pu.hexNames=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}(Xu);function Yu(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function $u(t,e){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var n=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=Math.min(e,Math.max(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),Math.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function qu(t){return Math.min(1,Math.max(0,t))}function Zu(t){return parseInt(t,16)}function Ku(t){return 1==t.length?"0"+t:""+t}function Ju(t){return t<=1&&(t=100*t+"%"),t}function Qu(t){return Math.round(255*parseFloat(t)).toString(16)}function tl(t){return Zu(t)/255}var el,nl,rl,il=(nl="[\\s|\\(]+("+(el="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+el+")[,|\\s]+("+el+")\\s*\\)?",rl="[\\s|\\(]+("+el+")[,|\\s]+("+el+")[,|\\s]+("+el+")[,|\\s]+("+el+")\\s*\\)?",{CSS_UNIT:new RegExp(el),rgb:new RegExp("rgb"+nl),rgba:new RegExp("rgba"+rl),hsl:new RegExp("hsl"+nl),hsla:new RegExp("hsla"+rl),hsv:new RegExp("hsv"+nl),hsva:new RegExp("hsva"+rl),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function ol(t){return!!il.CSS_UNIT.exec(t)}var al=function(t){return Pu.mostReadable(t,["#1A1B1D","#FFFFFF"]).toString()};function sl(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,l=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){l=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return ul(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ul(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ul(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var ll=function(t){var e=t.x,n=void 0===e?0:e,r=t.y,i=void 0===r?0:r,o=t.size,a=void 0===o?gr:o;return{top:i-a,left:n-a,right:n+a,bottom:i+a}},cl=function(t,e,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,a=e.x,s=void 0===a?0:a,u=e.y,l=void 0===u?0:u,c=e.size,f=void 0===c?gr:c,h=e.caption,d=void 0===h?"":h,p=e.captions,v=void 0===p?[]:p,y=e.captionAlign,m=void 0===y?"center":y,g=e.captionSize,b=void 0===g?1:g,w=e.disabled,x=e.activated,_=e.selected,S=e.hovered,T=e.id,A=e.icon,O=e.overlayIcon,E=i.selected,P=xr(),k=function(t,e,n){var r=t.selected?n.selected.rings:n.default.rings;if(!r.length){var i=e.getById(t.id);return void 0!==i&&Object.entries(i).forEach((function(t){var e=sl(t,2),n=e[0],r=e[1];n.startsWith("ring-")&&r.setEndValue(0)})),[{width:0,color:""}]}return r.map((function(n,r){var i=n.widthFactor,o=n.color,a=(t.size||gr)*i*xr();return{width:e.getValueForAnimationName(t.id,"ring-".concat(r),a),color:o}}))}(e,r,i),j=k.reduce((function(t,e){return t+e.width}),0),C=E.shadow.width*P,D=E.shadow.opacity,R=E.shadow.color,I=f*P,L=2*I,M=function(t,e){if(!t||!e)return{nodeInfoLevel:0,fontInfoLevel:1.25,iconInfoLevel:1};var n=xr(),r=1600*n*(1200*n),i=Math.pow(t,2)*Math.PI*Math.pow(e,2)/(r/100);return{nodeInfoLevel:Gs(i,Ls),fontInfoLevel:Gs(i,Ms),iconInfoLevel:Gs(i,Ns)}}(I,o),N=M.nodeInfoLevel,F=M.fontInfoLevel,U=M.iconInfoLevel,z=e.color||"#478BFF",B=function(t){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:gr)/({1:3.5,2:2.75,3:2}[arguments.length>2&&void 0!==arguments[2]?arguments[2]:1]+(arguments.length>3&&void 0!==arguments[3]&&arguments[3]?1:0))/t}(F,I,b,Boolean(A)),V=al(z),G=I,W=G,X=Boolean(d.length),H=Boolean(v.length),Y=Boolean(A),$=Boolean(O);if(j>0&&(G=I+j),w)z="#EDEDED",V="#DDDDDD";else{if(x){var q=Date.now()%1e3/1e3,Z=q<.7?q/.7:0,K=Fs(z,.4-.4*Z);Vs(t,s,l,K,I+.88*I*Z)}var J=_||S?C:0,Q=r.getValueForAnimationName(T,"shadowWidth",J);Q>0&&function(t,e,n,r,i,o){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,s=i+o,u=t.createRadialGradient(e,n,i,e,n,s);u.addColorStop(0,"transparent"),u.addColorStop(.01,Fs(r,.5*a)),u.addColorStop(.05,Fs(r,.5*a)),u.addColorStop(.5,Fs(r,.12*a)),u.addColorStop(.75,Fs(r,.03*a)),u.addColorStop(1,Fs(r,0)),t.fillStyle=u,Bs(t,e,n,s),t.fill()}(t,s,l,R,G,Q,D)}if(Vs(t,s,l,z,I),j>0&&zs(t,s,l,W,k),Y){var tt=N<2||!(X||H),et=N>0?1:0,nt=tt?1*I:.75*I;nt/=U;var rt=tt?.5*nt:nt*(1===U?"center"===m?1.3:"bottom"===m||tt?1.1:0:"center"===m?1.35:"bottom"===m||tt?1.1:0),it=nt/2;nt=r.getValueForAnimationName(T,"iconSize",nt),it=r.getValueForAnimationName(T,"iconXPos",it),rt=r.getValueForAnimationName(T,"iconYPos",rt),t.save();var ot=!0===w?.1:et;t.globalAlpha=r.getValueForAnimationName(T,"iconOpacity",ot);var at="#fff"===V,st=n.getImage(A,at);t.drawImage(st,s-it,l-rt,Math.floor(nt),Math.floor(nt)),t.restore()}if($){var ut,lt,ct,ft,ht,dt=L*(null!==(ut=O.size)&&void 0!==ut?ut:1),pt=dt/2-I*(null!==(lt=null===(ct=O.position)||void 0===ct?void 0:ct[1])&&void 0!==lt?lt:0),vt=dt/2-I*(null!==(ft=null===(ht=O.position)||void 0===ht?void 0:ht[0])&&void 0!==ft?ft:0);t.save();var yt=!0===w?.1:1;t.globalAlpha=r.getValueForAnimationName(T,"iconOpacity",yt);var mt=n.getImage(O.url);t.drawImage(mt,s-vt,l-pt,dt,dt),t.restore()}var gt=N<2?0:1,bt=r.getValueForAnimationName(T,"textOpacity",gt,0),wt=Fs(V,bt),xt='"Open Sans", sans-serif';if(X&&bt>0){var _t=ou(t,d,xt,B,.7*L,Y,F,null==e||e.captionAlign);t.fillStyle=wt,t.font="normal ".concat(B,"px ").concat(xt);var St=1+B,Tt=-(_t.length-2)*St/2,At=d.split("").map((function(t){return[]}));Ws(t,_t,At,Tt,B,xt,St,s,l)}if(H){var Ot=N<2?0:1,Et=r.getValueForAnimationName(T,"textOpacity",Ot,0),Pt=Fs(V,Et),kt='"Open Sans", sans-serif',jt=Boolean(A);if(Et>0){var Ct=au(v),Dt=Ct.stylesPerChar,Rt=Ct.fullCaption,It="center"===m?.7*L:2*Math.sqrt(Math.pow(L/2,2)-Math.pow(L/3,2)),Lt=ou(t,Rt,kt,B,It,jt,F,null==e||e.captionAlign);t.fillStyle=Pt;var Mt,Nt=B,Ft=-(Lt.length-2)*Nt/2;Mt=m&&"center"!==m?"bottom"===m?Ft+I/Math.PI:Ft-I/Math.PI:Ft,Ws(t,Lt,Dt,Mt,B,kt,Nt,s,l)}}t.save(),t.restore()};function fl(t){return fl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fl(t)}function hl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function dl(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?hl(Object(n),!0).forEach((function(e){ml(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):hl(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function pl(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return vl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vl(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function vl(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function yl(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,gl(r.key),r)}}function ml(t,e,n){return(e=gl(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function gl(t){var e=function(t,e){if("object"!=fl(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=fl(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==fl(e)?e:String(e)}var bl="canvasRenderer",wl=function(){function t(e,n,r){var i=this,o=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).relationshipThreshold,a=void 0===o?2.5:o;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),ml(this,"arrowBundler",void 0),ml(this,"activeNodes",void 0),ml(this,"canvas",void 0),ml(this,"context",void 0),ml(this,"state",void 0),ml(this,"stateDisposers",void 0),ml(this,"relationshipThreshold",void 0),ml(this,"animationHandler",void 0),ml(this,"imageCache",void 0),ml(this,"needsRun",void 0),ml(this,"nodeVersion",void 0),ml(this,"relVersion",void 0),ml(this,"waypointVersion",void 0),this.activeNodes=new Set,this.canvas=e,this.context=n,this.state=r,this.stateDisposers=[],this.stateDisposers.push(r.autorun((function(){void 0!==r.zoom&&(i.needsRun=!0),void 0!==r.panX&&(i.needsRun=!0),void 0!==r.panY&&(i.needsRun=!0),void 0!==r.nodes.version&&(i.needsRun=!0),void 0!==r.rels.version&&(i.needsRun=!0),r.waypoints.counter>0&&(i.needsRun=!0),void 0!==r.layout&&(i.needsRun=!0)}))),r.nodes.addChannel(bl),r.rels.addChannel(bl),this.relationshipThreshold=a,this.nodeVersion=r.nodes.version,this.relVersion=r.rels.version,this.waypointVersion=r.waypoints.counter,this.animationHandler=new Ka,this.animationHandler.setOptions({fadeDuration:150,sizeDuration:150}),this.arrowBundler=new _s(r.rels.items,r.waypoints.data),this.imageCache=new rs,this.needsRun=!0}var e,n;return e=t,n=[{key:"needsToRun",value:function(){return this.needsRun||this.animationHandler.needsToRun()||this.activeNodes.size>0}},{key:"processUpdates",value:function(){var t=this.state,e=!1,n=t.nodes.channels[bl],r=t.rels.channels[bl],i=n.adds,o=n.removes,a=r.adds,s=r.removes;this.nodeVersion<t.nodes.version&&(Object.keys(i).length>0||Object.keys(o).length,this.handleChannelUpdate(n,t.nodes,!0),this.nodeVersion=t.nodes.version,t.nodes.clearChannel(bl)),this.relVersion<t.rels.version&&(e=Object.keys(a).length>0||Object.keys(s).length>0,t.rels.clearChannel(bl),this.relVersion=t.rels.version),(e||this.waypointVersion<t.waypoints.counter)&&(this.arrowBundler.updateData(a,s,t.waypoints.data),this.waypointVersion=t.waypoints.counter)}},{key:"render",value:function(t){var e,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=this.state,o=this.animationHandler,a=this.arrowBundler,s=i.zoom,u=i.layout,l=i.nodes.idToPosition,c=null!==(e=r.canvas)&&void 0!==e?e:this.canvas,f=null!==(n=r.context)&&void 0!==n?n:this.context,h=xr(),d=c.clientWidth*h,p=c.clientHeight*h;f.save(),void 0!==r.backgroundColor?(f.fillStyle=r.backgroundColor,f.fillRect(0,0,d,p)):f.clearRect(0,0,d,p),this.zoomAndPan(f,c),o.ignoreAnimations(Boolean(r.ignoreAnimations)),!0!==r.ignoreAnimations&&o.advance(),a.updatePositions(l);var v=this.getRelationshipsToRender(r.showCaptions,d,p);this.renderRelationships(v,f,u!==la);var y=this.getNodesToRender(t,d,p);this.renderNodes(y,f,s),f.restore(),this.needsRun=!1}},{key:"getRelationshipsToRender",value:function(t,e,n){var r,i=[],o=[],a=[],s=this.arrowBundler,u=this.state,l=this.relationshipThreshold,c=u.layout,f=u.zoom,h=u.rels,d=u.nodes,p=d.idToItem,v=d.idToPosition,y=pl(h.items);try{for(y.s();!(r=y.n()).done;){var m=r.value,g=s.getBundle(m),b=dl(dl({},p[m.from]),v[m.from]),w=dl(dl({},p[m.to]),v[m.to]),x=t||f>l||void 0!==m.captionHtml,_=Tu(m,g,b,w,x,c!==la);if(null!==_){var S,T,A,O,E,P,k=this.isBoundingBoxOffScreen(_,e,n),j=$s({x:null!==(S=b.x)&&void 0!==S?S:0,y:null!==(T=b.y)&&void 0!==T?T:0},{x:null!==(A=w.x)&&void 0!==A?A:0,y:null!==(O=w.y)&&void 0!==O?O:0}),C=((null!==(E=b.size)&&void 0!==E?E:gr)+(null!==(P=w.size)&&void 0!==P?P:gr))*devicePixelRatio,D=b.id!==w.id&&C>j;k||D||(!0===m.disabled?o.push(dl(dl({},m),{},{fromNode:b,toNode:w,showLabel:x})):!0===m.selected?i.push(dl(dl({},m),{},{fromNode:b,toNode:w,showLabel:x})):a.push(dl(dl({},m),{},{fromNode:b,toNode:w,showLabel:x})))}}}catch(t){y.e(t)}finally{y.f()}return[].concat(o,a,i)}},{key:"getNodesToRender",value:function(t,e,n){var r,i=[],o=[],a=[],s=this.state.nodes.idToItem,u=pl(t);try{for(u.s();!(r=u.n()).done;){var l,c,f=r.value,h=ll(f);this.isBoundingBoxOffScreen(h,e,n)||(!0===(null===(l=s[f.id])||void 0===l?void 0:l.disabled)?i.push(dl({},f)):!0===(null===(c=s[f.id])||void 0===c?void 0:c.selected)?o.push(dl({},f)):a.push(dl({},f)))}}catch(t){u.e(t)}finally{u.f()}return[].concat(i,a,o)}},{key:"renderNodes",value:function(t,e,n){var r,i=this.imageCache,o=this.animationHandler,a=this.state,s=a.nodes.idToItem,u=a.nodeBorderStyles,l=pl(t);try{for(l.s();!(r=l.n()).done;){var c=r.value;cl(e,dl(dl({},s[c.id]),c),i,o,u,n)}}catch(t){l.e(t)}finally{l.f()}}},{key:"renderRelationships",value:function(t,e,n){var r,i=this.state.relationshipBorderStyles.selected,o=this.arrowBundler,a=this.imageCache,s=pl(t);try{for(s.s();!(r=s.n()).done;){var u=r.value,l=o.getBundle(u),c=u.fromNode,f=u.toNode,h=u.showLabel;Su(e,u,c,f,l,a,h,i,n)}}catch(t){s.e(t)}finally{s.f()}}},{key:"getNodesAt",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=[],i=this.state.nodes,o=i.items,a=i.idToPosition,s=xr(),u=pl(o);try{var l=function(){var i=e.value,o=i.id,u=i.size,l=void 0===u?gr:u,c=a[o],f=c.x,h=c.y,d=Math.sqrt(Math.pow(t.x-f,2)+Math.pow(t.y-h,2));if(d<=(l+n)*s){var p=r.findIndex((function(t){return t.distance>d}));r.splice(-1!==p?p:r.length,0,{data:i,targetCoordinates:{x:f,y:h},pointerCoordinates:t,distanceVector:{x:t.x-f,y:t.y-h},insideNode:d<=l*s,distance:d})}};for(u.s();!(e=u.n()).done;)l()}catch(t){u.e(t)}finally{u.f()}return r}},{key:"getRelsAt",value:function(t){var e,n=[],r=this.state,i=this.arrowBundler,o=this.relationshipThreshold,a=r.zoom,s=r.rels.items,u=r.nodes.idToPosition,l=r.layout,c=a>o,f=pl(s);try{var h=function(){var r=e.value,o=i.getBundle(r),a=u[r.from],s=u[r.to];if(void 0!==a&&void 0!==s&&-1!==o.indexOf(r)){var f=function(t,e,n,r,i,o){var a=arguments.length>6&&void 0!==arguments[6]&&arguments[6];if(!Ps(n,r))return 1/0;var s=n===r?function(t,e,n,r){var i=xu(e,n,r),o=i.startPoint,a=i.endPoint,s=i.apexPoint,u=i.control1Point,l=i.control2Point,c=Rs(o,s,u,t),f=Rs(s,a,l,t);return Math.min(c,f)}(t,e,n,i):function(t,e,n,r,i,o,a){var s=vu(e,n,r,i,o,a),u=1/0;if(a&&3===s.length)u=Rs(s[0],s[2],s[1],t);else for(var l=1;l<s.length;l++){var c=s[l-1],f=s[l],h=Cs(c,f,t);u=h<u?h:u}return u}(t,e,i,n,r,o,a);return s}(t,r,a,s,o,c,l!==la);if(f<10){var h=n.findIndex((function(t){return t.distance>f}));n.splice(-1!==h?h:n.length,0,{data:r,fromTargetCoordinates:a,toTargetCoordinates:s,pointerCoordinates:t,distance:f})}}};for(f.s();!(e=f.n()).done;)h()}catch(t){f.e(t)}finally{f.f()}return n}},{key:"destroy",value:function(){this.stateDisposers.forEach((function(t){t()})),this.state.nodes.removeChannel(bl),this.state.rels.removeChannel(bl)}},{key:"isBoundingBoxOffScreen",value:function(t,e,n){var r=this.state,i=r.zoom,o=e/i,a=n/i,s=r.panX-o/2,u=r.panY-a/2,l=t.right<s,c=t.bottom<u,f=t.left>s+o,h=t.top>u+a;return l||f||c||h}},{key:"handleChannelUpdate",value:function(t,e,n){for(var r=Object.keys(t.adds),i=0;i<r.length;i++){var o=r[i];t.adds[o].activated&&this.activeNodes.add(o)}for(var a=Object.keys(t.removes),s=0;s<a.length;s++){var u=a[s];this.activeNodes.delete(u)}if(n)for(var l=Object.keys(t.updates),c=0;c<l.length;c++){var f=l[c];e.idToItem[f].activated?this.activeNodes.add(f):this.activeNodes.delete(f)}}},{key:"zoomAndPan",value:function(t,e){var n=e.width,r=e.height,i=this.state,o=i.zoom,a=i.panX,s=i.panY;t.translate(-n/2*o,-r/2*o),t.translate(-a*o,-s*o),t.scale(o,o),t.translate(n/2/o,r/2/o),t.translate(n/2,r/2)}}],n&&yl(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),xl=function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=function(e,n){if((0,t.isNil)(e)||(0,t.isNil)(n))return{offsetX:0,offsetY:0};var r=n.getBoundingClientRect(),i=window.devicePixelRatio||1;return{offsetX:i*(e.clientX-r.left-.5*r.width),offsetY:i*(e.clientY-r.top-.5*r.height)}}(e,n);return{x:i+a.offsetX/r,y:o+a.offsetY/r}};function _l(t){return _l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_l(t)}function Sl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Tl(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,El(r.key),r)}}function Al(t,e,n){return e&&Tl(t.prototype,e),n&&Tl(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Ol(t,e,n){return(e=El(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function El(t){var e=function(t,e){if("object"!=_l(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=_l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==_l(e)?e:String(e)}var Pl="WebGLRenderer",kl=function(){function e(t){var n=this;if(Sl(this,e),Ol(this,"mainSceneRenderer",void 0),Ol(this,"minimapRenderer",void 0),Ol(this,"needsRun",void 0),Ol(this,"minimapMouseDown",void 0),Ol(this,"stateDisposers",void 0),Ol(this,"state",void 0),void 0===t.state)throw new Error("Renderer missing options: state - state object");var r=t.state,i=t.mainSceneRenderer,o=t.minimapRenderer,a=r.nodes,s=r.rels;this.mainSceneRenderer=i,this.minimapRenderer=o,this.needsRun=!1,this.minimapMouseDown=!1,this.stateDisposers=[],this.stateDisposers.push(r.autorun((function(){n.updateMainViewport(r.zoom,r.panX,r.panY)}))),this.stateDisposers.push(r.autorun((function(){n.updateMinimapViewport(r.minimapZoom,r.minimapPanX,r.minimapPanY)}))),this.stateDisposers.push(r.autorun((function(){void 0!==r.nodes.version&&(n.needsRun=!0),void 0!==r.rels.version&&(n.needsRun=!0)}))),a.addChannel(Pl),s.addChannel(Pl),this.state=r,this.setupMinimapInteractions()}return Al(e,[{key:"needsToRun",value:function(){return this.needsRun||Object.keys(this.mainSceneRenderer.activeNodes).length>0}},{key:"renderMainScene",value:function(t){var e=this.state,n=e.nodes,r=e.rels;this.checkForUpdates(n,r),this.mainSceneRenderer.render(t,n,r),this.needsRun=!1}},{key:"renderMinimap",value:function(t){var e=this.state,n=e.nodes,r=e.rels;this.checkForUpdates(n,r),this.minimapRenderer.render(t,n,r),this.minimapRenderer.renderViewbox(),this.needsRun=!1}},{key:"checkForUpdates",value:function(t,e){var n=Object.values(t.channels[Pl].adds).length>0,r=Object.values(e.channels[Pl].adds).length>0,i=Object.values(t.channels[Pl].removes).length>0,o=Object.values(e.channels[Pl].removes).length>0,a=Object.values(t.channels[Pl].updates),s=Object.values(e.channels[Pl].updates);n||r||i||o?(this.mainSceneRenderer.setData({nodes:t.items,rels:e.items}),this.minimapRenderer.setData({nodes:t.items,rels:e.items})):(a.length>0&&(this.mainSceneRenderer.updateNodes(a),this.minimapRenderer.updateNodes(a)),s.length>0&&(this.mainSceneRenderer.updateRelationships(e.items),this.minimapRenderer.updateRelationships(e.items))),t.clearChannel(Pl),e.clearChannel(Pl)}},{key:"onResize",value:function(){var t=this.state,e=t.zoom,n=t.panX,r=t.panY,i=t.minimapZoom,o=t.minimapPanX,a=t.minimapPanY;this.updateMainViewport(e,n,r),this.updateMinimapViewport(i,o,a)}},{key:"updateMainViewport",value:function(t,e,n){this.mainSceneRenderer.updateViewport(t,e,n);var r=this.mainSceneRenderer.canvas.clientWidth,i=this.mainSceneRenderer.canvas.clientHeight;this.minimapRenderer.updateViewportBox(t,e,n,r,i),this.needsRun=!0}},{key:"updateMinimapViewport",value:function(t,e,n){this.minimapRenderer.updateViewport(t,e,n),this.needsRun=!0}},{key:"handleMinimapDrag",value:function(t){var e=this.state,n=this.minimapRenderer,r=xl(t,n.canvas,e.minimapZoom,e.minimapPanX,e.minimapPanY),i=r.x,o=r.y;e.setPan(i,o)}},{key:"handleMinimapWheel",value:function(e){var n=this.state,r=this.mainSceneRenderer;n.setZoom(function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return(0,t.isNil)(e)||isNaN(e.deltaY)?n:n-e.deltaY/500*Math.min(1,n)}(e,n.zoom),r.canvas),e.preventDefault()}},{key:"setupMinimapInteractions",value:function(){var t=this,e=this.minimapRenderer.canvas;e.addEventListener("mousedown",(function(e){t.handleMinimapDrag(e),t.minimapMouseDown=!0})),e.addEventListener("mousemove",(function(e){t.minimapMouseDown&&t.handleMinimapDrag(e)})),e.addEventListener("mouseup",(function(){t.minimapMouseDown=!1})),e.addEventListener("mouseleave",(function(){t.minimapMouseDown=!1})),e.addEventListener("wheel",(function(e){t.handleMinimapWheel(e)}))}},{key:"destroy",value:function(){this.stateDisposers.forEach((function(t){t()})),this.state.nodes.removeChannel(Pl),this.state.rels.removeChannel(Pl),this.mainSceneRenderer.destroy(),this.minimapRenderer.destroy()}}]),e}(),jl=function(){function t(){Sl(this,t),Ol(this,"mainSceneRenderer",void 0),Ol(this,"minimapRenderer",void 0),Ol(this,"needsRun",void 0),Ol(this,"minimapMouseDown",void 0),Ol(this,"stateDisposers",void 0),Ol(this,"state",void 0)}return Al(t,[{key:"renderMainScene",value:function(t){}},{key:"renderMinimap",value:function(t){}},{key:"checkForUpdates",value:function(t,e){}},{key:"onResize",value:function(){}},{key:"updateMainViewport",value:function(t,e,n){}},{key:"updateMinimapViewport",value:function(t,e,n){}},{key:"handleMinimapDrag",value:function(t){}},{key:"handleMinimapWheel",value:function(t){}},{key:"setupMinimapInteractions",value:function(){}},{key:"destroy",value:function(){}},{key:"needsToRun",value:function(){return!1}}]),t}();function Cl(t){return Cl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cl(t)}function Dl(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Rl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Rl(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Rl(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Il(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ml(r.key),r)}}function Ll(t,e,n){return(e=Ml(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ml(t){var e=function(t,e){if("object"!=Cl(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=Cl(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Cl(e)?e:String(e)}var Nl,Fl=24,Ul=function(t){var e=new ArrayBuffer(4),n=new Uint32Array(e),r=new Uint8Array(e),i=Co().get.rgb(t);return r[0]=i[0],r[1]=i[1],r[2]=i[2],r[3]=255*i[3],n[0]},zl=function(){function e(t,n,r,i){var o;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Ll(this,"nodeShader",void 0),Ll(this,"nodeAnimShader",void 0),Ll(this,"relShader",void 0),Ll(this,"relDataBuffer",void 0),Ll(this,"viewportBoxShader",void 0),Ll(this,"defaultRelColor",void 0),Ll(this,"defaultNodeColor",void 0),Ll(this,"disableRelColor",void 0),Ll(this,"disableNodeColor",void 0),Ll(this,"gl",void 0),Ll(this,"activeNodes",void 0),Ll(this,"canvas",void 0),Ll(this,"projection",void 0),Ll(this,"idToIndex",void 0),Ll(this,"posBuffer",void 0),Ll(this,"numRels",void 0),Ll(this,"numNodes",void 0),Ll(this,"nodeDataByte",void 0),Ll(this,"relIdToIndex",void 0),Ll(this,"relData",void 0),Ll(this,"viewportBoxBuffer",void 0),Ll(this,"relBuffer",void 0),Ll(this,"nodeBuffer",void 0),Ll(this,"posTexture",void 0),void 0===(null!==(o=t.getExtension("OES_texture_float"))&&void 0!==o?o:void 0))throw new Error("Renderer needs floating point texture support");this.nodeShader=new Pi(t,"uniform mat4 u_projection;\nuniform sampler2D u_positions;\nuniform mediump float u_zoom;\nuniform mediump float u_glAdjust;\nuniform lowp vec3 u_nodeBorderColor;\nuniform lowp vec3 u_selectedBorderColor;\nuniform lowp float u_drawDefaultBorder;\n\nattribute float a_size;\nattribute lowp vec2 a_index;\nattribute lowp vec4 a_color;\nattribute lowp float a_selected;\nattribute lowp float a_hovered;\n\nvarying lowp float window;\nvarying lowp vec4 color;\nvarying lowp float selected;\nvarying lowp float hovered;\nvarying lowp float varNodeSize;\nvarying lowp vec3 nodeBorderColor;\nvarying lowp vec3 selectedBorderColor;\nvarying lowp float drawDefaultBorder;\n\nlowp float MinNodeSize = 5.0;\n\nvoid main(void) {\n vec4 data = texture2D(u_positions, a_index);\n gl_Position = u_projection * vec4(data.xy, 0.0, 1.0);\n\n lowp float nodeSize = a_size * u_zoom * u_glAdjust;\n if (nodeSize < MinNodeSize) {\n gl_PointSize = MinNodeSize;\n varNodeSize = MinNodeSize;\n } else {\n gl_PointSize = nodeSize;\n varNodeSize = nodeSize;\n }\n\n color = a_color;\n selected = a_selected;\n hovered = a_hovered;\n nodeBorderColor = u_nodeBorderColor;\n selectedBorderColor = u_selectedBorderColor;\n drawDefaultBorder = u_drawDefaultBorder;\n}","uniform mediump float u_zoom;\nuniform mediump float u_glAdjust;\n\nvarying lowp vec4 color;\nvarying lowp float drawDefaultBorder;\nvarying lowp vec3 nodeBorderColor;\nvarying lowp vec3 selectedBorderColor;\nvarying lowp float selected;\nvarying lowp float hovered;\nvarying lowp float varNodeSize;\n\nmediump float circleSize = 0.40;\nmediump float ringSize = 0.43;\nmediump float ringSize2 = 0.47;\nmediump float shadowSize = 0.51;\nlowp vec3 shadowColor = vec3(0.73);\nlowp vec3 lineColor = vec3(1.0);\n\nlowp float getShadowAlpha(lowp float size, lowp float dist) {\n return (1.0 - smoothstep(size, shadowSize, dist)) * 0.25;\n}\n\nlowp float getCircleAlpha(lowp float ringSize, lowp float nodeSize, lowp float dist) {\n return color.w - smoothstep(ringSize - nodeSize, ringSize, dist);\n}\n\nvoid main() {\n lowp float dist = distance(gl_PointCoord, vec2(0.5));\n\n if (dist > 0.51) {\n discard;\n }\n else {\n lowp float nodeSize = 1.0 / varNodeSize;\n lowp float nodeAlpha = getCircleAlpha(circleSize, nodeSize, dist);\n lowp float ringAlpha = getCircleAlpha(ringSize, nodeSize, dist);\n lowp vec3 finalColor = color.xyz;\n lowp float finalAlpha = nodeAlpha;\n\n if (selected > 0.0) {\n lowp float shadowAlpha = getShadowAlpha(ringSize2, dist);\n lowp float ringAlpha2 = getCircleAlpha(ringSize2, nodeSize, dist);\n\n finalColor = mix(lineColor, finalColor, nodeAlpha);\n finalColor = mix(selectedBorderColor, finalColor, ringAlpha);\n finalColor = mix(shadowColor, finalColor, ringAlpha2);\n finalAlpha = max(shadowAlpha, max(nodeAlpha, max(ringAlpha, ringAlpha2)));\n } else if (hovered > 0.0) {\n if (drawDefaultBorder > 0.0) {\n lowp float shadowAlpha = getShadowAlpha(ringSize, dist);\n \n finalColor = mix(nodeBorderColor, finalColor, nodeAlpha);\n finalColor = mix(shadowColor, finalColor, ringAlpha);\n finalAlpha = max(shadowAlpha, max(nodeAlpha, ringAlpha));\n } else {\n lowp float shadowAlpha = getShadowAlpha(circleSize, dist);\n\n finalColor = mix(shadowColor, finalColor, nodeAlpha);\n finalAlpha = max(shadowAlpha, nodeAlpha);\n }\n } else {\n if (drawDefaultBorder > 0.0) {\n finalColor = mix(nodeBorderColor, finalColor, nodeAlpha);\n finalAlpha = ringAlpha;\n }\n }\n gl_FragColor = vec4(finalColor, 1.0) * finalAlpha;\n }\n}\n"),this.nodeAnimShader=new Pi(t,"uniform mat4 u_projection;\nuniform sampler2D u_positions;\nuniform lowp float u_animPos;\nuniform mediump float u_zoom;\nuniform mediump float u_glAdjust;\n\nattribute float a_size;\nattribute lowp vec2 a_index;\nattribute lowp vec4 a_color;\nattribute lowp float a_active;\n\nvarying lowp float varNodeSize;\nvarying lowp vec4 color;\n\nvoid main(void) {\n vec4 data = texture2D(u_positions, a_index);\n\n gl_Position = u_projection * vec4(data.xy, 0.0, 1.0);\n\n float nodeSize = a_size * u_zoom * u_glAdjust;\n nodeSize = nodeSize * (0.4 / 0.5); // Remove extra space added for shadow and selection ring\n\n gl_PointSize = a_active > 0.5\n ? nodeSize + 0.88 * nodeSize * u_animPos\n : 0.0;\n\n color = a_color;\n varNodeSize = a_size;\n}","uniform mediump float u_zoom;\nuniform lowp float u_animPos;\nuniform mediump float u_glAdjust;\n\nvarying lowp vec4 color;\nvarying lowp float varNodeSize;\nmediump float circleSize = 0.50;\n\nvoid main(void) {\n\n lowp float dist = distance(gl_PointCoord, vec2(0.5));\n\n if (dist > 0.51) {\n discard;\n }\n else {\n lowp float alpha = 1.0 - smoothstep(circleSize - (1.0 / (varNodeSize * 2.0 * u_zoom * u_glAdjust)), circleSize, dist);\n lowp float pulseAlpha = 0.9 - 0.9 * u_animPos;\n gl_FragColor = vec4(color.xyz, 1.0) * alpha * pulseAlpha;\n }\n}\n"),this.relShader=new Pi(t,"uniform mat4 u_projection;\nuniform sampler2D u_positions;\nuniform mediump float u_glAdjust;\n\nattribute vec2 a_from;\nattribute vec2 a_to;\nattribute lowp vec4 a_color;\nattribute lowp float a_triside;\nattribute float a_width;\n\nvarying lowp vec4 color;\n\nvoid main(void) {\n vec4 from = texture2D(u_positions, a_from);\n vec4 to = texture2D(u_positions, a_to);\n vec2 direction = normalize(to.xy - from.xy);\n direction = vec2(-direction.y, direction.x);\n\n float width = a_width * u_glAdjust * 0.5;\n\n if (a_triside == 0.0) {\n from.y += (width / 2.0) * direction.y;\n from.x += (width / 2.0) * direction.x;\n } else {\n from.y -= (width / 2.0) * direction.y;\n from.x -= (width / 2.0) * direction.x;\n }\n\n color = a_color;\n gl_Position = u_projection * vec4(from.xy, 0.0, 1.0);\n}\n","varying lowp vec4 color;\n\nvoid main(void) {\n gl_FragColor = vec4(color.xyz, 1.0) * color.w;\n}\n"),this.viewportBoxShader=new Pi(t,"attribute vec2 coordinates;\nuniform mat4 u_projection;\n\nvoid main(void) {\n gl_Position = u_projection * vec4(coordinates, 0.0, 1.0);\n}\n","void main(void) {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n}\n"),this.setShaderUniforms(i),t.clearColor(0,0,0,0),t.disable(t.DEPTH_TEST),this.defaultRelColor=4284900966,this.defaultNodeColor=4294937415,this.disableRelColor="#EDEDED",this.disableNodeColor="#EDEDED",t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA),this.gl=t,this.activeNodes={},this.canvas=t.canvas,this.projection=wi(),this.setData({nodes:n.items,rels:r.items}),this.createPositionTexture(),this.setupViewportRendering()}var n,r;return n=e,r=[{key:"setShaderUniforms",value:function(t){var e,n,r=Co().get.rgb(null===(e=t.nodeBorderStyles.default)||void 0===e||null===(e=e.rings[0])||void 0===e?void 0:e.color),i=Co().get.rgb(null===(n=t.nodeBorderStyles.selected)||void 0===n||null===(n=n.rings[1])||void 0===n?void 0:n.color);if(this.nodeShader.use(),null!=r&&r.length){var o=r.slice(0,3).map((function(t){return t/255}));this.nodeShader.setUniform("u_nodeBorderColor",o),this.nodeShader.setUniform("u_drawDefaultBorder",1)}else this.nodeShader.setUniform("u_drawDefaultBorder",0);var a=i.slice(0,3).map((function(t){return t/255}));this.nodeShader.setUniform("u_selectedBorderColor",a)}},{key:"setData",value:function(t){var e=Ar(t.rels);this.setupNodeRendering(t.nodes),this.setupRelationshipRendering(e)}},{key:"render",value:function(t,e,n){var r,i=this.gl,o=this.idToIndex,a=Dl(t);try{for(a.s();!(r=a.n()).done;){var s=r.value,u=o[s.id];this.posBuffer[4*u+0]=s.x,this.posBuffer[4*u+1]=s.y}}catch(t){a.e(t)}finally{a.f()}i.bindTexture(i.TEXTURE_2D,this.posTexture),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,yr,yr,0,i.RGBA,i.FLOAT,this.posBuffer),i.enable(i.BLEND),i.bindFramebuffer(i.FRAMEBUFFER,null),i.clear(i.COLOR_BUFFER_BIT),i.viewport(0,0,i.drawingBufferWidth,i.drawingBufferHeight),this.renderAnimations(this.posTexture),this.numRels>0&&(this.relShader.use(),this.relShader.setUniform("u_positions",this.posTexture),i.bindBuffer(i.ARRAY_BUFFER,this.relBuffer),this.relShader.setAttributePointerByteNorm("a_color",4,0,16),this.relShader.setAttributePointerByteNorm("a_from",2,4,16),this.relShader.setAttributePointerByteNorm("a_to",2,6,16),this.relShader.setAttributePointerByteNorm("a_triside",1,8,16),this.relShader.setAttributePointerFloat("a_width",1,12,16),i.drawArrays(i.TRIANGLES,0,6*this.numRels)),this.numNodes>0&&(this.nodeShader.use(),this.nodeShader.setUniform("u_positions",this.posTexture),i.bindBuffer(i.ARRAY_BUFFER,this.nodeBuffer),this.nodeShader.setAttributePointerByteNorm("a_color",4,0,12),this.nodeShader.setAttributePointerByteNorm("a_selected",1,4,12),this.nodeShader.setAttributePointerByteNorm("a_index",2,5,12),this.nodeShader.setAttributePointerByte("a_size",4,8,12),this.nodeShader.setAttributePointerByteNorm("a_hovered",1,9,12),i.drawArrays(i.POINTS,0,this.numNodes))}},{key:"renderViewbox",value:function(){var t=this.gl,e=this.projection,n=this.viewportBoxBuffer;this.viewportBoxShader.use(),this.viewportBoxShader.setUniform("u_projection",e),t.bindBuffer(t.ARRAY_BUFFER,n),this.viewportBoxShader.setAttributePointerFloat("coordinates",2,0,0),t.drawArrays(t.LINES,0,8)}},{key:"updateNodes",value:function(e){var n,r=this.gl,i=this.idToIndex,o=this.disableNodeColor,a=this.nodeBuffer,s=this.nodeDataByte,u=!1,l=Dl(e);try{for(l.s();!(n=l.n()).done;){var c=n.value,f=i[c.id];if(!(0,t.isNil)(c.color)||!0===c.disabled){var h=Co().get.rgb(!0===c.disabled?o:c.color);this.nodeDataByte[3*f*4+0]=h[0],this.nodeDataByte[3*f*4+1]=h[1],this.nodeDataByte[3*f*4+2]=h[2],this.nodeDataByte[3*f*4+3]=255*h[3],u=!0}if(void 0!==c.selected){var d=c.selected;this.nodeDataByte[3*f*4+4]=d?255:0,u=!0}if(void 0!==c.activated&&(this.nodeDataByte[3*f*4+7]=c.activated?255:0,u=!0,c.activated?this.activeNodes[c.id]=!0:delete this.activeNodes[c.id]),void 0!==c.hovered){var p=!0!==c.disabled&&c.hovered;this.nodeDataByte[3*f*4+9]=p?255:0,u=!0}if(void 0!==c.size){var v=c.size;this.nodeDataByte[3*f*4+8]=v||gr,u=!0}}}catch(t){l.e(t)}finally{l.f()}u&&(r.bindBuffer(r.ARRAY_BUFFER,a),r.bufferData(r.ARRAY_BUFFER,s,r.DYNAMIC_DRAW))}},{key:"updateRelationships",value:function(t){var e,n=Ar(t),r=this.gl,i=!1,o=Dl(n);try{for(o.s();!(e=o.n()).done;){var a=e.value,s=a.key,u=a.width,l=a.color,c=a.disabled,f=this.relIdToIndex[s],h=void 0===l?this.defaultRelColor:Ul(!0===c?this.disableRelColor:l);this.relData.positionsAndColors[f*Fl+0]=h,this.relData.positionsAndColors[f*Fl+4]=h,this.relData.positionsAndColors[f*Fl+8]=h,this.relData.positionsAndColors[f*Fl+12]=h,this.relData.positionsAndColors[f*Fl+16]=h,this.relData.positionsAndColors[f*Fl+20]=h,i=!0,void 0!==u&&(this.relData.widths[f*Fl+3]=u,this.relData.widths[f*Fl+7]=u,this.relData.widths[f*Fl+11]=u,this.relData.widths[f*Fl+15]=u,this.relData.widths[f*Fl+19]=u,this.relData.widths[f*Fl+23]=u,i=!0)}}catch(t){o.e(t)}finally{o.f()}i&&(r.bindBuffer(r.ARRAY_BUFFER,this.relBuffer),r.bufferData(r.ARRAY_BUFFER,this.relDataBuffer,r.DYNAMIC_DRAW))}},{key:"createPositionTexture",value:function(){var t=this.gl,e=t.createTexture(),n=new Float32Array(262144);t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,yr,yr,0,t.RGBA,t.FLOAT,n),this.posTexture=e,this.posBuffer=n}},{key:"updateViewportBox",value:function(t,e,n,r,i){var o=this.gl,a=xr(),s=r*a,u=i*a,l=(.5*s+e*t)/t,c=(.5*u+n*t)/t,f=(.5*-s+e*t)/t,h=(.5*-u+n*t)/t,d=[l,c,f,c,f,c,f,h,f,h,l,h,l,h,l,c];o.bindBuffer(o.ARRAY_BUFFER,this.viewportBoxBuffer),o.bufferData(o.ARRAY_BUFFER,new Float32Array(d),o.DYNAMIC_DRAW)}},{key:"updateViewport",value:function(t,e,n){var r=this.gl,i=1/t,o=e-r.drawingBufferWidth*i*.5,a=n-r.drawingBufferHeight*i*.5,s=r.drawingBufferWidth*i,u=r.drawingBufferHeight*i,l=wi(),c=2.6315789473684212*xr();xi(l,o,o+s,a+u,a,0,1e6),this.nodeShader.use(),this.nodeShader.setUniform("u_zoom",t),this.nodeShader.setUniform("u_glAdjust",c),this.nodeShader.setUniform("u_projection",l),this.nodeAnimShader.use(),this.nodeAnimShader.setUniform("u_zoom",t),this.nodeAnimShader.setUniform("u_glAdjust",c),this.nodeAnimShader.setUniform("u_projection",l),this.relShader.use(),this.relShader.setUniform("u_glAdjust",c),this.relShader.setUniform("u_projection",l),this.projection=l}},{key:"setupViewportRendering",value:function(){this.viewportBoxBuffer=this.gl.createBuffer()}},{key:"setupNodeRendering",value:function(e){var n=this.gl,r=new ArrayBuffer(8),i=new Uint32Array(r),o=new Uint8Array(r);void 0===this.nodeBuffer&&(this.nodeBuffer=n.createBuffer()),this.numNodes=e.length;var a=new ArrayBuffer(3*e.length*8),s=new Uint32Array(a),u={};this.activeNodes={};for(var l=0;l<e.length;l++){var c=e[l],f=c.selected,h=c.hovered,d=c.color,p=c.activated,v=c.size,y=c.id,m=c.disabled,g=(0,t.isNil)(d)?this.defaultNodeColor:Ul(d);s[3*l+0]=!0===m?Ul(this.disableNodeColor):g,o[0]=!0===f?255:0,o[1]=l%yr,o[2]=Math.floor(l/yr),o[3]=!0===p?255:0,o[4]=!1===m&&!0===h?255:0,!0===p&&(this.activeNodes[y]=!0),s[3*l+1]=i[0],s[3*l+2]=null!=v?v:gr,s[3*l+3]=i[1],u[y]=l}n.bindBuffer(n.ARRAY_BUFFER,this.nodeBuffer),n.bufferData(n.ARRAY_BUFFER,s,n.DYNAMIC_DRAW),this.numNodes=e.length,this.nodeDataByte=new Uint8Array(a),this.idToIndex=u}},{key:"setupRelationshipRendering",value:function(e){var n=this,r=this.gl,i=new ArrayBuffer(4),o=new Uint32Array(i),a=new Uint8Array(i),s={};void 0===this.relBuffer&&(this.relBuffer=r.createBuffer());for(var u=new ArrayBuffer(e.length*Fl*4),l=new Uint32Array(u),c=new Float32Array(u),f=function(r){var i=e[r],u=i.from,f=i.to,h=i.color,d=i.width,p=i.key,v=i.disabled,y=n.idToIndex[u],m=n.idToIndex[f],g=y%yr,b=Math.floor(y/yr),w=m%yr,x=Math.floor(m/yr),_=[g,b,w,x],S=[w,x,g,b],T=(0,t.isNil)(h)?n.defaultRelColor:Ul(h),A=!0===v?Ul(n.disableRelColor):T,O=null!=d?d:1;s[p]=r;var E=0,P=function(t,e,n,i){l[r*Fl+E]=t,E+=1;for(var s=0;s<e.length;s++)a[s]=e[s];l[r*Fl+E]=o[0],E+=1,a[0]=n,l[r*Fl+E]=o[0],c[r*Fl+(E+=1)]=i,E+=1};P(A,_,255,O),P(A,S,0,O),P(A,_,0,O),P(A,S,0,O),P(A,_,0,O),P(A,S,255,O)},h=0;h<e.length;h++)f(h);r.bindBuffer(r.ARRAY_BUFFER,this.relBuffer),r.bufferData(r.ARRAY_BUFFER,u,r.DYNAMIC_DRAW),this.numRels=e.length,this.relDataBuffer=u,this.relData={positionsAndColors:l,widths:c},this.relIdToIndex=s}},{key:"renderAnimations",value:function(t){var e=this.gl,n=this.nodeBuffer,r=this.numNodes,i=Date.now()%1e3/1e3,o=i<.7?i/.7:0;this.nodeAnimShader.use(),this.nodeAnimShader.setUniform("u_positions",t),this.nodeAnimShader.setUniform("u_animPos",o),e.bindBuffer(e.ARRAY_BUFFER,n),this.nodeAnimShader.setAttributePointerByteNorm("a_color",4,0,12),this.nodeAnimShader.setAttributePointerByteNorm("a_active",1,7,12),this.nodeAnimShader.setAttributePointerByteNorm("a_index",2,5,12),this.nodeAnimShader.setAttributePointerByte("a_size",4,8,12),e.drawArrays(e.POINTS,0,r)}},{key:"destroy",value:function(){this.gl.deleteBuffer(this.nodeBuffer),this.gl.deleteBuffer(this.relBuffer),this.nodeShader.remove(),this.nodeAnimShader.remove(),this.relShader.remove()}}],r&&Il(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),e}(),Bl=function(t,e,n){var r=xr();t.width=e*r,t.height=n*r,t.style.width="".concat(e,"px"),t.style.height="".concat(n,"px")},Vl=function(t){Vr.warn("Error: WebGL context lost - visualization will stop working!",t),void 0!==Nl&&Nl(t)},Gl=function(t){var e=t.parentElement.getBoundingClientRect(),n=e.width,r=e.height;Bl(t,n,r)},Wl=function(t,e){var n=document.createElement("canvas");return document.body.appendChild(n),Bl(n,t,e),n},Xl=function(t,e){var n=document.createElement("canvas");return Object.assign(n.style,wr),void 0!==t&&(t.appendChild(n),Gl(n)),function(t,e){Nl=e,t.addEventListener("webglcontextlost",Vl)}(n,e),n},Hl=function(t){t.width=0,t.height=0,t.remove()},Yl=function(t){return t.getContext("2d")},$l=function(t){var e={antialias:!0},n=t.getContext("webgl",e);return null===n&&(n=t.getContext("experimental-webgl",e)),function(t){return t instanceof WebGLRenderingContext}(n)?n:null},ql=function(t){t.canvas.removeEventListener("webglcontextlost",Vl);var e=t.getExtension("WEBGL_lose_context");null==e||e.loseContext()};function Zl(t){return function(t){if(Array.isArray(t))return Ql(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Jl(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Kl(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Jl(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Jl(t,e){if(t){if("string"==typeof t)return Ql(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ql(t,e):void 0}}function Ql(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var tc=gr*xr();function ec(t){return ec="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ec(t)}function nc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,rc(r.key),r)}}function rc(t){var e=function(t,e){if("object"!=ec(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=ec(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ec(e)?e:String(e)}var ic=function(){function t(){var e,n,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,r=void 0,(n=rc(n="callbacks"))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,this.callbacks={}}var e,n;return e=t,n=[{key:"register",value:function(t,e){this.isCallbackRegistered(t)||(this.callbacks[t]=[]),this.callbacks[t].push(e)}},{key:"isCallbackRegistered",value:function(t){return void 0!==this.callbacks[t]}},{key:"callIfRegistered",value:function(){var t,e=arguments,n=Array.prototype.slice.call(arguments)[0];t=n,s.includes(t)&&this.isCallbackRegistered(n)&&this.callbacks[n].slice(0).forEach((function(t){return t.apply(null,Array.prototype.slice.call(e,1))}))}}],n&&nc(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),oc=i(481),ac=i.n(oc);function sc(t){return sc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sc(t)}function uc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,cc(r.key),r)}}function lc(t,e,n){return(e=cc(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function cc(t){var e=function(t,e){if("object"!=sc(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=sc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==sc(e)?e:String(e)}var fc=5e-5,hc=function(){function t(e){var n,r=this,i=e.state,o=e.getNodePositions,a=e.canvas;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),lc(this,"xCtrl",void 0),lc(this,"yCtrl",void 0),lc(this,"zoomCtrl",void 0),lc(this,"getNodePositions",void 0),lc(this,"firstUpdate",void 0),lc(this,"state",void 0),lc(this,"canvas",void 0),lc(this,"stateDisposers",void 0),this.state=i,this.getNodePositions=o,this.canvas=a,this.xCtrl=new(ac())(.35,fc,.05,1),this.yCtrl=new(ac())(.35,fc,.05,1),this.zoomCtrl=new(ac())(.3,1e-5,.01,1),this.stateDisposers=[],this.stateDisposers.push(i.autorun((function(){null===i.fitNodeIds&&(r.xCtrl.reset(),r.yCtrl.reset(),r.zoomCtrl.reset())}))),this.stateDisposers.push(i.autorun((function(){n!==i.fitNodeIds&&(n=i.fitNodeIds,r.firstUpdate=!0)}))),this.stateDisposers.push(i.autorun((function(){i.resetZoom&&(r.firstUpdate=!0)})))}var e,n;return e=t,n=[{key:"needsToRun",value:function(){var t=this.state,e=t.fitNodeIds,n=t.resetZoom;return e.length>0||n}},{key:"update",value:function(t,e){var n=this.state,r=n.fitNodeIds,i=n.resetZoom;r.length>0?this.fitNodes(r,t,e):i&&this.reset(t,e)}},{key:"destroy",value:function(){this.stateDisposers.forEach((function(t){return t()}))}},{key:"recalculateTarget",value:function(t,e,n,r){for(var i=this.xCtrl,o=this.yCtrl,a=this.zoomCtrl,s=this.state,u=[],l=0;l<t.length;l++)u.push({id:t[l]});var c=s.zoom,f=s.panX,h=s.panY,d=s.maxNodeRadius,p=s.nodes,v=s.defaultZoomLevel,y=this.getNodePositions(u);p.updatePositions(y);var m=Lo(y,d),g=m.centerX,b=m.centerY,w=m.nodesWidth,x=m.nodesHeight;if(isNaN(g)||isNaN(b))return Vr.info("fit() function couldn't calculate center point, not updating viewport"),!1;var _=e.noPan,S=e.outOnly,T=e.minZoom,A=e.maxZoom;i.setTarget(_?f:g),o.setTarget(_?h:b);var O=Mo(w,x,n,r),E=O.zoomX,P=O.zoomY;if(E===1/0&&P===1/0)a.setTarget(v);else{var k=No(E,P,T,A);S&&c<k?a.setTarget(c):a.setTarget(k)}return!0}},{key:"allNodesAreVisible",value:function(t,e,n){var r=Mo(e,n,this.canvas.width,this.canvas.height),i=r.zoomX,o=r.zoomY;return t<i&&t<o}},{key:"reset",value:function(t,e){var n=this.xCtrl,r=this.yCtrl,i=this.zoomCtrl,o=this.state,a=this.firstUpdate,s=this.canvas,u=o.zoom,l=o.panX,c=o.panY,f=o.nodes,h=o.maxNodeRadius,d=o.defaultZoomLevel;if(a||t){i.setTarget(d);var p=Lo(Object.values(f.idToPosition),h),v=p.centerX,y=p.centerY,m=p.nodesWidth,g=p.nodesHeight;this.allNodesAreVisible(u,m,g)?(n.setTarget(v),r.setTarget(y)):(n.setTarget(l),r.setTarget(c)),this.firstUpdate=!1}var b=u+i.update(u),w=l+n.update(l),x=c+r.update(c);o.updateZoomToFit(b,w,x,s),Math.abs(i.target-b)<.01&&(o.updateZoomToFit(d,w,x,s),o.clearReset(),void 0!==e&&e())}},{key:"fitNodes",value:function(t,e,n){var r=this.state,i=this.firstUpdate,o=this.canvas,a=this.xCtrl,s=this.yCtrl,u=this.zoomCtrl,l=r.zoomOptions,c=void 0===l?{}:l,f=r.zoom,h=r.panX,d=r.panY,p=!0;if(i||e){var v=o.width,y=o.height;p=this.recalculateTarget(t,c,v,y),this.firstUpdate=!1}if(p){var m=h+a.update(h),g=d+s.update(d),b=f+u.update(f);r.updateZoomToFit(b,m,g,o);var w=Math.max(5,10/u.target),x=Math.min(.01,.01*u.target);!e&&Math.abs(u.target-b)<x&&Math.abs(a.target-m)<w&&Math.abs(s.target-g)<w&&(r.setZoom(this.zoomCtrl.target,o),r.clearFit(),void 0!==n&&n())}}}],n&&uc(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function dc(t){return dc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dc(t)}function pc(){pc=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var o=e&&e.prototype instanceof m?e:m,a=Object.create(o.prototype),s=new j(r||[]);return i(a,"_invoke",{value:O(t,n,s)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=c;var h="suspendedStart",d="suspendedYield",p="executing",v="completed",y={};function m(){}function g(){}function b(){}var w={};l(w,a,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(C([])));_&&_!==n&&r.call(_,a)&&(w=_);var S=b.prototype=m.prototype=Object.create(w);function T(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function n(i,o,a,s){var u=f(t[i],t,o);if("throw"!==u.type){var l=u.arg,c=l.value;return c&&"object"==dc(c)&&r.call(c,"__await")?e.resolve(c.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(c).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function O(e,n,r){var i=h;return function(o,a){if(i===p)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=E(s,r);if(u){if(u===y)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var l=f(e,n,r);if("normal"===l.type){if(i=r.done?v:d,l.arg===y)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=v,r.method="throw",r.arg=l.arg)}}}function E(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,E(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var o=f(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,y):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function C(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(dc(e)+" is not iterable")}return g.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=l(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},T(A.prototype),l(A.prototype,s,(function(){return this})),e.AsyncIterator=A,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new A(c(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},T(S),l(S,u,"Generator"),l(S,a,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=C,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(k),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),k(n),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:C(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),y}},e}function vc(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function yc(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function mc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function gc(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?mc(Object(n),!0).forEach((function(e){wc(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):mc(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function bc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,xc(r.key),r)}}function wc(t,e,n){return(e=xc(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function xc(t){var e=function(t,e){if("object"!=dc(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=dc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==dc(e)?e:String(e)}var _c="NvlController",Sc={filename:"visualisation.png",backgroundColor:"rgba(0,0,0,0)"},Tc="onError",Ac="onLayoutDone",Oc={},Ec=function(){var t;return null!==(t=Oc[arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default"])&&void 0!==t?t:Object.values(Oc).pop()},Pc=function(){function t(e,n){var r,i,o,a=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),wc(this,"destroyed",void 0),wc(this,"state",void 0),wc(this,"callbacks",void 0),wc(this,"instanceId",void 0),wc(this,"glController",void 0),wc(this,"webGLContext",void 0),wc(this,"webGLMinimapContext",void 0),wc(this,"htmlOverlay",void 0),wc(this,"hasResized",void 0),wc(this,"hierarchicalLayout",void 0),wc(this,"gridLayout",void 0),wc(this,"freeLayout",void 0),wc(this,"d3ForceLayout",void 0),wc(this,"forceLayout",void 0),wc(this,"canvasRenderer",void 0),wc(this,"glCanvas",void 0),wc(this,"canvasRect",void 0),wc(this,"glMinimapCanvas",void 0),wc(this,"c2dCanvas",void 0),wc(this,"isInRenderSwitchAnimation",void 0),wc(this,"justSwitchedRenderer",void 0),wc(this,"justSwitchedLayout",void 0),wc(this,"layoutUpdating",void 0),wc(this,"layoutComputing",void 0),wc(this,"isRenderingDisabled",void 0),wc(this,"setRenderSwitchAnimation",void 0),wc(this,"stateDisposers",void 0),wc(this,"zoomTransitionHandler",void 0),wc(this,"currentLayout",void 0),wc(this,"layoutTimeLimit",void 0),wc(this,"pixelRatio",void 0),wc(this,"removeResizeListener",void 0),wc(this,"removeMinimapResizeListener",void 0),wc(this,"pendingZoomOperation",void 0),wc(this,"layoutRunner",void 0),wc(this,"animationRequestId",void 0),wc(this,"layoutDoneCallback",void 0),wc(this,"layoutComputingCallback",void 0),wc(this,"currentLayoutType",void 0),this.destroyed=!1;var s=n.frame,u=n.minimapContainer,l=void 0===u?document.createElement("span"):u,c=n.layoutOptions,f=n.layout,h=n.instanceId,d=void 0===h?"default":h,p=e.nodes,v=e.rels,y=e.webGLVisible,m=e.disableWebGL;this.state=e,this.callbacks=new ic,this.instanceId=d;var g=s;g.setAttribute("instanceId",d),g.setAttribute("data-testid","nvl-parent"),null!==(r=g.style.height)&&void 0!==r&&r.length||Object.assign(g.style,{height:"100%"}),null!==(i=g.style.outline)&&void 0!==i&&i.length||Object.assign(g.style,{outline:"none"});var b=Xl(g,this.onWebGLContextLost.bind(this)),w=Xl(l,this.onWebGLContextLost.bind(this));if(b.setAttribute("data-testid","nvl-gl-canvas"),m)this.glController=new jl;else{var x=$l(b),_=$l(w);this.glController=new kl({mainSceneRenderer:new zl(x,p,v,this.state),minimapRenderer:new zl(_,p,v,this.state),state:e}),this.webGLContext=x,this.webGLMinimapContext=_}var S=Xl(g,this.onWebGLContextLost.bind(this));S.setAttribute("data-testid","nvl-c2d-canvas");var T=S.getContext("2d"),A=document.createElement("div");Object.assign(A.style,gc(gc({},wr),{},{overflow:"hidden"})),g.appendChild(A),this.htmlOverlay=A,this.hasResized=!0,this.hierarchicalLayout=new Ua(gc(gc({},c),{},{state:this.state})),this.gridLayout=new ko({state:this.state}),this.freeLayout=new wo({state:this.state}),this.d3ForceLayout=new zr({state:this.state}),this.forceLayout=m?this.d3ForceLayout:new lo(gc(gc({},c),{},{webGLContext:this.webGLContext,state:this.state})),this.state.setLayout(f),this.state.setLayoutOptions(c);var O=new wl(S,T,e,n);this.canvasRenderer=O,this.glCanvas=b,this.canvasRect=b.getBoundingClientRect(),this.glMinimapCanvas=w,this.c2dCanvas=S,this.glCanvas.style.opacity=y?"1":"0",this.c2dCanvas.style.opacity=y?"0":"1",this.isInRenderSwitchAnimation=!1,this.justSwitchedRenderer=!1,this.justSwitchedLayout=!1,this.hasResized=!1,this.layoutUpdating=!1,this.layoutComputing=!1,this.isRenderingDisabled=!1,p.addChannel(_c),v.addChannel(_c),this.setRenderSwitchAnimation=function(){a.isInRenderSwitchAnimation=!1},this.stateDisposers=[],this.stateDisposers.push(e.autorun((function(){a.callIfRegistered("zoom",e.zoom)}))),this.stateDisposers.push(e.autorun((function(){a.callIfRegistered("pan",{panX:e.panX,panY:e.panY})}))),this.stateDisposers.push(e.autorun((function(){a.setLayout(e.layout)}))),this.stateDisposers.push(e.autorun((function(){a.setLayoutOptions(e.layoutOptions)}))),this.stateDisposers.push(e.autorun((function(){var t=e.webGLVisible?"1":"0";t!==a.glCanvas.style.opacity&&(a.justSwitchedRenderer=!0,a.glCanvas.style.opacity=t,a.c2dCanvas.style.opacity=e.webGLVisible?"0":"1")}))),this.startMainLoop(),this.zoomTransitionHandler=new hc({state:e,getNodePositions:function(t){return a.currentLayout.getNodePositions(t)},canvas:b}),this.layoutTimeLimit=null!==(o=n.layoutTimeLimit)&&void 0!==o?o:16,this.pixelRatio=xr(),this.removeResizeListener=On()(g,(function(){Gl(b),Gl(S),a.canvasRect=b.getBoundingClientRect(),a.hasResized=!0})),this.removeMinimapResizeListener=On()(l,(function(){Gl(w)})),Oc[d]=this,window.__Nvl_dumpNodes=function(t){var e;return null===(e=Ec(t))||void 0===e?void 0:e.dumpNodes()},window.__Nvl_dumpRelationships=function(t){var e;return null===(e=Ec(t))||void 0===e?void 0:e.dumpRelationships()},window.__Nvl_registerDoneCallback=function(t,e){var n;return null===(n=Ec(e))||void 0===n?void 0:n.on(Ac,t)},window.__Nvl_getNodesOnScreen=function(t){var e;return null===(e=Ec(t))||void 0===e?void 0:e.getNodesOnScreen()},window.__Nvl_getZoomLevel=function(t){var e;return null===(e=Ec(t))||void 0===e?void 0:e.getScale()},this.pendingZoomOperation=null}var e,n,r,i;return e=t,n=[{key:"onWebGLContextLost",value:function(t){this.callIfRegistered("onWebGLContextLost",t)}},{key:"updateMinimapZoom",value:function(){var t=this.state,e=t.nodes,n=t.maxNodeRadius,r=t.maxMinimapZoom,i=t.minMinimapZoom,o=Lo(Object.values(e.idToPosition),n),a=o.centerX,s=o.centerY,u=o.nodesWidth,l=o.nodesHeight,c=Mo(u,l,this.glMinimapCanvas.width,this.glMinimapCanvas.height),f=c.zoomX,h=c.zoomY,d=No(f,h,i,r);this.state.updateMinimapZoomToFit(d,a,s)}},{key:"startMainLoop",value:function(){var t=this,e=this.state,n=e.nodes,r=e.rels;this.currentLayout.update();var i=this.currentLayout.getNodePositions(n.items);n.updatePositions(i),this.isRenderingDisabled||(this.glController.renderMainScene(i),this.glController.renderMinimap(i),this.canvasRenderer.processUpdates(),this.canvasRenderer.render(i)),this.layoutRunner=setInterval((function(){try{!function(){var e=t.currentLayout.getShouldUpdate(),n=e||t.justSwitchedLayout,r=n&&!t.layoutUpdating&&!t.justSwitchedLayout;if(n)for(var i=window.performance.now(),o=r?0:50,a=0;a<o;a++){t.currentLayout.update(t.justSwitchedLayout),t.justSwitchedLayout=!1;var s=window.performance.now();if(!e||s-i>t.layoutTimeLimit)break}}()}catch(e){if(!t.callbacks.isCallbackRegistered(Tc))throw e;t.callIfRegistered(Tc,e)}}),13),this.animationRequestId=window.requestAnimationFrame((function e(){try{!function(e){if(t.destroyed)Vr.info("STEP IN A DESTROYED STRIP");else{var i=xr();if(i!==t.pixelRatio)return t.pixelRatio=i,void t.callIfRegistered("restart");var o=t.currentLayout.getShouldUpdate(),a=o||t.justSwitchedLayout,s=t.currentLayout.getComputing(),u=t.zoomTransitionHandler.needsToRun(),l=a&&!t.layoutUpdating&&!t.justSwitchedLayout,c=t.layoutComputing&&!s,f=t.state.webGLVisible&&t.glController.needsToRun(),h=!t.state.webGLVisible&&t.canvasRenderer.needsToRun(),d=t.isInRenderSwitchAnimation||t.justSwitchedRenderer,p=t.hasResized,v=null!==t.pendingZoomOperation,y=t.glController.minimapMouseDown;if(n.clearChannel(_c),r.clearChannel(_c),u||a||c||d||f||h||y||p||v){!v||l||t.currentLayout.getComputing()||(t.pendingZoomOperation(),t.pendingZoomOperation=null);var m=o||s||c;t.zoomTransitionHandler.update(m,(function(){return t.callIfRegistered("onZoomTransitionDone")})),p&&t.glController.onResize();var g=t.currentLayout.getNodePositions(n.items);if(n.updatePositions(g),t.callIfRegistered("onLayoutStep",t.dumpNodes()),t.updateMinimapZoom(),t.glController.renderMinimap(g),!t.isRenderingDisabled){if((t.state.webGLVisible||d)&&t.glController.renderMainScene(g),!t.state.webGLVisible||d){t.canvasRenderer.processUpdates(),t.canvasRenderer.render(g);for(var b=0;b<r.items.length;b++){var w=r.items[b].id,x=t.canvasRenderer.arrowBundler.getBundle(r.items[b]),_=r.idToHtmlOverlay[w],S=x.labelInfo[w];if(_&&S){var T=S.rotation,A=S.position,O=S.width,E=S.height,P=t.mapCanvasSpaceToRelativePosition(A.x,A.y),k=P.x,j=P.y,C=O>5&&!t.state.webGLVisible;Object.assign(_.style,{top:"".concat(j,"px"),left:"".concat(k,"px"),width:"".concat(O,"px"),height:"".concat(E,"px"),display:C?"block":"none",transform:"translate(-50%, -50%) scale(".concat(Number(t.state.zoom),") rotate(").concat(T,"rad")})}}}for(var D=0;D<n.items.length;D++){var R=n.items[D],I=R.id,L=R.size,M=n.idToHtmlOverlay[I];if(M){var N=t.state.nodes.idToPosition[I],F=t.mapCanvasSpaceToRelativePosition(N.x,N.y),U=F.x,z=F.y,B="".concat(2*(null!=L?L:gr),"px");Object.assign(M.style,{top:"".concat(z,"px"),left:"".concat(U,"px"),width:B,height:B,transform:"translate(-50%, -50%) scale(".concat(Number(t.state.zoom),")")})}}}}var V=!a&&t.layoutUpdating,G=s!==t.layoutComputing;t.layoutComputing=s,t.layoutUpdating=a,V&&t.callIfRegistered(Ac),G&&t.callIfRegistered("onLayoutComputing",s),t.justSwitchedRenderer=!1,t.hasResized=!1,void 0!==e&&e()}}((function(){t.animationRequestId=window.requestAnimationFrame(e)}))}catch(e){if(!t.callbacks.isCallbackRegistered(Tc))throw e;t.callIfRegistered(Tc,e)}}))}},{key:"updateHtmlOverlay",value:function(){this.state.nodes.updateHtmlOverlay(this.htmlOverlay),this.state.rels.updateHtmlOverlay(this.htmlOverlay)}},{key:"dumpNodes",value:function(){var t,e=this.state.nodes.items,n=this.state.nodes.idToPosition,r=[],i=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return yc(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?yc(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(e);try{for(i.s();!(t=i.n()).done;){var o=t.value,a=n[o.id],s=this.mapCanvasSpaceToRelativePosition(a.x,a.y);r.push(gc(gc({},o),{},{x:s.x,y:s.y}))}}catch(t){i.e(t)}finally{i.f()}return r}},{key:"dumpRelationships",value:function(){return bn(this.state.rels.items)}},{key:"mapCanvasSpaceToRelativePosition",value:function(t,e){var n=this.canvasRect,r=window.devicePixelRatio||1,i=(t-this.state.panX)*this.state.zoom/r,o=(e-this.state.panY)*this.state.zoom/r;return{x:i+.5*n.width,y:o+.5*n.height}}},{key:"mapRelativePositionToCanvasSpace",value:function(t,e){var n=this.glCanvas.getBoundingClientRect(),r=window.devicePixelRatio||1,i=r*(t-.5*n.width),o=r*(e-.5*n.height);return{x:this.state.panX+i/this.state.zoom,y:this.state.panY+o/this.state.zoom}}},{key:"getNodePositions",value:function(){return Object.values(bn(this.state.nodes.idToPosition))}},{key:"setNodePositions",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.state.nodes.updatePositions(t),this.currentLayout.updateNodes(t),e||this.currentLayout.terminateUpdate(),this.hasResized=!0,0===this.getNodesOnScreen().nodes.length&&this.state.setPan(0,0),this.state.clearFit()}},{key:"isLayoutMoving",value:function(){return this.layoutUpdating}},{key:"getNodesOnScreen",value:function(){var t=this.glCanvas.getBoundingClientRect(),e=this.mapRelativePositionToCanvasSpace(0,0),n=e.x,r=e.y,i=this.mapRelativePositionToCanvasSpace(t.width,t.height);return function(t,e,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:["node"],a=i.nodes,s=i.rels,u=Math.min(t,n),l=Math.max(t,n),c=Math.min(e,r),f=Math.max(e,r),h=[],d=[];if(o.includes("node"))for(var p=0,v=Object.values(a.idToPosition);p<v.length;p++){var y=v[p],m=y.x,g=y.y;void 0!==m&&void 0!==g&&m>u&&m<l&&g>c&&g<f&&h.push(y)}if(o.includes("relationship")){var b,w=Kl(s.items);try{for(w.s();!(b=w.n()).done;){var x=b.value,_=x.from,S=x.to,T=a.idToPosition[_],A=a.idToPosition[S];if(void 0!==T.x&&void 0!==T.y&&void 0!==A.x&&void 0!==A.y){var O=T.x>u&&T.x<l&&T.y>c&&T.y<f,E=A.x>u&&A.x<l&&A.y>c&&A.y<f;O&&E&&d.push(x)}}}catch(t){w.e(t)}finally{w.f()}}return{nodes:h,rels:d}}(n,r,i.x,i.y,this.state,["node"])}},{key:"registerDoneCallback",value:function(t){this.layoutDoneCallback=t}},{key:"registerComputingCallback",value:function(t){this.layoutComputingCallback=t}},{key:"getPosition",value:function(t){return this.currentLayout.getNodePositions([{id:t}])[0]}},{key:"getScale",value:function(){return this.state.zoom}},{key:"getPan",value:function(){return{x:this.state.panX,y:this.state.panY}}},{key:"setZoomLevel",value:function(t){var e=this;this.pendingZoomOperation=function(){return e.state.setZoom(t,e.glCanvas)}}},{key:"setPanCoordinates",value:function(t,e){this.state.setPan(t,e)}},{key:"setZoomAndPan",value:function(t,e,n){var r=this;this.pendingZoomOperation=function(){return r.state.setZoomPan(t,e,n,r.glCanvas)}}},{key:"fit",value:function(t,e){var n=this;this.pendingZoomOperation=function(){return n.state.fitNodes(t,e)}}},{key:"resetZoom",value:function(){var t=this;this.pendingZoomOperation=function(){return t.state.setZoomReset()}}},{key:"setRenderer",value:function(t){this.state.setRenderer(t)}},{key:"on",value:function(t,e){this.callbacks.register(t,e)}},{key:"isDestroyed",value:function(){return this.destroyed}},{key:"destroy",value:function(){var t;this.destroyed||(this.animationRequestId&&window.cancelAnimationFrame(this.animationRequestId),void 0!==this.layoutRunner&&window.clearInterval(this.layoutRunner),this.glController.destroy(),this.glCanvas.removeEventListener("transitionend",this.setRenderSwitchAnimation),void 0!==this.webGLContext&&ql(this.webGLContext),void 0!==this.webGLMinimapContext&&ql(this.webGLMinimapContext),Hl(this.glCanvas),Hl(this.glMinimapCanvas),this.canvasRenderer.destroy(),Hl(this.c2dCanvas),this.removeResizeListener(),this.removeMinimapResizeListener(),this.forceLayout.destroy(),this.hierarchicalLayout.destroy(),this.gridLayout.destroy(),this.freeLayout.destroy(),this.htmlOverlay.remove(),this.zoomTransitionHandler.destroy(),this.stateDisposers.forEach((function(t){t()})),t=this.instanceId,delete Oc[t],this.destroyed=!0)}},{key:"callIfRegistered",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.callbacks.callIfRegistered.apply(this.callbacks,arguments)}},{key:"getCanvasRelsAt",value:function(t){return this.canvasRenderer.getRelsAt(t)}},{key:"getCanvasNodesAt",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.canvasRenderer.getNodesAt(t,e)}},{key:"getLayout",value:function(t){return t===la?this.hierarchicalLayout:t===ua?this.forceLayout:t===ca?this.gridLayout:t===fa?this.freeLayout:t===ha?this.d3ForceLayout:this.forceLayout}},{key:"setLayout",value:function(t){Vr.info("Switching to layout: ".concat(t));var e=this.currentLayoutType,n=this.getLayout(t);"free"===t&&n.setNodePositions(this.state.nodes.idToPosition),this.currentLayout=n,this.currentLayoutType=t,e&&e!==this.currentLayoutType&&(this.justSwitchedLayout=!0)}},{key:"setLayoutOptions",value:function(t){this.getLayout(this.state.layout).setOptions(t)}},{key:"createDownloadLink",value:function(t,e){var n=document.createElement("a");n.style.display="none",n.setAttribute("download",t);var r=e.toDataURL("image/png").replace(/^data:image\/png/,"data:application/octet-stream");return n.setAttribute("href",r),n}},{key:"saveToFile",value:function(t){var e=gc(gc({},Sc),t),n=e.filename,r=e.backgroundColor,i=this.state.nodes.items;this.currentLayout.update(this.justSwitchedLayout),this.justSwitchedLayout=!1;var o=this.currentLayout.getNodePositions(i);this.state.nodes.updatePositions(o);var a=Wl(this.c2dCanvas.width,this.c2dCanvas.height),s=Yl(a);this.canvasRenderer.processUpdates(),this.canvasRenderer.render(o,{canvas:a,context:s,backgroundColor:r,ignoreAnimations:!0}),this.createDownloadLink(n,a).click(),Hl(a),a=null,s=null}},{key:"prepareLargeFileForDownload",value:function(t){var e=this,n=gc(gc({},Sc),t),r=this.state.nodes.items,i=n.filename,o=n.backgroundColor,a=this.currentLayout.getNodePositions(r),s=Lo(a,100),u=s.nodesWidth,l=s.nodesHeight,c=s.centerX,f=s.centerY,h=Math.max(Math.min(u+100,15e3),5e3),d=Math.max(Math.min(l+100,15e3),5e3);return this.isRenderingDisabled=!0,new Promise((function(t,n){try{e.setPanCoordinates(c,f);var r=Math.max(h/u-.02,e.state.minZoom),s=Math.max(d/l-.02,e.state.minZoom);e.setZoomLevel(Math.min(r,s))}catch(t){return Vr.error("An error occurred while downloading the file"),void n(t)}setTimeout((function(){try{e.currentLayout.update(e.justSwitchedLayout),e.justSwitchedLayout=!1,e.state.nodes.updatePositions(a);var r=Wl(h,d),s=Yl(r);e.canvasRenderer.processUpdates(),e.canvasRenderer.render(a,{canvas:r,context:s,backgroundColor:o,ignoreAnimations:!0,showCaptions:!0}),e.createDownloadLink(i,r).click(),Hl(r),r=null,s=null,t(!0)}catch(t){n(t)}}),500)}))}},{key:"saveFullGraphToLargeFile",value:(r=pc().mark((function t(e){var n,r,i,o;return pc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=gc(gc({},Sc),e),r=this.state.zoom,i=this.state.panX,o=this.state.panY,t.prev=4,t.next=7,this.prepareLargeFileForDownload(n);case 7:t.next=17;break;case 9:if(t.prev=9,t.t0=t.catch(4),Vr.error("An error occurred while downloading the image"),!this.callbacks.isCallbackRegistered(Tc)){t.next=16;break}this.callIfRegistered(Tc,t.t0),t.next=17;break;case 16:throw t.t0;case 17:return t.prev=17,this.isRenderingDisabled=!1,this.setZoomLevel(r),this.setPanCoordinates(i,o),t.finish(17);case 22:case"end":return t.stop()}}),t,this,[[4,9,17,22]])})),i=function(){var t=this,e=arguments;return new Promise((function(n,i){var o=r.apply(t,e);function a(t){vc(o,n,i,a,s,"next",t)}function s(t){vc(o,n,i,a,s,"throw",t)}a(void 0)}))},function(t){return i.apply(this,arguments)})}],n&&bc(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function kc(t){return kc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kc(t)}function jc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Cc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Rc(r.key),r)}}function Dc(t,e,n){return e&&Cc(t.prototype,e),n&&Cc(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Rc(t){var e=function(t,e){if("object"!=kc(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=kc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==kc(e)?e:String(e)}var Ic=function(){function t(e,n){if(jc(this,t),!e)throw new Error("Tried to create a node with no data");this.data=e,this.parent=n,this.children=[]}return Dc(t,[{key:"addChild",value:function(t){this.children.push(t)}},{key:"isRoot",value:function(){return null===this.parent}},{key:"print",value:function(){var t=this.data.name;this.isRoot()||(t=t+"\t\t"+function(t){for(var e=(Math.round(1e3*t)/1e3).toFixed(3);e.length<6;)e=" "+e;return e}(this.data._timeSpent())+" ms",this.parent.isRoot()||(t=t+"\t"+this._percentageOfParentSpent()+"%"));var e=this.noOfChildren()>0;for(var n in e?(t=t+"\t Children: "+this.noOfChildren(),console.groupCollapsed(t)):console.log(t),this.children)this.children[n].print();e&&console.groupEnd()}},{key:"noOfChildren",value:function(){return this.children.length}},{key:"_percentageOfParentSpent",value:function(){return Math.round(this.data._timeSpent()/this.parent.data._timeSpent()*100)}}]),t}(),Lc=function(){function t(e){jc(this,t),this.name=e,this.startTime=performance.now(),this.endTime=null}return Dc(t,[{key:"close",value:function(){this.endTime=performance.now()}},{key:"_timeSpent",value:function(){if(null===this.startTime||null===this.endTime)throw new Error("You have an error in your performance measurements that makes the whole tree unreliable. You probably forgot to call performanceTestEnd on "+this.name);return this.endTime-this.startTime}}]),t}(),Mc=function(){function t(){jc(this,t),this.root=new Ic(new Lc("Performance Tree"),null),this.current=this.root}return Dc(t,[{key:"clear",value:function(){this.root.children=[],this.current=this.root}},{key:"add",value:function(t){if(this.current){var e=new Ic(t,this.current);this.current.addChild(e),this.current=e}else{if(this.root)throw new Error("Performance tree is screwed up");this.root=new Ic(t,null),this.current=this.root}}},{key:"close",value:function(){if(this.current.isRoot())throw new Error("Tried to close performance tree root. You probably have one too many Performance.endTest() in your code.");this.current.data.close(),this.current=this.current.parent}},{key:"getCurrentData",value:function(){return this.current.data}},{key:"print",value:function(){this.root.noOfChildren()>0&&this.root.print()}}]),t}(),Nc=function(){function t(){jc(this,t),window.performance?(this.disabled=!1,this.tree=new Mc):(this.disabled=!0,this.tree=null)}return Dc(t,[{key:"startTest",value:function(t){if(!this.disabled){var e;t||(1,t="at"===(e=(new Error).stack.split("\n")[3].trim()).split(" ")[0]?e.split(" ")[1]:e.split("@")[0]);var n=new Lc(t);this.tree.add(n)}}},{key:"endTest",value:function(){this.disabled||this.tree.close()}},{key:"reset",value:function(){this.disabled||this.tree.clear()}},{key:"print",value:function(){this.disabled||this.tree.print()}}]),t}(),Fc=function(t){return Boolean(t)&&"string"==typeof t.id&&t.id.length>0};const Uc=(t=>{var e={};return i.d(e,t),e})({AnalyticsBrowser:()=>e.AnalyticsBrowser});var zc,Bc=new Uint8Array(16);function Vc(){if(!zc&&!(zc="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return zc(Bc)}const Gc=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var Wc=[],Xc=0;Xc<256;++Xc)Wc.push((Xc+256).toString(16).substr(1));const Hc=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(Wc[t[e+0]]+Wc[t[e+1]]+Wc[t[e+2]]+Wc[t[e+3]]+"-"+Wc[t[e+4]]+Wc[t[e+5]]+"-"+Wc[t[e+6]]+Wc[t[e+7]]+"-"+Wc[t[e+8]]+Wc[t[e+9]]+"-"+Wc[t[e+10]]+Wc[t[e+11]]+Wc[t[e+12]]+Wc[t[e+13]]+Wc[t[e+14]]+Wc[t[e+15]]).toLowerCase();if(!function(t){return"string"==typeof t&&Gc.test(t)}(n))throw TypeError("Stringified UUID is invalid");return n};var Yc,$c,qc=0,Zc=0;const Kc=function(t,e,n){var r=e&&n||0,i=e||new Array(16),o=(t=t||{}).node||Yc,a=void 0!==t.clockseq?t.clockseq:$c;if(null==o||null==a){var s=t.random||(t.rng||Vc)();null==o&&(o=Yc=[1|s[0],s[1],s[2],s[3],s[4],s[5]]),null==a&&(a=$c=16383&(s[6]<<8|s[7]))}var u=void 0!==t.msecs?t.msecs:Date.now(),l=void 0!==t.nsecs?t.nsecs:Zc+1,c=u-qc+(l-Zc)/1e4;if(c<0&&void 0===t.clockseq&&(a=a+1&16383),(c<0||u>qc)&&void 0===t.nsecs&&(l=0),l>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");qc=u,Zc=l,$c=a;var f=(1e4*(268435455&(u+=122192928e5))+l)%4294967296;i[r++]=f>>>24&255,i[r++]=f>>>16&255,i[r++]=f>>>8&255,i[r++]=255&f;var h=u/4294967296*1e4&268435455;i[r++]=h>>>8&255,i[r++]=255&h,i[r++]=h>>>24&15|16,i[r++]=h>>>16&255,i[r++]=a>>>8|128,i[r++]=255&a;for(var d=0;d<6;++d)i[r+d]=o[d];return e||Hc(i)};function Jc(t){return Jc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jc(t)}function Qc(){Qc=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var o=e&&e.prototype instanceof m?e:m,a=Object.create(o.prototype),s=new j(r||[]);return i(a,"_invoke",{value:O(t,n,s)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=c;var h="suspendedStart",d="suspendedYield",p="executing",v="completed",y={};function m(){}function g(){}function b(){}var w={};l(w,a,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(C([])));_&&_!==n&&r.call(_,a)&&(w=_);var S=b.prototype=m.prototype=Object.create(w);function T(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function n(i,o,a,s){var u=f(t[i],t,o);if("throw"!==u.type){var l=u.arg,c=l.value;return c&&"object"==Jc(c)&&r.call(c,"__await")?e.resolve(c.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(c).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function O(e,n,r){var i=h;return function(o,a){if(i===p)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=E(s,r);if(u){if(u===y)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var l=f(e,n,r);if("normal"===l.type){if(i=r.done?v:d,l.arg===y)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=v,r.method="throw",r.arg=l.arg)}}}function E(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,E(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var o=f(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,y):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function C(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(Jc(e)+" is not iterable")}return g.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=l(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},T(A.prototype),l(A.prototype,s,(function(){return this})),e.AsyncIterator=A,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new A(c(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},T(S),l(S,u,"Generator"),l(S,a,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=C,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(k),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),k(n),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:C(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),y}},e}function tf(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function ef(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,nf(r.key),r)}}function nf(t){var e=function(t,e){if("object"!=Jc(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=Jc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Jc(e)?e:String(e)}var rf=window.localStorage,of="neo4j.nvl.sTid",af=!1,sf=function(){function t(){var e,n,r;(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),e=this,r=void 0,(n=nf(n="analytics"))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r;var i=new Uc.AnalyticsBrowser;this.analytics=i}var e,n,r,i,o;return r=t,i=[{key:"init",value:function(t){this.analytics.load({writeKey:t}),this.analytics.addSourceMiddleware((function(t){var e=t.payload,n=t.next,r=e.obj.context.page;void 0!==r&&(r.url="",r.title="",r.search="",r.referrer="",r.path=""),n(e)}))}},{key:"trackEvent",value:(e=Qc().mark((function t(e){var n;return Qc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.ready();case 2:n="".concat(e.eventPrefix?e.eventPrefix:"NVL_core","-").concat(e.event),this.analytics.track(n,e.properties).catch((function(t){Vr.warn("TRACKING: Event tracking is failed. err: ".concat(t))}));case 4:case"end":return t.stop()}}),t,this)})),n=function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(t){tf(o,r,i,a,s,"next",t)}function s(t){tf(o,r,i,a,s,"throw",t)}a(void 0)}))},function(t){return n.apply(this,arguments)})},{key:"identify",value:function(){if(!af){var t=this.getSegmentTrackingId();this.analytics.identify(t).catch((function(t){Vr.debug("TRACKING: Identifying user for Segment tracking failed. err: ".concat(t))})),af=!0}}},{key:"loadSavedSegmentId",value:function(){try{var t=rf.getItem(of);return"string"==typeof t?t:null}catch(t){return Vr.debug("TRACKING: Retrieving tracking Id failed. err: ".concat(t)),null}}},{key:"getSegmentTrackingId",value:function(){var t=this.loadSavedSegmentId(),e=null!=t?t:Kc();return this.saveTrackingId(e),e}},{key:"saveTrackingId",value:function(t){rf.setItem(of,t)}},{key:"ready",value:function(){return this.analytics.ready().catch((function(t){Vr.debug("TRACKING: segment track instance not ready. err: ".concat(t))}))}}],i&&ef(r.prototype,i),o&&ef(r,o),Object.defineProperty(r,"prototype",{writable:!1}),t}();function uf(t){return uf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},uf(t)}function lf(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,l=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){l=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(t,e)||ff(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cf(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=ff(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function ff(t,e){if(t){if("string"==typeof t)return hf(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hf(t,e):void 0}}function hf(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function df(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function pf(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?df(Object(n),!0).forEach((function(e){var r,i,o;r=t,i=e,o=n[e],(i=yf(i))in r?Object.defineProperty(r,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):df(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function vf(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,yf(r.key),r)}}function yf(t){var e=function(t,e){if("object"!=uf(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=uf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==uf(e)?e:String(e)}function mf(t,e,n){gf(t,e),e.set(t,n)}function gf(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function bf(t,e){return t.get(xf(t,e))}function wf(t,e,n){return t.set(xf(t,e),n),n}function xf(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var _f=new WeakMap,Sf=new WeakMap,Tf=new WeakMap,Af=new WeakMap,Of=new WeakMap,Ef=new WeakMap,Pf=new WeakSet,kf=function(){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),gf(this,n=Pf),n.add(this),mf(this,_f,void 0),mf(this,Sf,void 0),mf(this,Tf,void 0),mf(this,Af,void 0),mf(this,Of,void 0),mf(this,Ef,void 0),!0!==o.disableTelemetry&&(wf(Ef,this,new sf),bf(Ef,this).init("4SGwdwzuDm5WkFvQtz7D6ATQlo14yjmW"),bf(Ef,this).identify()),xf(Pf,this,Cf).call(this,o),wf(_f,this,new u(a)),wf(Sf,this,new Nc),wf(Of,this,o),bf(Of,this).frame=t,this.checkWebGLCompatibility(),xf(Pf,this,jf).call(this,r,i,o)}var n,r;return n=e,r=[{key:"restart",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.getNodePositions(),r=bf(Tf,this),i=r.zoom,o=r.layout,a=r.layoutOptions,s=r.nodes,u=r.rels;bf(Af,this).destroy(),Object.assign(bf(Of,this),t),xf(Pf,this,jf).call(this,s.items,u.items,bf(Of,this)),this.setZoom(i),this.setLayout(o),this.setLayoutOptions(a),this.addAndUpdateElementsInGraph(s.items,u.items),e&&this.setNodePositions(n)}},{key:"addAndUpdateElementsInGraph",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];xf(Pf,this,If).call(this,t),xf(Pf,this,Lf).call(this,e,t);var n={added:!1,updated:!1};bf(Tf,this).nodes.update(t,pf({},n)),bf(Tf,this).rels.update(e,pf({},n)),bf(Tf,this).nodes.add(t,pf({},n)),bf(Tf,this).rels.add(e,pf({},n)),bf(Tf,this).setGraphUpdated(),bf(Af,this).updateHtmlOverlay()}},{key:"getSelectedNodes",value:function(){var t=this;return bf(Tf,this).nodes.items.filter((function(t){return t.selected})).map((function(e){return pf(pf({},e),bf(Tf,t).nodes.idToPosition[e.id])}))}},{key:"getSelectedRelationships",value:function(){return bf(Tf,this).rels.items.filter((function(t){return t.selected}))}},{key:"updateElementsInGraph",value:function(t,e){var n={added:!1,updated:!1};xf(Pf,this,If).call(this,t),xf(Pf,this,Lf).call(this,e,t),bf(Tf,this).nodes.update(t,pf({},n)),bf(Tf,this).rels.update(e,pf({},n)),bf(Af,this).updateHtmlOverlay()}},{key:"addElementsToGraph",value:function(t,e){xf(Pf,this,If).call(this,t),xf(Pf,this,Lf).call(this,e,t);var n={added:!1,updated:!1};bf(Tf,this).nodes.add(t,pf({},n)),bf(Tf,this).rels.add(e,pf({},n)),bf(Af,this).updateHtmlOverlay()}},{key:"removeNodesWithIds",value:function(e){if(Array.isArray(e)&&!(0,t.isEmpty)(e)){var n,r={},i=cf(e);try{for(i.s();!(n=i.n()).done;)r[n.value]=!0}catch(t){i.e(t)}finally{i.f()}var o,a=[],s=cf(bf(Tf,this).rels.items);try{for(s.s();!(o=s.n()).done;){var u=o.value;!0!==r[u.from]&&!0!==r[u.to]||a.push(u.id)}}catch(t){s.e(t)}finally{s.f()}a.length>0&&xf(Pf,this,Rf).call(this,a),xf(Pf,this,Df).call(this,e),bf(Tf,this).setGraphUpdated(),bf(Af,this).updateHtmlOverlay()}}},{key:"removeRelationshipsWithIds",value:function(e){Array.isArray(e)&&!(0,t.isEmpty)(e)&&(xf(Pf,this,Rf).call(this,e),bf(Tf,this).setGraphUpdated(),bf(Af,this).updateHtmlOverlay())}},{key:"getNodes",value:function(){return bf(Af,this).dumpNodes()}},{key:"getRelationships",value:function(){return bf(Af,this).dumpRelationships()}},{key:"getNodeById",value:function(t){return bf(Tf,this).nodes.idToItem[t]}},{key:"getRelationshipById",value:function(t){return bf(Tf,this).rels.idToItem[t]}},{key:"getPositionById",value:function(t){return bf(Tf,this).nodes.idToPosition[t]}},{key:"getCurrentOptions",value:function(){return bf(Of,this)}},{key:"destroy",value:function(){bf(Af,this).destroy()}},{key:"deselectAll",value:function(){this.updateElementsInGraph(bf(Tf,this).nodes.items.map((function(t){return pf(pf({},t),{},{selected:!1})})),bf(Tf,this).rels.items.map((function(t){return pf(pf({},t),{},{selected:!1})})))}},{key:"fit",value:function(t,e){bf(Af,this).fit(t,e)}},{key:"resetZoom",value:function(){bf(Af,this).resetZoom()}},{key:"setUseWebGLRenderer",value:function(t){bf(Af,this).setRenderer(t?da:pa)}},{key:"setRenderer",value:function(t){bf(Af,this).setRenderer(t)}},{key:"setDisableWebGL",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];bf(Of,this).disableWebGL!==t&&(bf(Of,this).disableWebGL=t,this.restart())}},{key:"pinNode",value:function(t){bf(Tf,this).nodes.update([{id:t,pinned:!0}],{})}},{key:"unPinNode",value:function(t){bf(Tf,this).nodes.update(t.map((function(t){return{id:t,pinned:!1}})),{})}},{key:"setLayout",value:function(t){bf(Tf,this).setLayout(t)}},{key:"setLayoutOptions",value:function(t){bf(Tf,this).setLayoutOptions(t)}},{key:"getNodesOnScreen",value:function(){return bf(Af,this).getNodesOnScreen()}},{key:"getNodePositions",value:function(){return bf(Af,this).getNodePositions()}},{key:"setNodePositions",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];bf(Af,this).setNodePositions(t,e)}},{key:"isLayoutMoving",value:function(){return bf(Af,this).isLayoutMoving()}},{key:"saveToFile",value:function(t){bf(Af,this).saveToFile(t)}},{key:"saveFullGraphToLargeFile",value:function(t){bf(Af,this).saveFullGraphToLargeFile(t)}},{key:"setZoom",value:function(t){bf(Af,this).setZoomLevel(t)}},{key:"setPan",value:function(t,e){bf(Af,this).setPanCoordinates(t,e)}},{key:"setZoomAndPan",value:function(t,e,n){bf(Af,this).setZoomAndPan(t,e,n)}},{key:"getScale",value:function(){return bf(Af,this).getScale()}},{key:"getPan",value:function(){return bf(Af,this).getPan()}},{key:"getHits",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["node","relationship"],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{hitNodeMarginWidth:0},r=bf(Tf,this),i=r.zoom,o=r.panX,a=r.panY,s=r.webGLVisible,u=xl(t,bf(Of,this).frame,i,o,a),l=u.x,c=u.y,f=s?function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:["node","relationship"],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=[],a=[],s=n.nodes,u=n.rels;return r.includes("node")&&o.push.apply(o,Zl(function(t,e){var n,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=[],a=Kl(arguments.length>2&&void 0!==arguments[2]?arguments[2]:[]);try{var s=function(){var a,s=n.value,u=r[s.id];if(void 0===(null==u?void 0:u.x)||void 0===u.y)return 1;var l=(null!==(a=s.size)&&void 0!==a?a:gr)*xr(),c={x:u.x-t,y:u.y-e},f=Math.pow(l,2),h=Math.pow(l+i,2),d=Math.pow(c.x,2)+Math.pow(c.y,2),p=Math.sqrt(d);if(d<h){var v=o.findIndex((function(t){return t.distance>p}));o.splice(-1!==v?v:o.length,0,{data:s,targetCoordinates:{x:u.x,y:u.y},pointerCoordinates:{x:t,y:e},distanceVector:c,distance:p,insideNode:d<f})}};for(a.s();!(n=a.n()).done;)s()}catch(t){a.e(t)}finally{a.f()}return o}(t,e,s.items,s.idToPosition,i.hitNodeMarginWidth))),r.includes("relationship")&&a.push.apply(a,Zl(function(t,e){var n,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=[],o={},a=Kl(arguments.length>2&&void 0!==arguments[2]?arguments[2]:[]);try{var s=function(){var a=n.value,s=a.from,u=a.to;if(void 0===o["".concat(s,".").concat(u)]){var l=r[s],c=r[u];if(void 0===(null==l?void 0:l.x)||void 0===l.y)return 0;if(void 0===(null==c?void 0:c.x)||void 0===c.y)return 0;var f=Cs({x:l.x,y:l.y},{x:c.x,y:c.y},{x:t,y:e});if(f<=tc){var h=i.findIndex((function(t){return t.distance>f}));i.splice(-1!==h?h:i.length,0,{data:a,fromTargetCoordinates:{x:l.x,y:l.y},toTargetCoordinates:{x:c.x,y:c.y},pointerCoordinates:{x:t,y:e},distance:f})}o["".concat(s,".").concat(u)]=1,o["".concat(u,".").concat(s)]=1}};for(a.s();!(n=a.n()).done;)s()}catch(t){a.e(t)}finally{a.f()}return i}(t,e,u.items,s.idToPosition))),{nodes:o,relationships:a}}(l,c,bf(Tf,this),e,n):function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:["node","relationship"],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=[],a=[];return r.includes("node")&&o.push.apply(o,Zl(n.getCanvasNodesAt({x:t,y:e},i.hitNodeMarginWidth))),r.includes("relationship")&&a.push.apply(a,Zl(n.getCanvasRelsAt({x:t,y:e}))),{nodes:o,relationships:a}}(l,c,bf(Af,this),e,n);return pf(pf({},t),{},{nvlTargets:f})}},{key:"getContainer",value:function(){return bf(Of,this).frame}},{key:"checkWebGLCompatibility",value:function(){var t=bf(Of,this).disableWebGL;if(void 0===t||!t){var e=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.createElement("canvas");try{return Boolean(void 0!==window.WebGLRenderingContext&&(null!==t.getContext("webgl")||null!==t.getContext("experimental-webgl")))}catch(t){return!1}}();if(!e){if(void 0!==t)throw new Mi("Could not initialize WebGL");bf(Of,this).renderer=pa,console.warn("GPU acceleration is not available on your browser. Falling back to CPU layout and rendering. You can disable this warning by setting the disableWebGL option to true.")}void 0===t&&(bf(Of,this).disableWebGL=!e)}}}],r&&vf(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),e}();function jf(){var e,n=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};wf(Tf,this,function(e){var n=e.minZoom,r=e.maxZoom,i=e.allowDynamicMinZoom,o=void 0===i||i,a=e.layout,s=e.layoutOptions,u=e.nodeDefaultBorderColor,l=e.selectedBorderColor,c=e.panX,f=void 0===c?0:c,h=e.panY,d=void 0===h?0:h,p=e.initialZoom,v=e.renderer,y=void 0===v?!0===e.useWebGL?da:pa:v,m=e.disableWebGL,g=void 0!==m&&m,b=e.disableTelemetry,w=void 0!==b&&b;q(!0),wn.isolateGlobalState();var x=void 0!==n?n:.075,_=void 0!==r?r:10,S=ta({},ia.default);void 0!==u&&("string"==typeof u&&null!==Co().get.rgb(u)?S.rings=[{color:u,widthFactor:.05}]:Vr.warn("Invalid color string for nodeDefaultBorderColor:",u));var T=ta({},ia.selected),A=ta({},oa.selected);return void 0!==l&&("string"==typeof u&&null!==Co().get.rgb(l)?(T.rings[1].color=l,A.rings[1].color=l):Vr.warn("Invalid color string for selectedBorderColor:",l)),Bt({zoom:p||aa,minimapZoom:aa,defaultZoomLevel:aa,panX:f,panY:d,minimapPanX:0,minimapPanY:0,fitNodeIds:[],resetZoom:!1,zoomOptions:{},forceWebGL:!1,renderer:y,disableWebGL:g,disableTelemetry:w,fitMovement:0,layout:a,layoutOptions:s,maxDistance:0,maxNodeRadius:50,nodeBorderStyles:{default:S,selected:T},relationshipBorderStyles:{default:oa.default,selected:A},get minZoom(){return x},get maxZoom(){return _},get minMinimapZoom(){return 0},get maxMinimapZoom(){return.2},get webGLVisible(){var t=this.fitMovement>50;return this.renderer===da||t},nodes:Ko(),rels:Ko(),graphUpdates:0,waypoints:{data:Bt.shallow({}),counter:0},setGraphUpdated:it((function(){this.graphUpdates++})),setRenderer:it((function(t){it((function(){this.graphUpdates++})),this.renderer=t})),setWaypoints:it((function(t){this.waypoints.data=t,this.waypoints.counter+=1})),setZoomPan:it((function(t,e,n,r){if(o){var i=Object.values(this.nodes.idToPosition),a=Uo(i,x,_,r,t,this.zoom);a!==this.zoom&&(this.zoom=a,t===a&&(this.panX=e,this.panY=n))}else{var s=Fo(t,this.zoom,x,_);s!==this.zoom&&(this.zoom=s,this.panX=e,this.panY=n)}this.fitNodeIds=[],this.resetZoom=!1,this.forceWebGL=!1})),setZoom:it((function(t,e){if(o){var n=Object.values(this.nodes.idToPosition);this.zoom=Uo(n,x,_,e,t,this.zoom)}else this.zoom=Fo(t,this.zoom,x,_);this.fitNodeIds=[],this.fitMovement=0,this.resetZoom=!1,this.forceWebGL=!1})),setPan:it((function(t,e){this.panX=t,this.panY=e,this.fitNodeIds=[],this.resetZoom=!1,this.forceWebGL=!1})),setLayout:it((function(t){this.layout=t})),setLayoutOptions:it((function(t){this.layoutOptions=t})),fitNodes:it((function(e,n){this.fitNodeIds=(0,t.intersection)(e,(0,t.map)(this.nodes.items,"id")),this.zoomOptions=null!=n?n:{}})),setZoomReset:it((function(){this.resetZoom=!0})),clearFit:it((function(){this.fitNodeIds=[],this.forceWebGL=!1,this.fitMovement=0})),clearReset:it((function(){this.resetZoom=!1,this.fitMovement=0})),updateZoomToFit:it((function(t,e,n,r){var i;if(this.fitMovement=Math.abs(t-this.zoom)+Math.abs(e-this.panX)+Math.abs(n-this.panY),o){var a=Object.values(this.nodes.idToPosition);i=Uo(a,x,_,r,t,this.zoom)}else i=Fo(t,this.zoom,x,_);this.zoom=i,this.panX=e,this.panY=n})),updateMinimapZoomToFit:it((function(t,e,n){this.minimapZoom=t,this.minimapPanX=e,this.minimapPanY=n})),autorun:vt,reaction:yt})}(o)),o.minimapContainer instanceof HTMLElement||delete o.minimapContainer,wf(Af,this,new Pc(bf(Tf,this),o)),this.addAndUpdateElementsInGraph(r,i),bf(Af,this).on("restart",this.restart.bind(this));var a,s,u=cf((a=bf(_f,this).callbacks,Object.entries(a)));try{for(u.s();!(s=u.n()).done;){var l=lf(s.value,2),c=l[0];void 0!==l[1]&&bf(Af,this).on(c,bf(_f,this)[c].bind(bf(_f,this)))}}catch(t){u.e(t)}finally{u.f()}var f=null===(e=bf(Of,this).frame)||void 0===e?void 0:e.getAttribute("id");!0!==bf(Of,this).disableTelemetry&&setTimeout((function(){bf(Af,n).isDestroyed()||bf(Ef,n).trackEvent({eventPrefix:_r.includes(f)?f:null,event:"instantiated",properties:{}})}),200)}function Cf(t){var e,n=t.logging;void 0!==(null==n?void 0:n.level)&&(e=n.level,Vr.setLevel(e),function(t,e){var n=t.methodFactory;t.methodFactory=function(t,r,i){var o=n(t,r,i);return function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];"function"==typeof e.logger?e.logger.apply(e,[t].concat(r)):o.apply(void 0,r)}},t.setLevel(t.getLevel())}(Vr,n))}function Df(t){var e=Array.isArray(t)?t:[t],n=bf(Tf,this),r=n.nodes,i=n.fitNodeIds,o=n.zoomOptions;r.remove(e,{removed:!1}),i.length&&void 0!==e.find((function(t){return i.includes(t)}))&&bf(Tf,this).fitNodes(i.filter((function(t){return!e.includes(t)})),o)}function Rf(t){var e=Array.isArray(t)?t:[t];bf(Tf,this).rels.remove(e,{removed:!1})}function If(t){var e=t.find((function(t){return!function(t){return Boolean(t)&&"string"==typeof t.id&&t.id.length>0}(t)}));if(e){var n="";throw/^\d+$/.test(e.id)||(n=" Node ids need to be numeric strings. Strings that contain anything other than numbers are not yet supported."),new TypeError("Invalid node provided: ".concat(JSON.stringify(e),".").concat(n))}}function Lf(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n="",r=null,i=bf(Tf,this),o=i.nodes,a=i.rels,s={},u=0;u<e.length;u++){var l=e[u];s[l.id]=l}for(var c=pf(pf({},o.idToItem),s),f=a.idToItem,h=0;h<t.length;h++){var d=t[h];if(!Fc(d)){r=d,/^\d+$/.test(d.id)&&(n=" Node ids need to be numeric strings. Strings that contain anything other than numbers are not yet supported.");break}if(void 0===f[d.id]){var p=c[d.from],v=c[d.to];if(void 0===p){n=' Node with id "'.concat(d.from,'" does not exist.'),r=d;break}if(void 0===v){n=' Node with id "'.concat(d.to,'" does not exist.'),r=d;break}}}if(null!==r)throw new TypeError("Invalid relationship provided: ".concat(JSON.stringify(r),".").concat(n))}var Mf={textColorForBackground:al};const Nf=kf})();var a=o.RL,s=o.wK,u=o.x_,l=o.lv,c=o.YQ,f=o.BP,h=o.GZ,d=o.Vw,p=o.Ay,v=o._G;export{a as CompatibilityError,s as ForceDirectedLayoutType,u as FreeLayoutType,l as GridLayoutType,c as HierarchicalLayoutType,f as NVL,h as colorMapperFunctions,d as d3ForceLayoutType,p as default,v as drawCircleBand};
2
+ import*as e from"@neo4j-nvl/layout-workers";import*as t from"@segment/analytics-next";var r={7991:(e,t)=>{t.byteLength=function(e){var t=u(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,i=u(e),a=i[0],s=i[1],c=new o(function(e,t,r){return 3*(t+r)/4-r}(0,a,s)),l=0,f=s>0?a-4:a;for(r=0;r<f;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;return 2===s&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[l++]=255&t),1===s&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=16383,u=0,c=n-o;u<c;u+=a)i.push(s(e,u,u+a>c?c:u+a));return 1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=i[a],n[i.charCodeAt(a)]=a;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function s(e,t,n){for(var o,i,a=[],u=t;u<n;u+=3)o=(e[u]<<16&16711680)+(e[u+1]<<8&65280)+(255&e[u+2]),a.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},1048:(e,t,r)=>{const n=r(7991),o=r(9318),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=s,t.SlowBuffer=function(e){return+e!=e&&(e=0),s.alloc(+e)},t.INSPECT_MAX_BYTES=50;const a=2147483647;function u(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return f(e)}return c(e,t,r)}function c(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!s.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|v(e,t);let n=u(r);const o=n.write(e,t);return o!==r&&(n=n.slice(0,o)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Z(e,Uint8Array)){const t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Z(e,ArrayBuffer)||e&&Z(e.buffer,ArrayBuffer))return d(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(Z(e,SharedArrayBuffer)||e&&Z(e.buffer,SharedArrayBuffer)))return d(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return s.from(n,t,r);const o=function(e){if(s.isBuffer(e)){const t=0|p(e.length),r=u(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||K(e.length)?u(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return s.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return l(e),u(e<0?0:0|p(e))}function h(e){const t=e.length<0?0:0|p(e.length),r=u(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function d(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,s.prototype),n}function p(e){if(e>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function v(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Z(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return H(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Y(e).length;default:if(o)return n?-1:H(e).length;t=(""+t).toLowerCase(),o=!0}}function y(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return A(this,t,r);case"utf8":case"utf-8":return x(this,t,r);case"ascii":return j(this,t,r);case"latin1":case"binary":return C(this,t,r);case"base64":return P(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function b(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function m(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),K(r=+r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=s.from(t,n)),s.isBuffer(t))return 0===t.length?-1:g(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):g(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function g(e,t,r,n,o){let i,a=1,u=e.length,s=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,u/=2,s/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){let n=-1;for(i=r;i<u;i++)if(c(e,i)===c(t,-1===n?0:i-n)){if(-1===n&&(n=i),i-n+1===s)return n*a}else-1!==n&&(i-=i-n),n=-1}else for(r+s>u&&(r=u-s),i=r;i>=0;i--){let r=!0;for(let n=0;n<s;n++)if(c(e,i+n)!==c(t,n)){r=!1;break}if(r)return i}return-1}function _(e,t,r,n){r=Number(r)||0;const o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;const i=t.length;let a;for(n>i/2&&(n=i/2),a=0;a<n;++a){const n=parseInt(t.substr(2*a,2),16);if(K(n))return a;e[r+a]=n}return a}function w(e,t,r,n){return X(H(t,e.length-r),e,r,n)}function O(e,t,r,n){return X(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function S(e,t,r,n){return X(Y(t),e,r,n)}function E(e,t,r,n){return X(function(e,t){let r,n,o;const i=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function P(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function x(e,t,r){r=Math.min(e.length,r);const n=[];let o=t;for(;o<r;){const t=e[o];let i=null,a=t>239?4:t>223?3:t>191?2:1;if(o+a<=r){let r,n,u,s;switch(a){case 1:t<128&&(i=t);break;case 2:r=e[o+1],128==(192&r)&&(s=(31&t)<<6|63&r,s>127&&(i=s));break;case 3:r=e[o+1],n=e[o+2],128==(192&r)&&128==(192&n)&&(s=(15&t)<<12|(63&r)<<6|63&n,s>2047&&(s<55296||s>57343)&&(i=s));break;case 4:r=e[o+1],n=e[o+2],u=e[o+3],128==(192&r)&&128==(192&n)&&128==(192&u)&&(s=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&u,s>65535&&s<1114112&&(i=s))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,n.push(i>>>10&1023|55296),i=56320|1023&i),n.push(i),o+=a}return function(e){const t=e.length;if(t<=T)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=T));return r}(n)}t.kMaxLength=a,s.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),s.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(e,t,r){return c(e,t,r)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(e,t,r){return function(e,t,r){return l(e),e<=0?u(e):void 0!==t?"string"==typeof r?u(e).fill(t,r):u(e).fill(t):u(e)}(e,t,r)},s.allocUnsafe=function(e){return f(e)},s.allocUnsafeSlow=function(e){return f(e)},s.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==s.prototype},s.compare=function(e,t){if(Z(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),Z(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0},s.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return s.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=s.allocUnsafe(t);let o=0;for(r=0;r<e.length;++r){let t=e[r];if(Z(t,Uint8Array))o+t.length>n.length?(s.isBuffer(t)||(t=s.from(t)),t.copy(n,o)):Uint8Array.prototype.set.call(n,t,o);else{if(!s.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,o)}o+=t.length}return n},s.byteLength=v,s.prototype._isBuffer=!0,s.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)b(this,t,t+1);return this},s.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)b(this,t,t+3),b(this,t+1,t+2);return this},s.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)b(this,t,t+7),b(this,t+1,t+6),b(this,t+2,t+5),b(this,t+3,t+4);return this},s.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?x(this,0,e):y.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(e){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)},s.prototype.inspect=function(){let e="";const r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},i&&(s.prototype[i]=s.prototype.inspect),s.prototype.compare=function(e,t,r,n,o){if(Z(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;let i=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const u=Math.min(i,a),c=this.slice(n,o),l=e.slice(t,r);for(let e=0;e<u;++e)if(c[e]!==l[e]){i=c[e],a=l[e];break}return i<a?-1:a<i?1:0},s.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},s.prototype.indexOf=function(e,t,r){return m(this,e,t,r,!0)},s.prototype.lastIndexOf=function(e,t,r){return m(this,e,t,r,!1)},s.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let i=!1;for(;;)switch(n){case"hex":return _(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":case"latin1":case"binary":return O(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const T=4096;function j(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function C(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function A(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let o="";for(let n=t;n<r;++n)o+=$[e[n]];return o}function k(e,t,r){const n=e.slice(t,r);let o="";for(let e=0;e<n.length-1;e+=2)o+=String.fromCharCode(n[e]+256*n[e+1]);return o}function R(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function I(e,t,r,n,o,i){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function M(e,t,r,n,o){V(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function N(e,t,r,n,o){V(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r+7]=i,i>>=8,e[r+6]=i,i>>=8,e[r+5]=i,i>>=8,e[r+4]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function D(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(e,t,r,n,i){return t=+t,r>>>=0,i||D(e,0,r,4),o.write(e,t,r,n,23,4),r+4}function U(e,t,r,n,i){return t=+t,r>>>=0,i||D(e,0,r,8),o.write(e,t,r,n,52,8),r+8}s.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,s.prototype),n},s.prototype.readUintLE=s.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return n},s.prototype.readUintBE=s.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);let n=this[e+--t],o=1;for(;t>0&&(o*=256);)n+=this[e+--t]*o;return n},s.prototype.readUint8=s.prototype.readUInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),this[e]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readBigUInt64LE=Q((function(e){W(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,o=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(o)<<BigInt(32))})),s.prototype.readBigUInt64BE=Q((function(e){W(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],o=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(o)})),s.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*t)),n},s.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);let n=t,o=1,i=this[e+--n];for(;n>0&&(o*=256);)i+=this[e+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},s.prototype.readInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||R(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt16BE=function(e,t){e>>>=0,t||R(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readBigInt64LE=Q((function(e){W(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),s.prototype.readBigInt64BE=Q((function(e){W(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),s.prototype.readFloatLE=function(e,t){return e>>>=0,t||R(e,4,this.length),o.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||R(e,4,this.length),o.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||R(e,8,this.length),o.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||R(e,8,this.length),o.read(this,e,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||I(this,e,t,r,Math.pow(2,8*r)-1,0);let o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||I(this,e,t,r,Math.pow(2,8*r)-1,0);let o=r-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r},s.prototype.writeUint8=s.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeBigUInt64LE=Q((function(e,t=0){return M(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),s.prototype.writeBigUInt64BE=Q((function(e,t=0){return N(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),s.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);I(this,e,t,r,n-1,-n)}let o=0,i=1,a=0;for(this[t]=255&e;++o<r&&(i*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/i>>0)-a&255;return t+r},s.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);I(this,e,t,r,n-1,-n)}let o=r-1,i=1,a=0;for(this[t+o]=255&e;--o>=0&&(i*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/i>>0)-a&255;return t+r},s.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeBigInt64LE=Q((function(e,t=0){return M(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),s.prototype.writeBigInt64BE=Q((function(e,t=0){return N(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),s.prototype.writeFloatLE=function(e,t,r){return L(this,e,t,!0,r)},s.prototype.writeFloatBE=function(e,t,r){return L(this,e,t,!1,r)},s.prototype.writeDoubleLE=function(e,t,r){return U(this,e,t,!0,r)},s.prototype.writeDoubleBE=function(e,t,r){return U(this,e,t,!1,r)},s.prototype.copy=function(e,t,r,n){if(!s.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const o=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),o},s.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!s.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{const i=s.isBuffer(e)?e:s.from(e,n),a=i.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<r-t;++o)this[o+t]=i[o%a]}return this};const F={};function B(e,t,r){F[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function z(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function V(e,t,r,n,o,i){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let o;throw o=i>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(i+1)}${n}`:`>= -(2${n} ** ${8*(i+1)-1}${n}) and < 2 ** ${8*(i+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new F.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,r){W(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||G(t,e.length-(r+1))}(n,o,i)}function W(e,t){if("number"!=typeof e)throw new F.ERR_INVALID_ARG_TYPE(t,"number",e)}function G(e,t,r){if(Math.floor(e)!==e)throw W(e,r),new F.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}B("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),B("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),B("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,o=r;return Number.isInteger(r)&&Math.abs(r)>2**32?o=z(String(r)):"bigint"==typeof r&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=z(o)),o+="n"),n+=` It must be ${t}. Received ${o}`,n}),RangeError);const q=/[^+/0-9A-Za-z-_]/g;function H(e,t){let r;t=t||1/0;const n=e.length;let o=null;const i=[];for(let a=0;a<n;++a){if(r=e.charCodeAt(a),r>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function Y(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(q,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function X(e,t,r,n){let o;for(o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function Z(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function K(e){return e!=e}const $=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let o=0;o<16;++o)t[n+o]=e[r]+e[o]}return t}();function Q(e){return"undefined"==typeof BigInt?J:e}function J(){throw new Error("BigInt not supported")}},6931:e=>{e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},3269:(e,t,r)=>{var n=r(6931),o=r(9975),i=Object.hasOwnProperty,a=Object.create(null);for(var u in n)i.call(n,u)&&(a[n[u]]=u);var s=e.exports={to:{},get:{}};function c(e,t,r){return Math.min(Math.max(t,e),r)}function l(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}s.get=function(e){var t,r;switch(e.substring(0,3).toLowerCase()){case"hsl":t=s.get.hsl(e),r="hsl";break;case"hwb":t=s.get.hwb(e),r="hwb";break;default:t=s.get.rgb(e),r="rgb"}return t?{model:r,value:t}:null},s.get.rgb=function(e){if(!e)return null;var t,r,o,a=[0,0,0,1];if(t=e.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(o=t[2],t=t[1],r=0;r<3;r++){var u=2*r;a[r]=parseInt(t.slice(u,u+2),16)}o&&(a[3]=parseInt(o,16)/255)}else if(t=e.match(/^#([a-f0-9]{3,4})$/i)){for(o=(t=t[1])[3],r=0;r<3;r++)a[r]=parseInt(t[r]+t[r],16);o&&(a[3]=parseInt(o+o,16)/255)}else if(t=e.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(r=0;r<3;r++)a[r]=parseInt(t[r+1],0);t[4]&&(t[5]?a[3]=.01*parseFloat(t[4]):a[3]=parseFloat(t[4]))}else{if(!(t=e.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(t=e.match(/^(\w+)$/))?"transparent"===t[1]?[0,0,0,0]:i.call(n,t[1])?((a=n[t[1]])[3]=1,a):null:null;for(r=0;r<3;r++)a[r]=Math.round(2.55*parseFloat(t[r+1]));t[4]&&(t[5]?a[3]=.01*parseFloat(t[4]):a[3]=parseFloat(t[4]))}for(r=0;r<3;r++)a[r]=c(a[r],0,255);return a[3]=c(a[3],0,1),a},s.get.hsl=function(e){if(!e)return null;var t=e.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var r=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,c(parseFloat(t[2]),0,100),c(parseFloat(t[3]),0,100),c(isNaN(r)?1:r,0,1)]}return null},s.get.hwb=function(e){if(!e)return null;var t=e.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var r=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,c(parseFloat(t[2]),0,100),c(parseFloat(t[3]),0,100),c(isNaN(r)?1:r,0,1)]}return null},s.to.hex=function(){var e=o(arguments);return"#"+l(e[0])+l(e[1])+l(e[2])+(e[3]<1?l(Math.round(255*e[3])):"")},s.to.rgb=function(){var e=o(arguments);return e.length<4||1===e[3]?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"},s.to.rgb.percent=function(){var e=o(arguments),t=Math.round(e[0]/255*100),r=Math.round(e[1]/255*100),n=Math.round(e[2]/255*100);return e.length<4||1===e[3]?"rgb("+t+"%, "+r+"%, "+n+"%)":"rgba("+t+"%, "+r+"%, "+n+"%, "+e[3]+")"},s.to.hsl=function(){var e=o(arguments);return e.length<4||1===e[3]?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"},s.to.hwb=function(){var e=o(arguments),t="";return e.length>=4&&1!==e[3]&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"},s.to.keyword=function(e){return a[e.slice(0,3)]}},9792:(e,t,r)=>{var n=r(7045),o=r(4360),i=r(6804);e.exports=function(e,t){if(!t)return e;var r=Object.keys(t);if(0===r.length)return e;for(var a=n(e),u=r.length-1;u>=0;u--){var s=r[u],c=String(t[s]);c&&(c=" "+c),i(a,{type:"preprocessor",data:"#define "+s+c})}return o(a)}},6804:e=>{e.exports=function(e,o){Array.isArray(o)||(o=[o]);var i=function(e){for(var t=-1,r=0;r<e.length;r++){var o=e[r];if("preprocessor"===o.type)/^#(extension|version)/.test(o.data)&&(t=Math.max(t,r));else if("keyword"===o.type&&"precision"===o.data){var i=n(e,r);if(-1===i)throw new Error("precision statement not followed by any semicolons!");t=Math.max(t,i)}}return t+1}(e),a=i>0?e[i-1]:null;a&&r.test(a.data)&&e.splice(i++,0,t),e.splice.apply(e,[i,0].concat(o));var u=i+o.length;return e[u]&&/[^\r\n]$/.test(e[u].data)&&e.splice(u,0,t),e};var t={data:"\n",type:"whitespace"},r=/[^\r\n]$/;function n(e,t){for(var r=t;r<e.length;r++)if("operator"===e[r].type&&";"===e[r].data)return r;return-1}},4360:e=>{e.exports=function(e){for(var t=[],r=0;r<e.length;r++)"eof"!==e[r].type&&t.push(e[r].data);return t.join("")}},3206:(e,t,r)=>{e.exports=function(e){var t,r,S,E=0,P=0,x=s,T=[],j=[],C=1,A=0,k=0,R=!1,I=!1,M="",N=i,D=n;"300 es"===(e=e||{}).version&&(N=u,D=a);var L={},U={};for(E=0;E<N.length;E++)L[N[E]]=!0;for(E=0;E<D.length;E++)U[D[E]]=!0;return function(e){return j=[],null!==e?function(e){var r;for(E=0,e.toString&&(e=e.toString()),M+=e.replace(/\r\n/g,"\n"),S=M.length;t=M[E],E<S;){switch(r=E,x){case l:E=W();break;case f:case h:E=V();break;case d:E=G();break;case p:E=Y();break;case w:E=H();break;case v:E=X();break;case c:E=Z();break;case g:E=z();break;case s:E=B()}r!==E&&("\n"===M[r]?(A=0,++C):++A)}return P+=E,M=M.slice(E),j}(e):(T.length&&F(T.join("")),x=_,F("(eof)"),j)};function F(e){e.length&&j.push({type:O[x],data:e,position:k,line:C,column:A})}function B(){return T=T.length?[]:T,"/"===r&&"*"===t?(k=P+E-1,x=l,r=t,E+1):"/"===r&&"/"===t?(k=P+E-1,x=f,r=t,E+1):"#"===t?(x=h,k=P+E,E):/\s/.test(t)?(x=g,k=P+E,E):(R=/\d/.test(t),I=/[^\w_]/.test(t),k=P+E,x=R?p:I?d:c,E)}function z(){return/[^\s]/g.test(t)?(F(T.join("")),x=s,E):(T.push(t),r=t,E+1)}function V(){return"\r"!==t&&"\n"!==t||"\\"===r?(T.push(t),r=t,E+1):(F(T.join("")),x=s,E)}function W(){return"/"===t&&"*"===r?(T.push(t),F(T.join("")),x=s,E+1):(T.push(t),r=t,E+1)}function G(){if("."===r&&/\d/.test(t))return x=v,E;if("/"===r&&"*"===t)return x=l,E;if("/"===r&&"/"===t)return x=f,E;if("."===t&&T.length){for(;q(T););return x=v,E}if(";"===t||")"===t||"("===t){if(T.length)for(;q(T););return F(t),x=s,E+1}var e=2===T.length&&"="!==t;if(/[\w_\d\s]/.test(t)||e){for(;q(T););return x=s,E}return T.push(t),r=t,E+1}function q(e){for(var t,r,n=0;;){if(t=o.indexOf(e.slice(0,e.length+n).join("")),r=o[t],-1===t){if(n--+e.length>0)continue;r=e.slice(0,1).join("")}return F(r),k+=r.length,(T=T.slice(r.length)).length}}function H(){return/[^a-fA-F0-9]/.test(t)?(F(T.join("")),x=s,E):(T.push(t),r=t,E+1)}function Y(){return"."===t||/[eE]/.test(t)?(T.push(t),x=v,r=t,E+1):"x"===t&&1===T.length&&"0"===T[0]?(x=w,T.push(t),r=t,E+1):/[^\d]/.test(t)?(F(T.join("")),x=s,E):(T.push(t),r=t,E+1)}function X(){return"f"===t&&(T.push(t),r=t,E+=1),/[eE]/.test(t)?(T.push(t),r=t,E+1):("-"!==t&&"+"!==t||!/[eE]/.test(r))&&/[^\d]/.test(t)?(F(T.join("")),x=s,E):(T.push(t),r=t,E+1)}function Z(){if(/[^\d\w_]/.test(t)){var e=T.join("");return x=U[e]?m:L[e]?b:y,F(T.join("")),x=s,E}return T.push(t),r=t,E+1}};var n=r(4704),o=r(2063),i=r(7192),a=r(8784),u=r(5592),s=999,c=9999,l=0,f=1,h=2,d=3,p=4,v=5,y=6,b=7,m=8,g=9,_=10,w=11,O=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},5592:(e,t,r)=>{var n=r(7192);n=n.slice().filter((function(e){return!/^(gl\_|texture)/.test(e)})),e.exports=n.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},7192:e=>{e.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},8784:(e,t,r)=>{var n=r(4704);e.exports=n.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},4704:e=>{e.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},2063:e=>{e.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},7045:(e,t,r)=>{var n=r(3206);e.exports=function(e,t){var r=n(t),o=[];return(o=o.concat(r(e))).concat(r(null))}},9318:(e,t)=>{t.read=function(e,t,r,n,o){var i,a,u=8*o-n-1,s=(1<<u)-1,c=s>>1,l=-7,f=r?o-1:0,h=r?-1:1,d=e[t+f];for(f+=h,i=d&(1<<-l)-1,d>>=-l,l+=u;l>0;i=256*i+e[t+f],f+=h,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=n;l>0;a=256*a+e[t+f],f+=h,l-=8);if(0===i)i=1-c;else{if(i===s)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),i-=c}return(d?-1:1)*a*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var a,u,s,c=8*i-o-1,l=(1<<c)-1,f=l>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:i-1,p=n?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(u=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-a))<1&&(a--,s*=2),(t+=a+f>=1?h/s:h*Math.pow(2,1-f))*s>=2&&(a++,s/=2),a+f>=l?(u=0,a=l):a+f>=1?(u=(t*s-1)*Math.pow(2,o),a+=f):(u=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[r+d]=255&u,d+=p,u/=256,o-=8);for(a=a<<o|u,c+=o;c>0;e[r+d]=255&a,d+=p,a/=256,c-=8);e[r+d-p]|=128*v}},5250:function(e,t,r){var n;e=r.nmd(e),function(){var o,i="Expected a function",a="__lodash_hash_undefined__",u="__lodash_placeholder__",s=32,c=128,l=1/0,f=9007199254740991,h=NaN,d=4294967295,p=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",s],["partialRight",64],["rearg",256]],v="[object Arguments]",y="[object Array]",b="[object Boolean]",m="[object Date]",g="[object Error]",_="[object Function]",w="[object GeneratorFunction]",O="[object Map]",S="[object Number]",E="[object Object]",P="[object Promise]",x="[object RegExp]",T="[object Set]",j="[object String]",C="[object Symbol]",A="[object WeakMap]",k="[object ArrayBuffer]",R="[object DataView]",I="[object Float32Array]",M="[object Float64Array]",N="[object Int8Array]",D="[object Int16Array]",L="[object Int32Array]",U="[object Uint8Array]",F="[object Uint8ClampedArray]",B="[object Uint16Array]",z="[object Uint32Array]",V=/\b__p \+= '';/g,W=/\b(__p \+=) '' \+/g,G=/(__e\(.*?\)|\b__t\)) \+\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,H=/[&<>"']/g,Y=RegExp(q.source),X=RegExp(H.source),Z=/<%-([\s\S]+?)%>/g,K=/<%([\s\S]+?)%>/g,$=/<%=([\s\S]+?)%>/g,Q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,J=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,re=RegExp(te.source),ne=/^\s+/,oe=/\s/,ie=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ae=/\{\n\/\* \[wrapped with (.+)\] \*/,ue=/,? & /,se=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ce=/[()=,{}\[\]\/\s]/,le=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,he=/\w*$/,de=/^[-+]0x[0-9a-f]+$/i,pe=/^0b[01]+$/i,ve=/^\[object .+?Constructor\]$/,ye=/^0o[0-7]+$/i,be=/^(?:0|[1-9]\d*)$/,me=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ge=/($^)/,_e=/['\n\r\u2028\u2029\\]/g,we="\\ud800-\\udfff",Oe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Se="\\u2700-\\u27bf",Ee="a-z\\xdf-\\xf6\\xf8-\\xff",Pe="A-Z\\xc0-\\xd6\\xd8-\\xde",xe="\\ufe0e\\ufe0f",Te="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",je="["+we+"]",Ce="["+Te+"]",Ae="["+Oe+"]",ke="\\d+",Re="["+Se+"]",Ie="["+Ee+"]",Me="[^"+we+Te+ke+Se+Ee+Pe+"]",Ne="\\ud83c[\\udffb-\\udfff]",De="[^"+we+"]",Le="(?:\\ud83c[\\udde6-\\uddff]){2}",Ue="[\\ud800-\\udbff][\\udc00-\\udfff]",Fe="["+Pe+"]",Be="\\u200d",ze="(?:"+Ie+"|"+Me+")",Ve="(?:"+Fe+"|"+Me+")",We="(?:['’](?:d|ll|m|re|s|t|ve))?",Ge="(?:['’](?:D|LL|M|RE|S|T|VE))?",qe="(?:"+Ae+"|"+Ne+")?",He="["+xe+"]?",Ye=He+qe+"(?:"+Be+"(?:"+[De,Le,Ue].join("|")+")"+He+qe+")*",Xe="(?:"+[Re,Le,Ue].join("|")+")"+Ye,Ze="(?:"+[De+Ae+"?",Ae,Le,Ue,je].join("|")+")",Ke=RegExp("['’]","g"),$e=RegExp(Ae,"g"),Qe=RegExp(Ne+"(?="+Ne+")|"+Ze+Ye,"g"),Je=RegExp([Fe+"?"+Ie+"+"+We+"(?="+[Ce,Fe,"$"].join("|")+")",Ve+"+"+Ge+"(?="+[Ce,Fe+ze,"$"].join("|")+")",Fe+"?"+ze+"+"+We,Fe+"+"+Ge,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ke,Xe].join("|"),"g"),et=RegExp("["+Be+we+Oe+xe+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,rt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],nt=-1,ot={};ot[I]=ot[M]=ot[N]=ot[D]=ot[L]=ot[U]=ot[F]=ot[B]=ot[z]=!0,ot[v]=ot[y]=ot[k]=ot[b]=ot[R]=ot[m]=ot[g]=ot[_]=ot[O]=ot[S]=ot[E]=ot[x]=ot[T]=ot[j]=ot[A]=!1;var it={};it[v]=it[y]=it[k]=it[R]=it[b]=it[m]=it[I]=it[M]=it[N]=it[D]=it[L]=it[O]=it[S]=it[E]=it[x]=it[T]=it[j]=it[C]=it[U]=it[F]=it[B]=it[z]=!0,it[g]=it[_]=it[A]=!1;var at={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ut=parseFloat,st=parseInt,ct="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,lt="object"==typeof self&&self&&self.Object===Object&&self,ft=ct||lt||Function("return this")(),ht=t&&!t.nodeType&&t,dt=ht&&e&&!e.nodeType&&e,pt=dt&&dt.exports===ht,vt=pt&&ct.process,yt=function(){try{return dt&&dt.require&&dt.require("util").types||vt&&vt.binding&&vt.binding("util")}catch(e){}}(),bt=yt&&yt.isArrayBuffer,mt=yt&&yt.isDate,gt=yt&&yt.isMap,_t=yt&&yt.isRegExp,wt=yt&&yt.isSet,Ot=yt&&yt.isTypedArray;function St(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Et(e,t,r,n){for(var o=-1,i=null==e?0:e.length;++o<i;){var a=e[o];t(n,a,r(a),e)}return n}function Pt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}function xt(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}function Tt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}function jt(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var a=e[r];t(a,r,e)&&(i[o++]=a)}return i}function Ct(e,t){return!(null==e||!e.length)&&Ft(e,t,0)>-1}function At(e,t,r){for(var n=-1,o=null==e?0:e.length;++n<o;)if(r(t,e[n]))return!0;return!1}function kt(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}function Rt(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}function It(e,t,r,n){var o=-1,i=null==e?0:e.length;for(n&&i&&(r=e[++o]);++o<i;)r=t(r,e[o],o,e);return r}function Mt(e,t,r,n){var o=null==e?0:e.length;for(n&&o&&(r=e[--o]);o--;)r=t(r,e[o],o,e);return r}function Nt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var Dt=Wt("length");function Lt(e,t,r){var n;return r(e,(function(e,r,o){if(t(e,r,o))return n=r,!1})),n}function Ut(e,t,r,n){for(var o=e.length,i=r+(n?1:-1);n?i--:++i<o;)if(t(e[i],i,e))return i;return-1}function Ft(e,t,r){return t==t?function(e,t,r){for(var n=r-1,o=e.length;++n<o;)if(e[n]===t)return n;return-1}(e,t,r):Ut(e,zt,r)}function Bt(e,t,r,n){for(var o=r-1,i=e.length;++o<i;)if(n(e[o],t))return o;return-1}function zt(e){return e!=e}function Vt(e,t){var r=null==e?0:e.length;return r?Ht(e,t)/r:h}function Wt(e){return function(t){return null==t?o:t[e]}}function Gt(e){return function(t){return null==e?o:e[t]}}function qt(e,t,r,n,o){return o(e,(function(e,o,i){r=n?(n=!1,e):t(r,e,o,i)})),r}function Ht(e,t){for(var r,n=-1,i=e.length;++n<i;){var a=t(e[n]);a!==o&&(r=r===o?a:r+a)}return r}function Yt(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Xt(e){return e?e.slice(0,fr(e)+1).replace(ne,""):e}function Zt(e){return function(t){return e(t)}}function Kt(e,t){return kt(t,(function(t){return e[t]}))}function $t(e,t){return e.has(t)}function Qt(e,t){for(var r=-1,n=e.length;++r<n&&Ft(t,e[r],0)>-1;);return r}function Jt(e,t){for(var r=e.length;r--&&Ft(t,e[r],0)>-1;);return r}var er=Gt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),tr=Gt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function rr(e){return"\\"+at[e]}function nr(e){return et.test(e)}function or(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function ir(e,t){return function(r){return e(t(r))}}function ar(e,t){for(var r=-1,n=e.length,o=0,i=[];++r<n;){var a=e[r];a!==t&&a!==u||(e[r]=u,i[o++]=r)}return i}function ur(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}function sr(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=[e,e]})),r}function cr(e){return nr(e)?function(e){for(var t=Qe.lastIndex=0;Qe.test(e);)++t;return t}(e):Dt(e)}function lr(e){return nr(e)?function(e){return e.match(Qe)||[]}(e):function(e){return e.split("")}(e)}function fr(e){for(var t=e.length;t--&&oe.test(e.charAt(t)););return t}var hr=Gt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),dr=function e(t){var r,n=(t=null==t?ft:dr.defaults(ft.Object(),t,dr.pick(ft,rt))).Array,oe=t.Date,we=t.Error,Oe=t.Function,Se=t.Math,Ee=t.Object,Pe=t.RegExp,xe=t.String,Te=t.TypeError,je=n.prototype,Ce=Oe.prototype,Ae=Ee.prototype,ke=t["__core-js_shared__"],Re=Ce.toString,Ie=Ae.hasOwnProperty,Me=0,Ne=(r=/[^.]+$/.exec(ke&&ke.keys&&ke.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",De=Ae.toString,Le=Re.call(Ee),Ue=ft._,Fe=Pe("^"+Re.call(Ie).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Be=pt?t.Buffer:o,ze=t.Symbol,Ve=t.Uint8Array,We=Be?Be.allocUnsafe:o,Ge=ir(Ee.getPrototypeOf,Ee),qe=Ee.create,He=Ae.propertyIsEnumerable,Ye=je.splice,Xe=ze?ze.isConcatSpreadable:o,Ze=ze?ze.iterator:o,Qe=ze?ze.toStringTag:o,et=function(){try{var e=ci(Ee,"defineProperty");return e({},"",{}),e}catch(e){}}(),at=t.clearTimeout!==ft.clearTimeout&&t.clearTimeout,ct=oe&&oe.now!==ft.Date.now&&oe.now,lt=t.setTimeout!==ft.setTimeout&&t.setTimeout,ht=Se.ceil,dt=Se.floor,vt=Ee.getOwnPropertySymbols,yt=Be?Be.isBuffer:o,Dt=t.isFinite,Gt=je.join,pr=ir(Ee.keys,Ee),vr=Se.max,yr=Se.min,br=oe.now,mr=t.parseInt,gr=Se.random,_r=je.reverse,wr=ci(t,"DataView"),Or=ci(t,"Map"),Sr=ci(t,"Promise"),Er=ci(t,"Set"),Pr=ci(t,"WeakMap"),xr=ci(Ee,"create"),Tr=Pr&&new Pr,jr={},Cr=Li(wr),Ar=Li(Or),kr=Li(Sr),Rr=Li(Er),Ir=Li(Pr),Mr=ze?ze.prototype:o,Nr=Mr?Mr.valueOf:o,Dr=Mr?Mr.toString:o;function Lr(e){if(eu(e)&&!Wa(e)&&!(e instanceof zr)){if(e instanceof Br)return e;if(Ie.call(e,"__wrapped__"))return Ui(e)}return new Br(e)}var Ur=function(){function e(){}return function(t){if(!Ja(t))return{};if(qe)return qe(t);e.prototype=t;var r=new e;return e.prototype=o,r}}();function Fr(){}function Br(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function zr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Vr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Wr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Gr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function qr(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new Gr;++t<r;)this.add(e[t])}function Hr(e){var t=this.__data__=new Wr(e);this.size=t.size}function Yr(e,t){var r=Wa(e),n=!r&&Va(e),o=!r&&!n&&Ya(e),i=!r&&!n&&!o&&su(e),a=r||n||o||i,u=a?Yt(e.length,xe):[],s=u.length;for(var c in e)!t&&!Ie.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||yi(c,s))||u.push(c);return u}function Xr(e){var t=e.length;return t?e[qn(0,t-1)]:o}function Zr(e,t){return Ri(To(e),on(t,0,e.length))}function Kr(e){return Ri(To(e))}function $r(e,t,r){(r!==o&&!Fa(e[t],r)||r===o&&!(t in e))&&rn(e,t,r)}function Qr(e,t,r){var n=e[t];Ie.call(e,t)&&Fa(n,r)&&(r!==o||t in e)||rn(e,t,r)}function Jr(e,t){for(var r=e.length;r--;)if(Fa(e[r][0],t))return r;return-1}function en(e,t,r,n){return ln(e,(function(e,o,i){t(n,e,r(e),i)})),n}function tn(e,t){return e&&jo(t,Au(t),e)}function rn(e,t,r){"__proto__"==t&&et?et(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function nn(e,t){for(var r=-1,i=t.length,a=n(i),u=null==e;++r<i;)a[r]=u?o:Pu(e,t[r]);return a}function on(e,t,r){return e==e&&(r!==o&&(e=e<=r?e:r),t!==o&&(e=e>=t?e:t)),e}function an(e,t,r,n,i,a){var u,s=1&t,c=2&t,l=4&t;if(r&&(u=i?r(e,n,i,a):r(e)),u!==o)return u;if(!Ja(e))return e;var f=Wa(e);if(f){if(u=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&Ie.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(e),!s)return To(e,u)}else{var h=hi(e),d=h==_||h==w;if(Ya(e))return wo(e,s);if(h==E||h==v||d&&!i){if(u=c||d?{}:pi(e),!s)return c?function(e,t){return jo(e,fi(e),t)}(e,function(e,t){return e&&jo(t,ku(t),e)}(u,e)):function(e,t){return jo(e,li(e),t)}(e,tn(u,e))}else{if(!it[h])return i?e:{};u=function(e,t,r){var n,o=e.constructor;switch(t){case k:return Oo(e);case b:case m:return new o(+e);case R:return function(e,t){var r=t?Oo(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case I:case M:case N:case D:case L:case U:case F:case B:case z:return So(e,r);case O:return new o;case S:case j:return new o(e);case x:return function(e){var t=new e.constructor(e.source,he.exec(e));return t.lastIndex=e.lastIndex,t}(e);case T:return new o;case C:return n=e,Nr?Ee(Nr.call(n)):{}}}(e,h,s)}}a||(a=new Hr);var p=a.get(e);if(p)return p;a.set(e,u),iu(e)?e.forEach((function(n){u.add(an(n,t,r,n,e,a))})):tu(e)&&e.forEach((function(n,o){u.set(o,an(n,t,r,o,e,a))}));var y=f?o:(l?c?ri:ti:c?ku:Au)(e);return Pt(y||e,(function(n,o){y&&(n=e[o=n]),Qr(u,o,an(n,t,r,o,e,a))})),u}function un(e,t,r){var n=r.length;if(null==e)return!n;for(e=Ee(e);n--;){var i=r[n],a=t[i],u=e[i];if(u===o&&!(i in e)||!a(u))return!1}return!0}function sn(e,t,r){if("function"!=typeof e)throw new Te(i);return ji((function(){e.apply(o,r)}),t)}function cn(e,t,r,n){var o=-1,i=Ct,a=!0,u=e.length,s=[],c=t.length;if(!u)return s;r&&(t=kt(t,Zt(r))),n?(i=At,a=!1):t.length>=200&&(i=$t,a=!1,t=new qr(t));e:for(;++o<u;){var l=e[o],f=null==r?l:r(l);if(l=n||0!==l?l:0,a&&f==f){for(var h=c;h--;)if(t[h]===f)continue e;s.push(l)}else i(t,f,n)||s.push(l)}return s}Lr.templateSettings={escape:Z,evaluate:K,interpolate:$,variable:"",imports:{_:Lr}},Lr.prototype=Fr.prototype,Lr.prototype.constructor=Lr,Br.prototype=Ur(Fr.prototype),Br.prototype.constructor=Br,zr.prototype=Ur(Fr.prototype),zr.prototype.constructor=zr,Vr.prototype.clear=function(){this.__data__=xr?xr(null):{},this.size=0},Vr.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Vr.prototype.get=function(e){var t=this.__data__;if(xr){var r=t[e];return r===a?o:r}return Ie.call(t,e)?t[e]:o},Vr.prototype.has=function(e){var t=this.__data__;return xr?t[e]!==o:Ie.call(t,e)},Vr.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=xr&&t===o?a:t,this},Wr.prototype.clear=function(){this.__data__=[],this.size=0},Wr.prototype.delete=function(e){var t=this.__data__,r=Jr(t,e);return!(r<0||(r==t.length-1?t.pop():Ye.call(t,r,1),--this.size,0))},Wr.prototype.get=function(e){var t=this.__data__,r=Jr(t,e);return r<0?o:t[r][1]},Wr.prototype.has=function(e){return Jr(this.__data__,e)>-1},Wr.prototype.set=function(e,t){var r=this.__data__,n=Jr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Gr.prototype.clear=function(){this.size=0,this.__data__={hash:new Vr,map:new(Or||Wr),string:new Vr}},Gr.prototype.delete=function(e){var t=ui(this,e).delete(e);return this.size-=t?1:0,t},Gr.prototype.get=function(e){return ui(this,e).get(e)},Gr.prototype.has=function(e){return ui(this,e).has(e)},Gr.prototype.set=function(e,t){var r=ui(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},qr.prototype.add=qr.prototype.push=function(e){return this.__data__.set(e,a),this},qr.prototype.has=function(e){return this.__data__.has(e)},Hr.prototype.clear=function(){this.__data__=new Wr,this.size=0},Hr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Hr.prototype.get=function(e){return this.__data__.get(e)},Hr.prototype.has=function(e){return this.__data__.has(e)},Hr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Wr){var n=r.__data__;if(!Or||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Gr(n)}return r.set(e,t),this.size=r.size,this};var ln=ko(mn),fn=ko(gn,!0);function hn(e,t){var r=!0;return ln(e,(function(e,n,o){return r=!!t(e,n,o)})),r}function dn(e,t,r){for(var n=-1,i=e.length;++n<i;){var a=e[n],u=t(a);if(null!=u&&(s===o?u==u&&!uu(u):r(u,s)))var s=u,c=a}return c}function pn(e,t){var r=[];return ln(e,(function(e,n,o){t(e,n,o)&&r.push(e)})),r}function vn(e,t,r,n,o){var i=-1,a=e.length;for(r||(r=vi),o||(o=[]);++i<a;){var u=e[i];t>0&&r(u)?t>1?vn(u,t-1,r,n,o):Rt(o,u):n||(o[o.length]=u)}return o}var yn=Ro(),bn=Ro(!0);function mn(e,t){return e&&yn(e,t,Au)}function gn(e,t){return e&&bn(e,t,Au)}function _n(e,t){return jt(t,(function(t){return Ka(e[t])}))}function wn(e,t){for(var r=0,n=(t=bo(t,e)).length;null!=e&&r<n;)e=e[Di(t[r++])];return r&&r==n?e:o}function On(e,t,r){var n=t(e);return Wa(e)?n:Rt(n,r(e))}function Sn(e){return null==e?e===o?"[object Undefined]":"[object Null]":Qe&&Qe in Ee(e)?function(e){var t=Ie.call(e,Qe),r=e[Qe];try{e[Qe]=o;var n=!0}catch(e){}var i=De.call(e);return n&&(t?e[Qe]=r:delete e[Qe]),i}(e):function(e){return De.call(e)}(e)}function En(e,t){return e>t}function Pn(e,t){return null!=e&&Ie.call(e,t)}function xn(e,t){return null!=e&&t in Ee(e)}function Tn(e,t,r){for(var i=r?At:Ct,a=e[0].length,u=e.length,s=u,c=n(u),l=1/0,f=[];s--;){var h=e[s];s&&t&&(h=kt(h,Zt(t))),l=yr(h.length,l),c[s]=!r&&(t||a>=120&&h.length>=120)?new qr(s&&h):o}h=e[0];var d=-1,p=c[0];e:for(;++d<a&&f.length<l;){var v=h[d],y=t?t(v):v;if(v=r||0!==v?v:0,!(p?$t(p,y):i(f,y,r))){for(s=u;--s;){var b=c[s];if(!(b?$t(b,y):i(e[s],y,r)))continue e}p&&p.push(y),f.push(v)}}return f}function jn(e,t,r){var n=null==(e=Pi(e,t=bo(t,e)))?e:e[Di(Zi(t))];return null==n?o:St(n,e,r)}function Cn(e){return eu(e)&&Sn(e)==v}function An(e,t,r,n,i){return e===t||(null==e||null==t||!eu(e)&&!eu(t)?e!=e&&t!=t:function(e,t,r,n,i,a){var u=Wa(e),s=Wa(t),c=u?y:hi(e),l=s?y:hi(t),f=(c=c==v?E:c)==E,h=(l=l==v?E:l)==E,d=c==l;if(d&&Ya(e)){if(!Ya(t))return!1;u=!0,f=!1}if(d&&!f)return a||(a=new Hr),u||su(e)?Jo(e,t,r,n,i,a):function(e,t,r,n,o,i,a){switch(r){case R:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case k:return!(e.byteLength!=t.byteLength||!i(new Ve(e),new Ve(t)));case b:case m:case S:return Fa(+e,+t);case g:return e.name==t.name&&e.message==t.message;case x:case j:return e==t+"";case O:var u=or;case T:var s=1&n;if(u||(u=ur),e.size!=t.size&&!s)return!1;var c=a.get(e);if(c)return c==t;n|=2,a.set(e,t);var l=Jo(u(e),u(t),n,o,i,a);return a.delete(e),l;case C:if(Nr)return Nr.call(e)==Nr.call(t)}return!1}(e,t,c,r,n,i,a);if(!(1&r)){var p=f&&Ie.call(e,"__wrapped__"),_=h&&Ie.call(t,"__wrapped__");if(p||_){var w=p?e.value():e,P=_?t.value():t;return a||(a=new Hr),i(w,P,r,n,a)}}return!!d&&(a||(a=new Hr),function(e,t,r,n,i,a){var u=1&r,s=ti(e),c=s.length;if(c!=ti(t).length&&!u)return!1;for(var l=c;l--;){var f=s[l];if(!(u?f in t:Ie.call(t,f)))return!1}var h=a.get(e),d=a.get(t);if(h&&d)return h==t&&d==e;var p=!0;a.set(e,t),a.set(t,e);for(var v=u;++l<c;){var y=e[f=s[l]],b=t[f];if(n)var m=u?n(b,y,f,t,e,a):n(y,b,f,e,t,a);if(!(m===o?y===b||i(y,b,r,n,a):m)){p=!1;break}v||(v="constructor"==f)}if(p&&!v){var g=e.constructor,_=t.constructor;g==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&g instanceof g&&"function"==typeof _&&_ instanceof _||(p=!1)}return a.delete(e),a.delete(t),p}(e,t,r,n,i,a))}(e,t,r,n,An,i))}function kn(e,t,r,n){var i=r.length,a=i,u=!n;if(null==e)return!a;for(e=Ee(e);i--;){var s=r[i];if(u&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){var c=(s=r[i])[0],l=e[c],f=s[1];if(u&&s[2]){if(l===o&&!(c in e))return!1}else{var h=new Hr;if(n)var d=n(l,f,c,e,t,h);if(!(d===o?An(f,l,3,n,h):d))return!1}}return!0}function Rn(e){return!(!Ja(e)||(t=e,Ne&&Ne in t))&&(Ka(e)?Fe:ve).test(Li(e));var t}function In(e){return"function"==typeof e?e:null==e?rs:"object"==typeof e?Wa(e)?Un(e[0],e[1]):Ln(e):fs(e)}function Mn(e){if(!wi(e))return pr(e);var t=[];for(var r in Ee(e))Ie.call(e,r)&&"constructor"!=r&&t.push(r);return t}function Nn(e,t){return e<t}function Dn(e,t){var r=-1,o=qa(e)?n(e.length):[];return ln(e,(function(e,n,i){o[++r]=t(e,n,i)})),o}function Ln(e){var t=si(e);return 1==t.length&&t[0][2]?Si(t[0][0],t[0][1]):function(r){return r===e||kn(r,e,t)}}function Un(e,t){return mi(e)&&Oi(t)?Si(Di(e),t):function(r){var n=Pu(r,e);return n===o&&n===t?xu(r,e):An(t,n,3)}}function Fn(e,t,r,n,i){e!==t&&yn(t,(function(a,u){if(i||(i=new Hr),Ja(a))!function(e,t,r,n,i,a,u){var s=xi(e,r),c=xi(t,r),l=u.get(c);if(l)$r(e,r,l);else{var f=a?a(s,c,r+"",e,t,u):o,h=f===o;if(h){var d=Wa(c),p=!d&&Ya(c),v=!d&&!p&&su(c);f=c,d||p||v?Wa(s)?f=s:Ha(s)?f=To(s):p?(h=!1,f=wo(c,!0)):v?(h=!1,f=So(c,!0)):f=[]:nu(c)||Va(c)?(f=s,Va(s)?f=yu(s):Ja(s)&&!Ka(s)||(f=pi(c))):h=!1}h&&(u.set(c,f),i(f,c,n,a,u),u.delete(c)),$r(e,r,f)}}(e,t,u,r,Fn,n,i);else{var s=n?n(xi(e,u),a,u+"",e,t,i):o;s===o&&(s=a),$r(e,u,s)}}),ku)}function Bn(e,t){var r=e.length;if(r)return yi(t+=t<0?r:0,r)?e[t]:o}function zn(e,t,r){t=t.length?kt(t,(function(e){return Wa(e)?function(t){return wn(t,1===e.length?e[0]:e)}:e})):[rs];var n=-1;t=kt(t,Zt(ai()));var o=Dn(e,(function(e,r,o){var i=kt(t,(function(t){return t(e)}));return{criteria:i,index:++n,value:e}}));return function(e,t){var n=e.length;for(e.sort((function(e,t){return function(e,t,r){for(var n=-1,o=e.criteria,i=t.criteria,a=o.length,u=r.length;++n<a;){var s=Eo(o[n],i[n]);if(s)return n>=u?s:s*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)}));n--;)e[n]=e[n].value;return e}(o)}function Vn(e,t,r){for(var n=-1,o=t.length,i={};++n<o;){var a=t[n],u=wn(e,a);r(u,a)&&Kn(i,bo(a,e),u)}return i}function Wn(e,t,r,n){var o=n?Bt:Ft,i=-1,a=t.length,u=e;for(e===t&&(t=To(t)),r&&(u=kt(e,Zt(r)));++i<a;)for(var s=0,c=t[i],l=r?r(c):c;(s=o(u,l,s,n))>-1;)u!==e&&Ye.call(u,s,1),Ye.call(e,s,1);return e}function Gn(e,t){for(var r=e?t.length:0,n=r-1;r--;){var o=t[r];if(r==n||o!==i){var i=o;yi(o)?Ye.call(e,o,1):so(e,o)}}return e}function qn(e,t){return e+dt(gr()*(t-e+1))}function Hn(e,t){var r="";if(!e||t<1||t>f)return r;do{t%2&&(r+=e),(t=dt(t/2))&&(e+=e)}while(t);return r}function Yn(e,t){return Ci(Ei(e,t,rs),e+"")}function Xn(e){return Xr(Fu(e))}function Zn(e,t){var r=Fu(e);return Ri(r,on(t,0,r.length))}function Kn(e,t,r,n){if(!Ja(e))return e;for(var i=-1,a=(t=bo(t,e)).length,u=a-1,s=e;null!=s&&++i<a;){var c=Di(t[i]),l=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(i!=u){var f=s[c];(l=n?n(f,c,s):o)===o&&(l=Ja(f)?f:yi(t[i+1])?[]:{})}Qr(s,c,l),s=s[c]}return e}var $n=Tr?function(e,t){return Tr.set(e,t),e}:rs,Qn=et?function(e,t){return et(e,"toString",{configurable:!0,enumerable:!1,value:Ju(t),writable:!0})}:rs;function Jn(e){return Ri(Fu(e))}function eo(e,t,r){var o=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=n(i);++o<i;)a[o]=e[o+t];return a}function to(e,t){var r;return ln(e,(function(e,n,o){return!(r=t(e,n,o))})),!!r}function ro(e,t,r){var n=0,o=null==e?n:e.length;if("number"==typeof t&&t==t&&o<=2147483647){for(;n<o;){var i=n+o>>>1,a=e[i];null!==a&&!uu(a)&&(r?a<=t:a<t)?n=i+1:o=i}return o}return no(e,t,rs,r)}function no(e,t,r,n){var i=0,a=null==e?0:e.length;if(0===a)return 0;for(var u=(t=r(t))!=t,s=null===t,c=uu(t),l=t===o;i<a;){var f=dt((i+a)/2),h=r(e[f]),d=h!==o,p=null===h,v=h==h,y=uu(h);if(u)var b=n||v;else b=l?v&&(n||d):s?v&&d&&(n||!p):c?v&&d&&!p&&(n||!y):!p&&!y&&(n?h<=t:h<t);b?i=f+1:a=f}return yr(a,4294967294)}function oo(e,t){for(var r=-1,n=e.length,o=0,i=[];++r<n;){var a=e[r],u=t?t(a):a;if(!r||!Fa(u,s)){var s=u;i[o++]=0===a?0:a}}return i}function io(e){return"number"==typeof e?e:uu(e)?h:+e}function ao(e){if("string"==typeof e)return e;if(Wa(e))return kt(e,ao)+"";if(uu(e))return Dr?Dr.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function uo(e,t,r){var n=-1,o=Ct,i=e.length,a=!0,u=[],s=u;if(r)a=!1,o=At;else if(i>=200){var c=t?null:Yo(e);if(c)return ur(c);a=!1,o=$t,s=new qr}else s=t?[]:u;e:for(;++n<i;){var l=e[n],f=t?t(l):l;if(l=r||0!==l?l:0,a&&f==f){for(var h=s.length;h--;)if(s[h]===f)continue e;t&&s.push(f),u.push(l)}else o(s,f,r)||(s!==u&&s.push(f),u.push(l))}return u}function so(e,t){return null==(e=Pi(e,t=bo(t,e)))||delete e[Di(Zi(t))]}function co(e,t,r,n){return Kn(e,t,r(wn(e,t)),n)}function lo(e,t,r,n){for(var o=e.length,i=n?o:-1;(n?i--:++i<o)&&t(e[i],i,e););return r?eo(e,n?0:i,n?i+1:o):eo(e,n?i+1:0,n?o:i)}function fo(e,t){var r=e;return r instanceof zr&&(r=r.value()),It(t,(function(e,t){return t.func.apply(t.thisArg,Rt([e],t.args))}),r)}function ho(e,t,r){var o=e.length;if(o<2)return o?uo(e[0]):[];for(var i=-1,a=n(o);++i<o;)for(var u=e[i],s=-1;++s<o;)s!=i&&(a[i]=cn(a[i]||u,e[s],t,r));return uo(vn(a,1),t,r)}function po(e,t,r){for(var n=-1,i=e.length,a=t.length,u={};++n<i;){var s=n<a?t[n]:o;r(u,e[n],s)}return u}function vo(e){return Ha(e)?e:[]}function yo(e){return"function"==typeof e?e:rs}function bo(e,t){return Wa(e)?e:mi(e,t)?[e]:Ni(bu(e))}var mo=Yn;function go(e,t,r){var n=e.length;return r=r===o?n:r,!t&&r>=n?e:eo(e,t,r)}var _o=at||function(e){return ft.clearTimeout(e)};function wo(e,t){if(t)return e.slice();var r=e.length,n=We?We(r):new e.constructor(r);return e.copy(n),n}function Oo(e){var t=new e.constructor(e.byteLength);return new Ve(t).set(new Ve(e)),t}function So(e,t){var r=t?Oo(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Eo(e,t){if(e!==t){var r=e!==o,n=null===e,i=e==e,a=uu(e),u=t!==o,s=null===t,c=t==t,l=uu(t);if(!s&&!l&&!a&&e>t||a&&u&&c&&!s&&!l||n&&u&&c||!r&&c||!i)return 1;if(!n&&!a&&!l&&e<t||l&&r&&i&&!n&&!a||s&&r&&i||!u&&i||!c)return-1}return 0}function Po(e,t,r,o){for(var i=-1,a=e.length,u=r.length,s=-1,c=t.length,l=vr(a-u,0),f=n(c+l),h=!o;++s<c;)f[s]=t[s];for(;++i<u;)(h||i<a)&&(f[r[i]]=e[i]);for(;l--;)f[s++]=e[i++];return f}function xo(e,t,r,o){for(var i=-1,a=e.length,u=-1,s=r.length,c=-1,l=t.length,f=vr(a-s,0),h=n(f+l),d=!o;++i<f;)h[i]=e[i];for(var p=i;++c<l;)h[p+c]=t[c];for(;++u<s;)(d||i<a)&&(h[p+r[u]]=e[i++]);return h}function To(e,t){var r=-1,o=e.length;for(t||(t=n(o));++r<o;)t[r]=e[r];return t}function jo(e,t,r,n){var i=!r;r||(r={});for(var a=-1,u=t.length;++a<u;){var s=t[a],c=n?n(r[s],e[s],s,r,e):o;c===o&&(c=e[s]),i?rn(r,s,c):Qr(r,s,c)}return r}function Co(e,t){return function(r,n){var o=Wa(r)?Et:en,i=t?t():{};return o(r,e,ai(n,2),i)}}function Ao(e){return Yn((function(t,r){var n=-1,i=r.length,a=i>1?r[i-1]:o,u=i>2?r[2]:o;for(a=e.length>3&&"function"==typeof a?(i--,a):o,u&&bi(r[0],r[1],u)&&(a=i<3?o:a,i=1),t=Ee(t);++n<i;){var s=r[n];s&&e(t,s,n,a)}return t}))}function ko(e,t){return function(r,n){if(null==r)return r;if(!qa(r))return e(r,n);for(var o=r.length,i=t?o:-1,a=Ee(r);(t?i--:++i<o)&&!1!==n(a[i],i,a););return r}}function Ro(e){return function(t,r,n){for(var o=-1,i=Ee(t),a=n(t),u=a.length;u--;){var s=a[e?u:++o];if(!1===r(i[s],s,i))break}return t}}function Io(e){return function(t){var r=nr(t=bu(t))?lr(t):o,n=r?r[0]:t.charAt(0),i=r?go(r,1).join(""):t.slice(1);return n[e]()+i}}function Mo(e){return function(t){return It(Ku(Vu(t).replace(Ke,"")),e,"")}}function No(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=Ur(e.prototype),n=e.apply(r,t);return Ja(n)?n:r}}function Do(e){return function(t,r,n){var i=Ee(t);if(!qa(t)){var a=ai(r,3);t=Au(t),r=function(e){return a(i[e],e,i)}}var u=e(t,r,n);return u>-1?i[a?t[u]:u]:o}}function Lo(e){return ei((function(t){var r=t.length,n=r,a=Br.prototype.thru;for(e&&t.reverse();n--;){var u=t[n];if("function"!=typeof u)throw new Te(i);if(a&&!s&&"wrapper"==oi(u))var s=new Br([],!0)}for(n=s?n:r;++n<r;){var c=oi(u=t[n]),l="wrapper"==c?ni(u):o;s=l&&gi(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?s[oi(l[0])].apply(s,l[3]):1==u.length&&gi(u)?s[c]():s.thru(u)}return function(){var e=arguments,n=e[0];if(s&&1==e.length&&Wa(n))return s.plant(n).value();for(var o=0,i=r?t[o].apply(this,e):n;++o<r;)i=t[o].call(this,i);return i}}))}function Uo(e,t,r,i,a,u,s,l,f,h){var d=t&c,p=1&t,v=2&t,y=24&t,b=512&t,m=v?o:No(e);return function c(){for(var g=arguments.length,_=n(g),w=g;w--;)_[w]=arguments[w];if(y)var O=ii(c),S=function(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}(_,O);if(i&&(_=Po(_,i,a,y)),u&&(_=xo(_,u,s,y)),g-=S,y&&g<h){var E=ar(_,O);return qo(e,t,Uo,c.placeholder,r,_,E,l,f,h-g)}var P=p?r:this,x=v?P[e]:e;return g=_.length,l?_=function(e,t){for(var r=e.length,n=yr(t.length,r),i=To(e);n--;){var a=t[n];e[n]=yi(a,r)?i[a]:o}return e}(_,l):b&&g>1&&_.reverse(),d&&f<g&&(_.length=f),this&&this!==ft&&this instanceof c&&(x=m||No(x)),x.apply(P,_)}}function Fo(e,t){return function(r,n){return function(e,t,r,n){return mn(e,(function(e,o,i){t(n,r(e),o,i)})),n}(r,e,t(n),{})}}function Bo(e,t){return function(r,n){var i;if(r===o&&n===o)return t;if(r!==o&&(i=r),n!==o){if(i===o)return n;"string"==typeof r||"string"==typeof n?(r=ao(r),n=ao(n)):(r=io(r),n=io(n)),i=e(r,n)}return i}}function zo(e){return ei((function(t){return t=kt(t,Zt(ai())),Yn((function(r){var n=this;return e(t,(function(e){return St(e,n,r)}))}))}))}function Vo(e,t){var r=(t=t===o?" ":ao(t)).length;if(r<2)return r?Hn(t,e):t;var n=Hn(t,ht(e/cr(t)));return nr(t)?go(lr(n),0,e).join(""):n.slice(0,e)}function Wo(e){return function(t,r,i){return i&&"number"!=typeof i&&bi(t,r,i)&&(r=i=o),t=hu(t),r===o?(r=t,t=0):r=hu(r),function(e,t,r,o){for(var i=-1,a=vr(ht((t-e)/(r||1)),0),u=n(a);a--;)u[o?a:++i]=e,e+=r;return u}(t,r,i=i===o?t<r?1:-1:hu(i),e)}}function Go(e){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=vu(t),r=vu(r)),e(t,r)}}function qo(e,t,r,n,i,a,u,c,l,f){var h=8&t;t|=h?s:64,4&(t&=~(h?64:s))||(t&=-4);var d=[e,t,i,h?a:o,h?u:o,h?o:a,h?o:u,c,l,f],p=r.apply(o,d);return gi(e)&&Ti(p,d),p.placeholder=n,Ai(p,e,t)}function Ho(e){var t=Se[e];return function(e,r){if(e=vu(e),(r=null==r?0:yr(du(r),292))&&Dt(e)){var n=(bu(e)+"e").split("e");return+((n=(bu(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}var Yo=Er&&1/ur(new Er([,-0]))[1]==l?function(e){return new Er(e)}:us;function Xo(e){return function(t){var r=hi(t);return r==O?or(t):r==T?sr(t):function(e,t){return kt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Zo(e,t,r,a,l,f,h,d){var p=2&t;if(!p&&"function"!=typeof e)throw new Te(i);var v=a?a.length:0;if(v||(t&=-97,a=l=o),h=h===o?h:vr(du(h),0),d=d===o?d:du(d),v-=l?l.length:0,64&t){var y=a,b=l;a=l=o}var m=p?o:ni(e),g=[e,t,r,a,l,y,b,f,h,d];if(m&&function(e,t){var r=e[1],n=t[1],o=r|n,i=o<131,a=n==c&&8==r||n==c&&256==r&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==r;if(!i&&!a)return e;1&n&&(e[2]=t[2],o|=1&r?0:4);var s=t[3];if(s){var l=e[3];e[3]=l?Po(l,s,t[4]):s,e[4]=l?ar(e[3],u):t[4]}(s=t[5])&&(l=e[5],e[5]=l?xo(l,s,t[6]):s,e[6]=l?ar(e[5],u):t[6]),(s=t[7])&&(e[7]=s),n&c&&(e[8]=null==e[8]?t[8]:yr(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}(g,m),e=g[0],t=g[1],r=g[2],a=g[3],l=g[4],!(d=g[9]=g[9]===o?p?0:e.length:vr(g[9]-v,0))&&24&t&&(t&=-25),t&&1!=t)_=8==t||16==t?function(e,t,r){var i=No(e);return function a(){for(var u=arguments.length,s=n(u),c=u,l=ii(a);c--;)s[c]=arguments[c];var f=u<3&&s[0]!==l&&s[u-1]!==l?[]:ar(s,l);return(u-=f.length)<r?qo(e,t,Uo,a.placeholder,o,s,f,o,o,r-u):St(this&&this!==ft&&this instanceof a?i:e,this,s)}}(e,t,d):t!=s&&33!=t||l.length?Uo.apply(o,g):function(e,t,r,o){var i=1&t,a=No(e);return function t(){for(var u=-1,s=arguments.length,c=-1,l=o.length,f=n(l+s),h=this&&this!==ft&&this instanceof t?a:e;++c<l;)f[c]=o[c];for(;s--;)f[c++]=arguments[++u];return St(h,i?r:this,f)}}(e,t,r,a);else var _=function(e,t,r){var n=1&t,o=No(e);return function t(){return(this&&this!==ft&&this instanceof t?o:e).apply(n?r:this,arguments)}}(e,t,r);return Ai((m?$n:Ti)(_,g),e,t)}function Ko(e,t,r,n){return e===o||Fa(e,Ae[r])&&!Ie.call(n,r)?t:e}function $o(e,t,r,n,i,a){return Ja(e)&&Ja(t)&&(a.set(t,e),Fn(e,t,o,$o,a),a.delete(t)),e}function Qo(e){return nu(e)?o:e}function Jo(e,t,r,n,i,a){var u=1&r,s=e.length,c=t.length;if(s!=c&&!(u&&c>s))return!1;var l=a.get(e),f=a.get(t);if(l&&f)return l==t&&f==e;var h=-1,d=!0,p=2&r?new qr:o;for(a.set(e,t),a.set(t,e);++h<s;){var v=e[h],y=t[h];if(n)var b=u?n(y,v,h,t,e,a):n(v,y,h,e,t,a);if(b!==o){if(b)continue;d=!1;break}if(p){if(!Nt(t,(function(e,t){if(!$t(p,t)&&(v===e||i(v,e,r,n,a)))return p.push(t)}))){d=!1;break}}else if(v!==y&&!i(v,y,r,n,a)){d=!1;break}}return a.delete(e),a.delete(t),d}function ei(e){return Ci(Ei(e,o,Gi),e+"")}function ti(e){return On(e,Au,li)}function ri(e){return On(e,ku,fi)}var ni=Tr?function(e){return Tr.get(e)}:us;function oi(e){for(var t=e.name+"",r=jr[t],n=Ie.call(jr,t)?r.length:0;n--;){var o=r[n],i=o.func;if(null==i||i==e)return o.name}return t}function ii(e){return(Ie.call(Lr,"placeholder")?Lr:e).placeholder}function ai(){var e=Lr.iteratee||ns;return e=e===ns?In:e,arguments.length?e(arguments[0],arguments[1]):e}function ui(e,t){var r,n,o=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map}function si(e){for(var t=Au(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,Oi(o)]}return t}function ci(e,t){var r=function(e,t){return null==e?o:e[t]}(e,t);return Rn(r)?r:o}var li=vt?function(e){return null==e?[]:(e=Ee(e),jt(vt(e),(function(t){return He.call(e,t)})))}:ps,fi=vt?function(e){for(var t=[];e;)Rt(t,li(e)),e=Ge(e);return t}:ps,hi=Sn;function di(e,t,r){for(var n=-1,o=(t=bo(t,e)).length,i=!1;++n<o;){var a=Di(t[n]);if(!(i=null!=e&&r(e,a)))break;e=e[a]}return i||++n!=o?i:!!(o=null==e?0:e.length)&&Qa(o)&&yi(a,o)&&(Wa(e)||Va(e))}function pi(e){return"function"!=typeof e.constructor||wi(e)?{}:Ur(Ge(e))}function vi(e){return Wa(e)||Va(e)||!!(Xe&&e&&e[Xe])}function yi(e,t){var r=typeof e;return!!(t=null==t?f:t)&&("number"==r||"symbol"!=r&&be.test(e))&&e>-1&&e%1==0&&e<t}function bi(e,t,r){if(!Ja(r))return!1;var n=typeof t;return!!("number"==n?qa(r)&&yi(t,r.length):"string"==n&&t in r)&&Fa(r[t],e)}function mi(e,t){if(Wa(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!uu(e))||J.test(e)||!Q.test(e)||null!=t&&e in Ee(t)}function gi(e){var t=oi(e),r=Lr[t];if("function"!=typeof r||!(t in zr.prototype))return!1;if(e===r)return!0;var n=ni(r);return!!n&&e===n[0]}(wr&&hi(new wr(new ArrayBuffer(1)))!=R||Or&&hi(new Or)!=O||Sr&&hi(Sr.resolve())!=P||Er&&hi(new Er)!=T||Pr&&hi(new Pr)!=A)&&(hi=function(e){var t=Sn(e),r=t==E?e.constructor:o,n=r?Li(r):"";if(n)switch(n){case Cr:return R;case Ar:return O;case kr:return P;case Rr:return T;case Ir:return A}return t});var _i=ke?Ka:vs;function wi(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ae)}function Oi(e){return e==e&&!Ja(e)}function Si(e,t){return function(r){return null!=r&&r[e]===t&&(t!==o||e in Ee(r))}}function Ei(e,t,r){return t=vr(t===o?e.length-1:t,0),function(){for(var o=arguments,i=-1,a=vr(o.length-t,0),u=n(a);++i<a;)u[i]=o[t+i];i=-1;for(var s=n(t+1);++i<t;)s[i]=o[i];return s[t]=r(u),St(e,this,s)}}function Pi(e,t){return t.length<2?e:wn(e,eo(t,0,-1))}function xi(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Ti=ki($n),ji=lt||function(e,t){return ft.setTimeout(e,t)},Ci=ki(Qn);function Ai(e,t,r){var n=t+"";return Ci(e,function(e,t){var r=t.length;if(!r)return e;var n=r-1;return t[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(ie,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return Pt(p,(function(r){var n="_."+r[0];t&r[1]&&!Ct(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(ae);return t?t[1].split(ue):[]}(n),r)))}function ki(e){var t=0,r=0;return function(){var n=br(),i=16-(n-r);if(r=n,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(o,arguments)}}function Ri(e,t){var r=-1,n=e.length,i=n-1;for(t=t===o?n:t;++r<t;){var a=qn(r,i),u=e[a];e[a]=e[r],e[r]=u}return e.length=t,e}var Ii,Mi,Ni=(Ii=Ia((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,r,n,o){t.push(n?o.replace(le,"$1"):r||e)})),t}),(function(e){return 500===Mi.size&&Mi.clear(),e})),Mi=Ii.cache,Ii);function Di(e){if("string"==typeof e||uu(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Li(e){if(null!=e){try{return Re.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ui(e){if(e instanceof zr)return e.clone();var t=new Br(e.__wrapped__,e.__chain__);return t.__actions__=To(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Fi=Yn((function(e,t){return Ha(e)?cn(e,vn(t,1,Ha,!0)):[]})),Bi=Yn((function(e,t){var r=Zi(t);return Ha(r)&&(r=o),Ha(e)?cn(e,vn(t,1,Ha,!0),ai(r,2)):[]})),zi=Yn((function(e,t){var r=Zi(t);return Ha(r)&&(r=o),Ha(e)?cn(e,vn(t,1,Ha,!0),o,r):[]}));function Vi(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=null==r?0:du(r);return o<0&&(o=vr(n+o,0)),Ut(e,ai(t,3),o)}function Wi(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=n-1;return r!==o&&(i=du(r),i=r<0?vr(n+i,0):yr(i,n-1)),Ut(e,ai(t,3),i,!0)}function Gi(e){return null!=e&&e.length?vn(e,1):[]}function qi(e){return e&&e.length?e[0]:o}var Hi=Yn((function(e){var t=kt(e,vo);return t.length&&t[0]===e[0]?Tn(t):[]})),Yi=Yn((function(e){var t=Zi(e),r=kt(e,vo);return t===Zi(r)?t=o:r.pop(),r.length&&r[0]===e[0]?Tn(r,ai(t,2)):[]})),Xi=Yn((function(e){var t=Zi(e),r=kt(e,vo);return(t="function"==typeof t?t:o)&&r.pop(),r.length&&r[0]===e[0]?Tn(r,o,t):[]}));function Zi(e){var t=null==e?0:e.length;return t?e[t-1]:o}var Ki=Yn($i);function $i(e,t){return e&&e.length&&t&&t.length?Wn(e,t):e}var Qi=ei((function(e,t){var r=null==e?0:e.length,n=nn(e,t);return Gn(e,kt(t,(function(e){return yi(e,r)?+e:e})).sort(Eo)),n}));function Ji(e){return null==e?e:_r.call(e)}var ea=Yn((function(e){return uo(vn(e,1,Ha,!0))})),ta=Yn((function(e){var t=Zi(e);return Ha(t)&&(t=o),uo(vn(e,1,Ha,!0),ai(t,2))})),ra=Yn((function(e){var t=Zi(e);return t="function"==typeof t?t:o,uo(vn(e,1,Ha,!0),o,t)}));function na(e){if(!e||!e.length)return[];var t=0;return e=jt(e,(function(e){if(Ha(e))return t=vr(e.length,t),!0})),Yt(t,(function(t){return kt(e,Wt(t))}))}function oa(e,t){if(!e||!e.length)return[];var r=na(e);return null==t?r:kt(r,(function(e){return St(t,o,e)}))}var ia=Yn((function(e,t){return Ha(e)?cn(e,t):[]})),aa=Yn((function(e){return ho(jt(e,Ha))})),ua=Yn((function(e){var t=Zi(e);return Ha(t)&&(t=o),ho(jt(e,Ha),ai(t,2))})),sa=Yn((function(e){var t=Zi(e);return t="function"==typeof t?t:o,ho(jt(e,Ha),o,t)})),ca=Yn(na),la=Yn((function(e){var t=e.length,r=t>1?e[t-1]:o;return r="function"==typeof r?(e.pop(),r):o,oa(e,r)}));function fa(e){var t=Lr(e);return t.__chain__=!0,t}function ha(e,t){return t(e)}var da=ei((function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,i=function(t){return nn(t,e)};return!(t>1||this.__actions__.length)&&n instanceof zr&&yi(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:ha,args:[i],thisArg:o}),new Br(n,this.__chain__).thru((function(e){return t&&!e.length&&e.push(o),e}))):this.thru(i)})),pa=Co((function(e,t,r){Ie.call(e,r)?++e[r]:rn(e,r,1)})),va=Do(Vi),ya=Do(Wi);function ba(e,t){return(Wa(e)?Pt:ln)(e,ai(t,3))}function ma(e,t){return(Wa(e)?xt:fn)(e,ai(t,3))}var ga=Co((function(e,t,r){Ie.call(e,r)?e[r].push(t):rn(e,r,[t])})),_a=Yn((function(e,t,r){var o=-1,i="function"==typeof t,a=qa(e)?n(e.length):[];return ln(e,(function(e){a[++o]=i?St(t,e,r):jn(e,t,r)})),a})),wa=Co((function(e,t,r){rn(e,r,t)}));function Oa(e,t){return(Wa(e)?kt:Dn)(e,ai(t,3))}var Sa=Co((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]})),Ea=Yn((function(e,t){if(null==e)return[];var r=t.length;return r>1&&bi(e,t[0],t[1])?t=[]:r>2&&bi(t[0],t[1],t[2])&&(t=[t[0]]),zn(e,vn(t,1),[])})),Pa=ct||function(){return ft.Date.now()};function xa(e,t,r){return t=r?o:t,t=e&&null==t?e.length:t,Zo(e,c,o,o,o,o,t)}function Ta(e,t){var r;if("function"!=typeof t)throw new Te(i);return e=du(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=o),r}}var ja=Yn((function(e,t,r){var n=1;if(r.length){var o=ar(r,ii(ja));n|=s}return Zo(e,n,t,r,o)})),Ca=Yn((function(e,t,r){var n=3;if(r.length){var o=ar(r,ii(Ca));n|=s}return Zo(t,n,e,r,o)}));function Aa(e,t,r){var n,a,u,s,c,l,f=0,h=!1,d=!1,p=!0;if("function"!=typeof e)throw new Te(i);function v(t){var r=n,i=a;return n=a=o,f=t,s=e.apply(i,r)}function y(e){var r=e-l;return l===o||r>=t||r<0||d&&e-f>=u}function b(){var e=Pa();if(y(e))return m(e);c=ji(b,function(e){var r=t-(e-l);return d?yr(r,u-(e-f)):r}(e))}function m(e){return c=o,p&&n?v(e):(n=a=o,s)}function g(){var e=Pa(),r=y(e);if(n=arguments,a=this,l=e,r){if(c===o)return function(e){return f=e,c=ji(b,t),h?v(e):s}(l);if(d)return _o(c),c=ji(b,t),v(l)}return c===o&&(c=ji(b,t)),s}return t=vu(t)||0,Ja(r)&&(h=!!r.leading,u=(d="maxWait"in r)?vr(vu(r.maxWait)||0,t):u,p="trailing"in r?!!r.trailing:p),g.cancel=function(){c!==o&&_o(c),f=0,n=l=a=c=o},g.flush=function(){return c===o?s:m(Pa())},g}var ka=Yn((function(e,t){return sn(e,1,t)})),Ra=Yn((function(e,t,r){return sn(e,vu(t)||0,r)}));function Ia(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Te(i);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(Ia.Cache||Gr),r}function Ma(e){if("function"!=typeof e)throw new Te(i);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ia.Cache=Gr;var Na=mo((function(e,t){var r=(t=1==t.length&&Wa(t[0])?kt(t[0],Zt(ai())):kt(vn(t,1),Zt(ai()))).length;return Yn((function(n){for(var o=-1,i=yr(n.length,r);++o<i;)n[o]=t[o].call(this,n[o]);return St(e,this,n)}))})),Da=Yn((function(e,t){var r=ar(t,ii(Da));return Zo(e,s,o,t,r)})),La=Yn((function(e,t){var r=ar(t,ii(La));return Zo(e,64,o,t,r)})),Ua=ei((function(e,t){return Zo(e,256,o,o,o,t)}));function Fa(e,t){return e===t||e!=e&&t!=t}var Ba=Go(En),za=Go((function(e,t){return e>=t})),Va=Cn(function(){return arguments}())?Cn:function(e){return eu(e)&&Ie.call(e,"callee")&&!He.call(e,"callee")},Wa=n.isArray,Ga=bt?Zt(bt):function(e){return eu(e)&&Sn(e)==k};function qa(e){return null!=e&&Qa(e.length)&&!Ka(e)}function Ha(e){return eu(e)&&qa(e)}var Ya=yt||vs,Xa=mt?Zt(mt):function(e){return eu(e)&&Sn(e)==m};function Za(e){if(!eu(e))return!1;var t=Sn(e);return t==g||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!nu(e)}function Ka(e){if(!Ja(e))return!1;var t=Sn(e);return t==_||t==w||"[object AsyncFunction]"==t||"[object Proxy]"==t}function $a(e){return"number"==typeof e&&e==du(e)}function Qa(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function Ja(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function eu(e){return null!=e&&"object"==typeof e}var tu=gt?Zt(gt):function(e){return eu(e)&&hi(e)==O};function ru(e){return"number"==typeof e||eu(e)&&Sn(e)==S}function nu(e){if(!eu(e)||Sn(e)!=E)return!1;var t=Ge(e);if(null===t)return!0;var r=Ie.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Re.call(r)==Le}var ou=_t?Zt(_t):function(e){return eu(e)&&Sn(e)==x},iu=wt?Zt(wt):function(e){return eu(e)&&hi(e)==T};function au(e){return"string"==typeof e||!Wa(e)&&eu(e)&&Sn(e)==j}function uu(e){return"symbol"==typeof e||eu(e)&&Sn(e)==C}var su=Ot?Zt(Ot):function(e){return eu(e)&&Qa(e.length)&&!!ot[Sn(e)]},cu=Go(Nn),lu=Go((function(e,t){return e<=t}));function fu(e){if(!e)return[];if(qa(e))return au(e)?lr(e):To(e);if(Ze&&e[Ze])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[Ze]());var t=hi(e);return(t==O?or:t==T?ur:Fu)(e)}function hu(e){return e?(e=vu(e))===l||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function du(e){var t=hu(e),r=t%1;return t==t?r?t-r:t:0}function pu(e){return e?on(du(e),0,d):0}function vu(e){if("number"==typeof e)return e;if(uu(e))return h;if(Ja(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ja(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Xt(e);var r=pe.test(e);return r||ye.test(e)?st(e.slice(2),r?2:8):de.test(e)?h:+e}function yu(e){return jo(e,ku(e))}function bu(e){return null==e?"":ao(e)}var mu=Ao((function(e,t){if(wi(t)||qa(t))jo(t,Au(t),e);else for(var r in t)Ie.call(t,r)&&Qr(e,r,t[r])})),gu=Ao((function(e,t){jo(t,ku(t),e)})),_u=Ao((function(e,t,r,n){jo(t,ku(t),e,n)})),wu=Ao((function(e,t,r,n){jo(t,Au(t),e,n)})),Ou=ei(nn),Su=Yn((function(e,t){e=Ee(e);var r=-1,n=t.length,i=n>2?t[2]:o;for(i&&bi(t[0],t[1],i)&&(n=1);++r<n;)for(var a=t[r],u=ku(a),s=-1,c=u.length;++s<c;){var l=u[s],f=e[l];(f===o||Fa(f,Ae[l])&&!Ie.call(e,l))&&(e[l]=a[l])}return e})),Eu=Yn((function(e){return e.push(o,$o),St(Iu,o,e)}));function Pu(e,t,r){var n=null==e?o:wn(e,t);return n===o?r:n}function xu(e,t){return null!=e&&di(e,t,xn)}var Tu=Fo((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=De.call(t)),e[t]=r}),Ju(rs)),ju=Fo((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=De.call(t)),Ie.call(e,t)?e[t].push(r):e[t]=[r]}),ai),Cu=Yn(jn);function Au(e){return qa(e)?Yr(e):Mn(e)}function ku(e){return qa(e)?Yr(e,!0):function(e){if(!Ja(e))return function(e){var t=[];if(null!=e)for(var r in Ee(e))t.push(r);return t}(e);var t=wi(e),r=[];for(var n in e)("constructor"!=n||!t&&Ie.call(e,n))&&r.push(n);return r}(e)}var Ru=Ao((function(e,t,r){Fn(e,t,r)})),Iu=Ao((function(e,t,r,n){Fn(e,t,r,n)})),Mu=ei((function(e,t){var r={};if(null==e)return r;var n=!1;t=kt(t,(function(t){return t=bo(t,e),n||(n=t.length>1),t})),jo(e,ri(e),r),n&&(r=an(r,7,Qo));for(var o=t.length;o--;)so(r,t[o]);return r})),Nu=ei((function(e,t){return null==e?{}:function(e,t){return Vn(e,t,(function(t,r){return xu(e,r)}))}(e,t)}));function Du(e,t){if(null==e)return{};var r=kt(ri(e),(function(e){return[e]}));return t=ai(t),Vn(e,r,(function(e,r){return t(e,r[0])}))}var Lu=Xo(Au),Uu=Xo(ku);function Fu(e){return null==e?[]:Kt(e,Au(e))}var Bu=Mo((function(e,t,r){return t=t.toLowerCase(),e+(r?zu(t):t)}));function zu(e){return Zu(bu(e).toLowerCase())}function Vu(e){return(e=bu(e))&&e.replace(me,er).replace($e,"")}var Wu=Mo((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),Gu=Mo((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),qu=Io("toLowerCase"),Hu=Mo((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()})),Yu=Mo((function(e,t,r){return e+(r?" ":"")+Zu(t)})),Xu=Mo((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),Zu=Io("toUpperCase");function Ku(e,t,r){return e=bu(e),(t=r?o:t)===o?function(e){return tt.test(e)}(e)?function(e){return e.match(Je)||[]}(e):function(e){return e.match(se)||[]}(e):e.match(t)||[]}var $u=Yn((function(e,t){try{return St(e,o,t)}catch(e){return Za(e)?e:new we(e)}})),Qu=ei((function(e,t){return Pt(t,(function(t){t=Di(t),rn(e,t,ja(e[t],e))})),e}));function Ju(e){return function(){return e}}var es=Lo(),ts=Lo(!0);function rs(e){return e}function ns(e){return In("function"==typeof e?e:an(e,1))}var os=Yn((function(e,t){return function(r){return jn(r,e,t)}})),is=Yn((function(e,t){return function(r){return jn(e,r,t)}}));function as(e,t,r){var n=Au(t),o=_n(t,n);null!=r||Ja(t)&&(o.length||!n.length)||(r=t,t=e,e=this,o=_n(t,Au(t)));var i=!(Ja(r)&&"chain"in r&&!r.chain),a=Ka(e);return Pt(o,(function(r){var n=t[r];e[r]=n,a&&(e.prototype[r]=function(){var t=this.__chain__;if(i||t){var r=e(this.__wrapped__);return(r.__actions__=To(this.__actions__)).push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,Rt([this.value()],arguments))})})),e}function us(){}var ss=zo(kt),cs=zo(Tt),ls=zo(Nt);function fs(e){return mi(e)?Wt(Di(e)):function(e){return function(t){return wn(t,e)}}(e)}var hs=Wo(),ds=Wo(!0);function ps(){return[]}function vs(){return!1}var ys,bs=Bo((function(e,t){return e+t}),0),ms=Ho("ceil"),gs=Bo((function(e,t){return e/t}),1),_s=Ho("floor"),ws=Bo((function(e,t){return e*t}),1),Os=Ho("round"),Ss=Bo((function(e,t){return e-t}),0);return Lr.after=function(e,t){if("function"!=typeof t)throw new Te(i);return e=du(e),function(){if(--e<1)return t.apply(this,arguments)}},Lr.ary=xa,Lr.assign=mu,Lr.assignIn=gu,Lr.assignInWith=_u,Lr.assignWith=wu,Lr.at=Ou,Lr.before=Ta,Lr.bind=ja,Lr.bindAll=Qu,Lr.bindKey=Ca,Lr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Wa(e)?e:[e]},Lr.chain=fa,Lr.chunk=function(e,t,r){t=(r?bi(e,t,r):t===o)?1:vr(du(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var a=0,u=0,s=n(ht(i/t));a<i;)s[u++]=eo(e,a,a+=t);return s},Lr.compact=function(e){for(var t=-1,r=null==e?0:e.length,n=0,o=[];++t<r;){var i=e[t];i&&(o[n++]=i)}return o},Lr.concat=function(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),r=arguments[0],o=e;o--;)t[o-1]=arguments[o];return Rt(Wa(r)?To(r):[r],vn(t,1))},Lr.cond=function(e){var t=null==e?0:e.length,r=ai();return e=t?kt(e,(function(e){if("function"!=typeof e[1])throw new Te(i);return[r(e[0]),e[1]]})):[],Yn((function(r){for(var n=-1;++n<t;){var o=e[n];if(St(o[0],this,r))return St(o[1],this,r)}}))},Lr.conforms=function(e){return function(e){var t=Au(e);return function(r){return un(r,e,t)}}(an(e,1))},Lr.constant=Ju,Lr.countBy=pa,Lr.create=function(e,t){var r=Ur(e);return null==t?r:tn(r,t)},Lr.curry=function e(t,r,n){var i=Zo(t,8,o,o,o,o,o,r=n?o:r);return i.placeholder=e.placeholder,i},Lr.curryRight=function e(t,r,n){var i=Zo(t,16,o,o,o,o,o,r=n?o:r);return i.placeholder=e.placeholder,i},Lr.debounce=Aa,Lr.defaults=Su,Lr.defaultsDeep=Eu,Lr.defer=ka,Lr.delay=Ra,Lr.difference=Fi,Lr.differenceBy=Bi,Lr.differenceWith=zi,Lr.drop=function(e,t,r){var n=null==e?0:e.length;return n?eo(e,(t=r||t===o?1:du(t))<0?0:t,n):[]},Lr.dropRight=function(e,t,r){var n=null==e?0:e.length;return n?eo(e,0,(t=n-(t=r||t===o?1:du(t)))<0?0:t):[]},Lr.dropRightWhile=function(e,t){return e&&e.length?lo(e,ai(t,3),!0,!0):[]},Lr.dropWhile=function(e,t){return e&&e.length?lo(e,ai(t,3),!0):[]},Lr.fill=function(e,t,r,n){var i=null==e?0:e.length;return i?(r&&"number"!=typeof r&&bi(e,t,r)&&(r=0,n=i),function(e,t,r,n){var i=e.length;for((r=du(r))<0&&(r=-r>i?0:i+r),(n=n===o||n>i?i:du(n))<0&&(n+=i),n=r>n?0:pu(n);r<n;)e[r++]=t;return e}(e,t,r,n)):[]},Lr.filter=function(e,t){return(Wa(e)?jt:pn)(e,ai(t,3))},Lr.flatMap=function(e,t){return vn(Oa(e,t),1)},Lr.flatMapDeep=function(e,t){return vn(Oa(e,t),l)},Lr.flatMapDepth=function(e,t,r){return r=r===o?1:du(r),vn(Oa(e,t),r)},Lr.flatten=Gi,Lr.flattenDeep=function(e){return null!=e&&e.length?vn(e,l):[]},Lr.flattenDepth=function(e,t){return null!=e&&e.length?vn(e,t=t===o?1:du(t)):[]},Lr.flip=function(e){return Zo(e,512)},Lr.flow=es,Lr.flowRight=ts,Lr.fromPairs=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t<r;){var o=e[t];n[o[0]]=o[1]}return n},Lr.functions=function(e){return null==e?[]:_n(e,Au(e))},Lr.functionsIn=function(e){return null==e?[]:_n(e,ku(e))},Lr.groupBy=ga,Lr.initial=function(e){return null!=e&&e.length?eo(e,0,-1):[]},Lr.intersection=Hi,Lr.intersectionBy=Yi,Lr.intersectionWith=Xi,Lr.invert=Tu,Lr.invertBy=ju,Lr.invokeMap=_a,Lr.iteratee=ns,Lr.keyBy=wa,Lr.keys=Au,Lr.keysIn=ku,Lr.map=Oa,Lr.mapKeys=function(e,t){var r={};return t=ai(t,3),mn(e,(function(e,n,o){rn(r,t(e,n,o),e)})),r},Lr.mapValues=function(e,t){var r={};return t=ai(t,3),mn(e,(function(e,n,o){rn(r,n,t(e,n,o))})),r},Lr.matches=function(e){return Ln(an(e,1))},Lr.matchesProperty=function(e,t){return Un(e,an(t,1))},Lr.memoize=Ia,Lr.merge=Ru,Lr.mergeWith=Iu,Lr.method=os,Lr.methodOf=is,Lr.mixin=as,Lr.negate=Ma,Lr.nthArg=function(e){return e=du(e),Yn((function(t){return Bn(t,e)}))},Lr.omit=Mu,Lr.omitBy=function(e,t){return Du(e,Ma(ai(t)))},Lr.once=function(e){return Ta(2,e)},Lr.orderBy=function(e,t,r,n){return null==e?[]:(Wa(t)||(t=null==t?[]:[t]),Wa(r=n?o:r)||(r=null==r?[]:[r]),zn(e,t,r))},Lr.over=ss,Lr.overArgs=Na,Lr.overEvery=cs,Lr.overSome=ls,Lr.partial=Da,Lr.partialRight=La,Lr.partition=Sa,Lr.pick=Nu,Lr.pickBy=Du,Lr.property=fs,Lr.propertyOf=function(e){return function(t){return null==e?o:wn(e,t)}},Lr.pull=Ki,Lr.pullAll=$i,Lr.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?Wn(e,t,ai(r,2)):e},Lr.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Wn(e,t,o,r):e},Lr.pullAt=Qi,Lr.range=hs,Lr.rangeRight=ds,Lr.rearg=Ua,Lr.reject=function(e,t){return(Wa(e)?jt:pn)(e,Ma(ai(t,3)))},Lr.remove=function(e,t){var r=[];if(!e||!e.length)return r;var n=-1,o=[],i=e.length;for(t=ai(t,3);++n<i;){var a=e[n];t(a,n,e)&&(r.push(a),o.push(n))}return Gn(e,o),r},Lr.rest=function(e,t){if("function"!=typeof e)throw new Te(i);return Yn(e,t=t===o?t:du(t))},Lr.reverse=Ji,Lr.sampleSize=function(e,t,r){return t=(r?bi(e,t,r):t===o)?1:du(t),(Wa(e)?Zr:Zn)(e,t)},Lr.set=function(e,t,r){return null==e?e:Kn(e,t,r)},Lr.setWith=function(e,t,r,n){return n="function"==typeof n?n:o,null==e?e:Kn(e,t,r,n)},Lr.shuffle=function(e){return(Wa(e)?Kr:Jn)(e)},Lr.slice=function(e,t,r){var n=null==e?0:e.length;return n?(r&&"number"!=typeof r&&bi(e,t,r)?(t=0,r=n):(t=null==t?0:du(t),r=r===o?n:du(r)),eo(e,t,r)):[]},Lr.sortBy=Ea,Lr.sortedUniq=function(e){return e&&e.length?oo(e):[]},Lr.sortedUniqBy=function(e,t){return e&&e.length?oo(e,ai(t,2)):[]},Lr.split=function(e,t,r){return r&&"number"!=typeof r&&bi(e,t,r)&&(t=r=o),(r=r===o?d:r>>>0)?(e=bu(e))&&("string"==typeof t||null!=t&&!ou(t))&&!(t=ao(t))&&nr(e)?go(lr(e),0,r):e.split(t,r):[]},Lr.spread=function(e,t){if("function"!=typeof e)throw new Te(i);return t=null==t?0:vr(du(t),0),Yn((function(r){var n=r[t],o=go(r,0,t);return n&&Rt(o,n),St(e,this,o)}))},Lr.tail=function(e){var t=null==e?0:e.length;return t?eo(e,1,t):[]},Lr.take=function(e,t,r){return e&&e.length?eo(e,0,(t=r||t===o?1:du(t))<0?0:t):[]},Lr.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?eo(e,(t=n-(t=r||t===o?1:du(t)))<0?0:t,n):[]},Lr.takeRightWhile=function(e,t){return e&&e.length?lo(e,ai(t,3),!1,!0):[]},Lr.takeWhile=function(e,t){return e&&e.length?lo(e,ai(t,3)):[]},Lr.tap=function(e,t){return t(e),e},Lr.throttle=function(e,t,r){var n=!0,o=!0;if("function"!=typeof e)throw new Te(i);return Ja(r)&&(n="leading"in r?!!r.leading:n,o="trailing"in r?!!r.trailing:o),Aa(e,t,{leading:n,maxWait:t,trailing:o})},Lr.thru=ha,Lr.toArray=fu,Lr.toPairs=Lu,Lr.toPairsIn=Uu,Lr.toPath=function(e){return Wa(e)?kt(e,Di):uu(e)?[e]:To(Ni(bu(e)))},Lr.toPlainObject=yu,Lr.transform=function(e,t,r){var n=Wa(e),o=n||Ya(e)||su(e);if(t=ai(t,4),null==r){var i=e&&e.constructor;r=o?n?new i:[]:Ja(e)&&Ka(i)?Ur(Ge(e)):{}}return(o?Pt:mn)(e,(function(e,n,o){return t(r,e,n,o)})),r},Lr.unary=function(e){return xa(e,1)},Lr.union=ea,Lr.unionBy=ta,Lr.unionWith=ra,Lr.uniq=function(e){return e&&e.length?uo(e):[]},Lr.uniqBy=function(e,t){return e&&e.length?uo(e,ai(t,2)):[]},Lr.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?uo(e,o,t):[]},Lr.unset=function(e,t){return null==e||so(e,t)},Lr.unzip=na,Lr.unzipWith=oa,Lr.update=function(e,t,r){return null==e?e:co(e,t,yo(r))},Lr.updateWith=function(e,t,r,n){return n="function"==typeof n?n:o,null==e?e:co(e,t,yo(r),n)},Lr.values=Fu,Lr.valuesIn=function(e){return null==e?[]:Kt(e,ku(e))},Lr.without=ia,Lr.words=Ku,Lr.wrap=function(e,t){return Da(yo(t),e)},Lr.xor=aa,Lr.xorBy=ua,Lr.xorWith=sa,Lr.zip=ca,Lr.zipObject=function(e,t){return po(e||[],t||[],Qr)},Lr.zipObjectDeep=function(e,t){return po(e||[],t||[],Kn)},Lr.zipWith=la,Lr.entries=Lu,Lr.entriesIn=Uu,Lr.extend=gu,Lr.extendWith=_u,as(Lr,Lr),Lr.add=bs,Lr.attempt=$u,Lr.camelCase=Bu,Lr.capitalize=zu,Lr.ceil=ms,Lr.clamp=function(e,t,r){return r===o&&(r=t,t=o),r!==o&&(r=(r=vu(r))==r?r:0),t!==o&&(t=(t=vu(t))==t?t:0),on(vu(e),t,r)},Lr.clone=function(e){return an(e,4)},Lr.cloneDeep=function(e){return an(e,5)},Lr.cloneDeepWith=function(e,t){return an(e,5,t="function"==typeof t?t:o)},Lr.cloneWith=function(e,t){return an(e,4,t="function"==typeof t?t:o)},Lr.conformsTo=function(e,t){return null==t||un(e,t,Au(t))},Lr.deburr=Vu,Lr.defaultTo=function(e,t){return null==e||e!=e?t:e},Lr.divide=gs,Lr.endsWith=function(e,t,r){e=bu(e),t=ao(t);var n=e.length,i=r=r===o?n:on(du(r),0,n);return(r-=t.length)>=0&&e.slice(r,i)==t},Lr.eq=Fa,Lr.escape=function(e){return(e=bu(e))&&X.test(e)?e.replace(H,tr):e},Lr.escapeRegExp=function(e){return(e=bu(e))&&re.test(e)?e.replace(te,"\\$&"):e},Lr.every=function(e,t,r){var n=Wa(e)?Tt:hn;return r&&bi(e,t,r)&&(t=o),n(e,ai(t,3))},Lr.find=va,Lr.findIndex=Vi,Lr.findKey=function(e,t){return Lt(e,ai(t,3),mn)},Lr.findLast=ya,Lr.findLastIndex=Wi,Lr.findLastKey=function(e,t){return Lt(e,ai(t,3),gn)},Lr.floor=_s,Lr.forEach=ba,Lr.forEachRight=ma,Lr.forIn=function(e,t){return null==e?e:yn(e,ai(t,3),ku)},Lr.forInRight=function(e,t){return null==e?e:bn(e,ai(t,3),ku)},Lr.forOwn=function(e,t){return e&&mn(e,ai(t,3))},Lr.forOwnRight=function(e,t){return e&&gn(e,ai(t,3))},Lr.get=Pu,Lr.gt=Ba,Lr.gte=za,Lr.has=function(e,t){return null!=e&&di(e,t,Pn)},Lr.hasIn=xu,Lr.head=qi,Lr.identity=rs,Lr.includes=function(e,t,r,n){e=qa(e)?e:Fu(e),r=r&&!n?du(r):0;var o=e.length;return r<0&&(r=vr(o+r,0)),au(e)?r<=o&&e.indexOf(t,r)>-1:!!o&&Ft(e,t,r)>-1},Lr.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=null==r?0:du(r);return o<0&&(o=vr(n+o,0)),Ft(e,t,o)},Lr.inRange=function(e,t,r){return t=hu(t),r===o?(r=t,t=0):r=hu(r),function(e,t,r){return e>=yr(t,r)&&e<vr(t,r)}(e=vu(e),t,r)},Lr.invoke=Cu,Lr.isArguments=Va,Lr.isArray=Wa,Lr.isArrayBuffer=Ga,Lr.isArrayLike=qa,Lr.isArrayLikeObject=Ha,Lr.isBoolean=function(e){return!0===e||!1===e||eu(e)&&Sn(e)==b},Lr.isBuffer=Ya,Lr.isDate=Xa,Lr.isElement=function(e){return eu(e)&&1===e.nodeType&&!nu(e)},Lr.isEmpty=function(e){if(null==e)return!0;if(qa(e)&&(Wa(e)||"string"==typeof e||"function"==typeof e.splice||Ya(e)||su(e)||Va(e)))return!e.length;var t=hi(e);if(t==O||t==T)return!e.size;if(wi(e))return!Mn(e).length;for(var r in e)if(Ie.call(e,r))return!1;return!0},Lr.isEqual=function(e,t){return An(e,t)},Lr.isEqualWith=function(e,t,r){var n=(r="function"==typeof r?r:o)?r(e,t):o;return n===o?An(e,t,o,r):!!n},Lr.isError=Za,Lr.isFinite=function(e){return"number"==typeof e&&Dt(e)},Lr.isFunction=Ka,Lr.isInteger=$a,Lr.isLength=Qa,Lr.isMap=tu,Lr.isMatch=function(e,t){return e===t||kn(e,t,si(t))},Lr.isMatchWith=function(e,t,r){return r="function"==typeof r?r:o,kn(e,t,si(t),r)},Lr.isNaN=function(e){return ru(e)&&e!=+e},Lr.isNative=function(e){if(_i(e))throw new we("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Rn(e)},Lr.isNil=function(e){return null==e},Lr.isNull=function(e){return null===e},Lr.isNumber=ru,Lr.isObject=Ja,Lr.isObjectLike=eu,Lr.isPlainObject=nu,Lr.isRegExp=ou,Lr.isSafeInteger=function(e){return $a(e)&&e>=-9007199254740991&&e<=f},Lr.isSet=iu,Lr.isString=au,Lr.isSymbol=uu,Lr.isTypedArray=su,Lr.isUndefined=function(e){return e===o},Lr.isWeakMap=function(e){return eu(e)&&hi(e)==A},Lr.isWeakSet=function(e){return eu(e)&&"[object WeakSet]"==Sn(e)},Lr.join=function(e,t){return null==e?"":Gt.call(e,t)},Lr.kebabCase=Wu,Lr.last=Zi,Lr.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=n;return r!==o&&(i=(i=du(r))<0?vr(n+i,0):yr(i,n-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,i):Ut(e,zt,i,!0)},Lr.lowerCase=Gu,Lr.lowerFirst=qu,Lr.lt=cu,Lr.lte=lu,Lr.max=function(e){return e&&e.length?dn(e,rs,En):o},Lr.maxBy=function(e,t){return e&&e.length?dn(e,ai(t,2),En):o},Lr.mean=function(e){return Vt(e,rs)},Lr.meanBy=function(e,t){return Vt(e,ai(t,2))},Lr.min=function(e){return e&&e.length?dn(e,rs,Nn):o},Lr.minBy=function(e,t){return e&&e.length?dn(e,ai(t,2),Nn):o},Lr.stubArray=ps,Lr.stubFalse=vs,Lr.stubObject=function(){return{}},Lr.stubString=function(){return""},Lr.stubTrue=function(){return!0},Lr.multiply=ws,Lr.nth=function(e,t){return e&&e.length?Bn(e,du(t)):o},Lr.noConflict=function(){return ft._===this&&(ft._=Ue),this},Lr.noop=us,Lr.now=Pa,Lr.pad=function(e,t,r){e=bu(e);var n=(t=du(t))?cr(e):0;if(!t||n>=t)return e;var o=(t-n)/2;return Vo(dt(o),r)+e+Vo(ht(o),r)},Lr.padEnd=function(e,t,r){e=bu(e);var n=(t=du(t))?cr(e):0;return t&&n<t?e+Vo(t-n,r):e},Lr.padStart=function(e,t,r){e=bu(e);var n=(t=du(t))?cr(e):0;return t&&n<t?Vo(t-n,r)+e:e},Lr.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t=+t),mr(bu(e).replace(ne,""),t||0)},Lr.random=function(e,t,r){if(r&&"boolean"!=typeof r&&bi(e,t,r)&&(t=r=o),r===o&&("boolean"==typeof t?(r=t,t=o):"boolean"==typeof e&&(r=e,e=o)),e===o&&t===o?(e=0,t=1):(e=hu(e),t===o?(t=e,e=0):t=hu(t)),e>t){var n=e;e=t,t=n}if(r||e%1||t%1){var i=gr();return yr(e+i*(t-e+ut("1e-"+((i+"").length-1))),t)}return qn(e,t)},Lr.reduce=function(e,t,r){var n=Wa(e)?It:qt,o=arguments.length<3;return n(e,ai(t,4),r,o,ln)},Lr.reduceRight=function(e,t,r){var n=Wa(e)?Mt:qt,o=arguments.length<3;return n(e,ai(t,4),r,o,fn)},Lr.repeat=function(e,t,r){return t=(r?bi(e,t,r):t===o)?1:du(t),Hn(bu(e),t)},Lr.replace=function(){var e=arguments,t=bu(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Lr.result=function(e,t,r){var n=-1,i=(t=bo(t,e)).length;for(i||(i=1,e=o);++n<i;){var a=null==e?o:e[Di(t[n])];a===o&&(n=i,a=r),e=Ka(a)?a.call(e):a}return e},Lr.round=Os,Lr.runInContext=e,Lr.sample=function(e){return(Wa(e)?Xr:Xn)(e)},Lr.size=function(e){if(null==e)return 0;if(qa(e))return au(e)?cr(e):e.length;var t=hi(e);return t==O||t==T?e.size:Mn(e).length},Lr.snakeCase=Hu,Lr.some=function(e,t,r){var n=Wa(e)?Nt:to;return r&&bi(e,t,r)&&(t=o),n(e,ai(t,3))},Lr.sortedIndex=function(e,t){return ro(e,t)},Lr.sortedIndexBy=function(e,t,r){return no(e,t,ai(r,2))},Lr.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var n=ro(e,t);if(n<r&&Fa(e[n],t))return n}return-1},Lr.sortedLastIndex=function(e,t){return ro(e,t,!0)},Lr.sortedLastIndexBy=function(e,t,r){return no(e,t,ai(r,2),!0)},Lr.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var r=ro(e,t,!0)-1;if(Fa(e[r],t))return r}return-1},Lr.startCase=Yu,Lr.startsWith=function(e,t,r){return e=bu(e),r=null==r?0:on(du(r),0,e.length),t=ao(t),e.slice(r,r+t.length)==t},Lr.subtract=Ss,Lr.sum=function(e){return e&&e.length?Ht(e,rs):0},Lr.sumBy=function(e,t){return e&&e.length?Ht(e,ai(t,2)):0},Lr.template=function(e,t,r){var n=Lr.templateSettings;r&&bi(e,t,r)&&(t=o),e=bu(e),t=_u({},t,n,Ko);var i,a,u=_u({},t.imports,n.imports,Ko),s=Au(u),c=Kt(u,s),l=0,f=t.interpolate||ge,h="__p += '",d=Pe((t.escape||ge).source+"|"+f.source+"|"+(f===$?fe:ge).source+"|"+(t.evaluate||ge).source+"|$","g"),p="//# sourceURL="+(Ie.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++nt+"]")+"\n";e.replace(d,(function(t,r,n,o,u,s){return n||(n=o),h+=e.slice(l,s).replace(_e,rr),r&&(i=!0,h+="' +\n__e("+r+") +\n'"),u&&(a=!0,h+="';\n"+u+";\n__p += '"),n&&(h+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),l=s+t.length,t})),h+="';\n";var v=Ie.call(t,"variable")&&t.variable;if(v){if(ce.test(v))throw new we("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(a?h.replace(V,""):h).replace(W,"$1").replace(G,"$1;"),h="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var y=$u((function(){return Oe(s,p+"return "+h).apply(o,c)}));if(y.source=h,Za(y))throw y;return y},Lr.times=function(e,t){if((e=du(e))<1||e>f)return[];var r=d,n=yr(e,d);t=ai(t),e-=d;for(var o=Yt(n,t);++r<e;)t(r);return o},Lr.toFinite=hu,Lr.toInteger=du,Lr.toLength=pu,Lr.toLower=function(e){return bu(e).toLowerCase()},Lr.toNumber=vu,Lr.toSafeInteger=function(e){return e?on(du(e),-9007199254740991,f):0===e?e:0},Lr.toString=bu,Lr.toUpper=function(e){return bu(e).toUpperCase()},Lr.trim=function(e,t,r){if((e=bu(e))&&(r||t===o))return Xt(e);if(!e||!(t=ao(t)))return e;var n=lr(e),i=lr(t);return go(n,Qt(n,i),Jt(n,i)+1).join("")},Lr.trimEnd=function(e,t,r){if((e=bu(e))&&(r||t===o))return e.slice(0,fr(e)+1);if(!e||!(t=ao(t)))return e;var n=lr(e);return go(n,0,Jt(n,lr(t))+1).join("")},Lr.trimStart=function(e,t,r){if((e=bu(e))&&(r||t===o))return e.replace(ne,"");if(!e||!(t=ao(t)))return e;var n=lr(e);return go(n,Qt(n,lr(t))).join("")},Lr.truncate=function(e,t){var r=30,n="...";if(Ja(t)){var i="separator"in t?t.separator:i;r="length"in t?du(t.length):r,n="omission"in t?ao(t.omission):n}var a=(e=bu(e)).length;if(nr(e)){var u=lr(e);a=u.length}if(r>=a)return e;var s=r-cr(n);if(s<1)return n;var c=u?go(u,0,s).join(""):e.slice(0,s);if(i===o)return c+n;if(u&&(s+=c.length-s),ou(i)){if(e.slice(s).search(i)){var l,f=c;for(i.global||(i=Pe(i.source,bu(he.exec(i))+"g")),i.lastIndex=0;l=i.exec(f);)var h=l.index;c=c.slice(0,h===o?s:h)}}else if(e.indexOf(ao(i),s)!=s){var d=c.lastIndexOf(i);d>-1&&(c=c.slice(0,d))}return c+n},Lr.unescape=function(e){return(e=bu(e))&&Y.test(e)?e.replace(q,hr):e},Lr.uniqueId=function(e){var t=++Me;return bu(e)+t},Lr.upperCase=Xu,Lr.upperFirst=Zu,Lr.each=ba,Lr.eachRight=ma,Lr.first=qi,as(Lr,(ys={},mn(Lr,(function(e,t){Ie.call(Lr.prototype,t)||(ys[t]=e)})),ys),{chain:!1}),Lr.VERSION="4.17.21",Pt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Lr[e].placeholder=Lr})),Pt(["drop","take"],(function(e,t){zr.prototype[e]=function(r){r=r===o?1:vr(du(r),0);var n=this.__filtered__&&!t?new zr(this):this.clone();return n.__filtered__?n.__takeCount__=yr(r,n.__takeCount__):n.__views__.push({size:yr(r,d),type:e+(n.__dir__<0?"Right":"")}),n},zr.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Pt(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;zr.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ai(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),Pt(["head","last"],(function(e,t){var r="take"+(t?"Right":"");zr.prototype[e]=function(){return this[r](1).value()[0]}})),Pt(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");zr.prototype[e]=function(){return this.__filtered__?new zr(this):this[r](1)}})),zr.prototype.compact=function(){return this.filter(rs)},zr.prototype.find=function(e){return this.filter(e).head()},zr.prototype.findLast=function(e){return this.reverse().find(e)},zr.prototype.invokeMap=Yn((function(e,t){return"function"==typeof e?new zr(this):this.map((function(r){return jn(r,e,t)}))})),zr.prototype.reject=function(e){return this.filter(Ma(ai(e)))},zr.prototype.slice=function(e,t){e=du(e);var r=this;return r.__filtered__&&(e>0||t<0)?new zr(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==o&&(r=(t=du(t))<0?r.dropRight(-t):r.take(t-e)),r)},zr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},zr.prototype.toArray=function(){return this.take(d)},mn(zr.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),i=Lr[n?"take"+("last"==t?"Right":""):t],a=n||/^find/.test(t);i&&(Lr.prototype[t]=function(){var t=this.__wrapped__,u=n?[1]:arguments,s=t instanceof zr,c=u[0],l=s||Wa(t),f=function(e){var t=i.apply(Lr,Rt([e],u));return n&&h?t[0]:t};l&&r&&"function"==typeof c&&1!=c.length&&(s=l=!1);var h=this.__chain__,d=!!this.__actions__.length,p=a&&!h,v=s&&!d;if(!a&&l){t=v?t:new zr(this);var y=e.apply(t,u);return y.__actions__.push({func:ha,args:[f],thisArg:o}),new Br(y,h)}return p&&v?e.apply(this,u):(y=this.thru(f),p?n?y.value()[0]:y.value():y)})})),Pt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=je[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);Lr.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var o=this.value();return t.apply(Wa(o)?o:[],e)}return this[r]((function(r){return t.apply(Wa(r)?r:[],e)}))}})),mn(zr.prototype,(function(e,t){var r=Lr[t];if(r){var n=r.name+"";Ie.call(jr,n)||(jr[n]=[]),jr[n].push({name:t,func:r})}})),jr[Uo(o,2).name]=[{name:"wrapper",func:o}],zr.prototype.clone=function(){var e=new zr(this.__wrapped__);return e.__actions__=To(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=To(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=To(this.__views__),e},zr.prototype.reverse=function(){if(this.__filtered__){var e=new zr(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},zr.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=Wa(e),n=t<0,o=r?e.length:0,i=function(e,t,r){for(var n=-1,o=r.length;++n<o;){var i=r[n],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=yr(t,e+a);break;case"takeRight":e=vr(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__),a=i.start,u=i.end,s=u-a,c=n?u:a-1,l=this.__iteratees__,f=l.length,h=0,d=yr(s,this.__takeCount__);if(!r||!n&&o==s&&d==s)return fo(e,this.__actions__);var p=[];e:for(;s--&&h<d;){for(var v=-1,y=e[c+=t];++v<f;){var b=l[v],m=b.iteratee,g=b.type,_=m(y);if(2==g)y=_;else if(!_){if(1==g)continue e;break e}}p[h++]=y}return p},Lr.prototype.at=da,Lr.prototype.chain=function(){return fa(this)},Lr.prototype.commit=function(){return new Br(this.value(),this.__chain__)},Lr.prototype.next=function(){this.__values__===o&&(this.__values__=fu(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},Lr.prototype.plant=function(e){for(var t,r=this;r instanceof Fr;){var n=Ui(r);n.__index__=0,n.__values__=o,t?i.__wrapped__=n:t=n;var i=n;r=r.__wrapped__}return i.__wrapped__=e,t},Lr.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof zr){var t=e;return this.__actions__.length&&(t=new zr(this)),(t=t.reverse()).__actions__.push({func:ha,args:[Ji],thisArg:o}),new Br(t,this.__chain__)}return this.thru(Ji)},Lr.prototype.toJSON=Lr.prototype.valueOf=Lr.prototype.value=function(){return fo(this.__wrapped__,this.__actions__)},Lr.prototype.first=Lr.prototype.head,Ze&&(Lr.prototype[Ze]=function(){return this}),Lr}();ft._=dr,(n=function(){return dr}.call(t,r,t,e))===o||(e.exports=n)}.call(this)},5880:function(e,t,r){var n,o;n=function(){var e=function(){},t="undefined",r=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"],o={},i=null;function a(e,t){var r=e[t];if("function"==typeof r.bind)return r.bind(e);try{return Function.prototype.bind.call(r,e)}catch(t){return function(){return Function.prototype.apply.apply(r,[e,arguments])}}}function u(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function s(){for(var r=this.getLevel(),o=0;o<n.length;o++){var i=n[o];this[i]=o<r?e:this.methodFactory(i,r,this.name)}if(this.log=this.debug,typeof console===t&&r<this.levels.SILENT)return"No console available for logging"}function c(e){return function(){typeof console!==t&&(s.call(this),this[e].apply(this,arguments))}}function l(n,o,i){return function(n){return"debug"===n&&(n="log"),typeof console!==t&&("trace"===n&&r?u:void 0!==console[n]?a(console,n):void 0!==console.log?a(console,"log"):e)}(n)||c.apply(this,arguments)}function f(e,r){var a,u,c,f=this,h="loglevel";function d(){var e;if(typeof window!==t&&h){try{e=window.localStorage[h]}catch(e){}if(typeof e===t)try{var r=window.document.cookie,n=encodeURIComponent(h),o=r.indexOf(n+"=");-1!==o&&(e=/^([^;]+)/.exec(r.slice(o+n.length+1))[1])}catch(e){}return void 0===f.levels[e]&&(e=void 0),e}}function p(e){var t=e;if("string"==typeof t&&void 0!==f.levels[t.toUpperCase()]&&(t=f.levels[t.toUpperCase()]),"number"==typeof t&&t>=0&&t<=f.levels.SILENT)return t;throw new TypeError("log.setLevel() called with invalid level: "+e)}"string"==typeof e?h+=":"+e:"symbol"==typeof e&&(h=void 0),f.name=e,f.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},f.methodFactory=r||l,f.getLevel=function(){return null!=c?c:null!=u?u:a},f.setLevel=function(e,r){return c=p(e),!1!==r&&function(e){var r=(n[e]||"silent").toUpperCase();if(typeof window!==t&&h){try{return void(window.localStorage[h]=r)}catch(e){}try{window.document.cookie=encodeURIComponent(h)+"="+r+";"}catch(e){}}}(c),s.call(f)},f.setDefaultLevel=function(e){u=p(e),d()||f.setLevel(e,!1)},f.resetLevel=function(){c=null,function(){if(typeof window!==t&&h){try{window.localStorage.removeItem(h)}catch(e){}try{window.document.cookie=encodeURIComponent(h)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}}(),s.call(f)},f.enableAll=function(e){f.setLevel(f.levels.TRACE,e)},f.disableAll=function(e){f.setLevel(f.levels.SILENT,e)},f.rebuild=function(){if(i!==f&&(a=p(i.getLevel())),s.call(f),i===f)for(var e in o)o[e].rebuild()},a=p(i?i.getLevel():"WARN");var v=d();null!=v&&(c=p(v)),s.call(f)}(i=new f).getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=o[e];return t||(t=o[e]=new f(e,i.methodFactory)),t};var h=typeof window!==t?window.log:void 0;return i.noConflict=function(){return typeof window!==t&&window.log===i&&(window.log=h),i},i.getLoggers=function(){return o},i.default=i,i},void 0===(o=n.call(t,r,t,e))||(e.exports=o)},397:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.assertNotificationFilterIsEmpty=t.assertImpersonatedUserIsEmpty=t.assertTxConfigIsEmpty=t.assertDatabaseIsEmpty=void 0;var n=r(9305);r(9014),t.assertTxConfigIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),e&&!e.isEmpty()){var o=(0,n.newError)("Driver is connected to the database that does not support transaction configuration. Please upgrade to neo4j 3.5.0 or later in order to use this functionality");throw t(o.message),r.onError(o),o}},t.assertDatabaseIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),e){var o=(0,n.newError)("Driver is connected to the database that does not support multiple databases. Please upgrade to neo4j 4.0.0 or later in order to use this functionality");throw t(o.message),r.onError(o),o}},t.assertImpersonatedUserIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),e){var o=(0,n.newError)("Driver is connected to the database that does not support user impersonation. Please upgrade to neo4j 4.4.0 or later in order to use this functionality. "+"Trying to impersonate ".concat(e,"."));throw t(o.message),r.onError(o),o}},t.assertNotificationFilterIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),void 0!==e){var o=(0,n.newError)("Driver is connected to a database that does not support user notification filters. Please upgrade to Neo4j 5.7.0 or later in order to use this functionality. "+"Trying to set notifications to ".concat(n.json.stringify(e),"."));throw t(o.message),r.onError(o),o}}},8320:function(e,t,r){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&o(t,e,r);return i(t,e),t},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=r(397),c=(r(7452),r(7168)),l=a(r(7021)),f=r(9014),h=r(9305),d=u(r(6661)),p=u(r(3321)),v=h.internal.bookmarks.Bookmarks,y=h.internal.constants,b=y.ACCESS_MODE_WRITE,m=y.BOLT_PROTOCOL_V1,g=(h.internal.logger.Logger,h.internal.txConfig.TxConfig),_=Object.freeze({OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"}),w=function(){function e(e,t,r,n,o,i){var a=void 0===r?{}:r,u=a.disableLosslessIntegers,s=a.useBigInt;void 0===n&&(n=function(){return null}),this._server=e||{},this._chunker=t,this._packer=this._createPacker(t),this._unpacker=this._createUnpacker(u,s),this._responseHandler=n(this),this._log=o,this._onProtocolError=i,this._fatalError=null,this._lastMessageSignature=null,this._config={disableLosslessIntegers:u,useBigInt:s}}return Object.defineProperty(e.prototype,"transformer",{get:function(){var e=this;return void 0===this._transformer&&(this._transformer=new p.default(Object.values(d.default).map((function(t){return t(e._config,e._log)})))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return m},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"supportsReAuth",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"initialized",{get:function(){return!!this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"authToken",{get:function(){return this._authToken},enumerable:!1,configurable:!0}),e.prototype.packer=function(){return this._packer},e.prototype.packable=function(e){return this._packer.packable(e,this.transformer.toStructure)},e.prototype.unpacker=function(){return this._unpacker},e.prototype.unpack=function(e){return this._unpacker.unpack(e,this.transformer.fromStructure)},e.prototype.transformMetadata=function(e){return e},e.prototype.enrichErrorMetadata=function(e){return n(n({},e),{diagnostic_record:null!==e.diagnostic_record?n(n({},_),e.diagnostic_record):null})},e.prototype.initialize=function(e){var t=this,r=void 0===e?{}:e,n=r.userAgent,o=(r.boltAgent,r.authToken),i=r.notificationFilter,a=r.onError,u=r.onComplete,c=new f.LoginObserver({onError:function(e){return t._onLoginError(e,a)},onCompleted:function(e){return t._onLoginCompleted(e,u)}});return(0,s.assertNotificationFilterIsEmpty)(i,this._onProtocolError,c),this.write(l.default.init(n,o),c,!0),c},e.prototype.logoff=function(e){var t=void 0===e?{}:e,r=t.onComplete,n=t.onError,o=(t.flush,new f.LogoffObserver({onCompleted:r,onError:n})),i=(0,h.newError)("Driver is connected to a database that does not support logoff. Please upgrade to Neo4j 5.5.0 or later in order to use this functionality.");throw this._onProtocolError(i.message),o.onError(i),i},e.prototype.logon=function(e){var t=this,r=void 0===e?{}:e,n=r.authToken,o=r.onComplete,i=r.onError,a=(r.flush,new f.LoginObserver({onCompleted:function(){return t._onLoginCompleted({},n,o)},onError:function(e){return t._onLoginError(e,i)}})),u=(0,h.newError)("Driver is connected to a database that does not support logon. Please upgrade to Neo4j 5.5.0 or later in order to use this functionality.");throw this._onProtocolError(u.message),a.onError(u),u},e.prototype.prepareToClose=function(){},e.prototype.beginTransaction=function(e){var t=void 0===e?{}:e,r=t.bookmarks,n=t.txConfig,o=t.database,i=t.mode,a=t.impersonatedUser,u=t.notificationFilter,s=t.beforeError,c=t.afterError,l=t.beforeComplete,f=t.afterComplete;return this.run("BEGIN",r?r.asBeginTransactionParameters():{},{bookmarks:r,txConfig:n,database:o,mode:i,impersonatedUser:a,notificationFilter:u,beforeError:s,afterError:c,beforeComplete:l,afterComplete:f,flush:!1})},e.prototype.commitTransaction=function(e){var t=void 0===e?{}:e,r=t.beforeError,n=t.afterError,o=t.beforeComplete,i=t.afterComplete;return this.run("COMMIT",{},{bookmarks:v.empty(),txConfig:g.empty(),mode:b,beforeError:r,afterError:n,beforeComplete:o,afterComplete:i})},e.prototype.rollbackTransaction=function(e){var t=void 0===e?{}:e,r=t.beforeError,n=t.afterError,o=t.beforeComplete,i=t.afterComplete;return this.run("ROLLBACK",{},{bookmarks:v.empty(),txConfig:g.empty(),mode:b,beforeError:r,afterError:n,beforeComplete:o,afterComplete:i})},e.prototype.run=function(e,t,r){var n=void 0===r?{}:r,o=(n.bookmarks,n.txConfig),i=n.database,a=(n.mode,n.impersonatedUser),u=n.notificationFilter,c=n.beforeKeys,h=n.afterKeys,d=n.beforeError,p=n.afterError,v=n.beforeComplete,y=n.afterComplete,b=n.flush,m=void 0===b||b,g=n.highRecordWatermark,_=void 0===g?Number.MAX_VALUE:g,w=n.lowRecordWatermark,O=void 0===w?Number.MAX_VALUE:w,S=new f.ResultStreamObserver({server:this._server,beforeKeys:c,afterKeys:h,beforeError:d,afterError:p,beforeComplete:v,afterComplete:y,highRecordWatermark:_,lowRecordWatermark:O});return(0,s.assertTxConfigIsEmpty)(o,this._onProtocolError,S),(0,s.assertDatabaseIsEmpty)(i,this._onProtocolError,S),(0,s.assertImpersonatedUserIsEmpty)(a,this._onProtocolError,S),(0,s.assertNotificationFilterIsEmpty)(u,this._onProtocolError,S),this.write(l.default.run(e,t),S,!1),this.write(l.default.pullAll(),S,m),S},Object.defineProperty(e.prototype,"currentFailure",{get:function(){return this._responseHandler.currentFailure},enumerable:!1,configurable:!0}),e.prototype.reset=function(e){var t=void 0===e?{}:e,r=t.onError,n=t.onComplete,o=new f.ResetObserver({onProtocolError:this._onProtocolError,onError:r,onComplete:n});return this.write(l.default.reset(),o,!0),o},e.prototype.telemetry=function(e,t){e.api;var r=void 0===t?{}:t,n=(r.onError,r.onCompleted),o=new f.CompletedObserver;return n&&n(),o},e.prototype._createPacker=function(e){return new c.v1.Packer(e)},e.prototype._createUnpacker=function(e,t){return new c.v1.Unpacker(e,t)},e.prototype.write=function(e,t,r){if(this.queueObserverIfProtocolIsNotBroken(t)){this._log.isDebugEnabled()&&this._log.debug("C: ".concat(e)),this._lastMessageSignature=e.signature;var n=new c.structure.Structure(e.signature,e.fields);this.packable(n)(),this._chunker.messageBoundary(),r&&this._chunker.flush()}},e.prototype.isLastMessageLogon=function(){return this._lastMessageSignature===l.SIGNATURES.HELLO||this._lastMessageSignature===l.SIGNATURES.LOGON},e.prototype.isLastMessageReset=function(){return this._lastMessageSignature===l.SIGNATURES.RESET},e.prototype.notifyFatalError=function(e){return this._fatalError=e,this._responseHandler._notifyErrorToObservers(e)},e.prototype.updateCurrentObserver=function(){return this._responseHandler._updateCurrentObserver()},e.prototype.hasOngoingObservableRequests=function(){return this._responseHandler.hasOngoingObservableRequests()},e.prototype.queueObserverIfProtocolIsNotBroken=function(e){return this.isBroken()?(this.notifyFatalErrorToObserver(e),!1):this._responseHandler._queueObserver(e)},e.prototype.isBroken=function(){return!!this._fatalError},e.prototype.notifyFatalErrorToObserver=function(e){e&&e.onError&&e.onError(this._fatalError)},e.prototype.resetFailure=function(){this._responseHandler._resetFailure()},e.prototype._onLoginCompleted=function(e,t,r){if(this._initialized=!0,this._authToken=t,e){var n=e.server;this._server.version||(this._server.version=n)}r&&r(e)},e.prototype._onLoginError=function(e,t){this._onProtocolError(e.message),t&&t(e)},e}();t.default=w},6661:function(e,t,r){var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};Object.defineProperty(t,"__esModule",{value:!0});var o=r(9305),i=r(7168),a=r(3321),u=o.error.PROTOCOL_ERROR;t.default={createNodeTransformer:function(){return new a.TypeTransformer({signature:78,isTypeInstance:function(e){return e instanceof o.Node},toStructure:function(e){throw(0,o.newError)("It is not allowed to pass nodes in query parameters, given: ".concat(e),u)},fromStructure:function(e){i.structure.verifyStructSize("Node",3,e.size);var t=n(e.fields,3),r=t[0],a=t[1],u=t[2];return new o.Node(r,a,u)}})},createRelationshipTransformer:function(){return new a.TypeTransformer({signature:82,isTypeInstance:function(e){return e instanceof o.Relationship},toStructure:function(e){throw(0,o.newError)("It is not allowed to pass relationships in query parameters, given: ".concat(e),u)},fromStructure:function(e){i.structure.verifyStructSize("Relationship",5,e.size);var t=n(e.fields,5),r=t[0],a=t[1],u=t[2],s=t[3],c=t[4];return new o.Relationship(r,a,u,s,c)}})},createUnboundRelationshipTransformer:function(){return new a.TypeTransformer({signature:114,isTypeInstance:function(e){return e instanceof o.UnboundRelationship},toStructure:function(e){throw(0,o.newError)("It is not allowed to pass unbound relationships in query parameters, given: ".concat(e),u)},fromStructure:function(e){i.structure.verifyStructSize("UnboundRelationship",3,e.size);var t=n(e.fields,3),r=t[0],a=t[1],u=t[2];return new o.UnboundRelationship(r,a,u)}})},createPathTransformer:function(){return new a.TypeTransformer({signature:80,isTypeInstance:function(e){return e instanceof o.Path},toStructure:function(e){throw(0,o.newError)("It is not allowed to pass paths in query parameters, given: ".concat(e),u)},fromStructure:function(e){i.structure.verifyStructSize("Path",3,e.size);for(var t=n(e.fields,3),r=t[0],a=t[1],u=t[2],s=[],c=r[0],l=0;l<u.length;l+=2){var f=r[u[l+1]],h=(0,o.toNumber)(u[l]),d=void 0;h>0?(d=a[h-1])instanceof o.UnboundRelationship&&(a[h-1]=d=d.bindTo(c,f)):(d=a[-h-1])instanceof o.UnboundRelationship&&(a[-h-1]=d=d.bindTo(f,c)),s.push(new o.PathSegment(c,d,f)),c=f}return new o.Path(r[0],r[r.length-1],s)}})}}},2857:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=i(r(8320)),u=i(r(7168)),s=r(9305),c=i(r(3448)),l=i(r(3321)),f=s.internal.constants.BOLT_PROTOCOL_V2,h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype._createPacker=function(e){return new u.default.Packer(e)},t.prototype._createUnpacker=function(e,t){return new u.default.Unpacker(e,t)},Object.defineProperty(t.prototype,"transformer",{get:function(){var e=this;return void 0===this._transformer&&(this._transformer=new l.default(Object.values(c.default).map((function(t){return t(e._config,e._log)})))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){return f},enumerable:!1,configurable:!0}),t}(a.default);t.default=h},3448:function(e,t,r){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=r(9305),u=r(7168),s=r(3321),c=r(5973),l=i(r(6661)),f=a.internal.temporalUtil,h=f.dateToEpochDay,d=f.localDateTimeToEpochSecond,p=f.localTimeToNanoOfDay;function v(e,t,r){if(!t&&!r)return e;var n=function(e){return r?e.toBigInt():e.toNumberOrInfinity()},o=Object.create(Object.getPrototypeOf(e));for(var i in e)if(!0===Object.prototype.hasOwnProperty.call(e,i)){var u=e[i];o[i]=(0,a.isInt)(u)?n(u):u}return Object.freeze(o),o}t.default=n(n({},l.default),{createPoint2DTransformer:function(){return new s.TypeTransformer({signature:88,isTypeInstance:function(e){return(0,a.isPoint)(e)&&(null===e.z||void 0===e.z)},toStructure:function(e){return new u.structure.Structure(88,[(0,a.int)(e.srid),e.x,e.y])},fromStructure:function(e){u.structure.verifyStructSize("Point2D",3,e.size);var t=o(e.fields,3),r=t[0],n=t[1],i=t[2];return new a.Point(r,n,i,void 0)}})},createPoint3DTransformer:function(){return new s.TypeTransformer({signature:89,isTypeInstance:function(e){return(0,a.isPoint)(e)&&null!==e.z&&void 0!==e.z},toStructure:function(e){return new u.structure.Structure(89,[(0,a.int)(e.srid),e.x,e.y,e.z])},fromStructure:function(e){u.structure.verifyStructSize("Point3D",4,e.size);var t=o(e.fields,4),r=t[0],n=t[1],i=t[2],s=t[3];return new a.Point(r,n,i,s)}})},createDurationTransformer:function(){return new s.TypeTransformer({signature:69,isTypeInstance:a.isDuration,toStructure:function(e){var t=(0,a.int)(e.months),r=(0,a.int)(e.days),n=(0,a.int)(e.seconds),o=(0,a.int)(e.nanoseconds);return new u.structure.Structure(69,[t,r,n,o])},fromStructure:function(e){u.structure.verifyStructSize("Duration",4,e.size);var t=o(e.fields,4),r=t[0],n=t[1],i=t[2],s=t[3];return new a.Duration(r,n,i,s)}})},createLocalTimeTransformer:function(e){var t=e.disableLosslessIntegers,r=e.useBigInt;return new s.TypeTransformer({signature:116,isTypeInstance:a.isLocalTime,toStructure:function(e){var t=p(e.hour,e.minute,e.second,e.nanosecond);return new u.structure.Structure(116,[t])},fromStructure:function(e){u.structure.verifyStructSize("LocalTime",1,e.size);var n=o(e.fields,1)[0];return v((0,c.nanoOfDayToLocalTime)(n),t,r)}})},createTimeTransformer:function(e){var t=e.disableLosslessIntegers,r=e.useBigInt;return new s.TypeTransformer({signature:84,isTypeInstance:a.isTime,toStructure:function(e){var t=p(e.hour,e.minute,e.second,e.nanosecond),r=(0,a.int)(e.timeZoneOffsetSeconds);return new u.structure.Structure(84,[t,r])},fromStructure:function(e){u.structure.verifyStructSize("Time",2,e.size);var n=o(e.fields,2),i=n[0],s=n[1],l=(0,c.nanoOfDayToLocalTime)(i);return v(new a.Time(l.hour,l.minute,l.second,l.nanosecond,s),t,r)}})},createDateTransformer:function(e){var t=e.disableLosslessIntegers,r=e.useBigInt;return new s.TypeTransformer({signature:68,isTypeInstance:a.isDate,toStructure:function(e){var t=h(e.year,e.month,e.day);return new u.structure.Structure(68,[t])},fromStructure:function(e){u.structure.verifyStructSize("Date",1,e.size);var n=o(e.fields,1)[0];return v((0,c.epochDayToDate)(n),t,r)}})},createLocalDateTimeTransformer:function(e){var t=e.disableLosslessIntegers,r=e.useBigInt;return new s.TypeTransformer({signature:100,isTypeInstance:a.isLocalDateTime,toStructure:function(e){var t=d(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,a.int)(e.nanosecond);return new u.structure.Structure(100,[t,r])},fromStructure:function(e){u.structure.verifyStructSize("LocalDateTime",2,e.size);var n=o(e.fields,2),i=n[0],a=n[1];return v((0,c.epochSecondAndNanoToLocalDateTime)(i,a),t,r)}})},createDateTimeWithZoneIdTransformer:function(e){var t=e.disableLosslessIntegers,r=e.useBigInt;return new s.TypeTransformer({signature:102,isTypeInstance:function(e){return(0,a.isDateTime)(e)&&null!=e.timeZoneId},toStructure:function(e){var t=d(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,a.int)(e.nanosecond),n=e.timeZoneId;return new u.structure.Structure(102,[t,r,n])},fromStructure:function(e){u.structure.verifyStructSize("DateTimeWithZoneId",3,e.size);var n=o(e.fields,3),i=n[0],s=n[1],l=n[2],f=(0,c.epochSecondAndNanoToLocalDateTime)(i,s);return v(new a.DateTime(f.year,f.month,f.day,f.hour,f.minute,f.second,f.nanosecond,null,l),t,r)}})},createDateTimeWithOffsetTransformer:function(e){var t=e.disableLosslessIntegers,r=e.useBigInt;return new s.TypeTransformer({signature:70,isTypeInstance:function(e){return(0,a.isDateTime)(e)&&null==e.timeZoneId},toStructure:function(e){var t=d(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,a.int)(e.nanosecond),n=(0,a.int)(e.timeZoneOffsetSeconds);return new u.structure.Structure(70,[t,r,n])},fromStructure:function(e){u.structure.verifyStructSize("DateTimeWithZoneOffset",3,e.size);var n=o(e.fields,3),i=n[0],s=n[1],l=n[2],f=(0,c.epochSecondAndNanoToLocalDateTime)(i,s);return v(new a.DateTime(f.year,f.month,f.day,f.hour,f.minute,f.second,f.nanosecond,l,null),t,r)}})}})},5642:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=a(r(2857)),s=a(r(7021)),c=r(397),l=r(9014),f=a(r(1175)),h=a(r(3321)),d=r(9305),p=(d.internal.bookmarks.Bookmarks,d.internal.constants.BOLT_PROTOCOL_V3),v=d.internal.txConfig.TxConfig,y="context",b="CALL dbms.cluster.routing.getRoutingTable($".concat(y,")"),m=new l.StreamObserver,g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"version",{get:function(){return p},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"transformer",{get:function(){var e=this;return void 0===this._transformer&&(this._transformer=new h.default(Object.values(f.default).map((function(t){return t(e._config,e._log)})))),this._transformer},enumerable:!1,configurable:!0}),t.prototype.transformMetadata=function(e){return"t_first"in e&&(e.result_available_after=e.t_first,delete e.t_first),"t_last"in e&&(e.result_consumed_after=e.t_last,delete e.t_last),e},t.prototype.initialize=function(e){var t=this,r=void 0===e?{}:e,n=r.userAgent,o=(r.boltAgent,r.authToken),i=r.notificationFilter,a=r.onError,u=r.onComplete,f=new l.LoginObserver({onError:function(e){return t._onLoginError(e,a)},onCompleted:function(e){return t._onLoginCompleted(e,o,u)}});return(0,c.assertNotificationFilterIsEmpty)(i,this._onProtocolError,f),this.write(s.default.hello(n,o),f,!0),f},t.prototype.prepareToClose=function(){this.write(s.default.goodbye(),m,!0)},t.prototype.beginTransaction=function(e){var t=void 0===e?{}:e,r=t.bookmarks,n=t.txConfig,o=t.database,i=t.impersonatedUser,a=t.notificationFilter,u=t.mode,f=t.beforeError,h=t.afterError,d=t.beforeComplete,p=t.afterComplete,v=new l.ResultStreamObserver({server:this._server,beforeError:f,afterError:h,beforeComplete:d,afterComplete:p});return v.prepareToHandleSingleResponse(),(0,c.assertDatabaseIsEmpty)(o,this._onProtocolError,v),(0,c.assertImpersonatedUserIsEmpty)(i,this._onProtocolError,v),(0,c.assertNotificationFilterIsEmpty)(a,this._onProtocolError,v),this.write(s.default.begin({bookmarks:r,txConfig:n,mode:u}),v,!0),v},t.prototype.commitTransaction=function(e){var t=void 0===e?{}:e,r=t.beforeError,n=t.afterError,o=t.beforeComplete,i=t.afterComplete,a=new l.ResultStreamObserver({server:this._server,beforeError:r,afterError:n,beforeComplete:o,afterComplete:i});return a.prepareToHandleSingleResponse(),this.write(s.default.commit(),a,!0),a},t.prototype.rollbackTransaction=function(e){var t=void 0===e?{}:e,r=t.beforeError,n=t.afterError,o=t.beforeComplete,i=t.afterComplete,a=new l.ResultStreamObserver({server:this._server,beforeError:r,afterError:n,beforeComplete:o,afterComplete:i});return a.prepareToHandleSingleResponse(),this.write(s.default.rollback(),a,!0),a},t.prototype.run=function(e,t,r){var n=void 0===r?{}:r,o=n.bookmarks,i=n.txConfig,a=n.database,u=n.impersonatedUser,f=n.notificationFilter,h=n.mode,d=n.beforeKeys,p=n.afterKeys,v=n.beforeError,y=n.afterError,b=n.beforeComplete,m=n.afterComplete,g=n.flush,_=void 0===g||g,w=n.highRecordWatermark,O=void 0===w?Number.MAX_VALUE:w,S=n.lowRecordWatermark,E=void 0===S?Number.MAX_VALUE:S,P=new l.ResultStreamObserver({server:this._server,beforeKeys:d,afterKeys:p,beforeError:v,afterError:y,beforeComplete:b,afterComplete:m,highRecordWatermark:O,lowRecordWatermark:E});return(0,c.assertDatabaseIsEmpty)(a,this._onProtocolError,P),(0,c.assertImpersonatedUserIsEmpty)(u,this._onProtocolError,P),(0,c.assertNotificationFilterIsEmpty)(f,this._onProtocolError,P),this.write(s.default.runWithMetadata(e,t,{bookmarks:o,txConfig:i,mode:h}),P,!1),this.write(s.default.pullAll(),P,_),P},t.prototype.requestRoutingInformation=function(e){var t,r=e.routingContext,n=void 0===r?{}:r,o=e.sessionContext,a=void 0===o?{}:o,u=e.onError,s=e.onCompleted,c=this.run(b,((t={})[y]=n,t),i(i({},a),{txConfig:v.empty()}));return new l.ProcedureRouteObserver({resultObserver:c,onProtocolError:this._onProtocolError,onError:u,onCompleted:s})},t}(u.default);t.default=g},1175:function(e,t,r){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=o(r(3448));t.default=n({},i.default)},2539:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=a(r(5642)),s=a(r(7021)),c=r(397),l=r(9014),f=a(r(2066)),h=a(r(3321)),d=r(9305),p=(d.internal.bookmarks.Bookmarks,d.internal.constants),v=p.BOLT_PROTOCOL_V4_0,y=p.FETCH_ALL,b=d.internal.txConfig.TxConfig,m="context",g="database",_="CALL dbms.routing.getRoutingTable($".concat(m,", $").concat(g,")"),w=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"version",{get:function(){return v},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"transformer",{get:function(){var e=this;return void 0===this._transformer&&(this._transformer=new h.default(Object.values(f.default).map((function(t){return t(e._config,e._log)})))),this._transformer},enumerable:!1,configurable:!0}),t.prototype.beginTransaction=function(e){var t=void 0===e?{}:e,r=t.bookmarks,n=t.txConfig,o=t.database,i=t.impersonatedUser,a=t.notificationFilter,u=t.mode,f=t.beforeError,h=t.afterError,d=t.beforeComplete,p=t.afterComplete,v=new l.ResultStreamObserver({server:this._server,beforeError:f,afterError:h,beforeComplete:d,afterComplete:p});return v.prepareToHandleSingleResponse(),(0,c.assertImpersonatedUserIsEmpty)(i,this._onProtocolError,v),(0,c.assertNotificationFilterIsEmpty)(a,this._onProtocolError,v),this.write(s.default.begin({bookmarks:r,txConfig:n,database:o,mode:u}),v,!0),v},t.prototype.run=function(e,t,r){var n=void 0===r?{}:r,o=n.bookmarks,i=n.txConfig,a=n.database,u=n.impersonatedUser,f=n.notificationFilter,h=n.mode,d=n.beforeKeys,p=n.afterKeys,v=n.beforeError,b=n.afterError,m=n.beforeComplete,g=n.afterComplete,_=n.flush,w=void 0===_||_,O=n.reactive,S=void 0!==O&&O,E=n.fetchSize,P=void 0===E?y:E,x=n.highRecordWatermark,T=void 0===x?Number.MAX_VALUE:x,j=n.lowRecordWatermark,C=void 0===j?Number.MAX_VALUE:j,A=new l.ResultStreamObserver({server:this._server,reactive:S,fetchSize:P,moreFunction:this._requestMore.bind(this),discardFunction:this._requestDiscard.bind(this),beforeKeys:d,afterKeys:p,beforeError:v,afterError:b,beforeComplete:m,afterComplete:g,highRecordWatermark:T,lowRecordWatermark:C});(0,c.assertImpersonatedUserIsEmpty)(u,this._onProtocolError,A),(0,c.assertNotificationFilterIsEmpty)(f,this._onProtocolError,A);var k=S;return this.write(s.default.runWithMetadata(e,t,{bookmarks:o,txConfig:i,database:a,mode:h}),A,k&&w),S||this.write(s.default.pull({n:P}),A,w),A},t.prototype._requestMore=function(e,t,r){this.write(s.default.pull({stmtId:e,n:t}),r,!0)},t.prototype._requestDiscard=function(e,t){this.write(s.default.discard({stmtId:e}),t,!0)},t.prototype._noOp=function(){},t.prototype.requestRoutingInformation=function(e){var t,r=e.routingContext,n=void 0===r?{}:r,o=e.databaseName,a=void 0===o?null:o,u=e.sessionContext,s=void 0===u?{}:u,c=e.onError,f=e.onCompleted,h=this.run(_,((t={})[m]=n,t[g]=a,t),i(i({},s),{txConfig:b.empty()}));return new l.ProcedureRouteObserver({resultObserver:h,onProtocolError:this._onProtocolError,onError:c,onCompleted:f})},t}(u.default);t.default=w},2066:function(e,t,r){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=o(r(1175));t.default=n({},i.default)},4596:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=i(r(2539)),u=i(r(7021)),s=r(9014),c=r(9305),l=r(397),f=i(r(7521)),h=i(r(3321)),d=c.internal.constants.BOLT_PROTOCOL_V4_1,p=function(e){function t(t,r,n,o,i,a,u){void 0===o&&(o=function(){return null});var s=e.call(this,t,r,n,o,i,a)||this;return s._serversideRouting=u,s}return o(t,e),Object.defineProperty(t.prototype,"version",{get:function(){return d},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"transformer",{get:function(){var e=this;return void 0===this._transformer&&(this._transformer=new h.default(Object.values(f.default).map((function(t){return t(e._config,e._log)})))),this._transformer},enumerable:!1,configurable:!0}),t.prototype.initialize=function(e){var t=this,r=void 0===e?{}:e,n=r.userAgent,o=(r.boltAgent,r.authToken),i=r.notificationFilter,a=r.onError,c=r.onComplete,f=new s.LoginObserver({onError:function(e){return t._onLoginError(e,a)},onCompleted:function(e){return t._onLoginCompleted(e,o,c)}});return(0,l.assertNotificationFilterIsEmpty)(i,this._onProtocolError,f),this.write(u.default.hello(n,o,this._serversideRouting),f,!0),f},t}(a.default);t.default=p},7521:function(e,t,r){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=o(r(2066));t.default=n({},i.default)},6445:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=i(r(4596)),u=r(9305),s=i(r(5348)),c=i(r(3321)),l=u.internal.constants.BOLT_PROTOCOL_V4_2,f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"version",{get:function(){return l},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"transformer",{get:function(){var e=this;return void 0===this._transformer&&(this._transformer=new c.default(Object.values(s.default).map((function(t){return t(e._config,e._log)})))),this._transformer},enumerable:!1,configurable:!0}),t}(a.default);t.default=f},5348:function(e,t,r){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=o(r(7521));t.default=n({},i.default)},9054:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=a(r(6445)),s=a(r(7021)),c=r(9014),l=r(397),f=a(r(7331)),h=a(r(5045)),d=a(r(3321)),p=r(9305),v=p.internal.bookmarks.Bookmarks,y=p.internal.constants.BOLT_PROTOCOL_V4_3,b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"version",{get:function(){return y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"transformer",{get:function(){var e=this;return void 0===this._transformer&&(this._transformer=new d.default(Object.values(f.default).map((function(t){return t(e._config,e._log)})))),this._transformer},enumerable:!1,configurable:!0}),t.prototype.requestRoutingInformation=function(e){var t=e.routingContext,r=void 0===t?{}:t,n=e.databaseName,o=void 0===n?null:n,i=e.sessionContext,a=void 0===i?{}:i,u=e.onError,l=e.onCompleted,f=new c.RouteObserver({onProtocolError:this._onProtocolError,onError:u,onCompleted:l}),h=a.bookmarks||v.empty();return this.write(s.default.route(r,h.values(),o),f,!0),f},t.prototype.initialize=function(e){var t=this,r=void 0===e?{}:e,n=r.userAgent,o=(r.boltAgent,r.authToken),i=r.notificationFilter,a=r.onError,u=r.onComplete,f=new c.LoginObserver({onError:function(e){return t._onLoginError(e,a)},onCompleted:function(e){return void 0!==e.patch_bolt&&t._applyPatches(e.patch_bolt),t._onLoginCompleted(e,o,u)}});return(0,l.assertNotificationFilterIsEmpty)(i,this._onProtocolError,f),this.write(s.default.hello(n,o,this._serversideRouting,["utc"]),f,!0),f},t.prototype._applyPatches=function(e){e.includes("utc")&&this._applyUtcPatch()},t.prototype._applyUtcPatch=function(){var e=this;this._transformer=new d.default(Object.values(i(i({},f.default),h.default)).map((function(t){return t(e._config,e._log)})))},t}(u.default);t.default=b},7331:function(e,t,r){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=o(r(5348));t.default=n({},i.default)},1711:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=a(r(9054)),s=r(9305),c=a(r(7021)),l=r(9014),f=r(397),h=a(r(7518)),d=a(r(5045)),p=a(r(3321)),v=s.internal.constants,y=v.BOLT_PROTOCOL_V4_4,b=v.FETCH_ALL,m=s.internal.bookmarks.Bookmarks,g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"version",{get:function(){return y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"transformer",{get:function(){var e=this;return void 0===this._transformer&&(this._transformer=new p.default(Object.values(h.default).map((function(t){return t(e._config,e._log)})))),this._transformer},enumerable:!1,configurable:!0}),t.prototype.requestRoutingInformation=function(e){var t=e.routingContext,r=void 0===t?{}:t,n=e.databaseName,o=void 0===n?null:n,i=e.impersonatedUser,a=void 0===i?null:i,u=e.sessionContext,s=void 0===u?{}:u,f=e.onError,h=e.onCompleted,d=new l.RouteObserver({onProtocolError:this._onProtocolError,onError:f,onCompleted:h}),p=s.bookmarks||m.empty();return this.write(c.default.routeV4x4(r,p.values(),{databaseName:o,impersonatedUser:a}),d,!0),d},t.prototype.run=function(e,t,r){var n=void 0===r?{}:r,o=n.bookmarks,i=n.txConfig,a=n.database,u=n.mode,s=n.impersonatedUser,h=n.notificationFilter,d=n.beforeKeys,p=n.afterKeys,v=n.beforeError,y=n.afterError,m=n.beforeComplete,g=n.afterComplete,_=n.flush,w=void 0===_||_,O=n.reactive,S=void 0!==O&&O,E=n.fetchSize,P=void 0===E?b:E,x=n.highRecordWatermark,T=void 0===x?Number.MAX_VALUE:x,j=n.lowRecordWatermark,C=void 0===j?Number.MAX_VALUE:j,A=new l.ResultStreamObserver({server:this._server,reactive:S,fetchSize:P,moreFunction:this._requestMore.bind(this),discardFunction:this._requestDiscard.bind(this),beforeKeys:d,afterKeys:p,beforeError:v,afterError:y,beforeComplete:m,afterComplete:g,highRecordWatermark:T,lowRecordWatermark:C});(0,f.assertNotificationFilterIsEmpty)(h,this._onProtocolError,A);var k=S;return this.write(c.default.runWithMetadata(e,t,{bookmarks:o,txConfig:i,database:a,mode:u,impersonatedUser:s}),A,k&&w),S||this.write(c.default.pull({n:P}),A,w),A},t.prototype.beginTransaction=function(e){var t=void 0===e?{}:e,r=t.bookmarks,n=t.txConfig,o=t.database,i=t.mode,a=t.impersonatedUser,u=t.notificationFilter,s=t.beforeError,h=t.afterError,d=t.beforeComplete,p=t.afterComplete,v=new l.ResultStreamObserver({server:this._server,beforeError:s,afterError:h,beforeComplete:d,afterComplete:p});return v.prepareToHandleSingleResponse(),(0,f.assertNotificationFilterIsEmpty)(u,this._onProtocolError,v),this.write(c.default.begin({bookmarks:r,txConfig:n,database:o,mode:i,impersonatedUser:a}),v,!0),v},t.prototype._applyUtcPatch=function(){var e=this;this._transformer=new p.default(Object.values(i(i({},h.default),d.default)).map((function(t){return t(e._config,e._log)})))},t}(u.default);t.default=g},7518:function(e,t,r){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=o(r(7331));t.default=n({},i.default)},844:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=i(r(1711)),u=r(397),s=i(r(7449)),c=i(r(3321)),l=i(r(7021)),f=r(9014),h=r(9305).internal.constants.BOLT_PROTOCOL_V5_0,d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"version",{get:function(){return h},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"transformer",{get:function(){var e=this;return void 0===this._transformer&&(this._transformer=new c.default(Object.values(s.default).map((function(t){return t(e._config,e._log)})))),this._transformer},enumerable:!1,configurable:!0}),t.prototype.initialize=function(e){var t=this,r=void 0===e?{}:e,n=r.userAgent,o=(r.boltAgent,r.authToken),i=r.notificationFilter,a=r.onError,s=r.onComplete,c=new f.LoginObserver({onError:function(e){return t._onLoginError(e,a)},onCompleted:function(e){return t._onLoginCompleted(e,o,s)}});return(0,u.assertNotificationFilterIsEmpty)(i,this._onProtocolError,c),this.write(l.default.hello(n,o,this._serversideRouting),c,!0),c},t}(a.default);t.default=d},7449:function(e,t,r){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=r(7168),u=r(9305),s=i(r(7518)),c=i(r(5045));t.default=n(n(n({},s.default),c.default),{createNodeTransformer:function(e){return s.default.createNodeTransformer(e).extendsWith({fromStructure:function(e){a.structure.verifyStructSize("Node",4,e.size);var t=o(e.fields,4),r=t[0],n=t[1],i=t[2],s=t[3];return new u.Node(r,n,i,s)}})},createRelationshipTransformer:function(e){return s.default.createRelationshipTransformer(e).extendsWith({fromStructure:function(e){a.structure.verifyStructSize("Relationship",8,e.size);var t=o(e.fields,8),r=t[0],n=t[1],i=t[2],s=t[3],c=t[4],l=t[5],f=t[6],h=t[7];return new u.Relationship(r,n,i,s,c,l,f,h)}})},createUnboundRelationshipTransformer:function(e){return s.default.createUnboundRelationshipTransformer(e).extendsWith({fromStructure:function(e){a.structure.verifyStructSize("UnboundRelationship",4,e.size);var t=o(e.fields,4),r=t[0],n=t[1],i=t[2],s=t[3];return new u.UnboundRelationship(r,n,i,s)}})}})},5045:function(e,t,r){var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(7168),a=r(9305),u=o(r(7518)),s=r(5973),c=r(6492),l=a.internal.temporalUtil.localDateTimeToEpochSecond,f=new Map;function h(e,t,r){var n=function(e){if(!f.has(e)){var t=new Intl.DateTimeFormat("en-US",{timeZone:e,year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1,era:"narrow"});f.set(e,t)}return f.get(e)}(e),o=(0,a.int)(t).multiply(1e3).add((0,a.int)(r).div(1e6)).toNumber(),i=n.formatToParts(o).reduce((function(e,t){return"era"===t.type?e.adjustEra="B"===t.value.toUpperCase()?function(e){return e.subtract(1).negate()}:c.identity:"hour"===t.type?e.hour=(0,a.int)(t.value).modulo(24):"literal"!==t.type&&(e[t.type]=(0,a.int)(t.value)),e}),{});i.year=i.adjustEra(i.year);var u=l(i.year,i.month,i.day,i.hour,i.minute,i.second,i.nanosecond);return i.timeZoneOffsetSeconds=u.subtract(t),i.hour=i.hour.modulo(24),i}function d(e,t,r){if(!t&&!r)return e;var n=function(e){return r?e.toBigInt():e.toNumberOrInfinity()},o=Object.create(Object.getPrototypeOf(e));for(var i in e)if(!0===Object.prototype.hasOwnProperty.call(e,i)){var u=e[i];o[i]=(0,a.isInt)(u)?n(u):u}return Object.freeze(o),o}t.default={createDateTimeWithZoneIdTransformer:function(e,t){var r=e.disableLosslessIntegers,o=e.useBigInt;return u.default.createDateTimeWithZoneIdTransformer(e).extendsWith({signature:105,fromStructure:function(e){i.structure.verifyStructSize("DateTimeWithZoneId",3,e.size);var t=n(e.fields,3),u=t[0],s=t[1],c=t[2],l=h(c,u,s);return d(new a.DateTime(l.year,l.month,l.day,l.hour,l.minute,l.second,(0,a.int)(s),l.timeZoneOffsetSeconds,c),r,o)},toStructure:function(e){var r=l(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),n=null!=e.timeZoneOffsetSeconds?e.timeZoneOffsetSeconds:function(e,t,r){var n=h(e,t,r),o=l(n.year,n.month,n.day,n.hour,n.minute,n.second,r).subtract(t),i=t.subtract(o),a=h(e,i,r);return l(a.year,a.month,a.day,a.hour,a.minute,a.second,r).subtract(i)}(e.timeZoneId,r,e.nanosecond);null==e.timeZoneOffsetSeconds&&t.warn('DateTime objects without "timeZoneOffsetSeconds" property are prune to bugs related to ambiguous times. For instance, 2022-10-30T2:30:00[Europe/Berlin] could be GMT+1 or GMT+2.');var o=r.subtract(n),u=(0,a.int)(e.nanosecond),s=e.timeZoneId;return new i.structure.Structure(105,[o,u,s])}})},createDateTimeWithOffsetTransformer:function(e){var t=e.disableLosslessIntegers,r=e.useBigInt;return u.default.createDateTimeWithOffsetTransformer(e).extendsWith({signature:73,toStructure:function(e){var t=l(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,a.int)(e.nanosecond),n=(0,a.int)(e.timeZoneOffsetSeconds),o=t.subtract(n);return new i.structure.Structure(73,[o,r,n])},fromStructure:function(e){i.structure.verifyStructSize("DateTimeWithZoneOffset",3,e.size);var o=n(e.fields,3),u=o[0],c=o[1],l=o[2],f=(0,a.int)(u).add(l),h=(0,s.epochSecondAndNanoToLocalDateTime)(f,c);return d(new a.DateTime(h.year,h.month,h.day,h.hour,h.minute,h.second,h.nanosecond,l,null),t,r)}})}}},6345:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=a(r(844)),s=r(397),c=a(r(9994)),l=a(r(3321)),f=a(r(7021)),h=r(9014),d=r(9305).internal.constants.BOLT_PROTOCOL_V5_1,p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"version",{get:function(){return d},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"transformer",{get:function(){var e=this;return void 0===this._transformer&&(this._transformer=new l.default(Object.values(c.default).map((function(t){return t(e._config,e._log)})))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"supportsReAuth",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype.initialize=function(e){var t=this,r=void 0===e?{}:e,n=r.userAgent,o=(r.boltAgent,r.authToken),a=r.notificationFilter,u=r.onError,c=r.onComplete,l={},d=new h.LoginObserver({onError:function(e){return t._onLoginError(e,u)},onCompleted:function(e){return l.metadata=e,t._onLoginCompleted(e)}});return(0,s.assertNotificationFilterIsEmpty)(a,this._onProtocolError,d),this.write(f.default.hello5x1(n,this._serversideRouting),d,!1),this.logon({authToken:o,onComplete:function(e){return c(i(i({},e),l.metadata))},onError:u,flush:!0})},t.prototype.logon=function(e){var t=this,r=void 0===e?{}:e,n=r.authToken,o=r.onComplete,i=r.onError,a=r.flush,u=new h.LoginObserver({onCompleted:function(){return t._onLoginCompleted(null,n,o)},onError:function(e){return t._onLoginError(e,i)}});return this.write(f.default.logon(n),u,a),u},t.prototype.logoff=function(e){var t=void 0===e?{}:e,r=t.onComplete,n=t.onError,o=t.flush,i=new h.LogoffObserver({onCompleted:r,onError:n});return this.write(f.default.logoff(),i,o),i},t}(u.default);t.default=p},9994:function(e,t,r){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=o(r(7449));t.default=n({},i.default)},934:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=a(r(6345)),s=a(r(3019)),c=a(r(3321)),l=a(r(7021)),f=r(9014),h=r(9305).internal.constants,d=h.BOLT_PROTOCOL_V5_2,p=h.FETCH_ALL,v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"version",{get:function(){return d},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"transformer",{get:function(){var e=this;return void 0===this._transformer&&(this._transformer=new c.default(Object.values(s.default).map((function(t){return t(e._config,e._log)})))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"supportsReAuth",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype.initialize=function(e){var t=this,r=void 0===e?{}:e,n=r.userAgent,o=(r.boltAgent,r.authToken),a=r.notificationFilter,u=r.onError,s=r.onComplete,c={},h=new f.LoginObserver({onError:function(e){return t._onLoginError(e,u)},onCompleted:function(e){return c.metadata=e,t._onLoginCompleted(e)}});return this.write(l.default.hello5x2(n,a,this._serversideRouting),h,!1),this.logon({authToken:o,onComplete:function(e){return s(i(i({},e),c.metadata))},onError:u,flush:!0})},t.prototype.beginTransaction=function(e){var t=void 0===e?{}:e,r=t.bookmarks,n=t.txConfig,o=t.database,i=t.mode,a=t.impersonatedUser,u=t.notificationFilter,s=t.beforeError,c=t.afterError,h=t.beforeComplete,d=t.afterComplete,p=new f.ResultStreamObserver({server:this._server,beforeError:s,afterError:c,beforeComplete:h,afterComplete:d});return p.prepareToHandleSingleResponse(),this.write(l.default.begin({bookmarks:r,txConfig:n,database:o,mode:i,impersonatedUser:a,notificationFilter:u}),p,!0),p},t.prototype.run=function(e,t,r){var n=void 0===r?{}:r,o=n.bookmarks,i=n.txConfig,a=n.database,u=n.mode,s=n.impersonatedUser,c=n.notificationFilter,h=n.beforeKeys,d=n.afterKeys,v=n.beforeError,y=n.afterError,b=n.beforeComplete,m=n.afterComplete,g=n.flush,_=void 0===g||g,w=n.reactive,O=void 0!==w&&w,S=n.fetchSize,E=void 0===S?p:S,P=n.highRecordWatermark,x=void 0===P?Number.MAX_VALUE:P,T=n.lowRecordWatermark,j=void 0===T?Number.MAX_VALUE:T,C=new f.ResultStreamObserver({server:this._server,reactive:O,fetchSize:E,moreFunction:this._requestMore.bind(this),discardFunction:this._requestDiscard.bind(this),beforeKeys:h,afterKeys:d,beforeError:v,afterError:y,beforeComplete:b,afterComplete:m,highRecordWatermark:x,lowRecordWatermark:j}),A=O;return this.write(l.default.runWithMetadata(e,t,{bookmarks:o,txConfig:i,database:a,mode:u,impersonatedUser:s,notificationFilter:c}),C,A&&_),O||this.write(l.default.pull({n:E}),C,_),C},t}(u.default);t.default=v},3019:function(e,t,r){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=o(r(9994));t.default=n({},i.default)},9125:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=a(r(934)),s=a(r(2204)),c=a(r(3321)),l=a(r(7021)),f=r(9014),h=r(9305).internal.constants.BOLT_PROTOCOL_V5_3,d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"version",{get:function(){return h},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"transformer",{get:function(){var e=this;return void 0===this._transformer&&(this._transformer=new c.default(Object.values(s.default).map((function(t){return t(e._config,e._log)})))),this._transformer},enumerable:!1,configurable:!0}),t.prototype.initialize=function(e){var t=this,r=void 0===e?{}:e,n=r.userAgent,o=r.boltAgent,a=r.authToken,u=r.notificationFilter,s=r.onError,c=r.onComplete,h={},d=new f.LoginObserver({onError:function(e){return t._onLoginError(e,s)},onCompleted:function(e){return h.metadata=e,t._onLoginCompleted(e)}});return this.write(l.default.hello5x3(n,o,u,this._serversideRouting),d,!1),this.logon({authToken:a,onComplete:function(e){return c(i(i({},e),h.metadata))},onError:s,flush:!0})},t}(u.default);t.default=d},2204:function(e,t,r){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=o(r(3019));t.default=n({},i.default)},9744:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=i(r(9125)),u=i(r(4325)),s=i(r(7021)),c=r(9014),l=i(r(3321)),f=r(9305).internal.constants.BOLT_PROTOCOL_V5_4,h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"version",{get:function(){return f},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"transformer",{get:function(){var e=this;return void 0===this._transformer&&(this._transformer=new l.default(Object.values(u.default).map((function(t){return t(e._config,e._log)})))),this._transformer},enumerable:!1,configurable:!0}),t.prototype.telemetry=function(e,t){var r=e.api,n=void 0===t?{}:t,o=n.onError,i=n.onCompleted,a=new c.TelemetryObserver({onCompleted:i,onError:o});return this.write(s.default.telemetry({api:r}),a,!1),a},t}(a.default);t.default=h},4325:function(e,t,r){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=o(r(2204));t.default=n({},i.default)},5815:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=a(r(9744)),s=a(r(9238)),c=a(r(3321)),l=a(r(7021)),f=r(9014),h=r(9305).internal.constants,d=h.BOLT_PROTOCOL_V5_5,p=h.FETCH_ALL,v=Object.freeze({OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"}),y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"version",{get:function(){return d},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"transformer",{get:function(){var e=this;return void 0===this._transformer&&(this._transformer=new c.default(Object.values(s.default).map((function(t){return t(e._config,e._log)})))),this._transformer},enumerable:!1,configurable:!0}),t.prototype.initialize=function(e){var t=this,r=void 0===e?{}:e,n=r.userAgent,o=r.boltAgent,a=r.authToken,u=r.notificationFilter,s=r.onError,c=r.onComplete,h={},d=new f.LoginObserver({onError:function(e){return t._onLoginError(e,s)},onCompleted:function(e){return h.metadata=e,t._onLoginCompleted(e)}});return this.write(l.default.hello5x5(n,o,u,this._serversideRouting),d,!1),this.logon({authToken:a,onComplete:function(e){return c(i(i({},e),h.metadata))},onError:s,flush:!0})},t.prototype.beginTransaction=function(e){var t=void 0===e?{}:e,r=t.bookmarks,n=t.txConfig,o=t.database,i=t.mode,a=t.impersonatedUser,u=t.notificationFilter,s=t.beforeError,c=t.afterError,h=t.beforeComplete,d=t.afterComplete,p=new f.ResultStreamObserver({server:this._server,beforeError:s,afterError:c,beforeComplete:h,afterComplete:d});return p.prepareToHandleSingleResponse(),this.write(l.default.begin5x5({bookmarks:r,txConfig:n,database:o,mode:i,impersonatedUser:a,notificationFilter:u}),p,!0),p},t.prototype.run=function(e,t,r){var n=void 0===r?{}:r,o=n.bookmarks,i=n.txConfig,a=n.database,u=n.mode,s=n.impersonatedUser,c=n.notificationFilter,h=n.beforeKeys,d=n.afterKeys,v=n.beforeError,y=n.afterError,b=n.beforeComplete,m=n.afterComplete,g=n.flush,_=void 0===g||g,w=n.reactive,O=void 0!==w&&w,S=n.fetchSize,E=void 0===S?p:S,P=n.highRecordWatermark,x=void 0===P?Number.MAX_VALUE:P,T=n.lowRecordWatermark,j=void 0===T?Number.MAX_VALUE:T,C=new f.ResultStreamObserver({server:this._server,reactive:O,fetchSize:E,moreFunction:this._requestMore.bind(this),discardFunction:this._requestDiscard.bind(this),beforeKeys:h,afterKeys:d,beforeError:v,afterError:y,beforeComplete:b,afterComplete:m,highRecordWatermark:x,lowRecordWatermark:j,enrichMetadata:this._enrichMetadata}),A=O;return this.write(l.default.runWithMetadata5x5(e,t,{bookmarks:o,txConfig:i,database:a,mode:u,impersonatedUser:s,notificationFilter:c}),C,A&&_),O||this.write(l.default.pull({n:E}),C,_),C},t.prototype._enrichMetadata=function(e){return Array.isArray(e.statuses)&&(e.statuses=e.statuses.map((function(e){return i(i({},e),{description:null!=e.neo4j_code?e.status_description:e.description,diagnostic_record:null!==e.diagnostic_record?i(i({},v),e.diagnostic_record):null})}))),e},t}(u.default);t.default=y},9238:function(e,t,r){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=o(r(4325));t.default=n({},i.default)},6890:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=a(r(5815)),s=a(r(9238)),c=a(r(3321)),l=r(9305).internal.constants.BOLT_PROTOCOL_V5_6,f=Object.freeze({OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"}),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"version",{get:function(){return l},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"transformer",{get:function(){var e=this;return void 0===this._transformer&&(this._transformer=new c.default(Object.values(s.default).map((function(t){return t(e._config,e._log)})))),this._transformer},enumerable:!1,configurable:!0}),t.prototype._enrichMetadata=function(e){return Array.isArray(e.statuses)&&(e.statuses=e.statuses.map((function(e){return i(i({},e),{diagnostic_record:null!==e.diagnostic_record?i(i({},f),e.diagnostic_record):null})}))),e},t}(u.default);t.default=h},6377:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=a(r(6890)),s=a(r(9238)),c=a(r(3321)),l=r(9305).internal.constants.BOLT_PROTOCOL_V5_7,f=Object.freeze({OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"}),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"version",{get:function(){return l},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"transformer",{get:function(){var e=this;return void 0===this._transformer&&(this._transformer=new c.default(Object.values(s.default).map((function(t){return t(e._config,e._log)})))),this._transformer},enumerable:!1,configurable:!0}),t.prototype.enrichErrorMetadata=function(e){return i(i({},e),{cause:null!==e.cause&&void 0!==e.cause?this.enrichErrorMetadata(e.cause):null,code:e.neo4j_code,diagnostic_record:null!==e.diagnostic_record?i(i({},f),e.diagnostic_record):null})},t}(u.default);t.default=h},6544:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(9305),i=n(r(8320)),a=n(r(2857)),u=n(r(5642)),s=n(r(2539)),c=n(r(4596)),l=n(r(6445)),f=n(r(9054)),h=n(r(1711)),d=n(r(844)),p=n(r(6345)),v=n(r(934)),y=n(r(9125)),b=n(r(9744)),m=n(r(5815)),g=n(r(6890)),_=n(r(6377)),w=(r(7452),n(r(2578)));t.default=function(e){var t=void 0===e?{}:e,r=t.version,n=t.chunker,O=t.dechunker,S=t.channel,E=t.disableLosslessIntegers,P=t.useBigInt,x=t.serversideRouting,T=t.server,j=t.log,C=t.observer;return function(e,t,r,n,w,O,S,E){switch(e){case 1:return new i.default(t,r,n,O,E,S);case 2:return new a.default(t,r,n,O,E,S);case 3:return new u.default(t,r,n,O,E,S);case 4:return new s.default(t,r,n,O,E,S);case 4.1:return new c.default(t,r,n,O,E,S,w);case 4.2:return new l.default(t,r,n,O,E,S,w);case 4.3:return new f.default(t,r,n,O,E,S,w);case 4.4:return new h.default(t,r,n,O,E,S,w);case 5:return new d.default(t,r,n,O,E,S,w);case 5.1:return new p.default(t,r,n,O,E,S,w);case 5.2:return new v.default(t,r,n,O,E,S,w);case 5.3:return new y.default(t,r,n,O,E,S,w);case 5.4:return new b.default(t,r,n,O,E,S,w);case 5.5:return new m.default(t,r,n,O,E,S,w);case 5.6:return new g.default(t,r,n,O,E,S,w);case 5.7:return new _.default(t,r,n,O,E,S,w);default:throw(0,o.newError)("Unknown Bolt protocol version: "+e)}}(r,T,n,{disableLosslessIntegers:E,useBigInt:P},x,(function(e){var t=new w.default({transformMetadata:e.transformMetadata.bind(e),enrichErrorMetadata:e.enrichErrorMetadata.bind(e),log:j,observer:C});return S.onerror=C.onError.bind(C),S.onmessage=function(e){return O.write(e)},O.onmessage=function(r){try{t.handleResponse(e.unpack(r))}catch(e){return C.onError(e)}},t}),C.onProtocolError.bind(C),j)}},8731:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=r(7452),o=r(9305);function i(e,t){return{major:e,minor:t}}t.default=function(e,t){var r=this;return new Promise((function(a,u){var s=function(e){u(e)};e.onerror=s.bind(r),e._error&&s(e._error),e.onmessage=function(e){try{var r=function(e,t){var r=[e.readUInt8(),e.readUInt8(),e.readUInt8(),e.readUInt8()];if(72===r[0]&&84===r[1]&&84===r[2]&&80===r[3])throw t.error("Handshake failed since server responded with HTTP."),(0,o.newError)("Server responded HTTP. Make sure you are not trying to connect to the http endpoint (HTTP defaults to port 7474 whereas BOLT defaults to port 7687)");return Number(r[3]+"."+r[2])}(e,t);a({protocolVersion:r,consumeRemainingBuffer:function(t){e.hasRemaining()&&t(e.readSlice(e.remaining()))}})}catch(e){u(e)}},e.write(function(e){if(e.length>4)throw(0,o.newError)("It should not have more than 4 versions of the protocol");var t=(0,n.alloc)(20);return t.writeInt32(1616949271),e.forEach((function(e){if(e instanceof Array){var r=e[0],n=r.major,o=(i=r.minor)-e[1].minor;t.writeInt32(o<<16|i<<8|n)}else{n=e.major;var i=e.minor;t.writeInt32(i<<8|n)}})),t.reset(),t}([[i(5,7),i(5,0)],[i(4,4),i(4,2)],i(4,1),i(3,0)]))}))}},7666:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RawRoutingTable=t.BoltProtocol=void 0;var a=i(r(8731)),u=i(r(6544)),s=i(r(9054)),c=i(r(7790));o(r(9014),t),t.BoltProtocol=s.default,t.RawRoutingTable=c.default,t.default={handshake:a.default,create:u.default}},7021:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SIGNATURES=void 0;var n=r(9305),o=n.internal.constants,i=o.ACCESS_MODE_READ,a=o.FETCH_ALL,u=n.internal.util.assertString,s=Object.freeze({INIT:1,RESET:15,RUN:16,PULL_ALL:63,HELLO:1,GOODBYE:2,BEGIN:17,COMMIT:18,ROLLBACK:19,TELEMETRY:84,ROUTE:102,LOGON:106,LOGOFF:107,DISCARD:47,PULL:63});t.SIGNATURES=s;var c=function(){function e(e,t,r){this.signature=e,this.fields=t,this.toString=r}return e.init=function(t,r){return new e(1,[t,r],(function(){return"INIT ".concat(t," {...}")}))},e.run=function(t,r){return new e(16,[t,r],(function(){return"RUN ".concat(t," ").concat(n.json.stringify(r))}))},e.pullAll=function(){return p},e.reset=function(){return v},e.hello=function(t,r,n,o){void 0===n&&(n=null),void 0===o&&(o=null);var i=Object.assign({user_agent:t},r);return n&&(i.routing=n),o&&(i.patch_bolt=o),new e(1,[i],(function(){return"HELLO {user_agent: '".concat(t,"', ...}")}))},e.hello5x1=function(t,r){void 0===r&&(r=null);var n={user_agent:t};return r&&(n.routing=r),new e(1,[n],(function(){return"HELLO {user_agent: '".concat(t,"', ...}")}))},e.hello5x2=function(t,r,o){void 0===r&&(r=null),void 0===o&&(o=null);var i={user_agent:t};return h(i,r),o&&(i.routing=o),new e(1,[i],(function(){return"HELLO ".concat(n.json.stringify(i))}))},e.hello5x3=function(t,r,o,i){void 0===o&&(o=null),void 0===i&&(i=null);var a={};return t&&(a.user_agent=t),r&&(a.bolt_agent={product:r.product,platform:r.platform,language:r.language,language_details:r.languageDetails}),h(a,o),i&&(a.routing=i),new e(1,[a],(function(){return"HELLO ".concat(n.json.stringify(a))}))},e.hello5x5=function(t,r,o,i){void 0===o&&(o=null),void 0===i&&(i=null);var a={};return t&&(a.user_agent=t),r&&(a.bolt_agent={product:r.product,platform:r.platform,language:r.language,language_details:r.languageDetails}),d(a,o),i&&(a.routing=i),new e(1,[a],(function(){return"HELLO ".concat(n.json.stringify(a))}))},e.logon=function(t){return new e(106,[t],(function(){return"LOGON { ... }"}))},e.logoff=function(){return new e(107,[],(function(){return"LOGOFF"}))},e.begin=function(t){var r=void 0===t?{}:t,o=l(r.bookmarks,r.txConfig,r.database,r.mode,r.impersonatedUser,r.notificationFilter);return new e(17,[o],(function(){return"BEGIN ".concat(n.json.stringify(o))}))},e.begin5x5=function(t){var r=void 0===t?{}:t,o=l(r.bookmarks,r.txConfig,r.database,r.mode,r.impersonatedUser,r.notificationFilter,{appendNotificationFilter:d});return new e(17,[o],(function(){return"BEGIN ".concat(n.json.stringify(o))}))},e.commit=function(){return y},e.rollback=function(){return b},e.runWithMetadata=function(t,r,o){var i=void 0===o?{}:o,a=l(i.bookmarks,i.txConfig,i.database,i.mode,i.impersonatedUser,i.notificationFilter);return new e(16,[t,r,a],(function(){return"RUN ".concat(t," ").concat(n.json.stringify(r)," ").concat(n.json.stringify(a))}))},e.runWithMetadata5x5=function(t,r,o){var i=void 0===o?{}:o,a=l(i.bookmarks,i.txConfig,i.database,i.mode,i.impersonatedUser,i.notificationFilter,{appendNotificationFilter:d});return new e(16,[t,r,a],(function(){return"RUN ".concat(t," ").concat(n.json.stringify(r)," ").concat(n.json.stringify(a))}))},e.goodbye=function(){return m},e.pull=function(t){var r=void 0===t?{}:t,o=r.stmtId,i=void 0===o?-1:o,u=r.n,s=f(null==i?-1:i,(void 0===u?a:u)||a);return new e(63,[s],(function(){return"PULL ".concat(n.json.stringify(s))}))},e.discard=function(t){var r=void 0===t?{}:t,o=r.stmtId,i=void 0===o?-1:o,u=r.n,s=f(null==i?-1:i,(void 0===u?a:u)||a);return new e(47,[s],(function(){return"DISCARD ".concat(n.json.stringify(s))}))},e.telemetry=function(t){var r=t.api,o=(0,n.int)(r);return new e(84,[o],(function(){return"TELEMETRY ".concat(o.toString())}))},e.route=function(t,r,o){return void 0===t&&(t={}),void 0===r&&(r=[]),void 0===o&&(o=null),new e(102,[t,r,o],(function(){return"ROUTE ".concat(n.json.stringify(t)," ").concat(n.json.stringify(r)," ").concat(o)}))},e.routeV4x4=function(t,r,o){void 0===t&&(t={}),void 0===r&&(r=[]),void 0===o&&(o={});var i={};return o.databaseName&&(i.db=o.databaseName),o.impersonatedUser&&(i.imp_user=o.impersonatedUser),new e(102,[t,r,i],(function(){return"ROUTE ".concat(n.json.stringify(t)," ").concat(n.json.stringify(r)," ").concat(n.json.stringify(i))}))},e}();function l(e,t,r,n,o,a,s){var c;void 0===s&&(s={});var l={};return e.isEmpty()||(l.bookmarks=e.values()),null!==t.timeout&&(l.tx_timeout=t.timeout),t.metadata&&(l.tx_metadata=t.metadata),r&&(l.db=u(r,"database")),o&&(l.imp_user=u(o,"impersonatedUser")),n===i&&(l.mode="r"),(null!==(c=s.appendNotificationFilter)&&void 0!==c?c:h)(l,a),l}function f(e,t){var r={n:(0,n.int)(t)};return-1!==e&&(r.qid=(0,n.int)(e)),r}function h(e,t){t&&(t.minimumSeverityLevel&&(e.notifications_minimum_severity=t.minimumSeverityLevel),t.disabledCategories&&(e.notifications_disabled_categories=t.disabledCategories),t.disabledClassifications&&(e.notifications_disabled_categories=t.disabledClassifications))}function d(e,t){t&&(t.minimumSeverityLevel&&(e.notifications_minimum_severity=t.minimumSeverityLevel),t.disabledCategories&&(e.notifications_disabled_classifications=t.disabledCategories),t.disabledClassifications&&(e.notifications_disabled_classifications=t.disabledClassifications))}t.default=c;var p=new c(63,[],(function(){return"PULL_ALL"})),v=new c(15,[],(function(){return"RESET"})),y=new c(18,[],(function(){return"COMMIT"})),b=new c(19,[],(function(){return"ROLLBACK"})),m=new c(2,[],(function(){return"GOODBYE"}))},2578:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=r(9305);function o(){}function i(e){return e}var a={onNext:o,onCompleted:o,onError:o},u=function(){function e(e){var t=void 0===e?{}:e,r=t.transformMetadata,n=t.enrichErrorMetadata,a=t.log,u=t.observer;this._pendingObservers=[],this._log=a,this._transformMetadata=r||i,this._enrichErrorMetadata=n||i,this._observer=Object.assign({onObserversCountChange:o,onError:o,onFailure:o,onErrorApplyTransformation:i},u)}return Object.defineProperty(e.prototype,"currentFailure",{get:function(){return this._currentFailure},enumerable:!1,configurable:!0}),e.prototype.handleResponse=function(e){var t=e.fields[0];switch(e.signature){case 113:this._log.isDebugEnabled()&&this._log.debug("S: RECORD ".concat(n.json.stringify(e))),this._currentObserver.onNext(t);break;case 112:this._log.isDebugEnabled()&&this._log.debug("S: SUCCESS ".concat(n.json.stringify(e)));try{var r=this._transformMetadata(t);this._currentObserver.onCompleted(r)}finally{this._updateCurrentObserver()}break;case 127:this._log.isDebugEnabled()&&this._log.debug("S: FAILURE ".concat(n.json.stringify(e)));try{this._currentFailure=this._handleErrorPayload(this._enrichErrorMetadata(t)),this._currentObserver.onError(this._currentFailure)}finally{this._updateCurrentObserver(),this._observer.onFailure(this._currentFailure)}break;case 126:this._log.isDebugEnabled()&&this._log.debug("S: IGNORED ".concat(n.json.stringify(e)));try{this._currentFailure&&this._currentObserver.onError?this._currentObserver.onError(this._currentFailure):this._currentObserver.onError&&this._currentObserver.onError((0,n.newError)("Ignored either because of an error or RESET"))}finally{this._updateCurrentObserver()}break;default:this._observer.onError((0,n.newError)("Unknown Bolt protocol message: "+e))}},e.prototype._updateCurrentObserver=function(){this._currentObserver=this._pendingObservers.shift(),this._observer.onObserversCountChange(this._observersCount)},Object.defineProperty(e.prototype,"_observersCount",{get:function(){return null==this._currentObserver?this._pendingObservers.length:this._pendingObservers.length+1},enumerable:!1,configurable:!0}),e.prototype._queueObserver=function(e){return(e=e||a).onCompleted=e.onCompleted||o,e.onError=e.onError||o,e.onNext=e.onNext||o,void 0===this._currentObserver?this._currentObserver=e:this._pendingObservers.push(e),this._observer.onObserversCountChange(this._observersCount),!0},e.prototype._notifyErrorToObservers=function(e){for(this._currentObserver&&this._currentObserver.onError&&this._currentObserver.onError(e);this._pendingObservers.length>0;){var t=this._pendingObservers.shift();t&&t.onError&&t.onError(e)}},e.prototype.hasOngoingObservableRequests=function(){return null!=this._currentObserver||this._pendingObservers.length>0},e.prototype._resetFailure=function(){this._currentFailure=null},e.prototype._handleErrorPayload=function(e){var t,r="Neo.TransientError.Transaction.Terminated"===(t=e.code)?"Neo.ClientError.Transaction.Terminated":"Neo.TransientError.Transaction.LockClientStopped"===t?"Neo.ClientError.Transaction.LockClientStopped":t,o=null!=e.cause?this._handleErrorCause(e.cause):void 0,i=(0,n.newError)(e.message,r,o,e.gql_status,e.description,e.diagnostic_record);return this._observer.onErrorApplyTransformation(i)},e.prototype._handleErrorCause=function(e){var t=null!=e.cause?this._handleErrorCause(e.cause):void 0,r=(0,n.newGQLError)(e.message,t,e.gql_status,e.description,e.diagnostic_record);return this._observer.onErrorApplyTransformation(r)},e}();t.default=u},7790:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),i(r(9305));var a=function(){function e(){}return e.ofRecord=function(t){return null===t?e.ofNull():new c(t)},e.ofMessageResponse=function(t){return null===t?e.ofNull():new u(t)},e.ofNull=function(){return new s},Object.defineProperty(e.prototype,"ttl",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"db",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"servers",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isNull",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),e}();t.default=a;var u=function(e){function t(t){var r=e.call(this)||this;return r._response=t,r}return o(t,e),Object.defineProperty(t.prototype,"ttl",{get:function(){return this._response.rt.ttl},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"servers",{get:function(){return this._response.rt.servers},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"db",{get:function(){return this._response.rt.db},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isNull",{get:function(){return null===this._response},enumerable:!1,configurable:!0}),t}(a),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"isNull",{get:function(){return!0},enumerable:!1,configurable:!0}),t}(a),c=function(e){function t(t){var r=e.call(this)||this;return r._record=t,r}return o(t,e),Object.defineProperty(t.prototype,"ttl",{get:function(){return this._record.get("ttl")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"servers",{get:function(){return this._record.get("servers")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"db",{get:function(){return this._record.has("db")?this._record.get("db"):null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isNull",{get:function(){return null===this._record},enumerable:!1,configurable:!0}),t}(a)},9014:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TelemetryObserver=t.ProcedureRouteObserver=t.RouteObserver=t.CompletedObserver=t.FailedObserver=t.ResetObserver=t.LogoffObserver=t.LoginObserver=t.ResultStreamObserver=t.StreamObserver=void 0;var a=r(9305),u=i(r(7790)),s=r(6781),c=a.internal.constants.FETCH_ALL,l=a.error.PROTOCOL_ERROR,f=function(){function e(){}return e.prototype.onNext=function(e){},e.prototype.onError=function(e){},e.prototype.onCompleted=function(e){},e}();t.StreamObserver=f;var h=function(e){function t(t){var r=void 0===t?{}:t,n=r.reactive,o=void 0!==n&&n,i=r.moreFunction,a=r.discardFunction,u=r.fetchSize,l=void 0===u?c:u,f=r.beforeError,h=r.afterError,d=r.beforeKeys,p=r.afterKeys,v=r.beforeComplete,y=r.afterComplete,b=r.server,m=r.highRecordWatermark,g=void 0===m?Number.MAX_VALUE:m,_=r.lowRecordWatermark,O=void 0===_?Number.MAX_VALUE:_,S=r.enrichMetadata,E=e.call(this)||this;return E._fieldKeys=null,E._fieldLookup=null,E._head=null,E._queuedRecords=[],E._tail=null,E._error=null,E._observers=[],E._meta={},E._server=b,E._beforeError=f,E._afterError=h,E._beforeKeys=d,E._afterKeys=p,E._beforeComplete=v,E._afterComplete=y,E._enrichMetadata=S||s.functional.identity,E._queryId=null,E._moreFunction=i,E._discardFunction=a,E._discard=!1,E._fetchSize=l,E._lowRecordWatermark=O,E._highRecordWatermark=g,E._setState(o?w.READY:w.READY_STREAMING),E._setupAutoPull(),E._paused=!1,E._pulled=!o,E._haveRecordStreamed=!1,E}return o(t,e),t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1,this._setupAutoPull(!0),this._state.pull(this)},t.prototype.onNext=function(e){this._haveRecordStreamed=!0;var t=new a.Record(this._fieldKeys,e,this._fieldLookup);this._observers.some((function(e){return e.onNext}))?this._observers.forEach((function(e){e.onNext&&e.onNext(t)})):(this._queuedRecords.push(t),this._queuedRecords.length>this._highRecordWatermark&&(this._autoPull=!1))},t.prototype.onCompleted=function(e){this._state.onSuccess(this,e)},t.prototype.onError=function(e){this._state.onError(this,e)},t.prototype.cancel=function(){this._discard=!0},t.prototype.prepareToHandleSingleResponse=function(){this._head=[],this._fieldKeys=[],this._setState(w.STREAMING)},t.prototype.markCompleted=function(){this._head=[],this._fieldKeys=[],this._tail={},this._setState(w.SUCCEEDED)},t.prototype.subscribe=function(e){if(this._head&&e.onKeys&&e.onKeys(this._head),this._queuedRecords.length>0&&e.onNext)for(var t=0;t<this._queuedRecords.length;t++)e.onNext(this._queuedRecords[t]),this._queuedRecords.length-t-1<=this._lowRecordWatermark&&(this._autoPull=!0,this._state===w.READY&&this._handleStreaming());this._tail&&e.onCompleted&&e.onCompleted(this._tail),this._error&&e.onError(this._error),this._observers.push(e),this._state===w.READY&&this._handleStreaming()},t.prototype._handleHasMore=function(e){this._setState(w.READY),this._handleStreaming(),delete e.has_more},t.prototype._handlePullSuccess=function(e){var t=this,r=this._enrichMetadata(Object.assign(this._server?{server:this._server}:{},this._meta,{stream_summary:{have_records_streamed:this._haveRecordStreamed,pulled:this._pulled,has_keys:this._fieldKeys.length>0}},e));if([void 0,null,"r","w","rw","s"].includes(r.type)){this._setState(w.SUCCEEDED);var n=null;this._beforeComplete&&(n=this._beforeComplete(r));var o=function(){t._tail=r,t._observers.some((function(e){return e.onCompleted}))&&t._observers.forEach((function(e){e.onCompleted&&e.onCompleted(r)})),t._afterComplete&&t._afterComplete(r)};n?Promise.resolve(n).then((function(){return o()})):o()}else this.onError((0,a.newError)('Server returned invalid query type. Expected one of [undefined, null, "r", "w", "rw", "s"] but got \''.concat(r.type,"'"),l))},t.prototype._handleRunSuccess=function(e,t){var r=this;if(null===this._fieldKeys){if(this._fieldKeys=[],this._fieldLookup={},e.fields&&e.fields.length>0){this._fieldKeys=e.fields;for(var n=0;n<e.fields.length;n++)this._fieldLookup[e.fields[n]]=n}null!=e.fields&&delete e.fields,null!==e.qid&&void 0!==e.qid&&(this._queryId=e.qid,delete e.qid),this._storeMetadataForCompletion(e);var o=null;this._beforeKeys&&(o=this._beforeKeys(this._fieldKeys));var i=function(){r._head=r._fieldKeys,r._observers.some((function(e){return e.onKeys}))&&r._observers.forEach((function(e){e.onKeys&&e.onKeys(r._fieldKeys)})),r._afterKeys&&r._afterKeys(r._fieldKeys),t()};o?Promise.resolve(o).then((function(){return i()})):i()}},t.prototype._handleError=function(e){var t=this;this._setState(w.FAILED),this._error=e;var r=null;this._beforeError&&(r=this._beforeError(e));var n=function(){t._observers.some((function(e){return e.onError}))&&t._observers.forEach((function(t){t.onError&&t.onError(e)})),t._afterError&&t._afterError(e)};r?Promise.resolve(r).then((function(){return n()})):n()},t.prototype._handleStreaming=function(){this._head&&this._observers.some((function(e){return e.onNext||e.onCompleted}))&&(this._paused||!this._discard&&!this._autoPull||this._more())},t.prototype._more=function(){this._discard?this._discardFunction(this._queryId,this):(this._pulled=!0,this._moreFunction(this._queryId,this._fetchSize,this)),this._setState(w.STREAMING)},t.prototype._storeMetadataForCompletion=function(e){for(var t=Object.keys(e),r=t.length,n="";r--;)n=t[r],this._meta[n]=e[n]},t.prototype._setState=function(e){this._state=e},t.prototype._setupAutoPull=function(){this._autoPull=!0},t}(f);t.ResultStreamObserver=h;var d=function(e){function t(t){var r=void 0===t?{}:t,n=r.onError,o=r.onCompleted,i=e.call(this)||this;return i._onError=n,i._onCompleted=o,i}return o(t,e),t.prototype.onNext=function(e){this.onError((0,a.newError)("Received RECORD when initializing "+a.json.stringify(e)))},t.prototype.onError=function(e){this._onError&&this._onError(e)},t.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(e)},t}(f);t.LoginObserver=d;var p=function(e){function t(t){var r=void 0===t?{}:t,n=r.onError,o=r.onCompleted,i=e.call(this)||this;return i._onError=n,i._onCompleted=o,i}return o(t,e),t.prototype.onNext=function(e){this.onError((0,a.newError)("Received RECORD when logging off "+a.json.stringify(e)))},t.prototype.onError=function(e){this._onError&&this._onError(e)},t.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(e)},t}(f);t.LogoffObserver=p;var v=function(e){function t(t){var r=void 0===t?{}:t,n=r.onProtocolError,o=r.onError,i=r.onComplete,a=e.call(this)||this;return a._onProtocolError=n,a._onError=o,a._onComplete=i,a}return o(t,e),t.prototype.onNext=function(e){this.onError((0,a.newError)("Received RECORD when resetting: received record is: "+a.json.stringify(e),l))},t.prototype.onError=function(e){e.code===l&&this._onProtocolError&&this._onProtocolError(e.message),this._onError&&this._onError(e)},t.prototype.onCompleted=function(e){this._onComplete&&this._onComplete(e)},t}(f);t.ResetObserver=v;var y=function(e){function t(t){var r=void 0===t?{}:t,n=r.onError,o=r.onCompleted,i=e.call(this)||this;return i._onError=n,i._onCompleted=o,i}return o(t,e),t.prototype.onNext=function(e){this.onError((0,a.newError)("Received RECORD when sending telemetry "+a.json.stringify(e),l))},t.prototype.onError=function(e){this._onError&&this._onError(e)},t.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(e)},t}(h);t.TelemetryObserver=y;var b=function(e){function t(t){var r=t.error,n=t.onError,o=e.call(this,{beforeError:n})||this;return o.onError(r),o}return o(t,e),t}(h);t.FailedObserver=b;var m=function(e){function t(){var t=e.call(this)||this;return e.prototype.markCompleted.call(t),t}return o(t,e),t}(h);t.CompletedObserver=m;var g=function(e){function t(t){var r=t.resultObserver,n=t.onProtocolError,o=t.onError,i=t.onCompleted,a=e.call(this)||this;return a._resultObserver=r,a._onError=o,a._onCompleted=i,a._records=[],a._onProtocolError=n,r.subscribe(a),a}return o(t,e),t.prototype.onNext=function(e){this._records.push(e)},t.prototype.onError=function(e){e.code===l&&this._onProtocolError&&this._onProtocolError(e.message),this._onError&&this._onError(e)},t.prototype.onCompleted=function(){null===this._records||1===this._records.length?this._onCompleted&&this._onCompleted(u.default.ofRecord(this._records[0])):this.onError((0,a.newError)("Illegal response from router. Received "+this._records.length+" records but expected only one.\n"+a.json.stringify(this._records),l))},t}(f);t.ProcedureRouteObserver=g;var _=function(e){function t(t){var r=void 0===t?{}:t,n=r.onProtocolError,o=r.onError,i=r.onCompleted,a=e.call(this)||this;return a._onProtocolError=n,a._onError=o,a._onCompleted=i,a}return o(t,e),t.prototype.onNext=function(e){this.onError((0,a.newError)("Received RECORD when resetting: received record is: "+a.json.stringify(e),l))},t.prototype.onError=function(e){e.code===l&&this._onProtocolError&&this._onProtocolError(e.message),this._onError&&this._onError(e)},t.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(u.default.ofMessageResponse(e))},t}(f);t.RouteObserver=_;var w={READY_STREAMING:{onSuccess:function(e,t){e._handleRunSuccess(t,(function(){e._setState(w.STREAMING)}))},onError:function(e,t){e._handleError(t)},name:function(){return"READY_STREAMING"},pull:function(){}},READY:{onSuccess:function(e,t){e._handleRunSuccess(t,(function(){return e._handleStreaming()}))},onError:function(e,t){e._handleError(t)},name:function(){return"READY"},pull:function(e){return e._more()}},STREAMING:{onSuccess:function(e,t){t.has_more?e._handleHasMore(t):e._handlePullSuccess(t)},onError:function(e,t){e._handleError(t)},name:function(){return"STREAMING"},pull:function(){}},FAILED:{onError:function(e){},name:function(){return"FAILED"},pull:function(){}},SUCCEEDED:{name:function(){return"SUCCEEDED"},pull:function(){}}}},5973:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.epochSecondAndNanoToLocalDateTime=t.nanoOfDayToLocalTime=t.epochDayToDate=void 0;var n=r(9305),o=n.internal.temporalUtil,i=o.DAYS_0000_TO_1970,a=o.DAYS_PER_400_YEAR_CYCLE,u=o.NANOS_PER_HOUR,s=o.NANOS_PER_MINUTE,c=o.NANOS_PER_SECOND,l=o.SECONDS_PER_DAY,f=o.floorDiv,h=o.floorMod;function d(e){var t=(e=(0,n.int)(e)).add(i).subtract(60),r=(0,n.int)(0);if(t.lessThan(0)){var o=t.add(1).div(a).subtract(1);r=o.multiply(400),t=t.add(o.multiply(-a))}var u=t.multiply(400).add(591).div(a),s=t.subtract(u.multiply(365).add(u.div(4)).subtract(u.div(100)).add(u.div(400)));s.lessThan(0)&&(u=u.subtract(1),s=t.subtract(u.multiply(365).add(u.div(4)).subtract(u.div(100)).add(u.div(400)))),u=u.add(r);var c=s,l=c.multiply(5).add(2).div(153),f=l.add(2).modulo(12).add(1),h=c.subtract(l.multiply(306).add(5).div(10)).add(1);return u=u.add(l.div(10)),new n.Date(u,f,h)}function p(e){var t=(e=(0,n.int)(e)).div(u),r=(e=e.subtract(t.multiply(u))).div(s),o=(e=e.subtract(r.multiply(s))).div(c),i=e.subtract(o.multiply(c));return new n.LocalTime(t,r,o,i)}t.epochDayToDate=d,t.nanoOfDayToLocalTime=p,t.epochSecondAndNanoToLocalDateTime=function(e,t){var r=f(e,l),o=h(e,l).multiply(c).add(t),i=d(r),a=p(o);return new n.LocalDateTime(i.year,i.month,i.day,a.hour,a.minute,a.second,a.nanosecond)}},3321:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TypeTransformer=void 0;var n=r(7168),o=r(9305).internal.objectUtil,i=function(){function e(e){this._transformers=e,this._transformersPerSignature=new Map(e.map((function(e){return[e.signature,e]}))),this.fromStructure=this.fromStructure.bind(this),this.toStructure=this.toStructure.bind(this),Object.freeze(this)}return e.prototype.fromStructure=function(e){try{return e instanceof n.structure.Structure&&this._transformersPerSignature.has(e.signature)?(0,this._transformersPerSignature.get(e.signature).fromStructure)(e):e}catch(e){return o.createBrokenObject(e)}},e.prototype.toStructure=function(e){var t=this._transformers.find((function(t){return(0,t.isTypeInstance)(e)}));return void 0!==t?t.toStructure(e):e},e}();t.default=i;var a=function(){function e(e){var t=e.signature,r=e.fromStructure,n=e.toStructure,o=e.isTypeInstance;this.signature=t,this.isTypeInstance=o,this.fromStructure=r,this.toStructure=n,Object.freeze(this)}return e.prototype.extendsWith=function(t){var r=t.signature,n=t.fromStructure,o=t.toStructure,i=t.isTypeInstance;return new e({signature:r||this.signature,fromStructure:n||this.fromStructure,toStructure:o||this.toStructure,isTypeInstance:i||this.isTypeInstance})},e}();t.TypeTransformer=a},45:function(e,t){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e){this.position=0,this.length=e}return e.prototype.getUInt8=function(e){throw new Error("Not implemented")},e.prototype.getInt8=function(e){throw new Error("Not implemented")},e.prototype.getFloat64=function(e){throw new Error("Not implemented")},e.prototype.putUInt8=function(e,t){throw new Error("Not implemented")},e.prototype.putInt8=function(e,t){throw new Error("Not implemented")},e.prototype.putFloat64=function(e,t){throw new Error("Not implemented")},e.prototype.getInt16=function(e){return this.getInt8(e)<<8|this.getUInt8(e+1)},e.prototype.getUInt16=function(e){return this.getUInt8(e)<<8|this.getUInt8(e+1)},e.prototype.getInt32=function(e){return this.getInt8(e)<<24|this.getUInt8(e+1)<<16|this.getUInt8(e+2)<<8|this.getUInt8(e+3)},e.prototype.getUInt32=function(e){return this.getUInt8(e)<<24|this.getUInt8(e+1)<<16|this.getUInt8(e+2)<<8|this.getUInt8(e+3)},e.prototype.getInt64=function(e){return this.getInt8(e)<<56|this.getUInt8(e+1)<<48|this.getUInt8(e+2)<<40|this.getUInt8(e+3)<<32|this.getUInt8(e+4)<<24|this.getUInt8(e+5)<<16|this.getUInt8(e+6)<<8|this.getUInt8(e+7)},e.prototype.getSlice=function(e,t){return new i(e,t,this)},e.prototype.putInt16=function(e,t){this.putInt8(e,t>>8),this.putUInt8(e+1,255&t)},e.prototype.putUInt16=function(e,t){this.putUInt8(e,t>>8&255),this.putUInt8(e+1,255&t)},e.prototype.putInt32=function(e,t){this.putInt8(e,t>>24),this.putUInt8(e+1,t>>16&255),this.putUInt8(e+2,t>>8&255),this.putUInt8(e+3,255&t)},e.prototype.putUInt32=function(e,t){this.putUInt8(e,t>>24&255),this.putUInt8(e+1,t>>16&255),this.putUInt8(e+2,t>>8&255),this.putUInt8(e+3,255&t)},e.prototype.putInt64=function(e,t){this.putInt8(e,t>>48),this.putUInt8(e+1,t>>42&255),this.putUInt8(e+2,t>>36&255),this.putUInt8(e+3,t>>30&255),this.putUInt8(e+4,t>>24&255),this.putUInt8(e+5,t>>16&255),this.putUInt8(e+6,t>>8&255),this.putUInt8(e+7,255&t)},e.prototype.putBytes=function(e,t){for(var r=0,n=t.remaining();r<n;r++)this.putUInt8(e+r,t.readUInt8())},e.prototype.readUInt8=function(){return this.getUInt8(this._updatePos(1))},e.prototype.readInt8=function(){return this.getInt8(this._updatePos(1))},e.prototype.readUInt16=function(){return this.getUInt16(this._updatePos(2))},e.prototype.readUInt32=function(){return this.getUInt32(this._updatePos(4))},e.prototype.readInt16=function(){return this.getInt16(this._updatePos(2))},e.prototype.readInt32=function(){return this.getInt32(this._updatePos(4))},e.prototype.readInt64=function(){return this.getInt32(this._updatePos(8))},e.prototype.readFloat64=function(){return this.getFloat64(this._updatePos(8))},e.prototype.writeUInt8=function(e){this.putUInt8(this._updatePos(1),e)},e.prototype.writeInt8=function(e){this.putInt8(this._updatePos(1),e)},e.prototype.writeInt16=function(e){this.putInt16(this._updatePos(2),e)},e.prototype.writeInt32=function(e){this.putInt32(this._updatePos(4),e)},e.prototype.writeUInt32=function(e){this.putUInt32(this._updatePos(4),e)},e.prototype.writeInt64=function(e){this.putInt64(this._updatePos(8),e)},e.prototype.writeFloat64=function(e){this.putFloat64(this._updatePos(8),e)},e.prototype.writeBytes=function(e){this.putBytes(this._updatePos(e.remaining()),e)},e.prototype.readSlice=function(e){return this.getSlice(this._updatePos(e),e)},e.prototype._updatePos=function(e){var t=this.position;return this.position+=e,t},e.prototype.remaining=function(){return this.length-this.position},e.prototype.hasRemaining=function(){return this.remaining()>0},e.prototype.reset=function(){this.position=0},e.prototype.toString=function(){return this.constructor.name+"( position="+this.position+" )\n "+this.toHex()},e.prototype.toHex=function(){for(var e="",t=0;t<this.length;t++){var r=this.getUInt8(t).toString(16);1===r.length&&(r="0"+r),e+=r,t!==this.length-1&&(e+=" ")}return e},e}();t.default=o;var i=function(e){function t(t,r,n){var o=e.call(this,r)||this;return o._start=t,o._inner=n,o}return n(t,e),t.prototype.putUInt8=function(e,t){this._inner.putUInt8(this._start+e,t)},t.prototype.getUInt8=function(e){return this._inner.getUInt8(this._start+e)},t.prototype.putInt8=function(e,t){this._inner.putInt8(this._start+e,t)},t.prototype.putFloat64=function(e,t){this._inner.putFloat64(this._start+e,t)},t.prototype.getInt8=function(e){return this._inner.getInt8(this._start+e)},t.prototype.getFloat64=function(e){return this._inner.getFloat64(this._start+e)},t}(o)},7174:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseBuffer=void 0;var o=n(r(45));t.BaseBuffer=o.default,t.default=o.default},6245:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(5319)),i=r(9305),a=i.internal.util,u=a.ENCRYPTION_OFF,s=a.ENCRYPTION_ON,c=function(){function e(e,t,r){void 0===t&&(t=l),void 0===r&&(r=function(e){return new WebSocket(e)});var n=this;this._open=!0,this._pending=[],this._error=null,this._handleConnectionError=this._handleConnectionError.bind(this),this._config=e,this._receiveTimeout=null,this._receiveTimeoutStarted=!1,this._receiveTimeoutId=null,this._closingPromise=null;var a=function(e,t){var r=function(e){return!0===e.encrypted||e.encrypted===s}(e),n=function(e){return!1===e.encrypted||e.encrypted===u}(e),o=e.trust,a=function(e){var t="function"==typeof e?e():"";return t&&t.toLowerCase().indexOf("https")>=0}(t);return function(e,t,r){null===r||(e&&!r?console.warn("Neo4j driver is configured to use secure WebSocket on a HTTP web page. WebSockets might not work in a mixed content environment. Please consider configuring driver to not use encryption."):t&&r&&console.warn("Neo4j driver is configured to use insecure WebSocket on a HTTPS web page. WebSockets might not work in a mixed content environment. Please consider configuring driver to use encryption."))}(r,n,a),n?{scheme:"ws",error:null}:a?{scheme:"wss",error:null}:r?o&&"TRUST_SYSTEM_CA_SIGNED_CERTIFICATES"!==o?{scheme:null,error:(0,i.newError)("The browser version of this driver only supports one trust strategy, 'TRUST_SYSTEM_CA_SIGNED_CERTIFICATES'. "+o+' is not supported. Please either use TRUST_SYSTEM_CA_SIGNED_CERTIFICATES or disable encryption by setting `encrypted:"'+u+'"` in the driver configuration.')}:{scheme:"wss",error:null}:{scheme:"ws",error:null}}(e,t),c=a.scheme,f=a.error;if(f)this._error=f;else{this._ws=function(e,t,r){var n=e+"://"+t.asHostPort();try{return r(n)}catch(n){if(function(e,t){return"SyntaxError"===e.name&&("["===(r=t.asHostPort()).charAt(0)&&-1!==r.indexOf("]"));var r}(n,t)){var o=function(e,t){var r=t.host().replace(/:/g,"-").replace("%","s")+".ipv6-literal.net";return"".concat(e,"://").concat(r,":").concat(t.port())}(e,t);return r(o)}throw n}}(c,e.address,r),this._ws.binaryType="arraybuffer";var h=this;this._ws.onclose=function(e){e&&!e.wasClean&&h._handleConnectionError(),h._open=!1},this._ws.onopen=function(){h._clearConnectionTimeout();var e=h._pending;h._pending=null;for(var t=0;t<e.length;t++)h.write(e[t])},this._ws.onmessage=function(e){if(n._resetTimeout(),h.onmessage){var t=new o.default(e.data);h.onmessage(t)}},this._ws.onerror=this._handleConnectionError,this._connectionTimeoutFired=!1,this._connectionTimeoutId=this._setupConnectionTimeout()}}return e.prototype._handleConnectionError=function(){if(this._connectionTimeoutFired)return this._error=(0,i.newError)("Failed to establish connection in ".concat(this._config.connectionTimeout,"ms"),this._config.connectionErrorCode),void(this.onerror&&this.onerror(this._error));this._open&&!this._timedout&&(this._error=(0,i.newError)("WebSocket connection failure. Due to security constraints in your web browser, the reason for the failure is not available to this Neo4j Driver. Please use your browsers development console to determine the root cause of the failure. Common reasons include the database being unavailable, using the wrong connection URL or temporary network problems. If you have enabled encryption, ensure your browser is configured to trust the certificate Neo4j is configured to use. WebSocket `readyState` is: "+this._ws.readyState,this._config.connectionErrorCode),this.onerror&&this.onerror(this._error))},e.prototype.write=function(e){if(null!==this._pending)this._pending.push(e);else{if(!(e instanceof o.default))throw(0,i.newError)("Don't know how to send buffer: "+e);try{this._ws.send(e._buffer)}catch(e){if(1===this._ws.readyState)throw e;this._handleConnectionError()}}},e.prototype.close=function(){var e=this;return null===this._closingPromise&&(this._closingPromise=new Promise((function(t,r){e._clearConnectionTimeout(),e._ws&&3!==e._ws.readyState?(e._open=!1,e.stopReceiveTimeout(),e._ws.onclose=function(){t()},e._ws.close()):t()}))),this._closingPromise},e.prototype.setupReceiveTimeout=function(e){this._receiveTimeout=e},e.prototype.stopReceiveTimeout=function(){null!==this._receiveTimeout&&this._receiveTimeoutStarted&&(this._receiveTimeoutStarted=!1,null!=this._receiveTimeoutId&&clearTimeout(this._receiveTimeoutId),this._receiveTimeoutId=null)},e.prototype.startReceiveTimeout=function(){this._open&&null!==this._receiveTimeout&&!this._receiveTimeoutStarted&&(this._receiveTimeoutStarted=!0,this._resetTimeout())},e.prototype._resetTimeout=function(){var e=this;this._receiveTimeoutStarted&&(null!==this._receiveTimeoutId&&clearTimeout(this._receiveTimeoutId),this._receiveTimeoutId=setTimeout((function(){e._receiveTimeoutId=null,e._timedout=!0,e.stopReceiveTimeout(),e._error=(0,i.newError)("Connection lost. Server didn't respond in ".concat(e._receiveTimeout,"ms"),e._config.connectionErrorCode),e.close(),e.onerror&&e.onerror(e._error)}),this._receiveTimeout))},e.prototype._setupConnectionTimeout=function(){var e=this,t=this._config.connectionTimeout;if(t){var r=this._ws;return setTimeout((function(){1!==r.readyState&&(e._connectionTimeoutFired=!0,r.close())}),t)}return null},e.prototype._clearConnectionTimeout=function(){var e=this._connectionTimeoutId;(e||0===e)&&(this._connectionTimeoutFired=!1,this._connectionTimeoutId=null,clearTimeout(e))},e}();function l(){return"undefined"!=typeof window&&window.location?window.location.protocol:null}t.default=c},614:function(e,t){var r=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{s(n.next(e))}catch(e){i(e)}}function u(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,u)}s((n=n.apply(e,t||[])).next())}))},n=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(s){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,n=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.default={load:function(e){return r(this,void 0,void 0,(function(){return n(this,(function(t){return[2,e]}))}))}}},2199:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.resolve=function(e){return this._resolveToItself(e)},t}(r(9305).internal.resolver.BaseHostNameResolver);t.default=i},3951:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ClientCertificatesLoader=t.HostNameResolver=t.Channel=void 0;var o=n(r(6245)),i=n(r(2199)),a=n(r(614));t.Channel=o.default,t.HostNameResolver=i.default,t.ClientCertificatesLoader=a.default},5319:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.alloc=void 0;var a=i(r(1048)),u=function(e){function t(t){var r=this,n=function(e){return e instanceof a.default.Buffer?e:"number"==typeof e&&"function"==typeof a.default.Buffer.alloc?a.default.Buffer.alloc(e):new a.default.Buffer(e)}(t);return(r=e.call(this,n.length)||this)._buffer=n,r}return o(t,e),t.prototype.getUInt8=function(e){return this._buffer.readUInt8(e)},t.prototype.getInt8=function(e){return this._buffer.readInt8(e)},t.prototype.getFloat64=function(e){return this._buffer.readDoubleBE(e)},t.prototype.putUInt8=function(e,t){this._buffer.writeUInt8(t,e)},t.prototype.putInt8=function(e,t){this._buffer.writeInt8(t,e)},t.prototype.putFloat64=function(e,t){this._buffer.writeDoubleBE(t,e)},t.prototype.putBytes=function(r,n){if(n instanceof t){var o=Math.min(n.length-n.position,this.length-r);n._buffer.copy(this._buffer,r,n.position,n.position+o),n.position+=o}else e.prototype.putBytes.call(this,r,n)},t.prototype.getSlice=function(e,r){return new t(this._buffer.slice(e,e+r))},t}(i(r(7174)).default);t.default=u,t.alloc=function(e){return new u(e)}},2481:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=r(9305),o=n.internal.util,i=o.ENCRYPTION_OFF,a=o.ENCRYPTION_ON,u=n.error.SERVICE_UNAVAILABLE,s=[null,void 0,!0,!1,a,i],c=[null,void 0,"TRUST_ALL_CERTIFICATES","TRUST_CUSTOM_CA_SIGNED_CERTIFICATES","TRUST_SYSTEM_CA_SIGNED_CERTIFICATES"];t.default=function(e,t,r,o){this.address=e,this.encrypted=function(e){var t=e.encrypted;if(-1===s.indexOf(t))throw(0,n.newError)("Illegal value of the encrypted setting ".concat(t,". Expected one of ").concat(s));return t}(t),this.trust=function(e){var t=e.trust;if(-1===c.indexOf(t))throw(0,n.newError)("Illegal value of the trust setting ".concat(t,". Expected one of ").concat(c));return t}(t),this.trustedCertificates=function(e){return e.trustedCertificates||[]}(t),this.knownHostsPath=function(e){return e.knownHosts||null}(t),this.connectionErrorCode=r||u,this.connectionTimeout=t.connectionTimeout,this.clientCertificate=o}},373:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Dechunker=t.Chunker=void 0;var a=i(r(45)),u=r(5319),s=i(r(5553)),c=function(e){function t(t,r){var n=e.call(this,0)||this;return n._bufferSize=r||1400,n._ch=t,n._buffer=(0,u.alloc)(n._bufferSize),n._currentChunkStart=0,n._chunkOpen=!1,n}return o(t,e),t.prototype.putUInt8=function(e,t){this._ensure(1),this._buffer.writeUInt8(t)},t.prototype.putInt8=function(e,t){this._ensure(1),this._buffer.writeInt8(t)},t.prototype.putFloat64=function(e,t){this._ensure(8),this._buffer.writeFloat64(t)},t.prototype.putBytes=function(e,t){for(;t.remaining()>0;)this._ensure(1),this._buffer.remaining()>t.remaining()?this._buffer.writeBytes(t):this._buffer.writeBytes(t.readSlice(this._buffer.remaining()));return this},t.prototype.flush=function(){if(this._buffer.position>0){this._closeChunkIfOpen();var e=this._buffer;this._buffer=null,this._ch.write(e.getSlice(0,e.position)),this._buffer=(0,u.alloc)(this._bufferSize),this._chunkOpen=!1}return this},t.prototype.messageBoundary=function(){this._closeChunkIfOpen(),this._buffer.remaining()<2&&this.flush(),this._buffer.writeInt16(0)},t.prototype._ensure=function(e){var t=this._chunkOpen?e:e+2;this._buffer.remaining()<t&&this.flush(),this._chunkOpen||(this._currentChunkStart=this._buffer.position,this._buffer.position=this._buffer.position+2,this._chunkOpen=!0)},t.prototype._closeChunkIfOpen=function(){if(this._chunkOpen){var e=this._buffer.position-(this._currentChunkStart+2);this._buffer.putUInt16(this._currentChunkStart,e),this._chunkOpen=!1}},t}(a.default);t.Chunker=c;var l=function(){function e(){this._currentMessage=[],this._partialChunkHeader=0,this._state=this.AWAITING_CHUNK}return e.prototype.AWAITING_CHUNK=function(e){return e.remaining()>=2?this._onHeader(e.readUInt16()):(this._partialChunkHeader=e.readUInt8()<<8,this.IN_HEADER)},e.prototype.IN_HEADER=function(e){return this._onHeader(65535&(this._partialChunkHeader|e.readUInt8()))},e.prototype.IN_CHUNK=function(e){return this._chunkSize<=e.remaining()?(this._currentMessage.push(e.readSlice(this._chunkSize)),this.AWAITING_CHUNK):(this._chunkSize-=e.remaining(),this._currentMessage.push(e.readSlice(e.remaining())),this.IN_CHUNK)},e.prototype.CLOSED=function(e){},e.prototype._onHeader=function(e){if(0===e){var t=void 0;switch(this._currentMessage.length){case 0:return this.AWAITING_CHUNK;case 1:t=this._currentMessage[0];break;default:t=new s.default(this._currentMessage)}return this._currentMessage=[],this.onmessage(t),this.AWAITING_CHUNK}return this._chunkSize=e,this.IN_CHUNK},e.prototype.write=function(e){for(;e.hasRemaining();)this._state=this._state(e)},e}();t.Dechunker=l},5553:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(7174),a=r(5319),u=function(e){function t(t){for(var r=this,n=0,o=0;o<t.length;o++)n+=t[o].length;return(r=e.call(this,n)||this)._buffers=t,r}return o(t,e),t.prototype.getUInt8=function(e){for(var t=0;t<this._buffers.length;t++){var r=this._buffers[t];if(!(e>=r.length))return r.getUInt8(e);e-=r.length}},t.prototype.getInt8=function(e){for(var t=0;t<this._buffers.length;t++){var r=this._buffers[t];if(!(e>=r.length))return r.getInt8(e);e-=r.length}},t.prototype.getFloat64=function(e){for(var t=(0,a.alloc)(8),r=0;r<8;r++)t.putUInt8(r,this.getUInt8(e+r));return t.getFloat64(0)},t}(i.BaseBuffer);t.default=u},7452:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.utf8=t.alloc=t.ChannelConfig=void 0,o(r(3951),t),o(r(373),t);var a=r(2481);Object.defineProperty(t,"ChannelConfig",{enumerable:!0,get:function(){return i(a).default}});var u=r(5319);Object.defineProperty(t,"alloc",{enumerable:!0,get:function(){return u.alloc}});var s=r(3473);Object.defineProperty(t,"utf8",{enumerable:!0,get:function(){return i(s).default}})},3473:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(5319)),i=r(9305),a=n(r(1048)),u=new(r(8888).StringDecoder)("utf8");t.default={encode:function(e){return new o.default(function(e){return"function"==typeof a.default.Buffer.from?a.default.Buffer.from(e,"utf8"):new a.default.Buffer(e,"utf8")}(e))},decode:function(e,t){if(Object.prototype.hasOwnProperty.call(e,"_buffer"))return function(e,t){var r=e.position,n=r+t;return e.position=Math.min(n,e.length),e._buffer.toString("utf8",r,n)}(e,t);if(Object.prototype.hasOwnProperty.call(e,"_buffers"))return function(e,t){return function(e,t,r,n){var o=t,i=e.position;return e._updatePos(Math.min(t,e.length-i)),e._buffers.reduce((function(e,t){if(o<=0)return e;if(i>=t.length)return i-=t.length,"";t._updatePos(i-t.position);var r=Math.min(t.length-i,o),n=t.readSlice(r);return t._updatePos(r),o=Math.max(o-n.length,0),i=0,e+function(e){return u.write(e._buffer)}(n)}),"")+u.end()}(e,t)}(e,t);throw(0,i.newError)("Don't know how to decode strings from '".concat(e,"'"))}}},1839:function(e,t,r){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{s(n.next(e))}catch(e){i(e)}}function u(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,u)}s((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(s){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,n=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(9305),a=r(6781),u=function(){function e(e){var t=e.authTokenManager,r=e.userAgent,n=e.boltAgent;this._authTokenManager=t||(0,i.staticAuthTokenManager)({}),this._userAgent=r,this._boltAgent=n}return e.prototype.authenticate=function(e){var t=e.connection,r=e.auth,i=e.skipReAuth,u=e.waitReAuth,s=e.forceReAuth;return n(this,void 0,void 0,(function(){var e,n;return o(this,(function(o){switch(o.label){case 0:return null==r?[3,3]:(e=!0===t.supportsReAuth&&(!a.object.equals(t.authToken,r)&&!0!==i||!0===s),null==t.authToken||e?[4,t.connect(this._userAgent,this._boltAgent,r,u||!1)]:[3,2]);case 1:case 5:return[2,o.sent()];case 2:case 6:return[2,t];case 3:return[4,this._authTokenManager.getToken()];case 4:return n=o.sent(),a.object.equals(n,t.authToken)?[3,6]:[4,t.connect(this._userAgent,this._boltAgent,n,!1)]}}))}))},e.prototype.handleError=function(e){var t=e.connection,r=e.code;return!(!t||!r.startsWith("Neo.ClientError.Security."))&&this._authTokenManager.handleSecurityException(t.authToken,r)},e}();t.default=u},4271:function(e,t,r){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{s(n.next(e))}catch(e){i(e)}}function u(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,u)}s((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(s){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,n=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(7452),a=function(){function e(e){var t=e.clientCertificateProvider,r=e.loader;this._clientCertificateProvider=t,this._loader=r||i.ClientCertificatesLoader,this._clientCertificate=null}return e.prototype.getClientCertificate=function(){return n(this,void 0,void 0,(function(){var e,t,r=this;return o(this,(function(n){switch(n.label){case 0:return(e=null!=this._clientCertificateProvider)?(t=null==this._clientCertificate)?[3,2]:[4,this._clientCertificateProvider.hasUpdate()]:[3,3];case 1:t=n.sent(),n.label=2;case 2:e=t,n.label=3;case 3:return e&&(this._clientCertificate=Promise.resolve(this._clientCertificateProvider.getClientCertificate()).then(this._loader.load).then((function(e){return r._clientCertificate=e,r._clientCertificate})).catch((function(e){throw r._clientCertificate=null,e}))),[2,this._clientCertificate]}}))}))},e}();t.default=a},3545:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{s(n.next(e))}catch(e){i(e)}}function u(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,u)}s((n=n.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(s){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,n=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=u(r(8987)),c=r(7721),l=r(9305),f=l.internal.constants,h=f.BOLT_PROTOCOL_V3,d=f.BOLT_PROTOCOL_V4_0,p=f.BOLT_PROTOCOL_V4_4,v=f.BOLT_PROTOCOL_V5_1,y=l.error.SERVICE_UNAVAILABLE,b=function(e){function t(t){var r=t.id,n=t.config,o=t.log,i=t.address,a=t.userAgent,u=t.boltAgent,s=t.authTokenManager,c=t.newPool,l=e.call(this,{id:r,config:n,log:o,userAgent:a,boltAgent:u,authTokenManager:s,newPool:c})||this;return l._address=i,l}return o(t,e),t.prototype.acquireConnection=function(e){var t=void 0===e?{}:e,r=(t.accessMode,t.database),n=(t.bookmarks,t.auth),o=t.forceReAuth;return i(this,void 0,void 0,(function(){var e,t,i=this;return a(this,(function(a){switch(a.label){case 0:return e=c.ConnectionErrorHandler.create({errorCode:y,handleSecurityError:function(e,t,n){return i._handleSecurityError(e,t,n,r)}}),[4,this._connectionPool.acquire({auth:n,forceReAuth:o},this._address)];case 1:return t=a.sent(),n?[4,this._verifyStickyConnection({auth:n,connection:t,address:this._address})]:[3,3];case 2:return a.sent(),[2,t];case 3:return[2,new c.DelegateConnection(t,e)]}}))}))},t.prototype._handleSecurityError=function(t,r,n,o){return this._log.warn("Direct driver ".concat(this._id," will close connection to ").concat(r," for database '").concat(o,"' because of an error ").concat(t.code," '").concat(t.message,"'")),e.prototype._handleSecurityError.call(this,t,r,n)},t.prototype._hasProtocolVersion=function(e){return i(this,void 0,void 0,(function(){var t,r;return a(this,(function(n){switch(n.label){case 0:return[4,this._createChannelConnection(this._address)];case 1:return t=n.sent(),r=t.protocol()?t.protocol().version:null,[4,t.close()];case 2:return n.sent(),r?[2,e(r)]:[2,!1]}}))}))},t.prototype.supportsMultiDb=function(){return i(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion((function(e){return e>=d}))];case 1:return[2,e.sent()]}}))}))},t.prototype.getNegotiatedProtocolVersion=function(){var e=this;return new Promise((function(t,r){e._hasProtocolVersion(t).catch(r)}))},t.prototype.supportsTransactionConfig=function(){return i(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion((function(e){return e>=h}))];case 1:return[2,e.sent()]}}))}))},t.prototype.supportsUserImpersonation=function(){return i(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion((function(e){return e>=p}))];case 1:return[2,e.sent()]}}))}))},t.prototype.supportsSessionAuth=function(){return i(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion((function(e){return e>=v}))];case 1:return[2,e.sent()]}}))}))},t.prototype.verifyAuthentication=function(e){var t=e.auth;return i(this,void 0,void 0,(function(){var e=this;return a(this,(function(r){return[2,this._verifyAuthentication({auth:t,getAddress:function(){return e._address}})]}))}))},t.prototype.verifyConnectivityAndGetServerInfo=function(){return i(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,this._verifyConnectivityAndGetServerVersion({address:this._address})];case 1:return[2,e.sent()]}}))}))},t}(s.default);t.default=b},8987:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{s(n.next(e))}catch(e){i(e)}}function u(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,u)}s((n=n.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(s){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,n=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}},u=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},s=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=r(7721),f=r(9305),h=c(r(1839)),d=r(6781),p=c(r(4531)),v=c(r(4271)),y=f.error.SERVICE_UNAVAILABLE,b=["Neo.ClientError.Security.CredentialsExpired","Neo.ClientError.Security.Forbidden","Neo.ClientError.Security.TokenExpired","Neo.ClientError.Security.Unauthorized"],m=f.internal.pool,g=m.Pool,_=m.PoolConfig,w=function(e){function t(r,n){var o=r.id,c=r.config,f=r.log,d=r.userAgent,y=r.boltAgent,b=r.authTokenManager,m=r.newPool,w=void 0===m?function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new(g.bind.apply(g,s([void 0],u(e),!1)))}:m;void 0===n&&(n=null);var O=e.call(this)||this;return O._id=o,O._config=c,O._log=f,O._clientCertificateHolder=new v.default({clientCertificateProvider:O._config.clientCertificate}),O._authenticationProvider=new h.default({authTokenManager:b,userAgent:d,boltAgent:y}),O._livenessCheckProvider=new p.default({connectionLivenessCheckTimeout:c.connectionLivenessCheckTimeout}),O._userAgent=d,O._boltAgent=y,O._createChannelConnection=n||function(e){return i(O,void 0,void 0,(function(){var t,r;return a(this,(function(n){switch(n.label){case 0:return t=l.createChannelConnection,r=[e,this._config,this._createConnectionErrorHandler(),this._log],[4,this._clientCertificateHolder.getClientCertificate()];case 1:return[2,t.apply(void 0,r.concat([n.sent()]))]}}))}))},O._connectionPool=w({create:O._createConnection.bind(O),destroy:O._destroyConnection.bind(O),validateOnAcquire:O._validateConnectionOnAcquire.bind(O),validateOnRelease:O._validateConnectionOnRelease.bind(O),installIdleObserver:t._installIdleObserverOnConnection.bind(O),removeIdleObserver:t._removeIdleObserverOnConnection.bind(O),config:_.fromDriverConfig(c),log:O._log}),O._openConnections={},O}return o(t,e),t.prototype._createConnectionErrorHandler=function(){return new l.ConnectionErrorHandler(y)},t.prototype._getClientCertificate=function(){return i(this,void 0,void 0,(function(){return a(this,(function(e){return[2,this._config.clientCertificate.getClientCertificate()]}))}))},t.prototype._createConnection=function(e,t,r){var n=this,o=e.auth;return this._createChannelConnection(t).then((function(e){return e.release=function(){return e.idleTimestamp=Date.now(),r(t,e)},n._openConnections[e.id]=e,n._authenticationProvider.authenticate({connection:e,auth:o}).catch((function(t){throw n._destroyConnection(e),t}))}))},t.prototype._validateConnectionOnAcquire=function(e,t){var r=e.auth,n=e.skipReAuth;return i(this,void 0,void 0,(function(){var e,o;return a(this,(function(i){switch(i.label){case 0:if(!this._validateConnection(t))return[2,!1];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this._livenessCheckProvider.check(t)];case 2:return i.sent(),[3,4];case 3:return e=i.sent(),this._log.debug("The connection ".concat(t.id," is not alive because of an error ").concat(e.code," '").concat(e.message,"'")),[2,!1];case 4:return i.trys.push([4,6,,7]),[4,this._authenticationProvider.authenticate({connection:t,auth:r,skipReAuth:n})];case 5:return i.sent(),[2,!0];case 6:return o=i.sent(),this._log.debug("The connection ".concat(t.id," is not valid because of an error ").concat(o.code," '").concat(o.message,"'")),[2,!1];case 7:return[2]}}))}))},t.prototype._validateConnectionOnRelease=function(e){return!0!==e._sticky&&this._validateConnection(e)},t.prototype._validateConnection=function(e){if(!e.isOpen())return!1;var t=this._config.maxConnectionLifetime;return!(Date.now()-e.creationTimestamp>t)},t.prototype._destroyConnection=function(e){return delete this._openConnections[e.id],e.close()},t.prototype._verifyConnectivityAndGetServerVersion=function(e){var t=e.address;return i(this,void 0,void 0,(function(){var e,r;return a(this,(function(n){switch(n.label){case 0:return[4,this._connectionPool.acquire({},t)];case 1:e=n.sent(),r=new f.ServerInfo(e.server,e.protocol().version),n.label=2;case 2:return n.trys.push([2,,5,7]),e.protocol().isLastMessageLogon()?[3,4]:[4,e.resetAndFlush()];case 3:n.sent(),n.label=4;case 4:return[3,7];case 5:return[4,e.release()];case 6:return n.sent(),[7];case 7:return[2,r]}}))}))},t.prototype._verifyAuthentication=function(e){var t=e.getAddress,r=e.auth;return i(this,void 0,void 0,(function(){var e,n,o,i,u,s;return a(this,(function(a){switch(a.label){case 0:e=[],a.label=1;case 1:return a.trys.push([1,8,9,11]),[4,t()];case 2:return n=a.sent(),[4,this._connectionPool.acquire({auth:r,skipReAuth:!0},n)];case 3:if(o=a.sent(),e.push(o),i=!o.protocol().isLastMessageLogon(),!o.supportsReAuth)throw(0,f.newError)("Driver is connected to a database that does not support user switch.");return i&&o.supportsReAuth?[4,this._authenticationProvider.authenticate({connection:o,auth:r,waitReAuth:!0,forceReAuth:!0})]:[3,5];case 4:return a.sent(),[3,7];case 5:return!i||o.supportsReAuth?[3,7]:[4,this._connectionPool.acquire({auth:r},n,{requireNew:!0})];case 6:(u=a.sent())._sticky=!0,e.push(u),a.label=7;case 7:return[2,!0];case 8:if(s=a.sent(),b.includes(s.code))return[2,!1];throw s;case 9:return[4,Promise.all(e.map((function(e){return e.release()})))];case 10:return a.sent(),[7];case 11:return[2]}}))}))},t.prototype._verifyStickyConnection=function(e){var t=e.auth,r=e.connection;return e.address,i(this,void 0,void 0,(function(){var e,n;return a(this,(function(o){switch(o.label){case 0:return e=d.object.equals(t,r.authToken),n=!e,r._sticky=e&&!r.supportsReAuth,n||r._sticky?[4,r.release()]:[3,2];case 1:throw o.sent(),(0,f.newError)("Driver is connected to a database that does not support user switch.");case 2:return[2]}}))}))},t.prototype.close=function(){return i(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,this._connectionPool.close()];case 1:return e.sent(),[4,Promise.all(Object.values(this._openConnections).map((function(e){return e.close()})))];case 2:return e.sent(),[2]}}))}))},t._installIdleObserverOnConnection=function(e,t){e._setIdle(t)},t._removeIdleObserverOnConnection=function(e){e._unsetIdle()},t.prototype._handleSecurityError=function(e,t,r){return this._authenticationProvider.handleError({connection:r,code:e.code})&&(e.retriable=!0),"Neo.ClientError.Security.AuthorizationExpired"===e.code&&this._connectionPool.apply(t,(function(e){e.authToken=null})),r&&r.close().catch((function(){})),e},t}(f.ConnectionProvider);t.default=w},7428:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),u=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&a(t,e,r);return u(t,e),t},c=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{s(n.next(e))}catch(e){i(e)}}function u(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,u)}s((n=n.apply(e,t||[])).next())}))},l=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(s){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,n=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}},f=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},h=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},d=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var p=r(9305),v=s(r(206)),y=r(7452),b=d(r(4132)),m=d(r(8987)),g=r(4455),_=r(7721),w=r(6781),O=p.error.SERVICE_UNAVAILABLE,S=p.error.SESSION_EXPIRED,E=p.internal.bookmarks.Bookmarks,P=p.internal.constants,x=P.ACCESS_MODE_READ,T=P.ACCESS_MODE_WRITE,j=P.BOLT_PROTOCOL_V3,C=P.BOLT_PROTOCOL_V4_0,A=P.BOLT_PROTOCOL_V4_4,k=P.BOLT_PROTOCOL_V5_1,R="Neo.ClientError.Database.DatabaseNotFound",I="Neo.ClientError.Transaction.InvalidBookmark",M="Neo.ClientError.Transaction.InvalidBookmarkMixture",N="Neo.ClientError.Security.AuthorizationExpired",D="Neo.ClientError.Statement.ArgumentError",L="Neo.ClientError.Request.Invalid",U="Neo.ClientError.Statement.TypeError",F="N/A",B=null,z=(0,p.int)(3e4),V=function(e){function t(t){var r=t.id,n=t.address,o=t.routingContext,a=t.hostNameResolver,u=t.config,s=t.log,f=t.userAgent,h=t.boltAgent,d=t.authTokenManager,b=t.routingTablePurgeDelay,m=t.newPool,O=e.call(this,{id:r,config:u,log:s,userAgent:f,boltAgent:h,authTokenManager:d,newPool:m},(function(e){return c(O,void 0,void 0,(function(){var t,r;return l(this,(function(n){switch(n.label){case 0:return t=_.createChannelConnection,r=[e,this._config,this._createConnectionErrorHandler(),this._log],[4,this._clientCertificateHolder.getClientCertificate()];case 1:return[2,t.apply(void 0,r.concat([n.sent(),this._routingContext]))]}}))}))}))||this;return O._routingContext=i(i({},o),{address:n.toString()}),O._seedRouter=n,O._rediscovery=new v.default(O._routingContext),O._loadBalancingStrategy=new g.LeastConnectedLoadBalancingStrategy(O._connectionPool),O._hostNameResolver=a,O._dnsResolver=new y.HostNameResolver,O._log=s,O._useSeedRouter=!0,O._routingTableRegistry=new W(b?(0,p.int)(b):z),O._refreshRoutingTable=w.functional.reuseOngoingRequest(O._refreshRoutingTable,O),O}return o(t,e),t.prototype._createConnectionErrorHandler=function(){return new _.ConnectionErrorHandler(S)},t.prototype._handleUnavailability=function(e,t,r){return this._log.warn("Routing driver ".concat(this._id," will forget ").concat(t," for database '").concat(r,"' because of an error ").concat(e.code," '").concat(e.message,"'")),this.forget(t,r||B),e},t.prototype._handleSecurityError=function(t,r,n,o){return this._log.warn("Routing driver ".concat(this._id," will close connections to ").concat(r," for database '").concat(o,"' because of an error ").concat(t.code," '").concat(t.message,"'")),e.prototype._handleSecurityError.call(this,t,r,n,o)},t.prototype._handleWriteFailure=function(e,t,r){return this._log.warn("Routing driver ".concat(this._id," will forget writer ").concat(t," for database '").concat(r,"' because of an error ").concat(e.code," '").concat(e.message,"'")),this.forgetWriter(t,r||B),(0,p.newError)("No longer possible to write to server at "+t,S,e)},t.prototype.acquireConnection=function(e){var t=void 0===e?{}:e,r=t.accessMode,n=t.database,o=t.bookmarks,i=t.impersonatedUser,a=t.onDatabaseNameResolved,u=t.auth;return c(this,void 0,void 0,(function(){var e,t,s,c,f,h,d,v=this;return l(this,(function(l){switch(l.label){case 0:return s={database:n||B},c=new _.ConnectionErrorHandler(S,(function(e,t){return v._handleUnavailability(e,t,s.database)}),(function(e,t){return v._handleWriteFailure(e,t,s.database)}),(function(e,t,r){return v._handleSecurityError(e,t,r,s.database)})),[4,this._freshRoutingTable({accessMode:r,database:s.database,bookmarks:o,impersonatedUser:i,auth:u,onDatabaseNameResolved:function(e){s.database=s.database||e,a&&a(e)}})];case 1:if(f=l.sent(),r===x)t=this._loadBalancingStrategy.selectReader(f.readers),e="read";else{if(r!==T)throw(0,p.newError)("Illegal mode "+r);t=this._loadBalancingStrategy.selectWriter(f.writers),e="write"}if(!t)throw(0,p.newError)("Failed to obtain connection towards ".concat(e," server. Known routing table is: ").concat(f),S);l.label=2;case 2:return l.trys.push([2,6,,7]),[4,this._connectionPool.acquire({auth:u},t)];case 3:return h=l.sent(),u?[4,this._verifyStickyConnection({auth:u,connection:h,address:t})]:[3,5];case 4:return l.sent(),[2,h];case 5:return[2,new _.DelegateConnection(h,c)];case 6:throw d=l.sent(),c.handleAndTransformError(d,t);case 7:return[2]}}))}))},t.prototype._hasProtocolVersion=function(e){return c(this,void 0,void 0,(function(){var t,r,n,o,i,a;return l(this,(function(u){switch(u.label){case 0:return[4,this._resolveSeedRouter(this._seedRouter)];case 1:t=u.sent(),n=0,u.label=2;case 2:if(!(n<t.length))return[3,8];u.label=3;case 3:return u.trys.push([3,6,,7]),[4,this._createChannelConnection(t[n])];case 4:return o=u.sent(),i=o.protocol()?o.protocol().version:null,[4,o.close()];case 5:return u.sent(),i?[2,e(i)]:[2,!1];case 6:return a=u.sent(),r=a,[3,7];case 7:return n++,[3,2];case 8:if(r)throw r;return[2,!1]}}))}))},t.prototype.supportsMultiDb=function(){return c(this,void 0,void 0,(function(){return l(this,(function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion((function(e){return e>=C}))];case 1:return[2,e.sent()]}}))}))},t.prototype.supportsTransactionConfig=function(){return c(this,void 0,void 0,(function(){return l(this,(function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion((function(e){return e>=j}))];case 1:return[2,e.sent()]}}))}))},t.prototype.supportsUserImpersonation=function(){return c(this,void 0,void 0,(function(){return l(this,(function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion((function(e){return e>=A}))];case 1:return[2,e.sent()]}}))}))},t.prototype.supportsSessionAuth=function(){return c(this,void 0,void 0,(function(){return l(this,(function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion((function(e){return e>=k}))];case 1:return[2,e.sent()]}}))}))},t.prototype.getNegotiatedProtocolVersion=function(){var e=this;return new Promise((function(t,r){e._hasProtocolVersion(t).catch(r)}))},t.prototype.verifyAuthentication=function(e){var t=e.database,r=e.accessMode,n=e.auth;return c(this,void 0,void 0,(function(){var e=this;return l(this,(function(o){return[2,this._verifyAuthentication({auth:n,getAddress:function(){return c(e,void 0,void 0,(function(){var e,o,i;return l(this,(function(a){switch(a.label){case 0:return e={database:t||B},[4,this._freshRoutingTable({accessMode:r,database:e.database,auth:n,onDatabaseNameResolved:function(t){e.database=e.database||t}})];case 1:if(o=a.sent(),0===(i=r===T?o.writers:o.readers).length)throw(0,p.newError)("No servers available for database '".concat(e.database,"' with access mode '").concat(r,"'"),O);return[2,i[0]]}}))}))}})]}))}))},t.prototype.verifyConnectivityAndGetServerInfo=function(e){var t=e.database,r=e.accessMode;return c(this,void 0,void 0,(function(){var e,n,o,i,a,u,s,c,h,d,v;return l(this,(function(l){switch(l.label){case 0:return e={database:t||B},[4,this._freshRoutingTable({accessMode:r,database:e.database,onDatabaseNameResolved:function(t){e.database=e.database||t}})];case 1:n=l.sent(),o=r===T?n.writers:n.readers,i=(0,p.newError)("No servers available for database '".concat(e.database,"' with access mode '").concat(r,"'"),O),l.label=2;case 2:l.trys.push([2,9,10,11]),a=f(o),u=a.next(),l.label=3;case 3:if(u.done)return[3,8];s=u.value,l.label=4;case 4:return l.trys.push([4,6,,7]),[4,this._verifyConnectivityAndGetServerVersion({address:s})];case 5:return[2,l.sent()];case 6:return c=l.sent(),i=c,[3,7];case 7:return u=a.next(),[3,3];case 8:return[3,11];case 9:return h=l.sent(),d={error:h},[3,11];case 10:try{u&&!u.done&&(v=a.return)&&v.call(a)}finally{if(d)throw d.error}return[7];case 11:throw i}}))}))},t.prototype.forget=function(e,t){this._routingTableRegistry.apply(t,{applyWhenExists:function(t){return t.forget(e)}}),this._connectionPool.purge(e).catch((function(){}))},t.prototype.forgetWriter=function(e,t){this._routingTableRegistry.apply(t,{applyWhenExists:function(t){return t.forgetWriter(e)}})},t.prototype._freshRoutingTable=function(e){var t=void 0===e?{}:e,r=t.accessMode,n=t.database,o=t.bookmarks,i=t.impersonatedUser,a=t.onDatabaseNameResolved,u=t.auth,s=this._routingTableRegistry.get(n,(function(){return new v.RoutingTable({database:n})}));return s.isStaleFor(r)?(this._log.info('Routing table is stale for database: "'.concat(n,'" and access mode: "').concat(r,'": ').concat(s)),this._refreshRoutingTable(s,o,i,u).then((function(e){return a(e.database),e}))):s},t.prototype._refreshRoutingTable=function(e,t,r,n){var o=e.routers;return this._useSeedRouter?this._fetchRoutingTableFromSeedRouterFallbackToKnownRouters(o,e,t,r,n):this._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter(o,e,t,r,n)},t.prototype._fetchRoutingTableFromSeedRouterFallbackToKnownRouters=function(e,t,r,n,o){return c(this,void 0,void 0,(function(){var i,a,u,s,c,f,d;return l(this,(function(l){switch(l.label){case 0:return i=[],[4,this._fetchRoutingTableUsingSeedRouter(i,this._seedRouter,t,r,n,o)];case 1:return a=h.apply(void 0,[l.sent(),2]),u=a[0],s=a[1],u?(this._useSeedRouter=!1,[3,4]):[3,2];case 2:return[4,this._fetchRoutingTableUsingKnownRouters(e,t,r,n,o)];case 3:c=h.apply(void 0,[l.sent(),2]),f=c[0],d=c[1],u=f,s=d||s,l.label=4;case 4:return[4,this._applyRoutingTableIfPossible(t,u,s)];case 5:return[2,l.sent()]}}))}))},t.prototype._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter=function(e,t,r,n,o){return c(this,void 0,void 0,(function(){var i,a,u,s;return l(this,(function(c){switch(c.label){case 0:return[4,this._fetchRoutingTableUsingKnownRouters(e,t,r,n,o)];case 1:return i=h.apply(void 0,[c.sent(),2]),a=i[0],u=i[1],a?[3,3]:[4,this._fetchRoutingTableUsingSeedRouter(e,this._seedRouter,t,r,n,o)];case 2:s=h.apply(void 0,[c.sent(),2]),a=s[0],u=s[1],c.label=3;case 3:return[4,this._applyRoutingTableIfPossible(t,a,u)];case 4:return[2,c.sent()]}}))}))},t.prototype._fetchRoutingTableUsingKnownRouters=function(e,r,n,o,i){return c(this,void 0,void 0,(function(){var a,u,s,c;return l(this,(function(l){switch(l.label){case 0:return[4,this._fetchRoutingTable(e,r,n,o,i)];case 1:return a=h.apply(void 0,[l.sent(),2]),u=a[0],s=a[1],u?[2,[u,null]]:(c=e.length-1,t._forgetRouter(r,e,c),[2,[null,s]])}}))}))},t.prototype._fetchRoutingTableUsingSeedRouter=function(e,t,r,n,o,i){return c(this,void 0,void 0,(function(){var a,u;return l(this,(function(s){switch(s.label){case 0:return[4,this._resolveSeedRouter(t)];case 1:return a=s.sent(),u=a.filter((function(t){return e.indexOf(t)<0})),[4,this._fetchRoutingTable(u,r,n,o,i)];case 2:return[2,s.sent()]}}))}))},t.prototype._resolveSeedRouter=function(e){return c(this,void 0,void 0,(function(){var t,r,n=this;return l(this,(function(o){switch(o.label){case 0:return[4,this._hostNameResolver.resolve(e)];case 1:return t=o.sent(),[4,Promise.all(t.map((function(e){return n._dnsResolver.resolve(e)})))];case 2:return r=o.sent(),[2,[].concat.apply([],r)]}}))}))},t.prototype._fetchRoutingTable=function(e,r,n,o,i){return c(this,void 0,void 0,(function(){var a=this;return l(this,(function(u){return[2,e.reduce((function(u,s,f){return c(a,void 0,void 0,(function(){var a,c,d,p,v,y,b;return l(this,(function(l){switch(l.label){case 0:return[4,u];case 1:return a=h.apply(void 0,[l.sent(),1]),(c=a[0])?[2,[c,null]]:(d=f-1,t._forgetRouter(r,e,d),[4,this._createSessionForRediscovery(s,n,o,i)]);case 2:if(p=h.apply(void 0,[l.sent(),2]),v=p[0],y=p[1],!v)return[3,8];l.label=3;case 3:return l.trys.push([3,5,6,7]),[4,this._rediscovery.lookupRoutingTableOnRouter(v,r.database,s,o)];case 4:return[2,[l.sent(),null]];case 5:return b=l.sent(),[2,this._handleRediscoveryError(b,s)];case 6:return v.close(),[7];case 7:return[3,9];case 8:return[2,[null,y]];case 9:return[2]}}))}))}),Promise.resolve([null,null]))]}))}))},t.prototype._createSessionForRediscovery=function(e,t,r,n){return c(this,void 0,void 0,(function(){var o,i,a,u,s,c=this;return l(this,(function(l){switch(l.label){case 0:return l.trys.push([0,4,,5]),[4,this._connectionPool.acquire({auth:n},e)];case 1:return o=l.sent(),n?[4,this._verifyStickyConnection({auth:n,connection:o,address:e})]:[3,3];case 2:l.sent(),l.label=3;case 3:return i=_.ConnectionErrorHandler.create({errorCode:S,handleSecurityError:function(e,t,r){return c._handleSecurityError(e,t,r)}}),a=o._sticky?new _.DelegateConnection(o):new _.DelegateConnection(o,i),u=new b.default(a),o.protocol().version<4?[2,[new p.Session({mode:T,bookmarks:E.empty(),connectionProvider:u}),null]]:[2,[new p.Session({mode:x,database:"system",bookmarks:t,connectionProvider:u,impersonatedUser:r}),null]];case 4:return s=l.sent(),[2,this._handleRediscoveryError(s,e)];case 5:return[2]}}))}))},t.prototype._handleRediscoveryError=function(e,t){if(function(e){return[R,I,M,D,L,U,F].includes(e.code)}(e)||function(e){return e.code.startsWith("Neo.ClientError.Security.")&&![N].includes(e.code)}(e))throw e;if("Neo.ClientError.Procedure.ProcedureNotFound"===e.code)throw(0,p.newError)("Server at ".concat(t.asHostPort()," can't perform routing. Make sure you are connecting to a causal cluster"),O,e);return this._log.warn("unable to fetch routing table because of an error ".concat(e)),[null,e]},t.prototype._applyRoutingTableIfPossible=function(e,t,r){return c(this,void 0,void 0,(function(){return l(this,(function(n){switch(n.label){case 0:if(!t)throw(0,p.newError)("Could not perform discovery. No routing servers available. Known routing table: ".concat(e),O,r);return 0===t.writers.length&&(this._useSeedRouter=!0),[4,this._updateRoutingTable(t)];case 1:return n.sent(),[2,t]}}))}))},t.prototype._updateRoutingTable=function(e){return c(this,void 0,void 0,(function(){return l(this,(function(t){switch(t.label){case 0:return[4,this._connectionPool.keepAll(e.allServers())];case 1:return t.sent(),this._routingTableRegistry.removeExpired(),this._routingTableRegistry.register(e),this._log.info("Updated routing table ".concat(e)),[2]}}))}))},t._forgetRouter=function(e,t,r){var n=t[r];e&&n&&e.forgetRouter(n)},t}(m.default);t.default=V;var W=function(){function e(e){this._tables=new Map,this._routingTablePurgeDelay=e}return e.prototype.register=function(e){return this._tables.set(e.database,e),this},e.prototype.apply=function(e,t){var r=void 0===t?{}:t,n=r.applyWhenExists,o=r.applyWhenDontExists,i=void 0===o?function(){}:o;return this._tables.has(e)?n(this._tables.get(e)):"string"==typeof e||null===e?i():this._forEach(n),this},e.prototype.get=function(e,t){return this._tables.has(e)?this._tables.get(e):"function"==typeof t?t():t},e.prototype.removeExpired=function(){var e=this;return this._removeIf((function(t){return t.isExpiredFor(e._routingTablePurgeDelay)}))},e.prototype._forEach=function(e){var t,r;try{for(var n=f(this._tables),o=n.next();!o.done;o=n.next())e(h(o.value,2)[1])}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return this},e.prototype._remove=function(e){return this._tables.delete(e),this},e.prototype._removeIf=function(e){var t,r;try{for(var n=f(this._tables),o=n.next();!o.done;o=n.next()){var i=h(o.value,2),a=i[0];e(i[1])&&this._remove(a)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return this},e}()},4132:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t){var r=e.call(this)||this;return r._connection=t,r}return o(t,e),t.prototype.acquireConnection=function(e){var t=void 0===e?{}:e,r=(t.accessMode,t.database,t.bookmarks,this._connection);return this._connection=null,Promise.resolve(r)},t}(r(9305).ConnectionProvider);t.default=i},9689:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RoutingConnectionProvider=t.DirectConnectionProvider=t.PooledConnectionProvider=t.SingleConnectionProvider=void 0;var o=r(4132);Object.defineProperty(t,"SingleConnectionProvider",{enumerable:!0,get:function(){return n(o).default}});var i=r(8987);Object.defineProperty(t,"PooledConnectionProvider",{enumerable:!0,get:function(){return n(i).default}});var a=r(3545);Object.defineProperty(t,"DirectConnectionProvider",{enumerable:!0,get:function(){return n(a).default}});var u=r(7428);Object.defineProperty(t,"RoutingConnectionProvider",{enumerable:!0,get:function(){return n(u).default}})},4531:function(e,t){var r=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{s(n.next(e))}catch(e){i(e)}}function u(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,u)}s((n=n.apply(e,t||[])).next())}))},n=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(s){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,n=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e){var t=e.connectionLivenessCheckTimeout;this._connectionLivenessCheckTimeout=t}return e.prototype.check=function(e){return r(this,void 0,void 0,(function(){var t;return n(this,(function(r){switch(r.label){case 0:return this._isCheckDisabled||this._isNewlyCreatedConnection(e)?[2,!0]:(t=Date.now()-e.idleTimestamp,0===this._connectionLivenessCheckTimeout||t>this._connectionLivenessCheckTimeout?[4,e.resetAndFlush().then((function(){return!0}))]:[3,2]);case 1:return[2,r.sent()];case 2:return[2,!0]}}))}))},Object.defineProperty(e.prototype,"_isCheckDisabled",{get:function(){return null==this._connectionLivenessCheckTimeout||this._connectionLivenessCheckTimeout<0},enumerable:!1,configurable:!0}),e.prototype._isNewlyCreatedConnection=function(e){return null==e.authToken},e}();t.default=o},8031:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{s(n.next(e))}catch(e){i(e)}}function u(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,u)}s((n=n.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(s){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,n=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createChannelConnection=void 0;var s=r(7452),c=r(9305),l=u(r(6385)),f=u(r(7666)),h=c.error.PROTOCOL_ERROR,d=c.internal.logger.Logger,p=0;t.createChannelConnection=function(e,t,r,n,o,i,a){void 0===i&&(i=null),void 0===a&&(a=function(e){return new s.Channel(e)});var u=a(new s.ChannelConfig(e,t,r.errorCode(),o));return f.default.handshake(u,n).then((function(o){var a=o.protocolVersion,c=o.consumeRemainingBuffer,l=new s.Chunker(u),h=new s.Dechunker,d=new v(u,r,e,n,t.disableLosslessIntegers,i,l,t.notificationFilter,(function(e){return f.default.create({version:a,channel:u,chunker:l,dechunker:h,disableLosslessIntegers:t.disableLosslessIntegers,useBigInt:t.useBigInt,serversideRouting:i,server:e.server,log:e.logger,observer:{onObserversCountChange:e._handleOngoingRequestsNumberChange.bind(e),onError:e._handleFatalError.bind(e),onFailure:e._resetOnFailure.bind(e),onProtocolError:e._handleProtocolError.bind(e),onErrorApplyTransformation:function(t){return e.handleAndTransformError(t,e._address)}}})}),t.telemetryDisabled);return c((function(e){return h.write(e)})),d})).catch((function(e){return u.close().then((function(){throw e}))}))};var v=function(e){function t(t,r,n,o,i,a,u,s,c,l){void 0===i&&(i=!1),void 0===a&&(a=null);var f,h,v=e.call(this,r)||this;return v._authToken=null,v._idle=!1,v._reseting=!1,v._resetObservers=[],v._id=p++,v._address=n,v._server={address:n.asHostPort()},v._creationTimestamp=Date.now(),v._disableLosslessIntegers=i,v._ch=t,v._chunker=u,v._log=(f=v,new d((h=o)._level,(function(e,t){return h._loggerFunction(e,"".concat(f," ").concat(t))}))),v._serversideRouting=a,v._notificationFilter=s,v._telemetryDisabledDriverConfig=!0===l,v._telemetryDisabledConnection=!0,v._dbConnectionId=null,v._protocol=c(v),v._isBroken=!1,v._log.isDebugEnabled()&&v._log.debug("created towards ".concat(n)),v}return o(t,e),t.prototype.beginTransaction=function(e){return this._sendTelemetryIfEnabled(e),this._protocol.beginTransaction(e)},t.prototype.run=function(e,t,r){return this._sendTelemetryIfEnabled(r),this._protocol.run(e,t,r)},t.prototype._sendTelemetryIfEnabled=function(e){this._telemetryDisabledConnection||this._telemetryDisabledDriverConfig||null==e||null==e.apiTelemetryConfig||this._protocol.telemetry({api:e.apiTelemetryConfig.api},{onCompleted:e.apiTelemetryConfig.onTelemetrySuccess,onError:e.beforeError})},t.prototype.commitTransaction=function(e){return this._protocol.commitTransaction(e)},t.prototype.rollbackTransaction=function(e){return this._protocol.rollbackTransaction(e)},t.prototype.getProtocolVersion=function(){return this._protocol.version},Object.defineProperty(t.prototype,"authToken",{get:function(){return this._authToken},set:function(e){this._authToken=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"supportsReAuth",{get:function(){return this._protocol.supportsReAuth},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"databaseId",{get:function(){return this._dbConnectionId},set:function(e){this._dbConnectionId=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"idleTimestamp",{get:function(){return this._idleTimestamp},set:function(e){this._idleTimestamp=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creationTimestamp",{get:function(){return this._creationTimestamp},enumerable:!1,configurable:!0}),t.prototype.connect=function(e,t,r,n){return i(this,void 0,void 0,(function(){var o=this;return a(this,(function(i){switch(i.label){case 0:if(this._protocol.initialized&&!this._protocol.supportsReAuth)throw(0,c.newError)("Connection does not support re-auth");return this._authToken=r,this._protocol.initialized?[3,2]:[4,this._initialize(e,t,r)];case 1:case 3:return[2,i.sent()];case 2:return n?[4,new Promise((function(e,t){o._protocol.logoff({onError:t}),o._protocol.logon({authToken:r,onError:t,onComplete:function(){return e(o)},flush:!0})}))]:[3,4];case 4:return this._protocol.logoff(),this._protocol.logon({authToken:r,flush:!0}),[2,this]}}))}))},t.prototype._initialize=function(e,t,r){var n=this,o=this;return new Promise((function(i,a){n._protocol.initialize({userAgent:e,boltAgent:t,authToken:r,notificationFilter:n._notificationFilter,onError:function(e){return a(e)},onComplete:function(e){if(e){var t=e.server;n.version&&!t||(n.version=t);var r=e.connection_id;if(n.databaseId||(n.databaseId=r),e.hints){var a=e.hints["connection.recv_timeout_seconds"];if(null!=a){var u=(0,c.toNumber)(a);Number.isInteger(u)&&u>0?n._ch.setupReceiveTimeout(1e3*u):n._log.info("Server located at ".concat(n._address," supplied an invalid connection receive timeout value (").concat(u,"). ")+"Please, verify the server configuration and status because this can be the symptom of a bigger issue.")}!0===e.hints["telemetry.enabled"]&&(n._telemetryDisabledConnection=!1)}}i(o)}})}))},t.prototype.protocol=function(){return this._protocol},Object.defineProperty(t.prototype,"address",{get:function(){return this._address},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){return this._server.version},set:function(e){this._server.version=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"server",{get:function(){return this._server},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"logger",{get:function(){return this._log},enumerable:!1,configurable:!0}),t.prototype._handleFatalError=function(e){this._isBroken=!0,this._error=this.handleAndTransformError(this._protocol.currentFailure||e,this._address),this._log.isErrorEnabled()&&this._log.error("experienced a fatal error caused by ".concat(this._error," (").concat(c.json.stringify(this._error),")")),this._protocol.notifyFatalError(this._error)},t.prototype._setIdle=function(e){this._idle=!0,this._ch.stopReceiveTimeout(),this._protocol.queueObserverIfProtocolIsNotBroken(e)},t.prototype._unsetIdle=function(){this._idle=!1,this._updateCurrentObserver()},t.prototype._queueObserver=function(e){return this._protocol.queueObserverIfProtocolIsNotBroken(e)},t.prototype.hasOngoingObservableRequests=function(){return!this._idle&&this._protocol.hasOngoingObservableRequests()},t.prototype.resetAndFlush=function(){var e=this;return new Promise((function(t,r){e._reset({onError:function(t){if(e._isBroken)r(t);else{var n=e._handleProtocolError("Received FAILURE as a response for RESET: ".concat(t));r(n)}},onComplete:function(){t()}})}))},t.prototype._resetOnFailure=function(){var e=this;this.isOpen()&&this._reset({onError:function(){e._protocol.resetFailure()},onComplete:function(){e._protocol.resetFailure()}})},t.prototype._reset=function(e){var t=this;if(this._reseting)this._protocol.isLastMessageReset()?this._resetObservers.push(e):this._protocol.reset({onError:function(t){e.onError(t)},onComplete:function(){e.onComplete()}});else{this._resetObservers.push(e),this._reseting=!0;var r=function(e){t._reseting=!1;var r=t._resetObservers;t._resetObservers=[],r.forEach(e)};this._protocol.reset({onError:function(e){r((function(t){return t.onError(e)}))},onComplete:function(){r((function(e){return e.onComplete()}))}})}},t.prototype._updateCurrentObserver=function(){this._protocol.updateCurrentObserver()},t.prototype.isOpen=function(){return!this._isBroken&&this._ch._open},t.prototype._handleOngoingRequestsNumberChange=function(e){this._idle||(0===e?this._ch.stopReceiveTimeout():this._ch.startReceiveTimeout())},t.prototype.close=function(){return i(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return this._log.isDebugEnabled()&&this._log.debug("closing"),this._protocol&&this.isOpen()&&this._protocol.prepareToClose(),[4,this._ch.close()];case 1:return e.sent(),this._log.isDebugEnabled()&&this._log.debug("closed"),[2]}}))}))},t.prototype.toString=function(){return"Connection [".concat(this.id,"][").concat(this.databaseId||"","]")},t.prototype._handleProtocolError=function(e){this._protocol.resetFailure(),this._updateCurrentObserver();var t=(0,c.newError)(e,h);return this._handleFatalError(t),t},t}(l.default);t.default=v},9857:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(t,r){var n=e.call(this,r)||this;return r&&(n._originalErrorHandler=t._errorHandler,t._errorHandler=n._errorHandler),n._delegate=t,n}return o(t,e),t.prototype.beginTransaction=function(e){return this._delegate.beginTransaction(e)},t.prototype.run=function(e,t,r){return this._delegate.run(e,t,r)},t.prototype.commitTransaction=function(e){return this._delegate.commitTransaction(e)},t.prototype.rollbackTransaction=function(e){return this._delegate.rollbackTransaction(e)},t.prototype.getProtocolVersion=function(){return this._delegate.getProtocolVersion()},Object.defineProperty(t.prototype,"id",{get:function(){return this._delegate.id},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"databaseId",{get:function(){return this._delegate.databaseId},set:function(e){this._delegate.databaseId=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"server",{get:function(){return this._delegate.server},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"authToken",{get:function(){return this._delegate.authToken},set:function(e){this._delegate.authToken=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"supportsReAuth",{get:function(){return this._delegate.supportsReAuth},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"address",{get:function(){return this._delegate.address},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){return this._delegate.version},set:function(e){this._delegate.version=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creationTimestamp",{get:function(){return this._delegate.creationTimestamp},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"idleTimestamp",{get:function(){return this._delegate.idleTimestamp},set:function(e){this._delegate.idleTimestamp=e},enumerable:!1,configurable:!0}),t.prototype.isOpen=function(){return this._delegate.isOpen()},t.prototype.protocol=function(){return this._delegate.protocol()},t.prototype.connect=function(e,t,r,n){return this._delegate.connect(e,t,r,n)},t.prototype.write=function(e,t,r){return this._delegate.write(e,t,r)},t.prototype.resetAndFlush=function(){return this._delegate.resetAndFlush()},t.prototype.hasOngoingObservableRequests=function(){return this._delegate.hasOngoingObservableRequests()},t.prototype.close=function(){return this._delegate.close()},t.prototype.release=function(){return this._originalErrorHandler&&(this._delegate._errorHandler=this._originalErrorHandler),this._delegate.release()},t}(i(r(6385)).default);t.default=a},2363:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=r(9305),o=n.error.SERVICE_UNAVAILABLE,i=n.error.SESSION_EXPIRED,a=function(){function e(e,t,r,n){this._errorCode=e,this._handleUnavailability=t||u,this._handleWriteFailure=r||u,this._handleSecurityError=n||u}return e.create=function(t){return new e(t.errorCode,t.handleUnavailability,t.handleWriteFailure,t.handleSecurityError)},e.prototype.errorCode=function(){return this._errorCode},e.prototype.handleAndTransformError=function(e,t,r){return function(e){return null!=e&&null!=e.code&&e.code.startsWith("Neo.ClientError.Security.")}(e)?this._handleSecurityError(e,t,r):function(e){return!!e&&(e.code===i||e.code===o||"Neo.TransientError.General.DatabaseUnavailable"===e.code)}(e)?this._handleUnavailability(e,t,r):function(e){return!!e&&("Neo.ClientError.Cluster.NotALeader"===e.code||"Neo.ClientError.General.ForbiddenOnReadOnlyDatabase"===e.code)}(e)?this._handleWriteFailure(e,t,r):e},e}();function u(e){return e}t.default=a},6385:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),r(7666);var i=function(e){function t(t){var r=e.call(this)||this;return r._errorHandler=t,r}return o(t,e),Object.defineProperty(t.prototype,"id",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"databaseId",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"authToken",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"supportsReAuth",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creationTimestamp",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"idleTimestamp",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),t.prototype.protocol=function(){throw new Error("not implemented")},Object.defineProperty(t.prototype,"address",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"server",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),t.prototype.connect=function(e,t,r,n){throw new Error("not implemented")},t.prototype.write=function(e,t,r){throw new Error("not implemented")},t.prototype.close=function(){throw new Error("not implemented")},t.prototype.handleAndTransformError=function(e,t){return this._errorHandler?this._errorHandler.handleAndTransformError(e,t,this):e},t}(r(9305).Connection);t.default=i},7721:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createChannelConnection=t.ConnectionErrorHandler=t.DelegateConnection=t.ChannelConnection=t.Connection=void 0;var u=a(r(6385));t.Connection=u.default;var s=i(r(8031));t.ChannelConnection=s.default,Object.defineProperty(t,"createChannelConnection",{enumerable:!0,get:function(){return s.createChannelConnection}});var c=a(r(9857));t.DelegateConnection=c.default;var l=a(r(2363));t.ConnectionErrorHandler=l.default,t.default=u.default},6672:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.packstream=t.channel=t.buf=t.bolt=t.loadBalancing=void 0,t.loadBalancing=i(r(4455)),t.bolt=i(r(7666)),t.buf=i(r(7174)),t.channel=i(r(7452)),t.packstream=i(r(7168)),a(r(9689),t)},6492:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.reuseOngoingRequest=t.identity=void 0;var n=r(9305);t.identity=function(e){return e},t.reuseOngoingRequest=function(e,t){void 0===t&&(t=null);var r=new Map;return function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];var a=n.json.stringify(o);if(r.has(a))return r.get(a);var u=e.apply(t,o);return r.set(a,u),u.finally((function(){r.delete(a)}))}}},6781:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.object=t.functional=void 0,t.functional=i(r(6492)),t.object=i(r(6702))},6702:function(e,t){var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.equals=void 0,t.equals=function(e,t){var n,o;if(e===t)return!0;if(null===e||null===t)return!1;if("object"==typeof e&&"object"==typeof t){var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;try{for(var u=r(i),s=u.next();!s.done;s=u.next()){var c=s.value;if(e[c]!==t[c])return!1}}catch(e){n={error:e}}finally{try{s&&!s.done&&(o=u.return)&&o.call(u)}finally{if(n)throw n.error}}return!0}return!1}},4455:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.LeastConnectedLoadBalancingStrategy=t.LoadBalancingStrategy=void 0;var o=n(r(4311));t.LoadBalancingStrategy=o.default;var i=n(r(2533));t.LeastConnectedLoadBalancingStrategy=i.default,t.default=i.default},2533:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=i(r(715)),u=function(e){function t(t){var r=e.call(this)||this;return r._readersIndex=new a.default,r._writersIndex=new a.default,r._connectionPool=t,r}return o(t,e),t.prototype.selectReader=function(e){return this._select(e,this._readersIndex)},t.prototype.selectWriter=function(e){return this._select(e,this._writersIndex)},t.prototype._select=function(e,t){var r=e.length;if(0===r)return null;var n=t.next(r),o=n,i=null,a=Number.MAX_SAFE_INTEGER;do{var u=e[o],s=this._connectionPool.activeResourceCount(u);s<a&&(i=u,a=s),o===r-1?o=0:o++}while(o!==n);return i},t}(i(r(4311)).default);t.default=u},4311:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}return e.prototype.selectReader=function(e){throw new Error("Abstract function")},e.prototype.selectWriter=function(e){throw new Error("Abstract function")},e}();t.default=r},715:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this._offset=e||0}return e.prototype.next=function(e){if(0===e)return-1;var t=this._offset;return this._offset+=1,this._offset===Number.MAX_SAFE_INTEGER&&(this._offset=0),t%e},e}();t.default=r},7168:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.structure=t.v2=t.v1=void 0;var a=i(r(5361));t.v1=a;var u=i(r(2072));t.v2=u;var s=i(r(7665));t.structure=s,t.default=u},5361:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Unpacker=t.Packer=void 0;var n=r(7452),o=r(6781),i=r(7665),a=r(9305),u=a.error.PROTOCOL_ERROR,s=function(){function e(e){this._ch=e,this._byteArraysSupported=!0}return e.prototype.packable=function(e,t){var r,n=this;void 0===t&&(t=o.functional.identity);try{e=t(e)}catch(e){return function(){throw e}}if(null===e)return function(){return n._ch.writeUInt8(192)};if(!0===e)return function(){return n._ch.writeUInt8(195)};if(!1===e)return function(){return n._ch.writeUInt8(194)};if("number"==typeof e)return function(){return n.packFloat(e)};if("string"==typeof e)return function(){return n.packString(e)};if("bigint"==typeof e)return function(){return n.packInteger((0,a.int)(e))};if((0,a.isInt)(e))return function(){return n.packInteger(e)};if(e instanceof Int8Array)return function(){return n.packBytes(e)};if(e instanceof Array)return function(){n.packListHeader(e.length);for(var r=0;r<e.length;r++)n.packable(void 0===e[r]?null:e[r],t)()};if(null!=(r=e)&&"function"==typeof r[Symbol.iterator])return this.packableIterable(e,t);if(e instanceof i.Structure){for(var u=[],s=0;s<e.fields.length;s++)u[s]=this.packable(e.fields[s],t);return function(){return n.packStruct(e.signature,u)}}return"object"==typeof e?function(){for(var r=Object.keys(e),o=0,i=0;i<r.length;i++)void 0!==e[r[i]]&&o++;for(n.packMapHeader(o),i=0;i<r.length;i++){var a=r[i];void 0!==e[a]&&(n.packString(a),n.packable(e[a],t)())}}:this._nonPackableValue("Unable to pack the given value: ".concat(e))},e.prototype.packableIterable=function(e,t){try{var r=Array.from(e);return this.packable(r,t)}catch(t){throw(0,a.newError)("Cannot pack given iterable, ".concat(t.message,": ").concat(e))}},e.prototype.packStruct=function(e,t){t=t||[],this.packStructHeader(t.length,e);for(var r=0;r<t.length;r++)t[r]()},e.prototype.packInteger=function(e){var t=e.high,r=e.low;e.greaterThanOrEqual(-16)&&e.lessThan(128)?this._ch.writeInt8(r):e.greaterThanOrEqual(-128)&&e.lessThan(-16)?(this._ch.writeUInt8(200),this._ch.writeInt8(r)):e.greaterThanOrEqual(-32768)&&e.lessThan(32768)?(this._ch.writeUInt8(201),this._ch.writeInt16(r)):e.greaterThanOrEqual(-2147483648)&&e.lessThan(2147483648)?(this._ch.writeUInt8(202),this._ch.writeInt32(r)):(this._ch.writeUInt8(203),this._ch.writeInt32(t),this._ch.writeInt32(r))},e.prototype.packFloat=function(e){this._ch.writeUInt8(193),this._ch.writeFloat64(e)},e.prototype.packString=function(e){var t=n.utf8.encode(e),r=t.length;if(r<16)this._ch.writeUInt8(128|r),this._ch.writeBytes(t);else if(r<256)this._ch.writeUInt8(208),this._ch.writeUInt8(r),this._ch.writeBytes(t);else if(r<65536)this._ch.writeUInt8(209),this._ch.writeUInt8(r/256>>0),this._ch.writeUInt8(r%256),this._ch.writeBytes(t);else{if(!(r<4294967296))throw(0,a.newError)("UTF-8 strings of size "+r+" are not supported");this._ch.writeUInt8(210),this._ch.writeUInt8((r/16777216>>0)%256),this._ch.writeUInt8((r/65536>>0)%256),this._ch.writeUInt8((r/256>>0)%256),this._ch.writeUInt8(r%256),this._ch.writeBytes(t)}},e.prototype.packListHeader=function(e){if(e<16)this._ch.writeUInt8(144|e);else if(e<256)this._ch.writeUInt8(212),this._ch.writeUInt8(e);else if(e<65536)this._ch.writeUInt8(213),this._ch.writeUInt8((e/256>>0)%256),this._ch.writeUInt8(e%256);else{if(!(e<4294967296))throw(0,a.newError)("Lists of size "+e+" are not supported");this._ch.writeUInt8(214),this._ch.writeUInt8((e/16777216>>0)%256),this._ch.writeUInt8((e/65536>>0)%256),this._ch.writeUInt8((e/256>>0)%256),this._ch.writeUInt8(e%256)}},e.prototype.packBytes=function(e){if(!this._byteArraysSupported)throw(0,a.newError)("Byte arrays are not supported by the database this driver is connected to");this.packBytesHeader(e.length);for(var t=0;t<e.length;t++)this._ch.writeInt8(e[t])},e.prototype.packBytesHeader=function(e){if(e<256)this._ch.writeUInt8(204),this._ch.writeUInt8(e);else if(e<65536)this._ch.writeUInt8(205),this._ch.writeUInt8((e/256>>0)%256),this._ch.writeUInt8(e%256);else{if(!(e<4294967296))throw(0,a.newError)("Byte arrays of size "+e+" are not supported");this._ch.writeUInt8(206),this._ch.writeUInt8((e/16777216>>0)%256),this._ch.writeUInt8((e/65536>>0)%256),this._ch.writeUInt8((e/256>>0)%256),this._ch.writeUInt8(e%256)}},e.prototype.packMapHeader=function(e){if(e<16)this._ch.writeUInt8(160|e);else if(e<256)this._ch.writeUInt8(216),this._ch.writeUInt8(e);else if(e<65536)this._ch.writeUInt8(217),this._ch.writeUInt8(e/256>>0),this._ch.writeUInt8(e%256);else{if(!(e<4294967296))throw(0,a.newError)("Maps of size "+e+" are not supported");this._ch.writeUInt8(218),this._ch.writeUInt8((e/16777216>>0)%256),this._ch.writeUInt8((e/65536>>0)%256),this._ch.writeUInt8((e/256>>0)%256),this._ch.writeUInt8(e%256)}},e.prototype.packStructHeader=function(e,t){if(e<16)this._ch.writeUInt8(176|e),this._ch.writeUInt8(t);else if(e<256)this._ch.writeUInt8(220),this._ch.writeUInt8(e),this._ch.writeUInt8(t);else{if(!(e<65536))throw(0,a.newError)("Structures of size "+e+" are not supported");this._ch.writeUInt8(221),this._ch.writeUInt8(e/256>>0),this._ch.writeUInt8(e%256)}},e.prototype.disableByteArrays=function(){this._byteArraysSupported=!1},e.prototype._nonPackableValue=function(e){return function(){throw(0,a.newError)(e,u)}},e}();t.Packer=s;var c=function(){function e(e,t){void 0===e&&(e=!1),void 0===t&&(t=!1),this._disableLosslessIntegers=e,this._useBigInt=t}return e.prototype.unpack=function(e,t){void 0===t&&(t=o.functional.identity);var r=e.readUInt8(),n=240&r,i=15&r;if(192===r)return null;var u=this._unpackBoolean(r);if(null!==u)return u;var s=this._unpackNumberOrInteger(r,e);if(null!==s){if((0,a.isInt)(s)){if(this._useBigInt)return s.toBigInt();if(this._disableLosslessIntegers)return s.toNumberOrInfinity()}return s}var c=this._unpackString(r,n,i,e);if(null!==c)return c;var l=this._unpackList(r,n,i,e,t);if(null!==l)return l;var f=this._unpackByteArray(r,e);if(null!==f)return f;var h=this._unpackMap(r,n,i,e,t);if(null!==h)return h;var d=this._unpackStruct(r,n,i,e,t);if(null!==d)return d;throw(0,a.newError)("Unknown packed value with marker "+r.toString(16))},e.prototype.unpackInteger=function(e){var t=e.readUInt8(),r=this._unpackInteger(t,e);if(null==r)throw(0,a.newError)("Unable to unpack integer value with marker "+t.toString(16));return r},e.prototype._unpackBoolean=function(e){return 195===e||194!==e&&null},e.prototype._unpackNumberOrInteger=function(e,t){return 193===e?t.readFloat64():this._unpackInteger(e,t)},e.prototype._unpackInteger=function(e,t){if(e>=0&&e<128)return(0,a.int)(e);if(e>=240&&e<256)return(0,a.int)(e-256);if(200===e)return(0,a.int)(t.readInt8());if(201===e)return(0,a.int)(t.readInt16());if(202===e){var r=t.readInt32();return(0,a.int)(r)}if(203===e){var n=t.readInt32(),o=t.readInt32();return new a.Integer(o,n)}return null},e.prototype._unpackString=function(e,t,r,o){return 128===t?n.utf8.decode(o,r):208===e?n.utf8.decode(o,o.readUInt8()):209===e?n.utf8.decode(o,o.readUInt16()):210===e?n.utf8.decode(o,o.readUInt32()):null},e.prototype._unpackList=function(e,t,r,n,o){return 144===t?this._unpackListWithSize(r,n,o):212===e?this._unpackListWithSize(n.readUInt8(),n,o):213===e?this._unpackListWithSize(n.readUInt16(),n,o):214===e?this._unpackListWithSize(n.readUInt32(),n,o):null},e.prototype._unpackListWithSize=function(e,t,r){for(var n=[],o=0;o<e;o++)n.push(this.unpack(t,r));return n},e.prototype._unpackByteArray=function(e,t){return 204===e?this._unpackByteArrayWithSize(t.readUInt8(),t):205===e?this._unpackByteArrayWithSize(t.readUInt16(),t):206===e?this._unpackByteArrayWithSize(t.readUInt32(),t):null},e.prototype._unpackByteArrayWithSize=function(e,t){for(var r=new Int8Array(e),n=0;n<e;n++)r[n]=t.readInt8();return r},e.prototype._unpackMap=function(e,t,r,n,o){return 160===t?this._unpackMapWithSize(r,n,o):216===e?this._unpackMapWithSize(n.readUInt8(),n,o):217===e?this._unpackMapWithSize(n.readUInt16(),n,o):218===e?this._unpackMapWithSize(n.readUInt32(),n,o):null},e.prototype._unpackMapWithSize=function(e,t,r){for(var n={},o=0;o<e;o++)n[this.unpack(t,r)]=this.unpack(t,r);return n},e.prototype._unpackStruct=function(e,t,r,n,o){return 176===t?this._unpackStructWithSize(r,n,o):220===e?this._unpackStructWithSize(n.readUInt8(),n,o):221===e?this._unpackStructWithSize(n.readUInt16(),n,o):null},e.prototype._unpackStructWithSize=function(e,t,r){for(var n=t.readUInt8(),o=new i.Structure(n,[]),a=0;a<e;a++)o.fields.push(this.unpack(t,r));return r(o)},e}();t.Unpacker=c},2072:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),u=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&i(t,e,r);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Unpacker=t.Packer=void 0;var s=u(r(5361)),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.disableByteArrays=function(){throw new Error("Bolt V2 should always support byte arrays")},t}(s.Packer);t.Packer=c;var l=function(e){function t(t,r){return void 0===t&&(t=!1),void 0===r&&(r=!1),e.call(this,t,r)||this}return o(t,e),t}(s.Unpacker);t.Unpacker=l},7665:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.verifyStructSize=t.Structure=void 0;var n=r(9305),o=n.error.PROTOCOL_ERROR,i=function(){function e(e,t){this.signature=e,this.fields=t}return Object.defineProperty(e.prototype,"size",{get:function(){return this.fields.length},enumerable:!1,configurable:!0}),e.prototype.toString=function(){for(var e="",t=0;t<this.fields.length;t++)t>0&&(e+=", "),e+=this.fields[t];return"Structure("+this.signature+", ["+e+"])"},e}();t.Structure=i,t.verifyStructSize=function(e,t,r){if(t!==r)throw(0,n.newError)("Wrong struct size for ".concat(e,", expected ").concat(t," but was ").concat(r),o)},t.default=i},206:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RoutingTable=t.Rediscovery=void 0;var o=n(r(4151));t.Rediscovery=o.default;var i=n(r(9018));t.RoutingTable=i.default,t.default=o.default},4151:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(9018)),i=(r(9305),function(){function e(e){this._routingContext=e}return e.prototype.lookupRoutingTableOnRouter=function(e,t,r,n){var i=this;return e._acquireConnection((function(a){return i._requestRawRoutingTable(a,e,t,r,n).then((function(e){return e.isNull?null:o.default.fromRawRoutingTable(t,r,e)}))}))},e.prototype._requestRawRoutingTable=function(e,t,r,n,o){var i=this;return new Promise((function(n,a){e.protocol().requestRoutingInformation({routingContext:i._routingContext,databaseName:r,impersonatedUser:o,sessionContext:{bookmarks:t._lastBookmarks,mode:t._mode,database:t._database,afterComplete:t._onComplete},onCompleted:n,onError:a})}))},e}());t.default=i},9018:function(e,t,r){var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},o=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.createValidRoutingTable=void 0;var i=r(9305),a=i.internal.constants,u=a.ACCESS_MODE_WRITE,s=a.ACCESS_MODE_READ,c=i.internal.serverAddress.ServerAddress,l=i.error.PROTOCOL_ERROR,f=function(){function e(e){var t=void 0===e?{}:e,r=t.database,n=t.routers,o=t.readers,a=t.writers,u=t.expirationTime,s=t.ttl;this.database=r||null,this.databaseName=r||"default database",this.routers=n||[],this.readers=o||[],this.writers=a||[],this.expirationTime=u||(0,i.int)(0),this.ttl=s}return e.fromRawRoutingTable=function(e,t,r){return d(e,t,r)},e.prototype.forget=function(e){this.readers=h(this.readers,e),this.writers=h(this.writers,e)},e.prototype.forgetRouter=function(e){this.routers=h(this.routers,e)},e.prototype.forgetWriter=function(e){this.writers=h(this.writers,e)},e.prototype.isStaleFor=function(e){return this.expirationTime.lessThan(Date.now())||this.routers.length<1||e===s&&0===this.readers.length||e===u&&0===this.writers.length},e.prototype.isExpiredFor=function(e){return this.expirationTime.add(e).lessThan(Date.now())},e.prototype.allServers=function(){return o(o(o([],n(this.routers),!1),n(this.readers),!1),n(this.writers),!1)},e.prototype.toString=function(){return"RoutingTable["+"database=".concat(this.databaseName,", ")+"expirationTime=".concat(this.expirationTime,", ")+"currentTime=".concat(Date.now(),", ")+"routers=[".concat(this.routers,"], ")+"readers=[".concat(this.readers,"], ")+"writers=[".concat(this.writers,"]]")},e}();function h(e,t){return e.filter((function(e){return e.asKey()!==t.asKey()}))}function d(e,t,r){var n=r.ttl,o=function(e,t){try{var r=(0,i.int)(Date.now()),n=(0,i.int)(e.ttl).multiply(1e3).add(r);return n.lessThan(r)?i.Integer.MAX_VALUE:n}catch(r){throw(0,i.newError)("Unable to parse TTL entry from router ".concat(t," from raw routing table:\n").concat(i.json.stringify(e),"\nError message: ").concat(r.message),l)}}(r,t),a=function(e,t){try{var r=[],n=[],o=[];return e.servers.forEach((function(e){var t=e.role,i=e.addresses;"ROUTE"===t?r=v(i).map((function(e){return c.fromUrl(e)})):"WRITE"===t?o=v(i).map((function(e){return c.fromUrl(e)})):"READ"===t&&(n=v(i).map((function(e){return c.fromUrl(e)})))})),{routers:r,readers:n,writers:o}}catch(r){throw(0,i.newError)("Unable to parse servers entry from router ".concat(t," from addresses:\n").concat(i.json.stringify(e.servers),"\nError message: ").concat(r.message),l)}}(r,t),u=a.routers,s=a.readers,h=a.writers;return p(u,"routers",t),p(s,"readers",t),new f({database:e||r.db,routers:u,readers:s,writers:h,expirationTime:o,ttl:n})}function p(e,t,r){if(0===e.length)throw(0,i.newError)("Received no "+t+" from router "+r,l)}function v(e){if(!Array.isArray(e))throw new TypeError("Array expected but got: "+e);return Array.from(e)}t.default=f,t.createValidRoutingTable=d},2069:function(e,t,r){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{s(n.next(e))}catch(e){i(e)}}function u(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,u)}s((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(s){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,n=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.staticAuthTokenManager=t.authTokenManagers=t.AuthTokenAndExpiration=void 0;var a=i(r(1967)),u=r(6995),s=function(){function e(){}return e.prototype.getToken=function(){throw new Error("Not Implemented")},e.prototype.handleSecurityException=function(e,t){throw new Error("Not implemented")},e}();t.default=s;t.AuthTokenAndExpiration=function(){this.token=a.default.none(),this.expiration=void 0};var c=new(function(){function e(){}return e.prototype.bearer=function(e){var t=e.tokenProvider;if("function"!=typeof t)throw new TypeError("tokenProvider should be function, but got: ".concat(typeof t));return new f(t,["Neo.ClientError.Security.Unauthorized","Neo.ClientError.Security.TokenExpired"])},e.prototype.basic=function(e){var t=this,r=e.tokenProvider;if("function"!=typeof r)throw new TypeError("tokenProvider should be function, but got: ".concat(typeof r));return new f((function(){return n(t,void 0,void 0,(function(){var e;return o(this,(function(t){switch(t.label){case 0:return e={},[4,r()];case 1:return[2,(e.token=t.sent(),e)]}}))}))}),["Neo.ClientError.Security.Unauthorized"])},e}());t.authTokenManagers=c,Object.freeze(c),t.staticAuthTokenManager=function(e){var t=e.authToken;return new h(t)};var l=function(){function e(e){void 0===e&&(e=[]),this._subscribers=e}return e.prototype.subscribe=function(e){this._subscribers.push(e)},e.prototype.onCompleted=function(e){this._subscribers.forEach((function(t){return t.onCompleted(e)}))},e.prototype.onError=function(e){this._subscribers.forEach((function(t){return t.onError(e)}))},e}(),f=function(){function e(e,t,r,n){this._tokenProvider=e,this._handledSecurityCodes=t,this._currentAuthData=r,this._refreshObservable=n}return e.prototype.getToken=function(){var e;return n(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return void 0===this._currentAuthData||void 0!==this._currentAuthData.expiration&&this._currentAuthData.expiration<new Date?[4,this._refreshAuthToken()]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2,null===(e=this._currentAuthData)||void 0===e?void 0:e.token]}}))}))},e.prototype.handleSecurityException=function(e,t){var r;return!!this._handledSecurityCodes.includes(t)&&(u.util.equals(e,null===(r=this._currentAuthData)||void 0===r?void 0:r.token)&&this._scheduleRefreshAuthToken(),!0)},e.prototype._scheduleRefreshAuthToken=function(e){var t=this;void 0===this._refreshObservable&&(this._currentAuthData=void 0,this._refreshObservable=new l,Promise.resolve(this._tokenProvider()).then((function(e){var r;t._currentAuthData=e,null===(r=t._refreshObservable)||void 0===r||r.onCompleted(e)})).catch((function(e){var r;null===(r=t._refreshObservable)||void 0===r||r.onError(e)})).finally((function(){t._refreshObservable=void 0}))),void 0!==e&&this._refreshObservable.subscribe(e)},e.prototype._refreshAuthToken=function(){return n(this,void 0,void 0,(function(){var e=this;return o(this,(function(t){switch(t.label){case 0:return[4,new Promise((function(t,r){e._scheduleRefreshAuthToken({onCompleted:t,onError:r})}))];case 1:return[2,t.sent()]}}))}))},e}(),h=function(){function e(e){this._authToken=e}return e.prototype.getToken=function(){return this._authToken},e.prototype.handleSecurityException=function(e,t){return!1},e}()},1967:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var r={basic:function(e,t,r){return null!=r?{scheme:"basic",principal:e,credentials:t,realm:r}:{scheme:"basic",principal:e,credentials:t}},kerberos:function(e){return{scheme:"kerberos",principal:"",credentials:e}},bearer:function(e){return{scheme:"bearer",credentials:e}},none:function(){return{scheme:"none"}},custom:function(e,t,r,o,i){var a={scheme:o,principal:e};return n(t)&&(a.credentials=t),n(r)&&(a.realm=r),n(i)&&(a.parameters=i),a}};function n(e){return!(null==e||""===e||Object.getPrototypeOf(e)===Object.prototype&&0===Object.keys(e).length)}t.default=r},6755:function(e,t){var r=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{s(n.next(e))}catch(e){i(e)}}function u(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,u)}s((n=n.apply(e,t||[])).next())}))},n=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(s){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,n=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}},o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},a=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.bookmarkManager=void 0;var u=function(){function e(){throw new Error("Not implemented")}return e.prototype.updateBookmarks=function(e,t){return r(this,void 0,void 0,(function(){return n(this,(function(e){throw new Error("Not implemented")}))}))},e.prototype.getBookmarks=function(){return r(this,void 0,void 0,(function(){return n(this,(function(e){throw new Error("Not implemented")}))}))},e}();t.default=u,t.bookmarkManager=function(e){void 0===e&&(e={});var t=new Set(e.initialBookmarks);return new s(t,e.bookmarksSupplier,e.bookmarksConsumer)};var s=function(){function e(e,t,r){this._bookmarks=e,this._bookmarksSupplier=t,this._bookmarksConsumer=r}return e.prototype.updateBookmarks=function(e,t){return r(this,void 0,void 0,(function(){var r,u,s,c,l,f,h,d,p,v;return n(this,(function(n){switch(n.label){case 0:r=this._bookmarks;try{for(u=o(e),s=u.next();!s.done;s=u.next())f=s.value,r.delete(f)}catch(e){h={error:e}}finally{try{s&&!s.done&&(d=u.return)&&d.call(u)}finally{if(h)throw h.error}}try{for(c=o(t),l=c.next();!l.done;l=c.next())f=l.value,r.add(f)}catch(e){p={error:e}}finally{try{l&&!l.done&&(v=c.return)&&v.call(c)}finally{if(p)throw p.error}}return"function"!=typeof this._bookmarksConsumer?[3,2]:[4,this._bookmarksConsumer(a([],i(r),!1))];case 1:n.sent(),n.label=2;case 2:return[2]}}))}))},e.prototype.getBookmarks=function(){var e;return r(this,void 0,void 0,(function(){var t,r,u,s,c,l,f;return n(this,(function(n){switch(n.label){case 0:return t=new Set(this._bookmarks),"function"!=typeof this._bookmarksSupplier?[3,2]:[4,this._bookmarksSupplier()];case 1:r=null!==(e=n.sent())&&void 0!==e?e:[];try{for(u=o(r),s=u.next();!s.done;s=u.next())c=s.value,t.add(c)}catch(e){l={error:e}}finally{try{s&&!s.done&&(f=u.return)&&f.call(u)}finally{if(l)throw l.error}}n.label=2;case 2:return[2,a([],i(t),!1)]}}))}))},e}()},8264:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),u=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&a(t,e,r);return u(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.resolveCertificateProvider=t.clientCertificateProviders=t.RotatingClientCertificateProvider=t.ClientCertificateProvider=void 0;var c=s(r(4027));t.default=function(){this.certfile="",this.keyfile="",this.password=void 0};var l=function(){function e(){}return e.prototype.hasUpdate=function(){throw new Error("Not Implemented")},e.prototype.getClientCertificate=function(){throw new Error("Not Implemented")},e}();t.ClientCertificateProvider=l;var f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.updateCertificate=function(e){throw new Error("Not implemented")},t}(l);t.RotatingClientCertificateProvider=f;var h=new(function(){function e(){}return e.prototype.rotating=function(e){var t=e.initialCertificate;if(null==t||!d(t))throw new TypeError("initialCertificate should be ClientCertificate, but got ".concat(c.stringify(t)));var r=i({},t);return new b(r)},e}());function d(e){return null!=e&&"object"==typeof e&&"certfile"in e&&(p(t=e.certfile)||v(t,p))&&"keyfile"in e&&function(e){function t(e){return"string"==typeof e||null!=e&&"object"==typeof e&&"path"in e&&"string"==typeof e.path&&y("password",e)}return t(e)||v(e,t)}(e.keyfile)&&y("password",e);var t}function p(e){return"string"==typeof e}function v(e,t,r){return void 0===r&&(r=!1),Array.isArray(e)&&(r||e.length>0)&&e.filter(t).length===e.length}function y(e,t){return!(e in t)||null==t[e]||"string"==typeof t[e]}t.clientCertificateProviders=h,Object.freeze(h),t.resolveCertificateProvider=function(e){if(null!=e){if("object"==typeof e&&"hasUpdate"in e&&"getClientCertificate"in e&&"function"==typeof e.getClientCertificate&&"function"==typeof e.hasUpdate)return e;if(d(e)){var t=i({},e);return{getClientCertificate:function(){return t},hasUpdate:function(){return!1}}}throw new TypeError("clientCertificate should be configured with ClientCertificate or ClientCertificateProvider, but got ".concat(c.stringify(e)))}};var b=function(){function e(e,t){void 0===t&&(t=!1),this._certificate=e,this._updated=t}return e.prototype.hasUpdate=function(){try{return this._updated}finally{this._updated=!1}},e.prototype.getClientCertificate=function(){return this._certificate},e.prototype.updateCertificate=function(e){if(!d(e))throw new TypeError("certificate should be ClientCertificate, but got ".concat(c.stringify(e)));this._certificate=i({},e),this._updated=!0},e}()},2007:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Releasable=void 0;var r=function(){function e(){}return e.prototype.release=function(){throw new Error("Not implemented")},e}();t.Releasable=r;var n=function(){function e(){}return e.prototype.acquireConnection=function(e){throw Error("Not implemented")},e.prototype.supportsMultiDb=function(){throw Error("Not implemented")},e.prototype.supportsTransactionConfig=function(){throw Error("Not implemented")},e.prototype.supportsUserImpersonation=function(){throw Error("Not implemented")},e.prototype.supportsSessionAuth=function(){throw Error("Not implemented")},e.prototype.verifyConnectivityAndGetServerInfo=function(e){throw Error("Not implemented")},e.prototype.verifyAuthentication=function(e){throw Error("Not implemented")},e.prototype.getNegotiatedProtocolVersion=function(){throw Error("Not Implemented")},e.prototype.close=function(){throw Error("Not implemented")},e}();t.default=n},1409:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}return e.prototype.beginTransaction=function(e){throw new Error("Not implemented")},e.prototype.run=function(e,t,r){throw new Error("Not implemented")},e.prototype.commitTransaction=function(e){throw new Error("Not implemented")},e.prototype.rollbackTransaction=function(e){throw new Error("Not implemented")},e.prototype.resetAndFlush=function(){throw new Error("Not implemented")},e.prototype.isOpen=function(){throw new Error("Not implemented")},e.prototype.getProtocolVersion=function(){throw new Error("Not implemented")},e.prototype.hasOngoingObservableRequests=function(){throw new Error("Not implemented")},e}();t.default=r},7264:function(e,t,r){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{s(n.next(e))}catch(e){i(e)}}function u(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,u)}s((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(s){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,n=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.QueryConfig=t.SessionConfig=t.routing=t.WRITE=t.READ=t.Driver=void 0;var a=r(9730),u=i(r(8341)),s=r(326),c=r(4883),l=i(r(5481)),f=r(6587),h=r(6755),d=i(r(1573)),p=i(r(7041)),v=r(9691),y=s.ACCESS_MODE_READ;t.READ=y;var b=s.ACCESS_MODE_WRITE;t.WRITE=b;var m=0;t.SessionConfig=function(){this.defaultAccessMode=b,this.bookmarks=[],this.database="",this.impersonatedUser=void 0,this.auth=void 0,this.fetchSize=void 0,this.bookmarkManager=void 0,this.notificationFilter=void 0};var g={WRITE:"WRITE",READ:"READ"};t.routing=g,Object.freeze(g);t.QueryConfig=function(){this.routing=g.WRITE,this.resultTransformer=void 0,this.database="",this.impersonatedUser=void 0,this.bookmarkManager=void 0,this.transactionConfig=void 0,this.auth=void 0,this.signal=void 0};var _=function(){function e(e,t,r,n,o){void 0===t&&(t={}),void 0===n&&(n=function(e){return new l.default(e)}),void 0===o&&(o=function(e){return new p.default(e)}),function(e){e.maxConnectionLifetime=w(e.maxConnectionLifetime,36e5),e.maxConnectionPoolSize=w(e.maxConnectionPoolSize,s.DEFAULT_POOL_MAX_SIZE),e.connectionAcquisitionTimeout=w(e.connectionAcquisitionTimeout,s.DEFAULT_POOL_ACQUISITION_TIMEOUT),e.fetchSize=O(e.fetchSize,1e3),e.connectionTimeout=function(e){var t=parseInt(e.connectionTimeout,10);return 0===t||!isNaN(t)&&t<0?null:isNaN(t)?s.DEFAULT_CONNECTION_TIMEOUT_MILLIS:t}(e),e.connectionLivenessCheckTimeout=function(e){if(null!=e){var t=parseInt(e,10);if(t<0||Number.isNaN(t))throw new Error("The connectionLivenessCheckTimeout can only be a positive value or 0 for always. However connectionLivenessCheckTimeout = ".concat(t));return t}}(e.connectionLivenessCheckTimeout)}(t);var i=c.Logger.create(t);!function(e,t){var r,n,o=e.resolver;if(null!=o&&"function"!=typeof o)throw new TypeError("Configured resolver should be a function. Got: ".concat(typeof o));if(e.connectionAcquisitionTimeout<e.connectionTimeout&&t.warn('Configuration for "connectionAcquisitionTimeout" should be greater than or equal to "connectionTimeout". Otherwise, the connection acquisition timeout will take precedence for over the connection timeout in scenarios where a new connection is created while it is acquired'),null!=(null===(r=e.notificationFilter)||void 0===r?void 0:r.disabledCategories)&&null!=(null===(n=e.notificationFilter)||void 0===n?void 0:n.disabledClassifications))throw new Error('The notificationFilter can\'t have both "disabledCategories" and "disabledClassifications" configured at the same time.')}(t,i),this._id=m++,this._meta=e,this._config=t,this._log=i,this._createConnectionProvider=r,this._createSession=n,this._defaultExecuteQueryBookmarkManager=(0,h.bookmarkManager)(),this._queryExecutor=o(this.session.bind(this)),this._connectionProvider=null,this._afterConstruction()}return Object.defineProperty(e.prototype,"executeQueryBookmarkManager",{get:function(){return this._defaultExecuteQueryBookmarkManager},enumerable:!1,configurable:!0}),e.prototype.executeQuery=function(e,t,r){var i,a,u;return void 0===r&&(r={}),n(this,void 0,void 0,(function(){var n,s,c;return o(this,(function(o){switch(o.label){case 0:if(n=null===r.bookmarkManager?void 0:null!==(i=r.bookmarkManager)&&void 0!==i?i:this.executeQueryBookmarkManager,s=null!==(a=r.resultTransformer)&&void 0!==a?a:d.default.eagerResultTransformer(),(c=null!==(u=r.routing)&&void 0!==u?u:g.WRITE)!==g.READ&&c!==g.WRITE)throw(0,v.newError)('Illegal query routing config: "'.concat(c,'"'));return[4,this._queryExecutor.execute({resultTransformer:s,bookmarkManager:n,routing:c,database:r.database,impersonatedUser:r.impersonatedUser,transactionConfig:r.transactionConfig,auth:r.auth,signal:r.signal},e,t)];case 1:return[2,o.sent()]}}))}))},e.prototype.verifyConnectivity=function(e){var t=(void 0===e?{}:e).database,r=void 0===t?"":t;return this._getOrCreateConnectionProvider().verifyConnectivityAndGetServerInfo({database:r,accessMode:y})},e.prototype.verifyAuthentication=function(e){var t=void 0===e?{}:e,r=t.database,i=t.auth;return n(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this._getOrCreateConnectionProvider().verifyAuthentication({database:null!=r?r:"system",auth:i,accessMode:y})];case 1:return[2,e.sent()]}}))}))},e.prototype.getServerInfo=function(e){var t=(void 0===e?{}:e).database,r=void 0===t?"":t;return this._getOrCreateConnectionProvider().verifyConnectivityAndGetServerInfo({database:r,accessMode:y})},e.prototype.supportsMultiDb=function(){return this._getOrCreateConnectionProvider().supportsMultiDb()},e.prototype.supportsTransactionConfig=function(){return this._getOrCreateConnectionProvider().supportsTransactionConfig()},e.prototype.supportsUserImpersonation=function(){return this._getOrCreateConnectionProvider().supportsUserImpersonation()},e.prototype.supportsSessionAuth=function(){return this._getOrCreateConnectionProvider().supportsSessionAuth()},e.prototype.getNegotiatedProtocolVersion=function(){return this._getOrCreateConnectionProvider().getNegotiatedProtocolVersion()},e.prototype.isEncrypted=function(){return this._isEncrypted()},e.prototype._supportsRouting=function(){return this._meta.routing},e.prototype._isEncrypted=function(){return this._config.encrypted===f.ENCRYPTION_ON||!0===this._config.encrypted},e.prototype._getTrust=function(){return this._config.trust},e.prototype.session=function(e){var t=void 0===e?{}:e,r=t.defaultAccessMode,n=void 0===r?b:r,o=t.bookmarks,i=t.database,a=void 0===i?"":i,u=t.impersonatedUser,s=t.fetchSize,c=t.bookmarkManager,l=t.notificationFilter,f=t.auth;return this._newSession({defaultAccessMode:n,bookmarkOrBookmarks:o,database:a,reactive:!1,impersonatedUser:u,fetchSize:O(s,this._config.fetchSize),bookmarkManager:c,notificationFilter:l,auth:f})},e.prototype.close=function(){return this._log.info("Driver ".concat(this._id," closing")),null!=this._connectionProvider?this._connectionProvider.close():Promise.resolve()},e.prototype[Symbol.asyncDispose]=function(){return this.close()},e.prototype._afterConstruction=function(){this._log.info("".concat(this._meta.typename," driver ").concat(this._id," created for server address ").concat(this._meta.address.toString()))},e.prototype._newSession=function(e){var t=e.defaultAccessMode,r=e.bookmarkOrBookmarks,n=e.database,o=e.reactive,i=e.impersonatedUser,u=e.fetchSize,s=e.bookmarkManager,c=e.notificationFilter,f=e.auth,h=l.default._validateSessionMode(t),d=this._getOrCreateConnectionProvider(),p=null!=r?new a.Bookmarks(r):a.Bookmarks.empty();return this._createSession({mode:h,database:null!=n?n:"",connectionProvider:d,bookmarks:p,config:this._config,reactive:o,impersonatedUser:i,fetchSize:u,bookmarkManager:s,notificationFilter:c,auth:f,log:this._log})},e.prototype._getOrCreateConnectionProvider=function(){var e;return null==this._connectionProvider&&(this._connectionProvider=this._createConnectionProvider(this._id,this._config,this._log,(e=this._config,new u.default(e.resolver)))),this._connectionProvider},e}();function w(e,t){var r=parseInt(e,10);return r>0||0===r?r:r<0?Number.MAX_SAFE_INTEGER:t}function O(e,t){var r=parseInt(e,10);if(r>0||r===s.FETCH_ALL)return r;if(0===r||r<0)throw new Error("The fetch size can only be a positive value or ".concat(s.FETCH_ALL," for ALL. However fetchSize = ").concat(r));return t}t.Driver=_,t.default=_},9691:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),u=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&i(t,e,r);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.PROTOCOL_ERROR=t.SESSION_EXPIRED=t.SERVICE_UNAVAILABLE=t.GQLError=t.Neo4jError=t.isRetriableError=t.newGQLError=t.newError=void 0;var s=u(r(4027)),c=r(1053),l={DATABASE_ERROR:"DATABASE_ERROR",CLIENT_ERROR:"CLIENT_ERROR",TRANSIENT_ERROR:"TRANSIENT_ERROR",UNKNOWN:"UNKNOWN"};Object.freeze(l);var f=Object.values(l),h="ServiceUnavailable";t.SERVICE_UNAVAILABLE=h;var d="SessionExpired";t.SESSION_EXPIRED=d,t.PROTOCOL_ERROR="ProtocolError";var p=function(e){function t(r,n,o,i,a){var u,s=this;return(s=e.call(this,r,null!=a?{cause:a}:void 0)||this).constructor=t,s.__proto__=t.prototype,s.cause=null!=a?a:void 0,s.gqlStatus=n,s.gqlStatusDescription=o,s.diagnosticRecord=i,s.classification=function(e){return void 0===e||void 0===e._classification?"UNKNOWN":f.includes(e._classification)?null==e?void 0:e._classification:"UNKNOWN"}(s.diagnosticRecord),s.rawClassification=null!==(u=null==i?void 0:i._classification)&&void 0!==u?u:void 0,s.name="GQLError",s}return o(t,e),Object.defineProperty(t.prototype,"diagnosticRecordAsJsonString",{get:function(){return s.stringify(this.diagnosticRecord,{useCustomToString:!0})},enumerable:!1,configurable:!0}),t}(Error);t.GQLError=p;var v=function(e){function t(r,n,o,i,a,u){var s=e.call(this,r,o,i,a,u)||this;return s.constructor=t,s.__proto__=t.prototype,s.code=n,s.name="Neo4jError",s.retriable=function(e){return e===h||e===d||function(e){return"Neo.ClientError.Security.AuthorizationExpired"===e}(e)||function(e){return!0===(null==e?void 0:e.includes("TransientError"))}(e)}(n),s}return o(t,e),t.isRetriable=function(e){return null!=e&&e instanceof t&&e.retriable},t}(p);t.Neo4jError=v,t.newError=function(e,t,r,n,o,i){return new v(e,null!=t?t:"N/A",null!=n?n:"50N42",null!=o?o:"error: general processing exception - unexpected error. "+e,null!=i?i:c.rawPolyfilledDiagnosticRecord,r)},t.newGQLError=function(e,t,r,n,o){return new p(e,null!=r?r:"50N42",null!=n?n:"error: general processing exception - unexpected error. "+e,null!=o?o:c.rawPolyfilledDiagnosticRecord,t)};var y=v.isRetriable;t.isRetriableError=y},1053:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.rawPolyfilledDiagnosticRecord=void 0,t.rawPolyfilledDiagnosticRecord={OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"},Object.freeze(t.rawPolyfilledDiagnosticRecord)},1517:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isPathSegment=t.PathSegment=t.isPath=t.Path=t.isUnboundRelationship=t.UnboundRelationship=t.isRelationship=t.Relationship=t.isNode=t.Node=void 0;var n=r(4027),o={value:!0,enumerable:!1,configurable:!1,writable:!1},i="__isNode__",a="__isRelationship__",u="__isUnboundRelationship__",s="__isPath__",c="__isPathSegment__";function l(e,t){return null!=e&&!0===e[t]}var f=function(){function e(e,t,r,n){this.identity=e,this.labels=t,this.properties=r,this.elementId=y(n,(function(){return e.toString()}))}return e.prototype.toString=function(){for(var e="("+this.elementId,t=0;t<this.labels.length;t++)e+=":"+this.labels[t];var r=Object.keys(this.properties);if(r.length>0){for(e+=" {",t=0;t<r.length;t++)t>0&&(e+=","),e+=r[t]+":"+(0,n.stringify)(this.properties[r[t]]);e+="}"}return e+")"},e}();t.Node=f,Object.defineProperty(f.prototype,i,o),t.isNode=function(e){return l(e,i)};var h=function(){function e(e,t,r,n,o,i,a,u){this.identity=e,this.start=t,this.end=r,this.type=n,this.properties=o,this.elementId=y(i,(function(){return e.toString()})),this.startNodeElementId=y(a,(function(){return t.toString()})),this.endNodeElementId=y(u,(function(){return r.toString()}))}return e.prototype.toString=function(){var e="("+this.startNodeElementId+")-[:"+this.type,t=Object.keys(this.properties);if(t.length>0){e+=" {";for(var r=0;r<t.length;r++)r>0&&(e+=","),e+=t[r]+":"+(0,n.stringify)(this.properties[t[r]]);e+="}"}return e+"]->("+this.endNodeElementId+")"},e}();t.Relationship=h,Object.defineProperty(h.prototype,a,o),t.isRelationship=function(e){return l(e,a)};var d=function(){function e(e,t,r,n){this.identity=e,this.type=t,this.properties=r,this.elementId=y(n,(function(){return e.toString()}))}return e.prototype.bind=function(e,t){return new h(this.identity,e,t,this.type,this.properties,this.elementId)},e.prototype.bindTo=function(e,t){return new h(this.identity,e.identity,t.identity,this.type,this.properties,this.elementId,e.elementId,t.elementId)},e.prototype.toString=function(){var e="-[:"+this.type,t=Object.keys(this.properties);if(t.length>0){e+=" {";for(var r=0;r<t.length;r++)r>0&&(e+=","),e+=t[r]+":"+(0,n.stringify)(this.properties[t[r]]);e+="}"}return e+"]->"},e}();t.UnboundRelationship=d,Object.defineProperty(d.prototype,u,o),t.isUnboundRelationship=function(e){return l(e,u)};var p=function(e,t,r){this.start=e,this.relationship=t,this.end=r};t.PathSegment=p,Object.defineProperty(p.prototype,c,o),t.isPathSegment=function(e){return l(e,c)};var v=function(e,t,r){this.start=e,this.end=t,this.segments=r,this.length=r.length};function y(e,t){return null==e?t():e}t.Path=v,Object.defineProperty(v.prototype,s,o),t.isPath=function(e){return l(e,s)}},9305:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.EagerResult=t.Result=t.Stats=t.QueryStatistics=t.ProfiledPlan=t.Plan=t.GqlStatusObject=t.Notification=t.ServerInfo=t.queryType=t.ResultSummary=t.Record=t.isPathSegment=t.PathSegment=t.isPath=t.Path=t.isUnboundRelationship=t.UnboundRelationship=t.isRelationship=t.Relationship=t.isNode=t.Node=t.Time=t.LocalTime=t.LocalDateTime=t.isTime=t.isLocalTime=t.isLocalDateTime=t.isDuration=t.isDateTime=t.isDate=t.Duration=t.DateTime=t.Date=t.Point=t.isPoint=t.internal=t.toString=t.toNumber=t.inSafeRange=t.isInt=t.int=t.Integer=t.error=t.isRetriableError=t.GQLError=t.newGQLError=t.Neo4jError=t.newError=t.authTokenManagers=void 0,t.resolveCertificateProvider=t.clientCertificateProviders=t.notificationFilterMinimumSeverityLevel=t.notificationFilterDisabledClassification=t.notificationFilterDisabledCategory=t.notificationSeverityLevel=t.notificationClassification=t.notificationCategory=t.resultTransformers=t.routing=t.staticAuthTokenManager=t.bookmarkManager=t.auth=t.json=t.driver=t.types=t.Driver=t.Session=t.TransactionPromise=t.ManagedTransaction=t.Transaction=t.Connection=t.Releasable=t.ConnectionProvider=void 0;var u=r(9691);Object.defineProperty(t,"newError",{enumerable:!0,get:function(){return u.newError}}),Object.defineProperty(t,"Neo4jError",{enumerable:!0,get:function(){return u.Neo4jError}}),Object.defineProperty(t,"newGQLError",{enumerable:!0,get:function(){return u.newGQLError}}),Object.defineProperty(t,"GQLError",{enumerable:!0,get:function(){return u.GQLError}}),Object.defineProperty(t,"isRetriableError",{enumerable:!0,get:function(){return u.isRetriableError}});var s=i(r(3371));t.Integer=s.default,Object.defineProperty(t,"int",{enumerable:!0,get:function(){return s.int}}),Object.defineProperty(t,"isInt",{enumerable:!0,get:function(){return s.isInt}}),Object.defineProperty(t,"inSafeRange",{enumerable:!0,get:function(){return s.inSafeRange}}),Object.defineProperty(t,"toNumber",{enumerable:!0,get:function(){return s.toNumber}}),Object.defineProperty(t,"toString",{enumerable:!0,get:function(){return s.toString}});var c=r(5459);Object.defineProperty(t,"Date",{enumerable:!0,get:function(){return c.Date}}),Object.defineProperty(t,"DateTime",{enumerable:!0,get:function(){return c.DateTime}}),Object.defineProperty(t,"Duration",{enumerable:!0,get:function(){return c.Duration}}),Object.defineProperty(t,"isDate",{enumerable:!0,get:function(){return c.isDate}}),Object.defineProperty(t,"isDateTime",{enumerable:!0,get:function(){return c.isDateTime}}),Object.defineProperty(t,"isDuration",{enumerable:!0,get:function(){return c.isDuration}}),Object.defineProperty(t,"isLocalDateTime",{enumerable:!0,get:function(){return c.isLocalDateTime}}),Object.defineProperty(t,"isLocalTime",{enumerable:!0,get:function(){return c.isLocalTime}}),Object.defineProperty(t,"isTime",{enumerable:!0,get:function(){return c.isTime}}),Object.defineProperty(t,"LocalDateTime",{enumerable:!0,get:function(){return c.LocalDateTime}}),Object.defineProperty(t,"LocalTime",{enumerable:!0,get:function(){return c.LocalTime}}),Object.defineProperty(t,"Time",{enumerable:!0,get:function(){return c.Time}});var l=r(1517);Object.defineProperty(t,"Node",{enumerable:!0,get:function(){return l.Node}}),Object.defineProperty(t,"isNode",{enumerable:!0,get:function(){return l.isNode}}),Object.defineProperty(t,"Relationship",{enumerable:!0,get:function(){return l.Relationship}}),Object.defineProperty(t,"isRelationship",{enumerable:!0,get:function(){return l.isRelationship}}),Object.defineProperty(t,"UnboundRelationship",{enumerable:!0,get:function(){return l.UnboundRelationship}}),Object.defineProperty(t,"isUnboundRelationship",{enumerable:!0,get:function(){return l.isUnboundRelationship}}),Object.defineProperty(t,"Path",{enumerable:!0,get:function(){return l.Path}}),Object.defineProperty(t,"isPath",{enumerable:!0,get:function(){return l.isPath}}),Object.defineProperty(t,"PathSegment",{enumerable:!0,get:function(){return l.PathSegment}}),Object.defineProperty(t,"isPathSegment",{enumerable:!0,get:function(){return l.isPathSegment}});var f=a(r(4820));t.Record=f.default;var h=r(7093);Object.defineProperty(t,"isPoint",{enumerable:!0,get:function(){return h.isPoint}}),Object.defineProperty(t,"Point",{enumerable:!0,get:function(){return h.Point}});var d=i(r(6033));t.ResultSummary=d.default,Object.defineProperty(t,"queryType",{enumerable:!0,get:function(){return d.queryType}}),Object.defineProperty(t,"ServerInfo",{enumerable:!0,get:function(){return d.ServerInfo}}),Object.defineProperty(t,"Plan",{enumerable:!0,get:function(){return d.Plan}}),Object.defineProperty(t,"ProfiledPlan",{enumerable:!0,get:function(){return d.ProfiledPlan}}),Object.defineProperty(t,"QueryStatistics",{enumerable:!0,get:function(){return d.QueryStatistics}}),Object.defineProperty(t,"Stats",{enumerable:!0,get:function(){return d.Stats}});var p=i(r(1866));t.Notification=p.default,Object.defineProperty(t,"GqlStatusObject",{enumerable:!0,get:function(){return p.GqlStatusObject}}),Object.defineProperty(t,"notificationCategory",{enumerable:!0,get:function(){return p.notificationCategory}}),Object.defineProperty(t,"notificationClassification",{enumerable:!0,get:function(){return p.notificationClassification}}),Object.defineProperty(t,"notificationSeverityLevel",{enumerable:!0,get:function(){return p.notificationSeverityLevel}});var v=r(1985);Object.defineProperty(t,"notificationFilterDisabledCategory",{enumerable:!0,get:function(){return v.notificationFilterDisabledCategory}}),Object.defineProperty(t,"notificationFilterDisabledClassification",{enumerable:!0,get:function(){return v.notificationFilterDisabledClassification}}),Object.defineProperty(t,"notificationFilterMinimumSeverityLevel",{enumerable:!0,get:function(){return v.notificationFilterMinimumSeverityLevel}});var y=a(r(9512));t.Result=y.default;var b=a(r(8917));t.EagerResult=b.default;var m=i(r(2007));t.ConnectionProvider=m.default,Object.defineProperty(t,"Releasable",{enumerable:!0,get:function(){return m.Releasable}});var g=a(r(1409));t.Connection=g.default;var _=a(r(9473));t.Transaction=_.default;var w=a(r(5909));t.ManagedTransaction=w.default;var O=a(r(4569));t.TransactionPromise=O.default;var S=a(r(5481));t.Session=S.default;var E=i(r(7264)),P=E;t.Driver=E.default,t.driver=P;var x=a(r(1967));t.auth=x.default;var T=r(6755);Object.defineProperty(t,"bookmarkManager",{enumerable:!0,get:function(){return T.bookmarkManager}});var j=r(2069);Object.defineProperty(t,"authTokenManagers",{enumerable:!0,get:function(){return j.authTokenManagers}}),Object.defineProperty(t,"staticAuthTokenManager",{enumerable:!0,get:function(){return j.staticAuthTokenManager}});var C=r(7264);Object.defineProperty(t,"routing",{enumerable:!0,get:function(){return C.routing}});var A=i(r(6872));t.types=A;var k=i(r(4027));t.json=k;var R=a(r(1573));t.resultTransformers=R.default;var I=r(8264);Object.defineProperty(t,"clientCertificateProviders",{enumerable:!0,get:function(){return I.clientCertificateProviders}}),Object.defineProperty(t,"resolveCertificateProvider",{enumerable:!0,get:function(){return I.resolveCertificateProvider}});var M=i(r(6995));t.internal=M;var N={SERVICE_UNAVAILABLE:u.SERVICE_UNAVAILABLE,SESSION_EXPIRED:u.SESSION_EXPIRED,PROTOCOL_ERROR:u.PROTOCOL_ERROR};t.error=N;var D={authTokenManagers:j.authTokenManagers,newError:u.newError,Neo4jError:u.Neo4jError,newGQLError:u.newGQLError,GQLError:u.GQLError,isRetriableError:u.isRetriableError,error:N,Integer:s.default,int:s.int,isInt:s.isInt,inSafeRange:s.inSafeRange,toNumber:s.toNumber,toString:s.toString,internal:M,isPoint:h.isPoint,Point:h.Point,Date:c.Date,DateTime:c.DateTime,Duration:c.Duration,isDate:c.isDate,isDateTime:c.isDateTime,isDuration:c.isDuration,isLocalDateTime:c.isLocalDateTime,isLocalTime:c.isLocalTime,isTime:c.isTime,LocalDateTime:c.LocalDateTime,LocalTime:c.LocalTime,Time:c.Time,Node:l.Node,isNode:l.isNode,Relationship:l.Relationship,isRelationship:l.isRelationship,UnboundRelationship:l.UnboundRelationship,isUnboundRelationship:l.isUnboundRelationship,Path:l.Path,isPath:l.isPath,PathSegment:l.PathSegment,isPathSegment:l.isPathSegment,Record:f.default,ResultSummary:d.default,queryType:d.queryType,ServerInfo:d.ServerInfo,Notification:p.default,GqlStatusObject:p.GqlStatusObject,Plan:d.Plan,ProfiledPlan:d.ProfiledPlan,QueryStatistics:d.QueryStatistics,Stats:d.Stats,Result:y.default,EagerResult:b.default,Transaction:_.default,ManagedTransaction:w.default,TransactionPromise:O.default,Session:S.default,Driver:E.default,Connection:g.default,Releasable:m.Releasable,types:A,driver:P,json:k,auth:x.default,bookmarkManager:T.bookmarkManager,routing:C.routing,resultTransformers:R.default,notificationCategory:p.notificationCategory,notificationClassification:p.notificationClassification,notificationSeverityLevel:p.notificationSeverityLevel,notificationFilterDisabledCategory:v.notificationFilterDisabledCategory,notificationFilterDisabledClassification:v.notificationFilterDisabledClassification,notificationFilterMinimumSeverityLevel:v.notificationFilterMinimumSeverityLevel,clientCertificateProviders:I.clientCertificateProviders,resolveCertificateProvider:I.resolveCertificateProvider};t.default=D},3371:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.toString=t.toNumber=t.inSafeRange=t.isInt=t.int=void 0;var n=r(9691),o=new Map,i=function(){function e(e,t){this.low=null!=e?e:0,this.high=null!=t?t:0}return e.prototype.inSafeRange=function(){return this.greaterThanOrEqual(e.MIN_SAFE_VALUE)&&this.lessThanOrEqual(e.MAX_SAFE_VALUE)},e.prototype.toInt=function(){return this.low},e.prototype.toNumber=function(){return this.high*u+(this.low>>>0)},e.prototype.toBigInt=function(){if(this.isZero())return BigInt(0);if(this.isPositive())return BigInt(this.high>>>0)*BigInt(u)+BigInt(this.low>>>0);var e=this.negate();return BigInt(-1)*(BigInt(e.high>>>0)*BigInt(u)+BigInt(e.low>>>0))},e.prototype.toNumberOrInfinity=function(){return this.lessThan(e.MIN_SAFE_VALUE)?Number.NEGATIVE_INFINITY:this.greaterThan(e.MAX_SAFE_VALUE)?Number.POSITIVE_INFINITY:this.toNumber()},e.prototype.toString=function(t){if((t=null!=t?t:10)<2||t>36)throw RangeError("radix out of range: "+t.toString());if(this.isZero())return"0";var r;if(this.isNegative()){if(this.equals(e.MIN_VALUE)){var n=e.fromNumber(t),o=this.div(n);return r=o.multiply(n).subtract(this),o.toString(t)+r.toInt().toString(t)}return"-"+this.negate().toString(t)}var i=e.fromNumber(Math.pow(t,6));r=this;for(var a="";;){var u=r.div(i),s=(r.subtract(u.multiply(i)).toInt()>>>0).toString(t);if((r=u).isZero())return s+a;for(;s.length<6;)s="0"+s;a=""+s+a}},e.prototype.valueOf=function(){return this.toBigInt()},e.prototype.getHighBits=function(){return this.high},e.prototype.getLowBits=function(){return this.low},e.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.equals(e.MIN_VALUE)?64:this.negate().getNumBitsAbs();var t=0!==this.high?this.high:this.low,r=0;for(r=31;r>0&&0==(t&1<<r);r--);return 0!==this.high?r+33:r+1},e.prototype.isZero=function(){return 0===this.high&&0===this.low},e.prototype.isNegative=function(){return this.high<0},e.prototype.isPositive=function(){return this.high>=0},e.prototype.isOdd=function(){return 1==(1&this.low)},e.prototype.isEven=function(){return 0==(1&this.low)},e.prototype.equals=function(t){var r=e.fromValue(t);return this.high===r.high&&this.low===r.low},e.prototype.notEquals=function(e){return!this.equals(e)},e.prototype.lessThan=function(e){return this.compare(e)<0},e.prototype.lessThanOrEqual=function(e){return this.compare(e)<=0},e.prototype.greaterThan=function(e){return this.compare(e)>0},e.prototype.greaterThanOrEqual=function(e){return this.compare(e)>=0},e.prototype.compare=function(t){var r=e.fromValue(t);if(this.equals(r))return 0;var n=this.isNegative(),o=r.isNegative();return n&&!o?-1:!n&&o?1:this.subtract(r).isNegative()?-1:1},e.prototype.negate=function(){return this.equals(e.MIN_VALUE)?e.MIN_VALUE:this.not().add(e.ONE)},e.prototype.add=function(t){var r=e.fromValue(t),n=this.high>>>16,o=65535&this.high,i=this.low>>>16,a=65535&this.low,u=r.high>>>16,s=65535&r.high,c=r.low>>>16,l=0,f=0,h=0,d=0;return h+=(d+=a+(65535&r.low))>>>16,d&=65535,f+=(h+=i+c)>>>16,h&=65535,l+=(f+=o+s)>>>16,f&=65535,l+=n+u,l&=65535,e.fromBits(h<<16|d,l<<16|f)},e.prototype.subtract=function(t){var r=e.fromValue(t);return this.add(r.negate())},e.prototype.multiply=function(t){if(this.isZero())return e.ZERO;var r=e.fromValue(t);if(r.isZero())return e.ZERO;if(this.equals(e.MIN_VALUE))return r.isOdd()?e.MIN_VALUE:e.ZERO;if(r.equals(e.MIN_VALUE))return this.isOdd()?e.MIN_VALUE:e.ZERO;if(this.isNegative())return r.isNegative()?this.negate().multiply(r.negate()):this.negate().multiply(r).negate();if(r.isNegative())return this.multiply(r.negate()).negate();if(this.lessThan(c)&&r.lessThan(c))return e.fromNumber(this.toNumber()*r.toNumber());var n=this.high>>>16,o=65535&this.high,i=this.low>>>16,a=65535&this.low,u=r.high>>>16,s=65535&r.high,l=r.low>>>16,f=65535&r.low,h=0,d=0,p=0,v=0;return p+=(v+=a*f)>>>16,v&=65535,d+=(p+=i*f)>>>16,p&=65535,d+=(p+=a*l)>>>16,p&=65535,h+=(d+=o*f)>>>16,d&=65535,h+=(d+=i*l)>>>16,d&=65535,h+=(d+=a*s)>>>16,d&=65535,h+=n*f+o*l+i*s+a*u,h&=65535,e.fromBits(p<<16|v,h<<16|d)},e.prototype.div=function(t){var r,o,i,a=e.fromValue(t);if(a.isZero())throw(0,n.newError)("division by zero");if(this.isZero())return e.ZERO;if(this.equals(e.MIN_VALUE))return a.equals(e.ONE)||a.equals(e.NEG_ONE)?e.MIN_VALUE:a.equals(e.MIN_VALUE)?e.ONE:(r=this.shiftRight(1).div(a).shiftLeft(1)).equals(e.ZERO)?a.isNegative()?e.ONE:e.NEG_ONE:(o=this.subtract(a.multiply(r)),i=r.add(o.div(a)));if(a.equals(e.MIN_VALUE))return e.ZERO;if(this.isNegative())return a.isNegative()?this.negate().div(a.negate()):this.negate().div(a).negate();if(a.isNegative())return this.div(a.negate()).negate();for(i=e.ZERO,o=this;o.greaterThanOrEqual(a);){r=Math.max(1,Math.floor(o.toNumber()/a.toNumber()));for(var u=Math.ceil(Math.log(r)/Math.LN2),s=u<=48?1:Math.pow(2,u-48),c=e.fromNumber(r),l=c.multiply(a);l.isNegative()||l.greaterThan(o);)r-=s,l=(c=e.fromNumber(r)).multiply(a);c.isZero()&&(c=e.ONE),i=i.add(c),o=o.subtract(l)}return i},e.prototype.modulo=function(t){var r=e.fromValue(t);return this.subtract(this.div(r).multiply(r))},e.prototype.not=function(){return e.fromBits(~this.low,~this.high)},e.prototype.and=function(t){var r=e.fromValue(t);return e.fromBits(this.low&r.low,this.high&r.high)},e.prototype.or=function(t){var r=e.fromValue(t);return e.fromBits(this.low|r.low,this.high|r.high)},e.prototype.xor=function(t){var r=e.fromValue(t);return e.fromBits(this.low^r.low,this.high^r.high)},e.prototype.shiftLeft=function(t){var r=e.toNumber(t);return 0==(r&=63)?e.ZERO:r<32?e.fromBits(this.low<<r,this.high<<r|this.low>>>32-r):e.fromBits(0,this.low<<r-32)},e.prototype.shiftRight=function(t){var r=e.toNumber(t),n=e.toNumber(t);return 0==(r&=63)?e.ZERO:n<32?e.fromBits(this.low>>>r|this.high<<32-r,this.high>>r):e.fromBits(this.high>>r-32,this.high>=0?0:-1)},e.isInteger=function(e){return!0===(null==e?void 0:e.__isInteger__)},e.fromInt=function(t){var r;if((t|=0)>=-128&&t<128&&null!=(r=o.get(t)))return r;var n=new e(t,t<0?-1:0);return t>=-128&&t<128&&o.set(t,n),n},e.fromBits=function(t,r){return new e(t,r)},e.fromNumber=function(t){return isNaN(t)||!isFinite(t)?e.ZERO:t<=-s?e.MIN_VALUE:t+1>=s?e.MAX_VALUE:t<0?e.fromNumber(-t).negate():new e(t%u|0,t/u|0)},e.fromString=function(t,r,o){var i,u=(void 0===o?{}:o).strictStringValidation;if(0===t.length)throw(0,n.newError)("number format error: empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return e.ZERO;if((r=null!=r?r:10)<2||r>36)throw(0,n.newError)("radix out of range: "+r.toString());if((i=t.indexOf("-"))>0)throw(0,n.newError)('number format error: interior "-" character: '+t);if(0===i)return e.fromString(t.substring(1),r).negate();for(var s=e.fromNumber(Math.pow(r,8)),c=e.ZERO,l=0;l<t.length;l+=8){var f=Math.min(8,t.length-l),h=t.substring(l,l+f),d=parseInt(h,r);if(!0===u&&!a(h,d,r))throw(0,n.newError)('number format error: "'.concat(h,'" is NaN in radix ').concat(r,": ").concat(t));if(f<8){var p=e.fromNumber(Math.pow(r,f));c=c.multiply(p).add(e.fromNumber(d))}else c=(c=c.multiply(s)).add(e.fromNumber(d))}return c},e.fromValue=function(t,r){return void 0===r&&(r={}),t instanceof e?t:"number"==typeof t?(!0===r.ceilFloat&&(t=Math.ceil(t)),e.fromNumber(t)):"string"==typeof t?e.fromString(t,void 0,r):"bigint"==typeof t?e.fromString(t.toString()):new e(t.low,t.high)},e.toNumber=function(t){switch(typeof t){case"number":return t;case"bigint":return Number(t);default:return e.fromValue(t).toNumber()}},e.toString=function(t,r){return e.fromValue(t).toString(r)},e.inSafeRange=function(t){return e.fromValue(t).inSafeRange()},e.ZERO=e.fromInt(0),e.ONE=e.fromInt(1),e.NEG_ONE=e.fromInt(-1),e.MAX_VALUE=e.fromBits(-1,2147483647),e.MIN_VALUE=e.fromBits(0,-2147483648),e.MIN_SAFE_VALUE=e.fromBits(1,-2097152),e.MAX_SAFE_VALUE=e.fromBits(-1,2097151),e.__isInteger__=!0,e}();function a(e,t,r){return!Number.isNaN(e)&&!Number.isNaN(t)&&function(e,t,r){var n=e.toString(t),o=Math.max(r-n.length,0),i="0".repeat(o);return"".concat(i).concat(n)}(t,r,e.length)===e.toLowerCase()}Object.defineProperty(i.prototype,"__isInteger__",{value:!0,enumerable:!1,configurable:!1});var u=4294967296,s=u*u/2,c=i.fromInt(1<<24),l=i.fromValue;t.int=l;var f=i.isInteger;t.isInt=f;var h=i.inSafeRange;t.inSafeRange=h;var d=i.toNumber;t.toNumber=d;var p=i.toString;t.toString=p,t.default=i},5837:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.fromVersion=void 0,t.fromVersion=function(e,t){void 0===t&&(t=function(){return{get userAgent(){}}});var r=t(),n=null!=r.userAgent?r.userAgent.split("(")[1].split(")")[0]:void 0,o=r.userAgent||void 0;return{product:"neo4j-javascript/".concat(e),platform:n,languageDetails:o}}},3488:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(5837),t)},9730:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},a=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},u=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.Bookmarks=void 0;var s=i(r(6587)),c=function(){function e(e){this._values=function(e){if(null==e||""===e)return[];if(s.isString(e))return[e];if(Array.isArray(e)){for(var t=new Set,r=f(e),n=0;n<r.length;n++){var o=r[n];if(null!=o){if(!s.isString(o))throw new TypeError("Bookmark value should be a string, given: '".concat(o,"'"));t.add(o)}}return u([],a(t),!1)}throw new TypeError("Bookmarks should either be a string or a string array, given: '".concat(e,"'"))}(e)}return e.empty=function(){return l},e.prototype.isEmpty=function(){return 0===this._values.length},e.prototype.values=function(){return this._values},e.prototype[Symbol.iterator]=function(){return this._values[Symbol.iterator]()},e.prototype.asBeginTransactionParameters=function(){var e;return this.isEmpty()?{}:((e={}).bookmarks=this._values,e)},e}();t.Bookmarks=c;var l=new c(null);function f(e){return e.reduce((function(e,t){return Array.isArray(t)?e.concat(f(t)):e.concat(t)}),[])}},3618:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{s(n.next(e))}catch(e){i(e)}}function u(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,u)}s((n=n.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(s){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,n=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_CONNECTION_HOLDER=t.ReadOnlyConnectionHolder=t.ConnectionHolder=void 0;var u=r(9691),s=r(6587),c=r(326),l=r(9730),f=r(4883),h=function(){function e(e){var t=e.mode,r=e.database,n=void 0===r?"":r,o=e.bookmarks,i=e.connectionProvider,a=e.impersonatedUser,u=e.onDatabaseNameResolved,f=e.getConnectionAcquistionBookmarks,h=e.auth,d=e.log;this._mode=null!=t?t:c.ACCESS_MODE_WRITE,this._closed=!1,this._database=null!=n?(0,s.assertString)(n,"database"):"",this._bookmarks=null!=o?o:l.Bookmarks.empty(),this._connectionProvider=i,this._impersonatedUser=a,this._referenceCount=0,this._connectionPromise=Promise.resolve(null),this._onDatabaseNameResolved=u,this._auth=h,this._log=d,this._logError=this._logError.bind(this),this._getConnectionAcquistionBookmarks=null!=f?f:function(){return Promise.resolve(l.Bookmarks.empty())}}return e.prototype.mode=function(){return this._mode},e.prototype.database=function(){return this._database},e.prototype.setDatabase=function(e){this._database=e},e.prototype.bookmarks=function(){return this._bookmarks},e.prototype.connectionProvider=function(){return this._connectionProvider},e.prototype.referenceCount=function(){return this._referenceCount},e.prototype.initializeConnection=function(){return 0!==this._referenceCount||null==this._connectionProvider?(this._referenceCount++,!1):(this._connectionPromise=this._createConnectionPromise(this._connectionProvider),this._referenceCount++,!0)},e.prototype._createConnectionPromise=function(e){return i(this,void 0,void 0,(function(){var t,r,n;return a(this,(function(o){switch(o.label){case 0:return r=(t=e).acquireConnection,n={accessMode:this._mode,database:this._database},[4,this._getBookmarks()];case 1:return[4,r.apply(t,[(n.bookmarks=o.sent(),n.impersonatedUser=this._impersonatedUser,n.onDatabaseNameResolved=this._onDatabaseNameResolved,n.auth=this._auth,n)])];case 2:return[2,o.sent()]}}))}))},e.prototype._getBookmarks=function(){return i(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,this._getConnectionAcquistionBookmarks()];case 1:return[2,e.sent()]}}))}))},e.prototype.getConnection=function(){return this._connectionPromise},e.prototype.releaseConnection=function(){return 0===this._referenceCount?this._connectionPromise:(this._referenceCount--,0===this._referenceCount?this._releaseConnection():this._connectionPromise)},e.prototype.close=function(e){return this._closed=!0,0===this._referenceCount?this._connectionPromise:(this._referenceCount=0,this._releaseConnection(e))},e.prototype.log=function(){return this._log},e.prototype._releaseConnection=function(e){return this._connectionPromise=this._connectionPromise.then((function(t){return null!=t?t.isOpen()&&(t.hasOngoingObservableRequests()||!0===e)?t.resetAndFlush().catch(v).then((function(){return t.release().then((function(){return null}))})):t.release().then((function(){return null})):Promise.resolve(null)})).catch(this._logError),this._connectionPromise},e.prototype._logError=function(e){return this._log.isWarnEnabled()&&this._log.warn("ConnectionHolder got an error while releasing the connection. Error ".concat(e,". Stacktrace: ").concat(e.stack)),null},e}();t.ConnectionHolder=h;var d=function(e){function t(t){var r=e.call(this,{mode:t.mode(),database:t.database(),bookmarks:t.bookmarks(),getConnectionAcquistionBookmarks:t._getConnectionAcquistionBookmarks,connectionProvider:t.connectionProvider(),log:t.log()})||this;return r._connectionHolder=t,r}return o(t,e),t.prototype.initializeConnection=function(){return 0!==this._connectionHolder.referenceCount()},t.prototype.getConnection=function(){return this._connectionHolder.getConnection()},t.prototype.releaseConnection=function(){return this._connectionHolder.getConnection().catch((function(){return Promise.resolve(null)}))},t.prototype.close=function(){return this._connectionHolder.getConnection().catch((function(){return Promise.resolve(null)}))},t}(h);t.ReadOnlyConnectionHolder=d,t.default=d;var p=new(function(e){function t(){return e.call(this,{log:f.Logger.create({})})||this}return o(t,e),t.prototype.mode=function(){},t.prototype.database=function(){},t.prototype.initializeConnection=function(){return!0},t.prototype.getConnection=function(){return i(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,Promise.reject((0,u.newError)("This connection holder does not serve connections"))];case 1:return[2,e.sent()]}}))}))},t.prototype.releaseConnection=function(){return i(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,Promise.resolve(null)];case 1:return[2,e.sent()]}}))}))},t.prototype.close=function(){return i(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,Promise.resolve(null)];case 1:return[2,e.sent()]}}))}))},t}(h));function v(e){return null}t.EMPTY_CONNECTION_HOLDER=p},326:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TELEMETRY_APIS=t.BOLT_PROTOCOL_V5_7=t.BOLT_PROTOCOL_V5_6=t.BOLT_PROTOCOL_V5_5=t.BOLT_PROTOCOL_V5_4=t.BOLT_PROTOCOL_V5_3=t.BOLT_PROTOCOL_V5_2=t.BOLT_PROTOCOL_V5_1=t.BOLT_PROTOCOL_V5_0=t.BOLT_PROTOCOL_V4_4=t.BOLT_PROTOCOL_V4_3=t.BOLT_PROTOCOL_V4_2=t.BOLT_PROTOCOL_V4_1=t.BOLT_PROTOCOL_V4_0=t.BOLT_PROTOCOL_V3=t.BOLT_PROTOCOL_V2=t.BOLT_PROTOCOL_V1=t.DEFAULT_POOL_MAX_SIZE=t.DEFAULT_POOL_ACQUISITION_TIMEOUT=t.DEFAULT_CONNECTION_TIMEOUT_MILLIS=t.ACCESS_MODE_WRITE=t.ACCESS_MODE_READ=t.FETCH_ALL=void 0,t.FETCH_ALL=-1,t.DEFAULT_POOL_ACQUISITION_TIMEOUT=6e4,t.DEFAULT_POOL_MAX_SIZE=100,t.DEFAULT_CONNECTION_TIMEOUT_MILLIS=3e4,t.ACCESS_MODE_READ="READ",t.ACCESS_MODE_WRITE="WRITE",t.BOLT_PROTOCOL_V1=1,t.BOLT_PROTOCOL_V2=2,t.BOLT_PROTOCOL_V3=3,t.BOLT_PROTOCOL_V4_0=4,t.BOLT_PROTOCOL_V4_1=4.1,t.BOLT_PROTOCOL_V4_2=4.2,t.BOLT_PROTOCOL_V4_3=4.3,t.BOLT_PROTOCOL_V4_4=4.4,t.BOLT_PROTOCOL_V5_0=5,t.BOLT_PROTOCOL_V5_1=5.1,t.BOLT_PROTOCOL_V5_2=5.2,t.BOLT_PROTOCOL_V5_3=5.3,t.BOLT_PROTOCOL_V5_4=5.4,t.BOLT_PROTOCOL_V5_5=5.5,t.BOLT_PROTOCOL_V5_6=5.6,t.BOLT_PROTOCOL_V5_7=5.7,t.TELEMETRY_APIS={MANAGED_TRANSACTION:0,UNMANAGED_TRANSACTION:1,AUTO_COMMIT_TRANSACTION:2,EXECUTE_QUERY:3}},6995:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.pool=t.boltAgent=t.objectUtil=t.resolver=t.serverAddress=t.urlUtil=t.logger=t.transactionExecutor=t.txConfig=t.connectionHolder=t.constants=t.bookmarks=t.observer=t.temporalUtil=t.util=void 0;var a=i(r(6587));t.util=a;var u=i(r(5022));t.temporalUtil=u;var s=i(r(2696));t.observer=s;var c=i(r(9730));t.bookmarks=c;var l=i(r(326));t.constants=l;var f=i(r(3618));t.connectionHolder=f;var h=i(r(754));t.txConfig=h;var d=i(r(6189));t.transactionExecutor=d;var p=i(r(4883));t.logger=p;var v=i(r(407));t.urlUtil=v;var y=i(r(7509));t.serverAddress=y;var b=i(r(9470));t.resolver=b;var m=i(r(93));t.objectUtil=m;var g=i(r(3488));t.boltAgent=g;var _=i(r(2906));t.pool=_},4883:function(e,t,r){var n,o,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=void 0;var a=r(9691),u="error",s="warn",c="info",l="debug",f=c,h=((o={})[u]=0,o[s]=1,o[c]=2,o[l]=3,o),d=function(){function e(e,t){this._level=e,this._loggerFunction=t}return e.create=function(t){if(null!=(null==t?void 0:t.logging)){var r=t.logging,n=function(e){if(null!=(null==e?void 0:e.level)){var t=e.level,r=h[t];if(null==r&&0!==r)throw(0,a.newError)("Illegal logging level: ".concat(t,". Supported levels are: ").concat(Object.keys(h).toString()));return t}return f}(r),o=function(e){var t,r;if(null!=(null==e?void 0:e.logger)){var n=e.logger;if(null!=n&&"function"==typeof n)return n}throw(0,a.newError)("Illegal logger function: ".concat(null!==(r=null===(t=null==e?void 0:e.logger)||void 0===t?void 0:t.toString())&&void 0!==r?r:"undefined"))}(r);return new e(n,o)}return this.noOp()},e.noOp=function(){return p},e.prototype.isErrorEnabled=function(){return v(this._level,u)},e.prototype.error=function(e){this.isErrorEnabled()&&this._loggerFunction(u,e)},e.prototype.isWarnEnabled=function(){return v(this._level,s)},e.prototype.warn=function(e){this.isWarnEnabled()&&this._loggerFunction(s,e)},e.prototype.isInfoEnabled=function(){return v(this._level,c)},e.prototype.info=function(e){this.isInfoEnabled()&&this._loggerFunction(c,e)},e.prototype.isDebugEnabled=function(){return v(this._level,l)},e.prototype.debug=function(e){this.isDebugEnabled()&&this._loggerFunction(l,e)},e}();t.Logger=d;var p=new(function(e){function t(){return e.call(this,c,(function(e,t){}))||this}return i(t,e),t.prototype.isErrorEnabled=function(){return!1},t.prototype.error=function(e){},t.prototype.isWarnEnabled=function(){return!1},t.prototype.warn=function(e){},t.prototype.isInfoEnabled=function(){return!1},t.prototype.info=function(e){},t.prototype.isDebugEnabled=function(){return!1},t.prototype.debug=function(e){},t}(d));function v(e,t){return h[e]>=h[t]}},93:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getBrokenObjectReason=t.isBrokenObject=t.createBrokenObject=void 0;var r="__isBrokenObject__",n="__reason__";t.createBrokenObject=function(e,t){void 0===t&&(t={});var o=function(){throw e};return new Proxy(t,{get:function(t,i){return i===r||(i===n?e:void("toJSON"!==i&&o()))},set:o,apply:o,construct:o,defineProperty:o,deleteProperty:o,getOwnPropertyDescriptor:o,getPrototypeOf:o,has:o,isExtensible:o,ownKeys:o,preventExtensions:o,setPrototypeOf:o})},t.isBrokenObject=function(e){return null!==e&&"object"==typeof e&&!0===e[r]},t.getBrokenObjectReason=function(e){return e[n]}},2696:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FailedObserver=t.CompletedObserver=void 0;var r=function(){function e(){}return e.prototype.subscribe=function(e){o(e,e.onKeys,[]),o(e,e.onCompleted,{})},e.prototype.cancel=function(){},e.prototype.pause=function(){},e.prototype.resume=function(){},e.prototype.prepareToHandleSingleResponse=function(){},e.prototype.markCompleted=function(){},e.prototype.onError=function(e){throw new Error("CompletedObserver not supposed to call onError",{cause:e})},e}();t.CompletedObserver=r;var n=function(){function e(e){var t=e.error,r=e.onError;this._error=t,this._beforeError=r,this._observers=[],this.onError(t)}return e.prototype.subscribe=function(e){o(e,e.onError,this._error),this._observers.push(e)},e.prototype.onError=function(e){o(this,this._beforeError,e),this._observers.forEach((function(t){return o(t,t.onError,e)}))},e.prototype.cancel=function(){},e.prototype.pause=function(){},e.prototype.resume=function(){},e.prototype.markCompleted=function(){},e.prototype.prepareToHandleSingleResponse=function(){},e}();function o(e,t,r){null!=t&&t.bind(e)(r)}t.FailedObserver=n},2906:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_MAX_SIZE=t.DEFAULT_ACQUISITION_TIMEOUT=t.PoolConfig=t.Pool=void 0;var u=i(r(7589));t.PoolConfig=u.default,Object.defineProperty(t,"DEFAULT_ACQUISITION_TIMEOUT",{enumerable:!0,get:function(){return u.DEFAULT_ACQUISITION_TIMEOUT}}),Object.defineProperty(t,"DEFAULT_MAX_SIZE",{enumerable:!0,get:function(){return u.DEFAULT_MAX_SIZE}});var s=a(r(6842));t.Pool=s.default,t.default=s.default},7589:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_ACQUISITION_TIMEOUT=t.DEFAULT_MAX_SIZE=void 0;var r=100;t.DEFAULT_MAX_SIZE=r;var n=6e4;t.DEFAULT_ACQUISITION_TIMEOUT=n;var o=function(){function e(e,t){this.maxSize=i(e,r),this.acquisitionTimeout=i(t,n)}return e.defaultConfig=function(){return new e(r,n)},e.fromDriverConfig=function(t){return new e(a(t.maxConnectionPoolSize)?t.maxConnectionPoolSize:r,a(t.connectionAcquisitionTimeout)?t.connectionAcquisitionTimeout:n)},e}();function i(e,t){return a(e)?e:t}function a(e){return 0===e||null!=e}t.default=o},6842:function(e,t,r){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{s(n.next(e))}catch(e){i(e)}}function u(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,u)}s((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(s){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,n=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=i(r(7589)),u=r(9691),s=r(4883),c=function(){function e(e){var t=e.create,r=void 0===t?function(e,t,r){return n(w,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,Promise.reject(new Error("Not implemented"))];case 1:return[2,e.sent()]}}))}))}:t,i=e.destroy,u=void 0===i?function(e){return n(w,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,Promise.resolve()];case 1:return[2,e.sent()]}}))}))}:i,c=e.validateOnAcquire,l=void 0===c?function(e,t){return!0}:c,f=e.validateOnRelease,h=void 0===f?function(e){return!0}:f,d=e.installIdleObserver,p=void 0===d?function(e,t){}:d,v=e.removeIdleObserver,y=void 0===v?function(e){}:v,b=e.config,m=void 0===b?a.default.defaultConfig():b,g=e.log,_=void 0===g?s.Logger.noOp():g,w=this;this._create=r,this._destroy=u,this._validateOnAcquire=l,this._validateOnRelease=h,this._installIdleObserver=p,this._removeIdleObserver=y,this._maxSize=m.maxSize,this._acquisitionTimeout=m.acquisitionTimeout,this._pools={},this._pendingCreates={},this._acquireRequests={},this._activeResourceCounts={},this._release=this._release.bind(this),this._log=_,this._closed=!1}return e.prototype.acquire=function(e,t,r){return n(this,void 0,void 0,(function(){var n,i,a=this;return o(this,(function(o){switch(o.label){case 0:return n=t.asKey(),null==(i=this._acquireRequests)[n]&&(i[n]=[]),[4,new Promise((function(o,s){var c=setTimeout((function(){var e=i[n];if(null!=e&&(i[n]=e.filter((function(e){return e!==l}))),l.isCompleted());else{var r=a.activeResourceCount(t),o=a.has(t)?a._pools[n].length:0;l.reject((0,u.newError)("Connection acquisition timed out in ".concat(a._acquisitionTimeout," ms. Pool status: Active conn count = ").concat(r,", Idle conn count = ").concat(o,".")))}}),a._acquisitionTimeout);"object"==typeof c&&c.unref();var l=new h(n,e,r,o,s,c,a._log);i[n].push(l),a._processPendingAcquireRequests(t)}))];case 1:return[2,o.sent()]}}))}))},e.prototype.purge=function(e){return n(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this._purgeKey(e.asKey())];case 1:return[2,t.sent()]}}))}))},e.prototype.apply=function(e,t){var r=e.asKey();r in this._pools&&this._pools[r].apply(t)},e.prototype.close=function(){return n(this,void 0,void 0,(function(){var e=this;return o(this,(function(t){switch(t.label){case 0:return this._closed=!0,[4,Promise.all(Object.keys(this._pools).map((function(t){return n(e,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this._purgeKey(t)];case 1:return[2,e.sent()]}}))}))}))).then()];case 1:return[2,t.sent()]}}))}))},e.prototype.keepAll=function(e){return n(this,void 0,void 0,(function(){var t,r,i,a=this;return o(this,(function(u){switch(u.label){case 0:return t=e.map((function(e){return e.asKey()})),r=Object.keys(this._pools),i=r.filter((function(e){return!t.includes(e)})),[4,Promise.all(i.map((function(e){return n(a,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this._purgeKey(e)];case 1:return[2,t.sent()]}}))}))}))).then()];case 1:return[2,u.sent()]}}))}))},e.prototype.has=function(e){return e.asKey()in this._pools},e.prototype.activeResourceCount=function(e){var t;return null!==(t=this._activeResourceCounts[e.asKey()])&&void 0!==t?t:0},e.prototype._getOrInitializePoolFor=function(e){var t=this._pools[e];return null==t&&(t=new d,this._pools[e]=t,this._pendingCreates[e]=0),t},e.prototype._acquire=function(e,t,r){return n(this,void 0,void 0,(function(){var i,a,s,c,h,d,p,v=this;return o(this,(function(y){switch(y.label){case 0:if(this._closed)throw(0,u.newError)("Pool is closed, it is no more able to serve requests.");if(i=t.asKey(),a=this._getOrInitializePoolFor(i),r)return[3,10];y.label=1;case 1:if(!(a.length>0))return[3,10];if(null==(s=a.pop()))return[3,1];l(i,this._activeResourceCounts),null!=this._removeIdleObserver&&this._removeIdleObserver(s),c=!1,y.label=2;case 2:return y.trys.push([2,4,,6]),[4,this._validateOnAcquire(e,s)];case 3:return c=y.sent(),[3,6];case 4:return h=y.sent(),f(i,this._activeResourceCounts),a.removeInUse(s),[4,this._destroy(s)];case 5:throw y.sent(),h;case 6:return c?(this._log.isDebugEnabled()&&this._log.debug("".concat(s," acquired from the pool ").concat(i)),[2,{resource:s,pool:a}]):[3,7];case 7:return f(i,this._activeResourceCounts),a.removeInUse(s),[4,this._destroy(s)];case 8:y.sent(),y.label=9;case 9:return[3,1];case 10:if(this._maxSize>0&&this.activeResourceCount(t)+this._pendingCreates[i]>=this._maxSize)return[2,{resource:null,pool:a}];this._pendingCreates[i]=this._pendingCreates[i]+1,y.label=11;case 11:return y.trys.push([11,,15,16]),this.activeResourceCount(t)+a.length>=this._maxSize&&r?null==(p=a.pop())?[3,13]:(null!=this._removeIdleObserver&&this._removeIdleObserver(p),a.removeInUse(p),[4,this._destroy(p)]):[3,13];case 12:y.sent(),y.label=13;case 13:return[4,this._create(e,t,(function(e,t){return n(v,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,this._release(e,t,a)];case 1:return[2,r.sent()]}}))}))}))];case 14:return d=y.sent(),a.pushInUse(d),l(i,this._activeResourceCounts),this._log.isDebugEnabled()&&this._log.debug("".concat(d," created for the pool ").concat(i)),[3,16];case 15:return this._pendingCreates[i]=this._pendingCreates[i]-1,[7];case 16:return[2,{resource:d,pool:a}]}}))}))},e.prototype._release=function(e,t,r){return n(this,void 0,void 0,(function(){var n,i=this;return o(this,(function(o){switch(o.label){case 0:n=e.asKey(),o.label=1;case 1:return o.trys.push([1,,9,10]),r.isActive()?[4,this._validateOnRelease(t)]:[3,6];case 2:return o.sent()?[3,4]:(this._log.isDebugEnabled()&&this._log.debug("".concat(t," destroyed and can't be released to the pool ").concat(n," because it is not functional")),r.removeInUse(t),[4,this._destroy(t)]);case 3:return o.sent(),[3,5];case 4:null!=this._installIdleObserver&&this._installIdleObserver(t,{onError:function(e){i._log.debug("Idle connection ".concat(t," destroyed because of error: ").concat(e));var r=i._pools[n];null!=r&&(i._pools[n]=r.filter((function(e){return e!==t})),r.removeInUse(t)),i._destroy(t).catch((function(){}))}}),r.push(t),this._log.isDebugEnabled()&&this._log.debug("".concat(t," released to the pool ").concat(n)),o.label=5;case 5:return[3,8];case 6:return this._log.isDebugEnabled()&&this._log.debug("".concat(t," destroyed and can't be released to the pool ").concat(n," because pool has been purged")),r.removeInUse(t),[4,this._destroy(t)];case 7:o.sent(),o.label=8;case 8:return[3,10];case 9:return f(n,this._activeResourceCounts),this._processPendingAcquireRequests(e),[7];case 10:return[2]}}))}))},e.prototype._purgeKey=function(e){return n(this,void 0,void 0,(function(){var t,r,n;return o(this,(function(o){switch(o.label){case 0:if(t=this._pools[e],r=[],null==t)return[3,2];for(;t.length>0;)null!=(n=t.pop())&&(null!=this._removeIdleObserver&&this._removeIdleObserver(n),r.push(this._destroy(n)));return t.close(),delete this._pools[e],[4,Promise.all(r)];case 1:o.sent(),o.label=2;case 2:return[2]}}))}))},e.prototype._processPendingAcquireRequests=function(e){var t=this,r=e.asKey(),n=this._acquireRequests[r];if(null!=n){var o=n.shift();null!=o?this._acquire(o.context,e,o.requireNew).catch((function(e){return o.reject(e),{resource:null,pool:null}})).then((function(n){var i=n.resource,a=n.pool;null!=i&&null!=a?o.isCompleted()?t._release(e,i,a).catch((function(e){t._log.isDebugEnabled()&&t._log.debug("".concat(i," could not be release back to the pool. Cause: ").concat(e))})):o.resolve(i):o.isCompleted()||(null==t._acquireRequests[r]&&(t._acquireRequests[r]=[]),t._acquireRequests[r].unshift(o))})).catch((function(e){return o.reject(e)})):delete this._acquireRequests[r]}},e}();function l(e,t){var r,n=null!==(r=t[e])&&void 0!==r?r:0;t[e]=n+1}function f(e,t){var r,n=(null!==(r=t[e])&&void 0!==r?r:0)-1;n>0?t[e]=n:delete t[e]}var h=function(){function e(e,t,r,n,o,i,a){this._key=e,this._context=t,this._resolve=n,this._reject=o,this._timeoutId=i,this._log=a,this._completed=!1,this._config=null!=r?r:{}}return Object.defineProperty(e.prototype,"context",{get:function(){return this._context},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"requireNew",{get:function(){var e;return null!==(e=this._config.requireNew)&&void 0!==e&&e},enumerable:!1,configurable:!0}),e.prototype.isCompleted=function(){return this._completed},e.prototype.resolve=function(e){this._completed||(this._completed=!0,clearTimeout(this._timeoutId),this._log.isDebugEnabled()&&this._log.debug("".concat(e," acquired from the pool ").concat(this._key)),this._resolve(e))},e.prototype.reject=function(e){this._completed||(this._completed=!0,clearTimeout(this._timeoutId),this._reject(e))},e}(),d=function(){function e(){this._active=!0,this._elements=[],this._elementsInUse=new Set}return e.prototype.isActive=function(){return this._active},e.prototype.close=function(){this._active=!1,this._elements=[],this._elementsInUse=new Set},e.prototype.filter=function(e){return this._elements=this._elements.filter(e),this},e.prototype.apply=function(e){this._elements.forEach(e),this._elementsInUse.forEach(e)},Object.defineProperty(e.prototype,"length",{get:function(){return this._elements.length},enumerable:!1,configurable:!0}),e.prototype.pop=function(){var e=this._elements.pop();return null!=e&&this._elementsInUse.add(e),e},e.prototype.push=function(e){return this._elementsInUse.delete(e),this._elements.push(e)},e.prototype.pushInUse=function(e){this._elementsInUse.add(e)},e.prototype.removeInUse=function(e){this._elementsInUse.delete(e)},e}();t.default=c},7041:function(e,t,r){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{s(n.next(e))}catch(e){i(e)}}function u(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,u)}s((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(s){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,n=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(326),a=function(){function e(e){this._createSession=e}return e.prototype.execute=function(e,t,r){return n(this,void 0,void 0,(function(){var a,u,s=this;return o(this,(function(c){switch(c.label){case 0:a=this._createSession({database:e.database,bookmarkManager:e.bookmarkManager,impersonatedUser:e.impersonatedUser,auth:e.auth}),l=e.signal,f="abort",h=function(){return n(s,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,a.close()];case 1:return[2,e.sent()]}}))}))},"function"==typeof(null==l?void 0:l.addEventListener)&&l.addEventListener(f,h),u={uninstall:function(){"function"==typeof(null==l?void 0:l.removeEventListener)&&l.removeEventListener(f,h)}},a._configureTransactionExecutor(!0,i.TELEMETRY_APIS.EXECUTE_QUERY),c.label=1;case 1:return c.trys.push([1,,3,5]),[4,("READ"===e.routing?a.executeRead.bind(a):a.executeWrite.bind(a))((function(i){return n(s,void 0,void 0,(function(){var n;return o(this,(function(o){switch(o.label){case 0:return n=i.run(t,r),[4,e.resultTransformer(n)];case 1:return[2,o.sent()]}}))}))}),e.transactionConfig)];case 2:return[2,c.sent()];case 3:return u.uninstall(),[4,a.close()];case 4:return c.sent(),[7];case 5:return[2]}var l,f,h}))}))},e}();t.default=a},3389:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}return e.prototype.resolve=function(){throw new Error("Abstract function")},e.prototype._resolveToItself=function(e){return Promise.resolve([e])},e}();t.default=r},8341:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=r(7509);function o(e){return Promise.resolve([e])}var i=function(){function e(e){this._resolverFunction=null!=e?e:o}return e.prototype.resolve=function(e){var t=this;return new Promise((function(r){return r(t._resolverFunction(e.asHostPort()))})).then((function(e){if(!Array.isArray(e))throw new TypeError("Configured resolver function should either return an array of addresses or a Promise resolved with an array of addresses."+"Each address is '<host>:<port>'. Got: ".concat(e));return e.map((function(e){return n.ServerAddress.fromUrl(e)}))}))},e}();t.default=i},9470:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ConfiguredCustomResolver=t.BaseHostNameResolver=void 0;var o=n(r(3389));t.BaseHostNameResolver=o.default;var i=n(r(8341));t.ConfiguredCustomResolver=i.default},7509:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ServerAddress=void 0;var a=r(6587),u=i(r(407)),s=function(){function e(e,t,r,n){this._host=(0,a.assertString)(e,"host"),this._resolved=null!=t?(0,a.assertString)(t,"resolved"):null,this._port=(0,a.assertNumber)(r,"port"),this._hostPort=n,this._stringValue=null!=t?"".concat(n,"(").concat(t,")"):"".concat(n)}return e.prototype.host=function(){return this._host},e.prototype.resolvedHost=function(){return null!=this._resolved?this._resolved:this._host},e.prototype.port=function(){return this._port},e.prototype.resolveWith=function(t){return new e(this._host,t,this._port,this._hostPort)},e.prototype.asHostPort=function(){return this._hostPort},e.prototype.asKey=function(){return this._hostPort},e.prototype.toString=function(){return this._stringValue},e.fromUrl=function(t){var r=u.parseDatabaseUrl(t);return new e(r.host,null,r.port,r.hostAndPort)},e}();t.ServerAddress=s},5022:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.floorMod=t.floorDiv=t.assertValidZoneId=t.assertValidNanosecond=t.assertValidSecond=t.assertValidMinute=t.assertValidHour=t.assertValidDay=t.assertValidMonth=t.assertValidYear=t.timeZoneOffsetInSeconds=t.totalNanoseconds=t.newDate=t.toStandardDate=t.isoStringToStandardDate=t.dateToIsoString=t.timeZoneOffsetToIsoString=t.timeToIsoString=t.durationToIsoString=t.dateToEpochDay=t.localDateTimeToEpochSecond=t.localTimeToNanoOfDay=t.normalizeNanosecondsForDuration=t.normalizeSecondsForDuration=t.SECONDS_PER_DAY=t.DAYS_PER_400_YEAR_CYCLE=t.DAYS_0000_TO_1970=t.NANOS_PER_HOUR=t.NANOS_PER_MINUTE=t.NANOS_PER_MILLISECOND=t.NANOS_PER_SECOND=t.SECONDS_PER_HOUR=t.SECONDS_PER_MINUTE=t.MINUTES_PER_HOUR=t.NANOSECOND_OF_SECOND_RANGE=t.SECOND_OF_MINUTE_RANGE=t.MINUTE_OF_HOUR_RANGE=t.HOUR_OF_DAY_RANGE=t.DAY_OF_MONTH_RANGE=t.MONTH_OF_YEAR_RANGE=t.YEAR_RANGE=void 0;var a=i(r(3371)),u=r(9691),s=r(6587),c=function(){function e(e,t){this._minNumber=e,this._maxNumber=t,this._minInteger=(0,a.int)(e),this._maxInteger=(0,a.int)(t)}return e.prototype.contains=function(e){if((0,a.isInt)(e)&&e instanceof a.default)return e.greaterThanOrEqual(this._minInteger)&&e.lessThanOrEqual(this._maxInteger);if("bigint"==typeof e){var t=(0,a.int)(e);return t.greaterThanOrEqual(this._minInteger)&&t.lessThanOrEqual(this._maxInteger)}return e>=this._minNumber&&e<=this._maxNumber},e.prototype.toString=function(){return"[".concat(this._minNumber,", ").concat(this._maxNumber,"]")},e}();function l(e,r,n){e=(0,a.int)(e),r=(0,a.int)(r),n=(0,a.int)(n);var o=e.multiply(365);return o=(o=(o=e.greaterThanOrEqual(0)?o.add(e.add(3).div(4).subtract(e.add(99).div(100)).add(e.add(399).div(400))):o.subtract(e.div(-4).subtract(e.div(-100)).add(e.div(-400)))).add(r.multiply(367).subtract(362).div(12))).add(n.subtract(1)),r.greaterThan(2)&&(o=o.subtract(1),function(e){return!(!(e=(0,a.int)(e)).modulo(4).equals(0)||e.modulo(100).equals(0)&&!e.modulo(400).equals(0))}(e)||(o=o.subtract(1))),o.subtract(t.DAYS_0000_TO_1970)}t.YEAR_RANGE=new c(-999999999,999999999),t.MONTH_OF_YEAR_RANGE=new c(1,12),t.DAY_OF_MONTH_RANGE=new c(1,31),t.HOUR_OF_DAY_RANGE=new c(0,23),t.MINUTE_OF_HOUR_RANGE=new c(0,59),t.SECOND_OF_MINUTE_RANGE=new c(0,59),t.NANOSECOND_OF_SECOND_RANGE=new c(0,999999999),t.MINUTES_PER_HOUR=60,t.SECONDS_PER_MINUTE=60,t.SECONDS_PER_HOUR=t.SECONDS_PER_MINUTE*t.MINUTES_PER_HOUR,t.NANOS_PER_SECOND=1e9,t.NANOS_PER_MILLISECOND=1e6,t.NANOS_PER_MINUTE=t.NANOS_PER_SECOND*t.SECONDS_PER_MINUTE,t.NANOS_PER_HOUR=t.NANOS_PER_MINUTE*t.MINUTES_PER_HOUR,t.DAYS_0000_TO_1970=719528,t.DAYS_PER_400_YEAR_CYCLE=146097,t.SECONDS_PER_DAY=86400,t.normalizeSecondsForDuration=function(e,r){return(0,a.int)(e).add(p(r,t.NANOS_PER_SECOND))},t.normalizeNanosecondsForDuration=function(e){return v(e,t.NANOS_PER_SECOND)},t.localTimeToNanoOfDay=function(e,r,n,o){e=(0,a.int)(e),r=(0,a.int)(r),n=(0,a.int)(n),o=(0,a.int)(o);var i=e.multiply(t.NANOS_PER_HOUR);return(i=(i=i.add(r.multiply(t.NANOS_PER_MINUTE))).add(n.multiply(t.NANOS_PER_SECOND))).add(o)},t.localDateTimeToEpochSecond=function(e,r,n,o,i,u,s){var c=l(e,r,n),f=function(e,r,n){e=(0,a.int)(e),r=(0,a.int)(r),n=(0,a.int)(n);var o=e.multiply(t.SECONDS_PER_HOUR);return(o=o.add(r.multiply(t.SECONDS_PER_MINUTE))).add(n)}(o,i,u);return c.multiply(t.SECONDS_PER_DAY).add(f)},t.dateToEpochDay=l,t.durationToIsoString=function(e,r,n,o){var i=b(e),u=b(r),s=function(e,r){var n,o;e=(0,a.int)(e),r=(0,a.int)(r);var i=e.isNegative(),u=r.greaterThan(0);return n=i&&u?e.equals(-1)?"-0":e.add(1).toString():e.toString(),u&&(o=y(i?r.negate().add(2*t.NANOS_PER_SECOND).modulo(t.NANOS_PER_SECOND):r.add(t.NANOS_PER_SECOND).modulo(t.NANOS_PER_SECOND))),null!=o?n+o:n}(n,o);return"P".concat(i,"M").concat(u,"DT").concat(s,"S")},t.timeToIsoString=function(e,t,r,n){var o=b(e,2),i=b(t,2),a=b(r,2),u=y(n);return"".concat(o,":").concat(i,":").concat(a).concat(u)},t.timeZoneOffsetToIsoString=function(e){if((e=(0,a.int)(e)).equals(0))return"Z";var r=e.isNegative();r&&(e=e.multiply(-1));var n=r?"-":"+",o=b(e.div(t.SECONDS_PER_HOUR),2),i=b(e.div(t.SECONDS_PER_MINUTE).modulo(t.MINUTES_PER_HOUR),2),u=e.modulo(t.SECONDS_PER_MINUTE),s=u.equals(0)?null:b(u,2);return null!=s?"".concat(n).concat(o,":").concat(i,":").concat(s):"".concat(n).concat(o,":").concat(i)},t.dateToIsoString=function(e,t,r){var n=function(e){var t=(0,a.int)(e);return t.isNegative()||t.greaterThan(9999)?b(t,6,{usePositiveSign:!0}):b(t,4)}(e),o=b(t,2),i=b(r,2);return"".concat(n,"-").concat(o,"-").concat(i)},t.isoStringToStandardDate=function(e){return new Date(e)},t.toStandardDate=function(e){return new Date(e)},t.newDate=function(e){return new Date(e)},t.totalNanoseconds=function(e,r){return n=r=null!=r?r:0,o=e.getMilliseconds()*t.NANOS_PER_MILLISECOND,n instanceof a.default?n.add(o):"bigint"==typeof n?n+BigInt(o):n+o;var n,o},t.timeZoneOffsetInSeconds=function(e){var r=e.getSeconds()>=e.getUTCSeconds()?e.getSeconds()-e.getUTCSeconds():e.getSeconds()-e.getUTCSeconds()+60,n=e.getTimezoneOffset();return 0===n?0+r:-1*n*t.SECONDS_PER_MINUTE+r},t.assertValidYear=function(e){return d(e,t.YEAR_RANGE,"Year")},t.assertValidMonth=function(e){return d(e,t.MONTH_OF_YEAR_RANGE,"Month")},t.assertValidDay=function(e){return d(e,t.DAY_OF_MONTH_RANGE,"Day")},t.assertValidHour=function(e){return d(e,t.HOUR_OF_DAY_RANGE,"Hour")},t.assertValidMinute=function(e){return d(e,t.MINUTE_OF_HOUR_RANGE,"Minute")},t.assertValidSecond=function(e){return d(e,t.SECOND_OF_MINUTE_RANGE,"Second")},t.assertValidNanosecond=function(e){return d(e,t.NANOSECOND_OF_SECOND_RANGE,"Nanosecond")};var f=new Map,h=function(e,t){return(0,u.newError)("".concat(t,' is expected to be a valid ZoneId but was: "').concat(e,'"'))};function d(e,t,r){if((0,s.assertNumberOrInteger)(e,r),!t.contains(e))throw(0,u.newError)("".concat(r," is expected to be in range ").concat(t.toString()," but was: ").concat(e.toString()));return e}function p(e,t){e=(0,a.int)(e),t=(0,a.int)(t);var r=e.div(t);return e.isPositive()!==t.isPositive()&&r.multiply(t).notEquals(e)&&(r=r.subtract(1)),r}function v(e,t){return e=(0,a.int)(e),t=(0,a.int)(t),e.subtract(p(e,t).multiply(t))}function y(e){return(e=(0,a.int)(e)).equals(0)?"":"."+b(e,9)}function b(e,t,r){var n=(e=(0,a.int)(e)).isNegative();n&&(e=e.negate());var o=e.toString();if(null!=t)for(;o.length<t;)o="0"+o;return n?"-"+o:!0===(null==r?void 0:r.usePositiveSign)?"+"+o:o}t.assertValidZoneId=function(e,t){var r=f.get(t);if(!0!==r){if(!1===r)throw h(t,e);try{Intl.DateTimeFormat(void 0,{timeZone:t}),f.set(t,!0)}catch(r){throw f.set(t,!1),h(t,e)}}},t.floorDiv=p,t.floorMod=v},6189:function(e,t,r){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{s(n.next(e))}catch(e){i(e)}}function u(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,u)}s((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(s){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,n=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}},a=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},u=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionExecutor=void 0;var s=r(9691),c=r(326);function l(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setTimeout.apply(void 0,u([e,t],a(r),!1))}function f(e){return clearTimeout(e)}var h=function(){function e(e,t,r,n,o){void 0===o&&(o={setTimeout:l,clearTimeout:f}),this._maxRetryTimeMs=d(e,3e4),this._initialRetryDelayMs=d(t,1e3),this._multiplier=d(r,2),this._jitterFactor=d(n,.2),this._setTimeout=o.setTimeout,this._clearTimeout=o.clearTimeout,this._inFlightTimeoutIds=[],this.pipelineBegin=!1,this.telemetryApi=c.TELEMETRY_APIS.MANAGED_TRANSACTION,this._verifyAfterConstruction()}return e.prototype.execute=function(e,t,r){var n=this,o={apiTransactionConfig:{api:this.telemetryApi,onTelemetrySuccess:function(){o.apiTransactionConfig=void 0}}};return new Promise((function(i,a){n._executeTransactionInsidePromise(e,t,i,a,r,o).catch(a)})).catch((function(i){var a=Date.now(),u=n._initialRetryDelayMs;return n._retryTransactionPromise(e,t,i,a,u,r,o)}))},e.prototype.close=function(){var e=this;this._inFlightTimeoutIds.forEach((function(t){return e._clearTimeout(t)})),this._inFlightTimeoutIds=[]},e.prototype._retryTransactionPromise=function(e,t,r,n,o,i,a){var u=this;return Date.now()-n>this._maxRetryTimeMs||!(0,s.isRetriableError)(r)?Promise.reject(r):new Promise((function(r,n){var s=u._computeDelayWithJitter(o),c=u._setTimeout((function(){u._inFlightTimeoutIds=u._inFlightTimeoutIds.filter((function(e){return e!==c})),u._executeTransactionInsidePromise(e,t,r,n,i,a).catch(n)}),s);u._inFlightTimeoutIds.push(c)})).catch((function(r){var s=o*u._multiplier;return u._retryTransactionPromise(e,t,r,n,s,i,a)}))},e.prototype._executeTransactionInsidePromise=function(e,t,r,a,u,s){return o(this,void 0,void 0,(function(){var o,c,l,f,h,d,p=this;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),c=e(null!=(null==s?void 0:s.apiTransactionConfig)?n({},null==s?void 0:s.apiTransactionConfig):void 0),this.pipelineBegin?(l=c,[3,3]):[3,1];case 1:return[4,c];case 2:l=i.sent(),i.label=3;case 3:return o=l,[3,5];case 4:return f=i.sent(),a(f),[2];case 5:return h=null!=u?u:function(e){return e},d=h(o),this._safeExecuteTransactionWork(d,t).then((function(e){return p._handleTransactionWorkSuccess(e,o,r,a)})).catch((function(e){return p._handleTransactionWorkFailure(e,o,a)})),[2]}}))}))},e.prototype._safeExecuteTransactionWork=function(e,t){try{var r=t(e);return Promise.resolve(r)}catch(e){return Promise.reject(e)}},e.prototype._handleTransactionWorkSuccess=function(e,t,r,n){t.isOpen()?t.commit().then((function(){r(e)})).catch((function(e){n(e)})):r(e)},e.prototype._handleTransactionWorkFailure=function(e,t,r){t.isOpen()?t.rollback().catch((function(e){})).then((function(){return r(e)})).catch(r):r(e)},e.prototype._computeDelayWithJitter=function(e){var t=e*this._jitterFactor,r=e-t,n=e+t;return Math.random()*(n-r)+r},e.prototype._verifyAfterConstruction=function(){if(this._maxRetryTimeMs<0)throw(0,s.newError)("Max retry time should be >= 0: "+this._maxRetryTimeMs.toString());if(this._initialRetryDelayMs<0)throw(0,s.newError)("Initial retry delay should >= 0: "+this._initialRetryDelayMs.toString());if(this._multiplier<1)throw(0,s.newError)("Multiplier should be >= 1.0: "+this._multiplier.toString());if(this._jitterFactor<0||this._jitterFactor>1)throw(0,s.newError)("Jitter factor should be in [0.0, 1.0]: "+this._jitterFactor.toFixed())},e}();function d(e,t){return null!=e?e:t}t.TransactionExecutor=h},754:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.TxConfig=void 0;var a=i(r(6587)),u=r(9691),s=r(3371),c=function(){function e(e,t){!function(e){null!=e&&a.assertObject(e,"Transaction config")}(e),this.timeout=function(e,t){if(a.isObject(e)&&null!=e.timeout){a.assertNumberOrInteger(e.timeout,"Transaction timeout"),function(e){return"number"==typeof e.timeout&&!Number.isInteger(e.timeout)}(e)&&!0===(null==t?void 0:t.isInfoEnabled())&&(null==t||t.info("Transaction timeout expected to be an integer, got: ".concat(e.timeout,". The value will be rounded up.")));var r=(0,s.int)(e.timeout,{ceilFloat:!0});if(r.isNegative())throw(0,u.newError)("Transaction timeout should not be negative");return r}return null}(e,t),this.metadata=function(e){if(a.isObject(e)&&null!=e.metadata){var t=e.metadata;if(a.assertObject(t,"config.metadata"),0!==Object.keys(t).length)return t}return null}(e)}return e.empty=function(){return l},e.prototype.isEmpty=function(){return Object.values(this).every((function(e){return null==e}))},e}();t.TxConfig=c;var l=new c({})},407:function(e,t,r){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};Object.defineProperty(t,"__esModule",{value:!0}),t.Url=t.formatIPv6Address=t.formatIPv4Address=t.defaultPortForScheme=t.parseDatabaseUrl=void 0;var i=r(6587),a=function(e,t,r,n,o){this.scheme=e,this.host=t,this.port=r,this.hostAndPort=n,this.query=o};function u(e,t,r){if(""===(e=(null!=e?e:"").trim()))throw new Error("Illegal empty ".concat(t," in URL query '").concat(r,"'"));return e}function s(e){var t="["===e.charAt(0),r="]"===e.charAt(e.length-1);if(t||r){if(t&&r)return e;throw new Error("Illegal IPv6 address ".concat(e))}return"[".concat(e,"]")}function c(e){return"http"===e?7474:"https"===e?7473:7687}t.Url=a,t.parseDatabaseUrl=function(e){var t;(0,i.assertString)(e,"URL");var r,l=function(e){return(e=e.trim()).includes("://")?{schemeMissing:!1,url:e}:{schemeMissing:!0,url:"none://".concat(e)}}(e),f=function(e){function t(e,t){var r=e.indexOf(t);return r>=0?[e.substring(0,r),e[r],e.substring(r+1)]:[e,"",""]}var r,i={};return":"===(r=t(e,":"))[1]&&(i.scheme=decodeURIComponent(r[0]),e=r[2]),"#"===(r=t(e,"#"))[1]&&(i.fragment=decodeURIComponent(r[2]),e=r[0]),"?"===(r=t(e,"?"))[1]&&(i.query=r[2],e=r[0]),e.startsWith("//")?(r=t(e.substr(2),"/"),(i=n(n({},i),function(e){var r,n,i,a,u={};"@"===(n=e,i="@",a=n.lastIndexOf(i),r=a>=0?[n.substring(0,a),n[a],n.substring(a+1)]:["","",n])[1]&&(u.userInfo=decodeURIComponent(r[0]),e=r[2]);var s=o(function(e,r,n){var o=t(e,r),i=t(o[2],n);return[i[0],i[2]]}(e,"[","]"),2),c=s[0],l=s[1];return""!==c?(u.host=c,r=t(l,":")):(r=t(e,":"),u.host=r[0]),":"===r[1]&&(u.port=r[2]),u}(r[0]))).path=r[1]+r[2]):i.path=e,i}(l.url),h=l.schemeMissing?null:function(e){return null!=e?(":"===(e=e.trim()).charAt(e.length-1)&&(e=e.substring(0,e.length-1)),e):null}(f.scheme),d=function(e,t){if(null==e)throw new Error("Unable to extract host from null or undefined URL");return e.trim()}(f.host),p=function(e){if(""===e||null==e)throw new Error("Illegal host ".concat(e));return e.includes(":")?s(e):e}(d),v=function(e,t){var r="string"==typeof e?parseInt(e,10):e;return null==r||isNaN(r)?c(t):r}(f.port,h),y="".concat(p,":").concat(v),b=function(e,t){var r=null!=e?function(e){return"?"===(null==(e=(null!=e?e:"").trim())?void 0:e.charAt(0))&&(e=e.substring(1,e.length)),e}(e):null,n={};return null!=r&&r.split("&").forEach((function(e){var r=e.split("=");if(2!==r.length)throw new Error("Invalid parameters: '".concat(r.toString(),"' in URL '").concat(t,"'."));var o=u(r[0],"key",t),i=u(r[1],"value",t);if(void 0!==n[o])throw new Error("Duplicated query parameters with key '".concat(o,"' in URL '").concat(t,"'"));n[o]=i})),n}(null!==(t=f.query)&&void 0!==t?t:"string"!=typeof(r=f.resourceName)?null:o(r.split("?"),2)[1],e);return new a(h,d,v,y,b)},t.formatIPv4Address=function(e,t){return"".concat(e,":").concat(t)},t.formatIPv6Address=function(e,t){var r=s(e);return"".concat(r,":").concat(t)},t.defaultPortForScheme=c},6587:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},a=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.ENCRYPTION_OFF=t.ENCRYPTION_ON=t.equals=t.validateQueryAndParameters=t.toNumber=t.assertValidDate=t.assertNumberOrInteger=t.assertNumber=t.assertString=t.assertObject=t.isString=t.isObject=t.isEmptyObjectOrNull=void 0;var u=i(r(3371)),s=r(4027);function c(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}function l(e,t){if(!f(e))throw new TypeError((0,s.stringify)(t)+" expected to be string but was: "+(0,s.stringify)(e));return e}function f(e){return"[object String]"===Object.prototype.toString.call(e)}t.ENCRYPTION_ON="ENCRYPTION_ON",t.ENCRYPTION_OFF="ENCRYPTION_OFF",t.isEmptyObjectOrNull=function(e){if(null===e)return!0;if(!c(e))return!1;for(var t in e)if(void 0!==e[t])return!1;return!0},t.isObject=c,t.validateQueryAndParameters=function(e,t,r){var n,o,i="",a=null!=t?t:{},u=null!==(n=null==r?void 0:r.skipAsserts)&&void 0!==n&&n;return"string"==typeof e?i=e:e instanceof String?i=e.toString():"object"==typeof e&&null!=e.text&&(i=e.text,a=null!==(o=e.parameters)&&void 0!==o?o:{}),u||(function(e){if(l(e,"Cypher query"),0===e.trim().length)throw new TypeError("Cypher query is expected to be a non-empty string.")}(i),function(e){if(!c(e)){var t=null!=e.constructor?" "+e.constructor.name:"";throw new TypeError("Query parameters are expected to either be undefined/null or an object, given:".concat(t," ").concat(JSON.stringify(e)))}}(a)),{validatedQuery:i,params:a}},t.assertObject=function(e,t){if(!c(e))throw new TypeError(t+" expected to be an object but was: "+(0,s.stringify)(e));return e},t.assertString=l,t.assertNumber=function(e,t){if("number"!=typeof e)throw new TypeError(t+" expected to be a number but was: "+(0,s.stringify)(e));return e},t.assertNumberOrInteger=function(e,t){if("number"!=typeof e&&"bigint"!=typeof e&&!(0,u.isInt)(e))throw new TypeError(t+" expected to be either a number or an Integer object but was: "+(0,s.stringify)(e));return e},t.assertValidDate=function(e,t){if("[object Date]"!==Object.prototype.toString.call(e))throw new TypeError(t+" expected to be a standard JavaScript Date but was: "+(0,s.stringify)(e));if(Number.isNaN(e.getTime()))throw new TypeError(t+" expected to be valid JavaScript Date but its time was NaN: "+(0,s.stringify)(e));return e},t.isString=f,t.equals=function e(t,r){var n,o;if(t===r)return!0;if(null===t||null===r)return!1;if("object"==typeof t&&"object"==typeof r){var i=Object.keys(t),u=Object.keys(r);if(i.length!==u.length)return!1;try{for(var s=a(i),c=s.next();!c.done;c=s.next()){var l=c.value;if(!e(t[l],r[l]))return!1}}catch(e){n={error:e}}finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}return!0}return!1},t.toNumber=function(e){return e instanceof u.default?e.toNumber():"bigint"==typeof e?(0,u.int)(e).toNumber():e}},4027:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.stringify=void 0;var n=r(93);t.stringify=function(e,t){return JSON.stringify(e,(function(e,r){return(0,n.isBrokenObject)(r)?{__isBrokenObject__:!0,__reason__:(0,n.getBrokenObjectReason)(r)}:"bigint"==typeof r?"".concat(r,"n"):!0!==(null==t?void 0:t.useCustomToString)||"object"!=typeof r||Array.isArray(r)||"function"!=typeof r.toString||r.toString===Object.prototype.toString?r:null==r?void 0:r.toString()}))}},1985:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.notificationFilterDisabledClassification=t.notificationFilterDisabledCategory=t.notificationFilterMinimumSeverityLevel=void 0;var r={OFF:"OFF",WARNING:"WARNING",INFORMATION:"INFORMATION"};t.notificationFilterMinimumSeverityLevel=r,Object.freeze(r);var n={HINT:"HINT",UNRECOGNIZED:"UNRECOGNIZED",UNSUPPORTED:"UNSUPPORTED",PERFORMANCE:"PERFORMANCE",TOPOLOGY:"TOPOLOGY",SECURITY:"SECURITY",DEPRECATION:"DEPRECATION",GENERIC:"GENERIC",SCHEMA:"SCHEMA"};t.notificationFilterDisabledCategory=n,Object.freeze(n);var o=n;t.notificationFilterDisabledClassification=o;t.default=function(){throw this.minimumSeverityLevel=void 0,this.disabledCategories=void 0,this.disabledClassifications=void 0,new Error("Not implemented")}},1866:function(e,t,r){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&o(t,e,r);return i(t,e),t},u=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},s=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.buildNotificationsFromMetadata=t.buildGqlStatusObjectFromMetadata=t.polyfillNotification=t.polyfillGqlStatusObject=t.GqlStatusObject=t.Notification=t.notificationClassification=t.notificationCategory=t.notificationSeverityLevel=void 0;var c=a(r(4027)),l=r(6995),f=r(1053),h={WARNING:{gql_status:"01N42",status_description:"warn: unknown warning"},NO_DATA:{gql_status:"02N42",status_description:"note: no data - unknown subcondition"},INFORMATION:{gql_status:"03N42",status_description:"info: unknown notification"},ERROR:{gql_status:"50N42",status_description:"error: general processing exception - unexpected error"}},d={WARNING:"WARNING",INFORMATION:"INFORMATION",UNKNOWN:"UNKNOWN"};t.notificationSeverityLevel=d,Object.freeze(d);var p=Object.values(d),v={HINT:"HINT",UNRECOGNIZED:"UNRECOGNIZED",UNSUPPORTED:"UNSUPPORTED",PERFORMANCE:"PERFORMANCE",DEPRECATION:"DEPRECATION",TOPOLOGY:"TOPOLOGY",SECURITY:"SECURITY",GENERIC:"GENERIC",SCHEMA:"SCHEMA",UNKNOWN:"UNKNOWN"};t.notificationCategory=v,Object.freeze(v);var y=Object.values(v),b=v;t.notificationClassification=b;var m=function(e){this.code=e.code,this.title=e.title,this.description=e.description,this.severity=e.severity,this.position=P(e.position),this.severityLevel=x(e.severity),this.rawSeverityLevel=e.severity,this.category=T(e.category),this.rawCategory=e.category};t.Notification=m;var g=function(){function e(e){var t;this.gqlStatus=e.gql_status,this.statusDescription=e.status_description,this.diagnosticRecord=null!==(t=e.diagnostic_record)&&void 0!==t?t:{},this.position=null!=this.diagnosticRecord._position?P(this.diagnosticRecord._position):void 0,this.severity=x(this.diagnosticRecord._severity),this.rawSeverity=this.diagnosticRecord._severity,this.classification=T(this.diagnosticRecord._classification),this.rawClassification=this.diagnosticRecord._classification,this.isNotification=null!=e.neo4j_code,Object.freeze(this)}return Object.defineProperty(e.prototype,"diagnosticRecordAsJsonString",{get:function(){return c.stringify(this.diagnosticRecord,{useCustomToString:!0})},enumerable:!1,configurable:!0}),e}();function _(e){var t,r,n;if(null!=e.neo4j_code)return new m({code:e.neo4j_code,title:e.title,description:e.description,severity:null===(t=e.diagnostic_record)||void 0===t?void 0:t._severity,category:null===(r=e.diagnostic_record)||void 0===r?void 0:r._classification,position:null===(n=e.diagnostic_record)||void 0===n?void 0:n._position})}function w(e){var t,r=e.severity===d.WARNING?h.WARNING:h.INFORMATION,o={gql_status:r.gql_status,status_description:null!==(t=e.description)&&void 0!==t?t:r.status_description,neo4j_code:e.code,title:e.title,diagnostic_record:n({},f.rawPolyfilledDiagnosticRecord)};return null!=e.severity&&(o.diagnostic_record._severity=e.severity),null!=e.category&&(o.diagnostic_record._classification=e.category),null!=e.position&&(o.diagnostic_record._position=e.position),new g(o)}t.GqlStatusObject=g,t.polyfillNotification=_,t.polyfillGqlStatusObject=w;var O={SUCCESS:new g({gql_status:"00000",status_description:"note: successful completion",diagnostic_record:f.rawPolyfilledDiagnosticRecord}),NO_DATA:new g({gql_status:"02000",status_description:"note: no data",diagnostic_record:f.rawPolyfilledDiagnosticRecord}),NO_DATA_UNKNOWN_SUBCONDITION:new g(n(n({},h.NO_DATA),{diagnostic_record:f.rawPolyfilledDiagnosticRecord})),OMITTED_RESULT:new g({gql_status:"00001",status_description:"note: successful completion - omitted result",diagnostic_record:f.rawPolyfilledDiagnosticRecord})};Object.freeze(O),t.buildGqlStatusObjectFromMetadata=function(e){var t,r;if(null!=e.statuses)return e.statuses.map((function(e){return new g(e)}));var n,o=!0===(null==(n=e.stream_summary)?void 0:n.have_records_streamed)?O.SUCCESS:!1===(null==n?void 0:n.has_keys)?O.OMITTED_RESULT:!0===(null==n?void 0:n.pulled)?O.NO_DATA:O.NO_DATA_UNKNOWN_SUBCONDITION;return s([o],u(null!==(r=null===(t=e.notifications)||void 0===t?void 0:t.map(w))&&void 0!==r?r:[]),!1).sort((function(e,t){return E(e)-E(t)}))};var S=Object.freeze({"02":0,"01":1,"00":2});function E(e){var t,r,n=null===(t=e.gqlStatus)||void 0===t?void 0:t.slice(0,2);return null!==(r=S[n])&&void 0!==r?r:9999}function P(e){return null==e?{}:{offset:l.util.toNumber(e.offset),line:l.util.toNumber(e.line),column:l.util.toNumber(e.column)}}function x(e){return p.includes(e)?e:d.UNKNOWN}function T(e){return y.includes(e)?e:b.UNKNOWN}t.buildNotificationsFromMetadata=function(e){return null!=e.notifications?e.notifications.map((function(e){return new m(e)})):null!=e.statuses?e.statuses.map(_).filter((function(e){return null!=e})):[]},t.default=m},4820:function(e,t,r){var n=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(s){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,n=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}},o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};Object.defineProperty(t,"__esModule",{value:!0});var a=r(9691),u=function(){function e(e,t,r){this.keys=e,this.length=e.length,this._fields=t,this._fieldLookup=null!=r?r:function(e){var t={};return e.forEach((function(e,r){t[e]=r})),t}(e)}return e.prototype.forEach=function(e){var t,r;try{for(var n=o(this.entries()),a=n.next();!a.done;a=n.next()){var u=i(a.value,2),s=u[0];e(u[1],s,this)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},e.prototype.map=function(e){var t,r,n=[];try{for(var a=o(this.entries()),u=a.next();!u.done;u=a.next()){var s=i(u.value,2),c=s[0],l=s[1];n.push(e(l,c,this))}}catch(e){t={error:e}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}return n},e.prototype.entries=function(){var e;return n(this,(function(t){switch(t.label){case 0:e=0,t.label=1;case 1:return e<this.keys.length?[4,[this.keys[e],this._fields[e]]]:[3,4];case 2:t.sent(),t.label=3;case 3:return e++,[3,1];case 4:return[2]}}))},e.prototype.values=function(){var e;return n(this,(function(t){switch(t.label){case 0:e=0,t.label=1;case 1:return e<this.keys.length?[4,this._fields[e]]:[3,4];case 2:t.sent(),t.label=3;case 3:return e++,[3,1];case 4:return[2]}}))},e.prototype[Symbol.iterator]=function(){var e;return n(this,(function(t){switch(t.label){case 0:e=0,t.label=1;case 1:return e<this.keys.length?[4,this._fields[e]]:[3,4];case 2:t.sent(),t.label=3;case 3:return e++,[3,1];case 4:return[2]}}))},e.prototype.toObject=function(){var e,t,r={};try{for(var n=o(this.entries()),a=n.next();!a.done;a=n.next()){var u=i(a.value,2),s=u[0],c=u[1];r[s]=c}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return r},e.prototype.get=function(e){var t;if("number"!=typeof e){if(void 0===(t=this._fieldLookup[e]))throw(0,a.newError)("This record has no field with key '".concat(e.toString(),"', available keys are: [")+this.keys.toString()+"].")}else t=e;if(t>this._fields.length-1||t<0)throw(0,a.newError)("This record has no field with index '"+t.toString()+"'. Remember that indexes start at `0`, and make sure your query returns records in the shape you meant it to.");return this._fields[t]},e.prototype.has=function(e){return"number"==typeof e?e>=0&&e<this._fields.length:void 0!==this._fieldLookup[e]},e}();t.default=u},8917:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e,t,r){this.keys=e,this.records=t,this.summary=r}},6033:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Stats=t.QueryStatistics=t.ProfiledPlan=t.Plan=t.ServerInfo=t.queryType=void 0;var n=r(6995),o=r(1866),i=function(){function e(e,t,r,n){var i,l,f;this.query={text:e,parameters:t},this.queryType=r.type,this.counters=new s(null!==(i=r.stats)&&void 0!==i?i:{}),this.updateStatistics=this.counters,this.plan=(null!=r.plan||null!=r.profile)&&new a(null!==(l=r.plan)&&void 0!==l?l:r.profile),this.profile=null!=r.profile&&new u(r.profile),this.notifications=(0,o.buildNotificationsFromMetadata)(r),this.gqlStatusObjects=(0,o.buildGqlStatusObjectFromMetadata)(r),this.server=new c(r.server,n),this.resultConsumedAfter=r.result_consumed_after,this.resultAvailableAfter=r.result_available_after,this.database={name:null!==(f=r.db)&&void 0!==f?f:null}}return e.prototype.hasPlan=function(){return this.plan instanceof a},e.prototype.hasProfile=function(){return this.profile instanceof u},e}(),a=function e(t){this.operatorType=t.operatorType,this.identifiers=t.identifiers,this.arguments=t.args,this.children=null!=t.children?t.children.map((function(t){return new e(t)})):[]};t.Plan=a;var u=function(){function e(t){this.operatorType=t.operatorType,this.identifiers=t.identifiers,this.arguments=t.args,this.dbHits=l("dbHits",t),this.rows=l("rows",t),this.pageCacheMisses=l("pageCacheMisses",t),this.pageCacheHits=l("pageCacheHits",t),this.pageCacheHitRatio=l("pageCacheHitRatio",t),this.time=l("time",t),this.children=null!=t.children?t.children.map((function(t){return new e(t)})):[]}return e.prototype.hasPageCacheStats=function(){return this.pageCacheMisses>0||this.pageCacheHits>0||this.pageCacheHitRatio>0},e}();t.ProfiledPlan=u;t.Stats=function(){this.nodesCreated=0,this.nodesDeleted=0,this.relationshipsCreated=0,this.relationshipsDeleted=0,this.propertiesSet=0,this.labelsAdded=0,this.labelsRemoved=0,this.indexesAdded=0,this.indexesRemoved=0,this.constraintsAdded=0,this.constraintsRemoved=0};var s=function(){function e(e){var t=this;this._stats={nodesCreated:0,nodesDeleted:0,relationshipsCreated:0,relationshipsDeleted:0,propertiesSet:0,labelsAdded:0,labelsRemoved:0,indexesAdded:0,indexesRemoved:0,constraintsAdded:0,constraintsRemoved:0},this._systemUpdates=0,Object.keys(e).forEach((function(r){var o=r.replace(/(-\w)/g,(function(e){return e[1].toUpperCase()}));o in t._stats?t._stats[o]=n.util.toNumber(e[r]):"systemUpdates"===o?t._systemUpdates=n.util.toNumber(e[r]):"containsSystemUpdates"===o?t._containsSystemUpdates=e[r]:"containsUpdates"===o&&(t._containsUpdates=e[r])})),this._stats=Object.freeze(this._stats)}return e.prototype.containsUpdates=function(){var e=this;return void 0!==this._containsUpdates?this._containsUpdates:Object.keys(this._stats).reduce((function(t,r){return t+e._stats[r]}),0)>0},e.prototype.updates=function(){return this._stats},e.prototype.containsSystemUpdates=function(){return void 0!==this._containsSystemUpdates?this._containsSystemUpdates:this._systemUpdates>0},e.prototype.systemUpdates=function(){return this._systemUpdates},e}();t.QueryStatistics=s;var c=function(e,t){null!=e&&(this.address=e.address,this.agent=e.version),this.protocolVersion=t};function l(e,t,r){if(void 0===r&&(r=0),!1!==t&&e in t){var o=t[e];return n.util.toNumber(o)}return r}t.ServerInfo=c,t.queryType={READ_ONLY:"r",READ_WRITE:"rw",WRITE_ONLY:"w",SCHEMA_WRITE:"s"},t.default=i},1573:function(e,t,r){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{s(n.next(e))}catch(e){i(e)}}function u(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,u)}s((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(s){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,n=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=i(r(8917)),u=r(9691),s=new(function(){function e(){}return e.prototype.eagerResultTransformer=function(){return c},e.prototype.eager=function(){return c},e.prototype.mappedResultTransformer=function(e){return l(e)},e.prototype.mapped=function(e){return l(e)},e.prototype.first=function(){return f},e.prototype.summary=function(){return h},e}());function c(e){return n(this,void 0,void 0,(function(){var t,r,n,i;return o(this,(function(o){switch(o.label){case 0:return[4,e];case 1:return t=o.sent(),r=t.summary,n=t.records,[4,e.keys()];case 2:return i=o.sent(),[2,new a.default(i,n,r)]}}))}))}function l(e){var t=this;if(null==e||null==e.collect&&null==e.map)throw(0,u.newError)("Requires a map or/and a collect functions.");return function(r){return n(t,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,new Promise((function(t,n){var o={records:[],keys:[]};r.subscribe({onKeys:function(e){o.keys=e},onNext:function(t){if(null!=e.map){var r=e.map(t);void 0!==r&&o.records.push(r)}else o.records.push(t)},onCompleted:function(r){if(null!=e.collect)t(e.collect(o.records,r,o.keys));else{var n={records:o.records,summary:r,keys:o.keys};t(n)}},onError:function(e){n(e)}})}))];case 1:return[2,t.sent()]}}))}))}}function f(e){return n(this,void 0,void 0,(function(){var t,r,n,i;return o(this,(function(o){switch(o.label){case 0:return[4,(t=e[Symbol.asyncIterator]()).next()];case 1:r=o.sent(),n=r.value,i=r.done,o.label=2;case 2:return o.trys.push([2,,3,6]),!0===i?[2,void 0]:[2,n];case 3:return null==t.return?[3,5]:[4,t.return()];case 4:o.sent(),o.label=5;case 5:return[7];case 6:return[2]}}))}))}function h(e){return n(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,e.summary()];case 1:return[2,t.sent()]}}))}))}Object.freeze(s),t.default=s},9512:function(e,t,r){var n,o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{s(n.next(e))}catch(e){i(e)}}function u(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,u)}s((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(s){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,n=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=a(r(6033)),s=r(6995),c=r(9691),l=s.connectionHolder.EMPTY_CONNECTION_HOLDER,f=function(e){console.log("Uncaught error when processing result: "+e)},h=function(e){},d=function(e){},p=function(){function e(e,t,r,o,i){var a;void 0===i&&(i={high:Number.MAX_VALUE,low:Number.MAX_VALUE}),this[n]="Result",this._stack=null!=(a=new Error("")).stack?a.stack.replace(/^Error(\n\r)*/,""):null,this._streamObserverPromise=e,this._p=null,this._query=t,this._parameters=null!=r?r:{},this._connectionHolder=null!=o?o:l,this._keys=null,this._summary=null,this._error=null,this._watermarks=i}return e.prototype.keys=function(){var e=this;return null!==this._keys?Promise.resolve(this._keys):null!==this._error?Promise.reject(this._error):new Promise((function(t,r){e._streamObserverPromise.then((function(n){return n.subscribe(e._decorateObserver({onKeys:function(e){return t(e)},onError:function(e){return r(e)}}))})).catch(r)}))},e.prototype.summary=function(){var e=this;return null!==this._summary?Promise.resolve(this._summary):null!==this._error?Promise.reject(this._error):new Promise((function(t,r){e._streamObserverPromise.then((function(n){n.cancel(),n.subscribe(e._decorateObserver({onCompleted:function(e){return t(e)},onError:function(e){return r(e)}}))})).catch(r)}))},e.prototype._getOrCreatePromise=function(){var e=this;return null==this._p&&(this._p=new Promise((function(t,r){var n=[],o={onNext:function(e){n.push(e)},onCompleted:function(e){t({records:n,summary:e})},onError:function(e){r(e)}};e.subscribe(o)}))),this._p},e.prototype[Symbol.asyncIterator]=function(){var e=this;if(!this.isOpen()){var t=(0,c.newError)("Result is already consumed");return{next:function(){return Promise.reject(t)},peek:function(){return Promise.reject(t)}}}var r={paused:!0,firstRun:!0,finished:!1},n=function(){var t,n;if(null!=r.streaming){var o=null!==(n=null===(t=r.queuedObserver)||void 0===t?void 0:t.size)&&void 0!==n?n:0,i=o>=e._watermarks.high,a=o<=e._watermarks.low;i&&!r.paused?(r.paused=!0,r.streaming.pause()):(a&&r.paused||r.firstRun&&!i)&&(r.firstRun=!1,r.paused=!1,r.streaming.resume())}},a=function(){return o(e,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return void 0!==r.queuedObserver?[3,2]:(r.queuedObserver=this._createQueuedResultObserver(n),e=r,[4,this._subscribe(r.queuedObserver,!0).catch((function(){}))]);case 1:e.streaming=t.sent(),n(),t.label=2;case 2:return[2,r.queuedObserver]}}))}))},u=function(e){if(void 0===e)throw(0,c.newError)("InvalidState: Result stream finished without Summary",c.PROTOCOL_ERROR);return!0};return{next:function(){return o(e,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return r.finished&&u(r.summary)?[2,{done:!0,value:r.summary}]:[4,a()];case 1:return[4,t.sent().dequeue()];case 2:return!0===(e=t.sent()).done&&(r.finished=e.done,r.summary=e.value),[2,e]}}))}))},return:function(t){return o(e,void 0,void 0,(function(){var e,n;return i(this,(function(o){switch(o.label){case 0:return r.finished&&u(r.summary)?[2,{done:!0,value:null!=t?t:r.summary}]:(null===(n=r.streaming)||void 0===n||n.cancel(),[4,a()]);case 1:return[4,o.sent().dequeueUntilDone()];case 2:return e=o.sent(),r.finished=!0,e.value=null!=t?t:e.value,r.summary=e.value,[2,e]}}))}))},peek:function(){return o(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return r.finished&&u(r.summary)?[2,{done:!0,value:r.summary}]:[4,a()];case 1:return[4,e.sent().head()];case 2:return[2,e.sent()]}}))}))}}},e.prototype.then=function(e,t){return this._getOrCreatePromise().then(e,t)},e.prototype.catch=function(e){return this._getOrCreatePromise().catch(e)},e.prototype.finally=function(e){return this._getOrCreatePromise().finally(e)},e.prototype.subscribe=function(e){this._subscribe(e).catch((function(){}))},e.prototype.isOpen=function(){return null===this._summary&&null===this._error},e.prototype._subscribe=function(e,t){void 0===t&&(t=!1);var r=this._decorateObserver(e);return this._streamObserverPromise.then((function(e){return t&&e.pause(),e.subscribe(r),e})).catch((function(e){return null!=r.onError&&r.onError(e),Promise.reject(e)}))},e.prototype._decorateObserver=function(e){var t,r,n,o=this,i=null!==(t=e.onCompleted)&&void 0!==t?t:h,a=null!==(r=e.onError)&&void 0!==r?r:f,u=null!==(n=e.onKeys)&&void 0!==n?n:d;return{onNext:null!=e.onNext?e.onNext.bind(e):void 0,onKeys:function(t){return o._keys=t,u.call(e,t)},onCompleted:function(t){o._releaseConnectionAndGetSummary(t).then((function(t){return null!==o._summary?i.call(e,o._summary):(o._summary=t,i.call(e,t))})).catch(a)},onError:function(t){o._connectionHolder.releaseConnection().then((function(){!function(e,t){null!=t&&(e.stack=e.toString()+"\n"+t)}(t,o._stack),o._error=t,a.call(e,t)})).catch(a)}}},e.prototype._cancel=function(){null===this._summary&&null===this._error&&this._streamObserverPromise.then((function(e){return e.cancel()})).catch((function(){}))},e.prototype._releaseConnectionAndGetSummary=function(e){var t=s.util.validateQueryAndParameters(this._query,this._parameters,{skipAsserts:!0}),r=t.validatedQuery,n=t.params,o=this._connectionHolder;return o.getConnection().then((function(e){return o.releaseConnection().then((function(){return null==e?void 0:e.getProtocolVersion()}))}),(function(e){})).then((function(t){return new u.default(r,n,e,t)}))},e.prototype._createQueuedResultObserver=function(e){var t=this;function r(){var e={};return e.promise=new Promise((function(t,r){e.resolve=t,e.reject=r})),e}function n(e){return e instanceof Error}function a(){var t;return o(this,void 0,void 0,(function(){var o;return i(this,(function(i){switch(i.label){case 0:if(u.length>0){if(o=null!==(t=u.shift())&&void 0!==t?t:(0,c.newError)("Unexpected empty buffer",c.PROTOCOL_ERROR),e(),n(o))throw o;return[2,o]}return s.resolvable=r(),[4,s.resolvable.promise];case 1:return[2,i.sent()]}}))}))}var u=[],s={resolvable:null},l={onNext:function(e){l._push({done:!1,value:e})},onCompleted:function(e){l._push({done:!0,value:e})},onError:function(e){l._push(e)},_push:function(t){if(null!==s.resolvable){var r=s.resolvable;s.resolvable=null,n(t)?r.reject(t):r.resolve(t)}else u.push(t),e()},dequeue:a,dequeueUntilDone:function(){return o(t,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,a()];case 1:return!0===(e=t.sent()).done?[2,e]:[3,0];case 2:return[2]}}))}))},head:function(){return o(t,void 0,void 0,(function(){var t,o;return i(this,(function(i){switch(i.label){case 0:if(u.length>0){if(n(t=u[0]))throw t;return[2,t]}s.resolvable=r(),i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,s.resolvable.promise];case 2:return t=i.sent(),u.unshift(t),[2,t];case 3:throw o=i.sent(),u.unshift(o),o;case 4:return e(),[7];case 5:return[2]}}))}))},get size(){return u.length}};return l},e}();n=Symbol.toStringTag,t.default=p},5481:function(e,t,r){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{s(n.next(e))}catch(e){i(e)}}function u(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,u)}s((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(s){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,n=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}},i=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},a=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=r(2696),c=r(6587),l=r(326),f=r(9691),h=u(r(9512)),d=r(3618),p=r(6189),v=r(9730),y=r(754),b=u(r(4569)),m=u(r(5909)),g=function(){function e(e){var t=e.mode,r=e.connectionProvider,n=e.bookmarks,o=e.database,i=e.config,a=e.reactive,u=e.fetchSize,s=e.impersonatedUser,c=e.bookmarkManager,f=e.notificationFilter,h=e.auth,y=e.log;this._mode=t,this._database=o,this._reactive=a,this._fetchSize=u,this._onDatabaseNameResolved=this._onDatabaseNameResolved.bind(this),this._getConnectionAcquistionBookmarks=this._getConnectionAcquistionBookmarks.bind(this),this._readConnectionHolder=new d.ConnectionHolder({mode:l.ACCESS_MODE_READ,auth:h,database:o,bookmarks:n,connectionProvider:r,impersonatedUser:s,onDatabaseNameResolved:this._onDatabaseNameResolved,getConnectionAcquistionBookmarks:this._getConnectionAcquistionBookmarks,log:y}),this._writeConnectionHolder=new d.ConnectionHolder({mode:l.ACCESS_MODE_WRITE,auth:h,database:o,bookmarks:n,connectionProvider:r,impersonatedUser:s,onDatabaseNameResolved:this._onDatabaseNameResolved,getConnectionAcquistionBookmarks:this._getConnectionAcquistionBookmarks,log:y}),this._open=!0,this._hasTx=!1,this._impersonatedUser=s,this._lastBookmarks=null!=n?n:v.Bookmarks.empty(),this._configuredBookmarks=this._lastBookmarks,this._transactionExecutor=function(e){var t,r=null!==(t=null==e?void 0:e.maxTransactionRetryTime)&&void 0!==t?t:null;return new p.TransactionExecutor(r)}(i),this._databaseNameResolved=""!==this._database;var b=this._calculateWatermaks();this._lowRecordWatermark=b.low,this._highRecordWatermark=b.high,this._results=[],this._bookmarkManager=c,this._notificationFilter=f,this._log=y}return e.prototype.run=function(e,t,r){var i=this,a=(0,c.validateQueryAndParameters)(e,t),u=a.validatedQuery,s=a.params,f=null!=r?new y.TxConfig(r,this._log):y.TxConfig.empty(),h=this._run(u,s,(function(e){return n(i,void 0,void 0,(function(){var t,r=this;return o(this,(function(n){switch(n.label){case 0:return[4,this._bookmarks()];case 1:return t=n.sent(),this._assertSessionIsOpen(),[2,e.run(u,s,{bookmarks:t,txConfig:f,mode:this._mode,database:this._database,apiTelemetryConfig:{api:l.TELEMETRY_APIS.AUTO_COMMIT_TRANSACTION},impersonatedUser:this._impersonatedUser,afterComplete:function(e){return r._onCompleteCallback(e,t)},reactive:this._reactive,fetchSize:this._fetchSize,lowRecordWatermark:this._lowRecordWatermark,highRecordWatermark:this._highRecordWatermark,notificationFilter:this._notificationFilter})]}}))}))}));return this._results.push(h),h},e.prototype._run=function(e,t,r){var n=this._acquireAndConsumeConnection(r),o=n.connectionHolder,i=n.resultPromise.catch((function(e){return Promise.resolve(new s.FailedObserver({error:e}))})),a={high:this._highRecordWatermark,low:this._lowRecordWatermark};return new h.default(i,e,t,o,a)},e.prototype._acquireConnection=function(e){var t=this,r=this._acquireAndConsumeConnection(e),i=r.connectionHolder;return r.resultPromise.then((function(e){return n(t,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,i.releaseConnection()];case 1:return t.sent(),[2,e]}}))}))}))},e.prototype._acquireAndConsumeConnection=function(e){var t,r=this._connectionHolderWithMode(this._mode);return t=this._open?!this._hasTx&&r.initializeConnection()?r.getConnection().then((function(t){return e(t)})):Promise.reject((0,f.newError)("Queries cannot be run directly on a session with an open transaction; either run from within the transaction or use a different session.")):Promise.reject((0,f.newError)("Cannot run query in a closed session.")),{connectionHolder:r,resultPromise:t}},e.prototype.beginTransaction=function(e){var t=e,r=y.TxConfig.empty();return null!=t&&(r=new y.TxConfig(t,this._log)),this._beginTransaction(this._mode,r,{api:l.TELEMETRY_APIS.UNMANAGED_TRANSACTION})},e.prototype._beginTransaction=function(t,r,n){var o=this;if(!this._open)throw(0,f.newError)("Cannot begin a transaction on a closed session.");if(this._hasTx)throw(0,f.newError)("You cannot begin a transaction on a session with an open transaction; either run from within the transaction or use a different session.");var i=e._validateSessionMode(t),a=this._connectionHolderWithMode(i);a.initializeConnection(),this._hasTx=!0;var u=new b.default({connectionHolder:a,impersonatedUser:this._impersonatedUser,onClose:this._transactionClosed.bind(this),onBookmarks:function(e,t,r){return o._updateBookmarks(e,t,r)},onConnection:this._assertSessionIsOpen.bind(this),reactive:this._reactive,fetchSize:this._fetchSize,lowRecordWatermark:this._lowRecordWatermark,highRecordWatermark:this._highRecordWatermark,notificationFilter:this._notificationFilter,apiTelemetryConfig:n});return u._begin((function(){return o._bookmarks()}),r),u},e.prototype._assertSessionIsOpen=function(){if(!this._open)throw(0,f.newError)("You cannot run more transactions on a closed session.")},e.prototype._transactionClosed=function(){this._hasTx=!1},e.prototype.lastBookmark=function(){return this.lastBookmarks()},e.prototype.lastBookmarks=function(){return this._lastBookmarks.values()},e.prototype._bookmarks=function(){var e;return n(this,void 0,void 0,(function(){var t;return o(this,(function(r){switch(r.label){case 0:return[4,null===(e=this._bookmarkManager)||void 0===e?void 0:e.getBookmarks()];case 1:return void 0===(t=r.sent())?[2,this._lastBookmarks]:[2,new v.Bookmarks(a(a([],i(t),!1),i(this._configuredBookmarks),!1))]}}))}))},e.prototype.readTransaction=function(e,t){var r=new y.TxConfig(t,this._log);return this._runTransaction(l.ACCESS_MODE_READ,r,e)},e.prototype.writeTransaction=function(e,t){var r=new y.TxConfig(t,this._log);return this._runTransaction(l.ACCESS_MODE_WRITE,r,e)},e.prototype._runTransaction=function(e,t,r){var n=this;return this._transactionExecutor.execute((function(r){return n._beginTransaction(e,t,r)}),r)},e.prototype.executeRead=function(e,t){var r=new y.TxConfig(t,this._log);return this._executeInTransaction(l.ACCESS_MODE_READ,r,e)},e.prototype.executeWrite=function(e,t){var r=new y.TxConfig(t,this._log);return this._executeInTransaction(l.ACCESS_MODE_WRITE,r,e)},e.prototype._executeInTransaction=function(e,t,r){var n=this;return this._transactionExecutor.execute((function(r){return n._beginTransaction(e,t,r)}),r,m.default.fromTransaction)},e.prototype._onDatabaseNameResolved=function(e){if(!this._databaseNameResolved){var t=null!=e?e:"";this._database=t,this._readConnectionHolder.setDatabase(t),this._writeConnectionHolder.setDatabase(t),this._databaseNameResolved=!0}},e.prototype._getConnectionAcquistionBookmarks=function(){var e;return n(this,void 0,void 0,(function(){var t;return o(this,(function(r){switch(r.label){case 0:return[4,null===(e=this._bookmarkManager)||void 0===e?void 0:e.getBookmarks()];case 1:return void 0===(t=r.sent())?[2,this._lastBookmarks]:[2,new v.Bookmarks(a(a([],i(this._configuredBookmarks),!1),i(t),!1))]}}))}))},e.prototype._updateBookmarks=function(e,t,r){var n,o,i;null==e||e.isEmpty()||(null===(n=this._bookmarkManager)||void 0===n||n.updateBookmarks(null!==(o=null==t?void 0:t.values())&&void 0!==o?o:[],null!==(i=null==e?void 0:e.values())&&void 0!==i?i:[]).catch((function(){})),this._lastBookmarks=e,this._configuredBookmarks=v.Bookmarks.empty())},e.prototype.close=function(){return n(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return this._open?(this._open=!1,this._results.forEach((function(e){return e._cancel()})),this._transactionExecutor.close(),[4,this._readConnectionHolder.close(this._hasTx)]):[3,3];case 1:return e.sent(),[4,this._writeConnectionHolder.close(this._hasTx)];case 2:e.sent(),e.label=3;case 3:return[2]}}))}))},e.prototype[Symbol.asyncDispose]=function(){return this.close()},e.prototype._connectionHolderWithMode=function(e){if(e===l.ACCESS_MODE_READ)return this._readConnectionHolder;if(e===l.ACCESS_MODE_WRITE)return this._writeConnectionHolder;throw(0,f.newError)("Unknown access mode: "+e)},e.prototype._onCompleteCallback=function(e,t){this._updateBookmarks(new v.Bookmarks(e.bookmark),t,e.db)},e.prototype._calculateWatermaks=function(){return this._fetchSize===l.FETCH_ALL?{low:Number.MAX_VALUE,high:Number.MAX_VALUE}:{low:.3*this._fetchSize,high:.7*this._fetchSize}},e.prototype._configureTransactionExecutor=function(e,t){this._transactionExecutor.pipelineBegin=e,this._transactionExecutor.telemetryApi=t},e._validateSessionMode=function(e){var t=null!=e?e:l.ACCESS_MODE_WRITE;if(t!==l.ACCESS_MODE_READ&&t!==l.ACCESS_MODE_WRITE)throw(0,f.newError)("Illegal session mode "+t);return t},e}();t.default=g},7093:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isPoint=t.Point=void 0;var n=r(6587),o="__isPoint__",i=function(){function e(e,t,r,o){this.srid=(0,n.assertNumberOrInteger)(e,"SRID"),this.x=(0,n.assertNumber)(t,"X coordinate"),this.y=(0,n.assertNumber)(r,"Y coordinate"),this.z=null==o?o:(0,n.assertNumber)(o,"Z coordinate"),Object.freeze(this)}return e.prototype.toString=function(){return null==this.z||isNaN(this.z)?"Point{srid=".concat(a(this.srid),", x=").concat(a(this.x),", y=").concat(a(this.y),"}"):"Point{srid=".concat(a(this.srid),", x=").concat(a(this.x),", y=").concat(a(this.y),", z=").concat(a(this.z),"}")},e}();function a(e){return Number.isInteger(e)?e.toString()+".0":e.toString()}t.Point=i,Object.defineProperty(i.prototype,o,{value:!0,enumerable:!1,configurable:!1,writable:!1}),t.isPoint=function(e){return null!=e&&!0===e[o]}},5459:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},a=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};Object.defineProperty(t,"__esModule",{value:!0}),t.isDateTime=t.DateTime=t.isLocalDateTime=t.LocalDateTime=t.isDate=t.Date=t.isTime=t.Time=t.isLocalTime=t.LocalTime=t.isDuration=t.Duration=void 0;var u=i(r(5022)),s=r(6587),c=r(9691),l=i(r(3371)),f={value:!0,enumerable:!1,configurable:!1,writable:!1},h="__isDuration__",d="__isLocalTime__",p="__isTime__",v="__isDate__",y="__isLocalDateTime__",b="__isDateTime__",m=function(){function e(e,t,r,n){this.months=(0,s.assertNumberOrInteger)(e,"Months"),this.days=(0,s.assertNumberOrInteger)(t,"Days"),(0,s.assertNumberOrInteger)(r,"Seconds"),(0,s.assertNumberOrInteger)(n,"Nanoseconds"),this.seconds=u.normalizeSecondsForDuration(r,n),this.nanoseconds=u.normalizeNanosecondsForDuration(n),Object.freeze(this)}return e.prototype.toString=function(){return u.durationToIsoString(this.months,this.days,this.seconds,this.nanoseconds)},e}();t.Duration=m,Object.defineProperty(m.prototype,h,f),t.isDuration=function(e){return E(e,h)};var g=function(){function e(e,t,r,n){this.hour=u.assertValidHour(e),this.minute=u.assertValidMinute(t),this.second=u.assertValidSecond(r),this.nanosecond=u.assertValidNanosecond(n),Object.freeze(this)}return e.fromStandardDate=function(t,r){x(t,r);var n=u.totalNanoseconds(t,r);return new e(t.getHours(),t.getMinutes(),t.getSeconds(),n instanceof l.default?n.toInt():"bigint"==typeof n?(0,l.int)(n).toInt():n)},e.prototype.toString=function(){return u.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)},e}();t.LocalTime=g,Object.defineProperty(g.prototype,d,f),t.isLocalTime=function(e){return E(e,d)};var _=function(){function e(e,t,r,n,o){this.hour=u.assertValidHour(e),this.minute=u.assertValidMinute(t),this.second=u.assertValidSecond(r),this.nanosecond=u.assertValidNanosecond(n),this.timeZoneOffsetSeconds=(0,s.assertNumberOrInteger)(o,"Time zone offset in seconds"),Object.freeze(this)}return e.fromStandardDate=function(t,r){return x(t,r),new e(t.getHours(),t.getMinutes(),t.getSeconds(),(0,l.toNumber)(u.totalNanoseconds(t,r)),u.timeZoneOffsetInSeconds(t))},e.prototype.toString=function(){return u.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)+u.timeZoneOffsetToIsoString(this.timeZoneOffsetSeconds)},e}();t.Time=_,Object.defineProperty(_.prototype,p,f),t.isTime=function(e){return E(e,p)};var w=function(){function e(e,t,r){this.year=u.assertValidYear(e),this.month=u.assertValidMonth(t),this.day=u.assertValidDay(r),Object.freeze(this)}return e.fromStandardDate=function(t){return x(t),new e(t.getFullYear(),t.getMonth()+1,t.getDate())},e.prototype.toStandardDate=function(){return u.isoStringToStandardDate(this.toString())},e.prototype.toString=function(){return u.dateToIsoString(this.year,this.month,this.day)},e}();t.Date=w,Object.defineProperty(w.prototype,v,f),t.isDate=function(e){return E(e,v)};var O=function(){function e(e,t,r,n,o,i,a){this.year=u.assertValidYear(e),this.month=u.assertValidMonth(t),this.day=u.assertValidDay(r),this.hour=u.assertValidHour(n),this.minute=u.assertValidMinute(o),this.second=u.assertValidSecond(i),this.nanosecond=u.assertValidNanosecond(a),Object.freeze(this)}return e.fromStandardDate=function(t,r){return x(t,r),new e(t.getFullYear(),t.getMonth()+1,t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),(0,l.toNumber)(u.totalNanoseconds(t,r)))},e.prototype.toStandardDate=function(){return u.isoStringToStandardDate(this.toString())},e.prototype.toString=function(){return P(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)},e}();t.LocalDateTime=O,Object.defineProperty(O.prototype,y,f),t.isLocalDateTime=function(e){return E(e,y)};var S=function(){function e(e,t,r,n,o,i,l,f,h){this.year=u.assertValidYear(e),this.month=u.assertValidMonth(t),this.day=u.assertValidDay(r),this.hour=u.assertValidHour(n),this.minute=u.assertValidMinute(o),this.second=u.assertValidSecond(i),this.nanosecond=u.assertValidNanosecond(l);var d=a(function(e,t){var r=null!=e,n=null!=t&&""!==t;if(!r&&!n)throw(0,c.newError)("Unable to create DateTime without either time zone offset or id. Please specify either of them. Given offset: ".concat(e," and id: ").concat(t));var o=[void 0,void 0];return r&&((0,s.assertNumberOrInteger)(e,"Time zone offset in seconds"),o[0]=e),n&&((0,s.assertString)(t,"Time zone ID"),u.assertValidZoneId("Time zone ID",t),o[1]=t),o}(f,h),2),p=d[0],v=d[1];this.timeZoneOffsetSeconds=p,this.timeZoneId=null!=v?v:void 0,Object.freeze(this)}return e.fromStandardDate=function(t,r){return x(t,r),new e(t.getFullYear(),t.getMonth()+1,t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),(0,l.toNumber)(u.totalNanoseconds(t,r)),u.timeZoneOffsetInSeconds(t),null)},e.prototype.toStandardDate=function(){return u.toStandardDate(this._toUTC())},e.prototype.toString=function(){var e;return P(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)+(null!=this.timeZoneOffsetSeconds?u.timeZoneOffsetToIsoString(null!==(e=this.timeZoneOffsetSeconds)&&void 0!==e?e:0):"")+(null!=this.timeZoneId?"[".concat(this.timeZoneId,"]"):"")},e.prototype._toUTC=function(){var e;if(void 0===this.timeZoneOffsetSeconds)throw new Error("Requires DateTime created with time zone offset");var t=u.localDateTimeToEpochSecond(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond).subtract(null!==(e=this.timeZoneOffsetSeconds)&&void 0!==e?e:0);return(0,l.int)(t).multiply(1e3).add((0,l.int)(this.nanosecond).div(1e6)).toNumber()},e}();function E(e,t){return null!=e&&!0===e[t]}function P(e,t,r,n,o,i,a){return u.dateToIsoString(e,t,r)+"T"+u.timeToIsoString(n,o,i,a)}function x(e,t){(0,s.assertValidDate)(e,"Standard date"),null!=t&&(0,s.assertNumberOrInteger)(t,"Nanosecond")}t.DateTime=S,Object.defineProperty(S.prototype,b,f),t.isDateTime=function(e){return E(e,b)}},5909:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){var t=e.run;this._run=t}return e.fromTransaction=function(t){return new e({run:t.run.bind(t)})},e.prototype.run=function(e,t){return this._run(e,t)},e}();t.default=r},4569:function(e,t,r){var n,o,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),a=this&&this.__assign||function(){return a=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(t){var r=t.connectionHolder,n=t.onClose,i=t.onBookmarks,a=t.onConnection,u=t.reactive,s=t.fetchSize,c=t.impersonatedUser,l=t.highRecordWatermark,f=t.lowRecordWatermark,h=t.notificationFilter,d=t.apiTelemetryConfig,p=e.call(this,{connectionHolder:r,onClose:n,onBookmarks:i,onConnection:a,reactive:u,fetchSize:s,impersonatedUser:c,highRecordWatermark:l,lowRecordWatermark:f,notificationFilter:h,apiTelemetryConfig:d})||this;return p[o]="TransactionPromise",p}return i(t,e),t.prototype.then=function(e,t){return this._getOrCreateBeginPromise().then(e,t)},t.prototype.catch=function(e){return this._getOrCreateBeginPromise().catch(e)},t.prototype.finally=function(e){return this._getOrCreateBeginPromise().finally(e)},t.prototype._getOrCreateBeginPromise=function(){var e=this;return null==this._beginPromise&&(this._beginPromise=new Promise((function(t,r){e._resolve=t,e._reject=r,null!=e._beginError&&r(e._beginError),null!=e._beginMetadata&&t(e._toTransaction())}))),this._beginPromise},t.prototype._toTransaction=function(){return a(a({},this),{run:e.prototype.run.bind(this),commit:e.prototype.commit.bind(this),rollback:e.prototype.rollback.bind(this),close:e.prototype.close.bind(this),isOpen:e.prototype.isOpen.bind(this),_begin:this._begin.bind(this)})},t.prototype._begin=function(t,r){return e.prototype._begin.call(this,t,r,{onError:this._onBeginError.bind(this),onComplete:this._onBeginMetadata.bind(this)})},t.prototype._onBeginError=function(e){this._beginError=e,null!=this._reject&&this._reject(e)},t.prototype._onBeginMetadata=function(e){this._beginMetadata=null!=e?e:{},null!=this._resolve&&this._resolve(this._toTransaction())},t}(u(r(9473)).default);o=Symbol.toStringTag,t.default=s},9473:function(e,t,r){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{s(n.next(e))}catch(e){i(e)}}function u(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,u)}s((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(s){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,n=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=r(6587),u=r(3618),s=r(9730),c=r(754),l=r(2696),f=r(9691),h=i(r(9512)),d=function(){function e(e){var t=e.connectionHolder,r=e.onClose,n=e.onBookmarks,o=e.onConnection,i=e.reactive,a=e.fetchSize,u=e.impersonatedUser,c=e.highRecordWatermark,l=e.lowRecordWatermark,f=e.notificationFilter,h=e.apiTelemetryConfig,d=this;this._connectionHolder=t,this._reactive=i,this._state=p.ACTIVE,this._onClose=r,this._onBookmarks=n,this._onConnection=o,this._onError=this._onErrorCallback.bind(this),this._fetchSize=a,this._onComplete=this._onCompleteCallback.bind(this),this._results=[],this._impersonatedUser=u,this._lowRecordWatermak=l,this._highRecordWatermark=c,this._bookmarks=s.Bookmarks.empty(),this._notificationFilter=f,this._apiTelemetryConfig=h,this._acceptActive=function(){},this._activePromise=new Promise((function(e,t){d._acceptActive=e}))}return e.prototype._begin=function(e,t,r){var i=this;this._connectionHolder.getConnection().then((function(a){return n(i,void 0,void 0,(function(){var n,i=this;return o(this,(function(o){switch(o.label){case 0:return this._onConnection(),null==a?[3,2]:(n=this,[4,e()]);case 1:return n._bookmarks=o.sent(),[2,a.beginTransaction({bookmarks:this._bookmarks,txConfig:t,mode:this._connectionHolder.mode(),database:this._connectionHolder.database(),impersonatedUser:this._impersonatedUser,notificationFilter:this._notificationFilter,apiTelemetryConfig:this._apiTelemetryConfig,beforeError:function(e){null!=r&&r.onError(e),i._onError(e).catch((function(){}))},afterComplete:function(e){null!=r&&r.onComplete(e),i._onComplete(e)}})];case 2:throw(0,f.newError)("No connection available")}}))}))})).catch((function(e){null!=r&&r.onError(e),i._onError(e).catch((function(){}))})).finally((function(){return i._acceptActive()}))},e.prototype.run=function(e,t){var r=(0,a.validateQueryAndParameters)(e,t),n=r.validatedQuery,o=r.params,i=this._state.run(n,o,{connectionHolder:this._connectionHolder,onError:this._onError,onComplete:this._onComplete,onConnection:this._onConnection,reactive:this._reactive,fetchSize:this._fetchSize,highRecordWatermark:this._highRecordWatermark,lowRecordWatermark:this._lowRecordWatermak,preparationJob:this._activePromise});return this._results.push(i),i},e.prototype.commit=function(){var e=this,t=this._state.commit({connectionHolder:this._connectionHolder,onError:this._onError,onComplete:function(t){return e._onCompleteCallback(t,e._bookmarks)},onConnection:this._onConnection,pendingResults:this._results,preparationJob:this._activePromise});return this._state=t.state,this._onClose(),new Promise((function(e,r){t.result.subscribe({onCompleted:function(){return e()},onError:function(e){return r(e)}})}))},e.prototype.rollback=function(){var e=this._state.rollback({connectionHolder:this._connectionHolder,onError:this._onError,onComplete:this._onComplete,onConnection:this._onConnection,pendingResults:this._results,preparationJob:this._activePromise});return this._state=e.state,this._onClose(),new Promise((function(t,r){e.result.subscribe({onCompleted:function(){return t()},onError:function(e){return r(e)}})}))},e.prototype.isOpen=function(){return this._state===p.ACTIVE},e.prototype.close=function(){return n(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return this.isOpen()?[4,this.rollback()]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}))}))},e.prototype[Symbol.asyncDispose]=function(){return this.close()},e.prototype._onErrorCallback=function(e){return this._state===p.FAILED?Promise.resolve(null):(this._state=p.FAILED,this._onClose(),this._results.forEach((function(t){t.isOpen()&&t._streamObserverPromise.then((function(t){return t.onError(e)})).catch((function(e){}))})),this._connectionHolder.releaseConnection())},e.prototype._onCompleteCallback=function(e,t){this._onBookmarks(new s.Bookmarks(null==e?void 0:e.bookmark),null!=t?t:s.Bookmarks.empty(),null==e?void 0:e.db)},e}(),p={ACTIVE:{commit:function(e){return{result:v(!0,e.connectionHolder,e.onError,e.onComplete,e.onConnection,e.pendingResults,e.preparationJob),state:p.SUCCEEDED}},rollback:function(e){return{result:v(!1,e.connectionHolder,e.onError,e.onComplete,e.onConnection,e.pendingResults,e.preparationJob),state:p.ROLLED_BACK}},run:function(e,t,r){var n=r.connectionHolder,o=r.onError,i=r.onComplete,a=r.onConnection,u=r.reactive,h=r.fetchSize,d=r.highRecordWatermark,p=r.lowRecordWatermark,v=r.preparationJob,b=null!=v?v:Promise.resolve();return y(n.getConnection().then((function(e){return b.then((function(){return e}))})).then((function(r){if(a(),null!=r)return r.run(e,t,{bookmarks:s.Bookmarks.empty(),txConfig:c.TxConfig.empty(),beforeError:o,afterComplete:i,reactive:u,fetchSize:h,highRecordWatermark:d,lowRecordWatermark:p});throw(0,f.newError)("No connection available")})).catch((function(e){return new l.FailedObserver({error:e,onError:o})})),e,t,n,d,p)}},FAILED:{commit:function(e){var t=e.connectionHolder,r=e.onError;return e.onComplete,{result:y(new l.FailedObserver({error:(0,f.newError)("Cannot commit this transaction, because it has been rolled back either because of an error or explicit termination."),onError:r}),"COMMIT",{},t,0,0),state:p.FAILED}},rollback:function(e){var t=e.connectionHolder;return e.onError,e.onComplete,{result:y(new l.CompletedObserver,"ROLLBACK",{},t,0,0),state:p.FAILED}},run:function(e,t,r){var n=r.connectionHolder,o=r.onError;return r.onComplete,y(new l.FailedObserver({error:(0,f.newError)("Cannot run query in this transaction, because it has been rolled back either because of an error or explicit termination."),onError:o}),e,t,n,0,0)}},SUCCEEDED:{commit:function(e){var t=e.connectionHolder,r=e.onError;return e.onComplete,{result:y(new l.FailedObserver({error:(0,f.newError)("Cannot commit this transaction, because it has already been committed."),onError:r}),"COMMIT",{},u.EMPTY_CONNECTION_HOLDER,0,0),state:p.SUCCEEDED,connectionHolder:t}},rollback:function(e){var t=e.connectionHolder,r=e.onError;return e.onComplete,{result:y(new l.FailedObserver({error:(0,f.newError)("Cannot rollback this transaction, because it has already been committed."),onError:r}),"ROLLBACK",{},u.EMPTY_CONNECTION_HOLDER,0,0),state:p.SUCCEEDED,connectionHolder:t}},run:function(e,t,r){var n=r.connectionHolder,o=r.onError;return r.onComplete,y(new l.FailedObserver({error:(0,f.newError)("Cannot run query in this transaction, because it has already been committed."),onError:o}),e,t,n,0,0)}},ROLLED_BACK:{commit:function(e){var t=e.connectionHolder,r=e.onError;return e.onComplete,{result:y(new l.FailedObserver({error:(0,f.newError)("Cannot commit this transaction, because it has already been rolled back."),onError:r}),"COMMIT",{},t,0,0),state:p.ROLLED_BACK}},rollback:function(e){var t=e.connectionHolder;return e.onError,e.onComplete,{result:y(new l.FailedObserver({error:(0,f.newError)("Cannot rollback this transaction, because it has already been rolled back.")}),"ROLLBACK",{},t,0,0),state:p.ROLLED_BACK}},run:function(e,t,r){var n=r.connectionHolder,o=r.onError;return r.onComplete,y(new l.FailedObserver({error:(0,f.newError)("Cannot run query in this transaction, because it has already been rolled back."),onError:o}),e,t,n,0,0)}}};function v(e,t,r,n,o,i,a){var u=null!=a?a:Promise.resolve(),s=t.getConnection().then((function(e){return u.then((function(){return e}))})).then((function(t){return o(),i.forEach((function(e){return e._cancel()})),Promise.all(i.map((function(e){return e.summary()}))).then((function(o){if(null!=t)return e?t.commitTransaction({beforeError:r,afterComplete:n}):t.rollbackTransaction({beforeError:r,afterComplete:n});throw(0,f.newError)("No connection available")}))})).catch((function(e){return new l.FailedObserver({error:e,onError:r})}));return new h.default(s,e?"COMMIT":"ROLLBACK",{},t,{high:Number.MAX_VALUE,low:Number.MAX_VALUE})}function y(e,t,r,n,o,i){return void 0===n&&(n=u.EMPTY_CONNECTION_HOLDER),new h.default(Promise.resolve(e),t,r,new u.ReadOnlyConnectionHolder(null!=n?n:u.EMPTY_CONNECTION_HOLDER),{low:i,high:o})}t.default=d},6872:function(e,t){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.InternalConfig=t.Config=void 0;var o=function(){this.encrypted=void 0,this.trust=void 0,this.trustedCertificates=[],this.maxConnectionPoolSize=100,this.maxConnectionLifetime=36e5,this.connectionAcquisitionTimeout=6e4,this.maxTransactionRetryTime=3e4,this.connectionLivenessCheckTimeout=void 0,this.connectionTimeout=3e4,this.disableLosslessIntegers=!1,this.useBigInt=!1,this.logging=void 0,this.resolver=void 0,this.notificationFilter=void 0,this.userAgent=void 0,this.telemetryDisabled=!1,this.clientCertificate=void 0};t.Config=o;var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(o);t.InternalConfig=i},7857:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WRITE=t.READ=t.Driver=void 0;var a=r(9305),u=i(r(3466)),s=a.internal.constants.FETCH_ALL,c=a.driver.READ,l=a.driver.WRITE;t.READ=c,t.WRITE=l;var f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.rxSession=function(e){var t=void 0===e?{}:e,r=t.defaultAccessMode,n=void 0===r?l:r,o=t.bookmarks,i=t.database,a=void 0===i?"":i,s=t.fetchSize,c=t.impersonatedUser,f=t.bookmarkManager,d=t.notificationFilter,p=t.auth;return new u.default({session:this._newSession({defaultAccessMode:n,bookmarkOrBookmarks:o,database:a,impersonatedUser:c,auth:p,reactive:!1,fetchSize:h(s,this._config.fetchSize),bookmarkManager:f,notificationFilter:d,log:this._log}),config:this._config,log:this._log})},t}(a.Driver);function h(e,t){var r=parseInt(e,10);if(r>0||r===s)return r;if(0===r||r<0)throw new Error("The fetch size can only be a positive value or ".concat(s," for ALL. However fetchSize = ").concat(r));return t}t.Driver=f,t.default=f},1187:function(e,t,r){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{s(n.next(e))}catch(e){i(e)}}function u(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,u)}s((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(s){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,n=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.UnboundRelationship=t.Relationship=t.Node=t.Record=t.ServerInfo=t.GqlStatusObject=t.Notification=t.QueryStatistics=t.ProfiledPlan=t.Plan=t.ResultSummary=t.RxResult=t.RxManagedTransaction=t.RxTransaction=t.RxSession=t.EagerResult=t.Result=t.ManagedTransaction=t.Transaction=t.Session=t.Driver=t.temporal=t.spatial=t.graph=t.error=t.routing=t.session=t.types=t.logging=t.auth=t.isRetryableError=t.Neo4jError=t.integer=t.isUnboundRelationship=t.isRelationship=t.isPathSegment=t.isPath=t.isNode=t.isDateTime=t.isLocalDateTime=t.isDate=t.isTime=t.isLocalTime=t.isDuration=t.isPoint=t.isInt=t.int=t.hasReachableServer=t.driver=t.authTokenManagers=void 0,t.clientCertificateProviders=t.notificationFilterMinimumSeverityLevel=t.notificationFilterDisabledClassification=t.notificationFilterDisabledCategory=t.notificationSeverityLevel=t.notificationClassification=t.notificationCategory=t.resultTransformers=t.bookmarkManager=t.DateTime=t.LocalDateTime=t.Date=t.Time=t.LocalTime=t.Duration=t.Integer=t.Point=t.PathSegment=t.Path=void 0;var a=r(7857);Object.defineProperty(t,"Driver",{enumerable:!0,get:function(){return a.Driver}});var u=i(r(3659)),s=r(9305);Object.defineProperty(t,"authTokenManagers",{enumerable:!0,get:function(){return s.authTokenManagers}}),Object.defineProperty(t,"Neo4jError",{enumerable:!0,get:function(){return s.Neo4jError}}),Object.defineProperty(t,"isRetryableError",{enumerable:!0,get:function(){return s.isRetryableError}}),Object.defineProperty(t,"error",{enumerable:!0,get:function(){return s.error}}),Object.defineProperty(t,"Integer",{enumerable:!0,get:function(){return s.Integer}}),Object.defineProperty(t,"int",{enumerable:!0,get:function(){return s.int}}),Object.defineProperty(t,"isInt",{enumerable:!0,get:function(){return s.isInt}}),Object.defineProperty(t,"isPoint",{enumerable:!0,get:function(){return s.isPoint}}),Object.defineProperty(t,"Point",{enumerable:!0,get:function(){return s.Point}}),Object.defineProperty(t,"Date",{enumerable:!0,get:function(){return s.Date}}),Object.defineProperty(t,"DateTime",{enumerable:!0,get:function(){return s.DateTime}}),Object.defineProperty(t,"Duration",{enumerable:!0,get:function(){return s.Duration}}),Object.defineProperty(t,"isDate",{enumerable:!0,get:function(){return s.isDate}}),Object.defineProperty(t,"isDateTime",{enumerable:!0,get:function(){return s.isDateTime}}),Object.defineProperty(t,"isDuration",{enumerable:!0,get:function(){return s.isDuration}}),Object.defineProperty(t,"isLocalDateTime",{enumerable:!0,get:function(){return s.isLocalDateTime}}),Object.defineProperty(t,"isLocalTime",{enumerable:!0,get:function(){return s.isLocalTime}}),Object.defineProperty(t,"isNode",{enumerable:!0,get:function(){return s.isNode}}),Object.defineProperty(t,"isPath",{enumerable:!0,get:function(){return s.isPath}}),Object.defineProperty(t,"isPathSegment",{enumerable:!0,get:function(){return s.isPathSegment}}),Object.defineProperty(t,"isRelationship",{enumerable:!0,get:function(){return s.isRelationship}}),Object.defineProperty(t,"isTime",{enumerable:!0,get:function(){return s.isTime}}),Object.defineProperty(t,"isUnboundRelationship",{enumerable:!0,get:function(){return s.isUnboundRelationship}}),Object.defineProperty(t,"LocalDateTime",{enumerable:!0,get:function(){return s.LocalDateTime}}),Object.defineProperty(t,"LocalTime",{enumerable:!0,get:function(){return s.LocalTime}}),Object.defineProperty(t,"Time",{enumerable:!0,get:function(){return s.Time}}),Object.defineProperty(t,"Node",{enumerable:!0,get:function(){return s.Node}}),Object.defineProperty(t,"Path",{enumerable:!0,get:function(){return s.Path}}),Object.defineProperty(t,"PathSegment",{enumerable:!0,get:function(){return s.PathSegment}}),Object.defineProperty(t,"Relationship",{enumerable:!0,get:function(){return s.Relationship}}),Object.defineProperty(t,"UnboundRelationship",{enumerable:!0,get:function(){return s.UnboundRelationship}}),Object.defineProperty(t,"Record",{enumerable:!0,get:function(){return s.Record}}),Object.defineProperty(t,"ResultSummary",{enumerable:!0,get:function(){return s.ResultSummary}}),Object.defineProperty(t,"Plan",{enumerable:!0,get:function(){return s.Plan}}),Object.defineProperty(t,"ProfiledPlan",{enumerable:!0,get:function(){return s.ProfiledPlan}}),Object.defineProperty(t,"QueryStatistics",{enumerable:!0,get:function(){return s.QueryStatistics}}),Object.defineProperty(t,"Notification",{enumerable:!0,get:function(){return s.Notification}}),Object.defineProperty(t,"GqlStatusObject",{enumerable:!0,get:function(){return s.GqlStatusObject}}),Object.defineProperty(t,"ServerInfo",{enumerable:!0,get:function(){return s.ServerInfo}}),Object.defineProperty(t,"Result",{enumerable:!0,get:function(){return s.Result}}),Object.defineProperty(t,"EagerResult",{enumerable:!0,get:function(){return s.EagerResult}}),Object.defineProperty(t,"auth",{enumerable:!0,get:function(){return s.auth}}),Object.defineProperty(t,"Session",{enumerable:!0,get:function(){return s.Session}}),Object.defineProperty(t,"Transaction",{enumerable:!0,get:function(){return s.Transaction}}),Object.defineProperty(t,"ManagedTransaction",{enumerable:!0,get:function(){return s.ManagedTransaction}}),Object.defineProperty(t,"bookmarkManager",{enumerable:!0,get:function(){return s.bookmarkManager}}),Object.defineProperty(t,"routing",{enumerable:!0,get:function(){return s.routing}}),Object.defineProperty(t,"resultTransformers",{enumerable:!0,get:function(){return s.resultTransformers}}),Object.defineProperty(t,"notificationCategory",{enumerable:!0,get:function(){return s.notificationCategory}}),Object.defineProperty(t,"notificationClassification",{enumerable:!0,get:function(){return s.notificationClassification}}),Object.defineProperty(t,"notificationSeverityLevel",{enumerable:!0,get:function(){return s.notificationSeverityLevel}}),Object.defineProperty(t,"notificationFilterDisabledCategory",{enumerable:!0,get:function(){return s.notificationFilterDisabledCategory}}),Object.defineProperty(t,"notificationFilterDisabledClassification",{enumerable:!0,get:function(){return s.notificationFilterDisabledClassification}}),Object.defineProperty(t,"notificationFilterMinimumSeverityLevel",{enumerable:!0,get:function(){return s.notificationFilterMinimumSeverityLevel}}),Object.defineProperty(t,"clientCertificateProviders",{enumerable:!0,get:function(){return s.clientCertificateProviders}});var c=r(6672),l=i(r(3466));t.RxSession=l.default;var f=i(r(5742));t.RxTransaction=f.default;var h=i(r(1530));t.RxManagedTransaction=h.default;var d=i(r(3057));t.RxResult=d.default;var p=s.internal.util,v=p.ENCRYPTION_ON,y=p.assertString,b=p.isEmptyObjectOrNull,m=s.internal.serverAddress.ServerAddress,g=s.internal.urlUtil,_="neo4j-javascript/"+u.default;function w(e,t,r){void 0===r&&(r={}),y(e,"Bolt URL");var n,o=g.parseDatabaseUrl(e),i=!1,l=!1;switch(o.scheme){case"bolt":break;case"bolt+s":l=!0,n="TRUST_SYSTEM_CA_SIGNED_CERTIFICATES";break;case"bolt+ssc":l=!0,n="TRUST_ALL_CERTIFICATES";break;case"neo4j":i=!0;break;case"neo4j+s":l=!0,n="TRUST_SYSTEM_CA_SIGNED_CERTIFICATES",i=!0;break;case"neo4j+ssc":l=!0,n="TRUST_ALL_CERTIFICATES",i=!0;break;default:throw new Error("Unknown scheme: ".concat(o.scheme))}if(l){if("encrypted"in r||"trust"in r)throw new Error("Encryption/trust can only be configured either through URL or config, not both");r.encrypted=v,r.trust=n,r.clientCertificate=(0,s.resolveCertificateProvider)(r.clientCertificate)}var f=function(e){if("object"==typeof(t=e)&&null!=t&&"getToken"in t&&"handleSecurityException"in t&&"function"==typeof t.getToken&&"function"==typeof t.handleSecurityException)return e;var t,r=e;return(r=r||{}).scheme=r.scheme||"none",(0,s.staticAuthTokenManager)({authToken:r})}(t);r.userAgent=r.userAgent||_,r.boltAgent=s.internal.boltAgent.fromVersion(u.default);var h=m.fromUrl(o.hostAndPort),d={address:h,typename:i?"Routing":"Direct",routing:i};return new a.Driver(d,r,function(){if(i)return function(e,t,r,n){return new c.RoutingConnectionProvider({id:e,config:t,log:r,hostNameResolver:n,authTokenManager:f,address:h,userAgent:t.userAgent,boltAgent:t.boltAgent,routingContext:o.query})};if(!b(o.query))throw new Error("Parameters are not supported with none routed scheme. Given URL: '".concat(e,"'"));return function(e,t,r){return new c.DirectConnectionProvider({id:e,config:t,log:r,authTokenManager:f,address:h,userAgent:t.userAgent,boltAgent:t.boltAgent})}}())}function O(e,t){return n(this,void 0,void 0,(function(){var r;return o(this,(function(n){switch(n.label){case 0:r=w(e,{scheme:"none",principal:"",credentials:""},t),n.label=1;case 1:return n.trys.push([1,,3,5]),[4,r.getNegotiatedProtocolVersion()];case 2:return n.sent(),[2,!0];case 3:return[4,r.close()];case 4:return n.sent(),[7];case 5:return[2]}}))}))}t.driver=w,t.hasReachableServer=O;var S={console:function(e){return{level:e,logger:function(e,t){return console.log("".concat(r.g.Date.now()," ").concat(e.toUpperCase()," ").concat(t))}}}};t.logging=S;var E={Node:s.Node,Relationship:s.Relationship,UnboundRelationship:s.UnboundRelationship,PathSegment:s.PathSegment,Path:s.Path,Result:s.Result,EagerResult:s.EagerResult,ResultSummary:s.ResultSummary,Record:s.Record,Point:s.Point,Date:s.Date,DateTime:s.DateTime,Duration:s.Duration,LocalDateTime:s.LocalDateTime,LocalTime:s.LocalTime,Time:s.Time,Integer:s.Integer};t.types=E;var P={READ:a.READ,WRITE:a.WRITE};t.session=P;var x={toNumber:s.toNumber,toString:s.toString,inSafeRange:s.inSafeRange};t.integer=x;var T={isPoint:s.isPoint};t.spatial=T;var j={isDuration:s.isDuration,isLocalTime:s.isLocalTime,isTime:s.isTime,isDate:s.isDate,isLocalDateTime:s.isLocalDateTime,isDateTime:s.isDateTime};t.temporal=j;var C={isNode:s.isNode,isPath:s.isPath,isPathSegment:s.isPathSegment,isRelationship:s.isRelationship,isUnboundRelationship:s.isUnboundRelationship};t.graph=C;var A={authTokenManagers:s.authTokenManagers,driver:w,hasReachableServer:O,int:s.int,isInt:s.isInt,isPoint:s.isPoint,isDuration:s.isDuration,isLocalTime:s.isLocalTime,isTime:s.isTime,isDate:s.isDate,isLocalDateTime:s.isLocalDateTime,isDateTime:s.isDateTime,isNode:s.isNode,isPath:s.isPath,isPathSegment:s.isPathSegment,isRelationship:s.isRelationship,isUnboundRelationship:s.isUnboundRelationship,integer:x,Neo4jError:s.Neo4jError,isRetryableError:s.isRetryableError,auth:s.auth,logging:S,types:E,session:P,routing:s.routing,error:s.error,graph:C,spatial:T,temporal:j,Driver:a.Driver,Session:s.Session,Transaction:s.Transaction,ManagedTransaction:s.ManagedTransaction,Result:s.Result,EagerResult:s.EagerResult,RxSession:l.default,RxTransaction:f.default,RxManagedTransaction:h.default,RxResult:d.default,ResultSummary:s.ResultSummary,Plan:s.Plan,ProfiledPlan:s.ProfiledPlan,QueryStatistics:s.QueryStatistics,Notification:s.Notification,GqlStatusObject:s.GqlStatusObject,ServerInfo:s.ServerInfo,Record:s.Record,Node:s.Node,Relationship:s.Relationship,UnboundRelationship:s.UnboundRelationship,Path:s.Path,PathSegment:s.PathSegment,Point:s.Point,Integer:s.Integer,Duration:s.Duration,LocalTime:s.LocalTime,Time:s.Time,Date:s.Date,LocalDateTime:s.LocalDateTime,DateTime:s.DateTime,bookmarkManager:s.bookmarkManager,resultTransformers:s.resultTransformers,notificationCategory:s.notificationCategory,notificationSeverityLevel:s.notificationSeverityLevel,notificationFilterDisabledCategory:s.notificationFilterDisabledCategory,notificationFilterMinimumSeverityLevel:s.notificationFilterMinimumSeverityLevel,clientCertificateProviders:s.clientCertificateProviders};t.default=A},9823:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=r(9305),o=r(8813),i=r(9419),a=(n.internal.logger.Logger,n.error.SERVICE_UNAVAILABLE),u=function(){function e(e){var t=void 0===e?{}:e,r=t.maxRetryTimeout,n=void 0===r?3e4:r,o=t.initialDelay,i=void 0===o?1e3:o,a=t.delayMultiplier,u=void 0===a?2:a,c=t.delayJitter,l=void 0===c?.2:c,f=t.logger,h=void 0===f?null:f;this._maxRetryTimeout=s(n,3e4),this._initialDelay=s(i,1e3),this._delayMultiplier=s(u,2),this._delayJitter=s(l,.2),this._logger=h}return e.prototype.retry=function(e){var t=this;return e.pipe((0,i.retryWhen)((function(e){var r=[],u=Date.now(),s=1,c=t._initialDelay;return e.pipe((0,i.mergeMap)((function(e){if(!(0,n.isRetriableError)(e))return(0,o.throwError)((function(){return e}));if(r.push(e),s>=2&&Date.now()-u>=t._maxRetryTimeout){var l=(0,n.newError)("Failed after retried for ".concat(s," times in ").concat(t._maxRetryTimeout," ms. Make sure that your database is online and retry again."),a);return l.seenErrors=r,(0,o.throwError)((function(){return l}))}var f=t._computeNextDelay(c);return c*=t._delayMultiplier,s++,t._logger&&t._logger.warn("Transaction failed and will be retried in ".concat(f)),(0,o.of)(1).pipe((0,i.delay)(f))})))})))},e.prototype._computeNextDelay=function(e){var t=e*this._delayJitter;return e-t+2*t*Math.random()},e}();function s(e,t){return e||0===e?e:t}t.default=u},3057:function(e,t,r){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{s(n.next(e))}catch(e){i(e)}}function u(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,u)}s((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(s){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,n=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(9305),a=r(8813),u=r(9419),s=function(){function e(e,t){var r=e.pipe((0,u.publishReplay)(1),(0,u.refCount)());this._result=r,this._keys=r.pipe((0,u.mergeMap)((function(e){return(0,a.from)(e.keys())})),(0,u.publishReplay)(1),(0,u.refCount)()),this._records=void 0,this._controls=new c,this._summary=new a.ReplaySubject,this._state=t||0}return e.prototype.keys=function(){return this._keys},e.prototype.records=function(){var e=this,t=this._result.pipe((0,u.mergeMap)((function(t){return new a.Observable((function(r){return e._startStreaming({result:t,recordsObserver:r})}))})));return t.push=function(){return e._push()},t},e.prototype.consume=function(){var e=this;return this._result.pipe((0,u.mergeMap)((function(t){return new a.Observable((function(r){return e._startStreaming({result:t,summaryObserver:r})}))})))},e.prototype.pause=function(){this._controls.pause()},e.prototype.resume=function(){return this._controls.resume()},e.prototype.push=function(){return this._controls.push()},e.prototype._startStreaming=function(e){var t=void 0===e?{}:e,r=t.result,n=t.recordsObserver,o=void 0===n?null:n,a=t.summaryObserver,u=void 0===a?null:a,s=[];return u&&s.push(this._summary.subscribe(u)),this._state<1?(this._state=1,this._setupRecordsStream(r),o?s.push(this._records.subscribe(o)):r._cancel(),s.push({unsubscribe:function(){r._cancel&&r._cancel()}})):o&&o.error((0,i.newError)("Streaming has already started/consumed with a previous records or summary subscription.")),function(){s.forEach((function(e){return e.unsubscribe()}))}},e.prototype._toObservable=function(){var t=this;return new a.Observable((function(r){t._result.subscribe({complete:function(){return r.complete()},next:function(n){return r.next(new e(function(e){return new a.Observable((function(t){t.next(e),t.complete()}))}(n)),t._state)},error:function(e){return r.error(e)}})}))},e.prototype._setupRecordsStream=function(e){var t=this;return this._records||(this._records=function(e,t,r){var i=this;void 0===r&&(r=new c);var u=new a.Subject,s=function(a){return n(i,void 0,void 0,(function(){var n,i,c,l;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,3,4]),r.pushing=!0,[4,a];case 1:return n=o.sent(),i=n.done,c=n.value,i?(u.complete(),t.complete()):(u.next(c),r.paused||s(e.next()).catch((function(){}))),[3,4];case 2:return l=o.sent(),u.error(l),t.error(l),[3,4];case 3:return r.pushing=!1,[7];case 4:return[2]}}))}))};function l(t){return n(this,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,s(e.next(t))];case 1:return r.sent(),[2]}}))}))}return r.pusher=l,l(),u}(e[Symbol.asyncIterator](),{complete:function(){return n(t,void 0,void 0,(function(){var t,r;return o(this,(function(n){switch(n.label){case 0:return this._state=2,r=(t=this._summary).next,[4,e.summary()];case 1:return r.apply(t,[n.sent()]),this._summary.complete(),[2]}}))}))},error:function(e){t._state=2,t._summary.error(e)}},this._controls)),this._records},e}();t.default=s;var c=function(){function e(e){void 0===e&&(e=function(){return n(t,void 0,void 0,(function(){return o(this,(function(e){return[2]}))}))});var t=this;this._paused=!1,this._pushing=!1,this._push=e}return e.prototype.pause=function(){this._paused=!0},Object.defineProperty(e.prototype,"paused",{get:function(){return this._paused},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pushing",{get:function(){return this._pushing},set:function(e){this._pushing=e},enumerable:!1,configurable:!0}),e.prototype.resume=function(){return n(this,void 0,void 0,(function(){var e;return o(this,(function(t){switch(t.label){case 0:return e=this._paused,this._paused=!1,!e||this._pushing?[3,2]:[4,this._push()];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))},e.prototype.push=function(){return n(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return this.pause(),[4,this._push()];case 1:return[2,e.sent()]}}))}))},Object.defineProperty(e.prototype,"pusher",{get:function(){return this._push},set:function(e){this._push=e},enumerable:!1,configurable:!0}),e}()},3466:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(8813),i=r(9419),a=n(r(3057)),u=r(9305),s=n(r(5742)),c=n(r(1530)),l=n(r(9823)),f=u.internal.constants,h=f.ACCESS_MODE_READ,d=f.ACCESS_MODE_WRITE,p=f.TELEMETRY_APIS,v=u.internal.txConfig.TxConfig,y=function(){function e(e){var t=void 0===e?{}:e,r=t.session,n=t.config,o=t.log;this._session=r,this._retryLogic=function(e){var t=e&&e.maxTransactionRetryTime?e.maxTransactionRetryTime:null;return new l.default({maxRetryTimeout:t})}(n),this._log=o}return e.prototype.run=function(e,t,r){var n=this;return new a.default(new o.Observable((function(o){try{o.next(n._session.run(e,t,r)),o.complete()}catch(e){o.error(e)}return function(){}})))},e.prototype.beginTransaction=function(e){return this._beginTransaction(this._session._mode,e,{api:p.UNMANAGED_TRANSACTION})},e.prototype.readTransaction=function(e,t){return this._runTransaction(h,e,t)},e.prototype.writeTransaction=function(e,t){return this._runTransaction(d,e,t)},e.prototype.executeRead=function(e,t){return this._executeInTransaction(h,e,t)},e.prototype.executeWrite=function(e,t){return this._executeInTransaction(d,e,t)},e.prototype._executeInTransaction=function(e,t,r){return this._runTransaction(e,t,r,(function(e){return new c.default({run:e.run.bind(e)})}))},e.prototype.close=function(){var e=this;return new o.Observable((function(t){e._session.close().then((function(){t.complete()})).catch((function(e){return t.error(e)}))}))},e.prototype[Symbol.asyncDispose]=function(){return this.close()},e.prototype.lastBookmark=function(){return this.lastBookmarks()},e.prototype.lastBookmarks=function(){return this._session.lastBookmarks()},e.prototype._beginTransaction=function(e,t,r){var n=this,i=v.empty();return t&&(i=new v(t,this._log)),new o.Observable((function(t){try{n._session._beginTransaction(e,i,r).then((function(e){t.next(new s.default(e)),t.complete()})).catch((function(e){return t.error(e)}))}catch(e){t.error(e)}return function(){}}))},e.prototype._runTransaction=function(e,t,r,n){var a=this;void 0===n&&(n=function(e){return e});var u=v.empty();r&&(u=new v(r));var s={apiTelemetryConfig:{api:p.MANAGED_TRANSACTION,onTelemetrySuccess:function(){s.apiTelemetryConfig=void 0}}};return this._retryLogic.retry((0,o.of)(1).pipe((0,i.mergeMap)((function(){return a._beginTransaction(e,u,s.apiTelemetryConfig)})),(0,i.mergeMap)((function(e){return(0,o.defer)((function(){try{return t(n(e))}catch(e){return(0,o.throwError)((function(){return e}))}})).pipe((0,i.catchError)((function(t){return e.rollback().pipe((0,i.concatWith)((0,o.throwError)((function(){return t}))))})),(0,i.concatWith)(e.commit()))}))))},e}();t.default=y},1530:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),n(r(3057)),n(r(5742));var o=function(){function e(e){var t=e.run;this._run=t}return e.fromTransaction=function(t){return new e({run:t.run.bind(t)})},e.prototype.run=function(e,t){return this._run(e,t)},e}();t.default=o},5742:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(8813),i=n(r(3057)),a=(n(r(9305)),function(){function e(e){this._txc=e}return e.prototype.run=function(e,t){var r=this;return new i.default(new o.Observable((function(n){try{n.next(r._txc.run(e,t)),n.complete()}catch(e){n.error(e)}return function(){}})))},e.prototype.commit=function(){var e=this;return new o.Observable((function(t){e._txc.commit().then((function(){t.complete()})).catch((function(e){return t.error(e)}))}))},e.prototype.rollback=function(){var e=this;return new o.Observable((function(t){e._txc.rollback().then((function(){t.complete()})).catch((function(e){return t.error(e)}))}))},e.prototype.isOpen=function(){return this._txc.isOpen()},e.prototype.close=function(){var e=this;return new o.Observable((function(t){e._txc.close().then((function(){t.complete()})).catch((function(e){return t.error(e)}))}))},e}());t.default=a},3659:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default="5.26.0"},481:(e,t,r)=>{e.exports=r(137)},137:e=>{e.exports=class{constructor(e,t,r,n){let o;if("object"==typeof e){let i=e;e=i.k_p,t=i.k_i,r=i.k_d,n=i.dt,o=i.i_max}this.k_p="number"==typeof e?e:1,this.k_i=t||0,this.k_d=r||0,this.dt=n||0,this.i_max=o||0,this.sumError=0,this.lastError=0,this.lastTime=0,this.target=0}setTarget(e){this.target=e}update(e){this.currentValue=e;let t=this.dt;if(!t){let e=Date.now();t=0===this.lastTime?0:(e-this.lastTime)/1e3,this.lastTime=e}"number"==typeof t&&0!==t||(t=1);let r=this.target-this.currentValue;if(this.sumError=this.sumError+r*t,this.i_max>0&&Math.abs(this.sumError)>this.i_max){let e=this.sumError>0?1:-1;this.sumError=e*this.i_max}let n=(r-this.lastError)/t;return this.lastError=r,this.k_p*r+this.k_i*this.sumError+this.k_d*n}reset(){this.sumError=0,this.lastError=0,this.lastTime=0}}},1803:e=>{var t,r,n=document.attachEvent,o=!1;function i(e){var t=e.__resizeTriggers__,r=t.firstElementChild,n=t.lastElementChild,o=r.firstElementChild;n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight,o.style.width=r.offsetWidth+1+"px",o.style.height=r.offsetHeight+1+"px",r.scrollLeft=r.scrollWidth,r.scrollTop=r.scrollHeight}function a(e){var t=this;i(this),this.__resizeRAF__&&s(this.__resizeRAF__),this.__resizeRAF__=u((function(){(function(e){return e.offsetWidth!=e.__resizeLast__.width||e.offsetHeight!=e.__resizeLast__.height})(t)&&(t.__resizeLast__.width=t.offsetWidth,t.__resizeLast__.height=t.offsetHeight,t.__resizeListeners__.forEach((function(r){r.call(t,e)})))}))}if(!n){var u=(r=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(e){return window.setTimeout(e,20)},function(e){return r(e)}),s=(t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.clearTimeout,function(e){return t(e)}),c=!1,l="",f="animationstart",h="Webkit Moz O ms".split(" "),d="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),p=document.createElement("fakeelement");if(void 0!==p.style.animationName&&(c=!0),!1===c)for(var v=0;v<h.length;v++)if(void 0!==p.style[h[v]+"AnimationName"]){l="-"+h[v].toLowerCase()+"-",f=d[v],c=!0;break}var y="resizeanim",b="@"+l+"keyframes "+y+" { from { opacity: 0; } to { opacity: 0; } } ",m=l+"animation: 1ms "+y+"; "}e.exports=function(e,t){return n?e.attachEvent("onresize",t):(e.__resizeTriggers__||("static"==getComputedStyle(e).position&&(e.style.position="relative"),function(){if(!o){var e=(b||"")+".resize-triggers { "+(m||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e)),t.appendChild(r),o=!0}}(),e.__resizeLast__={},e.__resizeListeners__=[],(e.__resizeTriggers__=document.createElement("div")).className="resize-triggers",e.__resizeTriggers__.innerHTML='<div class="expand-trigger"><div></div></div><div class="contract-trigger"></div>',e.appendChild(e.__resizeTriggers__),i(e),e.addEventListener("scroll",a,!0),f&&e.__resizeTriggers__.addEventListener(f,(function(t){t.animationName==y&&i(e)}))),e.__resizeListeners__.push(t)),function(){n?e.detachEvent("onresize",t):(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),e.__resizeListeners__.length||(e.removeEventListener("scroll",a),e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)))}}},8813:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.interval=t.iif=t.generate=t.fromEventPattern=t.fromEvent=t.from=t.forkJoin=t.empty=t.defer=t.connectable=t.concat=t.combineLatest=t.bindNodeCallback=t.bindCallback=t.UnsubscriptionError=t.TimeoutError=t.SequenceError=t.ObjectUnsubscribedError=t.NotFoundError=t.EmptyError=t.ArgumentOutOfRangeError=t.firstValueFrom=t.lastValueFrom=t.isObservable=t.identity=t.noop=t.pipe=t.NotificationKind=t.Notification=t.Subscriber=t.Subscription=t.Scheduler=t.VirtualAction=t.VirtualTimeScheduler=t.animationFrameScheduler=t.animationFrame=t.queueScheduler=t.queue=t.asyncScheduler=t.async=t.asapScheduler=t.asap=t.AsyncSubject=t.ReplaySubject=t.BehaviorSubject=t.Subject=t.animationFrames=t.observable=t.ConnectableObservable=t.Observable=void 0,t.filter=t.expand=t.exhaustMap=t.exhaustAll=t.exhaust=t.every=t.endWith=t.elementAt=t.distinctUntilKeyChanged=t.distinctUntilChanged=t.distinct=t.dematerialize=t.delayWhen=t.delay=t.defaultIfEmpty=t.debounceTime=t.debounce=t.count=t.connect=t.concatWith=t.concatMapTo=t.concatMap=t.concatAll=t.combineLatestWith=t.combineLatestAll=t.combineAll=t.catchError=t.bufferWhen=t.bufferToggle=t.bufferTime=t.bufferCount=t.buffer=t.auditTime=t.audit=t.config=t.NEVER=t.EMPTY=t.scheduled=t.zip=t.using=t.timer=t.throwError=t.range=t.race=t.partition=t.pairs=t.onErrorResumeNext=t.of=t.never=t.merge=void 0,t.switchMap=t.switchAll=t.subscribeOn=t.startWith=t.skipWhile=t.skipUntil=t.skipLast=t.skip=t.single=t.shareReplay=t.share=t.sequenceEqual=t.scan=t.sampleTime=t.sample=t.refCount=t.retryWhen=t.retry=t.repeatWhen=t.repeat=t.reduce=t.raceWith=t.publishReplay=t.publishLast=t.publishBehavior=t.publish=t.pluck=t.pairwise=t.onErrorResumeNextWith=t.observeOn=t.multicast=t.min=t.mergeWith=t.mergeScan=t.mergeMapTo=t.mergeMap=t.flatMap=t.mergeAll=t.max=t.materialize=t.mapTo=t.map=t.last=t.isEmpty=t.ignoreElements=t.groupBy=t.first=t.findIndex=t.find=t.finalize=void 0,t.zipWith=t.zipAll=t.withLatestFrom=t.windowWhen=t.windowToggle=t.windowTime=t.windowCount=t.window=t.toArray=t.timestamp=t.timeoutWith=t.timeout=t.timeInterval=t.throwIfEmpty=t.throttleTime=t.throttle=t.tap=t.takeWhile=t.takeUntil=t.takeLast=t.take=t.switchScan=t.switchMapTo=void 0;var i=r(4662);Object.defineProperty(t,"Observable",{enumerable:!0,get:function(){return i.Observable}});var a=r(8918);Object.defineProperty(t,"ConnectableObservable",{enumerable:!0,get:function(){return a.ConnectableObservable}});var u=r(3327);Object.defineProperty(t,"observable",{enumerable:!0,get:function(){return u.observable}});var s=r(3110);Object.defineProperty(t,"animationFrames",{enumerable:!0,get:function(){return s.animationFrames}});var c=r(2483);Object.defineProperty(t,"Subject",{enumerable:!0,get:function(){return c.Subject}});var l=r(1637);Object.defineProperty(t,"BehaviorSubject",{enumerable:!0,get:function(){return l.BehaviorSubject}});var f=r(1242);Object.defineProperty(t,"ReplaySubject",{enumerable:!0,get:function(){return f.ReplaySubject}});var h=r(95);Object.defineProperty(t,"AsyncSubject",{enumerable:!0,get:function(){return h.AsyncSubject}});var d=r(3692);Object.defineProperty(t,"asap",{enumerable:!0,get:function(){return d.asap}}),Object.defineProperty(t,"asapScheduler",{enumerable:!0,get:function(){return d.asapScheduler}});var p=r(7961);Object.defineProperty(t,"async",{enumerable:!0,get:function(){return p.async}}),Object.defineProperty(t,"asyncScheduler",{enumerable:!0,get:function(){return p.asyncScheduler}});var v=r(2886);Object.defineProperty(t,"queue",{enumerable:!0,get:function(){return v.queue}}),Object.defineProperty(t,"queueScheduler",{enumerable:!0,get:function(){return v.queueScheduler}});var y=r(3862);Object.defineProperty(t,"animationFrame",{enumerable:!0,get:function(){return y.animationFrame}}),Object.defineProperty(t,"animationFrameScheduler",{enumerable:!0,get:function(){return y.animationFrameScheduler}});var b=r(182);Object.defineProperty(t,"VirtualTimeScheduler",{enumerable:!0,get:function(){return b.VirtualTimeScheduler}}),Object.defineProperty(t,"VirtualAction",{enumerable:!0,get:function(){return b.VirtualAction}});var m=r(8986);Object.defineProperty(t,"Scheduler",{enumerable:!0,get:function(){return m.Scheduler}});var g=r(8014);Object.defineProperty(t,"Subscription",{enumerable:!0,get:function(){return g.Subscription}});var _=r(5);Object.defineProperty(t,"Subscriber",{enumerable:!0,get:function(){return _.Subscriber}});var w=r(7800);Object.defineProperty(t,"Notification",{enumerable:!0,get:function(){return w.Notification}}),Object.defineProperty(t,"NotificationKind",{enumerable:!0,get:function(){return w.NotificationKind}});var O=r(2706);Object.defineProperty(t,"pipe",{enumerable:!0,get:function(){return O.pipe}});var S=r(1342);Object.defineProperty(t,"noop",{enumerable:!0,get:function(){return S.noop}});var E=r(6640);Object.defineProperty(t,"identity",{enumerable:!0,get:function(){return E.identity}});var P=r(1751);Object.defineProperty(t,"isObservable",{enumerable:!0,get:function(){return P.isObservable}});var x=r(6894);Object.defineProperty(t,"lastValueFrom",{enumerable:!0,get:function(){return x.lastValueFrom}});var T=r(9060);Object.defineProperty(t,"firstValueFrom",{enumerable:!0,get:function(){return T.firstValueFrom}});var j=r(7057);Object.defineProperty(t,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return j.ArgumentOutOfRangeError}});var C=r(2823);Object.defineProperty(t,"EmptyError",{enumerable:!0,get:function(){return C.EmptyError}});var A=r(1759);Object.defineProperty(t,"NotFoundError",{enumerable:!0,get:function(){return A.NotFoundError}});var k=r(9686);Object.defineProperty(t,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return k.ObjectUnsubscribedError}});var R=r(1505);Object.defineProperty(t,"SequenceError",{enumerable:!0,get:function(){return R.SequenceError}});var I=r(1554);Object.defineProperty(t,"TimeoutError",{enumerable:!0,get:function(){return I.TimeoutError}});var M=r(5788);Object.defineProperty(t,"UnsubscriptionError",{enumerable:!0,get:function(){return M.UnsubscriptionError}});var N=r(2713);Object.defineProperty(t,"bindCallback",{enumerable:!0,get:function(){return N.bindCallback}});var D=r(8561);Object.defineProperty(t,"bindNodeCallback",{enumerable:!0,get:function(){return D.bindNodeCallback}});var L=r(3247);Object.defineProperty(t,"combineLatest",{enumerable:!0,get:function(){return L.combineLatest}});var U=r(3865);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return U.concat}});var F=r(7579);Object.defineProperty(t,"connectable",{enumerable:!0,get:function(){return F.connectable}});var B=r(9353);Object.defineProperty(t,"defer",{enumerable:!0,get:function(){return B.defer}});var z=r(8616);Object.defineProperty(t,"empty",{enumerable:!0,get:function(){return z.empty}});var V=r(9105);Object.defineProperty(t,"forkJoin",{enumerable:!0,get:function(){return V.forkJoin}});var W=r(4917);Object.defineProperty(t,"from",{enumerable:!0,get:function(){return W.from}});var G=r(5337);Object.defineProperty(t,"fromEvent",{enumerable:!0,get:function(){return G.fromEvent}});var q=r(347);Object.defineProperty(t,"fromEventPattern",{enumerable:!0,get:function(){return q.fromEventPattern}});var H=r(7610);Object.defineProperty(t,"generate",{enumerable:!0,get:function(){return H.generate}});var Y=r(4209);Object.defineProperty(t,"iif",{enumerable:!0,get:function(){return Y.iif}});var X=r(6472);Object.defineProperty(t,"interval",{enumerable:!0,get:function(){return X.interval}});var Z=r(2833);Object.defineProperty(t,"merge",{enumerable:!0,get:function(){return Z.merge}});var K=r(8655);Object.defineProperty(t,"never",{enumerable:!0,get:function(){return K.never}});var $=r(1004);Object.defineProperty(t,"of",{enumerable:!0,get:function(){return $.of}});var Q=r(6102);Object.defineProperty(t,"onErrorResumeNext",{enumerable:!0,get:function(){return Q.onErrorResumeNext}});var J=r(7740);Object.defineProperty(t,"pairs",{enumerable:!0,get:function(){return J.pairs}});var ee=r(1699);Object.defineProperty(t,"partition",{enumerable:!0,get:function(){return ee.partition}});var te=r(5584);Object.defineProperty(t,"race",{enumerable:!0,get:function(){return te.race}});var re=r(9376);Object.defineProperty(t,"range",{enumerable:!0,get:function(){return re.range}});var ne=r(1103);Object.defineProperty(t,"throwError",{enumerable:!0,get:function(){return ne.throwError}});var oe=r(4092);Object.defineProperty(t,"timer",{enumerable:!0,get:function(){return oe.timer}});var ie=r(7853);Object.defineProperty(t,"using",{enumerable:!0,get:function(){return ie.using}});var ae=r(7286);Object.defineProperty(t,"zip",{enumerable:!0,get:function(){return ae.zip}});var ue=r(1656);Object.defineProperty(t,"scheduled",{enumerable:!0,get:function(){return ue.scheduled}});var se=r(8616);Object.defineProperty(t,"EMPTY",{enumerable:!0,get:function(){return se.EMPTY}});var ce=r(8655);Object.defineProperty(t,"NEVER",{enumerable:!0,get:function(){return ce.NEVER}}),o(r(6038),t);var le=r(3413);Object.defineProperty(t,"config",{enumerable:!0,get:function(){return le.config}});var fe=r(3146);Object.defineProperty(t,"audit",{enumerable:!0,get:function(){return fe.audit}});var he=r(3231);Object.defineProperty(t,"auditTime",{enumerable:!0,get:function(){return he.auditTime}});var de=r(8015);Object.defineProperty(t,"buffer",{enumerable:!0,get:function(){return de.buffer}});var pe=r(5572);Object.defineProperty(t,"bufferCount",{enumerable:!0,get:function(){return pe.bufferCount}});var ve=r(7210);Object.defineProperty(t,"bufferTime",{enumerable:!0,get:function(){return ve.bufferTime}});var ye=r(8995);Object.defineProperty(t,"bufferToggle",{enumerable:!0,get:function(){return ye.bufferToggle}});var be=r(8831);Object.defineProperty(t,"bufferWhen",{enumerable:!0,get:function(){return be.bufferWhen}});var me=r(8118);Object.defineProperty(t,"catchError",{enumerable:!0,get:function(){return me.catchError}});var ge=r(6625);Object.defineProperty(t,"combineAll",{enumerable:!0,get:function(){return ge.combineAll}});var _e=r(6728);Object.defineProperty(t,"combineLatestAll",{enumerable:!0,get:function(){return _e.combineLatestAll}});var we=r(8239);Object.defineProperty(t,"combineLatestWith",{enumerable:!0,get:function(){return we.combineLatestWith}});var Oe=r(8158);Object.defineProperty(t,"concatAll",{enumerable:!0,get:function(){return Oe.concatAll}});var Se=r(9135);Object.defineProperty(t,"concatMap",{enumerable:!0,get:function(){return Se.concatMap}});var Ee=r(9938);Object.defineProperty(t,"concatMapTo",{enumerable:!0,get:function(){return Ee.concatMapTo}});var Pe=r(9669);Object.defineProperty(t,"concatWith",{enumerable:!0,get:function(){return Pe.concatWith}});var xe=r(1483);Object.defineProperty(t,"connect",{enumerable:!0,get:function(){return xe.connect}});var Te=r(1038);Object.defineProperty(t,"count",{enumerable:!0,get:function(){return Te.count}});var je=r(4461);Object.defineProperty(t,"debounce",{enumerable:!0,get:function(){return je.debounce}});var Ce=r(8079);Object.defineProperty(t,"debounceTime",{enumerable:!0,get:function(){return Ce.debounceTime}});var Ae=r(378);Object.defineProperty(t,"defaultIfEmpty",{enumerable:!0,get:function(){return Ae.defaultIfEmpty}});var ke=r(914);Object.defineProperty(t,"delay",{enumerable:!0,get:function(){return ke.delay}});var Re=r(8766);Object.defineProperty(t,"delayWhen",{enumerable:!0,get:function(){return Re.delayWhen}});var Ie=r(7441);Object.defineProperty(t,"dematerialize",{enumerable:!0,get:function(){return Ie.dematerialize}});var Me=r(5365);Object.defineProperty(t,"distinct",{enumerable:!0,get:function(){return Me.distinct}});var Ne=r(8937);Object.defineProperty(t,"distinctUntilChanged",{enumerable:!0,get:function(){return Ne.distinctUntilChanged}});var De=r(9612);Object.defineProperty(t,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return De.distinctUntilKeyChanged}});var Le=r(4520);Object.defineProperty(t,"elementAt",{enumerable:!0,get:function(){return Le.elementAt}});var Ue=r(1776);Object.defineProperty(t,"endWith",{enumerable:!0,get:function(){return Ue.endWith}});var Fe=r(5510);Object.defineProperty(t,"every",{enumerable:!0,get:function(){return Fe.every}});var Be=r(1551);Object.defineProperty(t,"exhaust",{enumerable:!0,get:function(){return Be.exhaust}});var ze=r(2752);Object.defineProperty(t,"exhaustAll",{enumerable:!0,get:function(){return ze.exhaustAll}});var Ve=r(4753);Object.defineProperty(t,"exhaustMap",{enumerable:!0,get:function(){return Ve.exhaustMap}});var We=r(7661);Object.defineProperty(t,"expand",{enumerable:!0,get:function(){return We.expand}});var Ge=r(783);Object.defineProperty(t,"filter",{enumerable:!0,get:function(){return Ge.filter}});var qe=r(3555);Object.defineProperty(t,"finalize",{enumerable:!0,get:function(){return qe.finalize}});var He=r(7714);Object.defineProperty(t,"find",{enumerable:!0,get:function(){return He.find}});var Ye=r(9756);Object.defineProperty(t,"findIndex",{enumerable:!0,get:function(){return Ye.findIndex}});var Xe=r(8275);Object.defineProperty(t,"first",{enumerable:!0,get:function(){return Xe.first}});var Ze=r(7815);Object.defineProperty(t,"groupBy",{enumerable:!0,get:function(){return Ze.groupBy}});var Ke=r(490);Object.defineProperty(t,"ignoreElements",{enumerable:!0,get:function(){return Ke.ignoreElements}});var $e=r(9356);Object.defineProperty(t,"isEmpty",{enumerable:!0,get:function(){return $e.isEmpty}});var Qe=r(8669);Object.defineProperty(t,"last",{enumerable:!0,get:function(){return Qe.last}});var Je=r(5471);Object.defineProperty(t,"map",{enumerable:!0,get:function(){return Je.map}});var et=r(3218);Object.defineProperty(t,"mapTo",{enumerable:!0,get:function(){return et.mapTo}});var tt=r(2360);Object.defineProperty(t,"materialize",{enumerable:!0,get:function(){return tt.materialize}});var rt=r(1415);Object.defineProperty(t,"max",{enumerable:!0,get:function(){return rt.max}});var nt=r(7302);Object.defineProperty(t,"mergeAll",{enumerable:!0,get:function(){return nt.mergeAll}});var ot=r(6902);Object.defineProperty(t,"flatMap",{enumerable:!0,get:function(){return ot.flatMap}});var it=r(983);Object.defineProperty(t,"mergeMap",{enumerable:!0,get:function(){return it.mergeMap}});var at=r(6586);Object.defineProperty(t,"mergeMapTo",{enumerable:!0,get:function(){return at.mergeMapTo}});var ut=r(4408);Object.defineProperty(t,"mergeScan",{enumerable:!0,get:function(){return ut.mergeScan}});var st=r(8253);Object.defineProperty(t,"mergeWith",{enumerable:!0,get:function(){return st.mergeWith}});var ct=r(2669);Object.defineProperty(t,"min",{enumerable:!0,get:function(){return ct.min}});var lt=r(9247);Object.defineProperty(t,"multicast",{enumerable:!0,get:function(){return lt.multicast}});var ft=r(5184);Object.defineProperty(t,"observeOn",{enumerable:!0,get:function(){return ft.observeOn}});var ht=r(1226);Object.defineProperty(t,"onErrorResumeNextWith",{enumerable:!0,get:function(){return ht.onErrorResumeNextWith}});var dt=r(1518);Object.defineProperty(t,"pairwise",{enumerable:!0,get:function(){return dt.pairwise}});var pt=r(4912);Object.defineProperty(t,"pluck",{enumerable:!0,get:function(){return pt.pluck}});var vt=r(766);Object.defineProperty(t,"publish",{enumerable:!0,get:function(){return vt.publish}});var yt=r(7220);Object.defineProperty(t,"publishBehavior",{enumerable:!0,get:function(){return yt.publishBehavior}});var bt=r(6106);Object.defineProperty(t,"publishLast",{enumerable:!0,get:function(){return bt.publishLast}});var mt=r(8157);Object.defineProperty(t,"publishReplay",{enumerable:!0,get:function(){return mt.publishReplay}});var gt=r(5600);Object.defineProperty(t,"raceWith",{enumerable:!0,get:function(){return gt.raceWith}});var _t=r(9139);Object.defineProperty(t,"reduce",{enumerable:!0,get:function(){return _t.reduce}});var wt=r(8522);Object.defineProperty(t,"repeat",{enumerable:!0,get:function(){return wt.repeat}});var Ot=r(6566);Object.defineProperty(t,"repeatWhen",{enumerable:!0,get:function(){return Ot.repeatWhen}});var St=r(7835);Object.defineProperty(t,"retry",{enumerable:!0,get:function(){return St.retry}});var Et=r(9843);Object.defineProperty(t,"retryWhen",{enumerable:!0,get:function(){return Et.retryWhen}});var Pt=r(7561);Object.defineProperty(t,"refCount",{enumerable:!0,get:function(){return Pt.refCount}});var xt=r(1731);Object.defineProperty(t,"sample",{enumerable:!0,get:function(){return xt.sample}});var Tt=r(6086);Object.defineProperty(t,"sampleTime",{enumerable:!0,get:function(){return Tt.sampleTime}});var jt=r(8624);Object.defineProperty(t,"scan",{enumerable:!0,get:function(){return jt.scan}});var Ct=r(582);Object.defineProperty(t,"sequenceEqual",{enumerable:!0,get:function(){return Ct.sequenceEqual}});var At=r(8977);Object.defineProperty(t,"share",{enumerable:!0,get:function(){return At.share}});var kt=r(3133);Object.defineProperty(t,"shareReplay",{enumerable:!0,get:function(){return kt.shareReplay}});var Rt=r(3001);Object.defineProperty(t,"single",{enumerable:!0,get:function(){return Rt.single}});var It=r(3982);Object.defineProperty(t,"skip",{enumerable:!0,get:function(){return It.skip}});var Mt=r(9098);Object.defineProperty(t,"skipLast",{enumerable:!0,get:function(){return Mt.skipLast}});var Nt=r(7372);Object.defineProperty(t,"skipUntil",{enumerable:!0,get:function(){return Nt.skipUntil}});var Dt=r(4721);Object.defineProperty(t,"skipWhile",{enumerable:!0,get:function(){return Dt.skipWhile}});var Lt=r(269);Object.defineProperty(t,"startWith",{enumerable:!0,get:function(){return Lt.startWith}});var Ut=r(8960);Object.defineProperty(t,"subscribeOn",{enumerable:!0,get:function(){return Ut.subscribeOn}});var Ft=r(8774);Object.defineProperty(t,"switchAll",{enumerable:!0,get:function(){return Ft.switchAll}});var Bt=r(3879);Object.defineProperty(t,"switchMap",{enumerable:!0,get:function(){return Bt.switchMap}});var zt=r(3274);Object.defineProperty(t,"switchMapTo",{enumerable:!0,get:function(){return zt.switchMapTo}});var Vt=r(8712);Object.defineProperty(t,"switchScan",{enumerable:!0,get:function(){return Vt.switchScan}});var Wt=r(846);Object.defineProperty(t,"take",{enumerable:!0,get:function(){return Wt.take}});var Gt=r(8330);Object.defineProperty(t,"takeLast",{enumerable:!0,get:function(){return Gt.takeLast}});var qt=r(4780);Object.defineProperty(t,"takeUntil",{enumerable:!0,get:function(){return qt.takeUntil}});var Ht=r(2129);Object.defineProperty(t,"takeWhile",{enumerable:!0,get:function(){return Ht.takeWhile}});var Yt=r(3964);Object.defineProperty(t,"tap",{enumerable:!0,get:function(){return Yt.tap}});var Xt=r(8941);Object.defineProperty(t,"throttle",{enumerable:!0,get:function(){return Xt.throttle}});var Zt=r(7640);Object.defineProperty(t,"throttleTime",{enumerable:!0,get:function(){return Zt.throttleTime}});var Kt=r(4869);Object.defineProperty(t,"throwIfEmpty",{enumerable:!0,get:function(){return Kt.throwIfEmpty}});var $t=r(489);Object.defineProperty(t,"timeInterval",{enumerable:!0,get:function(){return $t.timeInterval}});var Qt=r(1554);Object.defineProperty(t,"timeout",{enumerable:!0,get:function(){return Qt.timeout}});var Jt=r(4862);Object.defineProperty(t,"timeoutWith",{enumerable:!0,get:function(){return Jt.timeoutWith}});var er=r(6505);Object.defineProperty(t,"timestamp",{enumerable:!0,get:function(){return er.timestamp}});var tr=r(2343);Object.defineProperty(t,"toArray",{enumerable:!0,get:function(){return tr.toArray}});var rr=r(5477);Object.defineProperty(t,"window",{enumerable:!0,get:function(){return rr.window}});var nr=r(6746);Object.defineProperty(t,"windowCount",{enumerable:!0,get:function(){return nr.windowCount}});var or=r(8208);Object.defineProperty(t,"windowTime",{enumerable:!0,get:function(){return or.windowTime}});var ir=r(6637);Object.defineProperty(t,"windowToggle",{enumerable:!0,get:function(){return ir.windowToggle}});var ar=r(1141);Object.defineProperty(t,"windowWhen",{enumerable:!0,get:function(){return ar.windowWhen}});var ur=r(5442);Object.defineProperty(t,"withLatestFrom",{enumerable:!0,get:function(){return ur.withLatestFrom}});var sr=r(187);Object.defineProperty(t,"zipAll",{enumerable:!0,get:function(){return sr.zipAll}});var cr=r(8538);Object.defineProperty(t,"zipWith",{enumerable:!0,get:function(){return cr.zipWith}})},95:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncSubject=void 0;var i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._value=null,t._hasValue=!1,t._isComplete=!1,t}return o(t,e),t.prototype._checkFinalizedStatuses=function(e){var t=this,r=t.hasError,n=t._hasValue,o=t._value,i=t.thrownError,a=t.isStopped,u=t._isComplete;r?e.error(i):(a||u)&&(n&&e.next(o),e.complete())},t.prototype.next=function(e){this.isStopped||(this._value=e,this._hasValue=!0)},t.prototype.complete=function(){var t=this,r=t._hasValue,n=t._value;t._isComplete||(this._isComplete=!0,r&&e.prototype.next.call(this,n),e.prototype.complete.call(this))},t}(r(2483).Subject);t.AsyncSubject=i},1637:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.BehaviorSubject=void 0;var i=function(e){function t(t){var r=e.call(this)||this;return r._value=t,r}return o(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var r=e.prototype._subscribe.call(this,t);return!r.closed&&t.next(this._value),r},t.prototype.getValue=function(){var e=this,t=e.hasError,r=e.thrownError,n=e._value;if(t)throw r;return this._throwIfClosed(),n},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(r(2483).Subject);t.BehaviorSubject=i},7800:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.observeNotification=t.Notification=t.NotificationKind=void 0;var n,o=r(8616),i=r(1004),a=r(1103),u=r(1018);(n=t.NotificationKind||(t.NotificationKind={})).NEXT="N",n.ERROR="E",n.COMPLETE="C";var s=function(){function e(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue="N"===e}return e.prototype.observe=function(e){return c(this,e)},e.prototype.do=function(e,t,r){var n=this,o=n.kind,i=n.value,a=n.error;return"N"===o?null==e?void 0:e(i):"E"===o?null==t?void 0:t(a):null==r?void 0:r()},e.prototype.accept=function(e,t,r){var n;return u.isFunction(null===(n=e)||void 0===n?void 0:n.next)?this.observe(e):this.do(e,t,r)},e.prototype.toObservable=function(){var e=this,t=e.kind,r=e.value,n=e.error,u="N"===t?i.of(r):"E"===t?a.throwError((function(){return n})):"C"===t?o.EMPTY:0;if(!u)throw new TypeError("Unexpected notification kind "+t);return u},e.createNext=function(t){return new e("N",t)},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e}();function c(e,t){var r,n,o,i=e,a=i.kind,u=i.value,s=i.error;if("string"!=typeof a)throw new TypeError('Invalid notification, missing "kind"');"N"===a?null===(r=t.next)||void 0===r||r.call(t,u):"E"===a?null===(n=t.error)||void 0===n||n.call(t,s):null===(o=t.complete)||void 0===o||o.call(t)}t.Notification=s,t.observeNotification=c},9052:(e,t)=>{function r(e,t,r){return{kind:e,value:t,error:r}}Object.defineProperty(t,"__esModule",{value:!0}),t.createNotification=t.nextNotification=t.errorNotification=t.COMPLETE_NOTIFICATION=void 0,t.COMPLETE_NOTIFICATION=r("C",void 0,void 0),t.errorNotification=function(e){return r("E",void 0,e)},t.nextNotification=function(e){return r("N",e,void 0)},t.createNotification=r},4662:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Observable=void 0;var n=r(5),o=r(8014),i=r(3327),a=r(2706),u=r(3413),s=r(1018),c=r(9223),l=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var i,a=this,u=(i=e)&&i instanceof n.Subscriber||function(e){return e&&s.isFunction(e.next)&&s.isFunction(e.error)&&s.isFunction(e.complete)}(i)&&o.isSubscription(i)?e:new n.SafeSubscriber(e,t,r);return c.errorContext((function(){var e=a,t=e.operator,r=e.source;u.add(t?t.call(u,r):r?a._subscribe(u):a._trySubscribe(u))})),u},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=f(t))((function(t,o){var i=new n.SafeSubscriber({next:function(t){try{e(t)}catch(e){o(e),i.unsubscribe()}},error:o,complete:t});r.subscribe(i)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[i.observable]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return a.pipeFromArray(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=f(e))((function(e,r){var n;t.subscribe((function(e){return n=e}),(function(e){return r(e)}),(function(){return e(n)}))}))},e.create=function(t){return new e(t)},e}();function f(e){var t;return null!==(t=null!=e?e:u.config.Promise)&&void 0!==t?t:Promise}t.Observable=l},1242:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.ReplaySubject=void 0;var i=r(2483),a=r(9568),u=function(e){function t(t,r,n){void 0===t&&(t=1/0),void 0===r&&(r=1/0),void 0===n&&(n=a.dateTimestampProvider);var o=e.call(this)||this;return o._bufferSize=t,o._windowTime=r,o._timestampProvider=n,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,t),o._windowTime=Math.max(1,r),o}return o(t,e),t.prototype.next=function(t){var r=this,n=r.isStopped,o=r._buffer,i=r._infiniteTimeWindow,a=r._timestampProvider,u=r._windowTime;n||(o.push(t),!i&&o.push(a.now()+u)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),r=this._infiniteTimeWindow,n=this._buffer.slice(),o=0;o<n.length&&!e.closed;o+=r?1:2)e.next(n[o]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,r=e._timestampProvider,n=e._buffer,o=e._infiniteTimeWindow,i=(o?1:2)*t;if(t<1/0&&i<n.length&&n.splice(0,n.length-i),!o){for(var a=r.now(),u=0,s=1;s<n.length&&n[s]<=a;s+=2)u=s;u&&n.splice(0,u+1)}},t}(i.Subject);t.ReplaySubject=u},8986:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Scheduler=void 0;var n=r(9568),o=function(){function e(t,r){void 0===r&&(r=e.now),this.schedulerActionCtor=t,this.now=r}return e.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(r,t)},e.now=n.dateTimestampProvider.now,e}();t.Scheduler=o},2483:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.AnonymousSubject=t.Subject=void 0;var a=r(4662),u=r(8014),s=r(9686),c=r(7479),l=r(9223),f=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return o(t,e),t.prototype.lift=function(e){var t=new h(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new s.ObjectUnsubscribedError},t.prototype.next=function(e){var t=this;l.errorContext((function(){var r,n;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var o=i(t.currentObservers),a=o.next();!a.done;a=o.next())a.value.next(e)}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}}}))},t.prototype.error=function(e){var t=this;l.errorContext((function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var r=t.observers;r.length;)r.shift().error(e)}}))},t.prototype.complete=function(){var e=this;l.errorContext((function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}}))},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,r=this,n=r.hasError,o=r.isStopped,i=r.observers;return n||o?u.EMPTY_SUBSCRIPTION:(this.currentObservers=null,i.push(e),new u.Subscription((function(){t.currentObservers=null,c.arrRemove(i,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,r=t.hasError,n=t.thrownError,o=t.isStopped;r?e.error(n):o&&e.complete()},t.prototype.asObservable=function(){var e=new a.Observable;return e.source=this,e},t.create=function(e,t){return new h(e,t)},t}(a.Observable);t.Subject=f;var h=function(e){function t(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return o(t,e),t.prototype.next=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===r||r.call(t,e)},t.prototype.error=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===r||r.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,r;return null!==(r=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==r?r:u.EMPTY_SUBSCRIPTION},t}(f);t.AnonymousSubject=h},5:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_OBSERVER=t.SafeSubscriber=t.Subscriber=void 0;var i=r(1018),a=r(8014),u=r(3413),s=r(7315),c=r(1342),l=r(9052),f=r(9155),h=r(9223),d=function(e){function r(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,a.isSubscription(r)&&r.add(n)):n.destination=t.EMPTY_OBSERVER,n}return o(r,e),r.create=function(e,t,r){return new b(e,t,r)},r.prototype.next=function(e){this.isStopped?g(l.nextNotification(e),this):this._next(e)},r.prototype.error=function(e){this.isStopped?g(l.errorNotification(e),this):(this.isStopped=!0,this._error(e))},r.prototype.complete=function(){this.isStopped?g(l.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},r.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},r.prototype._next=function(e){this.destination.next(e)},r.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},r.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},r}(a.Subscription);t.Subscriber=d;var p=Function.prototype.bind;function v(e,t){return p.call(e,t)}var y=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){m(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){m(e)}else m(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){m(e)}},e}(),b=function(e){function t(t,r,n){var o,a,s=e.call(this)||this;return i.isFunction(t)||!t?o={next:null!=t?t:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:s&&u.config.useDeprecatedNextContext?((a=Object.create(t)).unsubscribe=function(){return s.unsubscribe()},o={next:t.next&&v(t.next,a),error:t.error&&v(t.error,a),complete:t.complete&&v(t.complete,a)}):o=t,s.destination=new y(o),s}return o(t,e),t}(d);function m(e){u.config.useDeprecatedSynchronousErrorHandling?h.captureError(e):s.reportUnhandledError(e)}function g(e,t){var r=u.config.onStoppedNotification;r&&f.timeoutProvider.setTimeout((function(){return r(e,t)}))}t.SafeSubscriber=b,t.EMPTY_OBSERVER={closed:!0,next:c.noop,error:function(e){throw e},complete:c.noop}},8014:function(e,t,r){var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.isSubscription=t.EMPTY_SUBSCRIPTION=t.Subscription=void 0;var a=r(1018),u=r(5788),s=r(7479),c=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}var t;return e.prototype.unsubscribe=function(){var e,t,r,s,c;if(!this.closed){this.closed=!0;var f=this._parentage;if(f)if(this._parentage=null,Array.isArray(f))try{for(var h=n(f),d=h.next();!d.done;d=h.next())d.value.remove(this)}catch(t){e={error:t}}finally{try{d&&!d.done&&(t=h.return)&&t.call(h)}finally{if(e)throw e.error}}else f.remove(this);var p=this.initialTeardown;if(a.isFunction(p))try{p()}catch(e){c=e instanceof u.UnsubscriptionError?e.errors:[e]}var v=this._finalizers;if(v){this._finalizers=null;try{for(var y=n(v),b=y.next();!b.done;b=y.next()){var m=b.value;try{l(m)}catch(e){c=null!=c?c:[],e instanceof u.UnsubscriptionError?c=i(i([],o(c)),o(e.errors)):c.push(e)}}}catch(e){r={error:e}}finally{try{b&&!b.done&&(s=y.return)&&s.call(y)}finally{if(r)throw r.error}}}if(c)throw new u.UnsubscriptionError(c)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)l(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(r=this._finalizers)&&void 0!==r?r:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&s.arrRemove(t,e)},e.prototype.remove=function(t){var r=this._finalizers;r&&s.arrRemove(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=((t=new e).closed=!0,t),e}();function l(e){a.isFunction(e)?e():e.unsubscribe()}t.Subscription=c,t.EMPTY_SUBSCRIPTION=c.EMPTY,t.isSubscription=function(e){return e instanceof c||e&&"closed"in e&&a.isFunction(e.remove)&&a.isFunction(e.add)&&a.isFunction(e.unsubscribe)}},3413:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.config=void 0,t.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}},9060:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.firstValueFrom=void 0;var n=r(2823),o=r(5);t.firstValueFrom=function(e,t){var r="object"==typeof t;return new Promise((function(i,a){var u=new o.SafeSubscriber({next:function(e){i(e),u.unsubscribe()},error:a,complete:function(){r?i(t.defaultValue):a(new n.EmptyError)}});e.subscribe(u)}))}},6894:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.lastValueFrom=void 0;var n=r(2823);t.lastValueFrom=function(e,t){var r="object"==typeof t;return new Promise((function(o,i){var a,u=!1;e.subscribe({next:function(e){a=e,u=!0},error:i,complete:function(){u?o(a):r?o(t.defaultValue):i(new n.EmptyError)}})}))}},8918:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectableObservable=void 0;var i=r(4662),a=r(8014),u=r(7561),s=r(3111),c=r(7843),l=function(e){function t(t,r){var n=e.call(this)||this;return n.source=t,n.subjectFactory=r,n._subject=null,n._refCount=0,n._connection=null,c.hasLift(t)&&(n.lift=t.lift),n}return o(t,e),t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},t.prototype._teardown=function(){this._refCount=0;var e=this._connection;this._subject=this._connection=null,null==e||e.unsubscribe()},t.prototype.connect=function(){var e=this,t=this._connection;if(!t){t=this._connection=new a.Subscription;var r=this.getSubject();t.add(this.source.subscribe(s.createOperatorSubscriber(r,void 0,(function(){e._teardown(),r.complete()}),(function(t){e._teardown(),r.error(t)}),(function(){return e._teardown()})))),t.closed&&(this._connection=null,t=a.Subscription.EMPTY)}return t},t.prototype.refCount=function(){return u.refCount()(this)},t}(i.Observable);t.ConnectableObservable=l},2713:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.bindCallback=void 0;var n=r(1439);t.bindCallback=function(e,t,r){return n.bindCallbackInternals(!1,e,t,r)}},1439:function(e,t,r){var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},o=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.bindCallbackInternals=void 0;var i=r(8613),a=r(4662),u=r(8960),s=r(1251),c=r(5184),l=r(95);t.bindCallbackInternals=function e(t,r,f,h){if(f){if(!i.isScheduler(f))return function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];return e(t,r,h).apply(this,n).pipe(s.mapOneOrManyArgs(f))};h=f}return h?function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];return e(t,r).apply(this,n).pipe(u.subscribeOn(h),c.observeOn(h))}:function(){for(var e=this,i=[],u=0;u<arguments.length;u++)i[u]=arguments[u];var s=new l.AsyncSubject,c=!0;return new a.Observable((function(a){var u=s.subscribe(a);if(c){c=!1;var l=!1,f=!1;r.apply(e,o(o([],n(i)),[function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(t){var n=e.shift();if(null!=n)return void s.error(n)}s.next(1<e.length?e:e[0]),f=!0,l&&s.complete()}])),f&&s.complete(),l=!0}return u}))}}},8561:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.bindNodeCallback=void 0;var n=r(1439);t.bindNodeCallback=function(e,t,r){return n.bindCallbackInternals(!0,e,t,r)}},3247:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatestInit=t.combineLatest=void 0;var n=r(4662),o=r(7360),i=r(4917),a=r(6640),u=r(1251),s=r(1107),c=r(6013),l=r(3111),f=r(7110);function h(e,t,r){return void 0===r&&(r=a.identity),function(n){d(t,(function(){for(var o=e.length,a=new Array(o),u=o,s=o,c=function(o){d(t,(function(){var c=i.from(e[o],t),f=!1;c.subscribe(l.createOperatorSubscriber(n,(function(e){a[o]=e,f||(f=!0,s--),s||n.next(r(a.slice()))}),(function(){--u||n.complete()})))}),n)},f=0;f<o;f++)c(f)}),n)}}function d(e,t,r){e?f.executeSchedule(r,e,t):t()}t.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=s.popScheduler(e),l=s.popResultSelector(e),f=o.argsArgArrayOrObject(e),d=f.args,p=f.keys;if(0===d.length)return i.from([],r);var v=new n.Observable(h(d,r,p?function(e){return c.createObject(p,e)}:a.identity));return l?v.pipe(u.mapOneOrManyArgs(l)):v},t.combineLatestInit=h},3865:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.concat=void 0;var n=r(8158),o=r(1107),i=r(4917);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.concatAll()(i.from(e,o.popScheduler(e)))}},7579:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.connectable=void 0;var n=r(2483),o=r(4662),i=r(9353),a={connector:function(){return new n.Subject},resetOnDisconnect:!0};t.connectable=function(e,t){void 0===t&&(t=a);var r=null,n=t.connector,u=t.resetOnDisconnect,s=void 0===u||u,c=n(),l=new o.Observable((function(e){return c.subscribe(e)}));return l.connect=function(){return r&&!r.closed||(r=i.defer((function(){return e})).subscribe(c),s&&r.add((function(){return c=n()}))),r},l}},9353:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.defer=void 0;var n=r(4662),o=r(9445);t.defer=function(e){return new n.Observable((function(t){o.innerFrom(e()).subscribe(t)}))}},3110:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.animationFrames=void 0;var n=r(4662),o=r(4746),i=r(9507);function a(e){return new n.Observable((function(t){var r=e||o.performanceTimestampProvider,n=r.now(),a=0,u=function(){t.closed||(a=i.animationFrameProvider.requestAnimationFrame((function(o){a=0;var i=r.now();t.next({timestamp:e?i:o,elapsed:i-n}),u()})))};return u(),function(){a&&i.animationFrameProvider.cancelAnimationFrame(a)}}))}t.animationFrames=function(e){return e?a(e):u};var u=a()},8616:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.empty=t.EMPTY=void 0;var n=r(4662);t.EMPTY=new n.Observable((function(e){return e.complete()})),t.empty=function(e){return e?function(e){return new n.Observable((function(t){return e.schedule((function(){return t.complete()}))}))}(e):t.EMPTY}},9105:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.forkJoin=void 0;var n=r(4662),o=r(7360),i=r(9445),a=r(1107),u=r(3111),s=r(1251),c=r(6013);t.forkJoin=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=a.popResultSelector(e),l=o.argsArgArrayOrObject(e),f=l.args,h=l.keys,d=new n.Observable((function(e){var t=f.length;if(t)for(var r=new Array(t),n=t,o=t,a=function(t){var a=!1;i.innerFrom(f[t]).subscribe(u.createOperatorSubscriber(e,(function(e){a||(a=!0,o--),r[t]=e}),(function(){return n--}),void 0,(function(){n&&a||(o||e.next(h?c.createObject(h,r):r),e.complete())})))},s=0;s<t;s++)a(s);else e.complete()}));return r?d.pipe(s.mapOneOrManyArgs(r)):d}},4917:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.from=void 0;var n=r(1656),o=r(9445);t.from=function(e,t){return t?n.scheduled(e,t):o.innerFrom(e)}},5337:function(e,t,r){var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};Object.defineProperty(t,"__esModule",{value:!0}),t.fromEvent=void 0;var o=r(9445),i=r(4662),a=r(983),u=r(8046),s=r(1018),c=r(1251),l=["addListener","removeListener"],f=["addEventListener","removeEventListener"],h=["on","off"];function d(e,t){return function(r){return function(n){return e[r](t,n)}}}t.fromEvent=function e(t,r,p,v){if(s.isFunction(p)&&(v=p,p=void 0),v)return e(t,r,p).pipe(c.mapOneOrManyArgs(v));var y=n(function(e){return s.isFunction(e.addEventListener)&&s.isFunction(e.removeEventListener)}(t)?f.map((function(e){return function(n){return t[e](r,n,p)}})):function(e){return s.isFunction(e.addListener)&&s.isFunction(e.removeListener)}(t)?l.map(d(t,r)):function(e){return s.isFunction(e.on)&&s.isFunction(e.off)}(t)?h.map(d(t,r)):[],2),b=y[0],m=y[1];if(!b&&u.isArrayLike(t))return a.mergeMap((function(t){return e(t,r,p)}))(o.innerFrom(t));if(!b)throw new TypeError("Invalid event target");return new i.Observable((function(e){var t=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.next(1<t.length?t:t[0])};return b(t),function(){return m(t)}}))}},347:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.fromEventPattern=void 0;var n=r(4662),o=r(1018),i=r(1251);t.fromEventPattern=function e(t,r,a){return a?e(t,r).pipe(i.mapOneOrManyArgs(a)):new n.Observable((function(e){var n=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.next(1===t.length?t[0]:t)},i=t(n);return o.isFunction(r)?function(){return r(n,i)}:void 0}))}},6824:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.fromSubscribable=void 0;var n=r(4662);t.fromSubscribable=function(e){return new n.Observable((function(t){return e.subscribe(t)}))}},7610:function(e,t,r){var n=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.generate=void 0;var o=r(6640),i=r(8613),a=r(9353),u=r(8808);t.generate=function(e,t,r,s,c){var l,f,h,d;function p(){var e;return n(this,(function(n){switch(n.label){case 0:e=d,n.label=1;case 1:return t&&!t(e)?[3,4]:[4,h(e)];case 2:n.sent(),n.label=3;case 3:return e=r(e),[3,1];case 4:return[2]}}))}return 1===arguments.length?(d=(l=e).initialState,t=l.condition,r=l.iterate,f=l.resultSelector,h=void 0===f?o.identity:f,c=l.scheduler):(d=e,!s||i.isScheduler(s)?(h=o.identity,c=s):h=s),a.defer(c?function(){return u.scheduleIterable(p(),c)}:p)}},4209:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.iif=void 0;var n=r(9353);t.iif=function(e,t,r){return n.defer((function(){return e()?t:r}))}},9445:function(e,t,r){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{s(n.next(e))}catch(e){i(e)}}function u(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,u)}s((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},i=this&&this.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e="function"==typeof a?a(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,o){!function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)}(n,o,(t=e[r](t)).done,t.value)}))}}},a=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.fromReadableStreamLike=t.fromAsyncIterable=t.fromIterable=t.fromPromise=t.fromArrayLike=t.fromInteropObservable=t.innerFrom=void 0;var u=r(8046),s=r(7629),c=r(4662),l=r(1116),f=r(1358),h=r(7614),d=r(6368),p=r(9137),v=r(1018),y=r(7315),b=r(3327);function m(e){return new c.Observable((function(t){var r=e[b.observable]();if(v.isFunction(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")}))}function g(e){return new c.Observable((function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()}))}function _(e){return new c.Observable((function(t){e.then((function(e){t.closed||(t.next(e),t.complete())}),(function(e){return t.error(e)})).then(null,y.reportUnhandledError)}))}function w(e){return new c.Observable((function(t){var r,n;try{for(var o=a(e),i=o.next();!i.done;i=o.next()){var u=i.value;if(t.next(u),t.closed)return}}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}t.complete()}))}function O(e){return new c.Observable((function(t){(function(e,t){var r,a,u,s;return n(this,void 0,void 0,(function(){var n,c;return o(this,(function(o){switch(o.label){case 0:o.trys.push([0,5,6,11]),r=i(e),o.label=1;case 1:return[4,r.next()];case 2:if((a=o.sent()).done)return[3,4];if(n=a.value,t.next(n),t.closed)return[2];o.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return c=o.sent(),u={error:c},[3,11];case 6:return o.trys.push([6,,9,10]),a&&!a.done&&(s=r.return)?[4,s.call(r)]:[3,8];case 7:o.sent(),o.label=8;case 8:return[3,10];case 9:if(u)throw u.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}}))}))})(e,t).catch((function(e){return t.error(e)}))}))}function S(e){return O(p.readableStreamLikeToAsyncGenerator(e))}t.innerFrom=function(e){if(e instanceof c.Observable)return e;if(null!=e){if(l.isInteropObservable(e))return m(e);if(u.isArrayLike(e))return g(e);if(s.isPromise(e))return _(e);if(f.isAsyncIterable(e))return O(e);if(d.isIterable(e))return w(e);if(p.isReadableStreamLike(e))return S(e)}throw h.createInvalidObservableTypeError(e)},t.fromInteropObservable=m,t.fromArrayLike=g,t.fromPromise=_,t.fromIterable=w,t.fromAsyncIterable=O,t.fromReadableStreamLike=S},6472:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.interval=void 0;var n=r(7961),o=r(4092);t.interval=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=n.asyncScheduler),e<0&&(e=0),o.timer(e,e,t)}},2833:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.merge=void 0;var n=r(7302),o=r(9445),i=r(8616),a=r(1107),u=r(4917);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=a.popScheduler(e),s=a.popNumber(e,1/0),c=e;return c.length?1===c.length?o.innerFrom(c[0]):n.mergeAll(s)(u.from(c,r)):i.EMPTY}},8655:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.never=t.NEVER=void 0;var n=r(4662),o=r(1342);t.NEVER=new n.Observable(o.noop),t.never=function(){return t.NEVER}},1004:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.of=void 0;var n=r(1107),o=r(4917);t.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=n.popScheduler(e);return o.from(e,r)}},6102:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.onErrorResumeNext=void 0;var n=r(4662),o=r(8535),i=r(3111),a=r(1342),u=r(9445);t.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=o.argsOrArgArray(e);return new n.Observable((function(e){var t=0,n=function(){if(t<r.length){var o=void 0;try{o=u.innerFrom(r[t++])}catch(e){return void n()}var s=new i.OperatorSubscriber(e,void 0,a.noop,a.noop);o.subscribe(s),s.add(n)}else e.complete()};n()}))}},7740:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.pairs=void 0;var n=r(4917);t.pairs=function(e,t){return n.from(Object.entries(e),t)}},1699:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.partition=void 0;var n=r(245),o=r(783),i=r(9445);t.partition=function(e,t,r){return[o.filter(t,r)(i.innerFrom(e)),o.filter(n.not(t,r))(i.innerFrom(e))]}},5584:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.raceInit=t.race=void 0;var n=r(4662),o=r(9445),i=r(8535),a=r(3111);function u(e){return function(t){for(var r=[],n=function(n){r.push(o.innerFrom(e[n]).subscribe(a.createOperatorSubscriber(t,(function(e){if(r){for(var o=0;o<r.length;o++)o!==n&&r[o].unsubscribe();r=null}t.next(e)}))))},i=0;r&&!t.closed&&i<e.length;i++)n(i)}}t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===(e=i.argsOrArgArray(e)).length?o.innerFrom(e[0]):new n.Observable(u(e))},t.raceInit=u},9376:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.range=void 0;var n=r(4662),o=r(8616);t.range=function(e,t,r){if(null==t&&(t=e,e=0),t<=0)return o.EMPTY;var i=t+e;return new n.Observable(r?function(t){var n=e;return r.schedule((function(){n<i?(t.next(n++),this.schedule()):t.complete()}))}:function(t){for(var r=e;r<i&&!t.closed;)t.next(r++);t.complete()})}},1103:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.throwError=void 0;var n=r(4662),o=r(1018);t.throwError=function(e,t){var r=o.isFunction(e)?e:function(){return e},i=function(e){return e.error(r())};return new n.Observable(t?function(e){return t.schedule(i,0,e)}:i)}},4092:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.timer=void 0;var n=r(4662),o=r(7961),i=r(8613),a=r(1074);t.timer=function(e,t,r){void 0===e&&(e=0),void 0===r&&(r=o.async);var u=-1;return null!=t&&(i.isScheduler(t)?r=t:u=t),new n.Observable((function(t){var n=a.isValidDate(e)?+e-r.now():e;n<0&&(n=0);var o=0;return r.schedule((function(){t.closed||(t.next(o++),0<=u?this.schedule(void 0,u):t.complete())}),n)}))}},7853:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.using=void 0;var n=r(4662),o=r(9445),i=r(8616);t.using=function(e,t){return new n.Observable((function(r){var n=e(),a=t(n);return(a?o.innerFrom(a):i.EMPTY).subscribe(r),function(){n&&n.unsubscribe()}}))}},7286:function(e,t,r){var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},o=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.zip=void 0;var i=r(4662),a=r(9445),u=r(8535),s=r(8616),c=r(3111),l=r(1107);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=l.popResultSelector(e),f=u.argsOrArgArray(e);return f.length?new i.Observable((function(e){var t=f.map((function(){return[]})),i=f.map((function(){return!1}));e.add((function(){t=i=null}));for(var u=function(u){a.innerFrom(f[u]).subscribe(c.createOperatorSubscriber(e,(function(a){if(t[u].push(a),t.every((function(e){return e.length}))){var s=t.map((function(e){return e.shift()}));e.next(r?r.apply(void 0,o([],n(s))):s),t.some((function(e,t){return!e.length&&i[t]}))&&e.complete()}}),(function(){i[u]=!0,!t[u].length&&e.complete()})))},s=0;!e.closed&&s<f.length;s++)u(s);return function(){t=i=null}})):s.EMPTY}},3111:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.OperatorSubscriber=t.createOperatorSubscriber=void 0;var i=r(5);t.createOperatorSubscriber=function(e,t,r,n,o){return new a(e,t,r,n,o)};var a=function(e){function t(t,r,n,o,i,a){var u=e.call(this,t)||this;return u.onFinalize=i,u.shouldUnsubscribe=a,u._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:e.prototype._next,u._error=o?function(e){try{o(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,u._complete=n?function(){try{n()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,u}return o(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}},t}(i.Subscriber);t.OperatorSubscriber=a},3146:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.audit=void 0;var n=r(7843),o=r(9445),i=r(3111);t.audit=function(e){return n.operate((function(t,r){var n=!1,a=null,u=null,s=!1,c=function(){if(null==u||u.unsubscribe(),u=null,n){n=!1;var e=a;a=null,r.next(e)}s&&r.complete()},l=function(){u=null,s&&r.complete()};t.subscribe(i.createOperatorSubscriber(r,(function(t){n=!0,a=t,u||o.innerFrom(e(t)).subscribe(u=i.createOperatorSubscriber(r,c,l))}),(function(){s=!0,(!n||!u||u.closed)&&r.complete()})))}))}},3231:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.auditTime=void 0;var n=r(7961),o=r(3146),i=r(4092);t.auditTime=function(e,t){return void 0===t&&(t=n.asyncScheduler),o.audit((function(){return i.timer(e,t)}))}},8015:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.buffer=void 0;var n=r(7843),o=r(1342),i=r(3111),a=r(9445);t.buffer=function(e){return n.operate((function(t,r){var n=[];return t.subscribe(i.createOperatorSubscriber(r,(function(e){return n.push(e)}),(function(){r.next(n),r.complete()}))),a.innerFrom(e).subscribe(i.createOperatorSubscriber(r,(function(){var e=n;n=[],r.next(e)}),o.noop)),function(){n=null}}))}},5572:function(e,t,r){var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.bufferCount=void 0;var o=r(7843),i=r(3111),a=r(7479);t.bufferCount=function(e,t){return void 0===t&&(t=null),t=null!=t?t:e,o.operate((function(r,o){var u=[],s=0;r.subscribe(i.createOperatorSubscriber(o,(function(r){var i,c,l,f,h=null;s++%t==0&&u.push([]);try{for(var d=n(u),p=d.next();!p.done;p=d.next())(b=p.value).push(r),e<=b.length&&(h=null!=h?h:[]).push(b)}catch(e){i={error:e}}finally{try{p&&!p.done&&(c=d.return)&&c.call(d)}finally{if(i)throw i.error}}if(h)try{for(var v=n(h),y=v.next();!y.done;y=v.next()){var b=y.value;a.arrRemove(u,b),o.next(b)}}catch(e){l={error:e}}finally{try{y&&!y.done&&(f=v.return)&&f.call(v)}finally{if(l)throw l.error}}}),(function(){var e,t;try{for(var r=n(u),i=r.next();!i.done;i=r.next()){var a=i.value;o.next(a)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}o.complete()}),void 0,(function(){u=null})))}))}},7210:function(e,t,r){var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.bufferTime=void 0;var o=r(8014),i=r(7843),a=r(3111),u=r(7479),s=r(7961),c=r(1107),l=r(7110);t.bufferTime=function(e){for(var t,r,f=[],h=1;h<arguments.length;h++)f[h-1]=arguments[h];var d=null!==(t=c.popScheduler(f))&&void 0!==t?t:s.asyncScheduler,p=null!==(r=f[0])&&void 0!==r?r:null,v=f[1]||1/0;return i.operate((function(t,r){var i=[],s=!1,c=function(e){var t=e.buffer;e.subs.unsubscribe(),u.arrRemove(i,e),r.next(t),s&&f()},f=function(){if(i){var t=new o.Subscription;r.add(t);var n={buffer:[],subs:t};i.push(n),l.executeSchedule(t,d,(function(){return c(n)}),e)}};null!==p&&p>=0?l.executeSchedule(r,d,f,p,!0):s=!0,f();var h=a.createOperatorSubscriber(r,(function(e){var t,r,o=i.slice();try{for(var a=n(o),u=a.next();!u.done;u=a.next()){var s=u.value,l=s.buffer;l.push(e),v<=l.length&&c(s)}}catch(e){t={error:e}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}}),(function(){for(;null==i?void 0:i.length;)r.next(i.shift().buffer);null==h||h.unsubscribe(),r.complete(),r.unsubscribe()}),void 0,(function(){return i=null}));t.subscribe(h)}))}},8995:function(e,t,r){var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.bufferToggle=void 0;var o=r(8014),i=r(7843),a=r(9445),u=r(3111),s=r(1342),c=r(7479);t.bufferToggle=function(e,t){return i.operate((function(r,i){var l=[];a.innerFrom(e).subscribe(u.createOperatorSubscriber(i,(function(e){var r=[];l.push(r);var n=new o.Subscription;n.add(a.innerFrom(t(e)).subscribe(u.createOperatorSubscriber(i,(function(){c.arrRemove(l,r),i.next(r),n.unsubscribe()}),s.noop)))}),s.noop)),r.subscribe(u.createOperatorSubscriber(i,(function(e){var t,r;try{for(var o=n(l),i=o.next();!i.done;i=o.next())i.value.push(e)}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}}),(function(){for(;l.length>0;)i.next(l.shift());i.complete()})))}))}},8831:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.bufferWhen=void 0;var n=r(7843),o=r(1342),i=r(3111),a=r(9445);t.bufferWhen=function(e){return n.operate((function(t,r){var n=null,u=null,s=function(){null==u||u.unsubscribe();var t=n;n=[],t&&r.next(t),a.innerFrom(e()).subscribe(u=i.createOperatorSubscriber(r,s,o.noop))};s(),t.subscribe(i.createOperatorSubscriber(r,(function(e){return null==n?void 0:n.push(e)}),(function(){n&&r.next(n),r.complete()}),void 0,(function(){return n=u=null})))}))}},8118:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.catchError=void 0;var n=r(9445),o=r(3111),i=r(7843);t.catchError=function e(t){return i.operate((function(r,i){var a,u=null,s=!1;u=r.subscribe(o.createOperatorSubscriber(i,void 0,void 0,(function(o){a=n.innerFrom(t(o,e(t)(r))),u?(u.unsubscribe(),u=null,a.subscribe(i)):s=!0}))),s&&(u.unsubscribe(),u=null,a.subscribe(i))}))}},6625:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.combineAll=void 0;var n=r(6728);t.combineAll=n.combineLatestAll},2551:function(e,t,r){var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},o=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatest=void 0;var i=r(3247),a=r(7843),u=r(8535),s=r(1251),c=r(2706),l=r(1107);t.combineLatest=function e(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var f=l.popResultSelector(t);return f?c.pipe(e.apply(void 0,o([],n(t))),s.mapOneOrManyArgs(f)):a.operate((function(e,r){i.combineLatestInit(o([e],n(u.argsOrArgArray(t))))(r)}))}},6728:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatestAll=void 0;var n=r(3247),o=r(3638);t.combineLatestAll=function(e){return o.joinAllInternals(n.combineLatest,e)}},8239:function(e,t,r){var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},o=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatestWith=void 0;var i=r(2551);t.combineLatestWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return i.combineLatest.apply(void 0,o([],n(e)))}},7601:function(e,t,r){var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},o=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.concat=void 0;var i=r(7843),a=r(8158),u=r(1107),s=r(4917);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=u.popScheduler(e);return i.operate((function(t,i){a.concatAll()(s.from(o([t],n(e)),r)).subscribe(i)}))}},8158:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.concatAll=void 0;var n=r(7302);t.concatAll=function(){return n.mergeAll(1)}},9135:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.concatMap=void 0;var n=r(983),o=r(1018);t.concatMap=function(e,t){return o.isFunction(t)?n.mergeMap(e,t,1):n.mergeMap(e,1)}},9938:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.concatMapTo=void 0;var n=r(9135),o=r(1018);t.concatMapTo=function(e,t){return o.isFunction(t)?n.concatMap((function(){return e}),t):n.concatMap((function(){return e}))}},9669:function(e,t,r){var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},o=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.concatWith=void 0;var i=r(7601);t.concatWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return i.concat.apply(void 0,o([],n(e)))}},1483:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.connect=void 0;var n=r(2483),o=r(9445),i=r(7843),a=r(6824),u={connector:function(){return new n.Subject}};t.connect=function(e,t){void 0===t&&(t=u);var r=t.connector;return i.operate((function(t,n){var i=r();o.innerFrom(e(a.fromSubscribable(i))).subscribe(n),n.add(t.subscribe(i))}))}},1038:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.count=void 0;var n=r(9139);t.count=function(e){return n.reduce((function(t,r,n){return!e||e(r,n)?t+1:t}),0)}},4461:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.debounce=void 0;var n=r(7843),o=r(1342),i=r(3111),a=r(9445);t.debounce=function(e){return n.operate((function(t,r){var n=!1,u=null,s=null,c=function(){if(null==s||s.unsubscribe(),s=null,n){n=!1;var e=u;u=null,r.next(e)}};t.subscribe(i.createOperatorSubscriber(r,(function(t){null==s||s.unsubscribe(),n=!0,u=t,s=i.createOperatorSubscriber(r,c,o.noop),a.innerFrom(e(t)).subscribe(s)}),(function(){c(),r.complete()}),void 0,(function(){u=s=null})))}))}},8079:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.debounceTime=void 0;var n=r(7961),o=r(7843),i=r(3111);t.debounceTime=function(e,t){return void 0===t&&(t=n.asyncScheduler),o.operate((function(r,n){var o=null,a=null,u=null,s=function(){if(o){o.unsubscribe(),o=null;var e=a;a=null,n.next(e)}};function c(){var r=u+e,i=t.now();if(i<r)return o=this.schedule(void 0,r-i),void n.add(o);s()}r.subscribe(i.createOperatorSubscriber(n,(function(r){a=r,u=t.now(),o||(o=t.schedule(c,e),n.add(o))}),(function(){s(),n.complete()}),void 0,(function(){a=o=null})))}))}},378:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.defaultIfEmpty=void 0;var n=r(7843),o=r(3111);t.defaultIfEmpty=function(e){return n.operate((function(t,r){var n=!1;t.subscribe(o.createOperatorSubscriber(r,(function(e){n=!0,r.next(e)}),(function(){n||r.next(e),r.complete()})))}))}},914:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.delay=void 0;var n=r(7961),o=r(8766),i=r(4092);t.delay=function(e,t){void 0===t&&(t=n.asyncScheduler);var r=i.timer(e,t);return o.delayWhen((function(){return r}))}},8766:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.delayWhen=void 0;var n=r(3865),o=r(846),i=r(490),a=r(3218),u=r(983),s=r(9445);t.delayWhen=function e(t,r){return r?function(a){return n.concat(r.pipe(o.take(1),i.ignoreElements()),a.pipe(e(t)))}:u.mergeMap((function(e,r){return s.innerFrom(t(e,r)).pipe(o.take(1),a.mapTo(e))}))}},7441:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.dematerialize=void 0;var n=r(7800),o=r(7843),i=r(3111);t.dematerialize=function(){return o.operate((function(e,t){e.subscribe(i.createOperatorSubscriber(t,(function(e){return n.observeNotification(e,t)})))}))}},5365:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.distinct=void 0;var n=r(7843),o=r(3111),i=r(1342),a=r(9445);t.distinct=function(e,t){return n.operate((function(r,n){var u=new Set;r.subscribe(o.createOperatorSubscriber(n,(function(t){var r=e?e(t):t;u.has(r)||(u.add(r),n.next(t))}))),t&&a.innerFrom(t).subscribe(o.createOperatorSubscriber(n,(function(){return u.clear()}),i.noop))}))}},8937:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.distinctUntilChanged=void 0;var n=r(6640),o=r(7843),i=r(3111);function a(e,t){return e===t}t.distinctUntilChanged=function(e,t){return void 0===t&&(t=n.identity),e=null!=e?e:a,o.operate((function(r,n){var o,a=!0;r.subscribe(i.createOperatorSubscriber(n,(function(r){var i=t(r);!a&&e(o,i)||(a=!1,o=i,n.next(r))})))}))}},9612:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.distinctUntilKeyChanged=void 0;var n=r(8937);t.distinctUntilKeyChanged=function(e,t){return n.distinctUntilChanged((function(r,n){return t?t(r[e],n[e]):r[e]===n[e]}))}},4520:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.elementAt=void 0;var n=r(7057),o=r(783),i=r(4869),a=r(378),u=r(846);t.elementAt=function(e,t){if(e<0)throw new n.ArgumentOutOfRangeError;var r=arguments.length>=2;return function(s){return s.pipe(o.filter((function(t,r){return r===e})),u.take(1),r?a.defaultIfEmpty(t):i.throwIfEmpty((function(){return new n.ArgumentOutOfRangeError})))}}},1776:function(e,t,r){var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},o=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.endWith=void 0;var i=r(3865),a=r(1004);t.endWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return i.concat(t,a.of.apply(void 0,o([],n(e))))}}},5510:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.every=void 0;var n=r(7843),o=r(3111);t.every=function(e,t){return n.operate((function(r,n){var i=0;r.subscribe(o.createOperatorSubscriber(n,(function(o){e.call(t,o,i++,r)||(n.next(!1),n.complete())}),(function(){n.next(!0),n.complete()})))}))}},1551:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.exhaust=void 0;var n=r(2752);t.exhaust=n.exhaustAll},2752:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.exhaustAll=void 0;var n=r(4753),o=r(6640);t.exhaustAll=function(){return n.exhaustMap(o.identity)}},4753:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.exhaustMap=void 0;var n=r(5471),o=r(9445),i=r(7843),a=r(3111);t.exhaustMap=function e(t,r){return r?function(i){return i.pipe(e((function(e,i){return o.innerFrom(t(e,i)).pipe(n.map((function(t,n){return r(e,t,i,n)})))})))}:i.operate((function(e,r){var n=0,i=null,u=!1;e.subscribe(a.createOperatorSubscriber(r,(function(e){i||(i=a.createOperatorSubscriber(r,void 0,(function(){i=null,u&&r.complete()})),o.innerFrom(t(e,n++)).subscribe(i))}),(function(){u=!0,!i&&r.complete()})))}))}},7661:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.expand=void 0;var n=r(7843),o=r(1983);t.expand=function(e,t,r){return void 0===t&&(t=1/0),t=(t||0)<1?1/0:t,n.operate((function(n,i){return o.mergeInternals(n,i,e,t,void 0,!0,r)}))}},783:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.filter=void 0;var n=r(7843),o=r(3111);t.filter=function(e,t){return n.operate((function(r,n){var i=0;r.subscribe(o.createOperatorSubscriber(n,(function(r){return e.call(t,r,i++)&&n.next(r)})))}))}},3555:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.finalize=void 0;var n=r(7843);t.finalize=function(e){return n.operate((function(t,r){try{t.subscribe(r)}finally{r.add(e)}}))}},7714:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createFind=t.find=void 0;var n=r(7843),o=r(3111);function i(e,t,r){var n="index"===r;return function(r,i){var a=0;r.subscribe(o.createOperatorSubscriber(i,(function(o){var u=a++;e.call(t,o,u,r)&&(i.next(n?u:o),i.complete())}),(function(){i.next(n?-1:void 0),i.complete()})))}}t.find=function(e,t){return n.operate(i(e,t,"value"))},t.createFind=i},9756:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.findIndex=void 0;var n=r(7843),o=r(7714);t.findIndex=function(e,t){return n.operate(o.createFind(e,t,"index"))}},8275:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.first=void 0;var n=r(2823),o=r(783),i=r(846),a=r(378),u=r(4869),s=r(6640);t.first=function(e,t){var r=arguments.length>=2;return function(c){return c.pipe(e?o.filter((function(t,r){return e(t,r,c)})):s.identity,i.take(1),r?a.defaultIfEmpty(t):u.throwIfEmpty((function(){return new n.EmptyError})))}}},6902:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.flatMap=void 0;var n=r(983);t.flatMap=n.mergeMap},7815:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.groupBy=void 0;var n=r(4662),o=r(9445),i=r(2483),a=r(7843),u=r(3111);t.groupBy=function(e,t,r,s){return a.operate((function(a,c){var l;t&&"function"!=typeof t?(r=t.duration,l=t.element,s=t.connector):l=t;var f=new Map,h=function(e){f.forEach(e),e(c)},d=function(e){return h((function(t){return t.error(e)}))},p=0,v=!1,y=new u.OperatorSubscriber(c,(function(t){try{var a=e(t),h=f.get(a);if(!h){f.set(a,h=s?s():new i.Subject);var b=(g=a,_=h,(w=new n.Observable((function(e){p++;var t=_.subscribe(e);return function(){t.unsubscribe(),0==--p&&v&&y.unsubscribe()}}))).key=g,w);if(c.next(b),r){var m=u.createOperatorSubscriber(h,(function(){h.complete(),null==m||m.unsubscribe()}),void 0,void 0,(function(){return f.delete(a)}));y.add(o.innerFrom(r(b)).subscribe(m))}}h.next(l?l(t):t)}catch(e){d(e)}var g,_,w}),(function(){return h((function(e){return e.complete()}))}),d,(function(){return f.clear()}),(function(){return v=!0,0===p}));a.subscribe(y)}))}},490:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ignoreElements=void 0;var n=r(7843),o=r(3111),i=r(1342);t.ignoreElements=function(){return n.operate((function(e,t){e.subscribe(o.createOperatorSubscriber(t,i.noop))}))}},9356:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isEmpty=void 0;var n=r(7843),o=r(3111);t.isEmpty=function(){return n.operate((function(e,t){e.subscribe(o.createOperatorSubscriber(t,(function(){t.next(!1),t.complete()}),(function(){t.next(!0),t.complete()})))}))}},3638:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.joinAllInternals=void 0;var n=r(6640),o=r(1251),i=r(2706),a=r(983),u=r(2343);t.joinAllInternals=function(e,t){return i.pipe(u.toArray(),a.mergeMap((function(t){return e(t)})),t?o.mapOneOrManyArgs(t):n.identity)}},8669:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.last=void 0;var n=r(2823),o=r(783),i=r(8330),a=r(4869),u=r(378),s=r(6640);t.last=function(e,t){var r=arguments.length>=2;return function(c){return c.pipe(e?o.filter((function(t,r){return e(t,r,c)})):s.identity,i.takeLast(1),r?u.defaultIfEmpty(t):a.throwIfEmpty((function(){return new n.EmptyError})))}}},5471:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.map=void 0;var n=r(7843),o=r(3111);t.map=function(e,t){return n.operate((function(r,n){var i=0;r.subscribe(o.createOperatorSubscriber(n,(function(r){n.next(e.call(t,r,i++))})))}))}},3218:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mapTo=void 0;var n=r(5471);t.mapTo=function(e){return n.map((function(){return e}))}},2360:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.materialize=void 0;var n=r(7800),o=r(7843),i=r(3111);t.materialize=function(){return o.operate((function(e,t){e.subscribe(i.createOperatorSubscriber(t,(function(e){t.next(n.Notification.createNext(e))}),(function(){t.next(n.Notification.createComplete()),t.complete()}),(function(e){t.next(n.Notification.createError(e)),t.complete()})))}))}},1415:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.max=void 0;var n=r(9139),o=r(1018);t.max=function(e){return n.reduce(o.isFunction(e)?function(t,r){return e(t,r)>0?t:r}:function(e,t){return e>t?e:t})}},361:function(e,t,r){var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},o=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.merge=void 0;var i=r(7843),a=r(8535),u=r(7302),s=r(1107),c=r(4917);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=s.popScheduler(e),l=s.popNumber(e,1/0);return e=a.argsOrArgArray(e),i.operate((function(t,i){u.mergeAll(l)(c.from(o([t],n(e)),r)).subscribe(i)}))}},7302:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mergeAll=void 0;var n=r(983),o=r(6640);t.mergeAll=function(e){return void 0===e&&(e=1/0),n.mergeMap(o.identity,e)}},1983:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mergeInternals=void 0;var n=r(9445),o=r(7110),i=r(3111);t.mergeInternals=function(e,t,r,a,u,s,c,l){var f=[],h=0,d=0,p=!1,v=function(){!p||f.length||h||t.complete()},y=function(e){return h<a?b(e):f.push(e)},b=function(e){s&&t.next(e),h++;var l=!1;n.innerFrom(r(e,d++)).subscribe(i.createOperatorSubscriber(t,(function(e){null==u||u(e),s?y(e):t.next(e)}),(function(){l=!0}),void 0,(function(){if(l)try{h--;for(var e=function(){var e=f.shift();c?o.executeSchedule(t,c,(function(){return b(e)})):b(e)};f.length&&h<a;)e();v()}catch(e){t.error(e)}})))};return e.subscribe(i.createOperatorSubscriber(t,y,(function(){p=!0,v()}))),function(){null==l||l()}}},983:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mergeMap=void 0;var n=r(5471),o=r(9445),i=r(7843),a=r(1983),u=r(1018);t.mergeMap=function e(t,r,s){return void 0===s&&(s=1/0),u.isFunction(r)?e((function(e,i){return n.map((function(t,n){return r(e,t,i,n)}))(o.innerFrom(t(e,i)))}),s):("number"==typeof r&&(s=r),i.operate((function(e,r){return a.mergeInternals(e,r,t,s)})))}},6586:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mergeMapTo=void 0;var n=r(983),o=r(1018);t.mergeMapTo=function(e,t,r){return void 0===r&&(r=1/0),o.isFunction(t)?n.mergeMap((function(){return e}),t,r):("number"==typeof t&&(r=t),n.mergeMap((function(){return e}),r))}},4408:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mergeScan=void 0;var n=r(7843),o=r(1983);t.mergeScan=function(e,t,r){return void 0===r&&(r=1/0),n.operate((function(n,i){var a=t;return o.mergeInternals(n,i,(function(t,r){return e(a,t,r)}),r,(function(e){a=e}),!1,void 0,(function(){return a=null}))}))}},8253:function(e,t,r){var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},o=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.mergeWith=void 0;var i=r(361);t.mergeWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return i.merge.apply(void 0,o([],n(e)))}},2669:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.min=void 0;var n=r(9139),o=r(1018);t.min=function(e){return n.reduce(o.isFunction(e)?function(t,r){return e(t,r)<0?t:r}:function(e,t){return e<t?e:t})}},9247:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.multicast=void 0;var n=r(8918),o=r(1018),i=r(1483);t.multicast=function(e,t){var r=o.isFunction(e)?e:function(){return e};return o.isFunction(t)?i.connect(t,{connector:r}):function(e){return new n.ConnectableObservable(e,r)}}},5184:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.observeOn=void 0;var n=r(7110),o=r(7843),i=r(3111);t.observeOn=function(e,t){return void 0===t&&(t=0),o.operate((function(r,o){r.subscribe(i.createOperatorSubscriber(o,(function(r){return n.executeSchedule(o,e,(function(){return o.next(r)}),t)}),(function(){return n.executeSchedule(o,e,(function(){return o.complete()}),t)}),(function(r){return n.executeSchedule(o,e,(function(){return o.error(r)}),t)})))}))}},1226:function(e,t,r){var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},o=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.onErrorResumeNext=t.onErrorResumeNextWith=void 0;var i=r(8535),a=r(6102);function u(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=i.argsOrArgArray(e);return function(e){return a.onErrorResumeNext.apply(void 0,o([e],n(r)))}}t.onErrorResumeNextWith=u,t.onErrorResumeNext=u},1518:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.pairwise=void 0;var n=r(7843),o=r(3111);t.pairwise=function(){return n.operate((function(e,t){var r,n=!1;e.subscribe(o.createOperatorSubscriber(t,(function(e){var o=r;r=e,n&&t.next([o,e]),n=!0})))}))}},2171:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.partition=void 0;var n=r(245),o=r(783);t.partition=function(e,t){return function(r){return[o.filter(e,t)(r),o.filter(n.not(e,t))(r)]}}},4912:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.pluck=void 0;var n=r(5471);t.pluck=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.length;if(0===r)throw new Error("list of properties cannot be empty.");return n.map((function(t){for(var n=t,o=0;o<r;o++){var i=null==n?void 0:n[e[o]];if(void 0===i)return;n=i}return n}))}},766:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.publish=void 0;var n=r(2483),o=r(9247),i=r(1483);t.publish=function(e){return e?function(t){return i.connect(e)(t)}:function(e){return o.multicast(new n.Subject)(e)}}},7220:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.publishBehavior=void 0;var n=r(1637),o=r(8918);t.publishBehavior=function(e){return function(t){var r=new n.BehaviorSubject(e);return new o.ConnectableObservable(t,(function(){return r}))}}},6106:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.publishLast=void 0;var n=r(95),o=r(8918);t.publishLast=function(){return function(e){var t=new n.AsyncSubject;return new o.ConnectableObservable(e,(function(){return t}))}}},8157:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.publishReplay=void 0;var n=r(1242),o=r(9247),i=r(1018);t.publishReplay=function(e,t,r,a){r&&!i.isFunction(r)&&(a=r);var u=i.isFunction(r)?r:void 0;return function(r){return o.multicast(new n.ReplaySubject(e,t,a),u)(r)}}},4440:function(e,t,r){var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},o=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.race=void 0;var i=r(8535),a=r(5600);t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return a.raceWith.apply(void 0,o([],n(i.argsOrArgArray(e))))}},5600:function(e,t,r){var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},o=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.raceWith=void 0;var i=r(5584),a=r(7843),u=r(6640);t.raceWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length?a.operate((function(t,r){i.raceInit(o([t],n(e)))(r)})):u.identity}},9139:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.reduce=void 0;var n=r(6384),o=r(7843);t.reduce=function(e,t){return o.operate(n.scanInternals(e,t,arguments.length>=2,!1,!0))}},7561:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.refCount=void 0;var n=r(7843),o=r(3111);t.refCount=function(){return n.operate((function(e,t){var r=null;e._refCount++;var n=o.createOperatorSubscriber(t,void 0,void 0,void 0,(function(){if(!e||e._refCount<=0||0<--e._refCount)r=null;else{var n=e._connection,o=r;r=null,!n||o&&n!==o||n.unsubscribe(),t.unsubscribe()}}));e.subscribe(n),n.closed||(r=e.connect())}))}},8522:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.repeat=void 0;var n=r(8616),o=r(7843),i=r(3111),a=r(9445),u=r(4092);t.repeat=function(e){var t,r,s=1/0;return null!=e&&("object"==typeof e?(t=e.count,s=void 0===t?1/0:t,r=e.delay):s=e),s<=0?function(){return n.EMPTY}:o.operate((function(e,t){var n,o=0,c=function(){if(null==n||n.unsubscribe(),n=null,null!=r){var e="number"==typeof r?u.timer(r):a.innerFrom(r(o)),s=i.createOperatorSubscriber(t,(function(){s.unsubscribe(),l()}));e.subscribe(s)}else l()},l=function(){var r=!1;n=e.subscribe(i.createOperatorSubscriber(t,void 0,(function(){++o<s?n?c():r=!0:t.complete()}))),r&&c()};l()}))}},6566:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.repeatWhen=void 0;var n=r(9445),o=r(2483),i=r(7843),a=r(3111);t.repeatWhen=function(e){return i.operate((function(t,r){var i,u,s=!1,c=!1,l=!1,f=function(){return l&&c&&(r.complete(),!0)},h=function(){l=!1,i=t.subscribe(a.createOperatorSubscriber(r,void 0,(function(){l=!0,!f()&&(u||(u=new o.Subject,n.innerFrom(e(u)).subscribe(a.createOperatorSubscriber(r,(function(){i?h():s=!0}),(function(){c=!0,f()})))),u).next()}))),s&&(i.unsubscribe(),i=null,s=!1,h())};h()}))}},7835:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.retry=void 0;var n=r(7843),o=r(3111),i=r(6640),a=r(4092),u=r(9445);t.retry=function(e){var t;void 0===e&&(e=1/0);var r=(t=e&&"object"==typeof e?e:{count:e}).count,s=void 0===r?1/0:r,c=t.delay,l=t.resetOnSuccess,f=void 0!==l&&l;return s<=0?i.identity:n.operate((function(e,t){var r,n=0,i=function(){var l=!1;r=e.subscribe(o.createOperatorSubscriber(t,(function(e){f&&(n=0),t.next(e)}),void 0,(function(e){if(n++<s){var f=function(){r?(r.unsubscribe(),r=null,i()):l=!0};if(null!=c){var h="number"==typeof c?a.timer(c):u.innerFrom(c(e,n)),d=o.createOperatorSubscriber(t,(function(){d.unsubscribe(),f()}),(function(){t.complete()}));h.subscribe(d)}else f()}else t.error(e)}))),l&&(r.unsubscribe(),r=null,i())};i()}))}},9843:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.retryWhen=void 0;var n=r(9445),o=r(2483),i=r(7843),a=r(3111);t.retryWhen=function(e){return i.operate((function(t,r){var i,u,s=!1,c=function(){i=t.subscribe(a.createOperatorSubscriber(r,void 0,void 0,(function(t){u||(u=new o.Subject,n.innerFrom(e(u)).subscribe(a.createOperatorSubscriber(r,(function(){return i?c():s=!0})))),u&&u.next(t)}))),s&&(i.unsubscribe(),i=null,s=!1,c())};c()}))}},1731:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.sample=void 0;var n=r(9445),o=r(7843),i=r(1342),a=r(3111);t.sample=function(e){return o.operate((function(t,r){var o=!1,u=null;t.subscribe(a.createOperatorSubscriber(r,(function(e){o=!0,u=e}))),n.innerFrom(e).subscribe(a.createOperatorSubscriber(r,(function(){if(o){o=!1;var e=u;u=null,r.next(e)}}),i.noop))}))}},6086:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.sampleTime=void 0;var n=r(7961),o=r(1731),i=r(6472);t.sampleTime=function(e,t){return void 0===t&&(t=n.asyncScheduler),o.sample(i.interval(e,t))}},8624:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.scan=void 0;var n=r(7843),o=r(6384);t.scan=function(e,t){return n.operate(o.scanInternals(e,t,arguments.length>=2,!0))}},6384:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.scanInternals=void 0;var n=r(3111);t.scanInternals=function(e,t,r,o,i){return function(a,u){var s=r,c=t,l=0;a.subscribe(n.createOperatorSubscriber(u,(function(t){var r=l++;c=s?e(c,t,r):(s=!0,t),o&&u.next(c)}),i&&function(){s&&u.next(c),u.complete()}))}}},582:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.sequenceEqual=void 0;var n=r(7843),o=r(3111),i=r(9445);t.sequenceEqual=function(e,t){return void 0===t&&(t=function(e,t){return e===t}),n.operate((function(r,n){var a={buffer:[],complete:!1},u={buffer:[],complete:!1},s=function(e){n.next(e),n.complete()},c=function(e,r){var i=o.createOperatorSubscriber(n,(function(n){var o=r.buffer,i=r.complete;0===o.length?i?s(!1):e.buffer.push(n):!t(n,o.shift())&&s(!1)}),(function(){e.complete=!0;var t=r.complete,n=r.buffer;t&&s(0===n.length),null==i||i.unsubscribe()}));return i};r.subscribe(c(a,u)),i.innerFrom(e).subscribe(c(u,a))}))}},8977:function(e,t,r){var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},o=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.share=void 0;var i=r(9445),a=r(2483),u=r(5),s=r(7843);function c(e,t){for(var r=[],a=2;a<arguments.length;a++)r[a-2]=arguments[a];if(!0!==t){if(!1!==t){var s=new u.SafeSubscriber({next:function(){s.unsubscribe(),e()}});return i.innerFrom(t.apply(void 0,o([],n(r)))).subscribe(s)}}else e()}t.share=function(e){void 0===e&&(e={});var t=e.connector,r=void 0===t?function(){return new a.Subject}:t,n=e.resetOnError,o=void 0===n||n,l=e.resetOnComplete,f=void 0===l||l,h=e.resetOnRefCountZero,d=void 0===h||h;return function(e){var t,n,a,l=0,h=!1,p=!1,v=function(){null==n||n.unsubscribe(),n=void 0},y=function(){v(),t=a=void 0,h=p=!1},b=function(){var e=t;y(),null==e||e.unsubscribe()};return s.operate((function(e,s){l++,p||h||v();var m=a=null!=a?a:r();s.add((function(){0!=--l||p||h||(n=c(b,d))})),m.subscribe(s),!t&&l>0&&(t=new u.SafeSubscriber({next:function(e){return m.next(e)},error:function(e){p=!0,v(),n=c(y,o,e),m.error(e)},complete:function(){h=!0,v(),n=c(y,f),m.complete()}}),i.innerFrom(e).subscribe(t))}))(e)}}},3133:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.shareReplay=void 0;var n=r(1242),o=r(8977);t.shareReplay=function(e,t,r){var i,a,u,s,c=!1;return e&&"object"==typeof e?(i=e.bufferSize,s=void 0===i?1/0:i,a=e.windowTime,t=void 0===a?1/0:a,c=void 0!==(u=e.refCount)&&u,r=e.scheduler):s=null!=e?e:1/0,o.share({connector:function(){return new n.ReplaySubject(s,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:c})}},3001:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.single=void 0;var n=r(2823),o=r(1505),i=r(1759),a=r(7843),u=r(3111);t.single=function(e){return a.operate((function(t,r){var a,s=!1,c=!1,l=0;t.subscribe(u.createOperatorSubscriber(r,(function(n){c=!0,e&&!e(n,l++,t)||(s&&r.error(new o.SequenceError("Too many matching values")),s=!0,a=n)}),(function(){s?(r.next(a),r.complete()):r.error(c?new i.NotFoundError("No matching values"):new n.EmptyError)})))}))}},3982:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.skip=void 0;var n=r(783);t.skip=function(e){return n.filter((function(t,r){return e<=r}))}},9098:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.skipLast=void 0;var n=r(6640),o=r(7843),i=r(3111);t.skipLast=function(e){return e<=0?n.identity:o.operate((function(t,r){var n=new Array(e),o=0;return t.subscribe(i.createOperatorSubscriber(r,(function(t){var i=o++;if(i<e)n[i]=t;else{var a=i%e,u=n[a];n[a]=t,r.next(u)}}))),function(){n=null}}))}},7372:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.skipUntil=void 0;var n=r(7843),o=r(3111),i=r(9445),a=r(1342);t.skipUntil=function(e){return n.operate((function(t,r){var n=!1,u=o.createOperatorSubscriber(r,(function(){null==u||u.unsubscribe(),n=!0}),a.noop);i.innerFrom(e).subscribe(u),t.subscribe(o.createOperatorSubscriber(r,(function(e){return n&&r.next(e)})))}))}},4721:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.skipWhile=void 0;var n=r(7843),o=r(3111);t.skipWhile=function(e){return n.operate((function(t,r){var n=!1,i=0;t.subscribe(o.createOperatorSubscriber(r,(function(t){return(n||(n=!e(t,i++)))&&r.next(t)})))}))}},269:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.startWith=void 0;var n=r(3865),o=r(1107),i=r(7843);t.startWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=o.popScheduler(e);return i.operate((function(t,o){(r?n.concat(e,t,r):n.concat(e,t)).subscribe(o)}))}},8960:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.subscribeOn=void 0;var n=r(7843);t.subscribeOn=function(e,t){return void 0===t&&(t=0),n.operate((function(r,n){n.add(e.schedule((function(){return r.subscribe(n)}),t))}))}},8774:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.switchAll=void 0;var n=r(3879),o=r(6640);t.switchAll=function(){return n.switchMap(o.identity)}},3879:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.switchMap=void 0;var n=r(9445),o=r(7843),i=r(3111);t.switchMap=function(e,t){return o.operate((function(r,o){var a=null,u=0,s=!1,c=function(){return s&&!a&&o.complete()};r.subscribe(i.createOperatorSubscriber(o,(function(r){null==a||a.unsubscribe();var s=0,l=u++;n.innerFrom(e(r,l)).subscribe(a=i.createOperatorSubscriber(o,(function(e){return o.next(t?t(r,e,l,s++):e)}),(function(){a=null,c()})))}),(function(){s=!0,c()})))}))}},3274:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.switchMapTo=void 0;var n=r(3879),o=r(1018);t.switchMapTo=function(e,t){return o.isFunction(t)?n.switchMap((function(){return e}),t):n.switchMap((function(){return e}))}},8712:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.switchScan=void 0;var n=r(3879),o=r(7843);t.switchScan=function(e,t){return o.operate((function(r,o){var i=t;return n.switchMap((function(t,r){return e(i,t,r)}),(function(e,t){return i=t,t}))(r).subscribe(o),function(){i=null}}))}},846:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.take=void 0;var n=r(8616),o=r(7843),i=r(3111);t.take=function(e){return e<=0?function(){return n.EMPTY}:o.operate((function(t,r){var n=0;t.subscribe(i.createOperatorSubscriber(r,(function(t){++n<=e&&(r.next(t),e<=n&&r.complete())})))}))}},8330:function(e,t,r){var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.takeLast=void 0;var o=r(8616),i=r(7843),a=r(3111);t.takeLast=function(e){return e<=0?function(){return o.EMPTY}:i.operate((function(t,r){var o=[];t.subscribe(a.createOperatorSubscriber(r,(function(t){o.push(t),e<o.length&&o.shift()}),(function(){var e,t;try{for(var i=n(o),a=i.next();!a.done;a=i.next()){var u=a.value;r.next(u)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}r.complete()}),void 0,(function(){o=null})))}))}},4780:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.takeUntil=void 0;var n=r(7843),o=r(3111),i=r(9445),a=r(1342);t.takeUntil=function(e){return n.operate((function(t,r){i.innerFrom(e).subscribe(o.createOperatorSubscriber(r,(function(){return r.complete()}),a.noop)),!r.closed&&t.subscribe(r)}))}},2129:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.takeWhile=void 0;var n=r(7843),o=r(3111);t.takeWhile=function(e,t){return void 0===t&&(t=!1),n.operate((function(r,n){var i=0;r.subscribe(o.createOperatorSubscriber(n,(function(r){var o=e(r,i++);(o||t)&&n.next(r),!o&&n.complete()})))}))}},3964:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.tap=void 0;var n=r(1018),o=r(7843),i=r(3111),a=r(6640);t.tap=function(e,t,r){var u=n.isFunction(e)||t||r?{next:e,error:t,complete:r}:e;return u?o.operate((function(e,t){var r;null===(r=u.subscribe)||void 0===r||r.call(u);var n=!0;e.subscribe(i.createOperatorSubscriber(t,(function(e){var r;null===(r=u.next)||void 0===r||r.call(u,e),t.next(e)}),(function(){var e;n=!1,null===(e=u.complete)||void 0===e||e.call(u),t.complete()}),(function(e){var r;n=!1,null===(r=u.error)||void 0===r||r.call(u,e),t.error(e)}),(function(){var e,t;n&&(null===(e=u.unsubscribe)||void 0===e||e.call(u)),null===(t=u.finalize)||void 0===t||t.call(u)})))})):a.identity}},8941:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.throttle=void 0;var n=r(7843),o=r(3111),i=r(9445);t.throttle=function(e,t){return n.operate((function(r,n){var a=null!=t?t:{},u=a.leading,s=void 0===u||u,c=a.trailing,l=void 0!==c&&c,f=!1,h=null,d=null,p=!1,v=function(){null==d||d.unsubscribe(),d=null,l&&(m(),p&&n.complete())},y=function(){d=null,p&&n.complete()},b=function(t){return d=i.innerFrom(e(t)).subscribe(o.createOperatorSubscriber(n,v,y))},m=function(){if(f){f=!1;var e=h;h=null,n.next(e),!p&&b(e)}};r.subscribe(o.createOperatorSubscriber(n,(function(e){f=!0,h=e,(!d||d.closed)&&(s?m():b(e))}),(function(){p=!0,(!(l&&f&&d)||d.closed)&&n.complete()})))}))}},7640:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.throttleTime=void 0;var n=r(7961),o=r(8941),i=r(4092);t.throttleTime=function(e,t,r){void 0===t&&(t=n.asyncScheduler);var a=i.timer(e,t);return o.throttle((function(){return a}),r)}},4869:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.throwIfEmpty=void 0;var n=r(2823),o=r(7843),i=r(3111);function a(){return new n.EmptyError}t.throwIfEmpty=function(e){return void 0===e&&(e=a),o.operate((function(t,r){var n=!1;t.subscribe(i.createOperatorSubscriber(r,(function(e){n=!0,r.next(e)}),(function(){return n?r.complete():r.error(e())})))}))}},489:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TimeInterval=t.timeInterval=void 0;var n=r(7961),o=r(7843),i=r(3111);t.timeInterval=function(e){return void 0===e&&(e=n.asyncScheduler),o.operate((function(t,r){var n=e.now();t.subscribe(i.createOperatorSubscriber(r,(function(t){var o=e.now(),i=o-n;n=o,r.next(new a(t,i))})))}))};var a=function(e,t){this.value=e,this.interval=t};t.TimeInterval=a},1554:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.timeout=t.TimeoutError=void 0;var n=r(7961),o=r(1074),i=r(7843),a=r(9445),u=r(5568),s=r(3111),c=r(7110);function l(e){throw new t.TimeoutError(e)}t.TimeoutError=u.createErrorClass((function(e){return function(t){void 0===t&&(t=null),e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=t}})),t.timeout=function(e,t){var r=o.isValidDate(e)?{first:e}:"number"==typeof e?{each:e}:e,u=r.first,f=r.each,h=r.with,d=void 0===h?l:h,p=r.scheduler,v=void 0===p?null!=t?t:n.asyncScheduler:p,y=r.meta,b=void 0===y?null:y;if(null==u&&null==f)throw new TypeError("No timeout provided.");return i.operate((function(e,t){var r,n,o=null,i=0,l=function(e){n=c.executeSchedule(t,v,(function(){try{r.unsubscribe(),a.innerFrom(d({meta:b,lastValue:o,seen:i})).subscribe(t)}catch(e){t.error(e)}}),e)};r=e.subscribe(s.createOperatorSubscriber(t,(function(e){null==n||n.unsubscribe(),i++,t.next(o=e),f>0&&l(f)}),void 0,void 0,(function(){(null==n?void 0:n.closed)||null==n||n.unsubscribe(),o=null}))),!i&&l(null!=u?"number"==typeof u?u:+u-v.now():f)}))}},4862:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.timeoutWith=void 0;var n=r(7961),o=r(1074),i=r(1554);t.timeoutWith=function(e,t,r){var a,u,s;if(r=null!=r?r:n.async,o.isValidDate(e)?a=e:"number"==typeof e&&(u=e),!t)throw new TypeError("No observable provided to switch to");if(s=function(){return t},null==a&&null==u)throw new TypeError("No timeout provided.");return i.timeout({first:a,each:u,scheduler:r,with:s})}},6505:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.timestamp=void 0;var n=r(9568),o=r(5471);t.timestamp=function(e){return void 0===e&&(e=n.dateTimestampProvider),o.map((function(t){return{value:t,timestamp:e.now()}}))}},2343:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.toArray=void 0;var n=r(9139),o=r(7843),i=function(e,t){return e.push(t),e};t.toArray=function(){return o.operate((function(e,t){n.reduce(i,[])(e).subscribe(t)}))}},5477:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.window=void 0;var n=r(2483),o=r(7843),i=r(3111),a=r(1342),u=r(9445);t.window=function(e){return o.operate((function(t,r){var o=new n.Subject;r.next(o.asObservable());var s=function(e){o.error(e),r.error(e)};return t.subscribe(i.createOperatorSubscriber(r,(function(e){return null==o?void 0:o.next(e)}),(function(){o.complete(),r.complete()}),s)),u.innerFrom(e).subscribe(i.createOperatorSubscriber(r,(function(){o.complete(),r.next(o=new n.Subject)}),a.noop,s)),function(){null==o||o.unsubscribe(),o=null}}))}},6746:function(e,t,r){var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.windowCount=void 0;var o=r(2483),i=r(7843),a=r(3111);t.windowCount=function(e,t){void 0===t&&(t=0);var r=t>0?t:e;return i.operate((function(t,i){var u=[new o.Subject],s=0;i.next(u[0].asObservable()),t.subscribe(a.createOperatorSubscriber(i,(function(t){var a,c;try{for(var l=n(u),f=l.next();!f.done;f=l.next())f.value.next(t)}catch(e){a={error:e}}finally{try{f&&!f.done&&(c=l.return)&&c.call(l)}finally{if(a)throw a.error}}var h=s-e+1;if(h>=0&&h%r==0&&u.shift().complete(),++s%r==0){var d=new o.Subject;u.push(d),i.next(d.asObservable())}}),(function(){for(;u.length>0;)u.shift().complete();i.complete()}),(function(e){for(;u.length>0;)u.shift().error(e);i.error(e)}),(function(){u=null})))}))}},8208:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.windowTime=void 0;var n=r(2483),o=r(7961),i=r(8014),a=r(7843),u=r(3111),s=r(7479),c=r(1107),l=r(7110);t.windowTime=function(e){for(var t,r,f=[],h=1;h<arguments.length;h++)f[h-1]=arguments[h];var d=null!==(t=c.popScheduler(f))&&void 0!==t?t:o.asyncScheduler,p=null!==(r=f[0])&&void 0!==r?r:null,v=f[1]||1/0;return a.operate((function(t,r){var o=[],a=!1,c=function(e){var t=e.window,r=e.subs;t.complete(),r.unsubscribe(),s.arrRemove(o,e),a&&f()},f=function(){if(o){var t=new i.Subscription;r.add(t);var a=new n.Subject,u={window:a,subs:t,seen:0};o.push(u),r.next(a.asObservable()),l.executeSchedule(t,d,(function(){return c(u)}),e)}};null!==p&&p>=0?l.executeSchedule(r,d,f,p,!0):a=!0,f();var h=function(e){return o.slice().forEach(e)},y=function(e){h((function(t){var r=t.window;return e(r)})),e(r),r.unsubscribe()};return t.subscribe(u.createOperatorSubscriber(r,(function(e){h((function(t){t.window.next(e),v<=++t.seen&&c(t)}))}),(function(){return y((function(e){return e.complete()}))}),(function(e){return y((function(t){return t.error(e)}))}))),function(){o=null}}))}},6637:function(e,t,r){var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.windowToggle=void 0;var o=r(2483),i=r(8014),a=r(7843),u=r(9445),s=r(3111),c=r(1342),l=r(7479);t.windowToggle=function(e,t){return a.operate((function(r,a){var f=[],h=function(e){for(;0<f.length;)f.shift().error(e);a.error(e)};u.innerFrom(e).subscribe(s.createOperatorSubscriber(a,(function(e){var r=new o.Subject;f.push(r);var n,d=new i.Subscription;try{n=u.innerFrom(t(e))}catch(e){return void h(e)}a.next(r.asObservable()),d.add(n.subscribe(s.createOperatorSubscriber(a,(function(){l.arrRemove(f,r),r.complete(),d.unsubscribe()}),c.noop,h)))}),c.noop)),r.subscribe(s.createOperatorSubscriber(a,(function(e){var t,r,o=f.slice();try{for(var i=n(o),a=i.next();!a.done;a=i.next())a.value.next(e)}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}}),(function(){for(;0<f.length;)f.shift().complete();a.complete()}),h,(function(){for(;0<f.length;)f.shift().unsubscribe()})))}))}},1141:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.windowWhen=void 0;var n=r(2483),o=r(7843),i=r(3111),a=r(9445);t.windowWhen=function(e){return o.operate((function(t,r){var o,u,s=function(e){o.error(e),r.error(e)},c=function(){var t;null==u||u.unsubscribe(),null==o||o.complete(),o=new n.Subject,r.next(o.asObservable());try{t=a.innerFrom(e())}catch(e){return void s(e)}t.subscribe(u=i.createOperatorSubscriber(r,c,c,s))};c(),t.subscribe(i.createOperatorSubscriber(r,(function(e){return o.next(e)}),(function(){o.complete(),r.complete()}),s,(function(){null==u||u.unsubscribe(),o=null})))}))}},5442:function(e,t,r){var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},o=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.withLatestFrom=void 0;var i=r(7843),a=r(3111),u=r(9445),s=r(6640),c=r(1342),l=r(1107);t.withLatestFrom=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=l.popResultSelector(e);return i.operate((function(t,i){for(var l=e.length,f=new Array(l),h=e.map((function(){return!1})),d=!1,p=function(t){u.innerFrom(e[t]).subscribe(a.createOperatorSubscriber(i,(function(e){f[t]=e,d||h[t]||(h[t]=!0,(d=h.every(s.identity))&&(h=null))}),c.noop))},v=0;v<l;v++)p(v);t.subscribe(a.createOperatorSubscriber(i,(function(e){if(d){var t=o([e],n(f));i.next(r?r.apply(void 0,o([],n(t))):t)}})))}))}},5918:function(e,t,r){var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},o=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.zip=void 0;var i=r(7286),a=r(7843);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return a.operate((function(t,r){i.zip.apply(void 0,o([t],n(e))).subscribe(r)}))}},187:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.zipAll=void 0;var n=r(7286),o=r(3638);t.zipAll=function(e){return o.joinAllInternals(n.zip,e)}},8538:function(e,t,r){var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},o=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.zipWith=void 0;var i=r(5918);t.zipWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return i.zip.apply(void 0,o([],n(e)))}},6985:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleArray=void 0;var n=r(4662);t.scheduleArray=function(e,t){return new n.Observable((function(r){var n=0;return t.schedule((function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())}))}))}},854:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleAsyncIterable=void 0;var n=r(4662),o=r(7110);t.scheduleAsyncIterable=function(e,t){if(!e)throw new Error("Iterable cannot be null");return new n.Observable((function(r){o.executeSchedule(r,t,(function(){var n=e[Symbol.asyncIterator]();o.executeSchedule(r,t,(function(){n.next().then((function(e){e.done?r.complete():r.next(e.value)}))}),0,!0)}))}))}},8808:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleIterable=void 0;var n=r(4662),o=r(1964),i=r(1018),a=r(7110);t.scheduleIterable=function(e,t){return new n.Observable((function(r){var n;return a.executeSchedule(r,t,(function(){n=e[o.iterator](),a.executeSchedule(r,t,(function(){var e,t,o;try{t=(e=n.next()).value,o=e.done}catch(e){return void r.error(e)}o?r.complete():r.next(t)}),0,!0)})),function(){return i.isFunction(null==n?void 0:n.return)&&n.return()}}))}},9567:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleObservable=void 0;var n=r(9445),o=r(5184),i=r(8960);t.scheduleObservable=function(e,t){return n.innerFrom(e).pipe(i.subscribeOn(t),o.observeOn(t))}},9589:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.schedulePromise=void 0;var n=r(9445),o=r(5184),i=r(8960);t.schedulePromise=function(e,t){return n.innerFrom(e).pipe(i.subscribeOn(t),o.observeOn(t))}},4953:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleReadableStreamLike=void 0;var n=r(854),o=r(9137);t.scheduleReadableStreamLike=function(e,t){return n.scheduleAsyncIterable(o.readableStreamLikeToAsyncGenerator(e),t)}},1656:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.scheduled=void 0;var n=r(9567),o=r(9589),i=r(6985),a=r(8808),u=r(854),s=r(1116),c=r(7629),l=r(8046),f=r(6368),h=r(1358),d=r(7614),p=r(9137),v=r(4953);t.scheduled=function(e,t){if(null!=e){if(s.isInteropObservable(e))return n.scheduleObservable(e,t);if(l.isArrayLike(e))return i.scheduleArray(e,t);if(c.isPromise(e))return o.schedulePromise(e,t);if(h.isAsyncIterable(e))return u.scheduleAsyncIterable(e,t);if(f.isIterable(e))return a.scheduleIterable(e,t);if(p.isReadableStreamLike(e))return v.scheduleReadableStreamLike(e,t)}throw d.createInvalidObservableTypeError(e)}},4671:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Action=void 0;var i=function(e){function t(t,r){return e.call(this)||this}return o(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(r(8014).Subscription);t.Action=i},2628:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AnimationFrameAction=void 0;var i=r(5267),a=r(9507),u=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return o(t,e),t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!==n&&n>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t._scheduled||(t._scheduled=a.animationFrameProvider.requestAnimationFrame((function(){return t.flush(void 0)}))))},t.prototype.recycleAsyncId=function(t,r,n){var o;if(void 0===n&&(n=0),null!=n?n>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);var i=t.actions;null!=r&&(null===(o=i[i.length-1])||void 0===o?void 0:o.id)!==r&&(a.animationFrameProvider.cancelAnimationFrame(r),t._scheduled=void 0)},t}(i.AsyncAction);t.AnimationFrameAction=u},3229:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AnimationFrameScheduler=void 0;var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.flush=function(e){this._active=!0;var t=this._scheduled;this._scheduled=void 0;var r,n=this.actions;e=e||n.shift();do{if(r=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}},t}(r(5648).AsyncScheduler);t.AnimationFrameScheduler=i},5006:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsapAction=void 0;var i=r(5267),a=r(6293),u=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return o(t,e),t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!==n&&n>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t._scheduled||(t._scheduled=a.immediateProvider.setImmediate(t.flush.bind(t,void 0))))},t.prototype.recycleAsyncId=function(t,r,n){var o;if(void 0===n&&(n=0),null!=n?n>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);var i=t.actions;null!=r&&(null===(o=i[i.length-1])||void 0===o?void 0:o.id)!==r&&(a.immediateProvider.clearImmediate(r),t._scheduled===r&&(t._scheduled=void 0))},t}(i.AsyncAction);t.AsapAction=u},827:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsapScheduler=void 0;var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.flush=function(e){this._active=!0;var t=this._scheduled;this._scheduled=void 0;var r,n=this.actions;e=e||n.shift();do{if(r=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}},t}(r(5648).AsyncScheduler);t.AsapScheduler=i},5267:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncAction=void 0;var i=r(4671),a=r(5649),u=r(7479),s=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n.pending=!1,n}return o(t,e),t.prototype.schedule=function(e,t){var r;if(void 0===t&&(t=0),this.closed)return this;this.state=e;var n=this.id,o=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(o,n,t)),this.pending=!0,this.delay=t,this.id=null!==(r=this.id)&&void 0!==r?r:this.requestAsyncId(o,this.id,t),this},t.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),a.intervalProvider.setInterval(e.flush.bind(e,this),r)},t.prototype.recycleAsyncId=function(e,t,r){if(void 0===r&&(r=0),null!=r&&this.delay===r&&!1===this.pending)return t;null!=t&&a.intervalProvider.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var r,n=!1;try{this.work(e)}catch(e){n=!0,r=e||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,r=this.scheduler,n=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,u.arrRemove(n,this),null!=t&&(this.id=this.recycleAsyncId(r,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(i.Action);t.AsyncAction=s},5648:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncScheduler=void 0;var i=r(8986),a=function(e){function t(t,r){void 0===r&&(r=i.Scheduler.now);var n=e.call(this,t,r)||this;return n.actions=[],n._active=!1,n}return o(t,e),t.prototype.flush=function(e){var t=this.actions;if(this._active)t.push(e);else{var r;this._active=!0;do{if(r=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,r){for(;e=t.shift();)e.unsubscribe();throw r}}},t}(i.Scheduler);t.AsyncScheduler=a},4212:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueAction=void 0;var i=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return o(t,e),t.prototype.schedule=function(t,r){return void 0===r&&(r=0),r>0?e.prototype.schedule.call(this,t,r):(this.delay=r,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,r){return r>0||this.closed?e.prototype.execute.call(this,t,r):this._execute(t,r)},t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!=n&&n>0||null==n&&this.delay>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.flush(this),0)},t}(r(5267).AsyncAction);t.QueueAction=i},1293:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueScheduler=void 0;var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(r(5648).AsyncScheduler);t.QueueScheduler=i},182:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.VirtualAction=t.VirtualTimeScheduler=void 0;var i=r(5267),a=r(8014),u=function(e){function t(t,r){void 0===t&&(t=s),void 0===r&&(r=1/0);var n=e.call(this,t,(function(){return n.frame}))||this;return n.maxFrames=r,n.frame=0,n.index=-1,n}return o(t,e),t.prototype.flush=function(){for(var e,t,r=this.actions,n=this.maxFrames;(t=r[0])&&t.delay<=n&&(r.shift(),this.frame=t.delay,!(e=t.execute(t.state,t.delay))););if(e){for(;t=r.shift();)t.unsubscribe();throw e}},t.frameTimeFactor=10,t}(r(5648).AsyncScheduler);t.VirtualTimeScheduler=u;var s=function(e){function t(t,r,n){void 0===n&&(n=t.index+=1);var o=e.call(this,t,r)||this;return o.scheduler=t,o.work=r,o.index=n,o.active=!0,o.index=t.index=n,o}return o(t,e),t.prototype.schedule=function(r,n){if(void 0===n&&(n=0),Number.isFinite(n)){if(!this.id)return e.prototype.schedule.call(this,r,n);this.active=!1;var o=new t(this.scheduler,this.work);return this.add(o),o.schedule(r,n)}return a.Subscription.EMPTY},t.prototype.requestAsyncId=function(e,r,n){void 0===n&&(n=0),this.delay=e.frame+n;var o=e.actions;return o.push(this),o.sort(t.sortActions),1},t.prototype.recycleAsyncId=function(e,t,r){void 0===r&&(r=0)},t.prototype._execute=function(t,r){if(!0===this.active)return e.prototype._execute.call(this,t,r)},t.sortActions=function(e,t){return e.delay===t.delay?e.index===t.index?0:e.index>t.index?1:-1:e.delay>t.delay?1:-1},t}(i.AsyncAction);t.VirtualAction=s},3862:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.animationFrame=t.animationFrameScheduler=void 0;var n=r(2628),o=r(3229);t.animationFrameScheduler=new o.AnimationFrameScheduler(n.AnimationFrameAction),t.animationFrame=t.animationFrameScheduler},9507:function(e,t,r){var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},o=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.animationFrameProvider=void 0;var i=r(8014);t.animationFrameProvider={schedule:function(e){var r=requestAnimationFrame,n=cancelAnimationFrame,o=t.animationFrameProvider.delegate;o&&(r=o.requestAnimationFrame,n=o.cancelAnimationFrame);var a=r((function(t){n=void 0,e(t)}));return new i.Subscription((function(){return null==n?void 0:n(a)}))},requestAnimationFrame:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var i=t.animationFrameProvider.delegate;return((null==i?void 0:i.requestAnimationFrame)||requestAnimationFrame).apply(void 0,o([],n(e)))},cancelAnimationFrame:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var i=t.animationFrameProvider.delegate;return((null==i?void 0:i.cancelAnimationFrame)||cancelAnimationFrame).apply(void 0,o([],n(e)))},delegate:void 0}},3692:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.asap=t.asapScheduler=void 0;var n=r(5006),o=r(827);t.asapScheduler=new o.AsapScheduler(n.AsapAction),t.asap=t.asapScheduler},7961:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.async=t.asyncScheduler=void 0;var n=r(5267),o=r(5648);t.asyncScheduler=new o.AsyncScheduler(n.AsyncAction),t.async=t.asyncScheduler},9568:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.dateTimestampProvider=void 0,t.dateTimestampProvider={now:function(){return(t.dateTimestampProvider.delegate||Date).now()},delegate:void 0}},6293:function(e,t,r){var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},o=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.immediateProvider=void 0;var i=r(7245),a=i.Immediate.setImmediate,u=i.Immediate.clearImmediate;t.immediateProvider={setImmediate:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var i=t.immediateProvider.delegate;return((null==i?void 0:i.setImmediate)||a).apply(void 0,o([],n(e)))},clearImmediate:function(e){var r=t.immediateProvider.delegate;return((null==r?void 0:r.clearImmediate)||u)(e)},delegate:void 0}},5649:function(e,t){var r=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},n=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.intervalProvider=void 0,t.intervalProvider={setInterval:function(e,o){for(var i=[],a=2;a<arguments.length;a++)i[a-2]=arguments[a];var u=t.intervalProvider.delegate;return(null==u?void 0:u.setInterval)?u.setInterval.apply(u,n([e,o],r(i))):setInterval.apply(void 0,n([e,o],r(i)))},clearInterval:function(e){var r=t.intervalProvider.delegate;return((null==r?void 0:r.clearInterval)||clearInterval)(e)},delegate:void 0}},4746:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.performanceTimestampProvider=void 0,t.performanceTimestampProvider={now:function(){return(t.performanceTimestampProvider.delegate||performance).now()},delegate:void 0}},2886:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.queue=t.queueScheduler=void 0;var n=r(4212),o=r(1293);t.queueScheduler=new o.QueueScheduler(n.QueueAction),t.queue=t.queueScheduler},9155:function(e,t){var r=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},n=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.timeoutProvider=void 0,t.timeoutProvider={setTimeout:function(e,o){for(var i=[],a=2;a<arguments.length;a++)i[a-2]=arguments[a];var u=t.timeoutProvider.delegate;return(null==u?void 0:u.setTimeout)?u.setTimeout.apply(u,n([e,o],r(i))):setTimeout.apply(void 0,n([e,o],r(i)))},clearTimeout:function(e){var r=t.timeoutProvider.delegate;return((null==r?void 0:r.clearTimeout)||clearTimeout)(e)},delegate:void 0}},1964:(e,t)=>{function r(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(t,"__esModule",{value:!0}),t.iterator=t.getSymbolIterator=void 0,t.getSymbolIterator=r,t.iterator=r()},3327:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.observable=void 0,t.observable="function"==typeof Symbol&&Symbol.observable||"@@observable"},6038:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},7057:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ArgumentOutOfRangeError=void 0;var n=r(5568);t.ArgumentOutOfRangeError=n.createErrorClass((function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}}))},2823:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EmptyError=void 0;var n=r(5568);t.EmptyError=n.createErrorClass((function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}))},7245:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TestTools=t.Immediate=void 0;var r,n=1,o={};function i(e){return e in o&&(delete o[e],!0)}t.Immediate={setImmediate:function(e){var t=n++;return o[t]=!0,r||(r=Promise.resolve()),r.then((function(){return i(t)&&e()})),t},clearImmediate:function(e){i(e)}},t.TestTools={pending:function(){return Object.keys(o).length}}},1759:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NotFoundError=void 0;var n=r(5568);t.NotFoundError=n.createErrorClass((function(e){return function(t){e(this),this.name="NotFoundError",this.message=t}}))},9686:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectUnsubscribedError=void 0;var n=r(5568);t.ObjectUnsubscribedError=n.createErrorClass((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}))},1505:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SequenceError=void 0;var n=r(5568);t.SequenceError=n.createErrorClass((function(e){return function(t){e(this),this.name="SequenceError",this.message=t}}))},5788:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UnsubscriptionError=void 0;var n=r(5568);t.UnsubscriptionError=n.createErrorClass((function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}}))},1107:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.popNumber=t.popScheduler=t.popResultSelector=void 0;var n=r(1018),o=r(8613);function i(e){return e[e.length-1]}t.popResultSelector=function(e){return n.isFunction(i(e))?e.pop():void 0},t.popScheduler=function(e){return o.isScheduler(i(e))?e.pop():void 0},t.popNumber=function(e,t){return"number"==typeof i(e)?e.pop():t}},7360:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.argsArgArrayOrObject=void 0;var r=Array.isArray,n=Object.getPrototypeOf,o=Object.prototype,i=Object.keys;t.argsArgArrayOrObject=function(e){if(1===e.length){var t=e[0];if(r(t))return{args:t,keys:null};if((u=t)&&"object"==typeof u&&n(u)===o){var a=i(t);return{args:a.map((function(e){return t[e]})),keys:a}}}var u;return{args:e,keys:null}}},8535:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.argsOrArgArray=void 0;var r=Array.isArray;t.argsOrArgArray=function(e){return 1===e.length&&r(e[0])?e[0]:e}},7479:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.arrRemove=void 0,t.arrRemove=function(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}},5568:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createErrorClass=void 0,t.createErrorClass=function(e){var t=e((function(e){Error.call(e),e.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}},6013:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createObject=void 0,t.createObject=function(e,t){return e.reduce((function(e,r,n){return e[r]=t[n],e}),{})}},9223:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.captureError=t.errorContext=void 0;var n=r(3413),o=null;t.errorContext=function(e){if(n.config.useDeprecatedSynchronousErrorHandling){var t=!o;if(t&&(o={errorThrown:!1,error:null}),e(),t){var r=o,i=r.errorThrown,a=r.error;if(o=null,i)throw a}}else e()},t.captureError=function(e){n.config.useDeprecatedSynchronousErrorHandling&&o&&(o.errorThrown=!0,o.error=e)}},7110:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.executeSchedule=void 0,t.executeSchedule=function(e,t,r,n,o){void 0===n&&(n=0),void 0===o&&(o=!1);var i=t.schedule((function(){r(),o?e.add(this.schedule(null,n)):this.unsubscribe()}),n);if(e.add(i),!o)return i}},6640:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.identity=void 0,t.identity=function(e){return e}},8046:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isArrayLike=void 0,t.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e}},1358:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isAsyncIterable=void 0;var n=r(1018);t.isAsyncIterable=function(e){return Symbol.asyncIterator&&n.isFunction(null==e?void 0:e[Symbol.asyncIterator])}},1074:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isValidDate=void 0,t.isValidDate=function(e){return e instanceof Date&&!isNaN(e)}},1018:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isFunction=void 0,t.isFunction=function(e){return"function"==typeof e}},1116:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isInteropObservable=void 0;var n=r(3327),o=r(1018);t.isInteropObservable=function(e){return o.isFunction(e[n.observable])}},6368:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isIterable=void 0;var n=r(1964),o=r(1018);t.isIterable=function(e){return o.isFunction(null==e?void 0:e[n.iterator])}},1751:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isObservable=void 0;var n=r(4662),o=r(1018);t.isObservable=function(e){return!!e&&(e instanceof n.Observable||o.isFunction(e.lift)&&o.isFunction(e.subscribe))}},7629:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isPromise=void 0;var n=r(1018);t.isPromise=function(e){return n.isFunction(null==e?void 0:e.then)}},9137:function(e,t,r){var n=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},o=this&&this.__await||function(e){return this instanceof o?(this.v=e,this):new o(e)},i=this&&this.__asyncGenerator||function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),a=[];return n={},u("next"),u("throw"),u("return"),n[Symbol.asyncIterator]=function(){return this},n;function u(e){i[e]&&(n[e]=function(t){return new Promise((function(r,n){a.push([e,t,r,n])>1||s(e,t)}))})}function s(e,t){try{(r=i[e](t)).value instanceof o?Promise.resolve(r.value.v).then(c,l):f(a[0][2],r)}catch(e){f(a[0][3],e)}var r}function c(e){s("next",e)}function l(e){s("throw",e)}function f(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}};Object.defineProperty(t,"__esModule",{value:!0}),t.isReadableStreamLike=t.readableStreamLikeToAsyncGenerator=void 0;var a=r(1018);t.readableStreamLikeToAsyncGenerator=function(e){return i(this,arguments,(function(){var t,r,i;return n(this,(function(n){switch(n.label){case 0:t=e.getReader(),n.label=1;case 1:n.trys.push([1,,9,10]),n.label=2;case 2:return[4,o(t.read())];case 3:return r=n.sent(),i=r.value,r.done?[4,o(void 0)]:[3,5];case 4:return[2,n.sent()];case 5:return[4,o(i)];case 6:return[4,n.sent()];case 7:return n.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))},t.isReadableStreamLike=function(e){return a.isFunction(null==e?void 0:e.getReader)}},8613:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isScheduler=void 0;var n=r(1018);t.isScheduler=function(e){return e&&n.isFunction(e.schedule)}},7843:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.operate=t.hasLift=void 0;var n=r(1018);function o(e){return n.isFunction(null==e?void 0:e.lift)}t.hasLift=o,t.operate=function(e){return function(t){if(o(t))return t.lift((function(t){try{return e(t,this)}catch(e){this.error(e)}}));throw new TypeError("Unable to lift unknown Observable type")}}},1251:function(e,t,r){var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},o=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.mapOneOrManyArgs=void 0;var i=r(5471),a=Array.isArray;t.mapOneOrManyArgs=function(e){return i.map((function(t){return function(e,t){return a(t)?e.apply(void 0,o([],n(t))):e(t)}(e,t)}))}},1342:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.noop=void 0,t.noop=function(){}},245:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.not=void 0,t.not=function(e,t){return function(r,n){return!e.call(t,r,n)}}},2706:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.pipeFromArray=t.pipe=void 0;var n=r(6640);function o(e){return 0===e.length?n.identity:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}t.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o(e)},t.pipeFromArray=o},7315:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.reportUnhandledError=void 0;var n=r(3413),o=r(9155);t.reportUnhandledError=function(e){o.timeoutProvider.setTimeout((function(){var t=n.config.onUnhandledError;if(!t)throw e;t(e)}))}},7614:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createInvalidObservableTypeError=void 0,t.createInvalidObservableTypeError=function(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}},9419:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mergeAll=t.merge=t.max=t.materialize=t.mapTo=t.map=t.last=t.isEmpty=t.ignoreElements=t.groupBy=t.first=t.findIndex=t.find=t.finalize=t.filter=t.expand=t.exhaustMap=t.exhaustAll=t.exhaust=t.every=t.endWith=t.elementAt=t.distinctUntilKeyChanged=t.distinctUntilChanged=t.distinct=t.dematerialize=t.delayWhen=t.delay=t.defaultIfEmpty=t.debounceTime=t.debounce=t.count=t.connect=t.concatWith=t.concatMapTo=t.concatMap=t.concatAll=t.concat=t.combineLatestWith=t.combineLatest=t.combineLatestAll=t.combineAll=t.catchError=t.bufferWhen=t.bufferToggle=t.bufferTime=t.bufferCount=t.buffer=t.auditTime=t.audit=void 0,t.timeInterval=t.throwIfEmpty=t.throttleTime=t.throttle=t.tap=t.takeWhile=t.takeUntil=t.takeLast=t.take=t.switchScan=t.switchMapTo=t.switchMap=t.switchAll=t.subscribeOn=t.startWith=t.skipWhile=t.skipUntil=t.skipLast=t.skip=t.single=t.shareReplay=t.share=t.sequenceEqual=t.scan=t.sampleTime=t.sample=t.refCount=t.retryWhen=t.retry=t.repeatWhen=t.repeat=t.reduce=t.raceWith=t.race=t.publishReplay=t.publishLast=t.publishBehavior=t.publish=t.pluck=t.partition=t.pairwise=t.onErrorResumeNext=t.observeOn=t.multicast=t.min=t.mergeWith=t.mergeScan=t.mergeMapTo=t.mergeMap=t.flatMap=void 0,t.zipWith=t.zipAll=t.zip=t.withLatestFrom=t.windowWhen=t.windowToggle=t.windowTime=t.windowCount=t.window=t.toArray=t.timestamp=t.timeoutWith=t.timeout=void 0;var n=r(3146);Object.defineProperty(t,"audit",{enumerable:!0,get:function(){return n.audit}});var o=r(3231);Object.defineProperty(t,"auditTime",{enumerable:!0,get:function(){return o.auditTime}});var i=r(8015);Object.defineProperty(t,"buffer",{enumerable:!0,get:function(){return i.buffer}});var a=r(5572);Object.defineProperty(t,"bufferCount",{enumerable:!0,get:function(){return a.bufferCount}});var u=r(7210);Object.defineProperty(t,"bufferTime",{enumerable:!0,get:function(){return u.bufferTime}});var s=r(8995);Object.defineProperty(t,"bufferToggle",{enumerable:!0,get:function(){return s.bufferToggle}});var c=r(8831);Object.defineProperty(t,"bufferWhen",{enumerable:!0,get:function(){return c.bufferWhen}});var l=r(8118);Object.defineProperty(t,"catchError",{enumerable:!0,get:function(){return l.catchError}});var f=r(6625);Object.defineProperty(t,"combineAll",{enumerable:!0,get:function(){return f.combineAll}});var h=r(6728);Object.defineProperty(t,"combineLatestAll",{enumerable:!0,get:function(){return h.combineLatestAll}});var d=r(2551);Object.defineProperty(t,"combineLatest",{enumerable:!0,get:function(){return d.combineLatest}});var p=r(8239);Object.defineProperty(t,"combineLatestWith",{enumerable:!0,get:function(){return p.combineLatestWith}});var v=r(7601);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return v.concat}});var y=r(8158);Object.defineProperty(t,"concatAll",{enumerable:!0,get:function(){return y.concatAll}});var b=r(9135);Object.defineProperty(t,"concatMap",{enumerable:!0,get:function(){return b.concatMap}});var m=r(9938);Object.defineProperty(t,"concatMapTo",{enumerable:!0,get:function(){return m.concatMapTo}});var g=r(9669);Object.defineProperty(t,"concatWith",{enumerable:!0,get:function(){return g.concatWith}});var _=r(1483);Object.defineProperty(t,"connect",{enumerable:!0,get:function(){return _.connect}});var w=r(1038);Object.defineProperty(t,"count",{enumerable:!0,get:function(){return w.count}});var O=r(4461);Object.defineProperty(t,"debounce",{enumerable:!0,get:function(){return O.debounce}});var S=r(8079);Object.defineProperty(t,"debounceTime",{enumerable:!0,get:function(){return S.debounceTime}});var E=r(378);Object.defineProperty(t,"defaultIfEmpty",{enumerable:!0,get:function(){return E.defaultIfEmpty}});var P=r(914);Object.defineProperty(t,"delay",{enumerable:!0,get:function(){return P.delay}});var x=r(8766);Object.defineProperty(t,"delayWhen",{enumerable:!0,get:function(){return x.delayWhen}});var T=r(7441);Object.defineProperty(t,"dematerialize",{enumerable:!0,get:function(){return T.dematerialize}});var j=r(5365);Object.defineProperty(t,"distinct",{enumerable:!0,get:function(){return j.distinct}});var C=r(8937);Object.defineProperty(t,"distinctUntilChanged",{enumerable:!0,get:function(){return C.distinctUntilChanged}});var A=r(9612);Object.defineProperty(t,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return A.distinctUntilKeyChanged}});var k=r(4520);Object.defineProperty(t,"elementAt",{enumerable:!0,get:function(){return k.elementAt}});var R=r(1776);Object.defineProperty(t,"endWith",{enumerable:!0,get:function(){return R.endWith}});var I=r(5510);Object.defineProperty(t,"every",{enumerable:!0,get:function(){return I.every}});var M=r(1551);Object.defineProperty(t,"exhaust",{enumerable:!0,get:function(){return M.exhaust}});var N=r(2752);Object.defineProperty(t,"exhaustAll",{enumerable:!0,get:function(){return N.exhaustAll}});var D=r(4753);Object.defineProperty(t,"exhaustMap",{enumerable:!0,get:function(){return D.exhaustMap}});var L=r(7661);Object.defineProperty(t,"expand",{enumerable:!0,get:function(){return L.expand}});var U=r(783);Object.defineProperty(t,"filter",{enumerable:!0,get:function(){return U.filter}});var F=r(3555);Object.defineProperty(t,"finalize",{enumerable:!0,get:function(){return F.finalize}});var B=r(7714);Object.defineProperty(t,"find",{enumerable:!0,get:function(){return B.find}});var z=r(9756);Object.defineProperty(t,"findIndex",{enumerable:!0,get:function(){return z.findIndex}});var V=r(8275);Object.defineProperty(t,"first",{enumerable:!0,get:function(){return V.first}});var W=r(7815);Object.defineProperty(t,"groupBy",{enumerable:!0,get:function(){return W.groupBy}});var G=r(490);Object.defineProperty(t,"ignoreElements",{enumerable:!0,get:function(){return G.ignoreElements}});var q=r(9356);Object.defineProperty(t,"isEmpty",{enumerable:!0,get:function(){return q.isEmpty}});var H=r(8669);Object.defineProperty(t,"last",{enumerable:!0,get:function(){return H.last}});var Y=r(5471);Object.defineProperty(t,"map",{enumerable:!0,get:function(){return Y.map}});var X=r(3218);Object.defineProperty(t,"mapTo",{enumerable:!0,get:function(){return X.mapTo}});var Z=r(2360);Object.defineProperty(t,"materialize",{enumerable:!0,get:function(){return Z.materialize}});var K=r(1415);Object.defineProperty(t,"max",{enumerable:!0,get:function(){return K.max}});var $=r(361);Object.defineProperty(t,"merge",{enumerable:!0,get:function(){return $.merge}});var Q=r(7302);Object.defineProperty(t,"mergeAll",{enumerable:!0,get:function(){return Q.mergeAll}});var J=r(6902);Object.defineProperty(t,"flatMap",{enumerable:!0,get:function(){return J.flatMap}});var ee=r(983);Object.defineProperty(t,"mergeMap",{enumerable:!0,get:function(){return ee.mergeMap}});var te=r(6586);Object.defineProperty(t,"mergeMapTo",{enumerable:!0,get:function(){return te.mergeMapTo}});var re=r(4408);Object.defineProperty(t,"mergeScan",{enumerable:!0,get:function(){return re.mergeScan}});var ne=r(8253);Object.defineProperty(t,"mergeWith",{enumerable:!0,get:function(){return ne.mergeWith}});var oe=r(2669);Object.defineProperty(t,"min",{enumerable:!0,get:function(){return oe.min}});var ie=r(9247);Object.defineProperty(t,"multicast",{enumerable:!0,get:function(){return ie.multicast}});var ae=r(5184);Object.defineProperty(t,"observeOn",{enumerable:!0,get:function(){return ae.observeOn}});var ue=r(1226);Object.defineProperty(t,"onErrorResumeNext",{enumerable:!0,get:function(){return ue.onErrorResumeNext}});var se=r(1518);Object.defineProperty(t,"pairwise",{enumerable:!0,get:function(){return se.pairwise}});var ce=r(2171);Object.defineProperty(t,"partition",{enumerable:!0,get:function(){return ce.partition}});var le=r(4912);Object.defineProperty(t,"pluck",{enumerable:!0,get:function(){return le.pluck}});var fe=r(766);Object.defineProperty(t,"publish",{enumerable:!0,get:function(){return fe.publish}});var he=r(7220);Object.defineProperty(t,"publishBehavior",{enumerable:!0,get:function(){return he.publishBehavior}});var de=r(6106);Object.defineProperty(t,"publishLast",{enumerable:!0,get:function(){return de.publishLast}});var pe=r(8157);Object.defineProperty(t,"publishReplay",{enumerable:!0,get:function(){return pe.publishReplay}});var ve=r(4440);Object.defineProperty(t,"race",{enumerable:!0,get:function(){return ve.race}});var ye=r(5600);Object.defineProperty(t,"raceWith",{enumerable:!0,get:function(){return ye.raceWith}});var be=r(9139);Object.defineProperty(t,"reduce",{enumerable:!0,get:function(){return be.reduce}});var me=r(8522);Object.defineProperty(t,"repeat",{enumerable:!0,get:function(){return me.repeat}});var ge=r(6566);Object.defineProperty(t,"repeatWhen",{enumerable:!0,get:function(){return ge.repeatWhen}});var _e=r(7835);Object.defineProperty(t,"retry",{enumerable:!0,get:function(){return _e.retry}});var we=r(9843);Object.defineProperty(t,"retryWhen",{enumerable:!0,get:function(){return we.retryWhen}});var Oe=r(7561);Object.defineProperty(t,"refCount",{enumerable:!0,get:function(){return Oe.refCount}});var Se=r(1731);Object.defineProperty(t,"sample",{enumerable:!0,get:function(){return Se.sample}});var Ee=r(6086);Object.defineProperty(t,"sampleTime",{enumerable:!0,get:function(){return Ee.sampleTime}});var Pe=r(8624);Object.defineProperty(t,"scan",{enumerable:!0,get:function(){return Pe.scan}});var xe=r(582);Object.defineProperty(t,"sequenceEqual",{enumerable:!0,get:function(){return xe.sequenceEqual}});var Te=r(8977);Object.defineProperty(t,"share",{enumerable:!0,get:function(){return Te.share}});var je=r(3133);Object.defineProperty(t,"shareReplay",{enumerable:!0,get:function(){return je.shareReplay}});var Ce=r(3001);Object.defineProperty(t,"single",{enumerable:!0,get:function(){return Ce.single}});var Ae=r(3982);Object.defineProperty(t,"skip",{enumerable:!0,get:function(){return Ae.skip}});var ke=r(9098);Object.defineProperty(t,"skipLast",{enumerable:!0,get:function(){return ke.skipLast}});var Re=r(7372);Object.defineProperty(t,"skipUntil",{enumerable:!0,get:function(){return Re.skipUntil}});var Ie=r(4721);Object.defineProperty(t,"skipWhile",{enumerable:!0,get:function(){return Ie.skipWhile}});var Me=r(269);Object.defineProperty(t,"startWith",{enumerable:!0,get:function(){return Me.startWith}});var Ne=r(8960);Object.defineProperty(t,"subscribeOn",{enumerable:!0,get:function(){return Ne.subscribeOn}});var De=r(8774);Object.defineProperty(t,"switchAll",{enumerable:!0,get:function(){return De.switchAll}});var Le=r(3879);Object.defineProperty(t,"switchMap",{enumerable:!0,get:function(){return Le.switchMap}});var Ue=r(3274);Object.defineProperty(t,"switchMapTo",{enumerable:!0,get:function(){return Ue.switchMapTo}});var Fe=r(8712);Object.defineProperty(t,"switchScan",{enumerable:!0,get:function(){return Fe.switchScan}});var Be=r(846);Object.defineProperty(t,"take",{enumerable:!0,get:function(){return Be.take}});var ze=r(8330);Object.defineProperty(t,"takeLast",{enumerable:!0,get:function(){return ze.takeLast}});var Ve=r(4780);Object.defineProperty(t,"takeUntil",{enumerable:!0,get:function(){return Ve.takeUntil}});var We=r(2129);Object.defineProperty(t,"takeWhile",{enumerable:!0,get:function(){return We.takeWhile}});var Ge=r(3964);Object.defineProperty(t,"tap",{enumerable:!0,get:function(){return Ge.tap}});var qe=r(8941);Object.defineProperty(t,"throttle",{enumerable:!0,get:function(){return qe.throttle}});var He=r(7640);Object.defineProperty(t,"throttleTime",{enumerable:!0,get:function(){return He.throttleTime}});var Ye=r(4869);Object.defineProperty(t,"throwIfEmpty",{enumerable:!0,get:function(){return Ye.throwIfEmpty}});var Xe=r(489);Object.defineProperty(t,"timeInterval",{enumerable:!0,get:function(){return Xe.timeInterval}});var Ze=r(1554);Object.defineProperty(t,"timeout",{enumerable:!0,get:function(){return Ze.timeout}});var Ke=r(4862);Object.defineProperty(t,"timeoutWith",{enumerable:!0,get:function(){return Ke.timeoutWith}});var $e=r(6505);Object.defineProperty(t,"timestamp",{enumerable:!0,get:function(){return $e.timestamp}});var Qe=r(2343);Object.defineProperty(t,"toArray",{enumerable:!0,get:function(){return Qe.toArray}});var Je=r(5477);Object.defineProperty(t,"window",{enumerable:!0,get:function(){return Je.window}});var et=r(6746);Object.defineProperty(t,"windowCount",{enumerable:!0,get:function(){return et.windowCount}});var tt=r(8208);Object.defineProperty(t,"windowTime",{enumerable:!0,get:function(){return tt.windowTime}});var rt=r(6637);Object.defineProperty(t,"windowToggle",{enumerable:!0,get:function(){return rt.windowToggle}});var nt=r(1141);Object.defineProperty(t,"windowWhen",{enumerable:!0,get:function(){return nt.windowWhen}});var ot=r(5442);Object.defineProperty(t,"withLatestFrom",{enumerable:!0,get:function(){return ot.withLatestFrom}});var it=r(5918);Object.defineProperty(t,"zip",{enumerable:!0,get:function(){return it.zip}});var at=r(187);Object.defineProperty(t,"zipAll",{enumerable:!0,get:function(){return at.zipAll}});var ut=r(8538);Object.defineProperty(t,"zipWith",{enumerable:!0,get:function(){return ut.zipWith}})},5636:(e,t,r)=>{var n=r(1048),o=n.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return o(e,t,r)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=a),a.prototype=Object.create(o.prototype),i(o,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=o(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},9975:(e,t,r)=>{var n=r(7101),o=Array.prototype.concat,i=Array.prototype.slice,a=e.exports=function(e){for(var t=[],r=0,a=e.length;r<a;r++){var u=e[r];n(u)?t=o.call(t,i.call(u)):t.push(u)}return t};a.wrap=function(e){return function(){return e(a(arguments))}}},7101:e=>{e.exports=function(e){return!(!e||"string"==typeof e)&&(e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&"String"!==e.constructor.name))}},8888:(e,t,r)=>{var n=r(5636).Buffer,o=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===o||!o(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=s,this.end=c,t=4;break;case"utf8":this.fillLast=u,t=4;break;case"base64":this.text=l,this.end=f,t=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function u(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function s(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.StringDecoder=i,i.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},i.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},i.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var o=a(t[n]);return o>=0?(o>0&&(e.lastNeed=o-1),o):--n<r||-2===o?0:(o=a(t[n]))>=0?(o>0&&(e.lastNeed=o-2),o):--n<r||-2===o?0:(o=a(t[n]))>=0?(o>0&&(2===o?o=0:e.lastNeed=o-3),o):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},8716:t=>{t.exports=e}},n={};function o(e){var t=n[e];if(void 0!==t)return t.exports;var i=n[e]={id:e,loaded:!1,exports:{}};return r[e].call(i.exports,i,i.exports,o),i.loaded=!0,i.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var i={};(()=>{o.d(i,{RL:()=>Lo,wK:()=>sa,x_:()=>fa,lv:()=>la,YQ:()=>ca,BP:()=>Lf,GZ:()=>Gf,Vw:()=>ha,Ay:()=>qf,_G:()=>zu,h4:()=>Hl});var e=o(5250);function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function a(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:String(t)}var u=["onLayoutDone","onLayoutStep","onError","onLayoutComputing","onWebGLContextLost","onZoomTransitionDone","restart"],s=function(){function e(){var t,r,n,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=this,n=void 0,(r=a(r="callbacks"))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,this.callbacks=o}var t,r;return t=e,r=[{key:"onZoomTransitionDone",value:function(){this.isValidFunction(this.callbacks.onZoomTransitionDone)&&this.callbacks.onZoomTransitionDone()}},{key:"onLayoutDone",value:function(){this.isValidFunction(this.callbacks.onLayoutDone)&&this.callbacks.onLayoutDone()}},{key:"onLayoutStep",value:function(e){this.isValidFunction(this.callbacks.onLayoutStep)&&this.callbacks.onLayoutStep(e)}},{key:"onLayoutComputing",value:function(e){this.isValidFunction(this.callbacks.onLayoutComputing)&&this.callbacks.onLayoutComputing(e)}},{key:"onError",value:function(e){this.isValidFunction(this.callbacks.onError)&&this.callbacks.onError(e)}},{key:"onWebGLContextLost",value:function(e){this.isValidFunction(this.callbacks.onWebGLContextLost)&&this.callbacks.onWebGLContextLost(e)}},{key:"isValidFunction",value:function(e){return void 0!==e&&"function"==typeof e}}],r&&n(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};function l(e,t){function r(){this.constructor=e}c(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var f=function(){function e(e){void 0===e&&(e="Atom@"+rt()),this.name=e,this.isPendingUnobservation=!0,this.observers=[],this.observersIndexes={},this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=Et.NOT_TRACKING}return e.prototype.onBecomeUnobserved=function(){},e.prototype.reportObserved=function(){qt(this)},e.prototype.reportChanged=function(){Wt(),function(e){if(e.lowestObserverState!==Et.STALE){e.lowestObserverState=Et.STALE;for(var t=e.observers,r=t.length;r--;){var n=t[r];n.dependenciesState===Et.UP_TO_DATE&&(n.isTracing!==Pt.NONE&&Ht(n,e),n.onBecomeStale()),n.dependenciesState=Et.STALE}}}(this),Gt()},e.prototype.toString=function(){return this.name},e}(),h=function(e){function t(t,r,n){void 0===t&&(t="Atom@"+rt()),void 0===r&&(r=st),void 0===n&&(n=st);var o=e.call(this,t)||this;return o.name=t,o.onBecomeObservedHandler=r,o.onBecomeUnobservedHandler=n,o.isPendingUnobservation=!1,o.isBeingTracked=!1,o}return l(t,e),t.prototype.reportObserved=function(){return Wt(),e.prototype.reportObserved.call(this),this.isBeingTracked||(this.isBeingTracked=!0,this.onBecomeObservedHandler()),Gt(),!!jt.trackingDerivation},t.prototype.onBecomeUnobserved=function(){this.isBeingTracked=!1,this.onBecomeUnobservedHandler()},t}(f),d=_t("Atom",f);function p(e){return e.interceptors&&e.interceptors.length>0}function v(e,t){var r=e.interceptors||(e.interceptors=[]);return r.push(t),ut((function(){var e=r.indexOf(t);-1!==e&&r.splice(e,1)}))}function y(e,t){var r=rr();try{var n=e.interceptors;if(n)for(var o=0,i=n.length;o<i&&(ot(!(t=n[o](t))||t.type,"Intercept handlers should return nothing or a change object"),t);o++);return t}finally{nr(r)}}function b(e){return e.changeListeners&&e.changeListeners.length>0}function m(e,t){var r=e.changeListeners||(e.changeListeners=[]);return r.push(t),ut((function(){var e=r.indexOf(t);-1!==e&&r.splice(e,1)}))}function g(e,t){var r=rr(),n=e.changeListeners;if(n){for(var o=0,i=(n=n.slice()).length;o<i;o++)n[o](t);nr(r)}}function _(){return!!jt.spyListeners.length}function w(e){if(jt.spyListeners.length)for(var t=jt.spyListeners,r=0,n=t.length;r<n;r++)t[r](e)}function O(e){w(dt({},e,{spyReportStart:!0}))}var S={spyReportEnd:!0};function E(e){w(e?dt({},e,S):S)}function P(e){return jt.spyListeners.push(e),ut((function(){var t=jt.spyListeners.indexOf(e);-1!==t&&jt.spyListeners.splice(t,1)}))}var x="__$$iterating";function T(e){ot(!0!==e[x],"Illegal state: cannot recycle array as iterator"),bt(e,x,!0);var t=-1;return bt(e,"next",(function(){return{done:++t>=this.length,value:t<this.length?this[t]:void 0}})),e}function j(e,t){bt(e,"function"==typeof Symbol&&Symbol.iterator||"@@iterator",t)}var C,A,k=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,!1===e}(),R=0,I=function(){};C=I,A=Array.prototype,void 0!==Object.setPrototypeOf?Object.setPrototypeOf(C.prototype,A):void 0!==C.prototype.__proto__?C.prototype.__proto__=A:C.prototype=A,Object.isFrozen(Array)&&["constructor","push","shift","concat","pop","unshift","replace","find","findIndex","splice","reverse","sort"].forEach((function(e){Object.defineProperty(I.prototype,e,{configurable:!0,writable:!0,value:Array.prototype[e]})}));var M=function(){function e(e,t,r,n){this.array=r,this.owned=n,this.values=[],this.lastKnownLength=0,this.interceptors=null,this.changeListeners=null,this.atom=new f(e||"ObservableArray@"+rt()),this.enhancer=function(r,n){return t(r,n,e+"[..]")}}return e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.dehanceValues=function(e){return void 0!==this.dehancer?e.map(this.dehancer):e},e.prototype.intercept=function(e){return v(this,e)},e.prototype.observe=function(e,t){return void 0===t&&(t=!1),t&&e({object:this.array,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),m(this,e)},e.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},e.prototype.setArrayLength=function(e){if("number"!=typeof e||e<0)throw new Error("[mobx.array] Out of range: "+e);var t=this.values.length;if(e!==t)if(e>t){for(var r=new Array(e-t),n=0;n<e-t;n++)r[n]=void 0;this.spliceWithArray(t,0,r)}else this.spliceWithArray(e,t-e)},e.prototype.updateArrayLength=function(e,t){if(e!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?");this.lastKnownLength+=t,t>0&&e+t+1>R&&F(e+t+1)},e.prototype.spliceWithArray=function(e,t,r){var n=this;Qt(this.atom);var o=this.values.length;if(void 0===e?e=0:e>o?e=o:e<0&&(e=Math.max(0,o+e)),t=1===arguments.length?o-e:null==t?0:Math.max(0,Math.min(t,o-e)),void 0===r&&(r=[]),p(this)){var i=y(this,{object:this.array,type:"splice",index:e,removedCount:t,added:r});if(!i)return et;t=i.removedCount,r=i.added}var a=(r=r.map((function(e){return n.enhancer(e,void 0)}))).length-t;this.updateArrayLength(o,a);var u=this.spliceItemsIntoValues(e,t,r);return 0===t&&0===r.length||this.notifyArraySplice(e,r,u),this.dehanceValues(u)},e.prototype.spliceItemsIntoValues=function(e,t,r){if(r.length<1e4)return(n=this.values).splice.apply(n,[e,t].concat(r));var n,o=this.values.slice(e,e+t);return this.values=this.values.slice(0,e).concat(r,this.values.slice(e+t)),o},e.prototype.notifyArrayChildUpdate=function(e,t,r){var n=!this.owned&&_(),o=b(this),i=o||n?{object:this.array,type:"update",index:e,newValue:t,oldValue:r}:null;n&&O(i),this.atom.reportChanged(),o&&g(this,i),n&&E()},e.prototype.notifyArraySplice=function(e,t,r){var n=!this.owned&&_(),o=b(this),i=o||n?{object:this.array,type:"splice",index:e,removed:r,added:t,removedCount:r.length,addedCount:t.length}:null;n&&O(i),this.atom.reportChanged(),o&&g(this,i),n&&E()},e}(),N=function(e){function t(t,r,n,o){void 0===n&&(n="ObservableArray@"+rt()),void 0===o&&(o=!1);var i=e.call(this)||this,a=new M(n,r,i,o);return bt(i,"$mobx",a),t&&t.length&&i.spliceWithArray(0,0,t),k&&Object.defineProperty(a.array,"0",D),i}return l(t,e),t.prototype.intercept=function(e){return this.$mobx.intercept(e)},t.prototype.observe=function(e,t){return void 0===t&&(t=!1),this.$mobx.observe(e,t)},t.prototype.clear=function(){return this.splice(0)},t.prototype.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.$mobx.atom.reportObserved(),Array.prototype.concat.apply(this.peek(),e.map((function(e){return z(e)?e.peek():e})))},t.prototype.replace=function(e){return this.$mobx.spliceWithArray(0,this.$mobx.values.length,e)},t.prototype.toJS=function(){return this.slice()},t.prototype.toJSON=function(){return this.toJS()},t.prototype.peek=function(){return this.$mobx.atom.reportObserved(),this.$mobx.dehanceValues(this.$mobx.values)},t.prototype.find=function(e,t,r){void 0===r&&(r=0);var n=this.findIndex.apply(this,arguments);return-1===n?void 0:this.get(n)},t.prototype.findIndex=function(e,t,r){void 0===r&&(r=0);for(var n=this.peek(),o=n.length,i=r;i<o;i++)if(e.call(t,n[i],i,this))return i;return-1},t.prototype.splice=function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];switch(arguments.length){case 0:return[];case 1:return this.$mobx.spliceWithArray(e);case 2:return this.$mobx.spliceWithArray(e,t)}return this.$mobx.spliceWithArray(e,t,r)},t.prototype.spliceWithArray=function(e,t,r){return this.$mobx.spliceWithArray(e,t,r)},t.prototype.push=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=this.$mobx;return r.spliceWithArray(r.values.length,0,e),r.values.length},t.prototype.pop=function(){return this.splice(Math.max(this.$mobx.values.length-1,0),1)[0]},t.prototype.shift=function(){return this.splice(0,1)[0]},t.prototype.unshift=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=this.$mobx;return r.spliceWithArray(0,0,e),r.values.length},t.prototype.reverse=function(){var e=this.slice();return e.reverse.apply(e,arguments)},t.prototype.sort=function(e){var t=this.slice();return t.sort.apply(t,arguments)},t.prototype.remove=function(e){var t=this.$mobx.dehanceValues(this.$mobx.values).indexOf(e);return t>-1&&(this.splice(t,1),!0)},t.prototype.move=function(e,t){function r(e){if(e<0)throw new Error("[mobx.array] Index out of bounds: "+e+" is negative");var t=this.$mobx.values.length;if(e>=t)throw new Error("[mobx.array] Index out of bounds: "+e+" is not smaller than "+t)}if(r.call(this,e),r.call(this,t),e!==t){var n,o=this.$mobx.values;n=e<t?o.slice(0,e).concat(o.slice(e+1,t+1),[o[e]],o.slice(t+1)):o.slice(0,t).concat([o[e]],o.slice(t,e),o.slice(e+1)),this.replace(n)}},t.prototype.get=function(e){var t=this.$mobx;if(t){if(e<t.values.length)return t.atom.reportObserved(),t.dehanceValue(t.values[e]);console.warn("[mobx.array] Attempt to read an array index ("+e+") that is out of bounds ("+t.values.length+"). Please check length first. Out of bound indices will not be tracked by MobX")}},t.prototype.set=function(e,t){var r=this.$mobx,n=r.values;if(e<n.length){Qt(r.atom);var o=n[e];if(p(r)){var i=y(r,{type:"update",object:this,index:e,newValue:t});if(!i)return;t=i.newValue}(t=r.enhancer(t,o))!==o&&(n[e]=t,r.notifyArrayChildUpdate(e,t,o))}else{if(e!==n.length)throw new Error("[mobx.array] Index out of bounds, "+e+" is larger than "+n.length);r.spliceWithArray(e,0,[t])}},t}(I);j(N.prototype,(function(){return T(this.slice())})),Object.defineProperty(N.prototype,"length",{enumerable:!1,configurable:!0,get:function(){return this.$mobx.getArrayLength()},set:function(e){this.$mobx.setArrayLength(e)}}),["every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some","toString","toLocaleString"].forEach((function(e){var t=Array.prototype[e];ot("function"==typeof t,"Base function not defined on Array prototype: '"+e+"'"),yt(N.prototype,e,(function(){return t.apply(this.peek(),arguments)}))})),function(e,t){for(var r=0;r<t.length;r++)yt(e,t[r],e[t[r]])}(N.prototype,["constructor","intercept","observe","clear","concat","get","replace","toJS","toJSON","peek","find","findIndex","splice","spliceWithArray","push","pop","set","shift","unshift","reverse","sort","remove","move","toString","toLocaleString"]);var D=L(0);function L(e){return{enumerable:!1,configurable:!1,get:function(){return this.get(e)},set:function(t){this.set(e,t)}}}function U(e){Object.defineProperty(N.prototype,""+e,L(e))}function F(e){for(var t=R;t<e;t++)U(t);R=e}F(1e3);var B=_t("ObservableArrayAdministration",M);function z(e){return ft(e)&&B(e.$mobx)}var V={},W=function(e){function t(t,r,n,o){void 0===n&&(n="ObservableValue@"+rt()),void 0===o&&(o=!0);var i=e.call(this,n)||this;return i.enhancer=r,i.hasUnreportedChange=!1,i.dehancer=void 0,i.value=r(t,void 0,n),o&&_()&&w({type:"create",object:i,newValue:i.value}),i}return l(t,e),t.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.prototype.set=function(e){var t=this.value;if((e=this.prepareNewValue(e))!==V){var r=_();r&&O({type:"update",object:this,newValue:e,oldValue:t}),this.setNewValue(e),r&&E()}},t.prototype.prepareNewValue=function(e){if(Qt(this),p(this)){var t=y(this,{object:this,type:"update",newValue:e});if(!t)return V;e=t.newValue}return e=this.enhancer(e,this.value,this.name),this.value!==e?e:V},t.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),b(this)&&g(this,{type:"update",object:this,newValue:e,oldValue:t})},t.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},t.prototype.intercept=function(e){return v(this,e)},t.prototype.observe=function(e,t){return t&&e({object:this,type:"update",newValue:this.value,oldValue:void 0}),m(this,e)},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.value+"]"},t.prototype.valueOf=function(){return St(this.get())},t}(f);W.prototype[Ot()]=W.prototype.valueOf;var G=_t("ObservableValue",W),q={m001:"It is not allowed to assign new values to @action fields",m002:"`runInAction` expects a function",m003:"`runInAction` expects a function without arguments",m004:"autorun expects a function",m005:"Warning: attempted to pass an action to autorun. Actions are untracked and will not trigger on state changes. Use `reaction` or wrap only your state modification code in an action.",m006:"Warning: attempted to pass an action to autorunAsync. Actions are untracked and will not trigger on state changes. Use `reaction` or wrap only your state modification code in an action.",m007:"reaction only accepts 2 or 3 arguments. If migrating from MobX 2, please provide an options object",m008:"wrapping reaction expression in `asReference` is no longer supported, use options object instead",m009:"@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'. It looks like it was used on a property.",m010:"@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'",m011:"First argument to `computed` should be an expression. If using computed as decorator, don't pass it arguments",m012:"computed takes one or two arguments if used as function",m013:"[mobx.expr] 'expr' should only be used inside other reactive functions.",m014:"extendObservable expected 2 or more arguments",m015:"extendObservable expects an object as first argument",m016:"extendObservable should not be used on maps, use map.merge instead",m017:"all arguments of extendObservable should be objects",m018:"extending an object with another observable (object) is not supported. Please construct an explicit propertymap, using `toJS` if need. See issue #540",m019:"[mobx.isObservable] isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.",m020:"modifiers can only be used for individual object properties",m021:"observable expects zero or one arguments",m022:"@observable can not be used on getters, use @computed instead",m024:"whyRun() can only be used if a derivation is active, or by passing an computed value / reaction explicitly. If you invoked whyRun from inside a computation; the computation is currently suspended but re-evaluating because somebody requested its value.",m025:"whyRun can only be used on reactions and computed values",m026:"`action` can only be invoked on functions",m028:"It is not allowed to set `useStrict` when a derivation is running",m029:"INTERNAL ERROR only onBecomeUnobserved shouldn't be called twice in a row",m030a:"Since strict-mode is enabled, changing observed observable values outside actions is not allowed. Please wrap the code in an `action` if this change is intended. Tried to modify: ",m030b:"Side effects like changing state are not allowed at this point. Are you trying to modify state from, for example, the render function of a React component? Tried to modify: ",m031:"Computed values are not allowed to cause side effects by changing observables that are already being observed. Tried to modify: ",m032:"* This computation is suspended (not in use by any reaction) and won't run automatically.\n\tDidn't expect this computation to be suspended at this point?\n\t 1. Make sure this computation is used by a reaction (reaction, autorun, observer).\n\t 2. Check whether you are using this computation synchronously (in the same stack as they reaction that needs it).",m033:"`observe` doesn't support the fire immediately property for observable maps.",m034:"`mobx.map` is deprecated, use `new ObservableMap` or `mobx.observable.map` instead",m035:"Cannot make the designated object observable; it is not extensible",m036:"It is not possible to get index atoms from arrays",m037:'Hi there! I\'m sorry you have just run into an exception.\nIf your debugger ends up here, know that some reaction (like the render() of an observer component, autorun or reaction)\nthrew an exception and that mobx caught it, to avoid that it brings the rest of your application down.\nThe original cause of the exception (the code that caused this reaction to run (again)), is still in the stack.\n\nHowever, more interesting is the actual stack trace of the error itself.\nHopefully the error is an instanceof Error, because in that case you can inspect the original stack of the error from where it was thrown.\nSee `error.stack` property, or press the very subtle "(...)" link you see near the console.error message that probably brought you here.\nThat stack is more interesting than the stack of this console.error itself.\n\nIf the exception you see is an exception you created yourself, make sure to use `throw new Error("Oops")` instead of `throw "Oops"`,\nbecause the javascript environment will only preserve the original stack trace in the first form.\n\nYou can also make sure the debugger pauses the next time this very same exception is thrown by enabling "Pause on caught exception".\n(Note that it might pause on many other, unrelated exception as well).\n\nIf that all doesn\'t help you out, feel free to open an issue https://github.com/mobxjs/mobx/issues!\n',m038:"Missing items in this list?\n 1. Check whether all used values are properly marked as observable (use isObservable to verify)\n 2. Make sure you didn't dereference values too early. MobX observes props, not primitives. E.g: use 'person.name' instead of 'name' in your computation.\n"};function H(e){return q[e]}function Y(e,t){ot("function"==typeof t,H("m026")),ot("string"==typeof e&&e.length>0,"actions should have valid names, got: '"+e+"'");var r=function(){return X(e,t,this,arguments)};return r.originalFn=t,r.isMobxAction=!0,r}function X(e,t,r,n){var o=function(e,t,r,n){var o=_()&&!!e,i=0;if(o){i=Date.now();var a=n&&n.length||0,u=new Array(a);if(a>0)for(var s=0;s<a;s++)u[s]=n[s];O({type:"action",name:e,fn:t,object:r,arguments:u})}var c=rr();return Wt(),{prevDerivation:c,prevAllowStateChanges:K(!0),notifySpy:o,startTime:i}}(e,t,r,n);try{return t.apply(r,n)}finally{!function(e){$(e.prevAllowStateChanges),Gt(),nr(e.prevDerivation),e.notifySpy&&E({time:Date.now()-e.startTime})}(o)}}function Z(e){ot(null===jt.trackingDerivation,H("m028")),jt.strictMode=e,jt.allowStateChanges=!e}function K(e){var t=jt.allowStateChanges;return jt.allowStateChanges=e,t}function $(e){jt.allowStateChanges=e}function Q(e,t,r,n,o){function i(i,a,u,s,c){if(void 0===c&&(c=0),ot(o||te(arguments),"This function is a decorator, but it wasn't invoked like a decorator"),u){vt(i,"__mobxLazyInitializers")||yt(i,"__mobxLazyInitializers",i.__mobxLazyInitializers&&i.__mobxLazyInitializers.slice()||[]);var l=u.value,f=u.initializer;return i.__mobxLazyInitializers.push((function(t){e(t,a,f?f.call(t):l,s,u)})),{enumerable:n,configurable:!0,get:function(){return!0!==this.__mobxDidRunLazyInitializers&&ee(this),t.call(this,a)},set:function(e){!0!==this.__mobxDidRunLazyInitializers&&ee(this),r.call(this,a,e)}}}var h={enumerable:n,configurable:!0,get:function(){return this.__mobxInitializedProps&&!0===this.__mobxInitializedProps[a]||J(this,a,void 0,e,s,u),t.call(this,a)},set:function(t){this.__mobxInitializedProps&&!0===this.__mobxInitializedProps[a]?r.call(this,a,t):J(this,a,t,e,s,u)}};return(arguments.length<3||5===arguments.length&&c<3)&&Object.defineProperty(i,a,h),h}return o?function(){if(te(arguments))return i.apply(null,arguments);var e=arguments,t=arguments.length;return function(r,n,o){return i(r,n,o,e,t)}}:i}function J(e,t,r,n,o,i){vt(e,"__mobxInitializedProps")||yt(e,"__mobxInitializedProps",{}),e.__mobxInitializedProps[t]=!0,n(e,t,r,o,i)}function ee(e){!0!==e.__mobxDidRunLazyInitializers&&e.__mobxLazyInitializers&&(yt(e,"__mobxDidRunLazyInitializers",!0),e.__mobxDidRunLazyInitializers&&e.__mobxLazyInitializers.forEach((function(t){return t(e)})))}function te(e){return(2===e.length||3===e.length)&&"string"==typeof e[1]}var re=Q((function(e,t,r,n,o){var i=n&&1===n.length?n[0]:r.name||t||"<unnamed action>";yt(e,t,oe(i,r))}),(function(e){return this[e]}),(function(){ot(!1,H("m001"))}),!1,!0),ne=Q((function(e,t,r){ue(e,t,r)}),(function(e){return this[e]}),(function(){ot(!1,H("m001"))}),!1,!1),oe=function(e,t,r,n){return 1===arguments.length&&"function"==typeof e?Y(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof t?Y(e,t):1===arguments.length&&"string"==typeof e?ie(e):ie(t).apply(null,arguments)};function ie(e){return function(t,r,n){if(n&&"function"==typeof n.value)return n.value=Y(e,n.value),n.enumerable=!1,n.configurable=!0,n;if(void 0!==n&&void 0!==n.get)throw new Error("[mobx] action is not expected to be used with getters");return re(e).apply(this,arguments)}}function ae(e){return"function"==typeof e&&!0===e.isMobxAction}function ue(e,t,r){var n=function(){return X(t,r,e,arguments)};n.isMobxAction=!0,yt(e,t,n)}oe.bound=function(e,t,r){if("function"==typeof e){var n=Y("<not yet bound action>",e);return n.autoBind=!0,n}return ne.apply(null,arguments)};var se=Object.prototype.toString;function ce(e,t){return le(e,t)}function le(e,t,r,n){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var o=typeof e;return("function"===o||"object"===o||"object"==typeof t)&&function(e,t,r,n){e=fe(e),t=fe(t);var o=se.call(e);if(o!==se.call(t))return!1;switch(o){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t)}var i="[object Array]"===o;if(!i){if("object"!=typeof e||"object"!=typeof t)return!1;var a=e.constructor,u=t.constructor;if(a!==u&&!("function"==typeof a&&a instanceof a&&"function"==typeof u&&u instanceof u)&&"constructor"in e&&"constructor"in t)return!1}n=n||[];for(var s=(r=r||[]).length;s--;)if(r[s]===e)return n[s]===t;if(r.push(e),n.push(t),i){if((s=e.length)!==t.length)return!1;for(;s--;)if(!le(e[s],t[s],r,n))return!1}else{var c,l=Object.keys(e);if(s=l.length,Object.keys(t).length!==s)return!1;for(;s--;)if(!he(t,c=l[s])||!le(e[c],t[c],r,n))return!1}return r.pop(),n.pop(),!0}(e,t,r,n)}function fe(e){return z(e)?e.peek():Je(e)?e.entries():wt(e)?function(e){for(var t=[];;){var r=e.next();if(r.done)break;t.push(r.value)}return t}(e.entries()):e}function he(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function de(e,t){return e===t}var pe={identity:de,structural:function(e,t){return ce(e,t)},default:function(e,t){return function(e,t){return"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)}(e,t)||de(e,t)}};function ve(e,t,r){var n,o,i;"string"==typeof e?(n=e,o=t,i=r):(n=e.name||"Autorun@"+rt(),o=e,i=t),ot("function"==typeof o,H("m004")),ot(!1===ae(o),H("m005")),i&&(o=o.bind(i));var a=new ur(n,(function(){this.track(u)}));function u(){o(a)}return a.schedule(),a.getDisposer()}function ye(e,t,r){var n;arguments.length>3&&nt(H("m007")),We(e)&&nt(H("m008")),(n="object"==typeof r?r:{}).name=n.name||e.name||t.name||"Reaction@"+rt(),n.fireImmediately=!0===r||!0===n.fireImmediately,n.delay=n.delay||0,n.compareStructural=n.compareStructural||n.struct||!1,t=oe(n.name,n.context?t.bind(n.context):t),n.context&&(e=e.bind(n.context));var o,i=!0,a=!1,u=n.equals?n.equals:n.compareStructural||n.struct?pe.structural:pe.default,s=new ur(n.name,(function(){i||n.delay<1?c():a||(a=!0,setTimeout((function(){a=!1,c()}),n.delay))}));function c(){if(!s.isDisposed){var r=!1;s.track((function(){var t=e(s);r=i||!u(o,t),o=t})),i&&n.fireImmediately&&t(o,s),i||!0!==r||t(o,s),i&&(i=!1)}}return s.schedule(),s.getDisposer()}var be=function(){function e(e,t,r,n,o){this.derivation=e,this.scope=t,this.equals=r,this.dependenciesState=Et.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isPendingUnobservation=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=Et.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+rt(),this.value=new Xt(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=Pt.NONE,this.name=n||"ComputedValue@"+rt(),o&&(this.setter=Y(n+"-setter",o))}return e.prototype.onBecomeStale=function(){!function(e){if(e.lowestObserverState===Et.UP_TO_DATE){e.lowestObserverState=Et.POSSIBLY_STALE;for(var t=e.observers,r=t.length;r--;){var n=t[r];n.dependenciesState===Et.UP_TO_DATE&&(n.dependenciesState=Et.POSSIBLY_STALE,n.isTracing!==Pt.NONE&&Ht(n,e),n.onBecomeStale())}}}(this)},e.prototype.onBecomeUnobserved=function(){er(this),this.value=void 0},e.prototype.get=function(){ot(!this.isComputing,"Cycle detected in computation "+this.name,this.derivation),0===jt.inBatch?(Wt(),Kt(this)&&(this.isTracing!==Pt.NONE&&console.log("[mobx.trace] '"+this.name+"' is being read outside a reactive context and doing a full recompute"),this.value=this.computeValue(!1)),Gt()):(qt(this),Kt(this)&&this.trackAndCompute()&&function(e){if(e.lowestObserverState!==Et.STALE){e.lowestObserverState=Et.STALE;for(var t=e.observers,r=t.length;r--;){var n=t[r];n.dependenciesState===Et.POSSIBLY_STALE?n.dependenciesState=Et.STALE:n.dependenciesState===Et.UP_TO_DATE&&(e.lowestObserverState=Et.UP_TO_DATE)}}}(this));var e=this.value;if(Zt(e))throw e.cause;return e},e.prototype.peek=function(){var e=this.computeValue(!1);if(Zt(e))throw e.cause;return e},e.prototype.set=function(e){if(this.setter){ot(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,e)}finally{this.isRunningSetter=!1}}else ot(!1,"[ComputedValue '"+this.name+"'] It is not possible to assign a new value to a computed value.")},e.prototype.trackAndCompute=function(){_()&&w({object:this.scope,type:"compute",fn:this.derivation});var e=this.value,t=this.dependenciesState===Et.NOT_TRACKING,r=this.value=this.computeValue(!0);return t||Zt(e)||Zt(r)||!this.equals(e,r)},e.prototype.computeValue=function(e){var t;if(this.isComputing=!0,jt.computationDepth++,e)t=Jt(this,this.derivation,this.scope);else try{t=this.derivation.call(this.scope)}catch(e){t=new Xt(e)}return jt.computationDepth--,this.isComputing=!1,t},e.prototype.observe=function(e,t){var r=this,n=!0,o=void 0;return ve((function(){var i=r.get();if(!n||t){var a=rr();e({type:"update",object:r,newValue:i,oldValue:o}),nr(a)}n=!1,o=i}))},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},e.prototype.valueOf=function(){return St(this.get())},e.prototype.whyRun=function(){var e=Boolean(jt.trackingDerivation),t=ct(this.isComputing?this.newObserving:this.observing).map((function(e){return e.name})),r=ct(Ft(this).map((function(e){return e.name})));return"\nWhyRun? computation '"+this.name+"':\n * Running because: "+(e?"[active] the value of this computation is needed by a reaction":this.isComputing?"[get] The value of this computed was requested outside a reaction":"[idle] not running at the moment")+"\n"+(this.dependenciesState===Et.NOT_TRACKING?H("m032"):" * This computation will re-run if any of the following observables changes:\n "+lt(t)+"\n "+(this.isComputing&&e?" (... or any observable accessed during the remainder of the current run)":"")+"\n "+H("m038")+"\n\n * If the outcome of this computation changes, the following observers will be re-run:\n "+lt(r)+"\n")},e}();be.prototype[Ot()]=be.prototype.valueOf;var me=_t("ComputedValue",be),ge=function(){function e(e,t){this.target=e,this.name=t,this.values={},this.changeListeners=null,this.interceptors=null}return e.prototype.observe=function(e,t){return ot(!0!==t,"`observe` doesn't support the fire immediately property for observable objects."),m(this,e)},e.prototype.intercept=function(e){return v(this,e)},e}();function _e(e,t){if(Ce(e)&&e.hasOwnProperty("$mobx"))return e.$mobx;ot(Object.isExtensible(e),H("m035")),ht(e)||(t=(e.constructor.name||"ObservableObject")+"@"+rt()),t||(t="ObservableObject@"+rt());var r=new ge(e,t);return bt(e,"$mobx",r),r}function we(e,t,r,n){if(e.values[t]&&!me(e.values[t]))return ot("value"in r,"The property "+t+" in "+e.name+" is already observable, cannot redefine it as computed property"),void(e.target[t]=r.value);if("value"in r)if(We(r.value)){var o=r.value;Oe(e,t,o.initialValue,o.enhancer)}else ae(r.value)&&!0===r.value.autoBind?ue(e.target,t,r.value.originalFn):me(r.value)?function(e,t,r){var n=e.name+"."+t;r.name=n,r.scope||(r.scope=e.target),e.values[t]=r,Object.defineProperty(e.target,t,xe(t))}(e,t,r.value):Oe(e,t,r.value,n);else Se(e,t,r.get,r.set,pe.default,!0)}function Oe(e,t,r,n){if(gt(e.target,t),p(e)){var o=y(e,{object:e.target,name:t,type:"add",newValue:r});if(!o)return;r=o.newValue}r=(e.values[t]=new W(r,n,e.name+"."+t,!1)).value,Object.defineProperty(e.target,t,function(e){return Ee[e]||(Ee[e]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.values[e].get()},set:function(t){Te(this,e,t)}})}(t)),function(e,t,r,n){var o=b(e),i=_(),a=o||i?{type:"add",object:t,name:r,newValue:n}:null;i&&O(a),o&&g(e,a),i&&E()}(e,e.target,t,r)}function Se(e,t,r,n,o,i){i&&gt(e.target,t),e.values[t]=new be(r,e.target,o,e.name+"."+t,n),i&&Object.defineProperty(e.target,t,xe(t))}var Ee={},Pe={};function xe(e){return Pe[e]||(Pe[e]={configurable:!0,enumerable:!1,get:function(){return this.$mobx.values[e].get()},set:function(t){return this.$mobx.values[e].set(t)}})}function Te(e,t,r){var n=e.$mobx,o=n.values[t];if(p(n)){if(!(u=y(n,{type:"update",object:e,name:t,newValue:r})))return;r=u.newValue}if((r=o.prepareNewValue(r))!==V){var i=b(n),a=_(),u=i||a?{type:"update",object:e,oldValue:o.value,name:t,newValue:r}:null;a&&O(u),o.setNewValue(r),i&&g(n,u),a&&E()}}var je=_t("ObservableObjectAdministration",ge);function Ce(e){return!!ft(e)&&(ee(e),je(e.$mobx))}function Ae(e,t){if(null==e)return!1;if(void 0!==t){if(z(e)||Je(e))throw new Error(H("m019"));if(Ce(e)){var r=e.$mobx;return r.values&&!!r.values[t]}return!1}return Ce(e)||!!e.$mobx||d(e)||dr(e)||me(e)}function ke(e){return ot(!!e,":("),Q((function(t,r,n,o,i){gt(t,r),ot(!i||!i.get,H("m022")),Oe(_e(t,void 0),r,n,e)}),(function(e){var t=this.$mobx.values[e];if(void 0!==t)return t.get()}),(function(e,t){Te(this,e,t)}),!0,!1)}function Re(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return Me(e,qe,t)}function Ie(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return Me(e,Ye,t)}function Me(e,t,r){ot(arguments.length>=2,H("m014")),ot("object"==typeof e,H("m015")),ot(!Je(e),H("m016")),r.forEach((function(e){ot("object"==typeof e,H("m017")),ot(!Ae(e),H("m018"))}));for(var n=_e(e),o={},i=r.length-1;i>=0;i--){var a=r[i];for(var u in a)if(!0!==o[u]&&vt(a,u)){if(o[u]=!0,e===a&&!mt(e,u))continue;we(n,u,Object.getOwnPropertyDescriptor(a,u),t)}}return e}var Ne=ke(qe),De=ke(He),Le=ke(Ye),Ue=ke(Xe),Fe=ke(Ze),Be={box:function(e,t){return arguments.length>2&&Ve("box"),new W(e,qe,t)},shallowBox:function(e,t){return arguments.length>2&&Ve("shallowBox"),new W(e,Ye,t)},array:function(e,t){return arguments.length>2&&Ve("array"),new N(e,qe,t)},shallowArray:function(e,t){return arguments.length>2&&Ve("shallowArray"),new N(e,Ye,t)},map:function(e,t){return arguments.length>2&&Ve("map"),new Qe(e,qe,t)},shallowMap:function(e,t){return arguments.length>2&&Ve("shallowMap"),new Qe(e,Ye,t)},object:function(e,t){arguments.length>2&&Ve("object");var r={};return _e(r,t),Re(r,e),r},shallowObject:function(e,t){arguments.length>2&&Ve("shallowObject");var r={};return _e(r,t),Ie(r,e),r},ref:function(){return arguments.length<2?Ge(Ye,arguments[0]):Le.apply(null,arguments)},shallow:function(){return arguments.length<2?Ge(He,arguments[0]):De.apply(null,arguments)},deep:function(){return arguments.length<2?Ge(qe,arguments[0]):Ne.apply(null,arguments)},struct:function(){return arguments.length<2?Ge(Xe,arguments[0]):Ue.apply(null,arguments)}},ze=function(e){if(void 0===e&&(e=void 0),"string"==typeof arguments[1])return Ne.apply(null,arguments);if(ot(arguments.length<=1,H("m021")),ot(!We(e),H("m020")),Ae(e))return e;var t=qe(e,0,void 0);return t!==e?t:ze.box(e)};function Ve(e){nt("Expected one or two arguments to observable."+e+". Did you accidentally try to use observable."+e+" as decorator?")}function We(e){return"object"==typeof e&&null!==e&&!0===e.isMobxModifierDescriptor}function Ge(e,t){return ot(!We(t),"Modifiers cannot be nested"),{isMobxModifierDescriptor:!0,initialValue:t,enhancer:e}}function qe(e,t,r){return We(e)&&nt("You tried to assign a modifier wrapped value to a collection, please define modifiers when creating the collection, not when modifying it"),Ae(e)?e:Array.isArray(e)?ze.array(e,r):ht(e)?ze.object(e,r):wt(e)?ze.map(e,r):e}function He(e,t,r){return We(e)&&nt("You tried to assign a modifier wrapped value to a collection, please define modifiers when creating the collection, not when modifying it"),null==e||Ce(e)||z(e)||Je(e)?e:Array.isArray(e)?ze.shallowArray(e,r):ht(e)?ze.shallowObject(e,r):wt(e)?ze.shallowMap(e,r):nt("The shallow modifier / decorator can only used in combination with arrays, objects and maps")}function Ye(e){return e}function Xe(e,t,r){if(ce(e,t))return t;if(Ae(e))return e;if(Array.isArray(e))return new N(e,Xe,r);if(wt(e))return new Qe(e,Xe,r);if(ht(e)){var n={};return _e(n,r),Me(n,Xe,[e]),n}return e}function Ze(e,t,r){return ce(e,t)?t:e}function Ke(e,t){void 0===t&&(t=void 0),Wt();try{return e.apply(t)}finally{Gt()}}Object.keys(Be).forEach((function(e){return ze[e]=Be[e]})),ze.deep.struct=ze.struct,ze.ref.struct=function(){return arguments.length<2?Ge(Ze,arguments[0]):Fe.apply(null,arguments)};var $e={},Qe=function(){function e(e,t,r){void 0===t&&(t=qe),void 0===r&&(r="ObservableMap@"+rt()),this.enhancer=t,this.name=r,this.$mobx=$e,this._data=Object.create(null),this._hasMap=Object.create(null),this._keys=new N(void 0,Ye,this.name+".keys()",!0),this.interceptors=null,this.changeListeners=null,this.dehancer=void 0,this.merge(e)}return e.prototype._has=function(e){return void 0!==this._data[e]},e.prototype.has=function(e){return!!this.isValidKey(e)&&(e=""+e,this._hasMap[e]?this._hasMap[e].get():this._updateHasMapEntry(e,!1).get())},e.prototype.set=function(e,t){this.assertValidKey(e),e=""+e;var r=this._has(e);if(p(this)){var n=y(this,{type:r?"update":"add",object:this,newValue:t,name:e});if(!n)return this;t=n.newValue}return r?this._updateValue(e,t):this._addValue(e,t),this},e.prototype.delete=function(e){var t=this;if(this.assertValidKey(e),e=""+e,p(this)&&!(o=y(this,{type:"delete",object:this,name:e})))return!1;if(this._has(e)){var r=_(),n=b(this),o=n||r?{type:"delete",object:this,oldValue:this._data[e].value,name:e}:null;return r&&O(o),Ke((function(){t._keys.remove(e),t._updateHasMapEntry(e,!1),t._data[e].setNewValue(void 0),t._data[e]=void 0})),n&&g(this,o),r&&E(),!0}return!1},e.prototype._updateHasMapEntry=function(e,t){var r=this._hasMap[e];return r?r.setNewValue(t):r=this._hasMap[e]=new W(t,Ye,this.name+"."+e+"?",!1),r},e.prototype._updateValue=function(e,t){var r=this._data[e];if((t=r.prepareNewValue(t))!==V){var n=_(),o=b(this),i=o||n?{type:"update",object:this,oldValue:r.value,name:e,newValue:t}:null;n&&O(i),r.setNewValue(t),o&&g(this,i),n&&E()}},e.prototype._addValue=function(e,t){var r=this;Ke((function(){var n=r._data[e]=new W(t,r.enhancer,r.name+"."+e,!1);t=n.value,r._updateHasMapEntry(e,!0),r._keys.push(e)}));var n=_(),o=b(this),i=o||n?{type:"add",object:this,name:e,newValue:t}:null;n&&O(i),o&&g(this,i),n&&E()},e.prototype.get=function(e){return e=""+e,this.has(e)?this.dehanceValue(this._data[e].get()):this.dehanceValue(void 0)},e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.keys=function(){return T(this._keys.slice())},e.prototype.values=function(){return T(this._keys.map(this.get,this))},e.prototype.entries=function(){var e=this;return T(this._keys.map((function(t){return[t,e.get(t)]})))},e.prototype.forEach=function(e,t){var r=this;this.keys().forEach((function(n){return e.call(t,r.get(n),n,r)}))},e.prototype.merge=function(e){var t=this;return Je(e)&&(e=e.toJS()),Ke((function(){ht(e)?Object.keys(e).forEach((function(r){return t.set(r,e[r])})):Array.isArray(e)?e.forEach((function(e){var r=e[0],n=e[1];return t.set(r,n)})):wt(e)?e.forEach((function(e,r){return t.set(r,e)})):null!=e&&nt("Cannot initialize map from "+e)})),this},e.prototype.clear=function(){var e=this;Ke((function(){tr((function(){e.keys().forEach(e.delete,e)}))}))},e.prototype.replace=function(e){var t=this;return Ke((function(){var r,n=ht(r=e)?Object.keys(r):Array.isArray(r)?r.map((function(e){return e[0]})):wt(r)?Array.from(r.keys()):Je(r)?r.keys():nt("Cannot get keys from "+r);t.keys().filter((function(e){return-1===n.indexOf(e)})).forEach((function(e){return t.delete(e)})),t.merge(e)})),this},Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.toJS=function(){var e=this,t={};return this.keys().forEach((function(r){return t[r]=e.get(r)})),t},e.prototype.toJSON=function(){return this.toJS()},e.prototype.isValidKey=function(e){return null!=e&&("string"==typeof e||"number"==typeof e||"boolean"==typeof e)},e.prototype.assertValidKey=function(e){if(!this.isValidKey(e))throw new Error("[mobx.map] Invalid key: '"+e+"', only strings, numbers and booleans are accepted as key in observable maps.")},e.prototype.toString=function(){var e=this;return this.name+"[{ "+this.keys().map((function(t){return t+": "+e.get(t)})).join(", ")+" }]"},e.prototype.observe=function(e,t){return ot(!0!==t,H("m033")),m(this,e)},e.prototype.intercept=function(e){return v(this,e)},e}();j(Qe.prototype,(function(){return this.entries()}));var Je=_t("ObservableMap",Qe),et=[];function tt(){return"undefined"!=typeof window?window:o.g}function rt(){return++jt.mobxGuid}function nt(e,t){throw ot(!1,e,t),"X"}function ot(e,t,r){if(!e)throw new Error("[mobx] Invariant failed: "+t+(r?" in '"+r+"'":""))}Object.freeze(et);var it=[];function at(e){return-1===it.indexOf(e)&&(it.push(e),console.error("[mobx] Deprecated: "+e),!0)}function ut(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var st=function(){};function ct(e){var t=[];return e.forEach((function(e){-1===t.indexOf(e)&&t.push(e)})),t}function lt(e,t,r){return void 0===t&&(t=100),void 0===r&&(r=" - "),e?e.slice(0,t).join(r)+(e.length>t?" (... and "+(e.length-t)+"more)":""):""}function ft(e){return null!==e&&"object"==typeof e}function ht(e){if(null===e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function dt(){for(var e=arguments[0],t=1,r=arguments.length;t<r;t++){var n=arguments[t];for(var o in n)vt(n,o)&&(e[o]=n[o])}return e}var pt=Object.prototype.hasOwnProperty;function vt(e,t){return pt.call(e,t)}function yt(e,t,r){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:r})}function bt(e,t,r){Object.defineProperty(e,t,{enumerable:!1,writable:!1,configurable:!0,value:r})}function mt(e,t){var r=Object.getOwnPropertyDescriptor(e,t);return!r||!1!==r.configurable&&!1!==r.writable}function gt(e,t){ot(mt(e,t),"Cannot make property '"+t+"' observable, it is not configurable and writable in the target object")}function _t(e,t){var r="isMobX"+e;return t.prototype[r]=!0,function(e){return ft(e)&&!0===e[r]}}function wt(e){return void 0!==tt().Map&&e instanceof tt().Map}function Ot(){return"function"==typeof Symbol&&Symbol.toPrimitive||"@@toPrimitive"}function St(e){return null===e?null:"object"==typeof e?""+e:e}var Et,Pt,xt=["mobxGuid","resetId","spyListeners","strictMode","runId"],Tt=function(){this.version=5,this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.strictMode=!1,this.resetId=0,this.spyListeners=[],this.globalReactionErrorHandlers=[]},jt=new Tt,Ct=!1,At=!1,kt=!1,Rt=tt();function It(e,t){if("object"==typeof e&&null!==e){if(z(e))return ot(void 0===t,H("m036")),e.$mobx.atom;if(Je(e)){var r=e;return void 0===t?It(r._keys):(ot(!!(n=r._data[t]||r._hasMap[t]),"the entry '"+t+"' does not exist in the observable map '"+Nt(e)+"'"),n)}var n;if(ee(e),t&&!e.$mobx&&e[t],Ce(e))return t?(ot(!!(n=e.$mobx.values[t]),"no observable property '"+t+"' found on the observable object '"+Nt(e)+"'"),n):nt("please specify a property");if(d(e)||me(e)||dr(e))return e}else if("function"==typeof e&&dr(e.$mobx))return e.$mobx;return nt("Cannot obtain atom from "+e)}function Mt(e,t){return ot(e,"Expecting some object"),void 0!==t?Mt(It(e,t)):d(e)||me(e)||dr(e)||Je(e)?e:(ee(e),e.$mobx?e.$mobx:void ot(!1,"Cannot obtain administration from "+e))}function Nt(e,t){return(void 0!==t?It(e,t):Ce(e)||Je(e)?Mt(e):It(e)).name}function Dt(e,t){return Lt(It(e,t))}function Lt(e){var t={name:e.name};return e.observing&&e.observing.length>0&&(t.dependencies=ct(e.observing).map(Lt)),t}function Ut(e){var t={name:e.name};return function(e){return e.observers&&e.observers.length>0}(e)&&(t.observers=Ft(e).map(Ut)),t}function Ft(e){return e.observers}function Bt(e,t){var r=e.observers.length;r&&(e.observersIndexes[t.__mapid]=r),e.observers[r]=t,e.lowestObserverState>t.dependenciesState&&(e.lowestObserverState=t.dependenciesState)}function zt(e,t){if(1===e.observers.length)e.observers.length=0,Vt(e);else{var r=e.observers,n=e.observersIndexes,o=r.pop();if(o!==t){var i=n[t.__mapid]||0;i?n[o.__mapid]=i:delete n[o.__mapid],r[i]=o}delete n[t.__mapid]}}function Vt(e){e.isPendingUnobservation||(e.isPendingUnobservation=!0,jt.pendingUnobservations.push(e))}function Wt(){jt.inBatch++}function Gt(){if(0==--jt.inBatch){fr();for(var e=jt.pendingUnobservations,t=0;t<e.length;t++){var r=e[t];r.isPendingUnobservation=!1,0===r.observers.length&&r.onBecomeUnobserved()}jt.pendingUnobservations=[]}}function qt(e){var t=jt.trackingDerivation;null!==t?t.runId!==e.lastAccessedBy&&(e.lastAccessedBy=t.runId,t.newObserving[t.unboundDepsCount++]=e):0===e.observers.length&&Vt(e)}function Ht(e,t){if(console.log("[mobx.trace] '"+e.name+"' is invalidated due to a change in: '"+t.name+"'"),e.isTracing===Pt.BREAK){var r=[];Yt(Dt(e),r,1),new Function("debugger;\n/*\nTracing '"+e.name+"'\n\nYou are entering this break point because derivation '"+e.name+"' is being traced and '"+t.name+"' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n"+(e instanceof be?e.derivation.toString():"")+"\n\nThe dependencies for this derivation are:\n\n"+r.join("\n")+"\n*/\n ")()}}function Yt(e,t,r){t.length>=1e3?t.push("(and many more)"):(t.push(""+new Array(r).join("\t")+e.name),e.dependencies&&e.dependencies.forEach((function(e){return Yt(e,t,r+1)})))}Rt.__mobxInstanceCount?(Rt.__mobxInstanceCount++,setTimeout((function(){Ct||At||kt||(kt=!0,console.warn("[mobx] Warning: there are multiple mobx instances active. This might lead to unexpected results. See https://github.com/mobxjs/mobx/issues/1082 for details."))}),1)):Rt.__mobxInstanceCount=1,function(e){e[e.NOT_TRACKING=-1]="NOT_TRACKING",e[e.UP_TO_DATE=0]="UP_TO_DATE",e[e.POSSIBLY_STALE=1]="POSSIBLY_STALE",e[e.STALE=2]="STALE"}(Et||(Et={})),function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(Pt||(Pt={}));var Xt=function(e){this.cause=e};function Zt(e){return e instanceof Xt}function Kt(e){switch(e.dependenciesState){case Et.UP_TO_DATE:return!1;case Et.NOT_TRACKING:case Et.STALE:return!0;case Et.POSSIBLY_STALE:for(var t=rr(),r=e.observing,n=r.length,o=0;o<n;o++){var i=r[o];if(me(i)){try{i.get()}catch(e){return nr(t),!0}if(e.dependenciesState===Et.STALE)return nr(t),!0}}return or(e),nr(t),!1}}function $t(){return null!==jt.trackingDerivation}function Qt(e){var t=e.observers.length>0;jt.computationDepth>0&&t&&nt(H("m031")+e.name),!jt.allowStateChanges&&t&&nt(H(jt.strictMode?"m030a":"m030b")+e.name)}function Jt(e,t,r){or(e),e.newObserving=new Array(e.observing.length+100),e.unboundDepsCount=0,e.runId=++jt.runId;var n,o=jt.trackingDerivation;jt.trackingDerivation=e;try{n=t.call(r)}catch(e){n=new Xt(e)}return jt.trackingDerivation=o,function(e){for(var t=e.observing,r=e.observing=e.newObserving,n=Et.UP_TO_DATE,o=0,i=e.unboundDepsCount,a=0;a<i;a++)0===(u=r[a]).diffValue&&(u.diffValue=1,o!==a&&(r[o]=u),o++),u.dependenciesState>n&&(n=u.dependenciesState);for(r.length=o,e.newObserving=null,i=t.length;i--;)0===(u=t[i]).diffValue&&zt(u,e),u.diffValue=0;for(;o--;){var u;1===(u=r[o]).diffValue&&(u.diffValue=0,Bt(u,e))}n!==Et.UP_TO_DATE&&(e.dependenciesState=n,e.onBecomeStale())}(e),n}function er(e){var t=e.observing;e.observing=[];for(var r=t.length;r--;)zt(t[r],e);e.dependenciesState=Et.NOT_TRACKING}function tr(e){var t=rr(),r=e();return nr(t),r}function rr(){var e=jt.trackingDerivation;return jt.trackingDerivation=null,e}function nr(e){jt.trackingDerivation=e}function or(e){if(e.dependenciesState!==Et.UP_TO_DATE){e.dependenciesState=Et.UP_TO_DATE;for(var t=e.observing,r=t.length;r--;)t[r].lowestObserverState=Et.UP_TO_DATE}}function ir(e){return console.log(e),e}function ar(e){switch(e.length){case 0:return jt.trackingDerivation;case 1:return It(e[0]);case 2:return It(e[0],e[1])}}var ur=function(){function e(e,t){void 0===e&&(e="Reaction@"+rt()),this.name=e,this.onInvalidate=t,this.observing=[],this.newObserving=[],this.dependenciesState=Et.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+rt(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=Pt.NONE}return e.prototype.onBecomeStale=function(){this.schedule()},e.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,jt.pendingReactions.push(this),fr())},e.prototype.isScheduled=function(){return this._isScheduled},e.prototype.runReaction=function(){this.isDisposed||(Wt(),this._isScheduled=!1,Kt(this)&&(this._isTrackPending=!0,this.onInvalidate(),this._isTrackPending&&_()&&w({object:this,type:"scheduled-reaction"})),Gt())},e.prototype.track=function(e){Wt();var t,r=_();r&&(t=Date.now(),O({object:this,type:"reaction",fn:e})),this._isRunning=!0;var n=Jt(this,e,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&er(this),Zt(n)&&this.reportExceptionInDerivation(n.cause),r&&E({time:Date.now()-t}),Gt()},e.prototype.reportExceptionInDerivation=function(e){var t=this;if(this.errorHandler)this.errorHandler(e,this);else{var r="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this,n=H("m037");console.error(r||n,e),_()&&w({type:"error",message:r,error:e,object:this}),jt.globalReactionErrorHandlers.forEach((function(r){return r(e,t)}))}},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(Wt(),er(this),Gt()))},e.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e.$mobx=this,e.onError=sr,e},e.prototype.toString=function(){return"Reaction["+this.name+"]"},e.prototype.whyRun=function(){var e=ct(this._isRunning?this.newObserving:this.observing).map((function(e){return e.name}));return"\nWhyRun? reaction '"+this.name+"':\n * Status: ["+(this.isDisposed?"stopped":this._isRunning?"running":this.isScheduled()?"scheduled":"idle")+"]\n * This reaction will re-run if any of the following observables changes:\n "+lt(e)+"\n "+(this._isRunning?" (... or any observable accessed during the remainder of the current run)":"")+"\n\t"+H("m038")+"\n"},e.prototype.trace=function(e){void 0===e&&(e=!1),function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=!1;"boolean"==typeof e[e.length-1]&&(r=e.pop());var n=ar(e);if(!n)return nt("'trace(break?)' can only be used inside a tracked computed value or a Reaction. Consider passing in the computed value or reaction explicitly");n.isTracing===Pt.NONE&&console.log("[mobx.trace] '"+n.name+"' tracing enabled"),n.isTracing=r?Pt.BREAK:Pt.LOG}(this,e)},e}();function sr(e){ot(this&&this.$mobx&&dr(this.$mobx),"Invalid `this`"),ot(!this.$mobx.errorHandler,"Only one onErrorHandler can be registered"),this.$mobx.errorHandler=e}var cr=100,lr=function(e){return e()};function fr(){jt.inBatch>0||jt.isRunningReactions||lr(hr)}function hr(){jt.isRunningReactions=!0;for(var e=jt.pendingReactions,t=0;e.length>0;){++t===cr&&(console.error("Reaction doesn't converge to a stable state after "+cr+" iterations. Probably there is a cycle in the reactive function: "+e[0]),e.splice(0));for(var r=e.splice(0),n=0,o=r.length;n<o;n++)r[n].runReaction()}jt.isRunningReactions=!1}var dr=_t("Reaction",ur);function pr(e){return Q((function(t,r,n,o,i){ot(void 0!==i,H("m009")),ot("function"==typeof i.get,H("m010")),Se(_e(t,""),r,i.get,i.set,e,!1)}),(function(e){var t=this.$mobx.values[e];if(void 0!==t)return t.get()}),(function(e,t){this.$mobx.values[e].set(t)}),!1,!1)}var vr=pr(pe.default),yr=pr(pe.structural),br=function(e,t,r){if("string"==typeof t)return vr.apply(null,arguments);ot("function"==typeof e,H("m011")),ot(arguments.length<3,H("m012"));var n="object"==typeof t?t:{};n.setter="function"==typeof t?t:n.setter;var o=n.equals?n.equals:n.compareStructural||n.struct?pe.structural:pe.default;return new be(e,n.context,o,n.name||e.name||"",n.setter)};function mr(e,t,r){function n(n){return t&&r.push([e,n]),n}if(void 0===t&&(t=!0),void 0===r&&(r=[]),Ae(e)){if(t&&null===r&&(r=[]),t&&null!==e&&"object"==typeof e)for(var o=0,i=r.length;o<i;o++)if(r[o][0]===e)return r[o][1];if(z(e)){var a=n([]),u=e.map((function(e){return mr(e,t,r)}));for(a.length=u.length,o=0,i=u.length;o<i;o++)a[o]=u[o];return a}if(Ce(e)){for(var s in a=n({}),e)a[s]=mr(e[s],t,r);return a}if(Je(e)){var c=n({});return e.forEach((function(e,n){return c[n]=mr(e,t,r)})),c}if(G(e))return mr(e.get(),t,r)}return e}br.struct=yr,br.equals=pr;var gr={allowStateChanges:function(e,t){var r,n=K(e);try{r=t()}finally{$(n)}return r},deepEqual:ce,getAtom:It,getDebugName:Nt,getDependencyTree:Dt,getAdministration:Mt,getGlobalState:function(){return jt},getObserverTree:function(e,t){return Ut(It(e,t))},interceptReads:function(e,t,r){var n;if(Je(e)||z(e)||G(e))n=Mt(e);else{if(!Ce(e))return nt("Expected observable map, object or array as first array");if("string"!=typeof t)return nt("InterceptReads can only be used with a specific property, not with an object in general");n=Mt(e,t)}return void 0!==n.dehancer?nt("An intercept reader was already established"):(n.dehancer="function"==typeof t?t:r,function(){n.dehancer=void 0})},isComputingDerivation:$t,isSpyEnabled:_,onReactionError:function(e){return jt.globalReactionErrorHandlers.push(e),function(){var t=jt.globalReactionErrorHandlers.indexOf(e);t>=0&&jt.globalReactionErrorHandlers.splice(t,1)}},reserveArrayBuffer:F,resetGlobalState:function(){jt.resetId++;var e=new Tt;for(var t in e)-1===xt.indexOf(t)&&(jt[t]=e[t]);jt.allowStateChanges=!jt.strictMode},isolateGlobalState:function(){At=!0,tt().__mobxInstanceCount--},shareGlobalState:function(){at("Using `shareGlobalState` is not recommended, use peer dependencies instead. See https://github.com/mobxjs/mobx/issues/1082 for details."),Ct=!0;var e=tt(),t=jt;if(e.__mobservableTrackingStack||e.__mobservableViewStack)throw new Error("[mobx] An incompatible version of mobservable is already loaded.");if(e.__mobxGlobal&&e.__mobxGlobal.version!==t.version)throw new Error("[mobx] An incompatible version of mobx is already loaded.");e.__mobxGlobal?jt=e.__mobxGlobal:e.__mobxGlobal=t},spyReport:w,spyReportEnd:E,spyReportStart:O,setReactionScheduler:function(e){var t=lr;lr=function(r){return e((function(){return t(r)}))}}},_r={Reaction:ur,untracked:tr,Atom:h,BaseAtom:f,useStrict:Z,isStrictModeEnabled:function(){return jt.strictMode},spy:P,comparer:pe,asReference:function(e){return at("asReference is deprecated, use observable.ref instead"),ze.ref(e)},asFlat:function(e){return at("asFlat is deprecated, use observable.shallow instead"),ze.shallow(e)},asStructure:function(e){return at("asStructure is deprecated. Use observable.struct, computed.struct or reaction options instead."),ze.struct(e)},asMap:function(e){return at("asMap is deprecated, use observable.map or observable.shallowMap instead"),ze.map(e||{})},isModifierDescriptor:We,isObservableObject:Ce,isBoxedObservable:G,isObservableArray:z,ObservableMap:Qe,isObservableMap:Je,map:function(e){return at("`mobx.map` is deprecated, use `new ObservableMap` or `mobx.observable.map` instead"),ze.map(e)},transaction:Ke,observable:ze,computed:br,isObservable:Ae,isComputed:function(e,t){if(null==e)return!1;if(void 0!==t){if(!1===Ce(e))return!1;if(!e.$mobx.values[t])return!1;var r=It(e,t);return me(r)}return me(e)},extendObservable:Re,extendShallowObservable:Ie,observe:function(e,t,r,n){return"function"==typeof r?function(e,t,r,n){return Mt(e,t).observe(r,n)}(e,t,r,n):function(e,t,r){return Mt(e).observe(t,r)}(e,t,r)},intercept:function(e,t,r){return"function"==typeof r?function(e,t,r){return Mt(e,t).intercept(r)}(e,t,r):function(e,t){return Mt(e).intercept(t)}(e,t)},autorun:ve,autorunAsync:function(e,t,r,n){var o,i,a,u;"string"==typeof e?(o=e,i=t,a=r,u=n):(o=e.name||"AutorunAsync@"+rt(),i=e,a=t,u=r),ot(!1===ae(i),H("m006")),void 0===a&&(a=1),u&&(i=i.bind(u));var s=!1,c=new ur(o,(function(){s||(s=!0,setTimeout((function(){s=!1,c.isDisposed||c.track(l)}),a))}));function l(){i(c)}return c.schedule(),c.getDisposer()},when:function(e,t,r,n){var o,i,a,u;return"string"==typeof e?(o=e,i=t,a=r,u=n):(o="When@"+rt(),i=e,a=t,u=r),ve(o,(function(e){if(i.call(u)){e.dispose();var t=rr();a.call(u),nr(t)}}))},reaction:ye,action:oe,isAction:ae,runInAction:function(e,t,r){var n="string"==typeof e?e:e.name||"<unnamed action>",o="function"==typeof e?e:t,i="function"==typeof e?t:r;return ot("function"==typeof o,H("m002")),ot(0===o.length,H("m003")),ot("string"==typeof n&&n.length>0,"actions should have valid names, got: '"+n+"'"),X(n,o,i,void 0)},expr:function(e,t){return $t()||console.warn(H("m013")),br(e,{context:t}).get()},toJS:mr,createTransformer:function(e,t){ot("function"==typeof e&&e.length<2,"createTransformer expects a function that accepts one argument");var r={},n=jt.resetId,o=function(n){function o(t,r){var o=n.call(this,(function(){return e(r)}),void 0,pe.default,"Transformer-"+e.name+"-"+t,void 0)||this;return o.sourceIdentifier=t,o.sourceObject=r,o}return l(o,n),o.prototype.onBecomeUnobserved=function(){var e=this.value;n.prototype.onBecomeUnobserved.call(this),delete r[this.sourceIdentifier],t&&t(e,this.sourceObject)},o}(be);return function(e){n!==jt.resetId&&(r={},n=jt.resetId);var t=function(e){if("string"==typeof e||"number"==typeof e)return e;if(null===e||"object"!=typeof e)throw new Error("[mobx] transform expected some kind of object or primitive value, got: "+e);var t=e.$transformId;return void 0===t&&yt(e,"$transformId",t=rt()),t}(e),i=r[t];return i?i.get():(i=r[t]=new o(t,e)).get()}},whyRun:function(e,t){return at("`whyRun` is deprecated in favor of `trace`"),(e=ar(arguments))?me(e)||dr(e)?ir(e.whyRun()):nt(H("m025")):ir(H("m024"))},isArrayLike:function(e){return Array.isArray(e)||z(e)},extras:gr},wr=!1,Or=function(e){var t=_r[e];Object.defineProperty(_r,e,{get:function(){return wr||(wr=!0,console.warn("Using default export (`import mobx from 'mobx'`) is deprecated and won’t work in mobx@4.0.0\nUse `import * as mobx from 'mobx'` instead")),t}})};for(var Sr in _r)Or(Sr);"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:P,extras:gr});var Er=o(1803),Pr=o.n(Er),xr={value:()=>{}};function Tr(){for(var e,t=0,r=arguments.length,n={};t<r;++t){if(!(e=arguments[t]+"")||e in n||/[\s.]/.test(e))throw new Error("illegal type: "+e);n[e]=[]}return new jr(n)}function jr(e){this._=e}function Cr(e,t){for(var r,n=0,o=e.length;n<o;++n)if((r=e[n]).name===t)return r.value}function Ar(e,t,r){for(var n=0,o=e.length;n<o;++n)if(e[n].name===t){e[n]=xr,e=e.slice(0,n).concat(e.slice(n+1));break}return null!=r&&e.push({name:t,value:r}),e}jr.prototype=Tr.prototype={constructor:jr,on:function(e,t){var r,n,o=this._,i=(n=o,(e+"").trim().split(/^|\s+/).map((function(e){var t="",r=e.indexOf(".");if(r>=0&&(t=e.slice(r+1),e=e.slice(0,r)),e&&!n.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:t}}))),a=-1,u=i.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++a<u;)if(r=(e=i[a]).type)o[r]=Ar(o[r],e.name,t);else if(null==t)for(r in o)o[r]=Ar(o[r],e.name,null);return this}for(;++a<u;)if((r=(e=i[a]).type)&&(r=Cr(o[r],e.name)))return r},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new jr(e)},call:function(e,t){if((r=arguments.length-2)>0)for(var r,n,o=new Array(r),i=0;i<r;++i)o[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=0,r=(n=this._[e]).length;i<r;++i)n[i].value.apply(t,o)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],o=0,i=n.length;o<i;++o)n[o].value.apply(t,r)}};const kr=Tr;var Rr,Ir,Mr=0,Nr=0,Dr=0,Lr=1e3,Ur=0,Fr=0,Br=0,zr="object"==typeof performance&&performance.now?performance:Date,Vr="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Wr(){return Fr||(Vr(Gr),Fr=zr.now()+Br)}function Gr(){Fr=0}function qr(){this._call=this._time=this._next=null}function Hr(e,t,r){var n=new qr;return n.restart(e,t,r),n}function Yr(){Fr=(Ur=zr.now())+Br,Mr=Nr=0;try{!function(){Wr(),++Mr;for(var e,t=Rr;t;)(e=Fr-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Mr}()}finally{Mr=0,function(){for(var e,t,r=Rr,n=1/0;r;)r._call?(n>r._time&&(n=r._time),e=r,r=r._next):(t=r._next,r._next=null,r=e?e._next=t:Rr=t);Ir=e,Zr(n)}(),Fr=0}}function Xr(){var e=zr.now(),t=e-Ur;t>Lr&&(Br-=t,Ur=e)}function Zr(e){Mr||(Nr&&(Nr=clearTimeout(Nr)),e-Fr>24?(e<1/0&&(Nr=setTimeout(Yr,e-zr.now()-Br)),Dr&&(Dr=clearInterval(Dr))):(Dr||(Ur=zr.now(),Dr=setInterval(Xr,Lr)),Mr=1,Vr(Yr)))}qr.prototype=Hr.prototype={constructor:qr,restart:function(e,t,r){if("function"!=typeof e)throw new TypeError("callback is not a function");r=(null==r?Wr():+r)+(null==t?0:+t),this._next||Ir===this||(Ir?Ir._next=this:Rr=this,Ir=this),this._call=e,this._time=r,Zr()},stop:function(){this._call&&(this._call=null,this._time=1/0,Zr())}};const Kr=4294967296;function $r(e){return e.x}function Qr(e){return e.y}var Jr=Math.PI*(3-Math.sqrt(5));function en(e,t,r,n){if(isNaN(t)||isNaN(r))return e;var o,i,a,u,s,c,l,f,h,d=e._root,p={data:n},v=e._x0,y=e._y0,b=e._x1,m=e._y1;if(!d)return e._root=p,e;for(;d.length;)if((c=t>=(i=(v+b)/2))?v=i:b=i,(l=r>=(a=(y+m)/2))?y=a:m=a,o=d,!(d=d[f=l<<1|c]))return o[f]=p,e;if(u=+e._x.call(null,d.data),s=+e._y.call(null,d.data),t===u&&r===s)return p.next=d,o?o[f]=p:e._root=p,e;do{o=o?o[f]=new Array(4):e._root=new Array(4),(c=t>=(i=(v+b)/2))?v=i:b=i,(l=r>=(a=(y+m)/2))?y=a:m=a}while((f=l<<1|c)==(h=(s>=a)<<1|u>=i));return o[h]=d,o[f]=p,e}function tn(e,t,r,n,o){this.node=e,this.x0=t,this.y0=r,this.x1=n,this.y1=o}function rn(e){return e[0]}function nn(e){return e[1]}function on(e,t,r){var n=new an(null==t?rn:t,null==r?nn:r,NaN,NaN,NaN,NaN);return null==e?n:n.addAll(e)}function an(e,t,r,n,o,i){this._x=e,this._y=t,this._x0=r,this._y0=n,this._x1=o,this._y1=i,this._root=void 0}function un(e){for(var t={data:e.data},r=t;e=e.next;)r=r.next={data:e.data};return t}var sn=on.prototype=an.prototype;function cn(e){return function(){return e}}function ln(e){return 1e-6*(e()-.5)}function fn(){var e,t,r,n,o,i=cn(-30),a=1,u=1/0,s=.81;function c(r){var o,i=e.length,a=on(e,$r,Qr).visitAfter(f);for(n=r,o=0;o<i;++o)t=e[o],a.visit(h)}function l(){if(e){var t,r,n=e.length;for(o=new Array(n),t=0;t<n;++t)r=e[t],o[r.index]=+i(r,t,e)}}function f(e){var t,r,n,i,a,u=0,s=0;if(e.length){for(n=i=a=0;a<4;++a)(t=e[a])&&(r=Math.abs(t.value))&&(u+=t.value,s+=r,n+=r*t.x,i+=r*t.y);e.x=n/s,e.y=i/s}else{(t=e).x=t.data.x,t.y=t.data.y;do{u+=o[t.data.index]}while(t=t.next)}e.value=u}function h(e,i,c,l){if(!e.value)return!0;var f=e.x-t.x,h=e.y-t.y,d=l-i,p=f*f+h*h;if(d*d/s<p)return p<u&&(0===f&&(p+=(f=ln(r))*f),0===h&&(p+=(h=ln(r))*h),p<a&&(p=Math.sqrt(a*p)),t.vx+=f*e.value*n/p,t.vy+=h*e.value*n/p),!0;if(!(e.length||p>=u)){(e.data!==t||e.next)&&(0===f&&(p+=(f=ln(r))*f),0===h&&(p+=(h=ln(r))*h),p<a&&(p=Math.sqrt(a*p)));do{e.data!==t&&(d=o[e.data.index]*n/p,t.vx+=f*d,t.vy+=h*d)}while(e=e.next)}}return c.initialize=function(t,n){e=t,r=n,l()},c.strength=function(e){return arguments.length?(i="function"==typeof e?e:cn(+e),l(),c):i},c.distanceMin=function(e){return arguments.length?(a=e*e,c):Math.sqrt(a)},c.distanceMax=function(e){return arguments.length?(u=e*e,c):Math.sqrt(u)},c.theta=function(e){return arguments.length?(s=e*e,c):Math.sqrt(s)},c}function hn(e){return e.x+e.vx}function dn(e){return e.y+e.vy}function pn(e){return e.index}function vn(e,t){var r=e.get(t);if(!r)throw new Error("node not found: "+t);return r}sn.copy=function(){var e,t,r=new an(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root;if(!n)return r;if(!n.length)return r._root=un(n),r;for(e=[{source:n,target:r._root=new Array(4)}];n=e.pop();)for(var o=0;o<4;++o)(t=n.source[o])&&(t.length?e.push({source:t,target:n.target[o]=new Array(4)}):n.target[o]=un(t));return r},sn.add=function(e){const t=+this._x.call(null,e),r=+this._y.call(null,e);return en(this.cover(t,r),t,r,e)},sn.addAll=function(e){var t,r,n,o,i=e.length,a=new Array(i),u=new Array(i),s=1/0,c=1/0,l=-1/0,f=-1/0;for(r=0;r<i;++r)isNaN(n=+this._x.call(null,t=e[r]))||isNaN(o=+this._y.call(null,t))||(a[r]=n,u[r]=o,n<s&&(s=n),n>l&&(l=n),o<c&&(c=o),o>f&&(f=o));if(s>l||c>f)return this;for(this.cover(s,c).cover(l,f),r=0;r<i;++r)en(this,a[r],u[r],e[r]);return this},sn.cover=function(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var r=this._x0,n=this._y0,o=this._x1,i=this._y1;if(isNaN(r))o=(r=Math.floor(e))+1,i=(n=Math.floor(t))+1;else{for(var a,u,s=o-r||1,c=this._root;r>e||e>=o||n>t||t>=i;)switch(u=(t<n)<<1|e<r,(a=new Array(4))[u]=c,c=a,s*=2,u){case 0:o=r+s,i=n+s;break;case 1:r=o-s,i=n+s;break;case 2:o=r+s,n=i-s;break;case 3:r=o-s,n=i-s}this._root&&this._root.length&&(this._root=c)}return this._x0=r,this._y0=n,this._x1=o,this._y1=i,this},sn.data=function(){var e=[];return this.visit((function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)})),e},sn.extent=function(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},sn.find=function(e,t,r){var n,o,i,a,u,s,c,l=this._x0,f=this._y0,h=this._x1,d=this._y1,p=[],v=this._root;for(v&&p.push(new tn(v,l,f,h,d)),null==r?r=1/0:(l=e-r,f=t-r,h=e+r,d=t+r,r*=r);s=p.pop();)if(!(!(v=s.node)||(o=s.x0)>h||(i=s.y0)>d||(a=s.x1)<l||(u=s.y1)<f))if(v.length){var y=(o+a)/2,b=(i+u)/2;p.push(new tn(v[3],y,b,a,u),new tn(v[2],o,b,y,u),new tn(v[1],y,i,a,b),new tn(v[0],o,i,y,b)),(c=(t>=b)<<1|e>=y)&&(s=p[p.length-1],p[p.length-1]=p[p.length-1-c],p[p.length-1-c]=s)}else{var m=e-+this._x.call(null,v.data),g=t-+this._y.call(null,v.data),_=m*m+g*g;if(_<r){var w=Math.sqrt(r=_);l=e-w,f=t-w,h=e+w,d=t+w,n=v.data}}return n},sn.remove=function(e){if(isNaN(i=+this._x.call(null,e))||isNaN(a=+this._y.call(null,e)))return this;var t,r,n,o,i,a,u,s,c,l,f,h,d=this._root,p=this._x0,v=this._y0,y=this._x1,b=this._y1;if(!d)return this;if(d.length)for(;;){if((c=i>=(u=(p+y)/2))?p=u:y=u,(l=a>=(s=(v+b)/2))?v=s:b=s,t=d,!(d=d[f=l<<1|c]))return this;if(!d.length)break;(t[f+1&3]||t[f+2&3]||t[f+3&3])&&(r=t,h=f)}for(;d.data!==e;)if(n=d,!(d=d.next))return this;return(o=d.next)&&delete d.next,n?(o?n.next=o:delete n.next,this):t?(o?t[f]=o:delete t[f],(d=t[0]||t[1]||t[2]||t[3])&&d===(t[3]||t[2]||t[1]||t[0])&&!d.length&&(r?r[h]=d:this._root=d),this):(this._root=o,this)},sn.removeAll=function(e){for(var t=0,r=e.length;t<r;++t)this.remove(e[t]);return this},sn.root=function(){return this._root},sn.size=function(){var e=0;return this.visit((function(t){if(!t.length)do{++e}while(t=t.next)})),e},sn.visit=function(e){var t,r,n,o,i,a,u=[],s=this._root;for(s&&u.push(new tn(s,this._x0,this._y0,this._x1,this._y1));t=u.pop();)if(!e(s=t.node,n=t.x0,o=t.y0,i=t.x1,a=t.y1)&&s.length){var c=(n+i)/2,l=(o+a)/2;(r=s[3])&&u.push(new tn(r,c,l,i,a)),(r=s[2])&&u.push(new tn(r,n,l,c,a)),(r=s[1])&&u.push(new tn(r,c,o,i,l)),(r=s[0])&&u.push(new tn(r,n,o,c,l))}return this},sn.visitAfter=function(e){var t,r=[],n=[];for(this._root&&r.push(new tn(this._root,this._x0,this._y0,this._x1,this._y1));t=r.pop();){var o=t.node;if(o.length){var i,a=t.x0,u=t.y0,s=t.x1,c=t.y1,l=(a+s)/2,f=(u+c)/2;(i=o[0])&&r.push(new tn(i,a,u,l,f)),(i=o[1])&&r.push(new tn(i,l,u,s,f)),(i=o[2])&&r.push(new tn(i,a,f,l,c)),(i=o[3])&&r.push(new tn(i,l,f,s,c))}n.push(t)}for(;t=n.pop();)e(t.node,t.x0,t.y0,t.x1,t.y1);return this},sn.x=function(e){return arguments.length?(this._x=e,this):this._x},sn.y=function(e){return arguments.length?(this._y=e,this):this._y};var yn=256,bn=4096,mn=25,gn="#ededed",_n={position:"absolute",top:0,bottom:0,left:0,right:0},wn=function(){return window.devicePixelRatio||1},On=["NVL_basic-wrapper","NVL_interactive-wrapper"];function Sn(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return En(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?En(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function En(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Pn=function(t){var r=new Map;return t.forEach((function(e){var t=e.id,n=e.from,o=e.to,i=e.color,a=e.width,u=e.disabled,s=[n,o].sort(),c="".concat(s[0],".").concat(s[1]),l=r.get(c);l?l.bundledRels.push({id:t,color:null!=i?i:void 0,disabled:null!=u&&u,width:null!=a?a:1}):r.set(c,{bundledRels:[{id:t,color:null!=i?i:void 0,disabled:null!=u&&u,width:null!=a?a:1}],key:c,from:n,to:o,color:null!=i?i:void 0,disabled:null!=u&&u,width:0})})),r.forEach((function(t){var r=(0,e.uniqBy)(t.bundledRels,"disabled"),n=1===r.length&&!0===r[0].disabled,o=1===r.length&&!0!==r[0].disabled;if(n)t.color=gn,t.width=1;else{var i=t.bundledRels.filter((function(e){return!0!==e.disabled})),a=(0,e.uniqBy)(i,"color");o?(t.color=a.length>1?void 0:t.bundledRels[0].color,t.bundledRels.forEach((function(e){t.width+=e.width}))):(t.color=1===a.length?a[0].color:void 0,t.disabled=!1,t.bundledRels.forEach((function(e){t.width+=!0!==e.disabled?e.width:0})))}})),Array.from(r.values())},xn=function(){return void 0!==(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).find((function(e){return"size"in e}))};function Tn(e){return Tn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Tn(e)}var jn=function(e){var t,r;return"number"==typeof e.source||"number"==typeof e.target||"string"==typeof e.source||"string"==typeof e.target?45*devicePixelRatio:(null!==(t=e.source.size)&&void 0!==t?t:mn)+(null!==(r=e.target.size)&&void 0!==r?r:mn)+90*devicePixelRatio};function Cn(e){return"object"===Tn(e)}var An=function(e){var t;return(null!==(t=e.size)&&void 0!==t?t:mn)+25*devicePixelRatio},kn=function(){return-400*Math.pow(devicePixelRatio,2)},Rn=function(){return 2*kn()};function In(e){return In="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},In(e)}function Mn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Nn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Dn(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ln(n.key),n)}}function Ln(e){var t=function(e,t){if("object"!=In(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=In(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==In(t)?t:String(t)}var Un="d3ForceLayout",Fn=function(e){return e?mr(e):e},Bn=function(){function t(e){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=e.state;this.state=n,this.d3Nodes={},this.d3RelList={},this.computing=!0,this.center={x:0,y:0},this.nodeRelCount=[];var o=this.state,i=o.nodes,a=o.rels;i.addChannel(Un),a.addChannel(Un),this.simulation=function(e){var t,r=1,n=.001,o=1-Math.pow(n,1/300),i=0,a=.6,u=new Map,s=Hr(f),c=kr("tick","end"),l=function(){let e=1;return()=>(e=(1664525*e+1013904223)%Kr)/Kr}();function f(){h(),c.call("tick",t),r<n&&(s.stop(),c.call("end",t))}function h(n){var s,c,l=e.length;void 0===n&&(n=1);for(var f=0;f<n;++f)for(r+=(i-r)*o,u.forEach((function(e){e(r)})),s=0;s<l;++s)null==(c=e[s]).fx?c.x+=c.vx*=a:(c.x=c.fx,c.vx=0),null==c.fy?c.y+=c.vy*=a:(c.y=c.fy,c.vy=0);return t}function d(){for(var t,r=0,n=e.length;r<n;++r){if((t=e[r]).index=r,null!=t.fx&&(t.x=t.fx),null!=t.fy&&(t.y=t.fy),isNaN(t.x)||isNaN(t.y)){var o=10*Math.sqrt(.5+r),i=r*Jr;t.x=o*Math.cos(i),t.y=o*Math.sin(i)}(isNaN(t.vx)||isNaN(t.vy))&&(t.vx=t.vy=0)}}function p(t){return t.initialize&&t.initialize(e,l),t}return null==e&&(e=[]),d(),t={tick:h,restart:function(){return s.restart(f),t},stop:function(){return s.stop(),t},nodes:function(r){return arguments.length?(e=r,d(),u.forEach(p),t):e},alpha:function(e){return arguments.length?(r=+e,t):r},alphaMin:function(e){return arguments.length?(n=+e,t):n},alphaDecay:function(e){return arguments.length?(o=+e,t):+o},alphaTarget:function(e){return arguments.length?(i=+e,t):i},velocityDecay:function(e){return arguments.length?(a=1-e,t):1-a},randomSource:function(e){return arguments.length?(l=e,u.forEach(p),t):l},force:function(e,r){return arguments.length>1?(null==r?u.delete(e):u.set(e,p(r)),t):u.get(e)},find:function(t,r,n){var o,i,a,u,s,c=0,l=e.length;for(null==n?n=1/0:n*=n,c=0;c<l;++c)(a=(o=t-(u=e[c]).x)*o+(i=r-u.y)*i)<n&&(s=u,n=a);return s},on:function(e,r){return arguments.length>1?(c.on(e,r),t):c.on(e)}}}().velocityDecay(.4).force("charge",fn().strength(kn)).force("centerX",function(e){var t,r,n,o=cn(.1);function i(e){for(var o,i=0,a=t.length;i<a;++i)(o=t[i]).vx+=(n[i]-o.x)*r[i]*e}function a(){if(t){var i,a=t.length;for(r=new Array(a),n=new Array(a),i=0;i<a;++i)r[i]=isNaN(n[i]=+e(t[i],i,t))?0:+o(t[i],i,t)}}return"function"!=typeof e&&(e=cn(null==e?0:+e)),i.initialize=function(e){t=e,a()},i.strength=function(e){return arguments.length?(o="function"==typeof e?e:cn(+e),a(),i):o},i.x=function(t){return arguments.length?(e="function"==typeof t?t:cn(+t),a(),i):e},i}(0).strength(.03)).force("centerY",function(e){var t,r,n,o=cn(.1);function i(e){for(var o,i=0,a=t.length;i<a;++i)(o=t[i]).vy+=(n[i]-o.y)*r[i]*e}function a(){if(t){var i,a=t.length;for(r=new Array(a),n=new Array(a),i=0;i<a;++i)r[i]=isNaN(n[i]=+e(t[i],i,t))?0:+o(t[i],i,t)}}return"function"!=typeof e&&(e=cn(null==e?0:+e)),i.initialize=function(e){t=e,a()},i.strength=function(e){return arguments.length?(o="function"==typeof e?e:cn(+e),a(),i):o},i.y=function(t){return arguments.length?(e="function"==typeof t?t:cn(+t),a(),i):e},i}(0).strength(.03)).alpha(1).alphaMin(.05).on("end",(function(){r.simulationStopped=!0,r.shouldUpdate=!1,r.shouldReheatNodes=!1,r.shouldCountNodeRels=!1})).stop(),this.simulationStopped=!0,this.shouldUpdate=!0,this.shouldReheatNodes=!1,this.shouldCountNodeRels=!0,this.stateDisposers=[],this.stateDisposers.push(this.state.reaction((function(){return r.state.graphUpdates}),(function(){var e=i.channels[Un];if(void 0!==i.version&&e){var t=Object.values(e.adds).length>0,n=Object.values(e.removes).length>0,o=Object.values(e.updates),u=xn(o);t||n||u?(r.shouldUpdate=!0,r.shouldReheatNodes=!0,r.shouldCountNodeRels=!0):r.shouldReheatNodes=!1}var s=a.channels[Un];if(void 0!==a.version&&s){var c=Object.values(s.adds).length>0,l=Object.values(s.removes).length>0;(c||l)&&(r.shouldUpdate=!0,r.shouldReheatNodes=!0,r.shouldCountNodeRels=!0)}})))}var r,n;return r=t,n=[{key:"setOptions",value:function(e){}},{key:"updateNodes",value:function(e){var t=this;e.forEach((function(e){void 0===t.d3Nodes[e.id]&&(t.d3Nodes[e.id]={id:e.id}),null!=e&&e.pinned?(t.d3Nodes[e.id].fx=e.x,t.d3Nodes[e.id].fy=e.y):(t.d3Nodes[e.id].x=e.x,t.d3Nodes[e.id].y=e.y),t.d3Nodes[e.id].vy=0,t.d3Nodes[e.id].vx=0})),this.shouldUpdate=!0,this.simulation.tick().alpha(.2)}},{key:"update",value:function(){var e,t=this,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.shouldUpdate||r){var n=this.state,o=n.nodes,i=n.rels,a=o.channels[Un],u=i.channels[Un],s=Object.values(a.adds).length>0,c=Object.values(u.adds).length>0,l=Object.values(a.removes).length>0,f=Object.values(u.removes).length>0,h=Object.values(a.updates).length>0;if(s||c||l||f||h){var d=s&&0===Object.keys(this.d3Nodes).length,p=Fn(a.removes);Object.keys(p).forEach((function(e){delete t.d3Nodes[e]}));var v=Fn(a.adds);if(Object.keys(v).forEach((function(e){t.d3Nodes[e]=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Nn(Object(r),!0).forEach((function(t){var n,o,i;n=e,o=t,i=r[t],(o=Ln(o))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Nn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},v[e])})),h&&Object.values(a.updates).forEach((function(e){!0===e.pinned?(t.d3Nodes[e.id].fx=t.d3Nodes[e.id].x,t.d3Nodes[e.id].fy=t.d3Nodes[e.id].y):!1===e.pinned&&(t.d3Nodes[e.id].fx=null,t.d3Nodes[e.id].fy=null),void 0!==e.size&&(t.d3Nodes[e.id].size=e.size)})),(c||f)&&(this.d3RelList=Pn(Fn(i.items)).filter((function(e){return e.from!==e.to})).map((function(e,t){return{source:e.from,target:e.to,index:t}}))),d){var y=Object.values(this.d3Nodes);!function(e,t,r){var n=e.filter((function(e){return void 0===e.x&&void 0===e.y}));n.forEach((function(e,o){e.x=t.x+r*Math.sin(2*Math.PI*o/n.length),e.y=t.y+r*Math.cos(2*Math.PI*o/n.length)}))}(y,this.center,(e=y.length,45*e/(2*Math.PI)))}this.layout(o.items,i.items,d)}o.clearChannel(Un),i.clearChannel(Un),this.shouldUpdate=!1,this.simulation.alpha()>this.simulation.alphaMin()&&(this.shouldUpdate=!0,this.simulationStopped&&(this.simulation.restart(),this.simulationStopped=!1))}}},{key:"layout",value:function(t,r,n){var o=this;if(!(0,e.isEmpty)(this.d3Nodes)){if(this.simulation.stop(),this.simulation.nodes(Object.values(this.d3Nodes)).force("collide",function(e){var t,r,n,o=1,i=1;function a(){for(var e,a,s,c,l,f,h,d=t.length,p=0;p<i;++p)for(a=on(t,hn,dn).visitAfter(u),e=0;e<d;++e)s=t[e],f=r[s.index],h=f*f,c=s.x+s.vx,l=s.y+s.vy,a.visit(v);function v(e,t,r,i,a){var u=e.data,d=e.r,p=f+d;if(!u)return t>c+p||i<c-p||r>l+p||a<l-p;if(u.index>s.index){var v=c-u.x-u.vx,y=l-u.y-u.vy,b=v*v+y*y;b<p*p&&(0===v&&(b+=(v=ln(n))*v),0===y&&(b+=(y=ln(n))*y),b=(p-(b=Math.sqrt(b)))/b*o,s.vx+=(v*=b)*(p=(d*=d)/(h+d)),s.vy+=(y*=b)*p,u.vx-=v*(p=1-p),u.vy-=y*p)}}}function u(e){if(e.data)return e.r=r[e.data.index];for(var t=e.r=0;t<4;++t)e[t]&&e[t].r>e.r&&(e.r=e[t].r)}function s(){if(t){var n,o,i=t.length;for(r=new Array(i),n=0;n<i;++n)o=t[n],r[o.index]=+e(o,n,t)}}return"function"!=typeof e&&(e=cn(null==e?1:+e)),a.initialize=function(e,r){t=e,n=r,s()},a.iterations=function(e){return arguments.length?(i=+e,a):i},a.strength=function(e){return arguments.length?(o=+e,a):o},a.radius=function(t){return arguments.length?(e="function"==typeof t?t:cn(+t),s(),a):e},a}().radius(An)),this.shouldCountNodeRels&&(this.nodeRelCount=this.countNodeRels()),this.simulation.force("link",function(e){var t,r,n,o,i,a,u=pn,s=function(e){return 1/Math.min(o[e.source.index],o[e.target.index])},c=cn(30),l=1;function f(n){for(var o=0,u=e.length;o<l;++o)for(var s,c,f,h,d,p,v,y=0;y<u;++y)c=(s=e[y]).source,h=(f=s.target).x+f.vx-c.x-c.vx||ln(a),d=f.y+f.vy-c.y-c.vy||ln(a),h*=p=((p=Math.sqrt(h*h+d*d))-r[y])/p*n*t[y],d*=p,f.vx-=h*(v=i[y]),f.vy-=d*v,c.vx+=h*(v=1-v),c.vy+=d*v}function h(){if(n){var a,s,c=n.length,l=e.length,f=new Map(n.map(((e,t)=>[u(e,t,n),e])));for(a=0,o=new Array(c);a<l;++a)(s=e[a]).index=a,"object"!=typeof s.source&&(s.source=vn(f,s.source)),"object"!=typeof s.target&&(s.target=vn(f,s.target)),o[s.source.index]=(o[s.source.index]||0)+1,o[s.target.index]=(o[s.target.index]||0)+1;for(a=0,i=new Array(l);a<l;++a)s=e[a],i[a]=o[s.source.index]/(o[s.source.index]+o[s.target.index]);t=new Array(l),d(),r=new Array(l),p()}}function d(){if(n)for(var r=0,o=e.length;r<o;++r)t[r]=+s(e[r],r,e)}function p(){if(n)for(var t=0,o=e.length;t<o;++t)r[t]=+c(e[t],t,e)}return null==e&&(e=[]),f.initialize=function(e,t){n=e,a=t,h()},f.links=function(t){return arguments.length?(e=t,h(),f):e},f.id=function(e){return arguments.length?(u=e,f):u},f.iterations=function(e){return arguments.length?(l=+e,f):l},f.strength=function(e){return arguments.length?(s="function"==typeof e?e:cn(+e),d(),f):s},f.distance=function(e){return arguments.length?(c="function"==typeof e?e:cn(+e),p(),f):c},f}(this.d3RelList).id((function(e){return e.id})).distance(jn).strength((function(e){return function(e,t){if(!Cn(e.source)||!Cn(e.target))return 1;var r=1.2/(Math.min(t[e.source.index],t[e.target.index])+(Math.max(t[e.source.index],t[e.target.index])-1)/100);return Math.max(Math.min(r,1),.06)}(e,o.nodeRelCount)}))),n){var i=0;this.simulation.force("charge",fn().strength(Rn));for(var a=performance.now();performance.now()-a<300&&i<200;)this.simulation.alpha(1),this.simulation.tick(1),i+=1;this.simulation.force("charge",fn().strength(kn));for(var u=performance.now();performance.now()-u<100&&this.simulation.alpha()>=this.simulation.alphaMin();)this.simulation.tick(1);return this.computing=!1,void this.simulation.restart()}this.shouldReheatNodes?this.simulation.alpha(1).restart():this.simulation.restart()}}},{key:"getNodePositions",value:function(e){var t,r=[],n=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Mn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Mn(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(e);try{for(n.s();!(t=n.n()).done;){var o=t.value,i=this.d3Nodes[o.id];if(void 0!==i){var a={id:i.id,x:i.x,y:i.y};r.push(a)}}}catch(e){n.e(e)}finally{n.f()}return r}},{key:"getShouldUpdate",value:function(){return this.shouldUpdate}},{key:"getComputing",value:function(){return this.computing}},{key:"terminateUpdate",value:function(){this.simulation.alpha(this.simulation.alphaMin()).stop(),this.simulationStopped=!0}},{key:"destroy",value:function(){this.stateDisposers.forEach((function(e){e()})),this.state.nodes.removeChannel(Un),this.state.rels.removeChannel(Un),this.simulation.stop()}},{key:"setAlpha",value:function(e){this.simulation.alpha(e),this.simulation.restart(),this.simulation.shouldUpdate=!0}},{key:"countNodeRels",value:function(){for(var e=new Map(Object.entries(this.d3Nodes)),t=Object.values(this.d3RelList),r=new Array(e.length),n=0;n<t.length;++n){var o=t[n];o.index=n,"object"!==In(o.source)&&(o.source=e.get(o.source)),"object"!==In(o.target)&&(o.target=e.get(o.target)),r[o.source.index]=(r[o.source.index]||0)+1,r[o.target.index]=(r[o.target.index]||0)+1}return r}}],n&&Dn(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),t}(),zn=o(5880),Vn=o.n(zn)().getLogger("NVL");function Wn(e){return Wn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wn(e)}function Gn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function qn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Gn(Object(r),!0).forEach((function(t){Zn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Hn(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Yn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Yn(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Yn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Xn(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Kn(n.key),n)}}function Zn(e,t,r){return(t=Kn(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Kn(e){var t=function(e,t){if("object"!=Wn(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=Wn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Wn(t)?t:String(t)}var $n=function(e,t,r){return e+(t-e)*function(e){return e*e*(3-2*e)}(r)},Qn=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Zn(this,"positions",void 0),Zn(this,"oldPositions",void 0),Zn(this,"startTime",void 0),Zn(this,"t",void 0),Zn(this,"currentT",void 0),Zn(this,"state",void 0),Zn(this,"shouldUpdateAnimator",void 0),Zn(this,"parents",void 0),Zn(this,"animationCompleteCallback",void 0),Zn(this,"shouldUpdate",void 0);var r=t.state;this.positions={},this.oldPositions={},this.startTime=0,this.t=1,this.currentT=1,this.state=r,this.shouldUpdateAnimator=!1,this.parents={},this.animationCompleteCallback=t.animationCompleteCallback}var t,r;return t=e,r=[{key:"getPositionMapFromState",value:function(){var e,t=this.state.nodes,r=t.idToPosition,n={},o=Hn(t.items);try{for(o.s();!(e=o.n()).done;){var i=e.value,a=r[i.id];void 0!==a&&(n[i.id]={id:i.id,x:a.x,y:a.y})}}catch(e){o.e(e)}finally{o.f()}return n}},{key:"updatePositionsFromState",value:function(){this.positions=qn({},this.getPositionMapFromState())}},{key:"updateOldPositionFromState",value:function(){this.oldPositions=qn({},this.getPositionMapFromState())}},{key:"startAnimation",value:function(){this.updateOldPositionFromState(),this.startTime=Date.now(),this.t=0,this.currentT=0,this.shouldUpdateAnimator=!0}},{key:"update",value:function(){var e=this.shouldUpdateAnimator,t=(Date.now()-this.startTime)/400;this.t=Math.min(t,1),this.currentT<1?this.shouldUpdateAnimator=!0:(this.shouldUpdateAnimator=!1,e&&!this.shouldUpdateAnimator&&void 0!==this.animationCompleteCallback&&this.animationCompleteCallback(),this.shouldUpdateAnimator||this.updatePositionsFromState())}},{key:"updateNodes",value:function(e){var t,r=Hn(e);try{for(r.s();!(t=r.n()).done;){var n=t.value;void 0!==n.x&&void 0!==n.y&&(this.positions[n.id]={id:n.id,x:n.x,y:n.y}),this.shouldUpdate=!0}}catch(e){r.e(e)}finally{r.f()}}},{key:"getNodePositions",value:function(e){var t,r=this.parents,n=this.state.nodes.idToPosition,o=function(e,t){for(var r={x:0,y:0},n=e.length,o=0,i=0;i<n;i++){var a=t[e[i].id];void 0===a||isNaN(a.x)||isNaN(a.y)||0===a.x||0===a.y||(r.x+=a.x,r.y+=a.y,o+=1)}return o>0?[r.x/o,r.y/o]:[0,0]}(e,n),i={x:o[0],y:o[1]},a=[],u=Hn(e);try{for(u.s();!(t=u.n()).done;){var s=t.value,c=this.positions[s.id],l=n[s.id],f={id:s.id};if(void 0!==c){for(var h,d,p,v=s.id,y=null!==(h=this.oldPositions[s.id])&&void 0!==h?h:qn({},i);void 0===y&&void 0!==r[v];)v=r[v],y=this.oldPositions[v];y.x=null!==(d=y.x)&&void 0!==d?d:i.x,y.y=null!==(p=y.y)&&void 0!==p?p:i.y,f.x=$n(y.x,c.x,this.t),f.y=$n(y.y,c.y,this.t)}else void 0!==l&&(f.x=l.x||i.x,f.y=l.y||i.y);a.push(f)}}catch(e){u.e(e)}finally{u.f()}return this.currentT=this.t,a}}],r&&Xn(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Jn(e){return Jn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jn(e)}function eo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function to(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?eo(Object(r),!0).forEach((function(t){yo(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ro(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return u}}(e,t)||oo(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function no(e){return function(e){if(Array.isArray(e))return io(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||oo(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function oo(e,t){if(e){if("string"==typeof e)return io(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?io(e,t):void 0}}function io(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ao(){ao=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var i=t&&t.prototype instanceof b?t:b,a=Object.create(i.prototype),u=new A(n||[]);return o(a,"_invoke",{value:x(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var h="suspendedStart",d="suspendedYield",p="executing",v="completed",y={};function b(){}function m(){}function g(){}var _={};c(_,a,(function(){return this}));var w=Object.getPrototypeOf,O=w&&w(w(k([])));O&&O!==r&&n.call(O,a)&&(_=O);var S=g.prototype=b.prototype=Object.create(_);function E(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,i,a,u){var s=f(e[o],e,i);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==Jn(l)&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,u)}))}u(s.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function x(t,r,n){var o=h;return function(i,a){if(o===p)throw new Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var s=T(u,n);if(s){if(s===y)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=p;var c=f(t,r,n);if("normal"===c.type){if(o=n.done?v:d,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=v,n.method="throw",n.arg=c.arg)}}}function T(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,T(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function k(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(Jn(t)+" is not iterable")}return m.prototype=g,o(S,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=c(g,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,c(e,s,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},E(P.prototype),c(P.prototype,u,(function(){return this})),t.AsyncIterator=P,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new P(l(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(S),c(S,s,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=k,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:k(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}function uo(e,t,r,n,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void r(e)}u.done?t(s):Promise.resolve(s).then(n,o)}function so(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,bo(n.key),n)}}function co(e,t,r){return t=po(t),function(e,t){if(t&&("object"===Jn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return fo(e)}(e,lo()?Reflect.construct(t,r||[],po(e).constructor):t.apply(e,r))}function lo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(lo=function(){return!!e})()}function fo(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ho(){return ho="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=po(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},ho.apply(this,arguments)}function po(e){return po=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},po(e)}function vo(e,t){return vo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},vo(e,t)}function yo(e,t,r){return(t=bo(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bo(e){var t=function(e,t){if("object"!=Jn(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=Jn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Jn(t)?t:String(t)}var mo=function(e){return void 0!==e?mr(e):e},go=function(e){function t(e){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),yo(fo(r=co(this,t,[e])),"stateDisposers",void 0),yo(fo(r),"cytoCompleteCallback",void 0),yo(fo(r),"computing",void 0),yo(fo(r),"pendingLayoutData",void 0),yo(fo(r),"worker",void 0),r.stateDisposers=[],r.stateDisposers.push(r.state.reaction((function(){return r.state.graphUpdates}),(function(){void 0!==r.state.nodes.version&&(r.shouldUpdate=!0),void 0!==r.state.rels.version&&(r.shouldUpdate=!0)}))),r.cytoCompleteCallback=e.cytoCompleteCallback,r.shouldUpdate=!0,r.computing=!1,r.setOptions(),r.setupWorker().then((function(e){r.worker=e,r.worker.port.start(),r.pendingLayoutData=null})).catch((function(e){Vn.error("Error setting up worker:",e)})),r}var r,n,i,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vo(e,t)}(t,e),r=t,n=[{key:"setupWorker",value:(i=ao().mark((function e(){var t,r,n,i,a;return ao().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then(o.bind(o,8716));case 3:r=e.sent,n=r.createCoseBilkentLayoutWorker,t=n(),e.next=16;break;case 8:return e.prev=8,e.t0=e.catch(0),Vn.info("Failed to initialise shared worker: ",e.t0," Falling back to syncronous code."),e.next=13,Promise.resolve().then(o.bind(o,8716));case 13:i=e.sent,a=i.coseBilkentLayoutFallbackWorker,t=a;case 16:return e.abrupt("return",new Promise((function(e,r){t||r("Cose-bilkent layout code could not be initialized"),e(t)})));case 17:case"end":return e.stop()}}),e,null,[[0,8]])})),a=function(){var e=this,t=arguments;return new Promise((function(r,n){var o=i.apply(e,t);function a(e){uo(o,r,n,a,u,"next",e)}function u(e){uo(o,r,n,a,u,"throw",e)}a(void 0)}))},function(){return a.apply(this,arguments)})},{key:"setOptions",value:function(){this.shouldUpdate=!0}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(this.shouldUpdate||e){var o=mo(r),i=mo(n);(o.length>0||i.length>0)&&(this.updatePositionsFromState(),this.layout(o,i))}ho(po(t.prototype),"update",this).call(this),this.shouldUpdate=!1}},{key:"getShouldUpdate",value:function(){return this.shouldUpdate||this.shouldUpdateAnimator}},{key:"getComputing",value:function(){return this.computing}},{key:"layout",value:function(e,t){var r=this;if(this.worker){if(e.length){var n=e.map((function(e){return{group:"nodes",data:{id:e.id}}})),o=t.map((function(e){return{group:"edges",data:{id:"rel".concat(e.id),source:e.from,target:e.to}}})),i={elements:[].concat(no(n),no(o)),spacingFactor:e.reduce((function(e,t){var r;return e+(null!==(r=t.size)&&void 0!==r?r:mn)}),0)/e.length*4.5/50*wn()};this.computing?this.pendingLayoutData=i:(this.computing=!0,this.worker.port.onmessage=function(e){var t=e.data.positions;if(r.computing){for(var n=0,o=Object.entries(t);n<o.length;n++){var i=ro(o[n],2),a=i[0],u=i[1];r.positions[a]=to({id:a},u)}r.cytoCompleteCallback(),r.startAnimation()}r.computing=!1,r.shouldUpdate=!0},setTimeout((function(){r.computing&&r.worker.port.postMessage(i)}),0))}}else Vn.info("Cose-Bilkent layout code not yet initialised.")}},{key:"terminateUpdate",value:function(){this.computing=!1}},{key:"destroy",value:function(){var e;this.stateDisposers.forEach((function(e){e()})),null===(e=this.worker)||void 0===e||e.port.close()}}],n&&so(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),t}(Qn),_o="undefined"!=typeof Float32Array?Float32Array:Array;function wo(){var e=new _o(16);return _o!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}Math.random,Math.PI,Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)});var Oo=function(e,t,r,n,o,i,a){var u=1/(t-r),s=1/(n-o),c=1/(i-a);return e[0]=-2*u,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*s,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+r)*u,e[13]=(o+n)*s,e[14]=(a+i)*c,e[15]=1,e},So=o(9792),Eo=o.n(So);function Po(e){return Po="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Po(e)}function xo(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,jo(n.key),n)}}function To(e,t,r){return(t=jo(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jo(e){var t=function(e,t){if("object"!=Po(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=Po(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Po(t)?t:String(t)}var Co=function(){function t(r,n,o){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),To(this,"shaderProgram",void 0),To(this,"gl",void 0),To(this,"curTexture",void 0),To(this,"attributeInfo",void 0),To(this,"uniformInfo",void 0);var a=r.createShader(r.FRAGMENT_SHADER);if(!r.isShader(a))throw new Error("Could not create shader object");var u=Eo()(o,i);r.shaderSource(a,u),r.compileShader(a),(0,e.isNil)(r.getShaderParameter(a,r.COMPILE_STATUS))&&Vn.info(r.getShaderInfoLog(a));var s=r.createShader(r.VERTEX_SHADER);if(!r.isShader(s))throw new Error("Could not create shader object");var c=Eo()(n,i);if(r.shaderSource(s,c),r.compileShader(s),(0,e.isNil)(r.getShaderParameter(s,r.COMPILE_STATUS))&&Vn.info(r.getShaderInfoLog(s)),this.shaderProgram=r.createProgram(),r.attachShader(this.shaderProgram,a),r.attachShader(this.shaderProgram,s),r.linkProgram(this.shaderProgram),(0,e.isNil)(r.getProgramParameter(this.shaderProgram,r.LINK_STATUS)))throw new Error("Could not initialise shader");this.gl=r,this.curTexture=0,this.scanUniforms(),this.scanAttributes()}var r,n;return r=t,n=[{key:"setUniform",value:function(e,t){var r=this.gl,n=this.uniformInfo[e];if(void 0===n)throw new Error("Shader.setUniform - Uniform ".concat(e," not found in shader"));switch(n.type){case r.INT:r.uniform1i(n.location,t);break;case r.INT_VEC2:r.uniform2iv(n.location,t);break;case r.INT_VEC3:r.uniform3iv(n.location,t);break;case r.INT_VEC4:r.uniform4iv(n.location,t);break;case r.SAMPLER_2D:r.activeTexture(r.TEXTURE0+n.texture),r.bindTexture(r.TEXTURE_2D,t),r.uniform1i(n.location,n.texture);break;case r.SAMPLER_CUBE:case r.FLOAT:r.uniform1f(n.location,t);break;case r.FLOAT_VEC2:r.uniform2fv(n.location,t);break;case r.FLOAT_VEC3:r.uniform3fv(n.location,t);break;case r.FLOAT_VEC4:r.uniform4fv(n.location,t);break;case r.FLOAT_MAT2:r.uniformMatrix2fv(n.location,!1,t);break;case r.FLOAT_MAT3:r.uniformMatrix3fv(n.location,!1,t);break;case r.FLOAT_MAT4:r.uniformMatrix4fv(n.location,!1,t)}}},{key:"setAttributePointer",value:function(e,t,r,n){var o=this.gl,i=this.attributeInfo[e],a=r*Float32Array.BYTES_PER_ELEMENT,u=n*Float32Array.BYTES_PER_ELEMENT;o.enableVertexAttribArray(i.position),o.vertexAttribPointer(i.position,t,o.FLOAT,!1,u,a)}},{key:"setAttributePointerFloat",value:function(e,t,r,n){var o=this.gl,i=this.attributeInfo[e];o.enableVertexAttribArray(i.position),o.vertexAttribPointer(i.position,t,o.FLOAT,!1,n,r)}},{key:"setAttributePointerUShort",value:function(e,t,r,n){var o=this.gl,i=this.attributeInfo[e];o.enableVertexAttribArray(i.position),o.vertexAttribPointer(i.position,t,o.UNSIGNED_SHORT,!1,n,r)}},{key:"setAttributePointerByteNorm",value:function(e,t,r,n){var o=this.gl,i=this.attributeInfo[e];o.enableVertexAttribArray(i.position),o.vertexAttribPointer(i.position,t,o.UNSIGNED_BYTE,!0,n,r)}},{key:"setAttributePointerByte",value:function(e,t,r,n){var o=this.gl,i=this.attributeInfo[e];o.enableVertexAttribArray(i.position),o.vertexAttribPointer(i.position,t,o.UNSIGNED_BYTE,!1,n,r)}},{key:"use",value:function(){this.gl.useProgram(this.shaderProgram)}},{key:"remove",value:function(){this.gl.deleteProgram(this.shaderProgram)}},{key:"scanAttributes",value:function(){var e=this.gl;this.attributeInfo={};for(var t,r,n=e.getProgramParameter(this.shaderProgram,e.ACTIVE_ATTRIBUTES),o=0;o<n;o++)t=e.getActiveAttrib(this.shaderProgram,o),r=e.getAttribLocation(this.shaderProgram,t.name),this.attributeInfo[t.name]={type:t.type,position:r}}},{key:"scanUniforms",value:function(){var e=this.gl;this.uniformInfo={};for(var t,r=e.getProgramParameter(this.shaderProgram,e.ACTIVE_UNIFORMS),n=0;n<r;n++){t=e.getActiveUniform(this.shaderProgram,n);var o=e.getUniformLocation(this.shaderProgram,t.name),i={type:t.type,location:o};t.type===e.SAMPLER_2D&&(i.texture=this.curTexture,this.curTexture+=1),this.uniformInfo[t.name]=i}}}],n&&xo(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),t}();function Ao(e){return Ao="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ao(e)}function ko(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ro(n.key),n)}}function Ro(e){var t=function(e,t){if("object"!=Ao(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=Ao(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ao(t)?t:String(t)}function Io(e){var t="function"==typeof Map?new Map:void 0;return Io=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return function(e,t,r){if(Mo())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&No(o,r.prototype),o}(e,arguments,Do(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),No(r,e)},Io(e)}function Mo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Mo=function(){return!!e})()}function No(e,t){return No=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},No(e,t)}function Do(e){return Do=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Do(e)}var Lo=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,n=arguments,r=Do(r=t),function(e,t){if(t&&("object"===Ao(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Mo()?Reflect.construct(r,n||[],Do(e).constructor):r.apply(e,n));var e,r,n}var r,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&No(e,t)}(t,e),r=t,(n=[{key:"toString",value:function(){return this.message}}])&&ko(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),t}(Io(Error));const Uo="uniform mat4 u_projection;\n\nattribute vec2 a_position;\n//attribute float a_index;\n\n//varying highp float index;\n\nvoid main() {\n// index = a_index;\n gl_Position = u_projection * vec4(a_position, 0.0, 1.0);\n}";function Fo(e){return Fo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fo(e)}function Bo(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,zo(n.key),n)}}function zo(e){var t=function(e,t){if("object"!=Fo(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=Fo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Fo(t)?t:String(t)}var Vo=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.graph=this.constructGraphObjects(t,r),this.subGraphs=[],this.sunMap={}}var t,r;return t=e,r=[{key:"constructGraphObjects",value:function(e,t){var r=new Array(e.nodes.length),n=new Array(e.rels.length),o={},i=[];return e.nodes.forEach((function(e,t){r[t]=[],n[t]=[],i.push(e)})),e.rels.forEach((function(e){var i=t[e.from],a=t[e.to];void 0!==i&&void 0!==a&&(r[i].push(a),r[a].push(i),n[i].push(e.id),n[a].push(e.id),o[e.id]=e)})),this.relIdMap=n,{nodes:i,relationships:r,idToRel:o}}},{key:"coarsenTo",value:function(e){for(var t=this.graph,r=t.nodes.length,n=0;t.nodes.length>e&&t.relationships.some((function(e){return e.length>0}));){var o=this.coarsen(t,0===n);if(0===n&&(this.nodeSortMap=o.nodeSortMap),this.subGraphs.push(o.sortedInput),0===(t=o.output).relationships.length||t.relationships.every((function(e){return 0===e.length}))||r===t.nodes.length)break;r=t.nodes.length,n+=1}return this.subGraphs.push(t),t}},{key:"coarsenBy",value:function(e){for(var t=e,r=this.graph,n=r.nodes.length,o=t;t>0;){var i=this.coarsen(r,t===o);if(this.subGraphs.push(i.sortedInput),0===(r=i.output).relationships.length||r.relationships.every((function(e){return 0===e.length}))||n===r.nodes.length)break;n=r.nodes.length,t-=1}return this.subGraphs.push(r),r}},{key:"coarsen",value:function(e,t){var r=this,n=e.nodes,o=e.relationships,i=n.map((function(e,t){return t})),a={},u={};n.forEach((function(e,t){a[t]=e,u[e.id]=t}));for(var s=o.map((function(e){return e.slice()})),c={suns:{},planets:{},moons:{}},l=[],f=[],h=function(){var e=i[0];i.splice(i.indexOf(e),1),o[e].forEach((function(t){var r=i.indexOf(t);r>=0&&i.splice(r,1);var n=-1,o=s[t];o.forEach((function(t,r){var o=i.indexOf(t);o>=0?i.splice(o,1):t===e&&(n=r)})),o.splice(n,1)}));var r={id:e};if(t)r.originalId=a[e].id;else{var n=a[e];r.finestIndex=n.finestIndex,r.originalId=n.originalId}l.push(r),c.suns[e]=r};i.length>0;)h();l.forEach((function(e,t){f[t]=[]})),l.forEach((function(e,r){var n={},i=[];o[e.id].forEach((function(o){if(o!==e.id&&!n[o]){var u={id:o,parent:e,sunId:r,moons:[]},s=a[o];u.size=function(){return u.moons.length+1},u.weight=s.weight||1,u.children=function(){return u.moons},t?u.originalId=s.id:(u.finestIndex=s.finestIndex,u.originalId=s.originalId),i.push(u),n[o]=!0}})),i.forEach((function(e){c.planets[e.id]=e})),e.planets=i,e.children=function(){return e.planets},e.weight=e.planets.reduce((function(e,t){return e+(t.weight||1)}),0)+(a[e.id].weight||1),e.size=function(){return e.planets.reduce((function(e,t){return e+t.size()}),0)+1}}));var d=n.filter((function(e,t){return!l.find((function(e){return e.id===t}))&&!c.planets[t]})),p=[];d.forEach((function(e){for(var r=u[e.id],n=s[r],o=null,i=-1,l=0;l<n.length;l++){var f=n[l];if(f!==r&&(o=c.planets[f])){i=l;break}}if(n.splice(i,1),o){var h={id:r,size:function(){return 0}};h.weight=a[r].weight||1,h.parent=o,h.sunId=o.sunId,t?h.originalId=e.id:(h.finestIndex=e.finestIndex,h.originalId=e.originalId),c.moons[r]=h,o.moons.push(h),o.weight+=h.weight,o.parent.weight+=h.weight;var d=s[o.id];d.splice(d.indexOf(r),1)}else p.push(e)})),s.forEach((function(e,t){if(!c.suns[t]){var r=c.planets[t]||c.moons[t];s[t].forEach((function(e){var t=c.planets[e];if(t||(t=c.moons[e]),r.sunId!==t.sunId){var n=f[r.sunId];n.includes(t.sunId)||n.push(t.sunId)}}))}}));var v=[],y=0,b={};l.forEach((function(e,o){var i=n[e.id];b[e.id]=y,e.previousIndex=o,e.id=y,y+=1,t&&(i.finestIndex=e.id,e.finestIndex=e.id),v.push(i),e.planets.forEach((function(o){var i=n[o.id];b[o.id]=y,o.id=y,y+=1,o.sunId=e.id,t&&(i.finestIndex=o.id),r.sunMap[o.originalId]=e.originalId,v.push(i),o.moons.forEach((function(o){var i=n[o.id];b[o.id]=y,o.id=y,y+=1,o.sunId=e.id,t&&(i.finestIndex=o.id),r.sunMap[o.originalId]=e.originalId,v.push(i)}))}))}));var m=[],g=[];return o.forEach((function(e,n){var o=b[n];m[o]=e.map((function(e){return b[e]})),t&&(g[o]=e.map((function(e,t){return r.relIdMap[n][t]})))})),g&&g.length>0&&(this.relIdMap=g),{output:{nodes:l,relationships:f},sortedInput:{nodes:v,relationships:m},nodeSortMap:b}}}],r&&Bo(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),Wo=function(e,t,r){for(var n=2*Math.PI/r,o=[],i=0;i<r;i++){var a=n*i;o.push({x:e.x+t*Math.cos(a),y:e.y+t*Math.sin(a)})}return o};function Go(e){return Go="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Go(e)}function qo(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Ho(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ho(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Ho(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Yo(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Zo(n.key),n)}}function Xo(e,t,r){return(t=Zo(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Zo(e){var t=function(e,t){if("object"!=Go(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=Go(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Go(t)?t:String(t)}var Ko="PhysLayout",$o=new Float32Array(4),Qo=256,Jo=function(e){for(var t={},r={},n=0;n<e.length;n++)t[e[n].id]=n,r[n]=e[n].id;return{nodeIdToIndex:t,nodeIndexToId:r}},ei=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Xo(this,"physVbo",void 0),Xo(this,"physSmallVbo",void 0),Xo(this,"physProjection",void 0),Xo(this,"physSmallProjection",void 0),Xo(this,"gl",void 0),Xo(this,"useReadpixelWorkaround",void 0),Xo(this,"averageNodeSize",void 0),Xo(this,"shouldUpdate",void 0),Xo(this,"iterationCount",void 0),Xo(this,"lastSpeedValues",void 0),Xo(this,"rollingAvgGraphSpeed",void 0),Xo(this,"nodeVariation",void 0),Xo(this,"nodeCenterPoint",void 0),Xo(this,"peakIterationMultiplier",void 0),Xo(this,"stateDisposers",void 0),Xo(this,"state",void 0),Xo(this,"dpr",void 0),Xo(this,"intelWorkaround",void 0),Xo(this,"simulationStopVelocitySquared",void 0),Xo(this,"gravity",void 0),Xo(this,"force",void 0),Xo(this,"nodeIdToIndex",void 0),Xo(this,"nodeIndexToId",void 0),Xo(this,"numNodes",void 0),Xo(this,"solarMerger",void 0),Xo(this,"subGraphs",void 0),Xo(this,"nodeSortMap",void 0),Xo(this,"firstUpdate",void 0),Xo(this,"curPhysData",void 0),Xo(this,"apprxRepForceShader",void 0),Xo(this,"levelsClusterTexture",void 0),Xo(this,"levelsFinestIndexTexture",void 0),Xo(this,"initalLevelTexture",void 0),Xo(this,"levelsData",void 0),Xo(this,"collisionDetectionMultiplier",void 0),Xo(this,"physShader",void 0),Xo(this,"physData",void 0),Xo(this,"workaroundData",void 0),Xo(this,"pinData",void 0),Xo(this,"updateData",void 0),Xo(this,"updateShader",void 0),Xo(this,"workaroundShader",void 0),Xo(this,"physPositions",void 0),Xo(this,"springTexture",void 0),Xo(this,"sizeTexture",void 0),Xo(this,"offsetTexture",void 0),Xo(this,"pinTexture",void 0),Xo(this,"addedNodes",void 0),Xo(this,"updateTexture",void 0),Xo(this,"enableVerlet",void 0);var n=t.state,o=t.webGLContext;if(Vn.info("layout - webGLContext",Boolean(o)),void 0===t.webGLContext)throw new Error("PhysLayout missing options: webGLContext - webgl context");if(void 0===t.state)throw new Error("PhysLayout missing options: state - state object");var i=o;this.checkCompatibility(i),this.printGlStats(i),this.physVbo=i.createBuffer(),i.bindBuffer(i.ARRAY_BUFFER,this.physVbo);var a=new Float32Array([0,0,yn,0,0,yn,yn,yn]);i.bufferData(i.ARRAY_BUFFER,a,i.STATIC_DRAW),this.physSmallVbo=i.createBuffer(),i.bindBuffer(i.ARRAY_BUFFER,this.physSmallVbo);var u=new Float32Array([0,0,Qo,0,0,Qo,Qo,Qo]);i.bufferData(i.ARRAY_BUFFER,u,i.STATIC_DRAW),this.physProjection=wo(),Oo(this.physProjection,0,yn,yn,0,0,1e6),this.physSmallProjection=wo(),Oo(this.physSmallProjection,0,Qo,Qo,0,0,1e6),i.disable(i.DEPTH_TEST),this.gl=i,this.useReadpixelWorkaround&&this.setupReadpixelWorkaround(),this.setupUpdates(),this.averageNodeSize=mn,this.shouldUpdate=!0,this.iterationCount=0,this.lastSpeedValues=[],this.rollingAvgGraphSpeed=0,this.nodeVariation=0,this.nodeCenterPoint=[0,0],this.peakIterationMultiplier=160,this.setOptions(t,!0),this.definePhysicsArrays();var s=n.nodes,c=n.rels;s.addChannel(Ko),c.addChannel(Ko),this.stateDisposers=[],this.stateDisposers.push(n.reaction((function(){return n.graphUpdates}),(function(){var e=s.channels[Ko];if(void 0!==s.version&&e){var t=Object.values(e.adds).length>0,n=Object.values(e.removes).length>0,o=Object.values(e.updates),i=xn(o);(t||n||i)&&(r.shouldUpdate=!0,r.checkForUpdates())}var a=c.channels[Ko];if(void 0!==c.version&&a){var u=Object.values(a.adds).length>0,l=Object.values(a.removes).length>0;(u||l)&&(r.shouldUpdate=!0,r.checkForUpdates())}}))),this.setData({nodes:s.items,rels:c.items}),this.state=n,this.dpr=window.devicePixelRatio||1}var t,r;return t=e,r=[{key:"setOptions",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e){var r=e.intelWorkaround,n=e.simulationStopVelocity,o=e.gravity,i=e.enableVerlet,a=void 0!==i&&i;t&&(this.intelWorkaround=r,this.enableVerlet=a);var u=this.enableVerlet?.1:null!=n?n:100;this.simulationStopVelocitySquared=u*u,this.gravity=null!=o?o:100,this.force=0}}},{key:"setData",value:function(e){var t=Jo(e.nodes),r=t.nodeIdToIndex,n=t.nodeIndexToId;return this.nodeIdToIndex=r,this.nodeIndexToId=n,this.numNodes=e.nodes.length,this.solarMerger=new Vo(e,r),this.solarMerger.coarsenTo(1),this.subGraphs=this.solarMerger.subGraphs,this.nodeSortMap=this.solarMerger.nodeSortMap,this.setupSprings(this.subGraphs[0]),this.setupSize(this.subGraphs[0]),this.setupPhysics(),this.firstUpdate=!0,this.curPhysData=0,this.shouldUpdate=!0,this.iterationCount=0,this.subGraphs[0]}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.gl;if(this.checkForUpdates(e),!this.shouldUpdate)return t.bindFramebuffer(t.FRAMEBUFFER,this.getPhysData(0).frameBuffer),t.readPixels(0,0,yn,yn,t.RGBA,t.FLOAT,this.physPositions),!1;t.disable(t.BLEND);for(var r=this.nodeVariation/(this.numNodes||1)>.3,n=this.getScaleNumber(this.iterationCount),o=this.subGraphs?this.subGraphs.length:0,i=this.getPhysData(0).texture,a=o-1;a>0;a--){var u=this.subGraphs[a].nodes.length,s=a===o-1;this.apprxRepForceShader.use(),this.apprxRepForceShader.setUniform("u_physData",i),this.apprxRepForceShader.setUniform("u_clusterData",this.levelsClusterTexture[a]),this.apprxRepForceShader.setUniform("u_finestIndexes",this.levelsFinestIndexTexture[a]),this.apprxRepForceShader.setUniform("u_prevForce",s?this.initalLevelTexture:this.levelsData[a+1].texture),this.apprxRepForceShader.setUniform("u_numNodes",u),this.apprxRepForceShader.setUniform("u_iterationMultiplier",n),this.apprxRepForceShader.setUniform("u_baseLength",this.getBaseLength(u)),this.apprxRepForceShader.setUniform("u_isTopLevel",s?1:0),t.bindBuffer(t.ARRAY_BUFFER,this.physSmallVbo),this.apprxRepForceShader.setAttributePointer("a_position",2,0,2),t.bindFramebuffer(t.FRAMEBUFFER,this.levelsData[a].frameBuffer),t.viewport(0,0,Qo,Qo),t.drawArrays(t.TRIANGLE_STRIP,0,4)}if(this.collisionDetectionMultiplier=0,this.collisionDetectionMultiplier=r?Math.min(this.iterationCount/Math.min(this.numNodes,300),1):1,this.force=o<=1?this.initalLevelTexture:this.levelsData[1].texture,this.physShader.use(),this.physShader.setUniform("u_prevForce",o<=1?this.initalLevelTexture:this.levelsData[1].texture),this.physShader.setUniform("u_connections",this.springTexture),this.physShader.setUniform("u_sizeTexture",this.sizeTexture),this.physShader.setUniform("u_connectionOffsets",this.offsetTexture),this.physShader.setUniform("u_physData",i),this.physShader.setUniform("u_pinnedNodes",this.pinTexture),this.physShader.setUniform("u_iterationMultiplier",n),this.physShader.setUniform("u_curIteration",this.iterationCount),this.physShader.setUniform("u_numNodes",this.numNodes),this.physShader.setUniform("u_clusterData",this.levelsClusterTexture[0]),this.physShader.setUniform("u_collisionMultiplier",this.collisionDetectionMultiplier),this.physShader.setUniform("u_baseLength",this.getBaseLength()),this.firstUpdate=!1,t.bindBuffer(t.ARRAY_BUFFER,this.physVbo),this.physShader.setAttributePointer("a_position",2,0,2),t.bindFramebuffer(t.FRAMEBUFFER,this.getPhysData(1).frameBuffer),t.viewport(0,0,yn,yn),t.drawArrays(t.TRIANGLE_STRIP,0,4),this.useReadpixelWorkaround?this.doReadpixelWorkaround():(t.bindFramebuffer(t.FRAMEBUFFER,this.getPhysData(0).frameBuffer),t.readPixels(0,0,yn,yn,t.RGBA,t.FLOAT,this.physPositions)),this.curPhysData=(this.curPhysData+1)%this.physData.length,this.iterationCount+=1,this.numNodes<2)this.shouldUpdate=!1,this.iterationCount=0;else if(this.iterationCount%5==0){var c=this.iterationCount<300,l=c?this.getMaxSpeedSquared():this.getMedianSpeedSquared(this.addedNodes);this.lastSpeedValues.push(l),this.rollingAvgGraphSpeed=this.lastSpeedValues.reduce((function(e,t){return e+t}),0)/this.lastSpeedValues.length;var f=c&&l>=this.rollingAvgGraphSpeed,h=this.simulationStopVelocitySquared&&this.rollingAvgGraphSpeed<this.simulationStopVelocitySquared;this.lastSpeedValues.length>20&&this.lastSpeedValues.shift(),!f&&!0===h&&this.iterationCount>2&&this.terminateUpdate()}return this.shouldUpdate}},{key:"terminateUpdate",value:function(){Vn.info("Cooling down after ".concat(this.iterationCount," iterations at graph speed of ").concat(Math.sqrt(this.rollingAvgGraphSpeed))),this.shouldUpdate=!1,this.iterationCount=0,this.rollingAvgGraphSpeed=0,this.lastSpeedValues=[],this.addedNodes=null,this.nodeVariation=0}},{key:"getShouldUpdate",value:function(){return this.shouldUpdate}},{key:"getComputing",value:function(){return!1}},{key:"getNodePositions",value:function(e){var t=[];if(this.useReadpixelWorkaround){var r,n=qo(e);try{for(n.s();!(r=n.n()).done;){var o=r.value,i=this.nodeIdToIndex[o.id],a=o.id,u=void 0,s=void 0;void 0!==i&&(u=this.workaroundData[0].dataFloat[i],s=this.workaroundData[1].dataFloat[i]),t.push({id:a,x:u,y:s})}}catch(e){n.e(e)}finally{n.f()}}else{var c,l=qo(e);try{for(l.s();!(c=l.n()).done;){var f=c.value,h=this.nodeIdToIndex[f.id],d=f.id,p=void 0,v=void 0;void 0!==h&&(p=this.physPositions[4*h+0],v=this.physPositions[4*h+1]),t.push({id:d,x:p,y:v})}}catch(e){l.e(e)}finally{l.f()}}return t}},{key:"reheat",value:function(e){this.setupSize(this.subGraphs[0]),this.shouldUpdate=!0,this.iterationCount=0,this.nodeVariation=e.nodes.length}},{key:"updateNodes",value:function(e){var t=this.gl,r=new Set;t.bindTexture(t.TEXTURE_2D,this.getPhysData().texture);var n,o=qo(e);try{for(o.s();!(n=o.n()).done;){var i=n.value,a=this.nodeIdToIndex[i.id];if(void 0!==i.x&&void 0!==i.y){$o[0]=i.x,$o[1]=i.y,$o[2]=0,$o[3]=0;var u=a%yn,s=(a-u)/yn;t.texSubImage2D(t.TEXTURE_2D,0,u,s,1,1,t.RGBA,t.FLOAT,$o),this.useReadpixelWorkaround?(this.workaroundData[0].dataFloat[a]=i.x,this.workaroundData[1].dataFloat[a]=i.y):(this.physPositions[4*a+0]=i.x,this.physPositions[4*a+1]=i.y)}void 0!==i.pinned&&(this.pinData[a]=i.pinned?255:0),Object.keys(i).forEach((function(e){return r.add(e)}))}}catch(e){o.e(e)}finally{o.f()}r.has("pinned")&&(t.bindTexture(t.TEXTURE_2D,this.pinTexture),t.texImage2D(t.TEXTURE_2D,0,t.ALPHA,yn,yn,0,t.ALPHA,t.UNSIGNED_BYTE,this.pinData)),(r.has("x")||r.has("y")||r.has("size"))&&(this.shouldUpdate=!0,this.iterationCount=0)}},{key:"addRemoveData",value:function(e,t){var r=this.gl;this.numNodes=e.nodes.length,this.physShader.use(),this.physShader.setUniform("u_numNodes",this.numNodes),this.physShader.setUniform("u_baseLength",this.getBaseLength());var n=Jo(e.nodes).nodeIdToIndex,o=new Vo(e,n);o.coarsenTo(1);var i=o.subGraphs[0],a=this.subGraphs[0],u=function(e){return a.nodes.findIndex((function(t){return t.id===e}))},s=Object.values(t.adds),c=Object.values(t.removes);this.addedNodes=s.length>0?{}:null,this.nodeVariation=s.length+c.length;for(var l,f=3*Math.sqrt(e.nodes.length),h={x:0,y:0},d=i.nodes.length,p=new Uint8Array(65536),v=0;v<d;v++){var y=0,b=0,m=i.nodes[v];if(l=m.id,Boolean(t.adds[l])){if(this.addedNodes[v]=m.id,y=m.position?m.position.x:void 0,b=m.position?m.position.y:void 0,void 0===y||void 0===b){var g=o.sunMap,_=void 0;for(_=g[m.id];void 0!==_;_=g[_]){var w=u(_);if(-1!==w){var O=this.getNodePosition(w);y=O.x+10*(Math.random()-.5),b=O.y+10*(Math.random()-.5);break}}void 0===_&&(y=this.nodeCenterPoint[0]+f*(Math.random()-.5),b=this.nodeCenterPoint[1]+f*(Math.random()-.5))}this.updateData[2*v]=y,this.updateData[2*v+1]=b,p[v]=m.pinned?255:0}else{var S=u(m.id),E=this.getNodePosition(S);y=E.x,b=E.y,this.updateData[2*v]=S,this.updateData[2*v+1]=999999,p[v]=this.pinData[S]}h.x+=y||0,h.y+=b||0}this.nodeCenterPoint=d?[h.x/d,h.y/d]:[0,0],this.pinData=p,this.subGraphs=o.subGraphs,this.nodeSortMap=o.nodeSortMap,this.setupSprings(this.subGraphs[0]),this.setupSize(this.subGraphs[0]);var P=Jo(this.subGraphs[0].nodes),x=P.nodeIdToIndex,T=P.nodeIndexToId;return this.nodeIdToIndex=x,this.nodeIndexToId=T,r.bindTexture(r.TEXTURE_2D,this.updateTexture),r.texImage2D(r.TEXTURE_2D,0,r.ALPHA,yn,yn,0,r.ALPHA,r.FLOAT,this.updateData),Vn.info("Setting gravity center to ",this.nodeCenterPoint),this.physShader.setUniform("u_gravityCenter",this.nodeCenterPoint),this.updateShader.use(),this.updateShader.setUniform("u_numNodesNew",i.nodes.length),this.updateShader.setUniform("u_physData",this.getPhysData(0).texture),this.updateShader.setUniform("u_updateData",this.updateTexture),r.disable(r.BLEND),r.bindBuffer(r.ARRAY_BUFFER,this.physVbo),this.updateShader.setAttributePointer("a_position",2,0,2),r.bindFramebuffer(r.FRAMEBUFFER,this.getPhysData(1).frameBuffer),r.viewport(0,0,yn,yn),r.drawArrays(r.TRIANGLE_STRIP,0,4),this.curPhysData=(this.curPhysData+1)%this.physData.length,this.useReadpixelWorkaround?this.doReadpixelWorkaround():(r.bindFramebuffer(r.FRAMEBUFFER,this.getPhysData().frameBuffer),r.readPixels(0,0,yn,yn,r.RGBA,r.FLOAT,this.physPositions)),(s.length>0||c.length>0)&&(r.bindTexture(r.TEXTURE_2D,this.pinTexture),r.texImage2D(r.TEXTURE_2D,0,r.ALPHA,yn,yn,0,r.ALPHA,r.UNSIGNED_BYTE,this.pinData)),this.shouldUpdate=!0,this.iterationCount=0,this.setupPhysicsForCoarse(),this.subGraphs[0]}},{key:"destroy",value:function(){var e=this;this.gl.deleteBuffer(this.physVbo),this.gl.deleteBuffer(this.physSmallVbo),this.physData.forEach((function(t){e.gl.deleteFramebuffer(t.frameBuffer),e.gl.deleteTexture(t.texture)})),this.levelsData.forEach((function(t){e.gl.deleteFramebuffer(t.frameBuffer),e.gl.deleteTexture(t.texture)})),this.levelsClusterTexture.forEach((function(t){e.gl.deleteTexture(t)})),this.levelsFinestIndexTexture.forEach((function(t){e.gl.deleteTexture(t)})),this.gl.deleteTexture(this.initalLevelTexture),this.gl.deleteTexture(this.sizeTexture),this.gl.deleteTexture(this.offsetTexture),this.gl.deleteTexture(this.springTexture),this.gl.deleteTexture(this.pinTexture),this.gl.deleteTexture(this.updateTexture),void 0!==this.apprxRepForceShader&&this.apprxRepForceShader.remove(),void 0!==this.updateShader&&this.updateShader.remove(),void 0!==this.physShader&&this.physShader.remove(),this.physPositions=null,this.gl=null,this.stateDisposers.forEach((function(e){e()})),this.state.nodes.removeChannel(Ko),this.state.rels.removeChannel(Ko)}},{key:"dumpTexture",value:function(e,t,r){var n=this.gl;Vn.info("--- Dumping texture ",r),n.bindFramebuffer(n.FRAMEBUFFER,e),n.readPixels(0,0,yn,yn,n.RGBA,n.FLOAT,this.physPositions);for(var o=0;o<t;o++)Vn.info(o,": ",this.physPositions[4*o+0],this.physPositions[4*o+1],this.physPositions[4*o+2],this.physPositions[4*o+3])}},{key:"getScaleNumber",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e,t,r){return r+Math.pow(10,6)*Math.pow(e-120,-1.7)};return 0===e?0:e<300?200+-1/Math.pow(10,5)*3*Math.pow(Math.abs(e-200+12),3):t(e,200,10)}},{key:"getBaseLength",value:function(e){if(void 0===e||e===this.numNodes)return 100*this.dpr;var t=Math.pow(this.averageNodeSize/2,2)*Math.PI,r=this.numNodes/e*t;return(100+Math.sqrt(r/Math.PI)/2/e)*this.dpr}},{key:"checkForUpdates",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.state,r=t.nodes,n=t.rels,o={nodes:r.items,rels:n.items},i=Object.values(r.channels[Ko].adds).length>0,a=Object.values(n.channels[Ko].adds).length>0,u=Object.values(r.channels[Ko].removes).length>0,s=Object.values(n.channels[Ko].removes).length>0,c=Object.values(r.channels[Ko].updates);(i||a||u||s)&&this.addRemoveData(o,{adds:r.channels[Ko].adds,removes:r.channels[Ko].removes}),e?(this.updateNodes(o.nodes),this.reheat(o)):c.length>0&&(this.updateNodes(c),xn(c)&&this.reheat(o)),r.clearChannel(Ko),n.clearChannel(Ko)}},{key:"getNodePosition",value:function(e){return this.useReadpixelWorkaround?{x:this.workaroundData[0].dataFloat[e],y:this.workaroundData[1].dataFloat[e]}:{x:this.physPositions[4*e+0],y:this.physPositions[4*e+1]}}},{key:"getMaxSpeedSquared",value:function(){var e=0;if(this.useReadpixelWorkaround)for(var t=0;t<this.numNodes;t++){var r=this.workaroundData[2].dataFloat[t],n=this.workaroundData[3].dataFloat[t],o=r*r+n*n;o>e&&(e=o)}else for(var i=0;i<this.numNodes;i++){var a=this.physPositions[4*i+2],u=this.physPositions[4*i+3],s=a*a+u*u;s>e&&(e=s)}return e}},{key:"getMedianSpeedSquared",value:function(e){var t=[];if(this.useReadpixelWorkaround)for(var r=0;r<this.numNodes;r++){var n=this.workaroundData[2].dataFloat[r],o=this.workaroundData[3].dataFloat[r],i=n*n+o*o;t[r]=i}else for(var a=0;a<this.numNodes;a++)if(!e||e[a]){var u=this.physPositions[4*a+2],s=this.physPositions[4*a+3],c=u*u+s*s;t.push(c)}return t.sort((function(e,t){return e-t})),t[Math.floor(t.length/2)]}},{key:"getPhysData",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.physData[(this.curPhysData+e)%this.physData.length]}},{key:"newTexture",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.FLOAT,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:e.RGBA,i=e.createTexture();return e.bindTexture(e.TEXTURE_2D,i),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texImage2D(e.TEXTURE_2D,0,o,r,r,0,o,n,t),i}},{key:"newFramebuffer",value:function(e,t){var r=e.createFramebuffer();return e.bindFramebuffer(e.FRAMEBUFFER,r),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0),r}},{key:"checkCompatibility",value:function(e){function t(e){throw new Lo(e)}e||t("Could not initialize WebGL"),0===e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS)&&t("Vertex shader texture access not available"),e.getExtension("OES_texture_float")||t("OES_texture_float extension not available");var r=e.getParameter(e.MAX_TEXTURE_SIZE),n=Math.max(yn,bn);r<n&&t("Need larger WebGL texture support. Avaliable: ".concat(r," needed: ").concat(n));var o=new Float32Array(4),i=this.newTexture(e,o,1),a=this.newFramebuffer(e,i);e.bindFramebuffer(e.FRAMEBUFFER,a),e.readPixels(0,0,1,1,e.RGBA,e.FLOAT,o),e.getError()!==e.NO_ERROR&&(Vn.info("gl.readPixels doesnt work for float texture, activating workaround"),this.useReadpixelWorkaround=!0),e.bindFramebuffer(e.FRAMEBUFFER,null),e.deleteFramebuffer(a),e.deleteTexture(i)}},{key:"printGlStats",value:function(e){var t=e.getExtension("WEBGL_debug_renderer_info"),r="?",n="?";null!==t&&(r=e.getParameter(t.UNMASKED_VENDOR_WEBGL),n=e.getParameter(t.UNMASKED_RENDERER_WEBGL)),Vn.trace("Vendor: ".concat(r)),Vn.trace("Renderer: ".concat(n));var o=e.getParameter(e.ALIASED_LINE_WIDTH_RANGE);Vn.trace("Line width range: ".concat(o));var i=e.getSupportedExtensions();Vn.trace("Extentions:"),i.length>0&&i.forEach((function(e){return Vn.trace(e)}))}},{key:"adjustToGlSize",value:function(e){return e*this.dpr*2.5}},{key:"setupSize",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{nodes:[]},t=new Float32Array(65536),r=e.nodes,n=r.length,o=0,i=0;i<n;i++){var a,u=parseInt(null!==(a=r[i].size)&&void 0!==a?a:mn,10);t[i]=this.adjustToGlSize(u),o+=u}this.averageNodeSize=n?o/n:mn;var s=this.gl;void 0===this.sizeTexture&&(this.sizeTexture=s.createTexture()),s.bindTexture(s.TEXTURE_2D,this.sizeTexture),s.texImage2D(s.TEXTURE_2D,0,s.ALPHA,yn,yn,0,s.ALPHA,s.FLOAT,t),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MAG_FILTER,s.NEAREST),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MIN_FILTER,s.NEAREST),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_S,s.CLAMP_TO_EDGE),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_T,s.CLAMP_TO_EDGE)}},{key:"setupSprings",value:function(e){var t,r,n=this.gl,o=e.relationships,i=new Float32Array(16777216),a=new Float32Array(65536),u=0;for(t=0;t<e.nodes.length;t++)for(a[t]=u,i[u]=o[t].length,u+=1,r=0;r<o[t].length;r++)i[u]=o[t][r],u+=1;for(r=u;r<i.length;r++)i[r]=1;for(r=t;r<a.length;r++)a[r]=0;void 0===this.offsetTexture&&(this.offsetTexture=n.createTexture()),n.bindTexture(n.TEXTURE_2D,this.offsetTexture),n.texImage2D(n.TEXTURE_2D,0,n.ALPHA,yn,yn,0,n.ALPHA,n.FLOAT,a),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.NEAREST),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),void 0===this.springTexture&&(this.springTexture=n.createTexture()),n.bindTexture(n.TEXTURE_2D,this.springTexture),n.texImage2D(n.TEXTURE_2D,0,n.ALPHA,bn,bn,0,n.ALPHA,n.FLOAT,i),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.NEAREST),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE)}},{key:"setupPhysics",value:function(){this.setupPhysicsForCoarse(),this.setupPhysicsForNodes(),this.physPositions=new Float32Array(262144),this.setupPinData()}},{key:"setupPhysicsForNodes",value:function(){var e=this.gl,t=this.subGraphs.length,r=this.subGraphs[0].nodes,n=3*Math.sqrt(r.length),o=new Float32Array(262144),i=new Float32Array(262144);this.numNodes=r.length;for(var a=0;a<262144;a++)o[a]=0,i[a]=0;for(var u=function(e,t,r,n){n[4*e+0]=t,n[4*e+1]=r,n[4*e+2]=0,n[4*e+3]=0},s=t-1;s>=0;s--){var c=s===t-1?[]:this.subGraphs[s+1].nodes;0===c.length?this.subGraphs[s].nodes.forEach((function(e,t){var r=e.placement?e.placement.x:n*(Math.random()-.5),i=e.placement?e.placement.y:n*(Math.random()-.5);u(void 0===e.finestIndex?t:e.finestIndex,r,i,o)})):c.forEach((function(e){var t=e.finestIndex,r=o[4*e.finestIndex],n=o[4*e.finestIndex+1],i=Wo({x:r,y:n},10,e.planets.length+1);t+=1,e.planets.forEach((function(e,r){var n=i[r];u(t+=1,n.x,n.y,o);var a=Wo({x:n.x,y:n.y},10,e.moons.length+1);e.moons.forEach((function(e,r){var n=a[r];u(t+=1,n.x,n.y,o)}))}))}))}this.physData=[];for(var l=0;l<2;l++){var f=this.newTexture(e,0===l?o:i,yn),h=this.newFramebuffer(e,f);this.physData.push({texture:f,frameBuffer:h})}var d=this.enableVerlet?"precision mediump float;\n\nuniform sampler2D u_physData;\nuniform sampler2D u_connections;\nuniform sampler2D u_connectionOffsets;\nuniform sampler2D u_pinnedNodes;\nuniform sampler2D u_sizeTexture;\nuniform float u_baseLength;\nuniform float u_curIteration;\nuniform float u_iterationMultiplier;\nuniform vec2 u_gravityCenter;\nuniform float u_numNodes;\nuniform float u_gravity;\n\nuniform sampler2D u_clusterData;\nuniform sampler2D u_prevForce;\nuniform float u_collisionMultiplier;\n\n\nfloat DAMP = 0.6;\nfloat COOL = 0.99998;\nfloat TEMP = max(0.02, pow(COOL, u_curIteration));\nfloat TIMESTEP = 1.0 / 30.0;\nfloat VELOCITYDECAY = 0.6;\nfloat accLimitLow = 500000.0;\nfloat accLimitHigh = 750000.0;\nfloat accLimitPosHigh = 10000000.0;\n\nconst float denseNodeThreshold = 1000.0;\nconst float MIN_DISTANCE = 0.00000001;\nconst float MAX_DISTANCE = 1000000000.0;\nconst float MAX_ACCELERATION = 50000.0;\n\nvec4 getTextureData(sampler2D texture, float index, float base) {\n float x = mod(index, base);\n float y = (index - x) / base;\n return texture2D(texture, vec2(x + 0.5, y + 0.5) / base);\n}\n\nbool isNan(float val) {\n return (val < 0.0 || 0.0 < val || val == 0.0) ? false : true;\n}\n\nconst float BIG_NUMBER = 999999999999999999.0;\nbool isInf(float val) {\n return val > BIG_NUMBER || val < -BIG_NUMBER;\n}\n\nvec2 getDelta(vec2 v1, vec2 v2) {\n vec2 delta = v1 - v2;\n float dist = length(delta);\n if (dist < MIN_DISTANCE || isNan(dist)) {\n return vec2(MIN_DISTANCE, MIN_DISTANCE);\n }\n if (dist > MAX_DISTANCE) {\n vec2 normDelta = delta / dist;\n return normDelta * MAX_DISTANCE;\n }\n return delta;\n}\n\nvec4 getOtherNodePosition(float i) {\n return getTextureData(u_physData, i, 256.0);\n}\n\nfloat getCombinedNodeSize(float i, float nodeSize) {\n float otherNodeSize = getTextureData(u_sizeTexture, i, 256.0).a;\n return nodeSize + otherNodeSize;\n}\n\nvec2 getSpringForce(float curConnection, float numConnections, float springFScale, vec4 myPosition, float i) {\n float curSpring = getTextureData(u_connections, curConnection + i, 4096.0).a;\n\n vec4 otherPosition = getTextureData(u_physData, curSpring, 256.0);\n float otherDataPosition = getTextureData(u_connectionOffsets, curSpring, 256.0).a;\n float avgDegree;\n#if INTEL_WORKAROUND\n avgDegree = max(numConnections, 4.0);\n#else\n float otherNumConnections = getTextureData(u_connections, otherDataPosition, 4096.0).a;\n avgDegree = max((otherNumConnections + numConnections * 3.0) / 4.0, 4.0);\n#endif\n\n vec2 delta = getDelta(myPosition.xy, otherPosition.xy);\n float dist = length(delta);\n\n float F = (dist * dist * springFScale) / (u_baseLength * avgDegree);\n if (u_collisionMultiplier > 0.0) {\n F *= u_collisionMultiplier;\n }\n return (-delta / dist) * F;\n}\n\nvec2 getCollisionForce(float combinedNodeSize, float dist, float fScale, vec2 delta) {\n float collisionForce = (combinedNodeSize - dist) / (dist);\n if (u_collisionMultiplier > 0.0) {\n collisionForce *= u_collisionMultiplier;\n }\n return (delta * collisionForce * fScale * combinedNodeSize) / (combinedNodeSize + 1.0);\n}\n\nvec2 getRepulsionForce(float dist, float fScale, vec2 delta) {\n float F = (u_baseLength * u_baseLength * fScale) / (dist);\n return (delta / dist) * F * 0.05;\n}\n\nvoid main(void) {\n float textureSide = 256.0; //#TEXTURE_SIDE#;\n float index = (gl_FragCoord.x - 0.5) + (gl_FragCoord.y - 0.5) * textureSide;\n\n if (index >= u_numNodes) {\n discard;\n }\n\n vec4 clusterData = getTextureData(u_clusterData, index, 256.0);\n\n float clusterIndex = clusterData.x;\n float clusterStartIndex = clusterData.y;\n float clusterSize = clusterData.z;\n float clusterWeight = clusterData.w;\n\n vec4 myPosition = getTextureData(u_physData, index, 256.0);\n vec4 previousForce = getTextureData(u_prevForce, clusterIndex, 256.0);\n\n vec2 acceleration = previousForce.xy;\n\n float isPinned = getTextureData(u_pinnedNodes, index, 256.0).a;\n float nodeSize = getTextureData(u_sizeTexture, index, 256.0).a;\n\n if (isPinned > 0.5) {\n gl_FragColor = vec4(myPosition.xy, 0.0, 0.0);\n return;\n }\n\n float curConnection = getTextureData(u_connectionOffsets, index, 256.0).a;\n float numConnections = getTextureData(u_connections, curConnection, 4096.0).a;\n\n float fScale = 1.0 + sqrt(u_iterationMultiplier);\n float springFScale = fScale;\n\n if (numConnections > denseNodeThreshold) {\n springFScale = sqrt(fScale);\n }\n\n float numOfRels = 0.0;\n\n // Springs\n for (float i = 1.0; i <= 256.0 * 256.0; i++) {\n if (numOfRels >= numConnections) {\n break;\n }\n acceleration += getSpringForce(curConnection, numConnections, springFScale, myPosition, i);\n numOfRels += 1.0;\n }\n\n // Repulsion && collision detection\n if (u_collisionMultiplier > 0.0) {\n float number_of_collisions = 0.0;\n for (float i = 0.0; i < 256.0 * 256.0; i++) {\n if (i >= u_numNodes) {\n break;\n }\n\n if (i == index) {\n continue;\n }\n\n vec4 otherPosition = getOtherNodePosition(i);\n vec2 delta = getDelta(myPosition.xy, otherPosition.xy);\n float dist = length(delta);\n float combinedNodeSize = getCombinedNodeSize(i, nodeSize) * 2.0;\n\n if (dist < combinedNodeSize && number_of_collisions < 40.0) {\n number_of_collisions++;\n acceleration += getCollisionForce(combinedNodeSize, dist, fScale, delta);\n }\n\n if (i >= clusterStartIndex && i < clusterStartIndex + clusterSize) {\n acceleration += getRepulsionForce(dist, fScale, delta);\n }\n }\n } else {\n for (float i = 0.0; i < 256.0 * 256.0; i++) {\n if (i >= clusterStartIndex + clusterSize || i >= u_numNodes) {\n break;\n }\n\n if (i < clusterStartIndex || i == index) {\n continue;\n }\n\n vec4 otherPosition = getOtherNodePosition(i);\n vec2 delta = getDelta(myPosition.xy, otherPosition.xy);\n float dist = length(delta);\n float combinedNodeSize = getCombinedNodeSize(i, nodeSize);\n\n if (dist < combinedNodeSize) {\n acceleration += getCollisionForce(combinedNodeSize, dist, fScale, delta);\n }\n\n acceleration += getRepulsionForce(dist, fScale, delta);\n }\n }\n\n // Gravity\n vec2 delta = getDelta(u_gravityCenter, myPosition.xy);\n float dist = length(delta);\n\n vec2 grav = (delta / dist) * u_gravity * fScale;\n acceleration += grav * smoothstep(0.0, 500.0, dist);\n\n float accMagnitude = length(acceleration);\n acceleration *= min(MAX_ACCELERATION, accMagnitude) / accMagnitude;\n\n float iterationFrictionThreshold = 1000.0;\n\n if (u_curIteration > iterationFrictionThreshold) {\n float friction = 1.0 + pow((u_curIteration - iterationFrictionThreshold), 2.0) / 100.0;\n acceleration *= 1.0 / friction;\n }\n\n if (u_curIteration == 0.0) {\n gl_FragColor = vec4(myPosition.xy, myPosition.zw);\n } else {\n vec2 prevVelocity = myPosition.zw;\n vec2 currentPos = myPosition.xy;\n vec2 prevPos = currentPos - prevVelocity;\n\n vec2 newPos = currentPos + TEMP * ( DAMP * (prevVelocity) + acceleration * TIMESTEP * TIMESTEP);\n vec2 newVelocity = newPos - currentPos;\n gl_FragColor = vec4(newPos, newVelocity);\n }\n}":"precision mediump float;\n\nuniform sampler2D u_physData;\nuniform sampler2D u_connections;\nuniform sampler2D u_connectionOffsets;\nuniform sampler2D u_pinnedNodes;\nuniform sampler2D u_sizeTexture;\nuniform float u_baseLength;\nuniform float u_curIteration;\nuniform float u_iterationMultiplier;\nuniform vec2 u_gravityCenter;\nuniform float u_numNodes;\nuniform float u_gravity;\n\nuniform sampler2D u_clusterData;\nuniform sampler2D u_prevForce;\nuniform float u_collisionMultiplier;\n\nfloat TIMESTEP = 1.0 / 30.0;\nfloat VELOCITYDECAY = 0.6;\nfloat accLimitLow = 500000.0;\nfloat accLimitHigh = 750000.0;\nfloat accLimitPosHigh = 10000000.0;\n\nconst float denseNodeThreshold = 1000.0;\nconst float MIN_DISTANCE = 0.00000001;\nconst float MAX_DISTANCE = 1000000000.0;\nconst float MAX_ACCELERATION = 500000.0;\n\nvec4 getTextureData(sampler2D texture, float index, float base) {\n float x = mod(index, base);\n float y = (index - x) / base;\n return texture2D(texture, vec2(x + 0.5, y + 0.5) / base);\n}\n\nbool isNan(float val) {\n return (val < 0.0 || 0.0 < val || val == 0.0) ? false : true;\n}\n\nconst float BIG_NUMBER = 999999999999999999.0;\nbool isInf(float val) {\n return val > BIG_NUMBER || val < -BIG_NUMBER;\n}\n\nvec2 getDelta(vec2 v1, vec2 v2) {\n vec2 delta = v1 - v2;\n float dist = length(delta);\n if (dist < MIN_DISTANCE || isNan(dist)) {\n return vec2(MIN_DISTANCE, MIN_DISTANCE);\n }\n if (dist > MAX_DISTANCE) {\n vec2 normDelta = delta / dist;\n return normDelta * MAX_DISTANCE;\n }\n return delta;\n}\n\nvec4 getOtherNodePosition(float i) {\n return getTextureData(u_physData, i, 256.0);\n}\n\nfloat getCombinedNodeSize(float i, float nodeSize) {\n float otherNodeSize = getTextureData(u_sizeTexture, i, 256.0).a;\n return nodeSize + otherNodeSize;\n}\n\nvec2 getSpringForce(float curConnection, float numConnections, float springFScale, vec4 myPosition, float i) {\n float curSpring = getTextureData(u_connections, curConnection + i, 4096.0).a;\n\n vec4 otherPosition = getTextureData(u_physData, curSpring, 256.0);\n float otherDataPosition = getTextureData(u_connectionOffsets, curSpring, 256.0).a;\n float avgDegree;\n#if INTEL_WORKAROUND\n avgDegree = max(numConnections, 4.0);\n#else\n float otherNumConnections = getTextureData(u_connections, otherDataPosition, 4096.0).a;\n avgDegree = max((otherNumConnections + numConnections * 3.0) / 4.0, 4.0);\n#endif\n\n vec2 delta = getDelta(myPosition.xy, otherPosition.xy);\n float dist = length(delta);\n\n float F = (dist * dist * springFScale) / (u_baseLength * avgDegree);\n if (u_collisionMultiplier > 0.0) {\n F *= u_collisionMultiplier;\n }\n return (-delta / dist) * F;\n}\n\nvec2 getCollisionForce(float combinedNodeSize, float dist, float fScale, vec2 delta) {\n float collisionForce = ((combinedNodeSize - dist) / dist);\n if (u_collisionMultiplier > 0.0) {\n collisionForce *= u_collisionMultiplier;\n }\n return (delta * collisionForce * fScale * combinedNodeSize) / (combinedNodeSize + 1.0);\n}\n\nvec2 getRepulsionForce(float dist, float fScale, vec2 delta) {\n float F = (u_baseLength * u_baseLength * (fScale / 1.5)) / dist;\n return (delta / dist) * F * 0.05;\n}\n\nvoid main(void) {\n float textureSide = 256.0; //#TEXTURE_SIDE#;\n float index = (gl_FragCoord.x - 0.5) + (gl_FragCoord.y - 0.5) * textureSide;\n\n if (index >= u_numNodes) {\n discard;\n }\n\n vec4 clusterData = getTextureData(u_clusterData, index, 256.0);\n\n float clusterIndex = clusterData.x;\n float clusterStartIndex = clusterData.y;\n float clusterSize = clusterData.z;\n float clusterWeight = clusterData.w;\n\n vec4 myPosition = getTextureData(u_physData, index, 256.0);\n vec4 previousForce = getTextureData(u_prevForce, clusterIndex, 256.0);\n\n vec2 acceleration = previousForce.xy;\n\n float isPinned = getTextureData(u_pinnedNodes, index, 256.0).a;\n float nodeSize = getTextureData(u_sizeTexture, index, 256.0).a;\n\n if (isPinned > 0.5) {\n gl_FragColor = vec4(myPosition.xy, 0.0, 0.0);\n return;\n }\n\n float curConnection = getTextureData(u_connectionOffsets, index, 256.0).a;\n float numConnections = getTextureData(u_connections, curConnection, 4096.0).a;\n\n float fScale = 1.0 + sqrt(u_iterationMultiplier);\n float springFScale = fScale;\n\n if (numConnections > denseNodeThreshold) {\n springFScale = sqrt(fScale);\n }\n\n float numOfRels = 0.0;\n\n // Springs\n for (float i = 1.0; i <= 256.0 * 256.0; i++) {\n if (numOfRels >= numConnections) {\n break;\n }\n acceleration += getSpringForce(curConnection, numConnections, springFScale, myPosition, i);\n numOfRels += 1.0;\n }\n\n // Repulsion && collision detection\n if (u_collisionMultiplier > 0.0) {\n float number_of_collisions = 0.0;\n for (float i = 0.0; i < 256.0 * 256.0; i++) {\n if (i >= u_numNodes) {\n break;\n }\n\n if (i == index) {\n continue;\n }\n\n vec4 otherPosition = getOtherNodePosition(i);\n vec2 delta = getDelta(myPosition.xy, otherPosition.xy);\n float dist = length(delta);\n float combinedNodeSize = getCombinedNodeSize(i, nodeSize) * 2.0;\n\n if (dist < combinedNodeSize && number_of_collisions < 40.0) {\n number_of_collisions++;\n acceleration += getCollisionForce(combinedNodeSize, dist, fScale, delta);\n }\n\n if (i >= clusterStartIndex && i < clusterStartIndex + clusterSize) {\n acceleration += getRepulsionForce(dist, fScale, delta);\n }\n }\n } else {\n for (float i = 0.0; i < 256.0 * 256.0; i++) {\n if (i >= clusterStartIndex + clusterSize || i >= u_numNodes) {\n break;\n }\n\n if (i < clusterStartIndex || i == index) {\n continue;\n }\n\n vec4 otherPosition = getOtherNodePosition(i);\n vec2 delta = getDelta(myPosition.xy, otherPosition.xy);\n float dist = length(delta);\n float combinedNodeSize = getCombinedNodeSize(i, nodeSize);\n\n if (dist < combinedNodeSize) {\n acceleration += getCollisionForce(combinedNodeSize, dist, fScale, delta);\n }\n\n acceleration += getRepulsionForce(dist, fScale, delta);\n }\n }\n\n // Gravity\n vec2 delta = getDelta(u_gravityCenter, myPosition.xy);\n float dist = length(delta);\n\n vec2 grav = (delta / dist) * u_gravity * fScale;\n acceleration += grav * smoothstep(0.0, 500.0, dist);\n\n float accMagnitude = length(acceleration);\n acceleration *= min(MAX_ACCELERATION, accMagnitude) / accMagnitude;\n\n float iterationFrictionThreshold = 1000.0;\n\n if (u_curIteration > iterationFrictionThreshold) {\n float friction = 1.0 + pow((u_curIteration - iterationFrictionThreshold), 2.0) / 100.0;\n acceleration *= 1.0 / friction;\n }\n\n if (u_curIteration == 0.0) {\n gl_FragColor = vec4(myPosition.xy, acceleration * TIMESTEP * 0.5);\n } else {\n myPosition.zw = myPosition.zw * VELOCITYDECAY;\n gl_FragColor = vec4(myPosition.xy + myPosition.zw * TIMESTEP, myPosition.zw + acceleration * TIMESTEP);\n }\n}";this.physShader=new Co(e,Uo,d,{INTEL_WORKAROUND:this.intelWorkaround?1:0}),this.physShader.use(),this.physShader.setUniform("u_projection",this.physProjection),this.physShader.setUniform("u_baseLength",this.getBaseLength()),this.physShader.setUniform("u_connections",this.springTexture),this.physShader.setUniform("u_sizeTexture",this.sizeTexture),this.physShader.setUniform("u_connectionOffsets",this.offsetTexture),this.physShader.setUniform("u_pinnedNodes",this.pinTexture),this.physShader.setUniform("u_gravityCenter",this.nodeCenterPoint),this.physShader.setUniform("u_numNodes",this.numNodes),this.physShader.setUniform("u_gravity",this.gravity)}},{key:"setupPhysicsForCoarse",value:function(){var e=this,t=this.gl;this.levelsData=[],this.levelsClusterTexture=[],this.levelsFinestIndexTexture=[];var r,n,o=this.subGraphs.length,i=function(e,t,n,o,i){r[4*e+0]=t,r[4*e+1]=n,r[4*e+2]=i.size(),r[4*e+3]=o||1};if(1===o){r=new Float32Array(262144);var a=this.subGraphs[0].nodes;a.forEach((function(e,t){i(t,0,0,e.weight,{size:function(){return a.length}})})),this.levelsClusterTexture[0]=this.newTexture(t,r,Qo)}else for(var u=function(){var o=e.subGraphs[s].nodes,a=s===e.subGraphs.length-1?[]:e.subGraphs[s+1].nodes;r=new Float32Array(262144),n=new Float32Array(65536);var u=0;if(a.length>0){var c=a.slice();c.sort((function(e,t){return e.previousIndex-t.previousIndex})),c.forEach((function(e,t){var r=u,s=a.indexOf(e);i(u,s,r,o[e.id].weight,e),n[u]=o[u].finestIndex,u+=1,e.planets.forEach((function(t){i(u,s,r,t.weight,e),n[u]=o[u].finestIndex,u+=1,t.moons.forEach((function(t){i(u,s,r,t.weight,e),n[u]=o[u].finestIndex,u+=1}))}))}))}else o.forEach((function(e,t){i(t,0,0,e.weight,{size:function(){return o.length}}),n[t]=o[t].finestIndex}));var l=e.newTexture(t,null,Qo),f=e.newFramebuffer(t,l);e.levelsData[s]={texture:l,frameBuffer:f},e.levelsClusterTexture[s]=e.newTexture(t,r,Qo),e.levelsFinestIndexTexture[s]=e.newTexture(t,n,yn,t.FLOAT,t.ALPHA)},s=this.subGraphs.length-1;s>=0;s--)u();for(var c=new Float32Array(262144),l=0;l<c.length;l++)c[l]=0;this.initalLevelTexture=this.newTexture(t,c,Qo);var f=this.enableVerlet?"precision mediump float;\nuniform sampler2D u_physData;\nuniform sampler2D u_clusterData;\nuniform sampler2D u_finestIndexes;\nuniform sampler2D u_prevForce;\n\nuniform float u_baseLength;\nuniform float u_numNodes;\nuniform float u_iterationMultiplier;\nuniform float u_isTopLevel;\n\nfloat PI = 3.1415926535897932384626433832795;\nfloat TIMESTEP = 1.0 / 30.0;\nfloat VELOCITYDECAY = 0.6;\n\nvec4 getTextureData(sampler2D texture, float index, float base) {\n float x = mod(index, base);\n float y = (index - x) / base;\n return texture2D(texture, vec2(x + 0.5, y + 0.5) / base);\n}\n\nfloat getLogClusterWeight(float value) {\n return value / max(log(value), 1.0);\n}\n\nvoid main(void) {\n float index = (gl_FragCoord.x - 0.5) + (gl_FragCoord.y - 0.5) * 256.0;\n\n if (index >= u_numNodes) {\n discard;\n }\n\n vec4 clusterData = getTextureData(u_clusterData, index, 256.0);\n\n float clusterIndex = clusterData.x;\n float clusterStartIndex = clusterData.y;\n float clusterSize = clusterData.z;\n float clusterRadius = (clusterSize * 0.5) + u_baseLength;\n float clusterArea = PI * clusterRadius * clusterRadius;\n\n float finestIndex = getTextureData(u_finestIndexes, index, 256.0).a;\n vec4 myPosition = getTextureData(u_physData, finestIndex, 256.0);\n vec4 previousForce = getTextureData(u_prevForce, clusterIndex, 256.0);\n float fScale = 1.0 + sqrt(u_iterationMultiplier);\n\n vec2 acceleration = previousForce.xy;\n\n // Repulsion & Collision Detection\n for (float i = 0.0; i < 256.0 * 256.0; i++) {\n if (i >= clusterStartIndex + clusterSize || i >= u_numNodes) {\n break;\n }\n if (i < clusterStartIndex || i == index) {\n continue;\n }\n\n vec4 otherClusterData = getTextureData(u_clusterData, i, 256.0);\n float otherClusterWeight = getLogClusterWeight(otherClusterData.w);\n\n float otherFinestIndex = getTextureData(u_finestIndexes, i, 256.0).a;\n vec4 otherPosition = getTextureData(u_physData, otherFinestIndex, 256.0);\n\n vec2 delta = myPosition.xy - otherPosition.xy;\n float dist = max(length(delta), 0.0000001);\n float maxDist = 25.0;\n float repulsionForceScale = 0.1;\n\n float F = (clusterArea * fScale) / (dist * dist);\n\n if (u_isTopLevel == 1.0) {\n repulsionForceScale = 0.3;\n }\n\n acceleration += ((delta / sqrt(dist)) * F) * repulsionForceScale * otherClusterWeight;\n\n if (dist < maxDist) {\n float collide = (maxDist - dist) / (dist * dist);\n acceleration += delta * collide * fScale * maxDist / (maxDist + 1.0);\n }\n }\n\n gl_FragColor = vec4(acceleration, vec2(finestIndex, 0));\n}":"precision mediump float;\nuniform sampler2D u_physData;\nuniform sampler2D u_clusterData;\nuniform sampler2D u_finestIndexes;\nuniform sampler2D u_prevForce;\n\nuniform float u_baseLength;\nuniform float u_numNodes;\nuniform float u_iterationMultiplier;\nuniform float u_isTopLevel;\n\nfloat TIMESTEP = 1.0 / 30.0;\nfloat VELOCITYDECAY = 0.6;\n\nvec4 getTextureData(sampler2D texture, float index, float base) {\n float x = mod(index, base);\n float y = (index - x) / base;\n return texture2D(texture, vec2(x + 0.5, y + 0.5) / base);\n}\n\nfloat getLogClusterWeight(float value) {\n return value / max(log(value), 1.0);\n}\n\nvoid main(void) {\n float index = (gl_FragCoord.x - 0.5) + (gl_FragCoord.y - 0.5) * 256.0;\n\n if (index >= u_numNodes) {\n discard;\n }\n\n vec4 clusterData = getTextureData(u_clusterData, index, 256.0);\n\n float clusterIndex = clusterData.x;\n float clusterStartIndex = clusterData.y;\n float clusterSize = clusterData.z;\n\n float finestIndex = getTextureData(u_finestIndexes, index, 256.0).a;\n vec4 myPosition = getTextureData(u_physData, finestIndex, 256.0);\n vec4 previousForce = getTextureData(u_prevForce, clusterIndex, 256.0);\n float fScale = 1.0 + sqrt(u_iterationMultiplier);\n\n vec2 acceleration = previousForce.xy;\n\n // Repulsion & Collision Detection\n for (float i = 0.0; i < 256.0 * 256.0; i++) {\n if (i >= clusterStartIndex + clusterSize || i >= u_numNodes) {\n break;\n }\n if (i < clusterStartIndex || i == index) {\n continue;\n }\n\n vec4 otherClusterData = getTextureData(u_clusterData, i, 256.0);\n float otherClusterWeight = getLogClusterWeight(otherClusterData.w);\n\n float otherFinestIndex = getTextureData(u_finestIndexes, i, 256.0).a;\n vec4 otherPosition = getTextureData(u_physData, otherFinestIndex, 256.0);\n\n vec2 delta = myPosition.xy - otherPosition.xy;\n float dist = max(length(delta), 0.0000001);\n float maxDist = 25.0;\n float repulsionForceScale = 0.1;\n\n float F = ((u_baseLength * u_baseLength) * (fScale / 1.5)) / dist;\n\n if (u_isTopLevel == 1.0) {\n repulsionForceScale = 0.3;\n }\n\n acceleration += ((delta / dist) * F) * repulsionForceScale * otherClusterWeight;\n\n if (dist < maxDist) {\n float collide = (maxDist - dist) / dist;\n acceleration += delta * collide * fScale * maxDist / (maxDist + 1.0);\n }\n }\n\n gl_FragColor = vec4(acceleration, vec2(finestIndex, 0));\n}";this.apprxRepForceShader=new Co(t,Uo,f),this.apprxRepForceShader.use(),this.apprxRepForceShader.setUniform("u_projection",this.physSmallProjection)}},{key:"setupPinData",value:function(){var e=this.gl;this.pinTexture=e.createTexture(),this.pinData=new Uint8Array(65536);for(var t=0;t<65536;t++)this.pinData[t]=0;e.bindTexture(e.TEXTURE_2D,this.pinTexture),e.texImage2D(e.TEXTURE_2D,0,e.ALPHA,yn,yn,0,e.ALPHA,e.UNSIGNED_BYTE,this.pinData),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE)}},{key:"setupUpdates",value:function(){var e=this.gl;this.updateData=new Float32Array(65536),this.updateTexture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this.updateTexture),e.texImage2D(e.TEXTURE_2D,0,e.ALPHA,yn,yn,0,e.ALPHA,e.FLOAT,this.updateData),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),this.updateShader=new Co(e,Uo,"precision mediump float;\n\nuniform sampler2D u_physData;\nuniform sampler2D u_updateData;\nuniform float u_numNodesNew;\n\nconst float INDEX_FLAG = 999999.0;\n\nvec4 getTextureData(sampler2D texture, float index, float base) {\n float x = mod(index, base);\n float y = (index - x) / base;\n return texture2D(texture, vec2(x + 0.5, y + 0.5) / base);\n}\n\nvoid main(void) {\n float textureSide = 256.0; //#TEXTURE_SIDE#;\n float index = (gl_FragCoord.x - 0.5) + (gl_FragCoord.y - 0.5)*textureSide;\n\n if (index >= u_numNodesNew) {\n discard;\n }\n\n float firstValue = getTextureData(u_updateData, index * 2.0, 256.0).a;\n float secondValue = getTextureData(u_updateData, index * 2.0 + 1.0, 256.0).a;\n\n if (secondValue == INDEX_FLAG) {\n vec4 myPosition = getTextureData(u_physData, firstValue, 256.0);\n gl_FragColor = myPosition;\n } else {\n gl_FragColor = vec4(firstValue, secondValue, 0.0, 0.0);\n }\n}\n"),this.updateShader.use(),this.updateShader.setUniform("u_projection",this.physProjection)}},{key:"setupReadpixelWorkaround",value:function(){var e=this.gl;this.workaroundShader=new Co(e,Uo,"precision lowp float;\n\nuniform sampler2D u_physData;\nuniform float u_index;\n\nfloat shift_right (float v, float amt) { \n v = floor(v) + 0.5; \n return floor(v / exp2(amt)); \n}\n\nfloat shift_left (float v, float amt) { \n return floor(v * exp2(amt) + 0.5); \n}\n\nfloat mask_last (float v, float bits) { \n return mod(v, shift_left(1.0, bits)); \n}\n\nfloat extract_bits (float num, float from, float to) { \n from = floor(from + 0.5); to = floor(to + 0.5); \n return mask_last(shift_right(num, from), to - from); \n}\n\n// From https://stackoverflow.com/questions/17981163/webgl-read-pixels-from-floating-point-render-target\nvec4 encode_float (float val) { \n if (val == 0.0) return vec4(0, 0, 0, 0); \n float sign = val > 0.0 ? 0.0 : 1.0; \n val = abs(val); \n float exponent = floor(log2(val)); \n float biased_exponent = exponent + 127.0; \n float fraction = ((val / exp2(exponent)) - 1.0) * 8388608.0; \n float t = biased_exponent / 2.0; \n float last_bit_of_biased_exponent = fract(t) * 2.0; \n float remaining_bits_of_biased_exponent = floor(t); \n float byte4 = extract_bits(fraction, 0.0, 8.0) / 255.0; \n float byte3 = extract_bits(fraction, 8.0, 16.0) / 255.0; \n float byte2 = (last_bit_of_biased_exponent * 128.0 + extract_bits(fraction, 16.0, 23.0)) / 255.0; \n float byte1 = (sign * 128.0 + remaining_bits_of_biased_exponent) / 255.0; \n return vec4(byte4, byte3, byte2, byte1); \n}\n\nvoid main(void) {\n vec4 texData = texture2D(u_physData, gl_FragCoord.xy / 255.0);\n float data;\n if (u_index == 0.0) {\n data = texData.x;\n } else if (u_index == 1.0) {\n data = texData.y;\n } else if (u_index == 2.0) {\n data = texData.z;\n } else if (u_index == 3.0) {\n data = texData.w;\n }\n\n gl_FragColor = encode_float(data);\n}\n"),this.workaroundShader.use(),this.workaroundShader.setUniform("u_projection",this.physProjection),this.workaroundData=[];for(var t=0;t<4;t++){var r=new Uint8Array(262144),n=this.newTexture(e,null,yn,e.UNSIGNED_BYTE),o=this.newFramebuffer(e,n);this.workaroundData.push({dataByte:r,dataFloat:new Float32Array(r.buffer),texture:n,frameBuffer:o})}}},{key:"doReadpixelWorkaround",value:function(){for(var e=this.gl,t=0;t<4;t++){var r=this.workaroundData[t];e.bindFramebuffer(e.FRAMEBUFFER,r.frameBuffer),e.viewport(0,0,yn,yn),this.workaroundShader.use(),this.workaroundShader.setUniform("u_index",t),this.workaroundShader.setUniform("u_physData",this.getPhysData(0).texture),e.bindBuffer(e.ARRAY_BUFFER,this.physVbo),this.workaroundShader.setAttributePointer("a_position",2,0,2),e.drawArrays(e.TRIANGLE_STRIP,0,4),e.readPixels(0,0,yn,yn,e.RGBA,e.UNSIGNED_BYTE,r.dataByte)}}},{key:"definePhysicsArrays",value:function(){this.physData=[],this.levelsData=[],this.levelsClusterTexture=[],this.levelsFinestIndexTexture=[]}}],r&&Yo(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function ti(e){return ti="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ti(e)}function ri(e){return function(e){if(Array.isArray(e))return ni(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return ni(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ni(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ni(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function oi(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ai(n.key),n)}}function ii(e,t,r){return(t=ai(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ai(e){var t=function(e,t){if("object"!=ti(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=ti(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ti(t)?t:String(t)}var ui="ForceCytoLayout",si="forceDirected",ci="coseBilkent",li=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),ii(this,"physLayout",void 0),ii(this,"coseBilkentLayout",void 0),ii(this,"state",void 0),ii(this,"currentLayoutType",void 0),ii(this,"enableCytoscape",void 0),ii(this,"currentLayout",void 0);var n=t.state,o=t.enableCytoscape;this.enableCytoscape=null==o||o,this.physLayout=new ei(t),this.coseBilkentLayout=new go({state:n,cytoCompleteCallback:function(){for(r.physLayout.update(!0),r.copyLayoutPositions(r.state.nodes.items,r.coseBilkentLayout,r.physLayout);r.physLayout.update(!1););r.copyLayoutPositions(r.state.nodes.items,r.physLayout,r.coseBilkentLayout)},animationCompleteCallback:function(){r.currentLayoutType===ci&&setTimeout((function(){return r.setLayout(si)}),50)}}),this.currentLayout=this.physLayout,this.currentLayoutType=si;var i=n.nodes,a=n.rels;i.addChannel(ui),a.addChannel(ui),this.state=n}var t,r;return t=e,r=[{key:"setOptions",value:function(e){void 0!==e&&(this.currentLayout.setOptions(e),this.enableCytoscape=e.enableCytoscape)}},{key:"getLayout",value:function(e){return e===ci?this.coseBilkentLayout:this.physLayout}},{key:"setLayout",value:function(e){if(e!==this.currentLayoutType){Vn.info("Switching to layout: ".concat(e," in ForceCyto"));var t=this.getLayout(e);this.currentLayout=t,this.currentLayoutType=e}}},{key:"copyLayoutPositions",value:function(e,t,r){var n=t.getNodePositions(e);r.updateNodes(n)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.state,r=t.nodes,n=t.rels,o=r.channels[ui],i=n.channels[ui],a=Object.values(o.adds).length,u=Object.values(i.adds).length,s=Object.values(o.adds).map((function(e){return e.id})),c=Object.values(i.adds).map((function(e){return e.id})),l=new Set(Object.keys(o.adds)),f=new Set(Object.keys(i.adds));if(r.clearChannel(ui),n.clearChannel(ui),this.currentLayoutType===si&&this.enableCytoscape&&r.items.length<=100&&a<100&&a>0&&u>0){var h=r.items.map((function(e){return e.id})),d=new Set([].concat(ri(h),ri(s))),p=n.items.map((function(e){return e.id})),v=new Set([].concat(ri(p),ri(c)));if(d.size<=100&&v.size<=300){var y=function(e,t,r,n){var o,i=new Set(e),a=Sn(new Set(t));try{for(a.s();!(o=a.n()).done;){var u=o.value,s=n.idToItem[u];if(s){var c=s.from,l=s.to;i.add(c),i.add(l)}}}catch(e){a.e(e)}finally{a.f()}var f,h=function(e){var t,r={},n={},o=Sn(e);try{for(o.s();!(t=o.n()).done;){for(var i=t.value,a=i.from,u=i.to,s="".concat(a,"-").concat(u),c="".concat(u,"-").concat(a),l=0,f=[s,c];l<f.length;l++){var h=f[l];void 0!==n[h]?n[h].push(i):n[h]=[i]}r[a]||(r[a]=new Set),r[u]||(r[u]=new Set),r[a].add(u),r[u].add(a)}}catch(e){o.e(e)}finally{o.f()}return{adjNodesMap:r,relMap:n}}(n.items),d=h.adjNodesMap,p=h.relMap,v={},y={},b=function(e){var t=[];for(v[e]||t.push(e);t.length>0;){var n=t.shift();if(v[n]=r.idToItem[n],void 0!==d[n]){var o,i=Sn(d[n]);try{for(i.s();!(o=i.n()).done;){var a=o.value;if(!v[a]){t.push(a);var u=p["".concat(n,"-").concat(a)];if(u){var s,c=Sn(u);try{for(c.s();!(s=c.n()).done;){var l=s.value;y[l.id]||(y[l.id]=l)}}catch(e){c.e(e)}finally{c.f()}}}}}catch(e){i.e(e)}finally{i.f()}}}},m=Sn(i);try{for(m.s();!(f=m.n()).done;)b(f.value)}catch(e){m.e(e)}finally{m.f()}return{connectedNodes:v,connectedRels:y}}(l,f,r,n),b=y.connectedNodes,m=y.connectedRels,g=Object.values(b),_=Object.values(m),w=g.length,O=_.length;w===l.size&&O===f.size&&(f.size>0||l.size>0)?(this.setLayout(ci),this.coseBilkentLayout.update(!0,r.items,n.items)):O>0&&f.size/O>.25&&(this.setLayout(ci),this.coseBilkentLayout.update(!0,g,_))}}this.physLayout.update(e),this.coseBilkentLayout.update(e)}},{key:"getShouldUpdate",value:function(){return this.currentLayout.getShouldUpdate()}},{key:"getComputing",value:function(){return this.currentLayout.getComputing()}},{key:"updateNodes",value:function(e){this.setLayout(si),this.physLayout.updateNodes(e)}},{key:"getNodePositions",value:function(e){return this.currentLayout.getNodePositions(e)}},{key:"terminateUpdate",value:function(){this.physLayout.terminateUpdate(),this.coseBilkentLayout.terminateUpdate()}},{key:"destroy",value:function(){this.physLayout.destroy(),this.coseBilkentLayout.destroy()}}],r&&oi(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function fi(e){return fi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fi(e)}function hi(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function di(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?hi(Object(r),!0).forEach((function(t){bi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hi(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function pi(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return vi(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?vi(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function vi(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function yi(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,mi(n.key),n)}}function bi(e,t,r){return(t=mi(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mi(e){var t=function(e,t){if("object"!=fi(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=fi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==fi(t)?t:String(t)}var gi="FreeLayout",_i=function(){function t(e){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),bi(this,"state",void 0),bi(this,"positions",void 0),bi(this,"shouldUpdate",void 0),bi(this,"stateDisposers",void 0);var n=e.state;this.state=n,this.positions={},this.stateDisposers=[],this.stateDisposers.push(this.state.reaction((function(){return r.state.graphUpdates}),(function(){void 0!==r.state.nodes.version&&(r.shouldUpdate=!0),void 0!==r.state.rels.version&&(r.shouldUpdate=!0)})));var o=this.state,i=o.nodes,a=o.rels;i.addChannel(gi),a.addChannel(gi),this.shouldUpdate=!0,this.setOptions(),this.layout(i.items,i.idToItem,i.idToPosition)}var r,n;return r=t,n=[{key:"setOptions",value:function(){}},{key:"updateNodes",value:function(e){var t,r=pi(e);try{for(r.s();!(t=r.n()).done;){var n=t.value;void 0!==n.x&&void 0!==n.y&&(this.positions[n.id]={x:n.x,y:n.y}),this.shouldUpdate=!0}}catch(e){r.e(e)}finally{r.f()}}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.shouldUpdate||e){var t=this.state,r=t.nodes,n=t.rels,o=Object.values(r.channels[gi].adds).length>0,i=Object.values(n.channels[gi].adds).length>0,a=Object.values(r.channels[gi].removes).length>0,u=Object.values(n.channels[gi].removes).length>0;(o||i||a||u)&&this.layout(r.items,r.idToItem,r.idToPosition),r.clearChannel(gi),n.clearChannel(gi)}this.shouldUpdate=!1}},{key:"layout",value:function(t,r,n){var o,i=void 0!==(o=t)?mr(o):o;if(!(0,e.isEmpty)(i)){for(var a={},u=0;u<i.length;++u){var s,c=i[u].id,l=null!==(s=n[c])&&void 0!==s?s:{},f=l.x,h=void 0===f?0:f,d=l.y,p=void 0===d?0:d;a[c]={id:c,x:h,y:p}}this.positions=a,this.shouldUpdate=!1}}},{key:"setNodePositions",value:function(e){this.positions=e}},{key:"getNodePositions",value:function(e){var t,r=[],n=pi(e);try{for(n.s();!(t=n.n()).done;){var o=t.value,i=this.positions[o.id],a=di({id:o.id},i);r.push(a)}}catch(e){n.e(e)}finally{n.f()}return r}},{key:"getShouldUpdate",value:function(){return this.shouldUpdate}},{key:"getComputing",value:function(){return!1}},{key:"terminateUpdate",value:function(){}},{key:"destroy",value:function(){this.state.nodes.removeChannel(gi),this.state.rels.removeChannel(gi)}}],n&&yi(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),t}();function wi(e){return wi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wi(e)}function Oi(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Si(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Oi(Object(r),!0).forEach((function(t){var n,o,i;n=e,o=t,i=r[t],(o=Ti(o))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Oi(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ei(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Pi(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Pi(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Pi(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function xi(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ti(n.key),n)}}function Ti(e){var t=function(e,t){if("object"!=wi(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=wi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==wi(t)?t:String(t)}var ji="GridLayout",Ci=function(){function t(e){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=e.state;this.state=n,this.positions={},this.stateDisposers=[],this.stateDisposers.push(this.state.reaction((function(){return r.state.graphUpdates}),(function(){void 0!==r.state.nodes.version&&(r.shouldUpdate=!0),void 0!==r.state.rels.version&&(r.shouldUpdate=!0)})));var o=this.state,i=o.nodes,a=o.rels;i.addChannel(ji),a.addChannel(ji),this.shouldUpdate=!0,this.setOptions(e),this.layout(i.items,i.idToItem,i.idToPosition,a.items)}var r,n;return r=t,n=[{key:"setOptions",value:function(e){}},{key:"updateNodes",value:function(e){var t,r=Ei(e);try{for(r.s();!(t=r.n()).done;){var n=t.value;void 0!==n.x&&void 0!==n.y&&(this.positions[n.id]={x:n.x,y:n.y}),this.shouldUpdate=!0}}catch(e){r.e(e)}finally{r.f()}}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.shouldUpdate||e){var t=this.state,r=t.nodes,n=t.rels,o=Object.values(r.channels[ji].adds).length>0,i=Object.values(n.channels[ji].adds).length>0,a=Object.values(r.channels[ji].removes).length>0,u=Object.values(n.channels[ji].removes).length>0;(o||i||a||u)&&(this.layout(r.items,r.idToItem,r.idToPosition,n.items),r.idToPosition=this.positions),r.clearChannel(ji),n.clearChannel(ji)}this.shouldUpdate=!1}},{key:"layout",value:function(t,r,n,o){var i,a=(i=t)?mr(i):i;if(!(0,e.isEmpty)(a)){for(var u=a.length,s=Math.ceil(Math.sqrt(u)),c=new Array(u),l=0,f=0;f<s;++f){for(var h=0;h<s&&(c[l]={y:0+150*f,x:0+150*h},(l+=1)!==u);++h);if(l===u)break}for(var d=a.sort(),p={},v=0;v<u;++v){var y=d[v],b=c[v];y.x===b.x&&y.y===b.y||(p[y.id]=Si({id:y.id},b))}this.positions=p,this.shouldUpdate=!1}}},{key:"getNodePositions",value:function(e){var t,r=[],n=Ei(e);try{for(n.s();!(t=n.n()).done;){var o=t.value,i=this.positions[o.id],a=Si({id:o.id},i);r.push(a)}}catch(e){n.e(e)}finally{n.f()}return r}},{key:"getShouldUpdate",value:function(){return this.shouldUpdate}},{key:"getComputing",value:function(){return!1}},{key:"terminateUpdate",value:function(){this.shouldUpdate=!1}},{key:"destroy",value:function(){this.state.nodes.removeChannel(ji),this.state.rels.removeChannel(ji)}}],n&&xi(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),t}(),Ai=o(3269),ki=o.n(Ai);function Ri(e){return Ri="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ri(e)}function Ii(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Mi(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ii(Object(r),!0).forEach((function(t){var n,o,i;n=e,o=t,i=r[t],o=function(e){var t=function(e,t){if("object"!=Ri(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=Ri(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ri(t)?t:String(t)}(o),o in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ii(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ni=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r={minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0},n=0;n<e.length;n++)r.minX>e[n].x&&(r.minX=e[n].x),r.minY>e[n].y&&(r.minY=e[n].y),r.maxX<e[n].x&&(r.maxX=e[n].x),r.maxY<e[n].y&&(r.maxY=e[n].y);var o=(r.minX+r.maxX)/2,i=(r.minY+r.maxY)/2,a=2*t,u=wn()*a;return{centerX:o,centerY:i,nodesWidth:r.maxX-r.minX+a+u,nodesHeight:r.maxY-r.minY+a+u}},Di=function(e,t,r,n){var o=1/0,i=1/0;return e>1&&(o=r/e),t>1&&(i=n/t),{zoomX:o,zoomY:i}},Li=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1/0,o=Math.min(e,t);return Math.min(n,Math.max(r,o))},Ui=function(e,t,r,n){return Math.max(Math.min(t,r),Math.min(e,n))},Fi=function(e,t,r,n,o,i){var a=t;return function(e,t,r){return e<t&&e<r}(o,i,t)&&e.length>1?(a=function(e,t,r){var n=function(e){var t=new Array(4).fill(e[0]);return e.forEach((function(e){t[0]=e.x<t[0].x?t[0]:Mi({},e),t[1]=e.y<t[1].y?t[1]:Mi({},e),t[2]=e.x<t[2].x?Mi({},e):t[2],t[3]=e.y<t[3].y?Mi({},e):t[3]})),t}(e),o=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=0,r=0,n=0;n<e.length;n++)for(var o=n+1;o<e.length;o++)t=Math.hypot(Math.abs(e[n].x-e[o].x),Math.abs(e[n].y-e[o].y)),r=Math.max(r,t);return r}(n),i=2*r,a=wn()*i,u=t.height<=t.width?t.height-i-a:t.width-i-a;return o>u?.9*u/o:.9*o/u}(e,n,25),Ui(o,i,Math.min(t,a),r)):Ui(o,i,t,r)};function Bi(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return zi(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?zi(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function zi(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Vi(e){this.channels[e]={adds:{},updates:{},removes:{}}}function Wi(e){delete this.channels[e]}function Gi(e){this.channels[e].adds={},this.channels[e].updates={},this.channels[e].removes={}}var qi=function(e){return"html"in e?e.html:"captionHtml"in e?e.captionHtml:void 0};function Hi(t,r){var n,o=!1,i=Bi(t);try{for(i.s();!(n=i.n()).done;){var a=n.value,u=a.id;if(void 0===this.idToItem[u]){if(a=(0,e.cloneDeep)(a),this.items.push(a),this.idToItem[u]=a,this.idToPosition[u]={id:u,x:0,y:0},"x"in a&&"y"in a){var s=a,c=s.x,l=s.y;isNaN(c)||isNaN(l)||(this.idToPosition[u].x=c,this.idToPosition[u].y=l)}var f=qi(a);if(f instanceof HTMLElement){var h=document.createElement("div");Object.assign(h.style,{position:"absolute"}),h.appendChild(f),this.idToHtmlOverlay[u]=h}for(var d=Object.values(this.channels),p=0,v=d;p<v.length;p++){var y=v[p];void 0===y.removes[u]?y.adds[u]=a:(delete y.removes[u],y.updates[u]=a)}o=!0}}}catch(e){i.e(e)}finally{i.f()}o&&(this.version+=1,void 0!==r&&(r.added=!0))}function Yi(e,t){var r,n=!1,o=Bi(e);try{for(o.s();!(r=o.n()).done;){var i=r.value,a=i.id,u=this.idToItem[a];if(void 0!==u){Object.assign(u,i);var s=qi(i);if(s instanceof HTMLElement){var c;null===(c=this.idToHtmlOverlay[a])||void 0===c||c.remove(),delete this.idToHtmlOverlay[a];var l=document.createElement("div");Object.assign(l.style,{position:"absolute"}),l.appendChild(s),this.idToHtmlOverlay[a]=l}for(var f=Object.values(this.channels),h=0,d=f;h<d.length;h++){var p=d[h];if(void 0===p.adds[a]){var v=p.updates[a];void 0===v&&(v={id:a},p.updates[a]=v),Object.assign(v,i)}}void 0!==t&&(t.updated=!0)}n=!0}}catch(e){o.e(e)}finally{o.f()}n&&(this.version+=1)}function Xi(e,t){var r,n=!1,o=Bi(e);try{for(o.s();!(r=o.n()).done;){var i=r.value,a=this.idToItem[i];if(void 0!==a){var u;n=!0,delete this.idToItem[a.id],delete this.idToPosition[a.id],null===(u=this.idToHtmlOverlay[a.id])||void 0===u||u.remove(),delete this.idToHtmlOverlay[a.id],this.items.splice(this.items.indexOf(a),1);for(var s=Object.values(this.channels),c=0,l=s;c<l.length;c++){var f=l[c];void 0!==f.adds[i]?delete f.adds[i]:(delete f.updates[i],f.removes[i]=a)}}}}catch(e){o.e(e)}finally{o.f()}n&&(void 0!==t&&(t.removed=!0),this.version+=1)}function Zi(e){var t,r=Bi(e);try{for(r.s();!(t=r.n()).done;){var n=t.value;if(void 0!==this.idToPosition[n.id]){var o=this.idToPosition[n.id];Object.assign(o,n)}else this.idToPosition[n.id]={id:n.id,x:n.x,y:n.y,pinned:n.pinned}}}catch(e){r.e(e)}finally{r.f()}}function Ki(e){for(var t in this.idToHtmlOverlay){var r=this.idToHtmlOverlay[t];e.appendChild(r)}}var $i=function(){return{idToItem:ze.shallow({}),items:ze.shallow([]),channels:ze.shallow({}),idToPosition:ze.shallow({}),idToHtmlOverlay:ze.shallow({}),version:0,addChannel:oe(Vi),removeChannel:oe(Wi),clearChannel:oe(Gi),add:oe(Hi),update:oe(Yi),remove:oe(Xi),updatePositions:oe(Zi),updateHtmlOverlay:oe(Ki)}};function Qi(e){return Qi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qi(e)}function Ji(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ea(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ji(Object(r),!0).forEach((function(t){var n,o,i;n=e,o=t,i=r[t],o=function(e){var t=function(e,t){if("object"!=Qi(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=Qi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Qi(t)?t:String(t)}(o),o in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ji(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ta="#bbb",ra="#fff",na="#45bff8",oa={selected:{rings:[{widthFactor:.05,color:ra},{widthFactor:.1,color:na}],shadow:{width:10,opacity:1,color:ta}},default:{rings:[]}},ia={selected:{rings:[{color:ra,width:2},{color:na,width:4}],shadow:{width:18,opacity:1,color:ta}},default:{rings:[]}},aa=.75,ua=new Set(["direction","packing"]),sa="forceDirected",ca="hierarchical",la="grid",fa="free",ha="d3Force",da="webgl",pa="canvas",va={noPan:!1,outOnly:!1,animated:!0};function ya(e){return ya="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ya(e)}function ba(e,t,r){return t=function(e){var t=function(e,t){if("object"!=ya(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=ya(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ya(t)?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ma="down",ga=ba(ba(ba(ba({},"up","BT"),ma,"TB"),"left","RL"),"right","LR"),_a="bin",wa=[_a,"stack"],Oa=["html"],Sa=["html"],Ea=["captionHtml"];function Pa(e){return Pa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pa(e)}function xa(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Ta(){Ta=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var i=t&&t.prototype instanceof b?t:b,a=Object.create(i.prototype),u=new A(n||[]);return o(a,"_invoke",{value:x(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var h="suspendedStart",d="suspendedYield",p="executing",v="completed",y={};function b(){}function m(){}function g(){}var _={};c(_,a,(function(){return this}));var w=Object.getPrototypeOf,O=w&&w(w(k([])));O&&O!==r&&n.call(O,a)&&(_=O);var S=g.prototype=b.prototype=Object.create(_);function E(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,i,a,u){var s=f(e[o],e,i);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==Pa(l)&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,u)}))}u(s.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function x(t,r,n){var o=h;return function(i,a){if(o===p)throw new Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var s=T(u,n);if(s){if(s===y)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=p;var c=f(t,r,n);if("normal"===c.type){if(o=n.done?v:d,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=v,n.method="throw",n.arg=c.arg)}}}function T(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,T(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function k(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(Pa(t)+" is not iterable")}return m.prototype=g,o(S,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=c(g,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,c(e,s,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},E(P.prototype),c(P.prototype,u,(function(){return this})),t.AsyncIterator=P,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new P(l(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(S),c(S,s,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=k,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:k(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}function ja(e,t,r,n,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void r(e)}u.done?t(s):Promise.resolve(s).then(n,o)}function Ca(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,La(n.key),n)}}function Aa(e,t,r){return t=Ma(t),function(e,t){if(t&&("object"===Pa(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ra(e)}(e,ka()?Reflect.construct(t,r||[],Ma(e).constructor):t.apply(e,r))}function ka(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ka=function(){return!!e})()}function Ra(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ia(){return Ia="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ma(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},Ia.apply(this,arguments)}function Ma(e){return Ma=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ma(e)}function Na(e,t){return Na=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Na(e,t)}function Da(e,t,r){return(t=La(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function La(e){var t=function(e,t){if("object"!=Pa(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=Pa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Pa(t)?t:String(t)}var Ua="HierarchicalLayout",Fa=function(e){return void 0!==e?mr(e):e},Ba=function(e){function t(e){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Da(Ra(r=Aa(this,t,[e])),"direction",void 0),Da(Ra(r),"packing",void 0),Da(Ra(r),"stateDisposers",void 0),Da(Ra(r),"oldComputing",void 0),Da(Ra(r),"computing",void 0),Da(Ra(r),"pendingLayoutData",void 0),Da(Ra(r),"worker",void 0),Da(Ra(r),"directionChanged",void 0),Da(Ra(r),"packingChanged",void 0),r.direction=ma,r.packing=_a;var n=r.state,o=n.nodes,i=n.rels;return o.addChannel(Ua),i.addChannel(Ua),r.stateDisposers=[r.state.reaction((function(){return r.state.graphUpdates}),(function(){if(void 0!==o.version){var e=o.channels[Ua],t=Object.values(e.adds).length>0,n=Object.values(e.removes).length>0,a=Object.values(e.updates),u=xn(a);r.shouldUpdate=r.shouldUpdate||t||n||u}if(void 0!==i.version){var s=i.channels[Ua],c=Object.values(s.adds).length>0,l=Object.values(s.removes).length>0;r.shouldUpdate=r.shouldUpdate||c||l}}))],r.shouldUpdate=!0,r.oldComputing=!1,r.computing=!1,r.setOptions(e),r.setupWorker().then((function(e){r.worker=e,r.worker.port.start(),r.pendingLayoutData=null,r.layout(o.items,o.idToItem,o.idToPosition,i.items)})).catch((function(e){Vn.error("Error setting up worker:",e)})),r}var r,n,i,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Na(e,t)}(t,e),r=t,n=[{key:"setupWorker",value:(i=Ta().mark((function e(){var t,r,n,i,a;return Ta().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then(o.bind(o,8716));case 3:r=e.sent,n=r.createHierarchicalLayoutWorker,t=n(),e.next=16;break;case 8:return e.prev=8,e.t0=e.catch(0),Vn.info("Failed to initialise shared worker: ",e.t0," Falling back to syncronous code."),e.next=13,Promise.resolve().then(o.bind(o,8716));case 13:i=e.sent,a=i.hierarchicalLayoutFallbackWorker,t=a;case 16:return e.abrupt("return",new Promise((function(e,r){t||r("Hierarchical layout code could not be initialised"),e(t)})));case 17:case"end":return e.stop()}}),e,null,[[0,8]])})),a=function(){var e=this,t=arguments;return new Promise((function(r,n){var o=i.apply(e,t);function a(e){ja(o,r,n,a,u,"next",e)}function u(e){ja(o,r,n,a,u,"throw",e)}a(void 0)}))},function(){return a.apply(this,arguments)})},{key:"setOptions",value:function(e){if(void 0!==e&&function(e){return Object.keys(e).every((function(e){return ua.has(e)}))}(e)){var t=e.direction,r=void 0===t?ma:t,n=e.packing,o=void 0===n?_a:n;Object.keys(ga).includes(r)&&(this.directionChanged=this.direction&&this.direction!==r,this.direction=r),wa.includes(o)&&(this.packingChanged=this.packing&&this.packing!==o,this.packing=o),this.shouldUpdate=this.directionChanged||this.packingChanged}}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.shouldUpdate||e){var r=this.state,n=r.nodes,o=r.rels,i=this.directionChanged,a=this.packingChanged,u=Object.values(n.channels[Ua].adds).length>0,s=Object.values(o.channels[Ua].adds).length>0,c=Object.values(n.channels[Ua].removes).length>0,l=Object.values(o.channels[Ua].removes).length>0,f=Object.values(n.channels[Ua].updates),h=xn(f);(e||u||s||c||l||i||a||h)&&this.layout(n.items,n.idToItem,n.idToPosition,o.items),n.clearChannel(Ua),o.clearChannel(Ua),this.directionChanged=!1,this.packingChanged=!1}Ia(Ma(t.prototype),"update",this).call(this),this.shouldUpdate=!1,this.oldComputing=this.computing}},{key:"getShouldUpdate",value:function(){return this.shouldUpdate||this.shouldUpdateAnimator}},{key:"getComputing",value:function(){return this.computing}},{key:"layout",value:function(e,t,r,n){var o=this;if(this.worker){var i=Fa(e).map((function(e){return e.html,xa(e,Oa)})),a=Fa(t),u={};Object.keys(a).forEach((function(e){var t=a[e],r=(t.html,xa(t,Sa));u[e]=r}));var s=Fa(n).map((function(e){return e.captionHtml,xa(e,Ea)})),c=Fa(r),l=this.direction,f=this.packing,h=window.devicePixelRatio,d={nodes:i,nodeIds:u,idToPosition:c,rels:s,direction:l,packing:f,pixelRatio:h,forcedDelay:0};this.computing?this.pendingLayoutData=d:(this.worker.port.onmessage=function(e){var t=e.data,r=t.positions,n=t.parents,i=t.waypoints;o.computing&&(o.positions=r),o.parents=n,o.state.setWaypoints(i),null!==o.pendingLayoutData?(o.worker.port.postMessage(o.pendingLayoutData),o.pendingLayoutData=null):o.computing=!1,o.shouldUpdate=!0,o.startAnimation()},this.computing=!0,this.worker.port.postMessage(d))}else Vn.info("Hierarchical layout code not yet initialised.")}},{key:"terminateUpdate",value:function(){var e,t;this.computing=!1,this.shouldUpdate=!1,null===(e=this.state.nodes)||void 0===e||e.clearChannel(Ua),null===(t=this.state.rels)||void 0===t||t.clearChannel(Ua)}},{key:"destroy",value:function(){var e;this.stateDisposers.forEach((function(e){e()})),this.state.nodes.removeChannel(Ua),this.state.rels.removeChannel(Ua),null===(e=this.worker)||void 0===e||e.port.close()}}],n&&Ca(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),t}(Qn);function za(e){return za="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},za(e)}function Va(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ga(n.key),n)}}function Wa(e,t,r){return(t=Ga(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ga(e){var t=function(e,t){if("object"!=za(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=za(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==za(t)?t:String(t)}var qa=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Wa(this,"elementId",void 0),Wa(this,"currentValue",void 0),Wa(this,"startValue",void 0),Wa(this,"currentTime",void 0),Wa(this,"duration",void 0),Wa(this,"status",void 0),Wa(this,"endValue",void 0),Wa(this,"startTime",void 0),Wa(this,"endTime",void 0),Wa(this,"hasNextAnimation",void 0),this.elementId=t,this.startValue=r,this.status=0,this.currentValue=r,this.duration=0}var t,r;return t=e,(r=[{key:"setDuration",value:function(e){this.duration=e,this.setEndTime(this.startTime+this.duration)}},{key:"getStatus",value:function(){return this.status}},{key:"advance",value:function(){if(1!==this.status)return!1;this.currentTime=(new Date).getTime();var e,t=this.endTime-this.startTime;return(e=t>0?(this.currentTime-this.startTime)/t:1)>=1?(this.currentValue=this.endValue,this.status=2):(this.currentValue=this.startValue+e*(this.endValue-this.startValue),this.hasNextAnimation=!0),this.hasNextAnimation}},{key:"setEndValue",value:function(e){this.endValue!==e&&(e-this.currentValue!=0?(this.currentTime=(new Date).getTime(),this.status=1,this.startValue=this.currentValue,this.endValue=e,this.startTime=this.currentTime,this.setEndTime(this.startTime+this.duration)):this.endValue=e)}},{key:"setEndTime",value:function(e){this.endTime=Math.max(e,this.startTime)}}])&&Va(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Ha(e){return Ha="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ha(e)}function Ya(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Xa(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ya(Object(r),!0).forEach((function(t){Ka(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ya(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Za(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,$a(n.key),n)}}function Ka(e,t,r){return(t=$a(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $a(e){var t=function(e,t){if("object"!=Ha(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=Ha(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ha(t)?t:String(t)}var Qa=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Ka(this,"animations",void 0),Ka(this,"durations",void 0),Ka(this,"defaultDuration",void 0),Ka(this,"hasNextAnimation",void 0),Ka(this,"ignoreAnimationsFlag",void 0),this.animations=new Map,this.durations=[],this.durations[0]=0,this.durations[1]=0,this.defaultDuration=150,this.hasNextAnimation=!1,this.ignoreAnimationsFlag=!1}var t,r;return t=e,r=[{key:"advance",value:function(){var e=this;return this.hasNextAnimation=!1,this.animations.forEach((function(t){Object.values(t).forEach((function(t){t.advance()&&(e.hasNextAnimation=!0)}))})),this.hasNextAnimation}},{key:"ignoreAnimations",value:function(e){this.ignoreAnimationsFlag=e}},{key:"setOptions",value:function(e){void 0!==e.fadeDuration&&(this.durations[0]=e.fadeDuration),void 0!==e.sizeDuration&&(this.durations[1]=e.sizeDuration)}},{key:"needsToRun",value:function(){return this.hasNextAnimation}},{key:"getValueForAnimationName",value:function(e,t,r){var n,o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(this.ignoreAnimationsFlag)return r;var a=null!==(n=this.getById(e))&&void 0!==n?n:{};if(void 0===a[t]){var u=1===i?this.createSizeAnimation(0,e,t):this.createFadeAnimation(0,e,t);u.setEndValue(r),o=u.currentValue}else{var s=a[t];if(s.currentValue===r)return r;s.setEndValue(r),o=s.currentValue}return this.hasNextAnimation=!0,o}},{key:"createAnimation",value:function(e,t,r){var n,o=new qa(t,e),i=null!==(n=this.animations.get(t))&&void 0!==n?n:{};return this.animations.set(t,Xa(Xa({},i),{},Ka({},r,o))),o}},{key:"getById",value:function(e){return this.animations.get(e)}},{key:"createFadeAnimation",value:function(e,t,r){var n,o=this.createAnimation(e,t,r);return o.setDuration(null!==(n=this.durations[0])&&void 0!==n?n:this.defaultDuration),o}},{key:"createSizeAnimation",value:function(e,t,r){var n,o=this.createAnimation(e,t,r);return o.setDuration(null!==(n=this.durations[1])&&void 0!==n?n:this.defaultDuration),o}}],r&&Za(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Ja(e){return Ja="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ja(e)}function eu(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,tu(n.key),n)}}function tu(e){var t=function(e,t){if("object"!=Ja(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=Ja(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ja(t)?t:String(t)}var ru=64,nu=function(){function e(){var t,r,n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=this,n=void 0,(r=tu(r="cache"))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,this.cache={}}var t,r;return t=e,r=[{key:"getImage",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.getOrCreateEntry(e),n=t?"inverted":"image",o=r[n];return void 0===o&&(o=this.loadImage(e),r[n]=o),this.drawIfNeeded(o,t),o.canvas}},{key:"getOrCreateEntry",value:function(e){return void 0===this.cache[e]&&(this.cache[e]={}),this.cache[e]}},{key:"invertCanvas",value:function(e){for(var t=e.getImageData(0,0,ru,ru),r=t.data,n=0;n<4096;n++){var o=4*n;r[o]^=255,r[o+1]^=255,r[o+2]^=255}e.putImageData(t,0,0)}},{key:"loadImage",value:function(e){var t=document.createElement("canvas");t.width=ru,t.height=ru;var r=new Image;return r.src=e,r.crossOrigin="anonymous",{canvas:t,image:r,drawn:!1}}},{key:"drawIfNeeded",value:function(e,t){var r=e.image,n=e.canvas;if(!e.drawn&&r.complete){var o=n.getContext("2d");try{o.drawImage(r,0,0,ru,ru)}catch(e){Vn.error("Failed to draw image",r.src,e),o.beginPath(),o.strokeStyle="black",o.rect(0,0,ru,ru),o.moveTo(0,0),o.lineTo(ru,ru),o.moveTo(0,ru),o.lineTo(ru,0),o.stroke(),o.closePath()}t&&this.invertCanvas(o),e.drawn=!0}}}],r&&eu(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();const ou=nu;function iu(e){return iu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},iu(e)}function au(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function uu(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,cu(n.key),n)}}function su(e,t,r){return(t=cu(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cu(e){var t=function(e,t){if("object"!=iu(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=iu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==iu(t)?t:String(t)}var lu=function(){function t(e,r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),su(this,"key",void 0),su(this,"rels",void 0),su(this,"waypointPath",void 0),su(this,"selfReferring",void 0),su(this,"fromId",void 0),su(this,"toId",void 0),su(this,"angles",void 0),su(this,"labelInfo",void 0),this.key=e,this.rels=[],this.selfReferring=r===n,this.fromId=r,this.toId=n,this.labelInfo={},this.angles=[]}var r,n;return r=t,n=[{key:"insert",value:function(e){this.rels.push({rel:e})}},{key:"setLabelInfo",value:function(e,t){this.labelInfo[e]=t}},{key:"remove",value:function(e){var t=e.id,r=this.rels,n=r.findIndex((function(e){return e.rel.id===t}));if(-1!==n&&(r.splice(n,1),0===n&&r.length>0)){var o=r[0].rel,i=o.from,a=o.to;this.fromId=i,this.toId=a}}},{key:"size",value:function(){return this.rels.length}},{key:"maxFontSize",value:function(){return Math.max.apply(Math,function(e){if(Array.isArray(e))return au(e)}(t=this.rels.map((function(t){var r=t.rel;return(0,e.isNumber)(r.captionSize)?r.captionSize:1})))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return au(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?au(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());var t}},{key:"relIsOppositeDirection",value:function(e){var t=e.from,r=e.to,n=this.fromId,o=this.toId;return t!==n&&r!==o||t===o&&r===n}},{key:"indexOf",value:function(e){var t=e.id;return this.rels.findIndex((function(e){return e.rel.id===t}))}},{key:"getRel",value:function(e){var t=this.rels;return e<0||e>=t.length?null:t[e].rel}},{key:"setWaypoints",value:function(e){this.waypointPath=e}},{key:"setAngles",value:function(e){this.angles=e}}],n&&uu(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),t}(),fu="#848484",hu=2*Math.PI/50,du=.1*Math.PI,pu=gn;function vu(e){return vu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vu(e)}function yu(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return bu(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?bu(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function bu(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function mu(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_u(n.key),n)}}function gu(e,t,r){return(t=_u(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _u(e){var t=function(e,t){if("object"!=vu(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=vu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==vu(t)?t:String(t)}var wu=function(e){var t=[];if(0===e.length)t.push({size:2*Math.PI,start:0});else{for(var r=e.length-1;r>=0;r--){var n=void 0,o=void 0;0===r?(o=e[e.length-1],n=e[r]-e[e.length-1]+2*Math.PI):(o=e[r-1],n=e[r]-e[r-1]),t.push({size:n,start:o})}t.sort((function(e,t){return t.size-e.size}))}return t},Ou=function(e,t){for(;t>e.length||e[0].size>2*e[t-1].size;)e.push({size:e[0].size/2,start:e[0].start}),e.push({size:e[0].size/2,start:e[0].start+e[0].size/2}),e.shift(),e.sort((function(e,t){return t.size-e.size}));return e},Su=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),gu(this,"bundles",void 0),gu(this,"nodeToBundles",void 0),this.bundles={},this.nodeToBundles={};var n=t.reduce((function(e,t){return e[t.id]=t,e}),{});this.updateData(n,{},r)}var t,r;return t=e,r=[{key:"getBundle",value:function(e){var t=this.bundles,r=this.nodeToBundles,n=this.generatePairId(e.from,e.to),o=t[n];return void 0===o&&(o=new lu(n,e.from,e.to),t[n]=o,void 0===r[e.from]&&(r[e.from]=[]),void 0===r[e.to]&&(r[e.to]=[]),r[e.from].push(o),r[e.to].push(o)),o}},{key:"updateData",value:function(e,t,r){for(var n=this.bundles,o=this.nodeToBundles,i=function(e,t){var r=o[t].findIndex((function(t){return t===e}));-1!==r&&o[t].splice(r,1),0===o[t].length&&delete o[t]},a=Object.values(e),u=Object.values(t),s=0,c=a;s<c.length;s++){var l=c[s];this.getBundle(l).insert(l)}for(var f=0,h=u;f<h.length;f++){var d=h[f],p=this.getBundle(d);p.remove(d),0===p.size()&&(delete n[p.key],i(p,d.from),i(p,d.to))}for(var v=0,y=Object.keys(n);v<y.length;v++){var b=n[y[v]];b.setWaypoints(r["".concat(b.fromId,"-").concat(b.toId)])}}},{key:"updatePositions",value:function(e){for(var t=this.nodeToBundles,r=0,n=Object.keys(e);r<n.length;r++){var o,i=n[r],a=null!==(o=t[i])&&void 0!==o?o:[];if(0!==a.length){var u=a.find((function(e){return e.selfReferring})),s=a.filter((function(e){return!e.selfReferring}));if(void 0!==u){var c,l=[],f=yu(s);try{for(f.s();!(c=f.n()).done;){var h=c.value,d=e[h.fromId],p=e[h.toId];if(void 0!==d&&void 0!==p)for(var v=hu*h.size(),y=d.id===i?Math.atan2(p.y-d.y,p.x-d.x):Math.atan2(d.y-p.y,d.x-p.x),b=0;b<h.size();b++)l.push(y+v/2-b*hu);else{var m=void 0===d?h.fromId:h.toId;Vn.warn("Arrowbundler: Node with id ".concat(m," is not in position map"))}}}catch(e){f.e(e)}finally{f.f()}var g=l.map((function(e){return(e+2*Math.PI)%(2*Math.PI)})).sort(),_=wu(g);Ou(_,u.size());var w=_.map((function(e){return e.start+e.size/2})).slice(0,u.size());u.setAngles(w)}}}}},{key:"generatePairId",value:function(e,t){return[e.toString(),t.toString()].sort((function(e,t){return e.localeCompare(t)})).join("-")}}],r&&mu(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Eu(e){return Eu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Eu(e)}function Pu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function xu(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ju(n.key),n)}}function Tu(e,t,r){return(t=ju(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ju(e){var t=function(e,t){if("object"!=Eu(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=Eu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Eu(t)?t:String(t)}var Cu=function(t,r){return(0,e.isFinite)(t.x)&&(0,e.isFinite)(t.y)&&(0,e.isFinite)(r.x)&&(0,e.isFinite)(r.y)},Au=function(e,t){if(void 0===e||void 0===t||!Cu(e,t))return!1;var r=t.x-e.x,n=t.y-e.y,o=wn();return r*r+n*n<100*o*o},ku=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Tu(this,"p1",void 0),Tu(this,"p2",void 0),Tu(this,"unit",void 0),Tu(this,"norm",void 0),Tu(this,"length",void 0),Tu(this,"vector",void 0),this.p1=t,this.p2=r,this.vector=this.getVector(),this.length=this.getLength(),this.unit=this.getUnitVector(),this.norm=this.getUnitNormalVector()}var t,r;return t=e,r=[{key:"getVector",value:function(){return{x:this.p2.x-this.p1.x,y:this.p2.y-this.p1.y}}},{key:"getLength",value:function(){var e=this.vector,t=e.x,r=e.y;return Math.sqrt(t*t+r*r)}},{key:"getUnitVector",value:function(){var e=this.vector,t=this.length;return{x:e.x/t,y:e.y/t}}},{key:"getUnitNormalVector",value:function(){return{x:this.unit.y,y:-this.unit.x}}}],r&&xu(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),Ru=function(t,r,n){var o={x:r.x-t.x,y:r.y-t.y},i=function(t,r){var n=(t.x*r.x+t.y*r.y)/(r.x*r.x+r.y*r.y);return(0,e.clamp)(n,0,1)}({x:n.x-t.x,y:n.y-t.y},o),a=t.x+i*o.x,u=t.y+i*o.y,s=a-n.x,c=u-n.y;return Math.sqrt(s*s+c*c)},Iu=function(e,t,r,n){if(t.x===r.x&&t.y===r.y)return t;var o=t.y-e.y,i=e.x-t.x,a=o*e.x+i*e.y,u=n.y-r.y,s=r.x-n.x,c=u*r.x+s*r.y,l=o*s-u*i;return 0===l?null:{x:(s*a-i*c)/l,y:(o*c-u*a)/l}},Mu=function(e,t,r,n){var o,i,a,u=1e9,s=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Pu(Object(r),!0).forEach((function(t){Tu(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e),c={x:0,y:0};for(i=1;i<10;i++)a=.1*i,c.x=Math.pow(1-a,2)*e.x+2*a*(1-a)*r.x+Math.pow(a,2)*t.x,c.y=Math.pow(1-a,2)*e.y+2*a*(1-a)*r.y+Math.pow(a,2)*t.y,i>0&&(u=(o=Ru(s,c,n))<u?o:u),s.x=c.x,s.y=c.y;return u};function Nu(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Du=[[.04,1],[100,2]],Lu=[[.8,1.1],[3,1.6],[8,2.5]],Uu=[[Lu[0][0],1],[100,1.25]],Fu=function(e,t){if(e.includes("rgba"))return e;if(e.includes("rgb")){var r=e.substr(e.indexOf("(")+1).replace(")","").split(",");return"rgba(".concat(r[0],",").concat(r[1],",").concat(r[2],",").concat(t,")")}var n=ki().get.rgb(e);return null===n?e:"rgba(".concat(n[0],",").concat(n[1],",").concat(n[2],",").concat(t,")")},Bu=function(e,t,r,n){var o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a=n.headPosition,u=n.headAngle,s=n.headHeight,c=n.headChinHeight,l=n.headWidth;e.save(),e.lineWidth=t,e.strokeStyle=r,e.fillStyle=r,e.translate(a.x,a.y),e.rotate(u),function(e,t,r,n){if(e.beginPath(),t.length>0){var o=t[0];e.moveTo(o.x,o.y)}for(var i=1;i<t.length;i++){var a=t[i];e.lineTo(a.x,a.y)}e.closePath(),r&&e.fill(),n&&e.stroke()}(e,[{x:c-s,y:0},{x:-s,y:l/2},{x:0,y:0},{x:-s,y:-l/2}],o,i),e.restore()},zu=function(e,t,r,n,o){var i=n;o.forEach((function(n){var o=n.width,a=n.color,u=i+o;e.beginPath(),e.fillStyle=a,e.arc(t,r,u,0,2*Math.PI,!1),e.arc(t,r,i,2*Math.PI,0,!0),e.fill(),e.closePath(),i=u}))},Vu=function(e,t,r,n){e.beginPath(),e.arc(t,r,n,0,2*Math.PI,!1),e.closePath()},Wu=function(e,t,r,n,o){e.beginPath(),e.fillStyle=n,Vu(e,t,r,o),e.fill(),e.closePath()};function Gu(e,t){var r=t.find((function(t){return e<t[0]}));return void 0!==r?r[1]:t[t.length-1][1]}var qu=function(e,t,r,n,o,i,a,u,s){var c,l=n,f=0,h=0,d=null===(c=e.measureText("..."))||void 0===c?void 0:c.width;t.forEach((function(t){var n;e.font="normal ".concat(o,"px ").concat(i);var c,p=-(null===(n=e.measureText(t.text))||void 0===n?void 0:n.width)/2,v=t.text?function(e){if(Array.isArray(e))return Nu(e)}(c=t.text)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(c)||function(e,t){if(e){if("string"==typeof e)return Nu(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Nu(e,t):void 0}}(c)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}():[];t.hasHyphenChar||t.hasEllipsisChar||v.push(" "),v.forEach((function(n){var a,c,v,y,b,m;null!==(a=r[h])&&void 0!==a&&a.includes("italic")&&null!==(c=r[h])&&void 0!==c&&c.includes("bold")?e.font="italic 600 ".concat(o,"px ").concat(i):null!==(v=r[h])&&void 0!==v&&v.includes("italic")?e.font="italic 400 ".concat(o,"px ").concat(i):null!==(y=r[h])&&void 0!==y&&y.includes("bold")?e.font="bold ".concat(o,"px ").concat(i):e.font="normal ".concat(o,"px ").concat(i),null!==(b=r[h])&&void 0!==b&&b.includes("underline")&&e.fillRect(u+p+f,s+l+.2,null===(m=e.measureText(n))||void 0===m?void 0:m.width,.2),t.hasEllipsisChar?e.fillText(n,u+p+f-d/2,s+l):e.fillText(n,u+p+f,s+l),f+=e.measureText(n).width,h+=1})),e.font="normal ".concat(o,"px ").concat(i),t.hasHyphenChar&&e.fillText("-",u+p+f,s+l),t.hasEllipsisChar&&e.fillText("...",u+p+f-d/2,s+l),f=0,l+=a}))},Hu=function(e,t){return{x:e.x+t.x,y:e.y+t.y}},Yu=function(e,t){return{x:e.x-t.x,y:e.y-t.y}},Xu=function(e,t){return{x:e.x*t,y:e.y*t}},Zu=function(e,t){return function(e){return Math.sqrt(e.x*e.x+e.y*e.y)}(Yu(e,t))},Ku=function(e,t){return{x:Math.cos(e)*t,y:Math.sin(e)*t}};function $u(e){return $u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$u(e)}function Qu(e){return function(e){if(Array.isArray(e))return rs(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ts(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ju(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function es(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ju(Object(r),!0).forEach((function(t){var n,o,i;n=e,o=t,i=r[t],o=function(e){var t=function(e,t){if("object"!=$u(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=$u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==$u(t)?t:String(t)}(o),o in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ju(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ts(e,t){if(e){if("string"==typeof e)return rs(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?rs(e,t):void 0}}function rs(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var ns=function(e){return!(!e||!isNaN(Number(e))||e.toLowerCase()===e.toUpperCase())&&e===e.toUpperCase()},os=function(e){var t=e[e.length-1],r=e[e.length-2];return!(!t||!isNaN(Number(t))||t.toLowerCase()===t.toUpperCase())&&!(!r||!isNaN(Number(r))||r.toLowerCase()===r.toUpperCase())&&ns(t)&&!ns(r)},is=function(e,t,r,n){for(var o,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=[],u=[],s=0,c=0,l=!1,f=!1,h=0;h<n;h++)a[h]=r(h,n);for(var d,p=function(){o=e.slice(s,v);var r,h,d=t(o),p=a[c];if(d>p||(h=e[v-1],"\n\r\v".includes(h))){if(!(c<n-1)){if(i)return{v:[]};for(var y=v;d>p;){for(y-=1;r=e[y-1]," \t\n\r\v".includes(r);)y-=1;if(!(y-s>1)){o="",f=!0,l=!1;break}o=e.slice(s,y),d=t(o),f=!0,l=!1}return u[c]={text:o,hasEllipsisChar:f,hasHyphenChar:l},{v:u}}l=!1,f=!1;var b=function(e){var t=e.length,r=Math.min(t-1,3);if(1===t)return{hyphen:!1,cnt:0};for(var n=0;n<r;n++){var o=e[e.length-(n+1)];if(" "===o||o.toLowerCase()===o.toUpperCase())return{hyphen:!1,cnt:n+1};var i=e.slice(0,e.length-n);if(os(i))return{hyphen:!1,cnt:n+1}}return{hyphen:!0,cnt:1}}(o),m=v-b.cnt;if(b.hyphen)for(o=e.slice(s,m),d=t(o),l=!0;d>p;){if(!(m-s>1)){o=e[s],m=s+1,d=t(o),l=!1;break}m-=1,o=e.slice(s,m),d=t(o),l=!0}else o=(o=e.slice(s,m)).trim();u[c]={text:o,hasEllipsisChar:f,hasHyphenChar:l},s=m,c+=1}},v=1;v<=e.length;v++)if(d=p())return d.v;return o=e.slice(s,e.length),u[c]={text:o,hasEllipsisChar:f,hasHyphenChar:!1},u},as=function(e,t,r,n,o,i,a,u){e.font="bold ".concat(n,"px ").concat(r).replace(/"/g,"");var s=function(t){var r;return null===(r=e.measureText(t))||void 0===r?void 0:r.width},c=2;a===Lu[1][1]?c=3:a===Lu[2][1]&&(c=4);for(var l=a<Lu[2][1]?["",""]:[""],f=i?l.length:0,h=function(e,t){return function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"top",o=.98*r,i=.89*r,a=.95*r;return 1===t?o:2===t?a:3===t&&"top"===n?0===e||2===e?i:o:4===t&&"top"===n?0===e||3===e?.78*r:a:5===t&&"top"===n?0===e||4===e?.65*r:1===e||3===e?i:a:o}(e+f,t+f,o)},d=1,p=[],v=function(){if(0===(p=function(e,t,r,n){var o,i=e.split(/\s/g).filter((function(e){return e.length>0})),a=[],u=null,s=function(e){return t(e)>r(a.length,n)},c=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=ts(e))){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(i);try{for(c.s();!(o=c.n()).done;){var l=o.value,f=u?"".concat(u," ").concat(l):l;if(t(f)<r(a.length,n))u=f;else{if(null!==u){var h=s(u);a.push({text:u,overflowed:h})}if(u=l,a.length>n)return[]}}}catch(e){c.e(e)}finally{c.f()}if(u){var d=s(u);a.push({text:u,overflowed:d})}return a.length<=n?a:[]}(t,s,h,d)).length)p=is(t,s,h,d,c>d);else if(p.some((function(e){return e.overflowed}))){var e=d;p=p.reduce((function(t,r){var n=c-t.length;if(0===n){var o=t[t.length-1];return o.text.endsWith("…")||(s(o.text)+s("…")>h(t.length,e)?(t[t.length-1].text=o.text.slice(0,-2),t[t.length-1].hasEllipsisChar=!0):(t[t.length-1].text=o.text,t[t.length-1].hasEllipsisChar=!0)),t}if(r.overflowed){var i=is(r.text,s,h,n);t=t.concat(i)}else t.push({text:r.text,hasEllipsisChar:!1,hasHyphenChar:!1});return t}),[])}else p=p.map((function(e){return es(es({},e),{},{hasEllipsisChar:!1,hasHyphenChar:!1})}));d+=1};0===p.length;)v();return Array.from(p)},us=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce((function(e,t,r){var n=t.value;if(n){var o="".concat(r>0&&e.length?", ":"").concat(n);return[].concat(Qu(e),[es(es({},t),{},{value:o,chars:o.split("").map((function(n,o){var i,a;return 0!==r&&e.length?o<2?null:Qu(null!==(i=t.styles)&&void 0!==i?i:[]):Qu(null!==(a=t.styles)&&void 0!==a?a:[])}))})])}return[]}),[]);return{stylesPerChar:e.reduce((function(e,t){return[].concat(Qu(e),Qu(t.chars))}),[]),fullCaption:e.map((function(e){return e.value})).join("")}};function ss(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return cs(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?cs(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function cs(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var ls=2*Math.PI,fs=Math.PI/2,hs=function(e,t,r,n,o,i){var a={x:(e.x+t.x)/2,y:(e.y+t.y)/2},u={x:e.x,y:e.y},s={x:t.x,y:t.y},c=new ku(s,u),l=function(e,t){var r=0;return e&&(r+=e),t&&(r-=t),r}(n,r);a.x+=l/2*c.unit.x,a.y+=l/2*c.unit.y;var f=i.size()/2-i.indexOf(o);return a.x+=f*c.unit.x,a.y+=f*c.unit.y,a},ds=function(e){var t=wn(),r=e.size,n=e.selected;return((null!=r?r:mn)+4+(!0===n?4:0))*t},ps=function(e,t){var r=wn();e.shadowColor=t.color,e.shadowBlur=t.width*r,e.shadowOffsetX=0,e.shadowOffsetY=0},vs=function(e){e.shadowColor="rgba(0,0,0,0)",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0},ys=function(e,t,r,n,o){var i,a,u=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=e.norm.x,n=e.norm.y;return t?{x:-r,y:-n}:e.norm},c=wn(),l=t.indexOf(e),f=(t.size()-1)/2,h=l>f,d=Math.abs(l-f),p=o?17*t.maxFontSize():8,v=(t.size()-1)*p*c,y=function(e,t,r,n,o,i,a){var u,s=arguments.length>7&&void 0!==arguments[7]&&arguments[7],c=wn(),l=e.size(),f=l>1,h=e.relIsOppositeDirection(i),d=h?r:t,p=h?t:r,v=e.waypointPath,y=null==v?void 0:v.points,b=null==v?void 0:v.from,m=null==v?void 0:v.to,g=Au(d,b)&&Au(p,m)||Au(p,b)&&Au(d,m),_=g?y[1]:null,w=g?y[y.length-2]:null,O=ds(d),S=ds(p),E=function(e,t){return Math.atan2(e.y-t.y,e.x-t.x)},P=Math.max(Math.PI,ls/(l/2)),x=f?n*P*(a?1:-1)/(null!==(u=d.size)&&void 0!==u?u:mn):0,T=E(g?_:p,d),j=g?E(p,w):T,C=function(e,t,r,n){return{x:e.x+Math.cos(t)*r*(n?-1:1),y:e.y+Math.sin(t)*r*(n?-1:1)}},A=function(e,t){return C(d,T+e,t,!1)},k=function(e,t){return C(p,j-e,t,!0)},R=function(e,t){return{x:e.x+(t.x-e.x)/2,y:e.y+(t.y-e.y)/2}},I=function(e,t){return Math.sqrt((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y))*c},M=A(x,O),N=k(x,S),D=f?A(0,O):null,L=f?k(0,S):null,U=200*c,F=[];if(g){var B=I(M,_)<U;if(f&&!B){var z=R(D,_);F.push(new ku(M,z)),F.push(new ku(z,_))}else F.push(new ku(M,_));for(var V=2;V<y.length-1;V++)F.push(new ku(y[V-1],y[V]));var W=I(N,w)<U;if(f&&!W){var G=R(L,w);F.push(new ku(w,G)),F.push(new ku(G,N))}else F.push(new ku(w,N))}else{var q=f?I(D,L):0;if(f&&q>2*(30*c+Math.min(O,S)))if(s){var H=hs(d,p,O,S,i,e);F.push(new ku(M,H)),F.push(new ku(H,N))}else{var Y=n*o,X=30+O,Z=Math.sqrt(X*X+Y*Y),K=30+S,$=Math.sqrt(K*K+Y*Y),Q=A(0,Z),J=k(0,$);F.push(new ku(M,Q)),F.push(new ku(Q,J)),F.push(new ku(J,N))}else if(q>(O+S)/2){var ee=hs(d,p,O,S,i,e);F.push(new ku(M,ee)),F.push(new ku(ee,N))}else F.push(new ku(M,N))}return F}(t,r,n,d,p,e,h,u),b=[],m=y[0],g=s(m,h);b.push({x:m.p1.x+g.x,y:m.p1.y+g.y});for(var _=1;_<y.length;_++)if(1===t.size())b.push(y[_-1].p2);else{var w=y[_-1],O=y[_],S=s(w,h),E=s(O,h),P=Hu(w.p1,Xu(S,v/2)),x=Hu(w.p2,Xu(S,v/2)),T=Hu(O.p1,Xu(E,v/2)),j=Hu(O.p2,Xu(E,v/2)),C=null;a=E,(i=S).x*a.x+i.y*a.y<.99&&(C=Iu(P,x,T,j));var A=null!==C?Yu(C,w.p2):Xu(S,v/2);b.push(Hu(w.p2,Xu(A,d/f)))}var k=y[y.length-1],R=s(k,h);return b.push({x:k.p2.x+R.x,y:k.p2.y+R.y}),t.relIsOppositeDirection(e)?b.reverse():b},bs=function(e,t,r,n,o,i){var a,u=arguments.length>6&&void 0!==arguments[6]&&arguments[6],s=wn(),c=o.selected,l=o.captions,f=void 0===l?[]:l,h=o.caption,d=void 0===h?"":h,p=o.width,v=o.disabled,y=o.captionAlign,b=void 0===y?"top":y,m=o.captionSize,g=void 0===m?1:m,_=f.length>0?null===(a=us(f))||void 0===a?void 0:a.fullCaption:d;if(void 0!==_){var w=!0===v?"#DDDDDD":"#848484",O=6*g*s,S=!0===c?"bold":"normal",E=_;e.fillStyle=w,e.font="".concat(S," ").concat(O,"px ").concat('"Open Sans", sans-serif');var P=function(t){return e.measureText(t).width},x=(null!=p?p:1)*(!0===c?1.5:1),T=P(E);if(T>n){var j=is(E,P,(function(){return n}),1,!1)[0];E=!0===j.hasEllipsisChar?"".concat(j.text,"..."):E,T=n}e.save(),e.translate(t.x,t.y),u?(e.rotate(r-fs),e.translate(2*O,0),e.rotate(-fs)):e.rotate(r);var C=(1+g)*s,A="bottom"===b?O/2+x+C:-(x+C);e.fillText(E,-T/2,A),e.restore();var k=2*A*Math.sin(r),R=2*A*Math.cos(r),I={position:{x:t.x-k,y:t.y+R},rotation:u?r-Math.PI:r,width:n/s,height:(O+C)/s};i.setLabelInfo(o.id,I)}},ms=function(e,t,r,n,o){if(e.beginPath(),e.moveTo(t[0].x,t[0].y),o&&t.length>2){for(var i=1;i<t.length-2;){var a=(t[i].x+t[i+1].x)/2,u=(t[i].y+t[i+1].y)/2;e.quadraticCurveTo(t[i].x,t[i].y,a,u),i+=1}e.quadraticCurveTo(t[i].x,t[i].y,t[i+1].x,t[i+1].y)}else for(var s=1;s<t.length;s++)e.lineTo(t[s].x,t[s].y);e.lineWidth=r,e.strokeStyle=n,e.lineCap="round",e.stroke()},gs=function(e){return e.rings[0].width*wn()*1.5},_s=function(e){return 6*e*wn()},ws=function(e,t,r){var n,o;return{widthAlign:t/2*(null!==(n=e[0])&&void 0!==n?n:0),heightAlign:r/2*(null!==(o=e[1])&&void 0!==o?o:0)}},Os=function(e,t,r){var n,o,i=r.indexOf(e),a=null!==(n=r.angles[i])&&void 0!==n?n:0,u=a-du/2,s=a+du/2,c=null!==(o=e.width)&&void 0!==o?o:1,l=wn(),f=ds(t),h={x:t.x+Math.cos(u)*(f+c/2),y:t.y+Math.sin(u)*(f+c/2)},d={x:t.x+Math.cos(s)*(f+c/2),y:t.y+Math.sin(s)*(f+c/2)},p={x:t.x+Math.cos(a)*(f+35*l),y:t.y+Math.sin(a)*(f+35*l)};return{startAngle:u,endAngle:s,startPoint:h,endPoint:d,apexPoint:p,control1Point:{x:p.x+25*Math.cos(a-fs)*l/2,y:p.y+25*Math.sin(a-fs)*l/2},control2Point:{x:p.x+25*Math.cos(a+fs)*l/2,y:p.y+25*Math.sin(a+fs)*l/2}}},Ss=function(e,t,r,n,o,i){e.beginPath(),e.moveTo(t.x,t.y),e.quadraticCurveTo(o.x,o.y,n.x,n.y),e.quadraticCurveTo(i.x,i.y,r.x,r.y),e.stroke()},Es=function(e,t,r,n,o,i,a,u){var s=!(arguments.length>8&&void 0!==arguments[8])||arguments[8];Cu(r,n)&&(r.id===n.id?function(e,t,r,n,o,i,a){var u=t.overlayIcon,s=t.selected,c=t.width,l=t.hovered,f=t.disabled,h=t.color,d=Os(t,r,n),p=d.startPoint,v=d.endPoint,y=d.apexPoint,b=d.control1Point,m=d.control2Point,g=a.rings,_=a.shadow,w=wn(),O=g[0].color,S=g[1].color,E=g[0].width*w,P=g[1].width*w,x=40*w,T=(null!=c?c:1)*w,j=T>1?T/2:1,C=9*j,A=2*j,k=7*j,R=!0===s,I=!0===f,M=void 0!==u,N=Math.atan2(v.y-m.y,v.x-m.x),D=R?E*Math.sqrt(1+2*C/k*(2*C/k)):0,L={x:v.x-Math.cos(N)*(.5*C-A+D),y:v.y-Math.sin(N)*(.5*C-A+D)},U={headPosition:{x:v.x+Math.cos(N)*(.5*C-A-D),y:v.y+Math.sin(N)*(.5*C-A-D)},headAngle:N,headHeight:C,headChinHeight:A,headWidth:k};if(e.save(),e.lineCap="round",R&&(ps(e,_),e.lineWidth=T+P,e.strokeStyle=S,Ss(e,p,L,y,b,m),Bu(e,P,S,U,!1,!0),vs(e),e.lineWidth=T+E,e.strokeStyle=O,Ss(e,p,L,y,b,m),Bu(e,E,O,U,!1,!0)),e.lineWidth=T,!0===l&&!R&&!I){var F=_.color;ps(e,_),e.strokeStyle=F,e.fillStyle=F,Ss(e,p,L,y,b,m),Bu(e,T,F,U),vs(e)}var B=I?pu:null!=h?h:fu;if(e.fillStyle=B,e.strokeStyle=B,Ss(e,p,L,y,b,m),Bu(e,T,B,U),i||M){var z,V=n.indexOf(t),W=null!==(z=n.angles[V])&&void 0!==z?z:0,G=y.x-Math.cos(N)*(D/4),q=y.y-Math.sin(N)*(D/4),H=(W+fs)%ls,Y=(W+ls)%ls<Math.PI;if(i&&bs(e,{x:G,y:q},H,x,t,n,Y),M){var X=u.position,Z=void 0===X?[0,0]:X,K=u.url,$=u.size,Q=_s(void 0===$?1:$),J=ws(Z,x,Q),ee=J.widthAlign,te=J.heightAlign+(R?gs(a):0)*(Z[1]<0?-1:1);e.save(),e.translate(G,q),Y?(e.rotate(H-Math.PI),e.translate(2*-ee,2*-te)):e.rotate(H);var re=Q/2,ne=-re+ee,oe=-re+te;e.drawImage(o.getImage(K),ne,oe,Q,Q),e.restore()}}e.restore()}(e,t,r,o,i,a,u):function(e,t,r,n,o,i,a,u,s){var c=t.overlayIcon,l=t.color,f=t.disabled,h=t.selected,d=t.width,p=t.hovered,v=t.captionAlign,y=!0===h,b=!0===f,m=void 0!==c,g=s.rings,_=s.shadow,w=ys(t,o,r,n,a,u),O=wn(),S=function(e){var t,r=!0===e.selected?1.5:1;return(null!==(t=e.width)&&void 0!==t?t:1)*r*wn()}(t),E=b?pu:null!=l?l:fu,P=g[0].width*O,x=g[1].width*O,T=O*(d>1?d/2:1),j=9*T,C=2*T,A=7*T,k=Zu(w[w.length-2],w[w.length-1]),R=2*j,I=y?P*Math.sqrt(1+R/A*(R/A)):0,M=2-I,N=Math.floor(w.length/2);w.length>2&&y&&k<j+I-C&&(M+=k,I-=k/2+C,w.pop(),N=Math.floor(w.length/2));var D,L,U=w[w.length-2],F=w[w.length-1],B=(D=U,L=F,Math.atan2(L.y-D.y,L.x-D.x)),z=j/2+I,V=Math.cos(B),W=Math.sin(B);w[w.length-1]={x:F.x-V*z,y:F.y-W*z};var G,q={headPosition:{x:F.x+V*M,y:F.y+W*M},headAngle:B,headHeight:j,headChinHeight:C,headWidth:A},H=ss(w);try{for(H.s();!(G=H.n()).done;){var Y=G.value;Y.x=Math.round(Y.x),Y.y=Math.round(Y.y)}}catch(e){H.e(e)}finally{H.f()}if(e.save(),y){var X=g[0].color,Z=g[1].color,K=Math.atan2(w[1].y-w[0].y,w[1].x-w[0].x),$=Ku(K,gs(s));w[0]=Hu(w[0],$),ps(e,_),ms(e,w,S+x,Z,u),Bu(e,x,Z,q,!1,!0),vs(e),ms(e,w,S+P,X,u),Bu(e,P,X,q,!1,!0)}if(!0===p&&!y&&!b){var Q=_.color;ps(e,_),ms(e,w,S,Q,u),Bu(e,S,Q,q),vs(e)}if(ms(e,w,S,E,u),Bu(e,S,E,q),a||m){var J,ee,te,re,ne,oe=r.x>n.x,ie=w[N];1==(1&w.length)?(J=w[oe?N+1:N-1],ee=w[oe?N-1:N+1],u?(te=(ie.x+(J.x+ee.x)/2)/2,re=(ie.y+(J.y+ee.y)/2)/2,ne=oe?Math.atan2(r.y-n.y,r.x-n.x):Math.atan2(n.y-r.y,n.x-r.x)):(Zu(ie,J)>Zu(ie,ee)?ee=ie:J=ie,te=(J.x+ee.x)/2,re=(J.y+ee.y)/2,ne=Math.atan2(ee.y-J.y,ee.x-J.x))):(J=w[oe?N:N-1],ee=w[oe?N-1:N],te=(J.x+ee.x)/2,re=(J.y+ee.y)/2,ne=Math.atan2(ee.y-J.y,ee.x-J.x));var ae=y?Ku(ne+fs,gs(s)):{x:0,y:0},ue=Zu(J,ee);if(a){var se="bottom"===v?1:-1,ce={x:te+ae.x*se,y:re+ae.y*se};bs(e,ce,ne,ue,t,o)}if(m){var le=c.position,fe=void 0===le?[0,0]:le,he=c.url,de=c.size,pe=_s(void 0===de?1:de),ve=ws(fe,ue,pe),ye=ve.widthAlign,be=ve.heightAlign,me=fe[1]<0?-1:1,ge=ae.x*me,_e=ae.y*me,we=pe/2;e.save(),e.translate(te,re),e.rotate(ne);var Oe=-we+ge+ye,Se=-we+_e+be;e.drawImage(i.getImage(he),Oe,Se,pe,pe),e.restore()}}e.restore()}(e,t,r,n,o,i,a,s,u))},Ps=function(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i=arguments.length>5&&void 0!==arguments[5]&&arguments[5];return Cu(r,n)?r.id===n.id?function(e,t,r){for(var n=Os(e,t,r),o={left:1/0,top:1/0,right:-1/0,bottom:-1/0},i=["startPoint","endPoint","apexPoint","control1Point","control2Point"],a=0;a<i.length;a++){var u=n[i[a]],s=u.x,c=u.y;s<o.left&&(o.left=s),s>o.right&&(o.right=s),c<o.top&&(o.top=c),c>o.bottom&&(o.bottom=c)}return o}(e,r,t):function(e,t,r,n,o,i){var a,u={left:1/0,top:1/0,right:-1/0,bottom:-1/0},s=ss(ys(e,t,r,n,o,i));try{for(s.s();!(a=s.n()).done;){var c=a.value,l=c.x,f=c.y;l<u.left&&(u.left=l),l>u.right&&(u.right=l),f<u.top&&(u.top=f),f>u.bottom&&(u.bottom=f)}}catch(e){s.e(e)}finally{s.f()}return u}(e,t,r,n,o,i):null};function xs(e){return xs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xs(e)}var Ts=/^\s+/,js=/\s+$/;function Cs(e,t){if(t=t||{},(e=e||"")instanceof Cs)return e;if(!(this instanceof Cs))return new Cs(e,t);var r=function(e){var t,r,n,o={r:0,g:0,b:0},i=1,a=null,u=null,s=null,c=!1,l=!1;return"string"==typeof e&&(e=function(e){e=e.replace(Ts,"").replace(js,"").toLowerCase();var t,r=!1;if(Hs[e])e=Hs[e],r=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=ic.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=ic.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=ic.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=ic.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=ic.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=ic.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=ic.hex8.exec(e))?{r:$s(t[1]),g:$s(t[2]),b:$s(t[3]),a:tc(t[4]),format:r?"name":"hex8"}:(t=ic.hex6.exec(e))?{r:$s(t[1]),g:$s(t[2]),b:$s(t[3]),format:r?"name":"hex"}:(t=ic.hex4.exec(e))?{r:$s(t[1]+""+t[1]),g:$s(t[2]+""+t[2]),b:$s(t[3]+""+t[3]),a:tc(t[4]+""+t[4]),format:r?"name":"hex8"}:!!(t=ic.hex3.exec(e))&&{r:$s(t[1]+""+t[1]),g:$s(t[2]+""+t[2]),b:$s(t[3]+""+t[3]),format:r?"name":"hex"}}(e)),"object"==xs(e)&&(ac(e.r)&&ac(e.g)&&ac(e.b)?(t=e.r,r=e.g,n=e.b,o={r:255*Zs(t,255),g:255*Zs(r,255),b:255*Zs(n,255)},c=!0,l="%"===String(e.r).substr(-1)?"prgb":"rgb"):ac(e.h)&&ac(e.s)&&ac(e.v)?(a=Js(e.s),u=Js(e.v),o=function(e,t,r){e=6*Zs(e,360),t=Zs(t,100),r=Zs(r,100);var n=Math.floor(e),o=e-n,i=r*(1-t),a=r*(1-o*t),u=r*(1-(1-o)*t),s=n%6;return{r:255*[r,a,i,i,u,r][s],g:255*[u,r,r,a,i,i][s],b:255*[i,i,u,r,r,a][s]}}(e.h,a,u),c=!0,l="hsv"):ac(e.h)&&ac(e.s)&&ac(e.l)&&(a=Js(e.s),s=Js(e.l),o=function(e,t,r){var n,o,i;function a(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}if(e=Zs(e,360),t=Zs(t,100),r=Zs(r,100),0===t)n=o=i=r;else{var u=r<.5?r*(1+t):r+t-r*t,s=2*r-u;n=a(s,u,e+1/3),o=a(s,u,e),i=a(s,u,e-1/3)}return{r:255*n,g:255*o,b:255*i}}(e.h,a,s),c=!0,l="hsl"),e.hasOwnProperty("a")&&(i=e.a)),i=Xs(i),{ok:c,format:e.format||l,r:Math.min(255,Math.max(o.r,0)),g:Math.min(255,Math.max(o.g,0)),b:Math.min(255,Math.max(o.b,0)),a:i}}(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}function As(e,t,r){e=Zs(e,255),t=Zs(t,255),r=Zs(r,255);var n,o,i=Math.max(e,t,r),a=Math.min(e,t,r),u=(i+a)/2;if(i==a)n=o=0;else{var s=i-a;switch(o=u>.5?s/(2-i-a):s/(i+a),i){case e:n=(t-r)/s+(t<r?6:0);break;case t:n=(r-e)/s+2;break;case r:n=(e-t)/s+4}n/=6}return{h:n,s:o,l:u}}function ks(e,t,r){e=Zs(e,255),t=Zs(t,255),r=Zs(r,255);var n,o,i=Math.max(e,t,r),a=Math.min(e,t,r),u=i,s=i-a;if(o=0===i?0:s/i,i==a)n=0;else{switch(i){case e:n=(t-r)/s+(t<r?6:0);break;case t:n=(r-e)/s+2;break;case r:n=(e-t)/s+4}n/=6}return{h:n,s:o,v:u}}function Rs(e,t,r,n){var o=[Qs(Math.round(e).toString(16)),Qs(Math.round(t).toString(16)),Qs(Math.round(r).toString(16))];return n&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function Is(e,t,r,n){return[Qs(ec(n)),Qs(Math.round(e).toString(16)),Qs(Math.round(t).toString(16)),Qs(Math.round(r).toString(16))].join("")}function Ms(e,t){t=0===t?0:t||10;var r=Cs(e).toHsl();return r.s-=t/100,r.s=Ks(r.s),Cs(r)}function Ns(e,t){t=0===t?0:t||10;var r=Cs(e).toHsl();return r.s+=t/100,r.s=Ks(r.s),Cs(r)}function Ds(e){return Cs(e).desaturate(100)}function Ls(e,t){t=0===t?0:t||10;var r=Cs(e).toHsl();return r.l+=t/100,r.l=Ks(r.l),Cs(r)}function Us(e,t){t=0===t?0:t||10;var r=Cs(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(-t/100*255))),r.g=Math.max(0,Math.min(255,r.g-Math.round(-t/100*255))),r.b=Math.max(0,Math.min(255,r.b-Math.round(-t/100*255))),Cs(r)}function Fs(e,t){t=0===t?0:t||10;var r=Cs(e).toHsl();return r.l-=t/100,r.l=Ks(r.l),Cs(r)}function Bs(e,t){var r=Cs(e).toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,Cs(r)}function zs(e){var t=Cs(e).toHsl();return t.h=(t.h+180)%360,Cs(t)}function Vs(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var r=Cs(e).toHsl(),n=[Cs(e)],o=360/t,i=1;i<t;i++)n.push(Cs({h:(r.h+i*o)%360,s:r.s,l:r.l}));return n}function Ws(e){var t=Cs(e).toHsl(),r=t.h;return[Cs(e),Cs({h:(r+72)%360,s:t.s,l:t.l}),Cs({h:(r+216)%360,s:t.s,l:t.l})]}function Gs(e,t,r){t=t||6,r=r||30;var n=Cs(e).toHsl(),o=360/r,i=[Cs(e)];for(n.h=(n.h-(o*t>>1)+720)%360;--t;)n.h=(n.h+o)%360,i.push(Cs(n));return i}function qs(e,t){t=t||6;for(var r=Cs(e).toHsv(),n=r.h,o=r.s,i=r.v,a=[],u=1/t;t--;)a.push(Cs({h:n,s:o,v:i})),i=(i+u)%1;return a}Cs.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,r,n=this.toRgb();return e=n.r/255,t=n.g/255,r=n.b/255,.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},setAlpha:function(e){return this._a=Xs(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=ks(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=ks(this._r,this._g,this._b),t=Math.round(360*e.h),r=Math.round(100*e.s),n=Math.round(100*e.v);return 1==this._a?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=As(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=As(this._r,this._g,this._b),t=Math.round(360*e.h),r=Math.round(100*e.s),n=Math.round(100*e.l);return 1==this._a?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return Rs(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,r,n,o){var i=[Qs(Math.round(e).toString(16)),Qs(Math.round(t).toString(16)),Qs(Math.round(r).toString(16)),Qs(ec(n))];return o&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*Zs(this._r,255))+"%",g:Math.round(100*Zs(this._g,255))+"%",b:Math.round(100*Zs(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*Zs(this._r,255))+"%, "+Math.round(100*Zs(this._g,255))+"%, "+Math.round(100*Zs(this._b,255))+"%)":"rgba("+Math.round(100*Zs(this._r,255))+"%, "+Math.round(100*Zs(this._g,255))+"%, "+Math.round(100*Zs(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(Ys[Rs(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+Is(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var o=Cs(e);r="#"+Is(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a<1&&this._a>=0;return t||!n||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(r=this.toRgbString()),"prgb"===e&&(r=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(r=this.toHexString()),"hex3"===e&&(r=this.toHexString(!0)),"hex4"===e&&(r=this.toHex8String(!0)),"hex8"===e&&(r=this.toHex8String()),"name"===e&&(r=this.toName()),"hsl"===e&&(r=this.toHslString()),"hsv"===e&&(r=this.toHsvString()),r||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return Cs(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(Ls,arguments)},brighten:function(){return this._applyModification(Us,arguments)},darken:function(){return this._applyModification(Fs,arguments)},desaturate:function(){return this._applyModification(Ms,arguments)},saturate:function(){return this._applyModification(Ns,arguments)},greyscale:function(){return this._applyModification(Ds,arguments)},spin:function(){return this._applyModification(Bs,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(Gs,arguments)},complement:function(){return this._applyCombination(zs,arguments)},monochromatic:function(){return this._applyCombination(qs,arguments)},splitcomplement:function(){return this._applyCombination(Ws,arguments)},triad:function(){return this._applyCombination(Vs,[3])},tetrad:function(){return this._applyCombination(Vs,[4])}},Cs.fromRatio=function(e,t){if("object"==xs(e)){var r={};for(var n in e)e.hasOwnProperty(n)&&(r[n]="a"===n?e[n]:Js(e[n]));e=r}return Cs(e,t)},Cs.equals=function(e,t){return!(!e||!t)&&Cs(e).toRgbString()==Cs(t).toRgbString()},Cs.random=function(){return Cs.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},Cs.mix=function(e,t,r){r=0===r?0:r||50;var n=Cs(e).toRgb(),o=Cs(t).toRgb(),i=r/100;return Cs({r:(o.r-n.r)*i+n.r,g:(o.g-n.g)*i+n.g,b:(o.b-n.b)*i+n.b,a:(o.a-n.a)*i+n.a})},Cs.readability=function(e,t){var r=Cs(e),n=Cs(t);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)},Cs.isReadable=function(e,t,r){var n,o,i,a,u,s=Cs.readability(e,t);switch(o=!1,"AA"!==(a=((i=(i=r)||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==a&&(a="AA"),"small"!==(u=(i.size||"small").toLowerCase())&&"large"!==u&&(u="small"),(n={level:a,size:u}).level+n.size){case"AAsmall":case"AAAlarge":o=s>=4.5;break;case"AAlarge":o=s>=3;break;case"AAAsmall":o=s>=7}return o},Cs.mostReadable=function(e,t,r){var n,o,i,a,u=null,s=0;o=(r=r||{}).includeFallbackColors,i=r.level,a=r.size;for(var c=0;c<t.length;c++)(n=Cs.readability(e,t[c]))>s&&(s=n,u=Cs(t[c]));return Cs.isReadable(e,u,{level:i,size:a})||!o?u:(r.includeFallbackColors=!1,Cs.mostReadable(e,["#fff","#000"],r))};var Hs=Cs.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Ys=Cs.hexNames=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}(Hs);function Xs(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Zs(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var r=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function Ks(e){return Math.min(1,Math.max(0,e))}function $s(e){return parseInt(e,16)}function Qs(e){return 1==e.length?"0"+e:""+e}function Js(e){return e<=1&&(e=100*e+"%"),e}function ec(e){return Math.round(255*parseFloat(e)).toString(16)}function tc(e){return $s(e)/255}var rc,nc,oc,ic=(nc="[\\s|\\(]+("+(rc="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+rc+")[,|\\s]+("+rc+")\\s*\\)?",oc="[\\s|\\(]+("+rc+")[,|\\s]+("+rc+")[,|\\s]+("+rc+")[,|\\s]+("+rc+")\\s*\\)?",{CSS_UNIT:new RegExp(rc),rgb:new RegExp("rgb"+nc),rgba:new RegExp("rgba"+oc),hsl:new RegExp("hsl"+nc),hsla:new RegExp("hsla"+oc),hsv:new RegExp("hsv"+nc),hsva:new RegExp("hsva"+oc),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function ac(e){return!!ic.CSS_UNIT.exec(e)}var uc=function(e){return Cs.mostReadable(e,["#1A1B1D","#FFFFFF"]).toString()};function sc(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return cc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?cc(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cc(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var lc=function(e){var t=e.x,r=void 0===t?0:t,n=e.y,o=void 0===n?0:n,i=e.size,a=void 0===i?mn:i;return{top:o-a,left:r-a,right:r+a,bottom:o+a}},fc=function(e,t,r,n,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,a=t.x,u=void 0===a?0:a,s=t.y,c=void 0===s?0:s,l=t.size,f=void 0===l?mn:l,h=t.caption,d=void 0===h?"":h,p=t.captions,v=void 0===p?[]:p,y=t.captionAlign,b=void 0===y?"center":y,m=t.captionSize,g=void 0===m?1:m,_=t.disabled,w=t.activated,O=t.selected,S=t.hovered,E=t.id,P=t.icon,x=t.overlayIcon,T=o.selected,j=wn(),C=function(e,t,r){var n=e.selected?r.selected.rings:r.default.rings;if(!n.length){var o=t.getById(e.id);return void 0!==o&&Object.entries(o).forEach((function(e){var t=sc(e,2),r=t[0],n=t[1];r.startsWith("ring-")&&n.setEndValue(0)})),[{width:0,color:""}]}return n.map((function(r,n){var o=r.widthFactor,i=r.color,a=(e.size||mn)*o*wn();return{width:t.getValueForAnimationName(e.id,"ring-".concat(n),a),color:i}}))}(t,n,o),A=C.reduce((function(e,t){return e+t.width}),0),k=T.shadow.width*j,R=T.shadow.opacity,I=T.shadow.color,M=f*j,N=2*M,D=function(e,t){if(!e||!t)return{nodeInfoLevel:0,fontInfoLevel:1.25,iconInfoLevel:1};var r=wn(),n=1600*r*(1200*r),o=Math.pow(e,2)*Math.PI*Math.pow(t,2)/(n/100);return{nodeInfoLevel:Gu(o,Du),fontInfoLevel:Gu(o,Lu),iconInfoLevel:Gu(o,Uu)}}(M,i),L=D.nodeInfoLevel,U=D.fontInfoLevel,F=D.iconInfoLevel,B=t.color||"#478BFF",z=function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:mn)/({1:3.5,2:2.75,3:2}[arguments.length>2&&void 0!==arguments[2]?arguments[2]:1]+(arguments.length>3&&void 0!==arguments[3]&&arguments[3]?1:0))/e}(U,M,g,Boolean(P)),V=uc(B),W=M,G=W,q=Boolean(d.length),H=Boolean(v.length),Y=Boolean(P),X=Boolean(x);if(A>0&&(W=M+A),_)B="#EDEDED",V="#DDDDDD";else{if(w){var Z=Date.now()%1e3/1e3,K=Z<.7?Z/.7:0,$=Fu(B,.4-.4*K);Wu(e,u,c,$,M+.88*M*K)}var Q=O||S?k:0,J=n.getValueForAnimationName(E,"shadowWidth",Q);J>0&&function(e,t,r,n,o,i){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,u=o+i,s=e.createRadialGradient(t,r,o,t,r,u);s.addColorStop(0,"transparent"),s.addColorStop(.01,Fu(n,.5*a)),s.addColorStop(.05,Fu(n,.5*a)),s.addColorStop(.5,Fu(n,.12*a)),s.addColorStop(.75,Fu(n,.03*a)),s.addColorStop(1,Fu(n,0)),e.fillStyle=s,Vu(e,t,r,u),e.fill()}(e,u,c,I,W,J,R)}if(Wu(e,u,c,B,M),A>0&&zu(e,u,c,G,C),Y){var ee=L<2||!(q||H),te=L>0?1:0,re=ee?1*M:.75*M;re/=F;var ne=ee?.5*re:re*(1===F?"center"===b?1.3:"bottom"===b||ee?1.1:0:"center"===b?1.35:"bottom"===b||ee?1.1:0),oe=re/2;re=n.getValueForAnimationName(E,"iconSize",re),oe=n.getValueForAnimationName(E,"iconXPos",oe),ne=n.getValueForAnimationName(E,"iconYPos",ne),e.save();var ie=!0===_?.1:te;e.globalAlpha=n.getValueForAnimationName(E,"iconOpacity",ie);var ae="#fff"===V,ue=r.getImage(P,ae);e.drawImage(ue,u-oe,c-ne,Math.floor(re),Math.floor(re)),e.restore()}if(X){var se,ce,le,fe,he,de=N*(null!==(se=x.size)&&void 0!==se?se:1),pe=de/2-M*(null!==(ce=null===(le=x.position)||void 0===le?void 0:le[1])&&void 0!==ce?ce:0),ve=de/2-M*(null!==(fe=null===(he=x.position)||void 0===he?void 0:he[0])&&void 0!==fe?fe:0);e.save();var ye=!0===_?.1:1;e.globalAlpha=n.getValueForAnimationName(E,"iconOpacity",ye);var be=r.getImage(x.url);e.drawImage(be,u-ve,c-pe,de,de),e.restore()}var me=L<2?0:1,ge=n.getValueForAnimationName(E,"textOpacity",me,0),_e=Fu(V,ge),we='"Open Sans", sans-serif';if(q&&ge>0){var Oe=as(e,d,we,z,.7*N,Y,U,null==t||t.captionAlign);e.fillStyle=_e,e.font="normal ".concat(z,"px ").concat(we);var Se=1+z,Ee=-(Oe.length-2)*Se/2,Pe=d.split("").map((function(e){return[]}));qu(e,Oe,Pe,Ee,z,we,Se,u,c)}if(H){var xe=L<2?0:1,Te=n.getValueForAnimationName(E,"textOpacity",xe,0),je=Fu(V,Te),Ce='"Open Sans", sans-serif',Ae=Boolean(P);if(Te>0){var ke=us(v),Re=ke.stylesPerChar,Ie=ke.fullCaption,Me="center"===b?.7*N:2*Math.sqrt(Math.pow(N/2,2)-Math.pow(N/3,2)),Ne=as(e,Ie,Ce,z,Me,Ae,U,null==t||t.captionAlign);e.fillStyle=je;var De,Le=z,Ue=-(Ne.length-2)*Le/2;De=b&&"center"!==b?"bottom"===b?Ue+M/Math.PI:Ue-M/Math.PI:Ue,qu(e,Ne,Re,De,z,Ce,Le,u,c)}}e.save(),e.restore()};function hc(e){return hc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hc(e)}function dc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function pc(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?dc(Object(r),!0).forEach((function(t){mc(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dc(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function vc(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return yc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?yc(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function yc(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function bc(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,gc(n.key),n)}}function mc(e,t,r){return(t=gc(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gc(e){var t=function(e,t){if("object"!=hc(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=hc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==hc(t)?t:String(t)}var _c="canvasRenderer",wc=function(){function e(t,r,n){var o=this,i=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).relationshipThreshold,a=void 0===i?2.5:i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),mc(this,"arrowBundler",void 0),mc(this,"activeNodes",void 0),mc(this,"canvas",void 0),mc(this,"context",void 0),mc(this,"state",void 0),mc(this,"stateDisposers",void 0),mc(this,"relationshipThreshold",void 0),mc(this,"animationHandler",void 0),mc(this,"imageCache",void 0),mc(this,"needsRun",void 0),mc(this,"nodeVersion",void 0),mc(this,"relVersion",void 0),mc(this,"waypointVersion",void 0),this.activeNodes=new Set,this.canvas=t,this.context=r,this.state=n,this.stateDisposers=[],this.stateDisposers.push(n.autorun((function(){void 0!==n.zoom&&(o.needsRun=!0),void 0!==n.panX&&(o.needsRun=!0),void 0!==n.panY&&(o.needsRun=!0),void 0!==n.nodes.version&&(o.needsRun=!0),void 0!==n.rels.version&&(o.needsRun=!0),n.waypoints.counter>0&&(o.needsRun=!0),void 0!==n.layout&&(o.needsRun=!0)}))),n.nodes.addChannel(_c),n.rels.addChannel(_c),this.relationshipThreshold=a,this.nodeVersion=n.nodes.version,this.relVersion=n.rels.version,this.waypointVersion=n.waypoints.counter,this.animationHandler=new Qa,this.animationHandler.setOptions({fadeDuration:150,sizeDuration:150}),this.arrowBundler=new Su(n.rels.items,n.waypoints.data),this.imageCache=new ou,this.needsRun=!0}var t,r;return t=e,r=[{key:"needsToRun",value:function(){return this.needsRun||this.animationHandler.needsToRun()||this.activeNodes.size>0}},{key:"processUpdates",value:function(){var e=this.state,t=!1,r=e.nodes.channels[_c],n=e.rels.channels[_c],o=r.adds,i=r.removes,a=n.adds,u=n.removes;this.nodeVersion<e.nodes.version&&(Object.keys(o).length>0||Object.keys(i).length,this.handleChannelUpdate(r,e.nodes,!0),this.nodeVersion=e.nodes.version,e.nodes.clearChannel(_c)),this.relVersion<e.rels.version&&(t=Object.keys(a).length>0||Object.keys(u).length>0,e.rels.clearChannel(_c),this.relVersion=e.rels.version),(t||this.waypointVersion<e.waypoints.counter)&&(this.arrowBundler.updateData(a,u,e.waypoints.data),this.waypointVersion=e.waypoints.counter)}},{key:"render",value:function(e){var t,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=this.state,i=this.animationHandler,a=this.arrowBundler,u=o.zoom,s=o.layout,c=o.nodes.idToPosition,l=null!==(t=n.canvas)&&void 0!==t?t:this.canvas,f=null!==(r=n.context)&&void 0!==r?r:this.context,h=wn(),d=l.clientWidth*h,p=l.clientHeight*h;f.save(),void 0!==n.backgroundColor?(f.fillStyle=n.backgroundColor,f.fillRect(0,0,d,p)):f.clearRect(0,0,d,p),this.zoomAndPan(f,l),i.ignoreAnimations(Boolean(n.ignoreAnimations)),!0!==n.ignoreAnimations&&i.advance(),a.updatePositions(c);var v=this.getRelationshipsToRender(n.showCaptions,d,p);this.renderRelationships(v,f,s!==ca);var y=this.getNodesToRender(e,d,p);this.renderNodes(y,f,u),f.restore(),this.needsRun=!1}},{key:"getRelationshipsToRender",value:function(e,t,r){var n,o=[],i=[],a=[],u=this.arrowBundler,s=this.state,c=this.relationshipThreshold,l=s.layout,f=s.zoom,h=s.rels,d=s.nodes,p=d.idToItem,v=d.idToPosition,y=vc(h.items);try{for(y.s();!(n=y.n()).done;){var b=n.value,m=u.getBundle(b),g=pc(pc({},p[b.from]),v[b.from]),_=pc(pc({},p[b.to]),v[b.to]),w=e||f>c||void 0!==b.captionHtml,O=Ps(b,m,g,_,w,l!==ca);if(null!==O){var S,E,P,x,T,j,C=this.isBoundingBoxOffScreen(O,t,r),A=Zu({x:null!==(S=g.x)&&void 0!==S?S:0,y:null!==(E=g.y)&&void 0!==E?E:0},{x:null!==(P=_.x)&&void 0!==P?P:0,y:null!==(x=_.y)&&void 0!==x?x:0}),k=((null!==(T=g.size)&&void 0!==T?T:mn)+(null!==(j=_.size)&&void 0!==j?j:mn))*devicePixelRatio,R=g.id!==_.id&&k>A;C||R||(!0===b.disabled?i.push(pc(pc({},b),{},{fromNode:g,toNode:_,showLabel:w})):!0===b.selected?o.push(pc(pc({},b),{},{fromNode:g,toNode:_,showLabel:w})):a.push(pc(pc({},b),{},{fromNode:g,toNode:_,showLabel:w})))}}}catch(e){y.e(e)}finally{y.f()}return[].concat(i,a,o)}},{key:"getNodesToRender",value:function(e,t,r){var n,o=[],i=[],a=[],u=this.state.nodes.idToItem,s=vc(e);try{for(s.s();!(n=s.n()).done;){var c,l,f=n.value,h=lc(f);this.isBoundingBoxOffScreen(h,t,r)||(!0===(null===(c=u[f.id])||void 0===c?void 0:c.disabled)?o.push(pc({},f)):!0===(null===(l=u[f.id])||void 0===l?void 0:l.selected)?i.push(pc({},f)):a.push(pc({},f)))}}catch(e){s.e(e)}finally{s.f()}return[].concat(o,a,i)}},{key:"renderNodes",value:function(e,t,r){var n,o=this.imageCache,i=this.animationHandler,a=this.state,u=a.nodes.idToItem,s=a.nodeBorderStyles,c=vc(e);try{for(c.s();!(n=c.n()).done;){var l=n.value;fc(t,pc(pc({},u[l.id]),l),o,i,s,r)}}catch(e){c.e(e)}finally{c.f()}}},{key:"renderRelationships",value:function(e,t,r){var n,o=this.state.relationshipBorderStyles.selected,i=this.arrowBundler,a=this.imageCache,u=vc(e);try{for(u.s();!(n=u.n()).done;){var s=n.value,c=i.getBundle(s),l=s.fromNode,f=s.toNode,h=s.showLabel;Es(t,s,l,f,c,a,h,o,r)}}catch(e){u.e(e)}finally{u.f()}}},{key:"getNodesAt",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],o=this.state.nodes,i=o.items,a=o.idToPosition,u=wn(),s=vc(i);try{var c=function(){var o=t.value,i=o.id,s=o.size,c=void 0===s?mn:s,l=a[i],f=l.x,h=l.y,d=Math.sqrt(Math.pow(e.x-f,2)+Math.pow(e.y-h,2));if(d<=(c+r)*u){var p=n.findIndex((function(e){return e.distance>d}));n.splice(-1!==p?p:n.length,0,{data:o,targetCoordinates:{x:f,y:h},pointerCoordinates:e,distanceVector:{x:e.x-f,y:e.y-h},insideNode:d<=c*u,distance:d})}};for(s.s();!(t=s.n()).done;)c()}catch(e){s.e(e)}finally{s.f()}return n}},{key:"getRelsAt",value:function(e){var t,r=[],n=this.state,o=this.arrowBundler,i=this.relationshipThreshold,a=n.zoom,u=n.rels.items,s=n.nodes.idToPosition,c=n.layout,l=a>i,f=vc(u);try{var h=function(){var n=t.value,i=o.getBundle(n),a=s[n.from],u=s[n.to];if(void 0!==a&&void 0!==u&&-1!==i.indexOf(n)){var f=function(e,t,r,n,o,i){var a=arguments.length>6&&void 0!==arguments[6]&&arguments[6];if(!Cu(r,n))return 1/0;var u=r===n?function(e,t,r,n){var o=Os(t,r,n),i=o.startPoint,a=o.endPoint,u=o.apexPoint,s=o.control1Point,c=o.control2Point,l=Mu(i,u,s,e),f=Mu(u,a,c,e);return Math.min(l,f)}(e,t,r,o):function(e,t,r,n,o,i,a){var u=ys(t,r,n,o,i,a),s=1/0;if(a&&3===u.length)s=Mu(u[0],u[2],u[1],e);else for(var c=1;c<u.length;c++){var l=u[c-1],f=u[c],h=Ru(l,f,e);s=h<s?h:s}return s}(e,t,o,r,n,i,a);return u}(e,n,a,u,i,l,c!==ca);if(f<10){var h=r.findIndex((function(e){return e.distance>f}));r.splice(-1!==h?h:r.length,0,{data:n,fromTargetCoordinates:a,toTargetCoordinates:u,pointerCoordinates:e,distance:f})}}};for(f.s();!(t=f.n()).done;)h()}catch(e){f.e(e)}finally{f.f()}return r}},{key:"destroy",value:function(){this.stateDisposers.forEach((function(e){e()})),this.state.nodes.removeChannel(_c),this.state.rels.removeChannel(_c)}},{key:"isBoundingBoxOffScreen",value:function(e,t,r){var n=this.state,o=n.zoom,i=t/o,a=r/o,u=n.panX-i/2,s=n.panY-a/2,c=e.right<u,l=e.bottom<s,f=e.left>u+i,h=e.top>s+a;return c||f||l||h}},{key:"handleChannelUpdate",value:function(e,t,r){for(var n=Object.keys(e.adds),o=0;o<n.length;o++){var i=n[o];e.adds[i].activated&&this.activeNodes.add(i)}for(var a=Object.keys(e.removes),u=0;u<a.length;u++){var s=a[u];this.activeNodes.delete(s)}if(r)for(var c=Object.keys(e.updates),l=0;l<c.length;l++){var f=c[l];t.idToItem[f].activated?this.activeNodes.add(f):this.activeNodes.delete(f)}}},{key:"zoomAndPan",value:function(e,t){var r=t.width,n=t.height,o=this.state,i=o.zoom,a=o.panX,u=o.panY;e.translate(-r/2*i,-n/2*i),e.translate(-a*i,-u*i),e.scale(i,i),e.translate(r/2/i,n/2/i),e.translate(r/2,n/2)}}],r&&bc(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),Oc=function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=function(t,r){if((0,e.isNil)(t)||(0,e.isNil)(r))return{offsetX:0,offsetY:0};var n=r.getBoundingClientRect(),o=window.devicePixelRatio||1;return{offsetX:o*(t.clientX-n.left-.5*n.width),offsetY:o*(t.clientY-n.top-.5*n.height)}}(t,r);return{x:o+a.offsetX/n,y:i+a.offsetY/n}};function Sc(e){return Sc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Sc(e)}function Ec(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pc(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,jc(n.key),n)}}function xc(e,t,r){return t&&Pc(e.prototype,t),r&&Pc(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Tc(e,t,r){return(t=jc(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jc(e){var t=function(e,t){if("object"!=Sc(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=Sc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Sc(t)?t:String(t)}var Cc="WebGLRenderer",Ac=function(){function t(e){var r=this;if(Ec(this,t),Tc(this,"mainSceneRenderer",void 0),Tc(this,"minimapRenderer",void 0),Tc(this,"needsRun",void 0),Tc(this,"minimapMouseDown",void 0),Tc(this,"stateDisposers",void 0),Tc(this,"state",void 0),void 0===e.state)throw new Error("Renderer missing options: state - state object");var n=e.state,o=e.mainSceneRenderer,i=e.minimapRenderer,a=n.nodes,u=n.rels;this.mainSceneRenderer=o,this.minimapRenderer=i,this.needsRun=!1,this.minimapMouseDown=!1,this.stateDisposers=[],this.stateDisposers.push(n.autorun((function(){r.updateMainViewport(n.zoom,n.panX,n.panY)}))),this.stateDisposers.push(n.autorun((function(){r.updateMinimapViewport(n.minimapZoom,n.minimapPanX,n.minimapPanY)}))),this.stateDisposers.push(n.autorun((function(){void 0!==n.nodes.version&&(r.needsRun=!0),void 0!==n.rels.version&&(r.needsRun=!0)}))),a.addChannel(Cc),u.addChannel(Cc),this.state=n,this.setupMinimapInteractions()}return xc(t,[{key:"needsToRun",value:function(){return this.needsRun||Object.keys(this.mainSceneRenderer.activeNodes).length>0}},{key:"renderMainScene",value:function(e){var t=this.state,r=t.nodes,n=t.rels;this.checkForUpdates(r,n),this.mainSceneRenderer.render(e,r,n),this.needsRun=!1}},{key:"renderMinimap",value:function(e){var t=this.state,r=t.nodes,n=t.rels;this.checkForUpdates(r,n),this.minimapRenderer.render(e,r,n),this.minimapRenderer.renderViewbox(),this.needsRun=!1}},{key:"checkForUpdates",value:function(e,t){var r=Object.values(e.channels[Cc].adds).length>0,n=Object.values(t.channels[Cc].adds).length>0,o=Object.values(e.channels[Cc].removes).length>0,i=Object.values(t.channels[Cc].removes).length>0,a=Object.values(e.channels[Cc].updates),u=Object.values(t.channels[Cc].updates);r||n||o||i?(this.mainSceneRenderer.setData({nodes:e.items,rels:t.items}),this.minimapRenderer.setData({nodes:e.items,rels:t.items})):(a.length>0&&(this.mainSceneRenderer.updateNodes(a),this.minimapRenderer.updateNodes(a)),u.length>0&&(this.mainSceneRenderer.updateRelationships(t.items),this.minimapRenderer.updateRelationships(t.items))),e.clearChannel(Cc),t.clearChannel(Cc)}},{key:"onResize",value:function(){var e=this.state,t=e.zoom,r=e.panX,n=e.panY,o=e.minimapZoom,i=e.minimapPanX,a=e.minimapPanY;this.updateMainViewport(t,r,n),this.updateMinimapViewport(o,i,a)}},{key:"updateMainViewport",value:function(e,t,r){this.mainSceneRenderer.updateViewport(e,t,r);var n=this.mainSceneRenderer.canvas.clientWidth,o=this.mainSceneRenderer.canvas.clientHeight;this.minimapRenderer.updateViewportBox(e,t,r,n,o),this.needsRun=!0}},{key:"updateMinimapViewport",value:function(e,t,r){this.minimapRenderer.updateViewport(e,t,r),this.needsRun=!0}},{key:"handleMinimapDrag",value:function(e){var t=this.state,r=this.minimapRenderer,n=Oc(e,r.canvas,t.minimapZoom,t.minimapPanX,t.minimapPanY),o=n.x,i=n.y;t.setPan(o,i)}},{key:"handleMinimapWheel",value:function(t){var r=this.state,n=this.mainSceneRenderer;r.setZoom(function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return(0,e.isNil)(t)||isNaN(t.deltaY)?r:r-t.deltaY/500*Math.min(1,r)}(t,r.zoom),n.canvas),t.preventDefault()}},{key:"setupMinimapInteractions",value:function(){var e=this,t=this.minimapRenderer.canvas;t.addEventListener("mousedown",(function(t){e.handleMinimapDrag(t),e.minimapMouseDown=!0})),t.addEventListener("mousemove",(function(t){e.minimapMouseDown&&e.handleMinimapDrag(t)})),t.addEventListener("mouseup",(function(){e.minimapMouseDown=!1})),t.addEventListener("mouseleave",(function(){e.minimapMouseDown=!1})),t.addEventListener("wheel",(function(t){e.handleMinimapWheel(t)}))}},{key:"destroy",value:function(){this.stateDisposers.forEach((function(e){e()})),this.state.nodes.removeChannel(Cc),this.state.rels.removeChannel(Cc),this.mainSceneRenderer.destroy(),this.minimapRenderer.destroy()}}]),t}(),kc=function(){function e(){Ec(this,e),Tc(this,"mainSceneRenderer",void 0),Tc(this,"minimapRenderer",void 0),Tc(this,"needsRun",void 0),Tc(this,"minimapMouseDown",void 0),Tc(this,"stateDisposers",void 0),Tc(this,"state",void 0)}return xc(e,[{key:"renderMainScene",value:function(e){}},{key:"renderMinimap",value:function(e){}},{key:"checkForUpdates",value:function(e,t){}},{key:"onResize",value:function(){}},{key:"updateMainViewport",value:function(e,t,r){}},{key:"updateMinimapViewport",value:function(e,t,r){}},{key:"handleMinimapDrag",value:function(e){}},{key:"handleMinimapWheel",value:function(e){}},{key:"setupMinimapInteractions",value:function(){}},{key:"destroy",value:function(){}},{key:"needsToRun",value:function(){return!1}}]),e}();function Rc(e){return Rc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rc(e)}function Ic(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Mc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Mc(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Mc(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Nc(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Lc(n.key),n)}}function Dc(e,t,r){return(t=Lc(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Lc(e){var t=function(e,t){if("object"!=Rc(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=Rc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Rc(t)?t:String(t)}var Uc,Fc=24,Bc=function(e){var t=new ArrayBuffer(4),r=new Uint32Array(t),n=new Uint8Array(t),o=ki().get.rgb(e);return n[0]=o[0],n[1]=o[1],n[2]=o[2],n[3]=255*o[3],r[0]},zc=function(){function t(e,r,n,o){var i;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Dc(this,"nodeShader",void 0),Dc(this,"nodeAnimShader",void 0),Dc(this,"relShader",void 0),Dc(this,"relDataBuffer",void 0),Dc(this,"viewportBoxShader",void 0),Dc(this,"defaultRelColor",void 0),Dc(this,"defaultNodeColor",void 0),Dc(this,"disableRelColor",void 0),Dc(this,"disableNodeColor",void 0),Dc(this,"gl",void 0),Dc(this,"activeNodes",void 0),Dc(this,"canvas",void 0),Dc(this,"projection",void 0),Dc(this,"idToIndex",void 0),Dc(this,"posBuffer",void 0),Dc(this,"numRels",void 0),Dc(this,"numNodes",void 0),Dc(this,"nodeDataByte",void 0),Dc(this,"relIdToIndex",void 0),Dc(this,"relData",void 0),Dc(this,"viewportBoxBuffer",void 0),Dc(this,"relBuffer",void 0),Dc(this,"nodeBuffer",void 0),Dc(this,"posTexture",void 0),void 0===(null!==(i=e.getExtension("OES_texture_float"))&&void 0!==i?i:void 0))throw new Error("Renderer needs floating point texture support");this.nodeShader=new Co(e,"uniform mat4 u_projection;\nuniform sampler2D u_positions;\nuniform mediump float u_zoom;\nuniform mediump float u_glAdjust;\nuniform lowp vec3 u_nodeBorderColor;\nuniform lowp vec3 u_selectedBorderColor;\nuniform lowp float u_drawDefaultBorder;\n\nattribute float a_size;\nattribute lowp vec2 a_index;\nattribute lowp vec4 a_color;\nattribute lowp float a_selected;\nattribute lowp float a_hovered;\n\nvarying lowp float window;\nvarying lowp vec4 color;\nvarying lowp float selected;\nvarying lowp float hovered;\nvarying lowp float varNodeSize;\nvarying lowp vec3 nodeBorderColor;\nvarying lowp vec3 selectedBorderColor;\nvarying lowp float drawDefaultBorder;\n\nlowp float MinNodeSize = 5.0;\n\nvoid main(void) {\n vec4 data = texture2D(u_positions, a_index);\n gl_Position = u_projection * vec4(data.xy, 0.0, 1.0);\n\n lowp float nodeSize = a_size * u_zoom * u_glAdjust;\n if (nodeSize < MinNodeSize) {\n gl_PointSize = MinNodeSize;\n varNodeSize = MinNodeSize;\n } else {\n gl_PointSize = nodeSize;\n varNodeSize = nodeSize;\n }\n\n color = a_color;\n selected = a_selected;\n hovered = a_hovered;\n nodeBorderColor = u_nodeBorderColor;\n selectedBorderColor = u_selectedBorderColor;\n drawDefaultBorder = u_drawDefaultBorder;\n}","uniform mediump float u_zoom;\nuniform mediump float u_glAdjust;\n\nvarying lowp vec4 color;\nvarying lowp float drawDefaultBorder;\nvarying lowp vec3 nodeBorderColor;\nvarying lowp vec3 selectedBorderColor;\nvarying lowp float selected;\nvarying lowp float hovered;\nvarying lowp float varNodeSize;\n\nmediump float circleSize = 0.40;\nmediump float ringSize = 0.43;\nmediump float ringSize2 = 0.47;\nmediump float shadowSize = 0.51;\nlowp vec3 shadowColor = vec3(0.73);\nlowp vec3 lineColor = vec3(1.0);\n\nlowp float getShadowAlpha(lowp float size, lowp float dist) {\n return (1.0 - smoothstep(size, shadowSize, dist)) * 0.25;\n}\n\nlowp float getCircleAlpha(lowp float ringSize, lowp float nodeSize, lowp float dist) {\n return color.w - smoothstep(ringSize - nodeSize, ringSize, dist);\n}\n\nvoid main() {\n lowp float dist = distance(gl_PointCoord, vec2(0.5));\n\n if (dist > 0.51) {\n discard;\n }\n else {\n lowp float nodeSize = 1.0 / varNodeSize;\n lowp float nodeAlpha = getCircleAlpha(circleSize, nodeSize, dist);\n lowp float ringAlpha = getCircleAlpha(ringSize, nodeSize, dist);\n lowp vec3 finalColor = color.xyz;\n lowp float finalAlpha = nodeAlpha;\n\n if (selected > 0.0) {\n lowp float shadowAlpha = getShadowAlpha(ringSize2, dist);\n lowp float ringAlpha2 = getCircleAlpha(ringSize2, nodeSize, dist);\n\n finalColor = mix(lineColor, finalColor, nodeAlpha);\n finalColor = mix(selectedBorderColor, finalColor, ringAlpha);\n finalColor = mix(shadowColor, finalColor, ringAlpha2);\n finalAlpha = max(shadowAlpha, max(nodeAlpha, max(ringAlpha, ringAlpha2)));\n } else if (hovered > 0.0) {\n if (drawDefaultBorder > 0.0) {\n lowp float shadowAlpha = getShadowAlpha(ringSize, dist);\n \n finalColor = mix(nodeBorderColor, finalColor, nodeAlpha);\n finalColor = mix(shadowColor, finalColor, ringAlpha);\n finalAlpha = max(shadowAlpha, max(nodeAlpha, ringAlpha));\n } else {\n lowp float shadowAlpha = getShadowAlpha(circleSize, dist);\n\n finalColor = mix(shadowColor, finalColor, nodeAlpha);\n finalAlpha = max(shadowAlpha, nodeAlpha);\n }\n } else {\n if (drawDefaultBorder > 0.0) {\n finalColor = mix(nodeBorderColor, finalColor, nodeAlpha);\n finalAlpha = ringAlpha;\n }\n }\n gl_FragColor = vec4(finalColor, 1.0) * finalAlpha;\n }\n}\n"),this.nodeAnimShader=new Co(e,"uniform mat4 u_projection;\nuniform sampler2D u_positions;\nuniform lowp float u_animPos;\nuniform mediump float u_zoom;\nuniform mediump float u_glAdjust;\n\nattribute float a_size;\nattribute lowp vec2 a_index;\nattribute lowp vec4 a_color;\nattribute lowp float a_active;\n\nvarying lowp float varNodeSize;\nvarying lowp vec4 color;\n\nvoid main(void) {\n vec4 data = texture2D(u_positions, a_index);\n\n gl_Position = u_projection * vec4(data.xy, 0.0, 1.0);\n\n float nodeSize = a_size * u_zoom * u_glAdjust;\n nodeSize = nodeSize * (0.4 / 0.5); // Remove extra space added for shadow and selection ring\n\n gl_PointSize = a_active > 0.5\n ? nodeSize + 0.88 * nodeSize * u_animPos\n : 0.0;\n\n color = a_color;\n varNodeSize = a_size;\n}","uniform mediump float u_zoom;\nuniform lowp float u_animPos;\nuniform mediump float u_glAdjust;\n\nvarying lowp vec4 color;\nvarying lowp float varNodeSize;\nmediump float circleSize = 0.50;\n\nvoid main(void) {\n\n lowp float dist = distance(gl_PointCoord, vec2(0.5));\n\n if (dist > 0.51) {\n discard;\n }\n else {\n lowp float alpha = 1.0 - smoothstep(circleSize - (1.0 / (varNodeSize * 2.0 * u_zoom * u_glAdjust)), circleSize, dist);\n lowp float pulseAlpha = 0.9 - 0.9 * u_animPos;\n gl_FragColor = vec4(color.xyz, 1.0) * alpha * pulseAlpha;\n }\n}\n"),this.relShader=new Co(e,"uniform mat4 u_projection;\nuniform sampler2D u_positions;\nuniform mediump float u_glAdjust;\n\nattribute vec2 a_from;\nattribute vec2 a_to;\nattribute lowp vec4 a_color;\nattribute lowp float a_triside;\nattribute float a_width;\n\nvarying lowp vec4 color;\n\nvoid main(void) {\n vec4 from = texture2D(u_positions, a_from);\n vec4 to = texture2D(u_positions, a_to);\n vec2 direction = normalize(to.xy - from.xy);\n direction = vec2(-direction.y, direction.x);\n\n float width = a_width * u_glAdjust * 0.5;\n\n if (a_triside == 0.0) {\n from.y += (width / 2.0) * direction.y;\n from.x += (width / 2.0) * direction.x;\n } else {\n from.y -= (width / 2.0) * direction.y;\n from.x -= (width / 2.0) * direction.x;\n }\n\n color = a_color;\n gl_Position = u_projection * vec4(from.xy, 0.0, 1.0);\n}\n","varying lowp vec4 color;\n\nvoid main(void) {\n gl_FragColor = vec4(color.xyz, 1.0) * color.w;\n}\n"),this.viewportBoxShader=new Co(e,"attribute vec2 coordinates;\nuniform mat4 u_projection;\n\nvoid main(void) {\n gl_Position = u_projection * vec4(coordinates, 0.0, 1.0);\n}\n","void main(void) {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n}\n"),this.setShaderUniforms(o),e.clearColor(0,0,0,0),e.disable(e.DEPTH_TEST),this.defaultRelColor=4284900966,this.defaultNodeColor=4294937415,this.disableRelColor="#EDEDED",this.disableNodeColor="#EDEDED",e.blendFunc(e.ONE,e.ONE_MINUS_SRC_ALPHA),this.gl=e,this.activeNodes={},this.canvas=e.canvas,this.projection=wo(),this.setData({nodes:r.items,rels:n.items}),this.createPositionTexture(),this.setupViewportRendering()}var r,n;return r=t,n=[{key:"setShaderUniforms",value:function(e){var t,r,n=ki().get.rgb(null===(t=e.nodeBorderStyles.default)||void 0===t||null===(t=t.rings[0])||void 0===t?void 0:t.color),o=ki().get.rgb(null===(r=e.nodeBorderStyles.selected)||void 0===r||null===(r=r.rings[1])||void 0===r?void 0:r.color);if(this.nodeShader.use(),null!=n&&n.length){var i=n.slice(0,3).map((function(e){return e/255}));this.nodeShader.setUniform("u_nodeBorderColor",i),this.nodeShader.setUniform("u_drawDefaultBorder",1)}else this.nodeShader.setUniform("u_drawDefaultBorder",0);var a=o.slice(0,3).map((function(e){return e/255}));this.nodeShader.setUniform("u_selectedBorderColor",a)}},{key:"setData",value:function(e){var t=Pn(e.rels);this.setupNodeRendering(e.nodes),this.setupRelationshipRendering(t)}},{key:"render",value:function(e,t,r){var n,o=this.gl,i=this.idToIndex,a=Ic(e);try{for(a.s();!(n=a.n()).done;){var u=n.value,s=i[u.id];this.posBuffer[4*s+0]=u.x,this.posBuffer[4*s+1]=u.y}}catch(e){a.e(e)}finally{a.f()}o.bindTexture(o.TEXTURE_2D,this.posTexture),o.texImage2D(o.TEXTURE_2D,0,o.RGBA,yn,yn,0,o.RGBA,o.FLOAT,this.posBuffer),o.enable(o.BLEND),o.bindFramebuffer(o.FRAMEBUFFER,null),o.clear(o.COLOR_BUFFER_BIT),o.viewport(0,0,o.drawingBufferWidth,o.drawingBufferHeight),this.renderAnimations(this.posTexture),this.numRels>0&&(this.relShader.use(),this.relShader.setUniform("u_positions",this.posTexture),o.bindBuffer(o.ARRAY_BUFFER,this.relBuffer),this.relShader.setAttributePointerByteNorm("a_color",4,0,16),this.relShader.setAttributePointerByteNorm("a_from",2,4,16),this.relShader.setAttributePointerByteNorm("a_to",2,6,16),this.relShader.setAttributePointerByteNorm("a_triside",1,8,16),this.relShader.setAttributePointerFloat("a_width",1,12,16),o.drawArrays(o.TRIANGLES,0,6*this.numRels)),this.numNodes>0&&(this.nodeShader.use(),this.nodeShader.setUniform("u_positions",this.posTexture),o.bindBuffer(o.ARRAY_BUFFER,this.nodeBuffer),this.nodeShader.setAttributePointerByteNorm("a_color",4,0,12),this.nodeShader.setAttributePointerByteNorm("a_selected",1,4,12),this.nodeShader.setAttributePointerByteNorm("a_index",2,5,12),this.nodeShader.setAttributePointerByte("a_size",4,8,12),this.nodeShader.setAttributePointerByteNorm("a_hovered",1,9,12),o.drawArrays(o.POINTS,0,this.numNodes))}},{key:"renderViewbox",value:function(){var e=this.gl,t=this.projection,r=this.viewportBoxBuffer;this.viewportBoxShader.use(),this.viewportBoxShader.setUniform("u_projection",t),e.bindBuffer(e.ARRAY_BUFFER,r),this.viewportBoxShader.setAttributePointerFloat("coordinates",2,0,0),e.drawArrays(e.LINES,0,8)}},{key:"updateNodes",value:function(t){var r,n=this.gl,o=this.idToIndex,i=this.disableNodeColor,a=this.nodeBuffer,u=this.nodeDataByte,s=!1,c=Ic(t);try{for(c.s();!(r=c.n()).done;){var l=r.value,f=o[l.id];if(!(0,e.isNil)(l.color)||!0===l.disabled){var h=ki().get.rgb(!0===l.disabled?i:l.color);this.nodeDataByte[3*f*4+0]=h[0],this.nodeDataByte[3*f*4+1]=h[1],this.nodeDataByte[3*f*4+2]=h[2],this.nodeDataByte[3*f*4+3]=255*h[3],s=!0}if(void 0!==l.selected){var d=l.selected;this.nodeDataByte[3*f*4+4]=d?255:0,s=!0}if(void 0!==l.activated&&(this.nodeDataByte[3*f*4+7]=l.activated?255:0,s=!0,l.activated?this.activeNodes[l.id]=!0:delete this.activeNodes[l.id]),void 0!==l.hovered){var p=!0!==l.disabled&&l.hovered;this.nodeDataByte[3*f*4+9]=p?255:0,s=!0}if(void 0!==l.size){var v=l.size;this.nodeDataByte[3*f*4+8]=v||mn,s=!0}}}catch(e){c.e(e)}finally{c.f()}s&&(n.bindBuffer(n.ARRAY_BUFFER,a),n.bufferData(n.ARRAY_BUFFER,u,n.DYNAMIC_DRAW))}},{key:"updateRelationships",value:function(e){var t,r=Pn(e),n=this.gl,o=!1,i=Ic(r);try{for(i.s();!(t=i.n()).done;){var a=t.value,u=a.key,s=a.width,c=a.color,l=a.disabled,f=this.relIdToIndex[u],h=void 0===c?this.defaultRelColor:Bc(!0===l?this.disableRelColor:c);this.relData.positionsAndColors[f*Fc+0]=h,this.relData.positionsAndColors[f*Fc+4]=h,this.relData.positionsAndColors[f*Fc+8]=h,this.relData.positionsAndColors[f*Fc+12]=h,this.relData.positionsAndColors[f*Fc+16]=h,this.relData.positionsAndColors[f*Fc+20]=h,o=!0,void 0!==s&&(this.relData.widths[f*Fc+3]=s,this.relData.widths[f*Fc+7]=s,this.relData.widths[f*Fc+11]=s,this.relData.widths[f*Fc+15]=s,this.relData.widths[f*Fc+19]=s,this.relData.widths[f*Fc+23]=s,o=!0)}}catch(e){i.e(e)}finally{i.f()}o&&(n.bindBuffer(n.ARRAY_BUFFER,this.relBuffer),n.bufferData(n.ARRAY_BUFFER,this.relDataBuffer,n.DYNAMIC_DRAW))}},{key:"createPositionTexture",value:function(){var e=this.gl,t=e.createTexture(),r=new Float32Array(262144);e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,yn,yn,0,e.RGBA,e.FLOAT,r),this.posTexture=t,this.posBuffer=r}},{key:"updateViewportBox",value:function(e,t,r,n,o){var i=this.gl,a=wn(),u=n*a,s=o*a,c=(.5*u+t*e)/e,l=(.5*s+r*e)/e,f=(.5*-u+t*e)/e,h=(.5*-s+r*e)/e,d=[c,l,f,l,f,l,f,h,f,h,c,h,c,h,c,l];i.bindBuffer(i.ARRAY_BUFFER,this.viewportBoxBuffer),i.bufferData(i.ARRAY_BUFFER,new Float32Array(d),i.DYNAMIC_DRAW)}},{key:"updateViewport",value:function(e,t,r){var n=this.gl,o=1/e,i=t-n.drawingBufferWidth*o*.5,a=r-n.drawingBufferHeight*o*.5,u=n.drawingBufferWidth*o,s=n.drawingBufferHeight*o,c=wo(),l=2.6315789473684212*wn();Oo(c,i,i+u,a+s,a,0,1e6),this.nodeShader.use(),this.nodeShader.setUniform("u_zoom",e),this.nodeShader.setUniform("u_glAdjust",l),this.nodeShader.setUniform("u_projection",c),this.nodeAnimShader.use(),this.nodeAnimShader.setUniform("u_zoom",e),this.nodeAnimShader.setUniform("u_glAdjust",l),this.nodeAnimShader.setUniform("u_projection",c),this.relShader.use(),this.relShader.setUniform("u_glAdjust",l),this.relShader.setUniform("u_projection",c),this.projection=c}},{key:"setupViewportRendering",value:function(){this.viewportBoxBuffer=this.gl.createBuffer()}},{key:"setupNodeRendering",value:function(t){var r=this.gl,n=new ArrayBuffer(8),o=new Uint32Array(n),i=new Uint8Array(n);void 0===this.nodeBuffer&&(this.nodeBuffer=r.createBuffer()),this.numNodes=t.length;var a=new ArrayBuffer(3*t.length*8),u=new Uint32Array(a),s={};this.activeNodes={};for(var c=0;c<t.length;c++){var l=t[c],f=l.selected,h=l.hovered,d=l.color,p=l.activated,v=l.size,y=l.id,b=l.disabled,m=(0,e.isNil)(d)?this.defaultNodeColor:Bc(d);u[3*c+0]=!0===b?Bc(this.disableNodeColor):m,i[0]=!0===f?255:0,i[1]=c%yn,i[2]=Math.floor(c/yn),i[3]=!0===p?255:0,i[4]=!1===b&&!0===h?255:0,!0===p&&(this.activeNodes[y]=!0),u[3*c+1]=o[0],u[3*c+2]=null!=v?v:mn,u[3*c+3]=o[1],s[y]=c}r.bindBuffer(r.ARRAY_BUFFER,this.nodeBuffer),r.bufferData(r.ARRAY_BUFFER,u,r.DYNAMIC_DRAW),this.numNodes=t.length,this.nodeDataByte=new Uint8Array(a),this.idToIndex=s}},{key:"setupRelationshipRendering",value:function(t){var r=this,n=this.gl,o=new ArrayBuffer(4),i=new Uint32Array(o),a=new Uint8Array(o),u={};void 0===this.relBuffer&&(this.relBuffer=n.createBuffer());for(var s=new ArrayBuffer(t.length*Fc*4),c=new Uint32Array(s),l=new Float32Array(s),f=function(n){var o=t[n],s=o.from,f=o.to,h=o.color,d=o.width,p=o.key,v=o.disabled,y=r.idToIndex[s],b=r.idToIndex[f],m=y%yn,g=Math.floor(y/yn),_=b%yn,w=Math.floor(b/yn),O=[m,g,_,w],S=[_,w,m,g],E=(0,e.isNil)(h)?r.defaultRelColor:Bc(h),P=!0===v?Bc(r.disableRelColor):E,x=null!=d?d:1;u[p]=n;var T=0,j=function(e,t,r,o){c[n*Fc+T]=e,T+=1;for(var u=0;u<t.length;u++)a[u]=t[u];c[n*Fc+T]=i[0],T+=1,a[0]=r,c[n*Fc+T]=i[0],l[n*Fc+(T+=1)]=o,T+=1};j(P,O,255,x),j(P,S,0,x),j(P,O,0,x),j(P,S,0,x),j(P,O,0,x),j(P,S,255,x)},h=0;h<t.length;h++)f(h);n.bindBuffer(n.ARRAY_BUFFER,this.relBuffer),n.bufferData(n.ARRAY_BUFFER,s,n.DYNAMIC_DRAW),this.numRels=t.length,this.relDataBuffer=s,this.relData={positionsAndColors:c,widths:l},this.relIdToIndex=u}},{key:"renderAnimations",value:function(e){var t=this.gl,r=this.nodeBuffer,n=this.numNodes,o=Date.now()%1e3/1e3,i=o<.7?o/.7:0;this.nodeAnimShader.use(),this.nodeAnimShader.setUniform("u_positions",e),this.nodeAnimShader.setUniform("u_animPos",i),t.bindBuffer(t.ARRAY_BUFFER,r),this.nodeAnimShader.setAttributePointerByteNorm("a_color",4,0,12),this.nodeAnimShader.setAttributePointerByteNorm("a_active",1,7,12),this.nodeAnimShader.setAttributePointerByteNorm("a_index",2,5,12),this.nodeAnimShader.setAttributePointerByte("a_size",4,8,12),t.drawArrays(t.POINTS,0,n)}},{key:"destroy",value:function(){this.gl.deleteBuffer(this.nodeBuffer),this.gl.deleteBuffer(this.relBuffer),this.nodeShader.remove(),this.nodeAnimShader.remove(),this.relShader.remove()}}],n&&Nc(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),t}(),Vc=function(e,t,r){var n=wn();e.width=t*n,e.height=r*n,e.style.width="".concat(t,"px"),e.style.height="".concat(r,"px")},Wc=function(e){Vn.warn("Error: WebGL context lost - visualization will stop working!",e),void 0!==Uc&&Uc(e)},Gc=function(e){var t=e.parentElement.getBoundingClientRect(),r=t.width,n=t.height;Vc(e,r,n)},qc=function(e,t){var r=document.createElement("canvas");return document.body.appendChild(r),Vc(r,e,t),r},Hc=function(e,t){var r=document.createElement("canvas");return Object.assign(r.style,_n),void 0!==e&&(e.appendChild(r),Gc(r)),function(e,t){Uc=t,e.addEventListener("webglcontextlost",Wc)}(r,t),r},Yc=function(e){e.width=0,e.height=0,e.remove()},Xc=function(e){return e.getContext("2d")},Zc=function(e){var t={antialias:!0},r=e.getContext("webgl",t);return null===r&&(r=e.getContext("experimental-webgl",t)),function(e){return e instanceof WebGLRenderingContext}(r)?r:null},Kc=function(e){e.canvas.removeEventListener("webglcontextlost",Wc);var t=e.getExtension("WEBGL_lose_context");null==t||t.loseContext()};function $c(e){return function(e){if(Array.isArray(e))return el(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Jc(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qc(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Jc(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Jc(e,t){if(e){if("string"==typeof e)return el(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?el(e,t):void 0}}function el(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var tl=mn*wn();function rl(e){return rl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rl(e)}function nl(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ol(n.key),n)}}function ol(e){var t=function(e,t){if("object"!=rl(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=rl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==rl(t)?t:String(t)}var il=function(){function e(){var t,r,n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=this,n=void 0,(r=ol(r="callbacks"))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,this.callbacks={}}var t,r;return t=e,r=[{key:"register",value:function(e,t){this.isCallbackRegistered(e)||(this.callbacks[e]=[]),this.callbacks[e].push(t)}},{key:"isCallbackRegistered",value:function(e){return void 0!==this.callbacks[e]}},{key:"callIfRegistered",value:function(){var e,t=arguments,r=Array.prototype.slice.call(arguments)[0];e=r,u.includes(e)&&this.isCallbackRegistered(r)&&this.callbacks[r].slice(0).forEach((function(e){return e.apply(null,Array.prototype.slice.call(t,1))}))}}],r&&nl(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),al=o(481),ul=o.n(al);function sl(e){return sl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sl(e)}function cl(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,fl(n.key),n)}}function ll(e,t,r){return(t=fl(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fl(e){var t=function(e,t){if("object"!=sl(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=sl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==sl(t)?t:String(t)}var hl=5e-5,dl=function(){function e(t){var r,n=this,o=t.state,i=t.getNodePositions,a=t.canvas;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),ll(this,"xCtrl",void 0),ll(this,"yCtrl",void 0),ll(this,"zoomCtrl",void 0),ll(this,"getNodePositions",void 0),ll(this,"firstUpdate",void 0),ll(this,"state",void 0),ll(this,"canvas",void 0),ll(this,"stateDisposers",void 0),this.state=o,this.getNodePositions=i,this.canvas=a,this.xCtrl=new(ul())(.35,hl,.05,1),this.yCtrl=new(ul())(.35,hl,.05,1),this.zoomCtrl=new(ul())(.3,1e-5,.01,1),this.stateDisposers=[],this.stateDisposers.push(o.autorun((function(){null===o.fitNodeIds&&(n.xCtrl.reset(),n.yCtrl.reset(),n.zoomCtrl.reset())}))),this.stateDisposers.push(o.autorun((function(){r!==o.fitNodeIds&&(r=o.fitNodeIds,n.firstUpdate=!0)}))),this.stateDisposers.push(o.autorun((function(){o.resetZoom&&(n.firstUpdate=!0)})))}var t,r;return t=e,r=[{key:"needsToRun",value:function(){var e=this.state,t=e.fitNodeIds,r=e.resetZoom;return t.length>0||r}},{key:"update",value:function(e,t){var r=this.state,n=r.fitNodeIds,o=r.resetZoom;n.length>0?this.fitNodes(n,e,t):o&&this.reset(e,t)}},{key:"destroy",value:function(){this.stateDisposers.forEach((function(e){return e()}))}},{key:"recalculateTarget",value:function(e,t,r,n){for(var o=this.xCtrl,i=this.yCtrl,a=this.zoomCtrl,u=this.state,s=[],c=0;c<e.length;c++)s.push({id:e[c]});var l=u.zoom,f=u.panX,h=u.panY,d=u.maxNodeRadius,p=u.nodes,v=u.defaultZoomLevel,y=this.getNodePositions(s);p.updatePositions(y);var b=Ni(y,d),m=b.centerX,g=b.centerY,_=b.nodesWidth,w=b.nodesHeight;if(isNaN(m)||isNaN(g))return Vn.info("fit() function couldn't calculate center point, not updating viewport"),!1;var O=t.noPan,S=t.outOnly,E=t.minZoom,P=t.maxZoom;o.setTarget(O?f:m),i.setTarget(O?h:g);var x=Di(_,w,r,n),T=x.zoomX,j=x.zoomY;if(T===1/0&&j===1/0)a.setTarget(v);else{var C=Li(T,j,E,P);S&&l<C?a.setTarget(l):a.setTarget(C)}return!0}},{key:"allNodesAreVisible",value:function(e,t,r){var n=Di(t,r,this.canvas.width,this.canvas.height),o=n.zoomX,i=n.zoomY;return e<o&&e<i}},{key:"reset",value:function(e,t){var r=this.xCtrl,n=this.yCtrl,o=this.zoomCtrl,i=this.state,a=this.firstUpdate,u=this.canvas,s=i.zoom,c=i.panX,l=i.panY,f=i.nodes,h=i.maxNodeRadius,d=i.defaultZoomLevel;if(a||e){o.setTarget(d);var p=Ni(Object.values(f.idToPosition),h),v=p.centerX,y=p.centerY,b=p.nodesWidth,m=p.nodesHeight;this.allNodesAreVisible(s,b,m)?(r.setTarget(v),n.setTarget(y)):(r.setTarget(c),n.setTarget(l)),this.firstUpdate=!1}var g=s+o.update(s),_=c+r.update(c),w=l+n.update(l);i.updateZoomToFit(g,_,w,u),Math.abs(o.target-g)<.01&&(i.updateZoomToFit(d,_,w,u),i.clearReset(),void 0!==t&&t())}},{key:"fitNodes",value:function(e,t,r){var n=this.state,o=this.firstUpdate,i=this.canvas,a=this.xCtrl,u=this.yCtrl,s=this.zoomCtrl,c=n.zoomOptions,l=void 0===c?{}:c,f=n.zoom,h=n.panX,d=n.panY,p=!0;if(o||t){var v=i.width,y=i.height;p=this.recalculateTarget(e,l,v,y),this.firstUpdate=!1}if(p){if(!l.animated)return n.setZoomPan(s.target,a.target,u.target,i),void n.clearFit();var b=h+a.update(h),m=d+u.update(d),g=f+s.update(f);n.updateZoomToFit(g,b,m,i);var _=Math.max(5,10/s.target),w=Math.min(.01,.01*s.target);!t&&Math.abs(s.target-g)<w&&Math.abs(a.target-b)<_&&Math.abs(u.target-m)<_&&(n.setZoom(s.target,i),n.clearFit(),void 0!==r&&r())}}}],r&&cl(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function pl(e){return pl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pl(e)}function vl(){vl=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var i=t&&t.prototype instanceof b?t:b,a=Object.create(i.prototype),u=new A(n||[]);return o(a,"_invoke",{value:x(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var h="suspendedStart",d="suspendedYield",p="executing",v="completed",y={};function b(){}function m(){}function g(){}var _={};c(_,a,(function(){return this}));var w=Object.getPrototypeOf,O=w&&w(w(k([])));O&&O!==r&&n.call(O,a)&&(_=O);var S=g.prototype=b.prototype=Object.create(_);function E(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,i,a,u){var s=f(e[o],e,i);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==pl(l)&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,u)}))}u(s.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function x(t,r,n){var o=h;return function(i,a){if(o===p)throw new Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var s=T(u,n);if(s){if(s===y)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=p;var c=f(t,r,n);if("normal"===c.type){if(o=n.done?v:d,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=v,n.method="throw",n.arg=c.arg)}}}function T(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,T(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function k(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(pl(t)+" is not iterable")}return m.prototype=g,o(S,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=c(g,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,c(e,s,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},E(P.prototype),c(P.prototype,u,(function(){return this})),t.AsyncIterator=P,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new P(l(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(S),c(S,s,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=k,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:k(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}function yl(e,t,r,n,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void r(e)}u.done?t(s):Promise.resolve(s).then(n,o)}function bl(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ml(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function gl(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ml(Object(r),!0).forEach((function(t){wl(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ml(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ol(n.key),n)}}function wl(e,t,r){return(t=Ol(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ol(e){var t=function(e,t){if("object"!=pl(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=pl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==pl(t)?t:String(t)}var Sl="NvlController",El={filename:"visualisation.png",backgroundColor:"rgba(0,0,0,0)"},Pl="onError",xl="onLayoutDone",Tl={},jl=function(){var e;return null!==(e=Tl[arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default"])&&void 0!==e?e:Object.values(Tl).pop()},Cl=function(){function e(t,r){var n,o,i,a=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),wl(this,"destroyed",void 0),wl(this,"state",void 0),wl(this,"callbacks",void 0),wl(this,"instanceId",void 0),wl(this,"glController",void 0),wl(this,"webGLContext",void 0),wl(this,"webGLMinimapContext",void 0),wl(this,"htmlOverlay",void 0),wl(this,"hasResized",void 0),wl(this,"hierarchicalLayout",void 0),wl(this,"gridLayout",void 0),wl(this,"freeLayout",void 0),wl(this,"d3ForceLayout",void 0),wl(this,"forceLayout",void 0),wl(this,"canvasRenderer",void 0),wl(this,"glCanvas",void 0),wl(this,"canvasRect",void 0),wl(this,"glMinimapCanvas",void 0),wl(this,"c2dCanvas",void 0),wl(this,"isInRenderSwitchAnimation",void 0),wl(this,"justSwitchedRenderer",void 0),wl(this,"justSwitchedLayout",void 0),wl(this,"layoutUpdating",void 0),wl(this,"layoutComputing",void 0),wl(this,"isRenderingDisabled",void 0),wl(this,"setRenderSwitchAnimation",void 0),wl(this,"stateDisposers",void 0),wl(this,"zoomTransitionHandler",void 0),wl(this,"currentLayout",void 0),wl(this,"layoutTimeLimit",void 0),wl(this,"pixelRatio",void 0),wl(this,"removeResizeListener",void 0),wl(this,"removeMinimapResizeListener",void 0),wl(this,"pendingZoomOperation",void 0),wl(this,"layoutRunner",void 0),wl(this,"animationRequestId",void 0),wl(this,"layoutDoneCallback",void 0),wl(this,"layoutComputingCallback",void 0),wl(this,"currentLayoutType",void 0),this.destroyed=!1;var u=r.frame,s=r.minimapContainer,c=void 0===s?document.createElement("span"):s,l=r.layoutOptions,f=r.layout,h=r.instanceId,d=void 0===h?"default":h,p=t.nodes,v=t.rels,y=t.webGLVisible,b=t.disableWebGL;this.state=t,this.callbacks=new il,this.instanceId=d;var m=u;m.setAttribute("instanceId",d),m.setAttribute("data-testid","nvl-parent"),null!==(n=m.style.height)&&void 0!==n&&n.length||Object.assign(m.style,{height:"100%"}),null!==(o=m.style.outline)&&void 0!==o&&o.length||Object.assign(m.style,{outline:"none"});var g=Hc(m,this.onWebGLContextLost.bind(this)),_=Hc(c,this.onWebGLContextLost.bind(this));if(g.setAttribute("data-testid","nvl-gl-canvas"),b)this.glController=new kc;else{var w=Zc(g),O=Zc(_);this.glController=new Ac({mainSceneRenderer:new zc(w,p,v,this.state),minimapRenderer:new zc(O,p,v,this.state),state:t}),this.webGLContext=w,this.webGLMinimapContext=O}var S=Hc(m,this.onWebGLContextLost.bind(this));S.setAttribute("data-testid","nvl-c2d-canvas");var E=S.getContext("2d"),P=document.createElement("div");Object.assign(P.style,gl(gl({},_n),{},{overflow:"hidden"})),m.appendChild(P),this.htmlOverlay=P,this.hasResized=!0,this.hierarchicalLayout=new Ba(gl(gl({},l),{},{state:this.state})),this.gridLayout=new Ci({state:this.state}),this.freeLayout=new _i({state:this.state}),this.d3ForceLayout=new Bn({state:this.state}),this.forceLayout=b?this.d3ForceLayout:new li(gl(gl({},l),{},{webGLContext:this.webGLContext,state:this.state})),this.state.setLayout(f),this.state.setLayoutOptions(l);var x=new wc(S,E,t,r);this.canvasRenderer=x,this.glCanvas=g,this.canvasRect=g.getBoundingClientRect(),this.glMinimapCanvas=_,this.c2dCanvas=S,this.glCanvas.style.opacity=y?"1":"0",this.c2dCanvas.style.opacity=y?"0":"1",this.isInRenderSwitchAnimation=!1,this.justSwitchedRenderer=!1,this.justSwitchedLayout=!1,this.hasResized=!1,this.layoutUpdating=!1,this.layoutComputing=!1,this.isRenderingDisabled=!1,p.addChannel(Sl),v.addChannel(Sl),this.setRenderSwitchAnimation=function(){a.isInRenderSwitchAnimation=!1},this.stateDisposers=[],this.stateDisposers.push(t.autorun((function(){a.callIfRegistered("zoom",t.zoom)}))),this.stateDisposers.push(t.autorun((function(){a.callIfRegistered("pan",{panX:t.panX,panY:t.panY})}))),this.stateDisposers.push(t.autorun((function(){a.setLayout(t.layout)}))),this.stateDisposers.push(t.autorun((function(){a.setLayoutOptions(t.layoutOptions)}))),this.stateDisposers.push(t.autorun((function(){var e=t.webGLVisible?"1":"0";e!==a.glCanvas.style.opacity&&(a.justSwitchedRenderer=!0,a.glCanvas.style.opacity=e,a.c2dCanvas.style.opacity=t.webGLVisible?"0":"1")}))),this.startMainLoop(),this.zoomTransitionHandler=new dl({state:t,getNodePositions:function(e){return a.currentLayout.getNodePositions(e)},canvas:g}),this.layoutTimeLimit=null!==(i=r.layoutTimeLimit)&&void 0!==i?i:16,this.pixelRatio=wn(),this.removeResizeListener=Pr()(m,(function(){Gc(g),Gc(S),a.canvasRect=g.getBoundingClientRect(),a.hasResized=!0})),this.removeMinimapResizeListener=Pr()(c,(function(){Gc(_)})),Tl[d]=this,window.__Nvl_dumpNodes=function(e){var t;return null===(t=jl(e))||void 0===t?void 0:t.dumpNodes()},window.__Nvl_dumpRelationships=function(e){var t;return null===(t=jl(e))||void 0===t?void 0:t.dumpRelationships()},window.__Nvl_registerDoneCallback=function(e,t){var r;return null===(r=jl(t))||void 0===r?void 0:r.on(xl,e)},window.__Nvl_getNodesOnScreen=function(e){var t;return null===(t=jl(e))||void 0===t?void 0:t.getNodesOnScreen()},window.__Nvl_getZoomLevel=function(e){var t;return null===(t=jl(e))||void 0===t?void 0:t.getScale()},this.pendingZoomOperation=null}var t,r,n,o;return t=e,r=[{key:"onWebGLContextLost",value:function(e){this.callIfRegistered("onWebGLContextLost",e)}},{key:"updateMinimapZoom",value:function(){var e=this.state,t=e.nodes,r=e.maxNodeRadius,n=e.maxMinimapZoom,o=e.minMinimapZoom,i=Ni(Object.values(t.idToPosition),r),a=i.centerX,u=i.centerY,s=i.nodesWidth,c=i.nodesHeight,l=Di(s,c,this.glMinimapCanvas.width,this.glMinimapCanvas.height),f=l.zoomX,h=l.zoomY,d=Li(f,h,o,n);this.state.updateMinimapZoomToFit(d,a,u)}},{key:"startMainLoop",value:function(){var e=this,t=this.state,r=t.nodes,n=t.rels;this.currentLayout.update();var o=this.currentLayout.getNodePositions(r.items);r.updatePositions(o),this.isRenderingDisabled||(this.glController.renderMainScene(o),this.glController.renderMinimap(o),this.canvasRenderer.processUpdates(),this.canvasRenderer.render(o)),this.layoutRunner=setInterval((function(){try{!function(){var t=e.currentLayout.getShouldUpdate(),r=t||e.justSwitchedLayout,n=r&&!e.layoutUpdating&&!e.justSwitchedLayout;if(r)for(var o=window.performance.now(),i=n?0:50,a=0;a<i;a++){e.currentLayout.update(e.justSwitchedLayout),e.justSwitchedLayout=!1;var u=window.performance.now();if(!t||u-o>e.layoutTimeLimit)break}}()}catch(t){if(!e.callbacks.isCallbackRegistered(Pl))throw t;e.callIfRegistered(Pl,t)}}),13),this.animationRequestId=window.requestAnimationFrame((function t(){try{!function(t){if(e.destroyed)Vn.info("STEP IN A DESTROYED STRIP");else{var o=wn();if(o!==e.pixelRatio)return e.pixelRatio=o,void e.callIfRegistered("restart");var i=e.currentLayout.getShouldUpdate(),a=i||e.justSwitchedLayout,u=e.currentLayout.getComputing(),s=e.zoomTransitionHandler.needsToRun(),c=a&&!e.layoutUpdating&&!e.justSwitchedLayout,l=e.layoutComputing&&!u,f=e.state.webGLVisible&&e.glController.needsToRun(),h=!e.state.webGLVisible&&e.canvasRenderer.needsToRun(),d=e.isInRenderSwitchAnimation||e.justSwitchedRenderer,p=e.hasResized,v=null!==e.pendingZoomOperation,y=e.glController.minimapMouseDown;if(r.clearChannel(Sl),n.clearChannel(Sl),s||a||l||d||f||h||y||p||v){!v||c||e.currentLayout.getComputing()||(e.pendingZoomOperation(),e.pendingZoomOperation=null);var b=i||u||l;e.zoomTransitionHandler.update(b,(function(){return e.callIfRegistered("onZoomTransitionDone")})),p&&e.glController.onResize();var m=e.currentLayout.getNodePositions(r.items);if(r.updatePositions(m),e.callIfRegistered("onLayoutStep",e.dumpNodes()),e.updateMinimapZoom(),e.glController.renderMinimap(m),!e.isRenderingDisabled){if((e.state.webGLVisible||d)&&e.glController.renderMainScene(m),!e.state.webGLVisible||d){e.canvasRenderer.processUpdates(),e.canvasRenderer.render(m);for(var g=0;g<n.items.length;g++){var _=n.items[g].id,w=e.canvasRenderer.arrowBundler.getBundle(n.items[g]),O=n.idToHtmlOverlay[_],S=w.labelInfo[_];if(O&&S){var E=S.rotation,P=S.position,x=S.width,T=S.height,j=e.mapCanvasSpaceToRelativePosition(P.x,P.y),C=j.x,A=j.y,k=x>5&&!e.state.webGLVisible;Object.assign(O.style,{top:"".concat(A,"px"),left:"".concat(C,"px"),width:"".concat(x,"px"),height:"".concat(T,"px"),display:k?"block":"none",transform:"translate(-50%, -50%) scale(".concat(Number(e.state.zoom),") rotate(").concat(E,"rad")})}}}for(var R=0;R<r.items.length;R++){var I=r.items[R],M=I.id,N=I.size,D=r.idToHtmlOverlay[M];if(D){var L=e.state.nodes.idToPosition[M],U=e.mapCanvasSpaceToRelativePosition(L.x,L.y),F=U.x,B=U.y,z="".concat(2*(null!=N?N:mn),"px");Object.assign(D.style,{top:"".concat(B,"px"),left:"".concat(F,"px"),width:z,height:z,transform:"translate(-50%, -50%) scale(".concat(Number(e.state.zoom),")")})}}}}var V=!a&&e.layoutUpdating,W=u!==e.layoutComputing;e.layoutComputing=u,e.layoutUpdating=a,V&&e.callIfRegistered(xl),W&&e.callIfRegistered("onLayoutComputing",u),e.justSwitchedRenderer=!1,e.hasResized=!1,void 0!==t&&t()}}((function(){e.animationRequestId=window.requestAnimationFrame(t)}))}catch(t){if(!e.callbacks.isCallbackRegistered(Pl))throw t;e.callIfRegistered(Pl,t)}}))}},{key:"updateHtmlOverlay",value:function(){this.state.nodes.updateHtmlOverlay(this.htmlOverlay),this.state.rels.updateHtmlOverlay(this.htmlOverlay)}},{key:"dumpNodes",value:function(){var e,t=this.state.nodes.items,r=this.state.nodes.idToPosition,n=[],o=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return bl(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?bl(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(t);try{for(o.s();!(e=o.n()).done;){var i=e.value,a=r[i.id],u=this.mapCanvasSpaceToRelativePosition(a.x,a.y);n.push(gl(gl({},i),{},{x:u.x,y:u.y}))}}catch(e){o.e(e)}finally{o.f()}return n}},{key:"dumpRelationships",value:function(){return mr(this.state.rels.items)}},{key:"mapCanvasSpaceToRelativePosition",value:function(e,t){var r=this.canvasRect,n=window.devicePixelRatio||1,o=(e-this.state.panX)*this.state.zoom/n,i=(t-this.state.panY)*this.state.zoom/n;return{x:o+.5*r.width,y:i+.5*r.height}}},{key:"mapRelativePositionToCanvasSpace",value:function(e,t){var r=this.glCanvas.getBoundingClientRect(),n=window.devicePixelRatio||1,o=n*(e-.5*r.width),i=n*(t-.5*r.height);return{x:this.state.panX+o/this.state.zoom,y:this.state.panY+i/this.state.zoom}}},{key:"getNodePositions",value:function(){return Object.values(mr(this.state.nodes.idToPosition))}},{key:"setNodePositions",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.state.nodes.updatePositions(e),this.currentLayout.updateNodes(e),t||this.currentLayout.terminateUpdate(),this.hasResized=!0,0===this.getNodesOnScreen().nodes.length&&this.state.setPan(0,0),this.state.clearFit()}},{key:"isLayoutMoving",value:function(){return this.layoutUpdating}},{key:"getNodesOnScreen",value:function(){var e=this.glCanvas.getBoundingClientRect(),t=this.mapRelativePositionToCanvasSpace(0,0),r=t.x,n=t.y,o=this.mapRelativePositionToCanvasSpace(e.width,e.height);return function(e,t,r,n,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:["node"],a=o.nodes,u=o.rels,s=Math.min(e,r),c=Math.max(e,r),l=Math.min(t,n),f=Math.max(t,n),h=[],d=[];if(i.includes("node"))for(var p=0,v=Object.values(a.idToPosition);p<v.length;p++){var y=v[p],b=y.x,m=y.y;void 0!==b&&void 0!==m&&b>s&&b<c&&m>l&&m<f&&h.push(y)}if(i.includes("relationship")){var g,_=Qc(u.items);try{for(_.s();!(g=_.n()).done;){var w=g.value,O=w.from,S=w.to,E=a.idToPosition[O],P=a.idToPosition[S];if(void 0!==E.x&&void 0!==E.y&&void 0!==P.x&&void 0!==P.y){var x=E.x>s&&E.x<c&&E.y>l&&E.y<f,T=P.x>s&&P.x<c&&P.y>l&&P.y<f;x&&T&&d.push(w)}}}catch(e){_.e(e)}finally{_.f()}}return{nodes:h,rels:d}}(r,n,o.x,o.y,this.state,["node"])}},{key:"registerDoneCallback",value:function(e){this.layoutDoneCallback=e}},{key:"registerComputingCallback",value:function(e){this.layoutComputingCallback=e}},{key:"getPosition",value:function(e){return this.currentLayout.getNodePositions([{id:e}])[0]}},{key:"getScale",value:function(){return this.state.zoom}},{key:"getPan",value:function(){return{x:this.state.panX,y:this.state.panY}}},{key:"setZoomLevel",value:function(e){var t=this;this.pendingZoomOperation=function(){return t.state.setZoom(e,t.glCanvas)}}},{key:"setPanCoordinates",value:function(e,t){this.state.setPan(e,t)}},{key:"setZoomAndPan",value:function(e,t,r){var n=this;this.pendingZoomOperation=function(){return n.state.setZoomPan(e,t,r,n.glCanvas)}}},{key:"fit",value:function(e,t){var r=this;this.pendingZoomOperation=function(){return r.state.fitNodes(e,t)}}},{key:"resetZoom",value:function(){var e=this;this.pendingZoomOperation=function(){return e.state.setZoomReset()}}},{key:"setRenderer",value:function(e){this.state.setRenderer(e)}},{key:"on",value:function(e,t){this.callbacks.register(e,t)}},{key:"isDestroyed",value:function(){return this.destroyed}},{key:"destroy",value:function(){var e;this.destroyed||(this.animationRequestId&&window.cancelAnimationFrame(this.animationRequestId),void 0!==this.layoutRunner&&window.clearInterval(this.layoutRunner),this.glController.destroy(),this.glCanvas.removeEventListener("transitionend",this.setRenderSwitchAnimation),void 0!==this.webGLContext&&Kc(this.webGLContext),void 0!==this.webGLMinimapContext&&Kc(this.webGLMinimapContext),Yc(this.glCanvas),Yc(this.glMinimapCanvas),this.canvasRenderer.destroy(),Yc(this.c2dCanvas),this.removeResizeListener(),this.removeMinimapResizeListener(),this.forceLayout.destroy(),this.hierarchicalLayout.destroy(),this.gridLayout.destroy(),this.freeLayout.destroy(),this.htmlOverlay.remove(),this.zoomTransitionHandler.destroy(),this.stateDisposers.forEach((function(e){e()})),e=this.instanceId,delete Tl[e],this.destroyed=!0)}},{key:"callIfRegistered",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];this.callbacks.callIfRegistered.apply(this.callbacks,arguments)}},{key:"getCanvasRelsAt",value:function(e){return this.canvasRenderer.getRelsAt(e)}},{key:"getCanvasNodesAt",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.canvasRenderer.getNodesAt(e,t)}},{key:"getLayout",value:function(e){return e===ca?this.hierarchicalLayout:e===sa?this.forceLayout:e===la?this.gridLayout:e===fa?this.freeLayout:e===ha?this.d3ForceLayout:this.forceLayout}},{key:"setLayout",value:function(e){Vn.info("Switching to layout: ".concat(e));var t=this.currentLayoutType,r=this.getLayout(e);"free"===e&&r.setNodePositions(this.state.nodes.idToPosition),this.currentLayout=r,this.currentLayoutType=e,t&&t!==this.currentLayoutType&&(this.justSwitchedLayout=!0)}},{key:"setLayoutOptions",value:function(e){this.getLayout(this.state.layout).setOptions(e)}},{key:"createDownloadLink",value:function(e,t){var r=document.createElement("a");r.style.display="none",r.setAttribute("download",e);var n=t.toDataURL("image/png").replace(/^data:image\/png/,"data:application/octet-stream");return r.setAttribute("href",n),r}},{key:"saveToFile",value:function(e){var t=gl(gl({},El),e),r=t.filename,n=t.backgroundColor,o=this.state.nodes.items;this.currentLayout.update(this.justSwitchedLayout),this.justSwitchedLayout=!1;var i=this.currentLayout.getNodePositions(o);this.state.nodes.updatePositions(i);var a=qc(this.c2dCanvas.width,this.c2dCanvas.height),u=Xc(a);this.canvasRenderer.processUpdates(),this.canvasRenderer.render(i,{canvas:a,context:u,backgroundColor:n,ignoreAnimations:!0}),this.createDownloadLink(r,a).click(),Yc(a),a=null,u=null}},{key:"prepareLargeFileForDownload",value:function(e){var t=this,r=gl(gl({},El),e),n=this.state.nodes.items,o=r.filename,i=r.backgroundColor,a=this.currentLayout.getNodePositions(n),u=Ni(a,100),s=u.nodesWidth,c=u.nodesHeight,l=u.centerX,f=u.centerY,h=Math.max(Math.min(s+100,15e3),5e3),d=Math.max(Math.min(c+100,15e3),5e3);return this.isRenderingDisabled=!0,new Promise((function(e,r){try{t.setPanCoordinates(l,f);var n=Math.max(h/s-.02,t.state.minZoom),u=Math.max(d/c-.02,t.state.minZoom);t.setZoomLevel(Math.min(n,u))}catch(e){return Vn.error("An error occurred while downloading the file"),void r(e)}setTimeout((function(){try{t.currentLayout.update(t.justSwitchedLayout),t.justSwitchedLayout=!1,t.state.nodes.updatePositions(a);var n=qc(h,d),u=Xc(n);t.canvasRenderer.processUpdates(),t.canvasRenderer.render(a,{canvas:n,context:u,backgroundColor:i,ignoreAnimations:!0,showCaptions:!0}),t.createDownloadLink(o,n).click(),Yc(n),n=null,u=null,e(!0)}catch(e){r(e)}}),500)}))}},{key:"saveFullGraphToLargeFile",value:(n=vl().mark((function e(t){var r,n,o,i;return vl().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=gl(gl({},El),t),n=this.state.zoom,o=this.state.panX,i=this.state.panY,e.prev=4,e.next=7,this.prepareLargeFileForDownload(r);case 7:e.next=17;break;case 9:if(e.prev=9,e.t0=e.catch(4),Vn.error("An error occurred while downloading the image"),!this.callbacks.isCallbackRegistered(Pl)){e.next=16;break}this.callIfRegistered(Pl,e.t0),e.next=17;break;case 16:throw e.t0;case 17:return e.prev=17,this.isRenderingDisabled=!1,this.setZoomLevel(n),this.setPanCoordinates(o,i),e.finish(17);case 22:case"end":return e.stop()}}),e,this,[[4,9,17,22]])})),o=function(){var e=this,t=arguments;return new Promise((function(r,o){var i=n.apply(e,t);function a(e){yl(i,r,o,a,u,"next",e)}function u(e){yl(i,r,o,a,u,"throw",e)}a(void 0)}))},function(e){return o.apply(this,arguments)})}],r&&_l(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Al(e){return Al="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Al(e)}function kl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Rl(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ml(n.key),n)}}function Il(e,t,r){return t&&Rl(e.prototype,t),r&&Rl(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ml(e){var t=function(e,t){if("object"!=Al(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=Al(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Al(t)?t:String(t)}var Nl=function(){function e(t,r){if(kl(this,e),!t)throw new Error("Tried to create a node with no data");this.data=t,this.parent=r,this.children=[]}return Il(e,[{key:"addChild",value:function(e){this.children.push(e)}},{key:"isRoot",value:function(){return null===this.parent}},{key:"print",value:function(){var e=this.data.name;this.isRoot()||(e="".concat(e,"\t\t").concat(function(e){for(var t=(Math.round(1e3*e)/1e3).toFixed(3);t.length<6;)t=" ".concat(t);return t}(this.data._timeSpent())," ms"),this.parent.isRoot()||(e="".concat(e,"\t").concat(this._percentageOfParentSpent(),"%")));var t=this.noOfChildren()>0;for(var r in t?(e="".concat(e,"\t Children: ").concat(this.noOfChildren()),console.groupCollapsed(e)):console.log(e),this.children)this.children[r].print();t&&console.groupEnd()}},{key:"noOfChildren",value:function(){return this.children.length}},{key:"_percentageOfParentSpent",value:function(){return Math.round(this.data._timeSpent()/this.parent.data._timeSpent()*100)}}]),e}(),Dl=function(){function e(t){kl(this,e),this.name=t,this.startTime=performance.now(),this.endTime=null}return Il(e,[{key:"close",value:function(){this.endTime=performance.now()}},{key:"_timeSpent",value:function(){if(null===this.startTime||null===this.endTime)throw new Error("You have an error in your performance measurements that makes the whole tree unreliable. You probably forgot to call performanceTestEnd on ".concat(this.name));return this.endTime-this.startTime}}]),e}(),Ll=function(){function e(){kl(this,e),this.root=new Nl(new Dl("Performance Tree"),null),this.current=this.root}return Il(e,[{key:"clear",value:function(){this.root.children=[],this.current=this.root}},{key:"add",value:function(e){if(this.current){var t=new Nl(e,this.current);this.current.addChild(t),this.current=t}else{if(this.root)throw new Error("Performance tree is screwed up");this.root=new Nl(e,null),this.current=this.root}}},{key:"close",value:function(){if(this.current.isRoot())throw new Error("Tried to close performance tree root. You probably have one too many Performance.endTest() in your code.");this.current.data.close(),this.current=this.current.parent}},{key:"getCurrentData",value:function(){return this.current.data}},{key:"print",value:function(){this.root.noOfChildren()>0&&this.root.print()}}]),e}(),Ul=function(){function e(){kl(this,e),window.performance?(this.disabled=!1,this.tree=new Ll):(this.disabled=!0,this.tree=null)}return Il(e,[{key:"startTest",value:function(e){if(!this.disabled){var t,r=e||(1,t="at"===(t=(new Error).stack.split("\n")[3].trim()).split(" ")[0]?t.split(" ")[1]:t.split("@")[0]),n=new Dl(r);this.tree.add(n)}}},{key:"endTest",value:function(){this.disabled||this.tree.close()}},{key:"reset",value:function(){this.disabled||this.tree.clear()}},{key:"print",value:function(){this.disabled||this.tree.print()}}]),e}(),Fl=function(e){return Boolean(e)&&"string"==typeof e.id&&e.id.length>0},Bl=o(1187);function zl(e){return zl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zl(e)}function Vl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Wl(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Vl(Object(r),!0).forEach((function(t){var n,o,i;n=e,o=t,i=r[t],o=function(e){var t=function(e,t){if("object"!=zl(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=zl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==zl(t)?t:String(t)}(o),o in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vl(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Gl=function(e){return{id:e.elementId}},ql=function(e){return{id:e.elementId,from:e.startNodeElementId,to:e.endNodeElementId}},Hl=Bl.resultTransformers.mappedResultTransformer({map:function(e){return Object.values(e.toObject())},collect:function(e){var t={nodes:[],relationships:[]},r=new Map;return e.flat().forEach((function(e){(0,Bl.isNode)(e)?(t.nodes.push(Gl(e)),r.set(e.elementId,e)):(0,Bl.isPath)(e)?e.segments.forEach((function(e){t.nodes.push(Gl(e.start)),t.nodes.push(Gl(e.end)),t.relationships.push(ql(e.relationship)),r.set(e.start.elementId,e.start),r.set(e.end.elementId,e.end),r.set(e.relationship.elementId,e.relationship)})):(0,Bl.isRelationship)(e)&&(t.relationships.push(ql(e)),r.set(e.elementId,e))})),Wl(Wl({},t),{},{recordObjectMap:r})}});const Yl=(e=>{var t={};return o.d(t,e),t})({AnalyticsBrowser:()=>t.AnalyticsBrowser});var Xl,Zl=new Uint8Array(16);function Kl(){if(!Xl&&!(Xl="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Xl(Zl)}const $l=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var Ql=[],Jl=0;Jl<256;++Jl)Ql.push((Jl+256).toString(16).substr(1));const ef=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(Ql[e[t+0]]+Ql[e[t+1]]+Ql[e[t+2]]+Ql[e[t+3]]+"-"+Ql[e[t+4]]+Ql[e[t+5]]+"-"+Ql[e[t+6]]+Ql[e[t+7]]+"-"+Ql[e[t+8]]+Ql[e[t+9]]+"-"+Ql[e[t+10]]+Ql[e[t+11]]+Ql[e[t+12]]+Ql[e[t+13]]+Ql[e[t+14]]+Ql[e[t+15]]).toLowerCase();if(!function(e){return"string"==typeof e&&$l.test(e)}(r))throw TypeError("Stringified UUID is invalid");return r};var tf,rf,nf=0,of=0;const af=function(e,t,r){var n=t&&r||0,o=t||new Array(16),i=(e=e||{}).node||tf,a=void 0!==e.clockseq?e.clockseq:rf;if(null==i||null==a){var u=e.random||(e.rng||Kl)();null==i&&(i=tf=[1|u[0],u[1],u[2],u[3],u[4],u[5]]),null==a&&(a=rf=16383&(u[6]<<8|u[7]))}var s=void 0!==e.msecs?e.msecs:Date.now(),c=void 0!==e.nsecs?e.nsecs:of+1,l=s-nf+(c-of)/1e4;if(l<0&&void 0===e.clockseq&&(a=a+1&16383),(l<0||s>nf)&&void 0===e.nsecs&&(c=0),c>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");nf=s,of=c,rf=a;var f=(1e4*(268435455&(s+=122192928e5))+c)%4294967296;o[n++]=f>>>24&255,o[n++]=f>>>16&255,o[n++]=f>>>8&255,o[n++]=255&f;var h=s/4294967296*1e4&268435455;o[n++]=h>>>8&255,o[n++]=255&h,o[n++]=h>>>24&15|16,o[n++]=h>>>16&255,o[n++]=a>>>8|128,o[n++]=255&a;for(var d=0;d<6;++d)o[n+d]=i[d];return t||ef(o)};function uf(e){return uf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},uf(e)}function sf(){sf=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var i=t&&t.prototype instanceof b?t:b,a=Object.create(i.prototype),u=new A(n||[]);return o(a,"_invoke",{value:x(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var h="suspendedStart",d="suspendedYield",p="executing",v="completed",y={};function b(){}function m(){}function g(){}var _={};c(_,a,(function(){return this}));var w=Object.getPrototypeOf,O=w&&w(w(k([])));O&&O!==r&&n.call(O,a)&&(_=O);var S=g.prototype=b.prototype=Object.create(_);function E(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,i,a,u){var s=f(e[o],e,i);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==uf(l)&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,u)}))}u(s.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function x(t,r,n){var o=h;return function(i,a){if(o===p)throw new Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var s=T(u,n);if(s){if(s===y)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=p;var c=f(t,r,n);if("normal"===c.type){if(o=n.done?v:d,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=v,n.method="throw",n.arg=c.arg)}}}function T(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,T(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function k(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(uf(t)+" is not iterable")}return m.prototype=g,o(S,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=c(g,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,c(e,s,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},E(P.prototype),c(P.prototype,u,(function(){return this})),t.AsyncIterator=P,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new P(l(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(S),c(S,s,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=k,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:k(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}function cf(e,t,r,n,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void r(e)}u.done?t(s):Promise.resolve(s).then(n,o)}function lf(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ff(n.key),n)}}function ff(e){var t=function(e,t){if("object"!=uf(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=uf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==uf(t)?t:String(t)}var hf=window.localStorage,df="neo4j.nvl.sTid",pf=!1,vf=function(){function e(){var t,r,n;(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),t=this,n=void 0,(r=ff(r="analytics"))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n;var o=new Yl.AnalyticsBrowser;this.analytics=o}var t,r,n,o,i;return n=e,o=[{key:"init",value:function(e){this.analytics.load({writeKey:e}),this.analytics.addSourceMiddleware((function(e){var t=e.payload,r=e.next,n=t.obj.context.page;void 0!==n&&(n.url="",n.title="",n.search="",n.referrer="",n.path=""),r(t)}))}},{key:"trackEvent",value:(t=sf().mark((function e(t){var r;return sf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.ready();case 2:r="".concat(t.eventPrefix?t.eventPrefix:"NVL_core","-").concat(t.event),this.analytics.track(r,t.properties).catch((function(e){Vn.warn("TRACKING: Event tracking is failed. err: ".concat(e))}));case 4:case"end":return e.stop()}}),e,this)})),r=function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(e){cf(i,n,o,a,u,"next",e)}function u(e){cf(i,n,o,a,u,"throw",e)}a(void 0)}))},function(e){return r.apply(this,arguments)})},{key:"identify",value:function(){if(!pf){var e=this.getSegmentTrackingId();this.analytics.identify(e).catch((function(e){Vn.debug("TRACKING: Identifying user for Segment tracking failed. err: ".concat(e))})),pf=!0}}},{key:"loadSavedSegmentId",value:function(){try{var e=hf.getItem(df);return"string"==typeof e?e:null}catch(e){return Vn.debug("TRACKING: Retrieving tracking Id failed. err: ".concat(e)),null}}},{key:"getSegmentTrackingId",value:function(){var e=this.loadSavedSegmentId(),t=null!=e?e:af();return this.saveTrackingId(t),t}},{key:"saveTrackingId",value:function(e){hf.setItem(df,e)}},{key:"ready",value:function(){return this.analytics.ready().catch((function(e){Vn.debug("TRACKING: segment track instance not ready. err: ".concat(e))}))}}],o&&lf(n.prototype,o),i&&lf(n,i),Object.defineProperty(n,"prototype",{writable:!1}),e}();function yf(e){return yf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yf(e)}function bf(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return u}}(e,t)||gf(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mf(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=gf(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function gf(e,t){if(e){if("string"==typeof e)return _f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_f(e,t):void 0}}function _f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function wf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Of(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?wf(Object(r),!0).forEach((function(t){var n,o,i;n=e,o=t,i=r[t],(o=Ef(o))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wf(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Sf(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ef(n.key),n)}}function Ef(e){var t=function(e,t){if("object"!=yf(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=yf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==yf(t)?t:String(t)}function Pf(e,t,r){xf(e,t),t.set(e,r)}function xf(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Tf(e,t){return e.get(Cf(e,t))}function jf(e,t,r){return e.set(Cf(e,t),r),r}function Cf(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}var Af=new WeakMap,kf=new WeakMap,Rf=new WeakMap,If=new WeakMap,Mf=new WeakMap,Nf=new WeakMap,Df=new WeakSet,Lf=function(){function t(e){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),xf(this,r=Df),r.add(this),Pf(this,Af,void 0),Pf(this,kf,void 0),Pf(this,Rf,void 0),Pf(this,If,void 0),Pf(this,Mf,void 0),Pf(this,Nf,void 0),!0!==i.disableTelemetry&&(jf(Nf,this,new vf),Tf(Nf,this).init("4SGwdwzuDm5WkFvQtz7D6ATQlo14yjmW"),Tf(Nf,this).identify()),Cf(Df,this,Ff).call(this,i),jf(Af,this,new s(a)),jf(kf,this,new Ul),jf(Mf,this,i),Tf(Mf,this).frame=e,this.checkWebGLCompatibility(),Cf(Df,this,Uf).call(this,n,o,i)}var r,n;return r=t,n=[{key:"restart",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.getNodePositions(),n=Tf(Rf,this),o=n.zoom,i=n.layout,a=n.layoutOptions,u=n.nodes,s=n.rels;Tf(If,this).destroy(),Object.assign(Tf(Mf,this),e),Cf(Df,this,Uf).call(this,u.items,s.items,Tf(Mf,this)),this.setZoom(o),this.setLayout(i),this.setLayoutOptions(a),this.addAndUpdateElementsInGraph(u.items,s.items),t&&this.setNodePositions(r)}},{key:"addAndUpdateElementsInGraph",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];Cf(Df,this,Vf).call(this,e),Cf(Df,this,Wf).call(this,t,e);var r={added:!1,updated:!1};Tf(Rf,this).nodes.update(e,Of({},r)),Tf(Rf,this).rels.update(t,Of({},r)),Tf(Rf,this).nodes.add(e,Of({},r)),Tf(Rf,this).rels.add(t,Of({},r)),Tf(Rf,this).setGraphUpdated(),Tf(If,this).updateHtmlOverlay()}},{key:"getSelectedNodes",value:function(){var e=this;return Tf(Rf,this).nodes.items.filter((function(e){return e.selected})).map((function(t){return Of(Of({},t),Tf(Rf,e).nodes.idToPosition[t.id])}))}},{key:"getSelectedRelationships",value:function(){return Tf(Rf,this).rels.items.filter((function(e){return e.selected}))}},{key:"updateElementsInGraph",value:function(e,t){var r={added:!1,updated:!1};Cf(Df,this,Vf).call(this,e),Cf(Df,this,Wf).call(this,t,e),Tf(Rf,this).nodes.update(e,Of({},r)),Tf(Rf,this).rels.update(t,Of({},r)),Tf(If,this).updateHtmlOverlay()}},{key:"addElementsToGraph",value:function(e,t){Cf(Df,this,Vf).call(this,e),Cf(Df,this,Wf).call(this,t,e);var r={added:!1,updated:!1};Tf(Rf,this).nodes.add(e,Of({},r)),Tf(Rf,this).rels.add(t,Of({},r)),Tf(If,this).updateHtmlOverlay()}},{key:"removeNodesWithIds",value:function(t){if(Array.isArray(t)&&!(0,e.isEmpty)(t)){var r,n={},o=mf(t);try{for(o.s();!(r=o.n()).done;)n[r.value]=!0}catch(e){o.e(e)}finally{o.f()}var i,a=[],u=mf(Tf(Rf,this).rels.items);try{for(u.s();!(i=u.n()).done;){var s=i.value;!0!==n[s.from]&&!0!==n[s.to]||a.push(s.id)}}catch(e){u.e(e)}finally{u.f()}a.length>0&&Cf(Df,this,zf).call(this,a),Cf(Df,this,Bf).call(this,t),Tf(Rf,this).setGraphUpdated(),Tf(If,this).updateHtmlOverlay()}}},{key:"removeRelationshipsWithIds",value:function(t){Array.isArray(t)&&!(0,e.isEmpty)(t)&&(Cf(Df,this,zf).call(this,t),Tf(Rf,this).setGraphUpdated(),Tf(If,this).updateHtmlOverlay())}},{key:"getNodes",value:function(){return Tf(If,this).dumpNodes()}},{key:"getRelationships",value:function(){return Tf(If,this).dumpRelationships()}},{key:"getNodeById",value:function(e){return Tf(Rf,this).nodes.idToItem[e]}},{key:"getRelationshipById",value:function(e){return Tf(Rf,this).rels.idToItem[e]}},{key:"getPositionById",value:function(e){return Tf(Rf,this).nodes.idToPosition[e]}},{key:"getCurrentOptions",value:function(){return Tf(Mf,this)}},{key:"destroy",value:function(){Tf(If,this).destroy()}},{key:"deselectAll",value:function(){this.updateElementsInGraph(Tf(Rf,this).nodes.items.map((function(e){return Of(Of({},e),{},{selected:!1})})),Tf(Rf,this).rels.items.map((function(e){return Of(Of({},e),{},{selected:!1})})))}},{key:"fit",value:function(e,t){Tf(If,this).fit(e,t)}},{key:"resetZoom",value:function(){Tf(If,this).resetZoom()}},{key:"setUseWebGLRenderer",value:function(e){Tf(If,this).setRenderer(e?da:pa)}},{key:"setRenderer",value:function(e){Tf(If,this).setRenderer(e)}},{key:"setDisableWebGL",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Tf(Mf,this).disableWebGL!==e&&(Tf(Mf,this).disableWebGL=e,this.restart())}},{key:"pinNode",value:function(e){Tf(Rf,this).nodes.update([{id:e,pinned:!0}],{})}},{key:"unPinNode",value:function(e){Tf(Rf,this).nodes.update(e.map((function(e){return{id:e,pinned:!1}})),{})}},{key:"setLayout",value:function(e){Tf(Rf,this).setLayout(e)}},{key:"setLayoutOptions",value:function(e){Tf(Rf,this).setLayoutOptions(e)}},{key:"getNodesOnScreen",value:function(){return Tf(If,this).getNodesOnScreen()}},{key:"getNodePositions",value:function(){return Tf(If,this).getNodePositions()}},{key:"setNodePositions",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];Tf(If,this).setNodePositions(e,t)}},{key:"isLayoutMoving",value:function(){return Tf(If,this).isLayoutMoving()}},{key:"saveToFile",value:function(e){Tf(If,this).saveToFile(e)}},{key:"saveFullGraphToLargeFile",value:function(e){Tf(If,this).saveFullGraphToLargeFile(e)}},{key:"setZoom",value:function(e){Tf(If,this).setZoomLevel(e)}},{key:"setPan",value:function(e,t){Tf(If,this).setPanCoordinates(e,t)}},{key:"setZoomAndPan",value:function(e,t,r){Tf(If,this).setZoomAndPan(e,t,r)}},{key:"getScale",value:function(){return Tf(If,this).getScale()}},{key:"getPan",value:function(){return Tf(If,this).getPan()}},{key:"getHits",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["node","relationship"],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{hitNodeMarginWidth:0},n=Tf(Rf,this),o=n.zoom,i=n.panX,a=n.panY,u=n.webGLVisible,s=Oc(e,Tf(Mf,this).frame,o,i,a),c=s.x,l=s.y,f=u?function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:["node","relationship"],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},i=[],a=[],u=r.nodes,s=r.rels;return n.includes("node")&&i.push.apply(i,$c(function(e,t){var r,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i=[],a=Qc(arguments.length>2&&void 0!==arguments[2]?arguments[2]:[]);try{var u=function(){var a,u=r.value,s=n[u.id];if(void 0===(null==s?void 0:s.x)||void 0===s.y)return 1;var c=(null!==(a=u.size)&&void 0!==a?a:mn)*wn(),l={x:s.x-e,y:s.y-t},f=Math.pow(c,2),h=Math.pow(c+o,2),d=Math.pow(l.x,2)+Math.pow(l.y,2),p=Math.sqrt(d);if(d<h){var v=i.findIndex((function(e){return e.distance>p}));i.splice(-1!==v?v:i.length,0,{data:u,targetCoordinates:{x:s.x,y:s.y},pointerCoordinates:{x:e,y:t},distanceVector:l,distance:p,insideNode:d<f})}};for(a.s();!(r=a.n()).done;)u()}catch(e){a.e(e)}finally{a.f()}return i}(e,t,u.items,u.idToPosition,o.hitNodeMarginWidth))),n.includes("relationship")&&a.push.apply(a,$c(function(e,t){var r,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=[],i={},a=Qc(arguments.length>2&&void 0!==arguments[2]?arguments[2]:[]);try{var u=function(){var a=r.value,u=a.from,s=a.to;if(void 0===i["".concat(u,".").concat(s)]){var c=n[u],l=n[s];if(void 0===(null==c?void 0:c.x)||void 0===c.y)return 0;if(void 0===(null==l?void 0:l.x)||void 0===l.y)return 0;var f=Ru({x:c.x,y:c.y},{x:l.x,y:l.y},{x:e,y:t});if(f<=tl){var h=o.findIndex((function(e){return e.distance>f}));o.splice(-1!==h?h:o.length,0,{data:a,fromTargetCoordinates:{x:c.x,y:c.y},toTargetCoordinates:{x:l.x,y:l.y},pointerCoordinates:{x:e,y:t},distance:f})}i["".concat(u,".").concat(s)]=1,i["".concat(s,".").concat(u)]=1}};for(a.s();!(r=a.n()).done;)u()}catch(e){a.e(e)}finally{a.f()}return o}(e,t,s.items,u.idToPosition))),{nodes:i,relationships:a}}(c,l,Tf(Rf,this),t,r):function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:["node","relationship"],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},i=[],a=[];return n.includes("node")&&i.push.apply(i,$c(r.getCanvasNodesAt({x:e,y:t},o.hitNodeMarginWidth))),n.includes("relationship")&&a.push.apply(a,$c(r.getCanvasRelsAt({x:e,y:t}))),{nodes:i,relationships:a}}(c,l,Tf(If,this),t,r);return Of(Of({},e),{},{nvlTargets:f})}},{key:"getContainer",value:function(){return Tf(Mf,this).frame}},{key:"checkWebGLCompatibility",value:function(){var e=Tf(Mf,this).disableWebGL;if(void 0===e||!e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.createElement("canvas");try{return Boolean(void 0!==window.WebGLRenderingContext&&(null!==e.getContext("webgl")||null!==e.getContext("experimental-webgl")))}catch(e){return!1}}();if(!t){if(void 0!==e)throw new Lo("Could not initialize WebGL");Tf(Mf,this).renderer=pa,console.warn("GPU acceleration is not available on your browser. Falling back to CPU layout and rendering. You can disable this warning by setting the disableWebGL option to true.")}void 0===e&&(Tf(Mf,this).disableWebGL=!t)}}}],n&&Sf(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),t}();function Uf(){var t,r=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};jf(Rf,this,function(t){var r=t.minZoom,n=t.maxZoom,o=t.allowDynamicMinZoom,i=void 0===o||o,a=t.layout,u=t.layoutOptions,s=t.nodeDefaultBorderColor,c=t.selectedBorderColor,l=t.panX,f=void 0===l?0:l,h=t.panY,d=void 0===h?0:h,p=t.initialZoom,v=t.renderer,y=void 0===v?!0===t.useWebGL?da:pa:v,b=t.disableWebGL,m=void 0!==b&&b,g=t.disableTelemetry,_=void 0!==g&&g;Z(!0),gr.isolateGlobalState();var w=void 0!==r?r:.075,O=void 0!==n?n:10,S=ea({},oa.default);void 0!==s&&("string"==typeof s&&null!==ki().get.rgb(s)?S.rings=[{color:s,widthFactor:.05}]:Vn.warn("Invalid color string for nodeDefaultBorderColor:",s));var E=ea({},oa.selected),P=ea({},ia.selected);void 0!==c&&("string"==typeof s&&null!==ki().get.rgb(c)?(E.rings[1].color=c,P.rings[1].color=c):Vn.warn("Invalid color string for selectedBorderColor:",c));var x=ze({zoom:p||aa,minimapZoom:aa,defaultZoomLevel:aa,panX:f,panY:d,minimapPanX:0,minimapPanY:0,fitNodeIds:[],resetZoom:!1,zoomOptions:va,forceWebGL:!1,renderer:y,disableWebGL:m,disableTelemetry:_,fitMovement:0,layout:a,layoutOptions:u,maxDistance:0,maxNodeRadius:50,nodeBorderStyles:{default:S,selected:E},relationshipBorderStyles:{default:ia.default,selected:P},get minZoom(){return w},get maxZoom(){return O},get minMinimapZoom(){return 0},get maxMinimapZoom(){return.2},get webGLVisible(){var e=this.fitMovement>50;return this.renderer===da||e},nodes:$i(),rels:$i(),graphUpdates:0,waypoints:{data:ze.shallow({}),counter:0},setGraphUpdated:oe((function(){this.graphUpdates+=1})),setRenderer:oe((function(e){oe((function(){this.graphUpdates+=1})),this.renderer=e})),setWaypoints:oe((function(e){this.waypoints.data=e,this.waypoints.counter+=1})),setZoomPan:oe((function(e,t,r,n){if(i){var o=Object.values(this.nodes.idToPosition),a=Fi(o,w,O,n,e,this.zoom);a!==this.zoom&&(this.zoom=a,e===a&&(this.panX=t,this.panY=r))}else{var u=Ui(e,this.zoom,w,O);u!==this.zoom&&(this.zoom=u,this.panX=t,this.panY=r)}this.fitNodeIds=[],this.resetZoom=!1,this.forceWebGL=!1})),setZoom:oe((function(e,t){if(i){var r=Object.values(this.nodes.idToPosition);this.zoom=Fi(r,w,O,t,e,this.zoom)}else this.zoom=Ui(e,this.zoom,w,O);this.fitNodeIds=[],this.fitMovement=0,this.resetZoom=!1,this.forceWebGL=!1})),setPan:oe((function(e,t){this.panX=e,this.panY=t,this.fitNodeIds=[],this.resetZoom=!1,this.forceWebGL=!1})),setLayout:oe((function(e){this.layout=e})),setLayoutOptions:oe((function(e){this.layoutOptions=e})),fitNodes:oe((function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.fitNodeIds=(0,e.intersection)(t,(0,e.map)(this.nodes.items,"id")),this.zoomOptions=ea(ea({},va),r)})),setZoomReset:oe((function(){this.resetZoom=!0})),clearFit:oe((function(){this.fitNodeIds=[],this.forceWebGL=!1,this.fitMovement=0,this.zoomOptions=va})),clearReset:oe((function(){this.resetZoom=!1,this.fitMovement=0})),updateZoomToFit:oe((function(e,t,r,n){var o;if(this.fitMovement=Math.abs(e-this.zoom)+Math.abs(t-this.panX)+Math.abs(r-this.panY),i){var a=Object.values(this.nodes.idToPosition);o=Fi(a,w,O,n,e,this.zoom)}else o=Ui(e,this.zoom,w,O);this.zoom=o,this.panX=t,this.panY=r})),updateMinimapZoomToFit:oe((function(e,t,r){this.minimapZoom=e,this.minimapPanX=t,this.minimapPanY=r})),autorun:ve,reaction:ye});return x}(i)),i.minimapContainer instanceof HTMLElement||delete i.minimapContainer,jf(If,this,new Cl(Tf(Rf,this),i)),this.addAndUpdateElementsInGraph(n,o),Tf(If,this).on("restart",this.restart.bind(this));var a,u,s=mf((a=Tf(Af,this).callbacks,Object.entries(a)));try{for(s.s();!(u=s.n()).done;){var c=bf(u.value,2),l=c[0];void 0!==c[1]&&Tf(If,this).on(l,Tf(Af,this)[l].bind(Tf(Af,this)))}}catch(e){s.e(e)}finally{s.f()}var f=null===(t=Tf(Mf,this).frame)||void 0===t?void 0:t.getAttribute("id");!0!==Tf(Mf,this).disableTelemetry&&setTimeout((function(){Tf(If,r).isDestroyed()||Tf(Nf,r).trackEvent({eventPrefix:On.includes(f)?f:null,event:"instantiated",properties:{}})}),200)}function Ff(e){var t,r=e.logging;void 0!==(null==r?void 0:r.level)&&(t=r.level,Vn.setLevel(t),function(e,t){var r=e.methodFactory;e.methodFactory=function(e,n,o){var i=r(e,n,o);return function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];"function"==typeof t.logger?t.logger.apply(t,[e].concat(n)):i.apply(void 0,n)}},e.setLevel(e.getLevel())}(Vn,r))}function Bf(e){var t=Array.isArray(e)?e:[e],r=Tf(Rf,this),n=r.nodes,o=r.fitNodeIds;n.remove(t,{removed:!1}),o.length&&void 0!==t.find((function(e){return o.includes(e)}))&&Tf(Rf,this).fitNodes(o.filter((function(e){return!t.includes(e)})))}function zf(e){var t=Array.isArray(e)?e:[e];Tf(Rf,this).rels.remove(t,{removed:!1})}function Vf(e){var t=e.find((function(e){return!function(e){return Boolean(e)&&"string"==typeof e.id&&e.id.length>0}(e)}));if(t){var r="";throw/^\d+$/.test(t.id)||(r=" Node ids need to be numeric strings. Strings that contain anything other than numbers are not yet supported."),new TypeError("Invalid node provided: ".concat(JSON.stringify(t),".").concat(r))}}function Wf(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r="",n=null,o=Tf(Rf,this),i=o.nodes,a=o.rels,u={},s=0;s<t.length;s++){var c=t[s];u[c.id]=c}for(var l=Of(Of({},i.idToItem),u),f=a.idToItem,h=0;h<e.length;h++){var d=e[h];if(!Fl(d)){n=d,/^\d+$/.test(d.id)&&(r=" Node ids need to be numeric strings. Strings that contain anything other than numbers are not yet supported.");break}if(void 0===f[d.id]){var p=l[d.from],v=l[d.to];if(void 0===p){r=' Node with id "'.concat(d.from,'" does not exist.'),n=d;break}if(void 0===v){r=' Node with id "'.concat(d.to,'" does not exist.'),n=d;break}}}if(null!==n)throw new TypeError("Invalid relationship provided: ".concat(JSON.stringify(n),".").concat(r))}var Gf={textColorForBackground:uc};const qf=Lf})();var a=i.RL,u=i.wK,s=i.x_,c=i.lv,l=i.YQ,f=i.BP,h=i.GZ,d=i.Vw,p=i.Ay,v=i._G,y=i.h4;export{a as CompatibilityError,u as ForceDirectedLayoutType,s as FreeLayoutType,c as GridLayoutType,l as HierarchicalLayoutType,f as NVL,h as colorMapperFunctions,d as d3ForceLayoutType,p as default,v as drawCircleBand,y as nvlResultTransformer};