From 3d69d420c3f000582ea93987020e4bf252c4173d Mon Sep 17 00:00:00 2001 From: Daryl Fung Date: Thu, 16 Nov 2023 12:54:47 -0600 Subject: [PATCH 1/2] fix infinity id for edges --- dist/neovis-without-dependencies.js | 4 ++-- dist/neovis.js | 4 ++-- src/neovis.ts | 22 ++++++++++++++++------ 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/dist/neovis-without-dependencies.js b/dist/neovis-without-dependencies.js index 1c62e98..27f2ab6 100644 --- a/dist/neovis-without-dependencies.js +++ b/dist/neovis-without-dependencies.js @@ -1,2 +1,2 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@babel/runtime-corejs3/helpers/defineProperty"),require("@babel/runtime-corejs3/helpers/classPrivateFieldSet"),require("@babel/runtime-corejs3/helpers/classPrivateFieldGet"),require("@babel/runtime-corejs3/core-js-stable/object/keys"),require("@babel/runtime-corejs3/core-js-stable/array/is-array"),require("@babel/runtime-corejs3/core-js-stable/instance/map"),require("@babel/runtime-corejs3/core-js-stable/instance/keys"),require("@babel/runtime-corejs3/core-js-stable/instance/reduce"),require("@babel/runtime-corejs3/core-js-stable/object/entries"),require("@babel/runtime-corejs3/core-js-stable/instance/concat"),require("@babel/runtime-corejs3/core-js-stable/weak-map"),require("@babel/runtime-corejs3/core-js-stable/weak-set"),require("@babel/runtime-corejs3/core-js-stable/instance/for-each"),require("@babel/runtime-corejs3/core-js-stable/promise"),require("@babel/runtime-corejs3/core-js-stable/set-timeout"),require("neo4j-driver"),require("neo4j-driver-core"),require("vis-network/standalone"),require("deepmerge"),require("@babel/runtime-corejs3/core-js-stable/symbol")):"function"==typeof define&&define.amd?define(["@babel/runtime-corejs3/helpers/defineProperty","@babel/runtime-corejs3/helpers/classPrivateFieldSet","@babel/runtime-corejs3/helpers/classPrivateFieldGet","@babel/runtime-corejs3/core-js-stable/object/keys","@babel/runtime-corejs3/core-js-stable/array/is-array","@babel/runtime-corejs3/core-js-stable/instance/map","@babel/runtime-corejs3/core-js-stable/instance/keys","@babel/runtime-corejs3/core-js-stable/instance/reduce","@babel/runtime-corejs3/core-js-stable/object/entries","@babel/runtime-corejs3/core-js-stable/instance/concat","@babel/runtime-corejs3/core-js-stable/weak-map","@babel/runtime-corejs3/core-js-stable/weak-set","@babel/runtime-corejs3/core-js-stable/instance/for-each","@babel/runtime-corejs3/core-js-stable/promise","@babel/runtime-corejs3/core-js-stable/set-timeout","neo4j-driver","neo4j-driver-core","vis-network/standalone","deepmerge","@babel/runtime-corejs3/core-js-stable/symbol"],t):"object"==typeof exports?exports.NeoVis=t(require("@babel/runtime-corejs3/helpers/defineProperty"),require("@babel/runtime-corejs3/helpers/classPrivateFieldSet"),require("@babel/runtime-corejs3/helpers/classPrivateFieldGet"),require("@babel/runtime-corejs3/core-js-stable/object/keys"),require("@babel/runtime-corejs3/core-js-stable/array/is-array"),require("@babel/runtime-corejs3/core-js-stable/instance/map"),require("@babel/runtime-corejs3/core-js-stable/instance/keys"),require("@babel/runtime-corejs3/core-js-stable/instance/reduce"),require("@babel/runtime-corejs3/core-js-stable/object/entries"),require("@babel/runtime-corejs3/core-js-stable/instance/concat"),require("@babel/runtime-corejs3/core-js-stable/weak-map"),require("@babel/runtime-corejs3/core-js-stable/weak-set"),require("@babel/runtime-corejs3/core-js-stable/instance/for-each"),require("@babel/runtime-corejs3/core-js-stable/promise"),require("@babel/runtime-corejs3/core-js-stable/set-timeout"),require("neo4j-driver"),require("neo4j-driver-core"),require("vis-network/standalone"),require("deepmerge"),require("@babel/runtime-corejs3/core-js-stable/symbol")):e.NeoVis=t(e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0])}(self,((e,t,s,i,r,o,n,a,l,c,h,d,u,p,b,f,y,j,v,m)=>(()=>{"use strict";var w={852:e=>{e.exports=r},848:e=>{e.exports=c},349:e=>{e.exports=u},270:e=>{e.exports=n},820:e=>{e.exports=o},83:e=>{e.exports=a},209:e=>{e.exports=l},995:e=>{e.exports=i},723:e=>{e.exports=p},519:e=>{e.exports=b},581:e=>{e.exports=m},317:e=>{e.exports=h},483:e=>{e.exports=d},779:e=>{e.exports=s},642:e=>{e.exports=t},783:t=>{t.exports=e},613:e=>{e.exports=v},949:e=>{e.exports=f},55:e=>{e.exports=y},365:e=>{e.exports=j}},g={};function E(e){var t=g[e];if(void 0!==t)return t.exports;var s=g[e]={exports:{}};return w[e](s,s.exports,E),s.exports}E.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return E.d(t,{a:t}),t},E.d=(e,t)=>{for(var s in t)E.o(t,s)&&!E.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},E.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),E.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var C={};return(()=>{E.r(C),E.d(C,{EventController:()=>R,NEOVIS_ADVANCED_CONFIG:()=>G,NEOVIS_DEFAULT_CONFIG:()=>z,NeoVis:()=>xe,NeoVisEvents:()=>L,default:()=>We,migrateFromOldConfig:()=>Ge,objectToTitleHtml:()=>ie,objectToTitleString:()=>re});var e=E(783),t=E.n(e),s=E(642),i=E.n(s),r=E(779),o=E.n(r),n=E(995),a=E.n(n),l=E(852),c=E.n(l),h=E(820),d=E.n(h),u=E(270),p=E.n(u),b=E(83),f=E.n(b),y=E(209),j=E.n(y),v=E(848),m=E.n(v),w=E(317),g=E.n(w),k=E(483),N=E.n(k),q=E(349),_=E.n(q),x=E(723),I=E.n(x),T=E(519),A=E.n(T),S=E(949),O=E.n(S),F=E(55),D=E(365);const P={neo4j:{initialQuery:"MATCH (n) WHERE exists(n.pagerank)\n WITH (n), RAND() AS random\n ORDER BY random LIMIT 3000\n OPTIONAL MATCH (n)-[r]-(m)\n //WITH n,r,m WHERE exists(n.pagerank) AND exists(m.pagerank) AND exists(m.community)\n RETURN n, r, m;",neo4jUri:"bolt://localhost:7687",neo4jUser:"neo4j",neo4jPassword:"neo4j",driverConfig:{encrypted:"ENCRYPTION_OFF",trust:"TRUST_ALL_CERTIFICATES",maxConnectionPoolSize:100,connectionAcquisitionTimeout:1e4,disableLosslessIntegers:!0},groupAsLabel:!0},visJs:{nodes:{font:{size:26,strokeWidth:7},scaling:{}},edges:{arrows:{to:{enabled:!1}},length:200},layout:{improvedLayout:!1,hierarchical:{enabled:!1,sortMethod:"hubsize"}},physics:{adaptiveTimestep:!0,stabilization:{iterations:200,fit:!0}}}};let L=function(e){return e.CompletionEvent="completed",e.ClickNodeEvent="clickNode",e.ClickEdgeEvent="clickEdge",e.ErrorEvent="error",e}({});class R{constructor(){t()(this,"_handlers",void 0),this._handlers={[L.CompletionEvent]:[],[L.ErrorEvent]:[],[L.ClickNodeEvent]:[],[L.ClickEdgeEvent]:[]}}register(e,t){if(void 0===this._handlers[e])throw new Error("Unknown event: "+e);this._handlers[e].push(t)}generateEvent(e,t){if(void 0===this._handlers[e])throw new Error("Unknown event: "+e);for(const s of this._handlers[e])s(t)}}var U=E(613),V=E.n(U),M=E(581),H=E.n(M);const z=H()(),G=H()();function W(e,t){Z(e,t),t.add(e)}function $(e,t,s){Z(e,t),t.set(e,s)}function Z(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function B(e,t,s){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return s}function J(e){let{low:t,high:s}=e;return new(O().types.Integer)(t,s)}function Q(e){return 0===e.getHighBits()?e.toInt():e.toString()}const Y={2:[{keys:["low","high"],type:O().types.Integer}],3:[{keys:["year","month","day"],type:O().types.Date},{keys:["srid","x","y"],type:O().types.Point}],4:[{keys:["months","days","seconds","nanoseconds"],type:O().types.Duration},{keys:["hour","minute","second","nanosecond"],type:O().types.LocalTime},{keys:["srid","x","y","z"],type:O().types.Point}],5:[{keys:["hour","minute","second","nanosecond","timeZoneOffsetSeconds"],type:O().types.Time}],7:[{keys:["year","month","day","hour","minute","second","nanosecond"],type:O().types.LocalDateTime}],8:[{keys:["year","month","day","hour","minute","second","nanosecond","timeZoneOffsetSeconds"],type:O().types.DateTime}],9:[{keys:["year","month","day","hour","minute","second","nanosecond","timeZoneOffsetSeconds","timeZoneId"],type:O().types.DateTime}]};function K(e){if(c()(e))return d()(e).call(e,K);if("object"!=typeof e||!(a()(e).length in Y))return e;for(const s of Y[a()(e).length]){let i=!0;const r=[];for(const o of p()(s)){if(!(o in e)){i=!1;break}r.push("object"==typeof(t=e[o])&&"high"in t&&"low"in t&&2==a()(t).length?new(O().types.Integer)(e[o].low,e[o].high):e[o])}if(i)return new s.type(...r)}var t}function X(e){var t;return f()(t=j()(e)).call(t,((e,t)=>{let[s,i]=t;return e[s]=K(i),e}),{})}function ee(e){return"labels"in e?new(O().types.Node)(J(e.identity),e.labels,X(e.properties)):"type"in e?new(O().types.Relationship)(J(e.identity),J(e.start),J(e.end),e.type,X(e.properties)):"segments"in e?new(O().types.Path)(new(O().types.Node)(J(e.start.identity),e.start.labels,X(e.start.properties)),new(O().types.Node)(J(e.end.identity),e.end.labels,X(e.end.properties)),d()(t=e.segments).call(t,(e=>new(O().types.PathSegment)(new(O().types.Node)(J(e.start.identity),e.start.labels,X(e.start.properties)),new(O().types.Relationship)(J(e.relationship.identity),J(e.relationship.start),J(e.relationship.end),e.relationship.type,X(e.relationship.properties)),new(O().types.Node)(J(e.end.identity),e.end.labels,X(e.end.properties)))))):void 0;var t}function te(e,t){if(c()(t)&&t.length>1){let s=`${e}:
"}return`${e}: ${t}
`}function se(e,t){if("object"==typeof t?.properties)return(0,F.isInt)(t.properties[e])?Q(t.properties[e]):t.properties[e];throw new Error("Neo4j object is not properly constructed")}function ie(e,t){let s="";t||(t=a()(e.properties));for(const i of t){const t=se(i,e);t&&(s+=te(i,t))}const i=document.createElement("div");return i.innerHTML=s,i}function re(e,t){let s="";t||(t=a()(e.properties));for(const i of t){const t=se(i,e);t&&(s+=`${i}: ${t}\n`)}return s}var oe=new(g()),ne=new(g()),ae=new(g()),le=new(g()),ce=new(g()),he=new(g()),de=new(g()),ue=new(g()),pe=new(N()),be=new(N()),fe=new(N()),ye=new(N()),je=new(N()),ve=new(N()),me=new(N()),we=new(N()),ge=new(N()),Ee=new(N()),Ce=new(N()),ke=new(N()),Ne=new(N()),qe=new(N()),_e=new(N());class xe{get nodes(){return o()(this,oe).nodes}get edges(){return o()(this,oe).edges}get _config(){return o()(this,le)}get network(){return o()(this,ne)}constructor(e){W(this,_e),W(this,qe),W(this,Ne),W(this,ke),W(this,Ce),W(this,Ee),W(this,ge),W(this,we),W(this,me),W(this,ve),W(this,je),W(this,ye),W(this,fe),W(this,be),W(this,pe),$(this,oe,{writable:!0,value:{nodes:new D.DataSet,edges:new D.DataSet}}),$(this,ne,{writable:!0,value:null}),$(this,ae,{writable:!0,value:new R}),$(this,le,{writable:!0,value:void 0}),$(this,ce,{writable:!0,value:void 0}),$(this,he,{writable:!0,value:void 0}),$(this,de,{writable:!0,value:void 0}),$(this,ue,{writable:!0,value:void 0}),B(this,be,Te).call(this,e),B(this,pe,Ie).call(this,e),B(this,pe,Ie).call(this,P)}render(e,t){o()(this,le).dataFunction||"function"==typeof e?B(this,ke,Ve).call(this,"function"==typeof e?e:o()(this,le).dataFunction,t):B(this,Ne,Me).call(this,e,t)}clearNetwork(){o()(this,oe).nodes.clear(),o()(this,oe).edges.clear()}registerOnEvent(e,t){o()(this,ae).register(e,t)}reinit(e,t){B(this,be,Te).call(this,e),this.render(void 0,t)}reload(e){this.clearNetwork(),this.render(void 0,e)}stabilize(){o()(this,ne).stopSimulation(),B(this,pe,Ie).call(this,"Calling stopSimulation")}renderWithCypher(e,t){this.clearNetwork(),i()(this,de,e),this.render(void 0,t)}renderWithFunction(e,t){this.clearNetwork(),this.render(e,t)}updateWithCypher(e,t){this.render(e,t)}updateWithFunction(e,t){this.render(e,t)}}function Ie(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"log";("log"!==t||o()(this,le).consoleDebug)&&console[t](e)}function Te(e){let t,s;if(e.nonFlat&&e.defaultLabelConfig){if(t=e.defaultLabelConfig,t[G])throw new Error("non flat config can't use NEOVIS_ADVANCED_CONFIG, read the doc to see how the config should look");if(s=e.defaultRelationshipsConfig,s[G])throw new Error("non flat config can't use NEOVIS_ADVANCED_CONFIG, read the doc to see how the config should look")}else t=e.labels?.[z],s=e.relationships?.[z];if(t)for(const s of a()(e.labels))e=e.nonFlat?{...e,labels:{...e.labels,[s]:V()(t,e.labels?.[s])}}:{...e,labels:{...e.labels,[s]:{...V()(t,e.labels?.[s]),[G]:V()(t[G]??{},(e.labels?.[s])[G]??{})}}};if(s)for(const t of a()(e.relationships))e=e.nonFlat?{...e,relationships:{...e.relationships,[t]:V()(s,e.relationships?.[t])}}:{...e,relationships:{...e.relationships,[t]:{...V()(s,e.relationships?.[t]),[G]:V()(s[G]??{},(e.relationships?.[t])[G]??{})}}};i()(this,le,e),e.dataFunction||(i()(this,ce,e.neo4j instanceof O().driver?e.neo4j:O().driver(e.neo4j?.serverUrl??P.neo4j.neo4jUri,O().auth.basic(e.neo4j?.serverUser??P.neo4j.neo4jUser,e.neo4j?.serverPassword??P.neo4j.neo4jPassword),V()(P.neo4j.driverConfig,e.neo4j?.driverConfig??{}))),i()(this,he,e.serverDatabase),i()(this,de,e.initialCypher??P.neo4j.initialQuery)),i()(this,ue,document.getElementById(e.containerId)),o()(this,le).groupAsLabel=e.groupAsLabel??P.neo4j.groupAsLabel}async function Ae(e,t){const s=o()(this,ce).session(o()(this,he)&&{database:o()(this,he)}),i=[];try{const r=await s.readTransaction((s=>s.run(e,{id:t})));for(const e of r.records)_()(e).call(e,(e=>{i.push(e)}))}finally{await s.close()}if(0!==i.length)return 1===i.length?i.pop():i}function Se(e,t){if("function"==typeof e)return e(t);throw new Error("Function type property field must be a function")}function Oe(e,t){if(e&&"object"==typeof e)for(const s of a()(e)){const i=e[s];i&&"object"==typeof i?(t[s]||(t[s]={}),B(this,je,Oe).call(this,i,t[s])):t[s]=i}}function Fe(e,t,s){if(e&&"object"==typeof e)for(const i of a()(e)){const r=e[i];if("object"==typeof r)t[i]||(t[i]={}),B(this,ve,Fe).call(this,r,t[i],s);else{const r=e[i];t[i]=se(r,s)}}}function*De(e,t,s){if(e&&"object"==typeof e)for(const i of a()(e)){const r=e[i];if(r&&"object"==typeof r)t[i]||(t[i]={}),yield*B(this,me,De).call(this,r,t[i],s);else{const e=B(this,fe,Ae).call(this,r,s);yield I().resolve(e).then((e=>{t[i]=e}))}}}function*Pe(e,t,s){if(e&&"object"==typeof e)for(const i of a()(e)){const r=e[i];if(r&&"object"==typeof r)t[i]||(t[i]={}),yield*B(this,we,Pe).call(this,r,t[i],s);else{const e=B(this,ye,Se).call(this,r,s);yield I().resolve(e).then((e=>{t[i]=e}))}}}async function Le(e,t,s,i){if(!e)return;let r,n,a,l;if(o()(this,le).nonFlat){if(void 0!==e[G])throw new Error("Advanced config and non flat config should not be together");r=e.static,n=e.cypher,a=e.property,l=e.function}else{const t=e[G];if(a=e,void 0!==t&&"object"!=typeof t)throw new Error("Advanced config should be an object. See documentation for details.");n=t?.cypher,r=t?.static,l=t?.function}B(this,ve,Fe).call(this,a,t,s),B(this,je,Oe).call(this,r,t),await I().all(B(this,me,De).call(this,n,t,i)),await I().all(B(this,we,Pe).call(this,l,t,s))}async function Re(e){const t={},s=e.labels[0],i=o()(this,le)?.labels?.[s]??o()(this,le)?.defaultLabelConfig??o()(this,le)?.labels?.[z];return t.id=(0,F.isInt)(e.identity)?Q(e.identity):e.identity,t.raw=e,o()(this,le).groupAsLabel&&(t.group=s),await B(this,ge,Le).call(this,i,t,e,e.identity),t}async function Ue(e){const t=o()(this,le)?.relationships?.[e.type]??o()(this,le).defaultRelationshipsConfig??o()(this,le)?.relationships?.[z],s={};return s.id=(0,F.isInt)(e.identity)?Q(e.identity):e.identity,s.from=(0,F.isInt)(e.start)?Q(e.start):e.start,s.to=(0,F.isInt)(e.end)?Q(e.end):e.end,s.raw=e,await B(this,ge,Le).call(this,t,s,e,e.identity),s}async function Ve(e,t){let s=0;try{const i=[];for await(const r of await e(t))i.push(B(this,qe,He).call(this,r)),s++;await I().all(i)}catch(e){return void o()(this,ae).generateEvent(L.ErrorEvent,{error:e})}B(this,_e,ze).call(this),o()(this,ae).generateEvent(L.CompletionEvent,{recordCount:s})}function Me(e,t){let s=0;const i=e||o()(this,de),r=o()(this,ce).session(o()(this,he)?{database:o()(this,he)}:void 0),n=[];r.run(i,t).subscribe({onNext:e=>{s++,n.push(B(this,qe,He).call(this,e))},onCompleted:async()=>{await I().all(n),await r.close(),B(this,_e,ze).call(this),o()(this,ae).generateEvent(L.CompletionEvent,{recordCount:s})},onError:e=>{B(this,pe,Ie).call(this,e,"error"),o()(this,ae).generateEvent(L.ErrorEvent,{error:e})}})}async function He(e){if(!(e instanceof O().types.Record)){const t=e._fields;e=new(O().types.Record)(p()(e),d()(t).call(t,ee),e._fieldLookup)}B(this,pe,Ie).call(this,"CLASS NAME"),B(this,pe,Ie).call(this,e?.constructor.name),B(this,pe,Ie).call(this,e);const t=d()(e).call(e,(async e=>{if(B(this,pe,Ie).call(this,"Constructor:"),B(this,pe,Ie).call(this,e?.constructor.name),(0,F.isNode)(e)){const t=await B(this,Ee,Re).call(this,e);try{o()(this,oe).nodes.update(t)}catch(e){B(this,pe,Ie).call(this,e,"error")}}else if((0,F.isRelationship)(e)){const t=await B(this,Ce,Ue).call(this,e);o()(this,oe).edges.update(t)}else if((0,F.isPath)(e)){B(this,pe,Ie).call(this,"PATH"),B(this,pe,Ie).call(this,e);const t=await B(this,Ee,Re).call(this,e.start),s=await B(this,Ee,Re).call(this,e.end);o()(this,oe).nodes.update(t),o()(this,oe).nodes.update(s);for(const t of e.segments)o()(this,oe).nodes.update(await B(this,Ee,Re).call(this,t.start)),o()(this,oe).nodes.update(await B(this,Ee,Re).call(this,t.end)),o()(this,oe).edges.update(await B(this,Ce,Ue).call(this,t.relationship))}else if(c()(e))for(const t of e)if(B(this,pe,Ie).call(this,"Array element constructor:"),B(this,pe,Ie).call(this,t?.constructor.name),(0,F.isNode)(t)){const e=await B(this,Ee,Re).call(this,t);o()(this,oe).nodes.update(e)}else if((0,F.isRelationship)(t)){const e=await B(this,Ce,Ue).call(this,t);o()(this,oe).edges.update(e)}}));return I().all(t)}function ze(){if(!o()(this,ne)){const e=V()(P.visJs,o()(this,le).visConfig??{}),t=o()(this,ue);B(this,pe,Ie).call(this,o()(this,oe).nodes),B(this,pe,Ie).call(this,o()(this,oe).edges),i()(this,ne,new D.Network(t,o()(this,oe),e))}B(this,pe,Ie).call(this,"completed"),A()((()=>{o()(this,ne).stopSimulation()}),1e4);const e=this;o()(this,ne).on("click",(function(t){if(t.nodes.length>0){const s=this.getNodeAt(t.pointer.DOM);o()(e,ae).generateEvent(L.ClickNodeEvent,{nodeId:s,node:o()(e,oe).nodes.get(s)})}else if(t.edges.length>0){const s=this.getEdgeAt(t.pointer.DOM);o()(e,ae).generateEvent(L.ClickEdgeEvent,{edgeId:s,edge:o()(e,oe).edges.get(s)})}}))}function Ge(e){var t,s,i,r;return{containerId:e.container_id,initialCypher:e.initial_cypher,consoleDebug:e.console_debug,serverDatabase:e.server_database,neo4j:{serverUrl:e.server_url,serverUser:e.server_user,serverPassword:e.server_password,driverConfig:e.encrypted||e.trust?{encrypted:e.encrypted,trust:e.trust}:void 0},visConfig:e.arrows||e.hierarchical?{edges:e.arrows?{arrows:{to:{enabled:e.arrows}}}:void 0,layout:e.hierarchical?{enabled:e.hierarchical,sortMethod:e.hierarchical_sort_method}:void 0}:void 0,labels:e.labels?f()(t=m()(s=j()(e.labels)).call(s,e.labels?.[z]?[[z,e.labels[z]]]:[])).call(t,((e,t)=>{let[s,i]=t;return e[s]={label:"function"!=typeof i.caption?i.caption:void 0,value:i.size,group:i.community,[G]:{cypher:i.sizeCypher?{value:i.sizeCypher}:void 0,function:V()({title:e=>ie(e,i.title_properties)},"function"==typeof i.caption?{label:i.caption}:{}),static:{font:i.font,shape:i.image?"image":"dot",image:i.image}}},e}),{}):void 0,relationships:e.relationships?f()(i=m()(r=j()(e.relationships)).call(r,e.relationships[z]?[[z,e.relationships[z]]]:[])).call(i,((e,t)=>{let[s,i]=t;return e[s]={value:i.thickness,label:"string"==typeof i.caption?i.caption:void 0,[G]:{function:{title:ie}}},e}),{}):void 0}}t()(xe,"NEOVIS_DEFAULT_CONFIG",z),t()(xe,"NEOVIS_ADVANCED_CONFIG",G),t()(xe,"objectToTitleHtml",ie),t()(xe,"objectToTitleString",re);const We=xe})(),C})())); -//# sourceMappingURL=main.map60ef0e3e7494c6dd3a6d \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@babel/runtime-corejs3/helpers/defineProperty"),require("@babel/runtime-corejs3/helpers/classPrivateFieldSet"),require("@babel/runtime-corejs3/helpers/classPrivateFieldGet"),require("@babel/runtime-corejs3/core-js-stable/object/keys"),require("@babel/runtime-corejs3/core-js-stable/array/is-array"),require("@babel/runtime-corejs3/core-js-stable/instance/map"),require("@babel/runtime-corejs3/core-js-stable/instance/keys"),require("@babel/runtime-corejs3/core-js-stable/instance/reduce"),require("@babel/runtime-corejs3/core-js-stable/object/entries"),require("@babel/runtime-corejs3/core-js-stable/instance/concat"),require("@babel/runtime-corejs3/core-js-stable/weak-map"),require("@babel/runtime-corejs3/core-js-stable/weak-set"),require("@babel/runtime-corejs3/core-js-stable/instance/for-each"),require("@babel/runtime-corejs3/core-js-stable/promise"),require("@babel/runtime-corejs3/core-js-stable/set-timeout"),require("neo4j-driver"),require("neo4j-driver-core"),require("vis-network/standalone"),require("deepmerge"),require("@babel/runtime-corejs3/core-js-stable/symbol")):"function"==typeof define&&define.amd?define(["@babel/runtime-corejs3/helpers/defineProperty","@babel/runtime-corejs3/helpers/classPrivateFieldSet","@babel/runtime-corejs3/helpers/classPrivateFieldGet","@babel/runtime-corejs3/core-js-stable/object/keys","@babel/runtime-corejs3/core-js-stable/array/is-array","@babel/runtime-corejs3/core-js-stable/instance/map","@babel/runtime-corejs3/core-js-stable/instance/keys","@babel/runtime-corejs3/core-js-stable/instance/reduce","@babel/runtime-corejs3/core-js-stable/object/entries","@babel/runtime-corejs3/core-js-stable/instance/concat","@babel/runtime-corejs3/core-js-stable/weak-map","@babel/runtime-corejs3/core-js-stable/weak-set","@babel/runtime-corejs3/core-js-stable/instance/for-each","@babel/runtime-corejs3/core-js-stable/promise","@babel/runtime-corejs3/core-js-stable/set-timeout","neo4j-driver","neo4j-driver-core","vis-network/standalone","deepmerge","@babel/runtime-corejs3/core-js-stable/symbol"],t):"object"==typeof exports?exports.NeoVis=t(require("@babel/runtime-corejs3/helpers/defineProperty"),require("@babel/runtime-corejs3/helpers/classPrivateFieldSet"),require("@babel/runtime-corejs3/helpers/classPrivateFieldGet"),require("@babel/runtime-corejs3/core-js-stable/object/keys"),require("@babel/runtime-corejs3/core-js-stable/array/is-array"),require("@babel/runtime-corejs3/core-js-stable/instance/map"),require("@babel/runtime-corejs3/core-js-stable/instance/keys"),require("@babel/runtime-corejs3/core-js-stable/instance/reduce"),require("@babel/runtime-corejs3/core-js-stable/object/entries"),require("@babel/runtime-corejs3/core-js-stable/instance/concat"),require("@babel/runtime-corejs3/core-js-stable/weak-map"),require("@babel/runtime-corejs3/core-js-stable/weak-set"),require("@babel/runtime-corejs3/core-js-stable/instance/for-each"),require("@babel/runtime-corejs3/core-js-stable/promise"),require("@babel/runtime-corejs3/core-js-stable/set-timeout"),require("neo4j-driver"),require("neo4j-driver-core"),require("vis-network/standalone"),require("deepmerge"),require("@babel/runtime-corejs3/core-js-stable/symbol")):e.NeoVis=t(e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0])}(self,((e,t,s,i,r,n,o,a,l,c,h,d,u,p,b,f,y,j,v,m)=>(()=>{"use strict";var w={852:e=>{e.exports=r},848:e=>{e.exports=c},349:e=>{e.exports=u},270:e=>{e.exports=o},820:e=>{e.exports=n},83:e=>{e.exports=a},209:e=>{e.exports=l},995:e=>{e.exports=i},723:e=>{e.exports=p},519:e=>{e.exports=b},581:e=>{e.exports=m},317:e=>{e.exports=h},483:e=>{e.exports=d},779:e=>{e.exports=s},642:e=>{e.exports=t},783:t=>{t.exports=e},613:e=>{e.exports=v},949:e=>{e.exports=f},55:e=>{e.exports=y},365:e=>{e.exports=j}},g={};function E(e){var t=g[e];if(void 0!==t)return t.exports;var s=g[e]={exports:{}};return w[e](s,s.exports,E),s.exports}E.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return E.d(t,{a:t}),t},E.d=(e,t)=>{for(var s in t)E.o(t,s)&&!E.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},E.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),E.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var C={};return(()=>{E.r(C),E.d(C,{EventController:()=>R,NEOVIS_ADVANCED_CONFIG:()=>G,NEOVIS_DEFAULT_CONFIG:()=>z,NeoVis:()=>Ie,NeoVisEvents:()=>L,default:()=>$e,migrateFromOldConfig:()=>We,objectToTitleHtml:()=>ie,objectToTitleString:()=>re});var e=E(783),t=E.n(e),s=E(642),i=E.n(s),r=E(779),n=E.n(r),o=E(995),a=E.n(o),l=E(852),c=E.n(l),h=E(820),d=E.n(h),u=E(270),p=E.n(u),b=E(83),f=E.n(b),y=E(209),j=E.n(y),v=E(848),m=E.n(v),w=E(317),g=E.n(w),k=E(483),N=E.n(k),x=E(349),q=E.n(x),_=E(723),I=E.n(_),T=E(519),A=E.n(T),S=E(949),O=E.n(S),F=E(55),D=E(365);const P={neo4j:{initialQuery:"MATCH (n) WHERE exists(n.pagerank)\n WITH (n), RAND() AS random\n ORDER BY random LIMIT 3000\n OPTIONAL MATCH (n)-[r]-(m)\n //WITH n,r,m WHERE exists(n.pagerank) AND exists(m.pagerank) AND exists(m.community)\n RETURN n, r, m;",neo4jUri:"bolt://localhost:7687",neo4jUser:"neo4j",neo4jPassword:"neo4j",driverConfig:{encrypted:"ENCRYPTION_OFF",trust:"TRUST_ALL_CERTIFICATES",maxConnectionPoolSize:100,connectionAcquisitionTimeout:1e4,disableLosslessIntegers:!0},groupAsLabel:!0},visJs:{nodes:{font:{size:26,strokeWidth:7},scaling:{}},edges:{arrows:{to:{enabled:!1}},length:200},layout:{improvedLayout:!1,hierarchical:{enabled:!1,sortMethod:"hubsize"}},physics:{adaptiveTimestep:!0,stabilization:{iterations:200,fit:!0}}}};let L=function(e){return e.CompletionEvent="completed",e.ClickNodeEvent="clickNode",e.ClickEdgeEvent="clickEdge",e.ErrorEvent="error",e}({});class R{constructor(){t()(this,"_handlers",void 0),this._handlers={[L.CompletionEvent]:[],[L.ErrorEvent]:[],[L.ClickNodeEvent]:[],[L.ClickEdgeEvent]:[]}}register(e,t){if(void 0===this._handlers[e])throw new Error("Unknown event: "+e);this._handlers[e].push(t)}generateEvent(e,t){if(void 0===this._handlers[e])throw new Error("Unknown event: "+e);for(const s of this._handlers[e])s(t)}}var U=E(613),V=E.n(U),M=E(581),H=E.n(M);const z=H()(),G=H()();function W(e,t){Z(e,t),t.add(e)}function $(e,t,s){Z(e,t),t.set(e,s)}function Z(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function B(e,t,s){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return s}function J(e){let{low:t,high:s}=e;return new(O().types.Integer)(t,s)}function Q(e){return 0===e.getHighBits()?e.toInt():e.toString()}const Y={2:[{keys:["low","high"],type:O().types.Integer}],3:[{keys:["year","month","day"],type:O().types.Date},{keys:["srid","x","y"],type:O().types.Point}],4:[{keys:["months","days","seconds","nanoseconds"],type:O().types.Duration},{keys:["hour","minute","second","nanosecond"],type:O().types.LocalTime},{keys:["srid","x","y","z"],type:O().types.Point}],5:[{keys:["hour","minute","second","nanosecond","timeZoneOffsetSeconds"],type:O().types.Time}],7:[{keys:["year","month","day","hour","minute","second","nanosecond"],type:O().types.LocalDateTime}],8:[{keys:["year","month","day","hour","minute","second","nanosecond","timeZoneOffsetSeconds"],type:O().types.DateTime}],9:[{keys:["year","month","day","hour","minute","second","nanosecond","timeZoneOffsetSeconds","timeZoneId"],type:O().types.DateTime}]};function K(e){if(c()(e))return d()(e).call(e,K);if("object"!=typeof e||!(a()(e).length in Y))return e;for(const s of Y[a()(e).length]){let i=!0;const r=[];for(const n of p()(s)){if(!(n in e)){i=!1;break}r.push("object"==typeof(t=e[n])&&"high"in t&&"low"in t&&2==a()(t).length?new(O().types.Integer)(e[n].low,e[n].high):e[n])}if(i)return new s.type(...r)}var t}function X(e){var t;return f()(t=j()(e)).call(t,((e,t)=>{let[s,i]=t;return e[s]=K(i),e}),{})}function ee(e){return"labels"in e?new(O().types.Node)(J(e.identity),e.labels,X(e.properties)):"type"in e?new(O().types.Relationship)(J(e.identity),J(e.start),J(e.end),e.type,X(e.properties)):"segments"in e?new(O().types.Path)(new(O().types.Node)(J(e.start.identity),e.start.labels,X(e.start.properties)),new(O().types.Node)(J(e.end.identity),e.end.labels,X(e.end.properties)),d()(t=e.segments).call(t,(e=>new(O().types.PathSegment)(new(O().types.Node)(J(e.start.identity),e.start.labels,X(e.start.properties)),new(O().types.Relationship)(J(e.relationship.identity),J(e.relationship.start),J(e.relationship.end),e.relationship.type,X(e.relationship.properties)),new(O().types.Node)(J(e.end.identity),e.end.labels,X(e.end.properties)))))):void 0;var t}function te(e,t){if(c()(t)&&t.length>1){let s=`${e}:
"}return`${e}: ${t}
`}function se(e,t){if("object"==typeof t?.properties)return(0,F.isInt)(t.properties[e])?Q(t.properties[e]):t.properties[e];throw new Error("Neo4j object is not properly constructed")}function ie(e,t){let s="";t||(t=a()(e.properties));for(const i of t){const t=se(i,e);t&&(s+=te(i,t))}const i=document.createElement("div");return i.innerHTML=s,i}function re(e,t){let s="";t||(t=a()(e.properties));for(const i of t){const t=se(i,e);t&&(s+=`${i}: ${t}\n`)}return s}var ne=new(g()),oe=new(g()),ae=new(g()),le=new(g()),ce=new(g()),he=new(g()),de=new(g()),ue=new(g()),pe=new(g()),be=new(N()),fe=new(N()),ye=new(N()),je=new(N()),ve=new(N()),me=new(N()),we=new(N()),ge=new(N()),Ee=new(N()),Ce=new(N()),ke=new(N()),Ne=new(N()),xe=new(N()),qe=new(N()),_e=new(N());class Ie{get nodes(){return n()(this,ne).nodes}get dataInfo(){return n()(this,oe)}get edges(){return n()(this,ne).edges}get _config(){return n()(this,ce)}get network(){return n()(this,ae)}constructor(e){W(this,_e),W(this,qe),W(this,xe),W(this,Ne),W(this,ke),W(this,Ce),W(this,Ee),W(this,ge),W(this,we),W(this,me),W(this,ve),W(this,je),W(this,ye),W(this,fe),W(this,be),$(this,ne,{writable:!0,value:{nodes:new D.DataSet,edges:new D.DataSet}}),$(this,oe,{writable:!0,value:new Array}),$(this,ae,{writable:!0,value:null}),$(this,le,{writable:!0,value:new R}),$(this,ce,{writable:!0,value:void 0}),$(this,he,{writable:!0,value:void 0}),$(this,de,{writable:!0,value:void 0}),$(this,ue,{writable:!0,value:void 0}),$(this,pe,{writable:!0,value:void 0}),B(this,fe,Ae).call(this,e),B(this,be,Te).call(this,e),B(this,be,Te).call(this,P)}render(e,t){n()(this,ce).dataFunction||"function"==typeof e?B(this,Ne,Me).call(this,"function"==typeof e?e:n()(this,ce).dataFunction,t):B(this,xe,He).call(this,e,t)}clearNetwork(){n()(this,ne).nodes.clear(),n()(this,ne).edges.clear()}registerOnEvent(e,t){n()(this,le).register(e,t)}reinit(e,t){B(this,fe,Ae).call(this,e),this.render(void 0,t)}reload(e){this.clearNetwork(),this.render(void 0,e)}stabilize(){n()(this,ae).stopSimulation(),B(this,be,Te).call(this,"Calling stopSimulation")}renderWithCypher(e,t){this.clearNetwork(),i()(this,ue,e),this.render(void 0,t)}renderWithFunction(e,t){this.clearNetwork(),this.render(e,t)}updateWithCypher(e,t){this.render(e,t)}updateWithFunction(e,t){this.render(e,t)}}function Te(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"log";("log"!==t||n()(this,ce).consoleDebug)&&console[t](e)}function Ae(e){let t,s;if(e.nonFlat&&e.defaultLabelConfig){if(t=e.defaultLabelConfig,t[G])throw new Error("non flat config can't use NEOVIS_ADVANCED_CONFIG, read the doc to see how the config should look");if(s=e.defaultRelationshipsConfig,s[G])throw new Error("non flat config can't use NEOVIS_ADVANCED_CONFIG, read the doc to see how the config should look")}else t=e.labels?.[z],s=e.relationships?.[z];if(t)for(const s of a()(e.labels))e=e.nonFlat?{...e,labels:{...e.labels,[s]:V()(t,e.labels?.[s])}}:{...e,labels:{...e.labels,[s]:{...V()(t,e.labels?.[s]),[G]:V()(t[G]??{},(e.labels?.[s])[G]??{})}}};if(s)for(const t of a()(e.relationships))e=e.nonFlat?{...e,relationships:{...e.relationships,[t]:V()(s,e.relationships?.[t])}}:{...e,relationships:{...e.relationships,[t]:{...V()(s,e.relationships?.[t]),[G]:V()(s[G]??{},(e.relationships?.[t])[G]??{})}}};i()(this,ce,e),e.dataFunction||(i()(this,he,e.neo4j instanceof O().driver?e.neo4j:O().driver(e.neo4j?.serverUrl??P.neo4j.neo4jUri,O().auth.basic(e.neo4j?.serverUser??P.neo4j.neo4jUser,e.neo4j?.serverPassword??P.neo4j.neo4jPassword),V()(P.neo4j.driverConfig,e.neo4j?.driverConfig??{}))),i()(this,de,e.serverDatabase),i()(this,ue,e.initialCypher??P.neo4j.initialQuery)),i()(this,pe,document.getElementById(e.containerId)),n()(this,ce).groupAsLabel=e.groupAsLabel??P.neo4j.groupAsLabel}async function Se(e,t){const s=n()(this,he).session(n()(this,de)&&{database:n()(this,de)}),i=[];try{const r=await s.readTransaction((s=>s.run(e,{id:t})));for(const e of r.records)q()(e).call(e,(e=>{i.push(e)}))}finally{await s.close()}if(0!==i.length)return 1===i.length?i.pop():i}function Oe(e,t){if("function"==typeof e)return e(t);throw new Error("Function type property field must be a function")}function Fe(e,t){if(e&&"object"==typeof e)for(const s of a()(e)){const i=e[s];i&&"object"==typeof i?(t[s]||(t[s]={}),B(this,ve,Fe).call(this,i,t[s])):t[s]=i}}function De(e,t,s){if(e&&"object"==typeof e)for(const i of a()(e)){const r=e[i];if("object"==typeof r)t[i]||(t[i]={}),B(this,me,De).call(this,r,t[i],s);else{const r=e[i];t[i]=se(r,s)}}}function*Pe(e,t,s){if(e&&"object"==typeof e)for(const i of a()(e)){const r=e[i];if(r&&"object"==typeof r)t[i]||(t[i]={}),yield*B(this,we,Pe).call(this,r,t[i],s);else{const e=B(this,ye,Se).call(this,r,s);yield I().resolve(e).then((e=>{t[i]=e}))}}}function*Le(e,t,s){if(e&&"object"==typeof e)for(const i of a()(e)){const r=e[i];if(r&&"object"==typeof r)t[i]||(t[i]={}),yield*B(this,ge,Le).call(this,r,t[i],s);else{const e=B(this,je,Oe).call(this,r,s);yield I().resolve(e).then((e=>{t[i]=e}))}}}async function Re(e,t,s,i){if(!e)return;let r,o,a,l;if(n()(this,ce).nonFlat){if(void 0!==e[G])throw new Error("Advanced config and non flat config should not be together");r=e.static,o=e.cypher,a=e.property,l=e.function}else{const t=e[G];if(a=e,void 0!==t&&"object"!=typeof t)throw new Error("Advanced config should be an object. See documentation for details.");o=t?.cypher,r=t?.static,l=t?.function}B(this,me,De).call(this,a,t,s),B(this,ve,Fe).call(this,r,t),await I().all(B(this,we,Pe).call(this,o,t,i)),await I().all(B(this,ge,Le).call(this,l,t,s))}async function Ue(e){const t={},s=e.labels[0],i=n()(this,ce)?.labels?.[s]??n()(this,ce)?.defaultLabelConfig??n()(this,ce)?.labels?.[z];return t.id=(0,F.isInt)(e.identity)?Q(e.identity):e.identity,t.raw=e,n()(this,ce).groupAsLabel&&(t.group=s),await B(this,Ee,Re).call(this,i,t,e,e.identity),t}async function Ve(e){const t=n()(this,ce)?.relationships?.[e.type]??n()(this,ce).defaultRelationshipsConfig??n()(this,ce)?.relationships?.[z],s={};return s.id=(0,F.isInt)(e.identity)?Q(e.identity):e.identity,s.from=(0,F.isInt)(e.start)?Q(e.start):e.start,s.to=(0,F.isInt)(e.end)?Q(e.end):e.end,s.raw=e,await B(this,Ee,Re).call(this,t,s,e,e.identity),s}async function Me(e,t){let s=0;try{const i=[];for await(const r of await e(t))i.push(B(this,qe,ze).call(this,r)),s++;await I().all(i)}catch(e){return void n()(this,le).generateEvent(L.ErrorEvent,{error:e})}B(this,_e,Ge).call(this),n()(this,le).generateEvent(L.CompletionEvent,{recordCount:s})}function He(e,t){let s=0;const i=e||n()(this,ue),r=n()(this,he).session(n()(this,de)?{database:n()(this,de)}:void 0),o=[];r.run(i,t).subscribe({onNext:e=>{s++,o.push(B(this,qe,ze).call(this,e))},onCompleted:async()=>{await I().all(o),await r.close(),B(this,_e,Ge).call(this),n()(this,le).generateEvent(L.CompletionEvent,{recordCount:s})},onError:e=>{B(this,be,Te).call(this,e,"error"),n()(this,le).generateEvent(L.ErrorEvent,{error:e})}})}async function ze(e){if(!(e instanceof O().types.Record)){const t=e._fields;e=new(O().types.Record)(p()(e),d()(t).call(t,ee),e._fieldLookup)}B(this,be,Te).call(this,"CLASS NAME"),B(this,be,Te).call(this,e?.constructor.name),B(this,be,Te).call(this,e);const t=n()(this,oe).length;n()(this,oe).push(e);const s=d()(e).call(e,(async e=>{if(B(this,be,Te).call(this,"Constructor:"),B(this,be,Te).call(this,e?.constructor.name),(0,F.isNode)(e)){let s=await B(this,Ce,Ue).call(this,e);s.index=t;try{n()(this,ne).nodes.update(s)}catch(e){B(this,be,Te).call(this,e,"error")}}else if((0,F.isRelationship)(e)){let s=await B(this,ke,Ve).call(this,e);s.id=n()(this,ne).edges.length,s.index=t,n()(this,ne).edges.update(s)}else if((0,F.isPath)(e)){B(this,be,Te).call(this,"PATH"),B(this,be,Te).call(this,e);let s=await B(this,Ce,Ue).call(this,e.start),i=await B(this,Ce,Ue).call(this,e.end);s.index=t,i.index=t,n()(this,ne).nodes.update(s),n()(this,ne).nodes.update(i);for(const t of e.segments)n()(this,ne).nodes.update(await B(this,Ce,Ue).call(this,t.start)),n()(this,ne).nodes.update(await B(this,Ce,Ue).call(this,t.end)),n()(this,ne).edges.update(await B(this,ke,Ve).call(this,t.relationship))}else if(c()(e))for(const s of e)if(B(this,be,Te).call(this,"Array element constructor:"),B(this,be,Te).call(this,s?.constructor.name),(0,F.isNode)(s)){let e=await B(this,Ce,Ue).call(this,s);e.index=t,n()(this,ne).nodes.update(e)}else if((0,F.isRelationship)(s)){const e=await B(this,ke,Ve).call(this,s);e.index=t,n()(this,ne).edges.update(e)}}));return I().all(s)}function Ge(){if(!n()(this,ae)){const e=V()(P.visJs,n()(this,ce).visConfig??{}),t=n()(this,pe);B(this,be,Te).call(this,n()(this,ne).nodes),B(this,be,Te).call(this,n()(this,ne).edges),i()(this,ae,new D.Network(t,n()(this,ne),e))}B(this,be,Te).call(this,"completed"),A()((()=>{n()(this,ae).stopSimulation()}),1e4);const e=this;n()(this,ae).on("click",(function(t){if(t.nodes.length>0){const s=this.getNodeAt(t.pointer.DOM);n()(e,le).generateEvent(L.ClickNodeEvent,{nodeId:s,node:n()(e,ne).nodes.get(s)})}else if(t.edges.length>0){const s=this.getEdgeAt(t.pointer.DOM);n()(e,le).generateEvent(L.ClickEdgeEvent,{edgeId:s,edge:n()(e,ne).edges.get(s)})}}))}function We(e){var t,s,i,r;return{containerId:e.container_id,initialCypher:e.initial_cypher,consoleDebug:e.console_debug,serverDatabase:e.server_database,neo4j:{serverUrl:e.server_url,serverUser:e.server_user,serverPassword:e.server_password,driverConfig:e.encrypted||e.trust?{encrypted:e.encrypted,trust:e.trust}:void 0},visConfig:e.arrows||e.hierarchical?{edges:e.arrows?{arrows:{to:{enabled:e.arrows}}}:void 0,layout:e.hierarchical?{enabled:e.hierarchical,sortMethod:e.hierarchical_sort_method}:void 0}:void 0,labels:e.labels?f()(t=m()(s=j()(e.labels)).call(s,e.labels?.[z]?[[z,e.labels[z]]]:[])).call(t,((e,t)=>{let[s,i]=t;return e[s]={label:"function"!=typeof i.caption?i.caption:void 0,value:i.size,group:i.community,[G]:{cypher:i.sizeCypher?{value:i.sizeCypher}:void 0,function:V()({title:e=>ie(e,i.title_properties)},"function"==typeof i.caption?{label:i.caption}:{}),static:{font:i.font,shape:i.image?"image":"dot",image:i.image}}},e}),{}):void 0,relationships:e.relationships?f()(i=m()(r=j()(e.relationships)).call(r,e.relationships[z]?[[z,e.relationships[z]]]:[])).call(i,((e,t)=>{let[s,i]=t;return e[s]={value:i.thickness,label:"string"==typeof i.caption?i.caption:void 0,[G]:{function:{title:ie}}},e}),{}):void 0}}t()(Ie,"NEOVIS_DEFAULT_CONFIG",z),t()(Ie,"NEOVIS_ADVANCED_CONFIG",G),t()(Ie,"objectToTitleHtml",ie),t()(Ie,"objectToTitleString",re);const $e=Ie})(),C})())); +//# sourceMappingURL=main.map05e634686275b7cccefc diff --git a/dist/neovis.js b/dist/neovis.js index aed6648..ce08c85 100644 --- a/dist/neovis.js +++ b/dist/neovis.js @@ -1,3 +1,3 @@ /*! For license information please see neovis.js.LICENSE.txt */ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.NeoVis=e():t.NeoVis=e()}(self,(()=>(()=>{var t={9742:(t,e)=>{"use strict";e.byteLength=function(t){var e=s(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,o=s(t),g=o[0],A=o[1],C=new i(function(t,e,n){return 3*(e+n)/4-n}(0,g,A)),I=0,a=A>0?g-4:g;for(n=0;n>16&255,C[I++]=e>>8&255,C[I++]=255&e;return 2===A&&(e=r[t.charCodeAt(n)]<<2|r[t.charCodeAt(n+1)]>>4,C[I++]=255&e),1===A&&(e=r[t.charCodeAt(n)]<<10|r[t.charCodeAt(n+1)]<<4|r[t.charCodeAt(n+2)]>>2,C[I++]=e>>8&255,C[I++]=255&e),C},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],g=16383,s=0,C=r-i;sC?C:s+g));return 1===i?(e=t[r-1],o.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"=")),o.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",g=0;g<64;++g)n[g]=o[g],r[o.charCodeAt(g)]=g;function s(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function A(t,e,r){for(var i,o,g=[],s=e;s>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return g.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},8764:(t,e,n)=>{"use strict";const r=n(9742),i=n(645),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=A,e.SlowBuffer=function(t){return+t!=t&&(t=0),A.alloc(+t)},e.INSPECT_MAX_BYTES=50;const g=2147483647;function s(t){if(t>g)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,A.prototype),e}function A(t,e,n){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return a(t)}return C(t,e,n)}function C(t,e,n){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!A.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const n=0|h(t,e);let r=s(n);const i=r.write(t,e);return i!==n&&(r=r.slice(0,i)),r}(t,e);if(ArrayBuffer.isView(t))return function(t){if(Q(t,Uint8Array)){const e=new Uint8Array(t);return c(e.buffer,e.byteOffset,e.byteLength)}return u(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(Q(t,ArrayBuffer)||t&&Q(t.buffer,ArrayBuffer))return c(t,e,n);if("undefined"!=typeof SharedArrayBuffer&&(Q(t,SharedArrayBuffer)||t&&Q(t.buffer,SharedArrayBuffer)))return c(t,e,n);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=t.valueOf&&t.valueOf();if(null!=r&&r!==t)return A.from(r,e,n);const i=function(t){if(A.isBuffer(t)){const e=0|l(t.length),n=s(e);return 0===n.length||t.copy(n,0,0,e),n}return void 0!==t.length?"number"!=typeof t.length||X(t.length)?s(0):u(t):"Buffer"===t.type&&Array.isArray(t.data)?u(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return A.from(t[Symbol.toPrimitive]("string"),e,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function I(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function a(t){return I(t),s(t<0?0:0|l(t))}function u(t){const e=t.length<0?0:0|l(t.length),n=s(e);for(let r=0;r=g)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+g.toString(16)+" bytes");return 0|t}function h(t,e){if(A.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||Q(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const n=t.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return Y(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return H(t).length;default:if(i)return r?-1:Y(t).length;e=(""+e).toLowerCase(),i=!0}}function d(t,e,n){let r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return S(this,e,n);case"utf8":case"utf-8":return E(this,e,n);case"ascii":return k(this,e,n);case"latin1":case"binary":return T(this,e,n);case"base64":return x(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function f(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function p(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),X(n=+n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=A.from(e,r)),A.isBuffer(e))return 0===e.length?-1:v(t,e,n,r,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):v(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(t,e,n,r,i){let o,g=1,s=t.length,A=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;g=2,s/=2,A/=2,n/=2}function C(t,e){return 1===g?t[e]:t.readUInt16BE(e*g)}if(i){let r=-1;for(o=n;os&&(n=s-A),o=n;o>=0;o--){let n=!0;for(let r=0;ri&&(r=i):r=i;const o=e.length;let g;for(r>o/2&&(r=o/2),g=0;g>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function x(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function E(t,e,n){n=Math.min(t.length,n);const r=[];let i=e;for(;i239?4:e>223?3:e>191?2:1;if(i+g<=n){let n,r,s,A;switch(g){case 1:e<128&&(o=e);break;case 2:n=t[i+1],128==(192&n)&&(A=(31&e)<<6|63&n,A>127&&(o=A));break;case 3:n=t[i+1],r=t[i+2],128==(192&n)&&128==(192&r)&&(A=(15&e)<<12|(63&n)<<6|63&r,A>2047&&(A<55296||A>57343)&&(o=A));break;case 4:n=t[i+1],r=t[i+2],s=t[i+3],128==(192&n)&&128==(192&r)&&128==(192&s)&&(A=(15&e)<<18|(63&n)<<12|(63&r)<<6|63&s,A>65535&&A<1114112&&(o=A))}}null===o?(o=65533,g=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=g}return function(t){const e=t.length;if(e<=O)return String.fromCharCode.apply(String,t);let n="",r=0;for(;rr.length?(A.isBuffer(e)||(e=A.from(e)),e.copy(r,i)):Uint8Array.prototype.set.call(r,e,i);else{if(!A.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(r,i)}i+=e.length}return r},A.byteLength=h,A.prototype._isBuffer=!0,A.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;en&&(t+=" ... "),""},o&&(A.prototype[o]=A.prototype.inspect),A.prototype.compare=function(t,e,n,r,i){if(Q(t,Uint8Array)&&(t=A.from(t,t.offset,t.byteLength)),!A.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;let o=(i>>>=0)-(r>>>=0),g=(n>>>=0)-(e>>>=0);const s=Math.min(o,g),C=this.slice(r,i),I=t.slice(e,n);for(let t=0;t>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let o=!1;for(;;)switch(r){case"hex":return y(this,t,e,n);case"utf8":case"utf-8":return b(this,t,e,n);case"ascii":case"latin1":case"binary":return m(this,t,e,n);case"base64":return w(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},A.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const O=4096;function k(t,e,n){let r="";n=Math.min(t.length,n);for(let i=e;ir)&&(n=r);let i="";for(let r=e;rn)throw new RangeError("Trying to access beyond buffer length")}function R(t,e,n,r,i,o){if(!A.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function D(t,e,n,r,i){U(e,r,i,t,n,7);let o=Number(e&BigInt(4294967295));t[n++]=o,o>>=8,t[n++]=o,o>>=8,t[n++]=o,o>>=8,t[n++]=o;let g=Number(e>>BigInt(32)&BigInt(4294967295));return t[n++]=g,g>>=8,t[n++]=g,g>>=8,t[n++]=g,g>>=8,t[n++]=g,n}function M(t,e,n,r,i){U(e,r,i,t,n,7);let o=Number(e&BigInt(4294967295));t[n+7]=o,o>>=8,t[n+6]=o,o>>=8,t[n+5]=o,o>>=8,t[n+4]=o;let g=Number(e>>BigInt(32)&BigInt(4294967295));return t[n+3]=g,g>>=8,t[n+2]=g,g>>=8,t[n+1]=g,g>>=8,t[n]=g,n+8}function j(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function B(t,e,n,r,o){return e=+e,n>>>=0,o||j(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function L(t,e,n,r,o){return e=+e,n>>>=0,o||j(t,0,n,8),i.write(t,e,n,r,52,8),n+8}A.prototype.slice=function(t,e){const n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e>>=0,e>>>=0,n||N(t,e,this.length);let r=this[t],i=1,o=0;for(;++o>>=0,e>>>=0,n||N(t,e,this.length);let r=this[t+--e],i=1;for(;e>0&&(i*=256);)r+=this[t+--e]*i;return r},A.prototype.readUint8=A.prototype.readUInt8=function(t,e){return t>>>=0,e||N(t,1,this.length),this[t]},A.prototype.readUint16LE=A.prototype.readUInt16LE=function(t,e){return t>>>=0,e||N(t,2,this.length),this[t]|this[t+1]<<8},A.prototype.readUint16BE=A.prototype.readUInt16BE=function(t,e){return t>>>=0,e||N(t,2,this.length),this[t]<<8|this[t+1]},A.prototype.readUint32LE=A.prototype.readUInt32LE=function(t,e){return t>>>=0,e||N(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},A.prototype.readUint32BE=A.prototype.readUInt32BE=function(t,e){return t>>>=0,e||N(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},A.prototype.readBigUInt64LE=J((function(t){V(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||G(t,this.length-8);const r=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+n*2**24;return BigInt(r)+(BigInt(i)<>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||G(t,this.length-8);const r=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+n;return(BigInt(r)<>>=0,e>>>=0,n||N(t,e,this.length);let r=this[t],i=1,o=0;for(;++o=i&&(r-=Math.pow(2,8*e)),r},A.prototype.readIntBE=function(t,e,n){t>>>=0,e>>>=0,n||N(t,e,this.length);let r=e,i=1,o=this[t+--r];for(;r>0&&(i*=256);)o+=this[t+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},A.prototype.readInt8=function(t,e){return t>>>=0,e||N(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},A.prototype.readInt16LE=function(t,e){t>>>=0,e||N(t,2,this.length);const n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},A.prototype.readInt16BE=function(t,e){t>>>=0,e||N(t,2,this.length);const n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},A.prototype.readInt32LE=function(t,e){return t>>>=0,e||N(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},A.prototype.readInt32BE=function(t,e){return t>>>=0,e||N(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},A.prototype.readBigInt64LE=J((function(t){V(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||G(t,this.length-8);const r=this[t+4]+256*this[t+5]+65536*this[t+6]+(n<<24);return(BigInt(r)<>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||G(t,this.length-8);const r=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(r)<>>=0,e||N(t,4,this.length),i.read(this,t,!0,23,4)},A.prototype.readFloatBE=function(t,e){return t>>>=0,e||N(t,4,this.length),i.read(this,t,!1,23,4)},A.prototype.readDoubleLE=function(t,e){return t>>>=0,e||N(t,8,this.length),i.read(this,t,!0,52,8)},A.prototype.readDoubleBE=function(t,e){return t>>>=0,e||N(t,8,this.length),i.read(this,t,!1,52,8)},A.prototype.writeUintLE=A.prototype.writeUIntLE=function(t,e,n,r){t=+t,e>>>=0,n>>>=0,r||R(this,t,e,n,Math.pow(2,8*n)-1,0);let i=1,o=0;for(this[e]=255&t;++o>>=0,n>>>=0,r||R(this,t,e,n,Math.pow(2,8*n)-1,0);let i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},A.prototype.writeUint8=A.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||R(this,t,e,1,255,0),this[e]=255&t,e+1},A.prototype.writeUint16LE=A.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||R(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},A.prototype.writeUint16BE=A.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||R(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},A.prototype.writeUint32LE=A.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||R(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},A.prototype.writeUint32BE=A.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||R(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},A.prototype.writeBigUInt64LE=J((function(t,e=0){return D(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),A.prototype.writeBigUInt64BE=J((function(t,e=0){return M(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),A.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e>>>=0,!r){const r=Math.pow(2,8*n-1);R(this,t,e,n,r-1,-r)}let i=0,o=1,g=0;for(this[e]=255&t;++i>0)-g&255;return e+n},A.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e>>>=0,!r){const r=Math.pow(2,8*n-1);R(this,t,e,n,r-1,-r)}let i=n-1,o=1,g=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===g&&0!==this[e+i+1]&&(g=1),this[e+i]=(t/o>>0)-g&255;return e+n},A.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||R(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},A.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||R(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},A.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||R(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},A.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||R(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},A.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||R(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},A.prototype.writeBigInt64LE=J((function(t,e=0){return D(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),A.prototype.writeBigInt64BE=J((function(t,e=0){return M(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),A.prototype.writeFloatLE=function(t,e,n){return B(this,t,e,!0,n)},A.prototype.writeFloatBE=function(t,e,n){return B(this,t,e,!1,n)},A.prototype.writeDoubleLE=function(t,e,n){return L(this,t,e,!0,n)},A.prototype.writeDoubleBE=function(t,e,n){return L(this,t,e,!1,n)},A.prototype.copy=function(t,e,n,r){if(!A.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(i=e;i=r+4;n-=3)e=`_${t.slice(n-3,n)}${e}`;return`${t.slice(0,n)}${e}`}function U(t,e,n,r,i,o){if(t>n||t3?0===e||e===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(o+1)}${r}`:`>= -(2${r} ** ${8*(o+1)-1}${r}) and < 2 ** ${8*(o+1)-1}${r}`:`>= ${e}${r} and <= ${n}${r}`,new F.ERR_OUT_OF_RANGE("value",i,t)}!function(t,e,n){V(e,"offset"),void 0!==t[e]&&void 0!==t[e+n]||G(e,t.length-(n+1))}(r,i,o)}function V(t,e){if("number"!=typeof t)throw new F.ERR_INVALID_ARG_TYPE(e,"number",t)}function G(t,e,n){if(Math.floor(t)!==t)throw V(t,n),new F.ERR_OUT_OF_RANGE(n||"offset","an integer",t);if(e<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${e}`,t)}z("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),z("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),z("ERR_OUT_OF_RANGE",(function(t,e,n){let r=`The value of "${t}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=Z(String(n)):"bigint"==typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=Z(i)),i+="n"),r+=` It must be ${e}. Received ${i}`,r}),RangeError);const W=/[^+/0-9A-Za-z-_]/g;function Y(t,e){let n;e=e||1/0;const r=t.length;let i=null;const o=[];for(let g=0;g55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(g+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function H(t){return r.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(W,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function K(t,e,n,r){let i;for(i=0;i=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function Q(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function X(t){return t!=t}const q=function(){const t="0123456789abcdef",e=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let i=0;i<16;++i)e[r+i]=t[n]+t[i]}return e}();function J(t){return"undefined"==typeof BigInt?$:t}function $(){throw new Error("BigInt not supported")}},3536:(t,e,n)=>{var r=n(1910);t.exports=r},281:(t,e,n)=>{var r=n(2547);n(3975),t.exports=r},31:(t,e,n)=>{var r=n(6509);t.exports=r},7487:(t,e,n)=>{var r=n(5774);t.exports=r},4034:(t,e,n)=>{n(2988);var r=n(4058);t.exports=r.Array.isArray},5367:(t,e,n)=>{n(5906);var r=n(5703);t.exports=r("Array").concat},9324:(t,e,n)=>{n(2437);var r=n(5703);t.exports=r("Array").forEach},5909:(t,e,n)=>{n(6274),n(5967);var r=n(5703);t.exports=r("Array").keys},3866:(t,e,n)=>{n(8787);var r=n(5703);t.exports=r("Array").map},2999:(t,e,n)=>{n(1876);var r=n(5703);t.exports=r("Array").reduce},6043:(t,e,n)=>{var r=n(7046),i=n(5367),o=Array.prototype;t.exports=function(t){var e=t.concat;return t===o||r(o,t)&&e===o.concat?i:e}},8287:(t,e,n)=>{var r=n(7046),i=n(3866),o=Array.prototype;t.exports=function(t){var e=t.map;return t===o||r(o,t)&&e===o.map?i:e}},8025:(t,e,n)=>{var r=n(7046),i=n(2999),o=Array.prototype;t.exports=function(t){var e=t.reduce;return t===o||r(o,t)&&e===o.reduce?i:e}},8171:(t,e,n)=>{n(6450);var r=n(4058).Object,i=t.exports=function(t,e,n){return r.defineProperty(t,e,n)};r.defineProperty.sham&&(i.sham=!0)},3081:(t,e,n)=>{n(1078);var r=n(4058);t.exports=r.Object.entries},8494:(t,e,n)=>{n(1724);var r=n(4058);t.exports=r.Object.keys},2956:(t,e,n)=>{n(7627),n(6274),n(5967),n(8881),n(4560),n(7206),n(4349),n(7971);var r=n(4058);t.exports=r.Promise},7473:(t,e,n)=>{n(5906),n(5967),n(5824),n(8555),n(2615),n(1732),n(5903),n(1825),n(8394),n(5915),n(1766),n(2737),n(9911),n(4315),n(3131),n(4714),n(659),n(9120),n(5327),n(1502);var r=n(4058);t.exports=r.Symbol},4227:(t,e,n)=>{n(6274),n(5967),n(7971),n(1825);var r=n(1477);t.exports=r.f("iterator")},2978:(t,e,n)=>{n(8084),n(3131);var r=n(1477);t.exports=r.f("toPrimitive")},2304:(t,e,n)=>{n(6274),n(5967),n(4334);var r=n(4058);t.exports=r.WeakMap},9567:(t,e,n)=>{n(6274),n(5967),n(1773);var r=n(4058);t.exports=r.WeakSet},3685:(t,e,n)=>{t.exports=n(621)},6600:(t,e,n)=>{t.exports=n(2201)},9759:(t,e,n)=>{t.exports=n(7398)},1384:(t,e,n)=>{t.exports=n(6189)},621:(t,e,n)=>{var r=n(3536);t.exports=r},2201:(t,e,n)=>{var r=n(281);n(8783),n(2731),n(5605),n(5799),n(1943),n(6774),n(5414),n(620),n(6172),t.exports=r},7398:(t,e,n)=>{var r=n(31);t.exports=r},6189:(t,e,n)=>{var r=n(7487);t.exports=r},4883:(t,e,n)=>{var r=n(7475),i=n(9826),o=TypeError;t.exports=function(t){if(r(t))return t;throw o(i(t)+" is not a function")}},174:(t,e,n)=>{var r=n(4284),i=n(9826),o=TypeError;t.exports=function(t){if(r(t))return t;throw o(i(t)+" is not a constructor")}},1851:(t,e,n)=>{var r=n(7475),i=String,o=TypeError;t.exports=function(t){if("object"==typeof t||r(t))return t;throw o("Can't set "+i(t)+" as a prototype")}},8479:t=>{t.exports=function(){}},5743:(t,e,n)=>{var r=n(7046),i=TypeError;t.exports=function(t,e){if(r(e,t))return t;throw i("Incorrect invocation")}},6059:(t,e,n)=>{var r=n(941),i=String,o=TypeError;t.exports=function(t){if(r(t))return t;throw o(i(t)+" is not an object")}},7135:(t,e,n)=>{var r=n(5981);t.exports=r((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))},6837:(t,e,n)=>{"use strict";var r=n(3610).forEach,i=n(4194)("forEach");t.exports=i?[].forEach:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}},1692:(t,e,n)=>{var r=n(4529),i=n(9413),o=n(623),g=function(t){return function(e,n,g){var s,A=r(e),C=o(A),I=i(g,C);if(t&&n!=n){for(;C>I;)if((s=A[I++])!=s)return!0}else for(;C>I;I++)if((t||I in A)&&A[I]===n)return t||I||0;return!t&&-1}};t.exports={includes:g(!0),indexOf:g(!1)}},3610:(t,e,n)=>{var r=n(6843),i=n(5329),o=n(7026),g=n(9678),s=n(623),A=n(4692),C=i([].push),I=function(t){var e=1==t,n=2==t,i=3==t,I=4==t,a=6==t,u=7==t,c=5==t||a;return function(l,h,d,f){for(var p,v,y=g(l),b=o(y),m=r(h,d),w=s(b),_=0,x=f||A,E=e?x(l,w):n||u?x(l,0):void 0;w>_;_++)if((c||_ in b)&&(v=m(p=b[_],_,y),t))if(e)E[_]=v;else if(v)switch(t){case 3:return!0;case 5:return p;case 6:return _;case 2:C(E,p)}else switch(t){case 4:return!1;case 7:C(E,p)}return a?-1:i||I?I:E}};t.exports={forEach:I(0),map:I(1),filter:I(2),some:I(3),every:I(4),find:I(5),findIndex:I(6),filterReject:I(7)}},568:(t,e,n)=>{var r=n(5981),i=n(9813),o=n(3385),g=i("species");t.exports=function(t){return o>=51||!r((function(){var e=[];return(e.constructor={})[g]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},4194:(t,e,n)=>{"use strict";var r=n(5981);t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){return 1},1)}))}},6499:(t,e,n)=>{var r=n(4883),i=n(9678),o=n(7026),g=n(623),s=TypeError,A=function(t){return function(e,n,A,C){r(n);var I=i(e),a=o(I),u=g(I),c=t?u-1:0,l=t?-1:1;if(A<2)for(;;){if(c in a){C=a[c],c+=l;break}if(c+=l,t?c<0:u<=c)throw s("Reduce of empty array with no initial value")}for(;t?c>=0:u>c;c+=l)c in a&&(C=n(C,a[c],c,I));return C}};t.exports={left:A(!1),right:A(!0)}},5790:(t,e,n)=>{var r=n(9413),i=n(623),o=n(5449),g=Array,s=Math.max;t.exports=function(t,e,n){for(var A=i(t),C=r(e,A),I=r(void 0===n?A:n,A),a=g(s(I-C,0)),u=0;C{var r=n(5329);t.exports=r([].slice)},5693:(t,e,n)=>{var r=n(1052),i=n(4284),o=n(941),g=n(9813)("species"),s=Array;t.exports=function(t){var e;return r(t)&&(e=t.constructor,(i(e)&&(e===s||r(e.prototype))||o(e)&&null===(e=e[g]))&&(e=void 0)),void 0===e?s:e}},4692:(t,e,n)=>{var r=n(5693);t.exports=function(t,e){return new(r(t))(0===e?0:e)}},1385:(t,e,n)=>{var r=n(9813)("iterator"),i=!1;try{var o=0,g={next:function(){return{done:!!o++}},return:function(){i=!0}};g[r]=function(){return this},Array.from(g,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o={};o[r]=function(){return{next:function(){return{done:n=!0}}}},t(o)}catch(t){}return n}},2532:(t,e,n)=>{var r=n(5329),i=r({}.toString),o=r("".slice);t.exports=function(t){return o(i(t),8,-1)}},9697:(t,e,n)=>{var r=n(2885),i=n(7475),o=n(2532),g=n(9813)("toStringTag"),s=Object,A="Arguments"==o(function(){return arguments}());t.exports=r?o:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=s(t),g))?n:A?o(e):"Object"==(r=o(e))&&i(e.callee)?"Arguments":r}},8850:(t,e,n)=>{"use strict";var r=n(5329),i=n(4380),o=n(1647).getWeakData,g=n(5743),s=n(6059),A=n(2119),C=n(941),I=n(3091),a=n(3610),u=n(953),c=n(5402),l=c.set,h=c.getterFor,d=a.find,f=a.findIndex,p=r([].splice),v=0,y=function(t){return t.frozen||(t.frozen=new b)},b=function(){this.entries=[]},m=function(t,e){return d(t.entries,(function(t){return t[0]===e}))};b.prototype={get:function(t){var e=m(this,t);if(e)return e[1]},has:function(t){return!!m(this,t)},set:function(t,e){var n=m(this,t);n?n[1]=e:this.entries.push([t,e])},delete:function(t){var e=f(this.entries,(function(e){return e[0]===t}));return~e&&p(this.entries,e,1),!!~e}},t.exports={getConstructor:function(t,e,n,r){var a=t((function(t,i){g(t,c),l(t,{type:e,id:v++,frozen:void 0}),A(i)||I(i,t[r],{that:t,AS_ENTRIES:n})})),c=a.prototype,d=h(e),f=function(t,e,n){var r=d(t),i=o(s(e),!0);return!0===i?y(r).set(e,n):i[r.id]=n,t};return i(c,{delete:function(t){var e=d(this);if(!C(t))return!1;var n=o(t);return!0===n?y(e).delete(t):n&&u(n,e.id)&&delete n[e.id]},has:function(t){var e=d(this);if(!C(t))return!1;var n=o(t);return!0===n?y(e).has(t):n&&u(n,e.id)}}),i(c,n?{get:function(t){var e=d(this);if(C(t)){var n=o(t);return!0===n?y(e).get(t):n?n[e.id]:void 0}},set:function(t,e){return f(this,t,e)}}:{add:function(t){return f(this,t,!0)}}),a}}},4683:(t,e,n)=>{"use strict";var r=n(6887),i=n(1899),o=n(1647),g=n(5981),s=n(2029),A=n(3091),C=n(5743),I=n(7475),a=n(941),u=n(904),c=n(5988).f,l=n(3610).forEach,h=n(5746),d=n(5402),f=d.set,p=d.getterFor;t.exports=function(t,e,n){var d,v=-1!==t.indexOf("Map"),y=-1!==t.indexOf("Weak"),b=v?"set":"add",m=i[t],w=m&&m.prototype,_={};if(h&&I(m)&&(y||w.forEach&&!g((function(){(new m).entries().next()})))){var x=(d=e((function(e,n){f(C(e,x),{type:t,collection:new m}),null!=n&&A(n,e[b],{that:e,AS_ENTRIES:v})}))).prototype,E=p(t);l(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(t){var e="add"==t||"set"==t;!(t in w)||y&&"clear"==t||s(x,t,(function(n,r){var i=E(this).collection;if(!e&&y&&!a(n))return"get"==t&&void 0;var o=i[t](0===n?0:n,r);return e?this:o}))})),y||c(x,"size",{configurable:!0,get:function(){return E(this).collection.size}})}else d=n.getConstructor(e,t,v,b),o.enable();return u(d,t,!1,!0),_[t]=d,r({global:!0,forced:!0},_),y||n.setStrong(d,t,v),d}},3489:(t,e,n)=>{var r=n(953),i=n(1136),o=n(9677),g=n(5988);t.exports=function(t,e,n){for(var s=i(e),A=g.f,C=o.f,I=0;I{var r=n(5981);t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},3538:t=>{t.exports=function(t,e){return{value:t,done:e}}},2029:(t,e,n)=>{var r=n(5746),i=n(5988),o=n(1887);t.exports=r?function(t,e,n){return i.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},1887:t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},5449:(t,e,n)=>{"use strict";var r=n(3894),i=n(5988),o=n(1887);t.exports=function(t,e,n){var g=r(e);g in t?i.f(t,g,o(0,n)):t[g]=n}},9202:(t,e,n)=>{var r=n(5988);t.exports=function(t,e,n){return r.f(t,e,n)}},5929:(t,e,n)=>{var r=n(2029);t.exports=function(t,e,n,i){return i&&i.enumerable?t[e]=n:r(t,e,n),t}},4380:(t,e,n)=>{var r=n(5929);t.exports=function(t,e,n){for(var i in e)n&&n.unsafe&&t[i]?t[i]=e[i]:r(t,i,e[i],n);return t}},5609:(t,e,n)=>{var r=n(1899),i=Object.defineProperty;t.exports=function(t,e){try{i(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},5746:(t,e,n)=>{var r=n(5981);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},6616:t=>{var e="object"==typeof document&&document.all,n=void 0===e&&void 0!==e;t.exports={all:e,IS_HTMLDDA:n}},1333:(t,e,n)=>{var r=n(1899),i=n(941),o=r.document,g=i(o)&&i(o.createElement);t.exports=function(t){return g?o.createElement(t):{}}},6796:t=>{var e=TypeError;t.exports=function(t){if(t>9007199254740991)throw e("Maximum allowed index exceeded");return t}},3281:t=>{t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},3321:(t,e,n)=>{var r=n(8501),i=n(6049);t.exports=!r&&!i&&"object"==typeof window&&"object"==typeof document},6491:t=>{t.exports="function"==typeof Bun&&Bun&&"string"==typeof Bun.version},8501:t=>{t.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},4470:(t,e,n)=>{var r=n(2861);t.exports=/ipad|iphone|ipod/i.test(r)&&"undefined"!=typeof Pebble},2749:(t,e,n)=>{var r=n(2861);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},6049:(t,e,n)=>{var r=n(2532);t.exports="undefined"!=typeof process&&"process"==r(process)},8045:(t,e,n)=>{var r=n(2861);t.exports=/web0s(?!.*chrome)/i.test(r)},2861:t=>{t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},3385:(t,e,n)=>{var r,i,o=n(1899),g=n(2861),s=o.process,A=o.Deno,C=s&&s.versions||A&&A.version,I=C&&C.v8;I&&(i=(r=I.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&g&&(!(r=g.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=g.match(/Chrome\/(\d+)/))&&(i=+r[1]),t.exports=i},5703:(t,e,n)=>{var r=n(4058);t.exports=function(t){return r[t+"Prototype"]}},6759:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},3995:(t,e,n)=>{var r=n(5329),i=Error,o=r("".replace),g=String(i("zxcasd").stack),s=/\n\s*at [^:]*:[^\n]*/,A=s.test(g);t.exports=function(t,e){if(A&&"string"==typeof t&&!i.prepareStackTrace)for(;e--;)t=o(t,s,"");return t}},9585:(t,e,n)=>{var r=n(2029),i=n(3995),o=n(8780),g=Error.captureStackTrace;t.exports=function(t,e,n,s){o&&(g?g(t,e):r(t,"stack",i(n,s)))}},8780:(t,e,n)=>{var r=n(5981),i=n(1887);t.exports=!r((function(){var t=Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",i(1,7)),7!==t.stack)}))},6887:(t,e,n)=>{"use strict";var r=n(1899),i=n(9730),o=n(7484),g=n(7475),s=n(9677).f,A=n(7252),C=n(4058),I=n(6843),a=n(2029),u=n(953),c=function(t){var e=function(n,r,o){if(this instanceof e){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,r)}return new t(n,r,o)}return i(t,this,arguments)};return e.prototype=t.prototype,e};t.exports=function(t,e){var n,i,l,h,d,f,p,v,y,b=t.target,m=t.global,w=t.stat,_=t.proto,x=m?r:w?r[b]:(r[b]||{}).prototype,E=m?C:C[b]||a(C,b,{})[b],O=E.prototype;for(h in e)i=!(n=A(m?h:b+(w?".":"#")+h,t.forced))&&x&&u(x,h),f=E[h],i&&(p=t.dontCallGetSet?(y=s(x,h))&&y.value:x[h]),d=i&&p?p:e[h],i&&typeof f==typeof d||(v=t.bind&&i?I(d,r):t.wrap&&i?c(d):_&&g(d)?o(d):d,(t.sham||d&&d.sham||f&&f.sham)&&a(v,"sham",!0),a(E,h,v),_&&(u(C,l=b+"Prototype")||a(C,l,{}),a(C[l],h,d),t.real&&O&&(n||!O[h])&&a(O,h,d)))}},5981:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},5602:(t,e,n)=>{var r=n(5981);t.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},9730:(t,e,n)=>{var r=n(8285),i=Function.prototype,o=i.apply,g=i.call;t.exports="object"==typeof Reflect&&Reflect.apply||(r?g.bind(o):function(){return g.apply(o,arguments)})},6843:(t,e,n)=>{var r=n(7484),i=n(4883),o=n(8285),g=r(r.bind);t.exports=function(t,e){return i(t),void 0===e?t:o?g(t,e):function(){return t.apply(e,arguments)}}},8285:(t,e,n)=>{var r=n(5981);t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},8834:(t,e,n)=>{var r=n(8285),i=Function.prototype.call;t.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},9417:(t,e,n)=>{var r=n(5746),i=n(953),o=Function.prototype,g=r&&Object.getOwnPropertyDescriptor,s=i(o,"name"),A=s&&"something"===function(){}.name,C=s&&(!r||r&&g(o,"name").configurable);t.exports={EXISTS:s,PROPER:A,CONFIGURABLE:C}},5526:(t,e,n)=>{var r=n(5329),i=n(4883);t.exports=function(t,e,n){try{return r(i(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(t){}}},7484:(t,e,n)=>{var r=n(2532),i=n(5329);t.exports=function(t){if("Function"===r(t))return i(t)}},5329:(t,e,n)=>{var r=n(8285),i=Function.prototype,o=i.call,g=r&&i.bind.bind(o,o);t.exports=r?g:function(t){return function(){return o.apply(t,arguments)}}},626:(t,e,n)=>{var r=n(4058),i=n(1899),o=n(7475),g=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?g(r[t])||g(i[t]):r[t]&&r[t][e]||i[t]&&i[t][e]}},2902:(t,e,n)=>{var r=n(9697),i=n(4229),o=n(2119),g=n(2077),s=n(9813)("iterator");t.exports=function(t){if(!o(t))return i(t,s)||i(t,"@@iterator")||g[r(t)]}},3476:(t,e,n)=>{var r=n(8834),i=n(4883),o=n(6059),g=n(9826),s=n(2902),A=TypeError;t.exports=function(t,e){var n=arguments.length<2?s(t):e;if(i(n))return o(r(n,t));throw A(g(t)+" is not iterable")}},3323:(t,e,n)=>{var r=n(5329),i=n(1052),o=n(7475),g=n(2532),s=n(5803),A=r([].push);t.exports=function(t){if(o(t))return t;if(i(t)){for(var e=t.length,n=[],r=0;r{var r=n(4883),i=n(2119);t.exports=function(t,e){var n=t[e];return i(n)?void 0:r(n)}},1899:function(t,e,n){var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||this||Function("return this")()},953:(t,e,n)=>{var r=n(5329),i=n(9678),o=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(i(t),e)}},7748:t=>{t.exports={}},4845:t=>{t.exports=function(t,e){try{1==arguments.length?console.error(t):console.error(t,e)}catch(t){}}},5463:(t,e,n)=>{var r=n(626);t.exports=r("document","documentElement")},2840:(t,e,n)=>{var r=n(5746),i=n(5981),o=n(1333);t.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},7026:(t,e,n)=>{var r=n(5329),i=n(5981),o=n(2532),g=Object,s=r("".split);t.exports=i((function(){return!g("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?s(t,""):g(t)}:g},1302:(t,e,n)=>{var r=n(5329),i=n(7475),o=n(3030),g=r(Function.toString);i(o.inspectSource)||(o.inspectSource=function(t){return g(t)}),t.exports=o.inspectSource},3794:(t,e,n)=>{var r=n(941),i=n(2029);t.exports=function(t,e){r(e)&&"cause"in e&&i(t,"cause",e.cause)}},1647:(t,e,n)=>{var r=n(6887),i=n(5329),o=n(7748),g=n(941),s=n(953),A=n(5988).f,C=n(946),I=n(684),a=n(1584),u=n(9418),c=n(5602),l=!1,h=u("meta"),d=0,f=function(t){A(t,h,{value:{objectID:"O"+d++,weakData:{}}})},p=t.exports={enable:function(){p.enable=function(){},l=!0;var t=C.f,e=i([].splice),n={};n[h]=1,t(n).length&&(C.f=function(n){for(var r=t(n),i=0,o=r.length;i{var r,i,o,g=n(7093),s=n(1899),A=n(941),C=n(2029),I=n(953),a=n(3030),u=n(4262),c=n(7748),l="Object already initialized",h=s.TypeError,d=s.WeakMap;if(g||a.state){var f=a.state||(a.state=new d);f.get=f.get,f.has=f.has,f.set=f.set,r=function(t,e){if(f.has(t))throw h(l);return e.facade=t,f.set(t,e),e},i=function(t){return f.get(t)||{}},o=function(t){return f.has(t)}}else{var p=u("state");c[p]=!0,r=function(t,e){if(I(t,p))throw h(l);return e.facade=t,C(t,p,e),e},i=function(t){return I(t,p)?t[p]:{}},o=function(t){return I(t,p)}}t.exports={set:r,get:i,has:o,enforce:function(t){return o(t)?i(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!A(e)||(n=i(e)).type!==t)throw h("Incompatible receiver, "+t+" required");return n}}}},6782:(t,e,n)=>{var r=n(9813),i=n(2077),o=r("iterator"),g=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||g[o]===t)}},1052:(t,e,n)=>{var r=n(2532);t.exports=Array.isArray||function(t){return"Array"==r(t)}},7475:(t,e,n)=>{var r=n(6616),i=r.all;t.exports=r.IS_HTMLDDA?function(t){return"function"==typeof t||t===i}:function(t){return"function"==typeof t}},4284:(t,e,n)=>{var r=n(5329),i=n(5981),o=n(7475),g=n(9697),s=n(626),A=n(1302),C=function(){},I=[],a=s("Reflect","construct"),u=/^\s*(?:class|function)\b/,c=r(u.exec),l=!u.exec(C),h=function(t){if(!o(t))return!1;try{return a(C,I,t),!0}catch(t){return!1}},d=function(t){if(!o(t))return!1;switch(g(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return l||!!c(u,A(t))}catch(t){return!0}};d.sham=!0,t.exports=!a||i((function(){var t;return h(h.call)||!h(Object)||!h((function(){t=!0}))||t}))?d:h},7252:(t,e,n)=>{var r=n(5981),i=n(7475),o=/#|\.prototype\./,g=function(t,e){var n=A[s(t)];return n==I||n!=C&&(i(e)?r(e):!!e)},s=g.normalize=function(t){return String(t).replace(o,".").toLowerCase()},A=g.data={},C=g.NATIVE="N",I=g.POLYFILL="P";t.exports=g},2119:t=>{t.exports=function(t){return null==t}},941:(t,e,n)=>{var r=n(7475),i=n(6616),o=i.all;t.exports=i.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:r(t)||t===o}:function(t){return"object"==typeof t?null!==t:r(t)}},2529:t=>{t.exports=!0},6664:(t,e,n)=>{var r=n(626),i=n(7475),o=n(7046),g=n(2302),s=Object;t.exports=g?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return i(e)&&o(e.prototype,s(t))}},3091:(t,e,n)=>{var r=n(6843),i=n(8834),o=n(6059),g=n(9826),s=n(6782),A=n(623),C=n(7046),I=n(3476),a=n(2902),u=n(7609),c=TypeError,l=function(t,e){this.stopped=t,this.result=e},h=l.prototype;t.exports=function(t,e,n){var d,f,p,v,y,b,m,w=n&&n.that,_=!(!n||!n.AS_ENTRIES),x=!(!n||!n.IS_RECORD),E=!(!n||!n.IS_ITERATOR),O=!(!n||!n.INTERRUPTED),k=r(e,w),T=function(t){return d&&u(d,"normal",t),new l(!0,t)},S=function(t){return _?(o(t),O?k(t[0],t[1],T):k(t[0],t[1])):O?k(t,T):k(t)};if(x)d=t.iterator;else if(E)d=t;else{if(!(f=a(t)))throw c(g(t)+" is not iterable");if(s(f)){for(p=0,v=A(t);v>p;p++)if((y=S(t[p]))&&C(h,y))return y;return new l(!1)}d=I(t,f)}for(b=x?t.next:d.next;!(m=i(b,d)).done;){try{y=S(m.value)}catch(t){u(d,"throw",t)}if("object"==typeof y&&y&&C(h,y))return y}return new l(!1)}},7609:(t,e,n)=>{var r=n(8834),i=n(6059),o=n(4229);t.exports=function(t,e,n){var g,s;i(t);try{if(!(g=o(t,"return"))){if("throw"===e)throw n;return n}g=r(g,t)}catch(t){s=!0,g=t}if("throw"===e)throw n;if(s)throw g;return i(g),n}},3847:(t,e,n)=>{"use strict";var r=n(5143).IteratorPrototype,i=n(9290),o=n(1887),g=n(904),s=n(2077),A=function(){return this};t.exports=function(t,e,n,C){var I=e+" Iterator";return t.prototype=i(r,{next:o(+!C,n)}),g(t,I,!1,!0),s[I]=A,t}},5105:(t,e,n)=>{"use strict";var r=n(6887),i=n(8834),o=n(2529),g=n(9417),s=n(7475),A=n(3847),C=n(249),I=n(8929),a=n(904),u=n(2029),c=n(5929),l=n(9813),h=n(2077),d=n(5143),f=g.PROPER,p=g.CONFIGURABLE,v=d.IteratorPrototype,y=d.BUGGY_SAFARI_ITERATORS,b=l("iterator"),m="keys",w="values",_="entries",x=function(){return this};t.exports=function(t,e,n,g,l,d,E){A(n,e,g);var O,k,T,S=function(t){if(t===l&&M)return M;if(!y&&t in R)return R[t];switch(t){case m:case w:case _:return function(){return new n(this,t)}}return function(){return new n(this)}},P=e+" Iterator",N=!1,R=t.prototype,D=R[b]||R["@@iterator"]||l&&R[l],M=!y&&D||S(l),j="Array"==e&&R.entries||D;if(j&&(O=C(j.call(new t)))!==Object.prototype&&O.next&&(o||C(O)===v||(I?I(O,v):s(O[b])||c(O,b,x)),a(O,P,!0,!0),o&&(h[P]=x)),f&&l==w&&D&&D.name!==w&&(!o&&p?u(R,"name",w):(N=!0,M=function(){return i(D,this)})),l)if(k={values:S(w),keys:d?M:S(m),entries:S(_)},E)for(T in k)(y||N||!(T in R))&&c(R,T,k[T]);else r({target:e,proto:!0,forced:y||N},k);return o&&!E||R[b]===M||c(R,b,M,{name:l}),h[e]=M,k}},5143:(t,e,n)=>{"use strict";var r,i,o,g=n(5981),s=n(7475),A=n(941),C=n(9290),I=n(249),a=n(5929),u=n(9813),c=n(2529),l=u("iterator"),h=!1;[].keys&&("next"in(o=[].keys())?(i=I(I(o)))!==Object.prototype&&(r=i):h=!0),!A(r)||g((function(){var t={};return r[l].call(t)!==t}))?r={}:c&&(r=C(r)),s(r[l])||a(r,l,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:h}},2077:t=>{t.exports={}},623:(t,e,n)=>{var r=n(3057);t.exports=function(t){return r(t.length)}},5331:t=>{var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var r=+t;return(r>0?n:e)(r)}},6132:(t,e,n)=>{var r,i,o,g,s,A=n(1899),C=n(6843),I=n(9677).f,a=n(2941).set,u=n(8397),c=n(2749),l=n(4470),h=n(8045),d=n(6049),f=A.MutationObserver||A.WebKitMutationObserver,p=A.document,v=A.process,y=A.Promise,b=I(A,"queueMicrotask"),m=b&&b.value;if(!m){var w=new u,_=function(){var t,e;for(d&&(t=v.domain)&&t.exit();e=w.get();)try{e()}catch(t){throw w.head&&r(),t}t&&t.enter()};c||d||h||!f||!p?!l&&y&&y.resolve?((g=y.resolve(void 0)).constructor=y,s=C(g.then,g),r=function(){s(_)}):d?r=function(){v.nextTick(_)}:(a=C(a,A),r=function(){a(_)}):(i=!0,o=p.createTextNode(""),new f(_).observe(o,{characterData:!0}),r=function(){o.data=i=!i}),m=function(t){w.head||r(),w.add(t)}}t.exports=m},9520:(t,e,n)=>{"use strict";var r=n(4883),i=TypeError,o=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw i("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)};t.exports.f=function(t){return new o(t)}},4649:(t,e,n)=>{var r=n(5803);t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:r(t)}},9290:(t,e,n)=>{var r,i=n(6059),o=n(9938),g=n(6759),s=n(7748),A=n(5463),C=n(1333),I=n(4262),a="prototype",u="script",c=I("IE_PROTO"),l=function(){},h=function(t){return"<"+u+">"+t+""},d=function(t){t.write(h("")),t.close();var e=t.parentWindow.Object;return t=null,e},f=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;f="undefined"!=typeof document?document.domain&&r?d(r):(e=C("iframe"),n="java"+u+":",e.style.display="none",A.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(h("document.F=Object")),t.close(),t.F):d(r);for(var i=g.length;i--;)delete f[a][g[i]];return f()};s[c]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(l[a]=i(t),n=new l,l[a]=null,n[c]=t):n=f(),void 0===e?n:o.f(n,e)}},9938:(t,e,n)=>{var r=n(5746),i=n(3937),o=n(5988),g=n(6059),s=n(4529),A=n(4771);e.f=r&&!i?Object.defineProperties:function(t,e){g(t);for(var n,r=s(e),i=A(e),C=i.length,I=0;C>I;)o.f(t,n=i[I++],r[n]);return t}},5988:(t,e,n)=>{var r=n(5746),i=n(2840),o=n(3937),g=n(6059),s=n(3894),A=TypeError,C=Object.defineProperty,I=Object.getOwnPropertyDescriptor,a="enumerable",u="configurable",c="writable";e.f=r?o?function(t,e,n){if(g(t),e=s(e),g(n),"function"==typeof t&&"prototype"===e&&"value"in n&&c in n&&!n[c]){var r=I(t,e);r&&r[c]&&(t[e]=n.value,n={configurable:u in n?n[u]:r[u],enumerable:a in n?n[a]:r[a],writable:!1})}return C(t,e,n)}:C:function(t,e,n){if(g(t),e=s(e),g(n),i)try{return C(t,e,n)}catch(t){}if("get"in n||"set"in n)throw A("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},9677:(t,e,n)=>{var r=n(5746),i=n(8834),o=n(6760),g=n(1887),s=n(4529),A=n(3894),C=n(953),I=n(2840),a=Object.getOwnPropertyDescriptor;e.f=r?a:function(t,e){if(t=s(t),e=A(e),I)try{return a(t,e)}catch(t){}if(C(t,e))return g(!i(o.f,t,e),t[e])}},684:(t,e,n)=>{var r=n(2532),i=n(4529),o=n(946).f,g=n(5790),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return s&&"Window"==r(t)?function(t){try{return o(t)}catch(t){return g(s)}}(t):o(i(t))}},946:(t,e,n)=>{var r=n(5629),i=n(6759).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},7857:(t,e)=>{e.f=Object.getOwnPropertySymbols},249:(t,e,n)=>{var r=n(953),i=n(7475),o=n(9678),g=n(4262),s=n(4160),A=g("IE_PROTO"),C=Object,I=C.prototype;t.exports=s?C.getPrototypeOf:function(t){var e=o(t);if(r(e,A))return e[A];var n=e.constructor;return i(n)&&e instanceof n?n.prototype:e instanceof C?I:null}},1584:(t,e,n)=>{var r=n(5981),i=n(941),o=n(2532),g=n(7135),s=Object.isExtensible,A=r((function(){s(1)}));t.exports=A||g?function(t){return!!i(t)&&(!g||"ArrayBuffer"!=o(t))&&(!s||s(t))}:s},7046:(t,e,n)=>{var r=n(5329);t.exports=r({}.isPrototypeOf)},5629:(t,e,n)=>{var r=n(5329),i=n(953),o=n(4529),g=n(1692).indexOf,s=n(7748),A=r([].push);t.exports=function(t,e){var n,r=o(t),C=0,I=[];for(n in r)!i(s,n)&&i(r,n)&&A(I,n);for(;e.length>C;)i(r,n=e[C++])&&(~g(I,n)||A(I,n));return I}},4771:(t,e,n)=>{var r=n(5629),i=n(6759);t.exports=Object.keys||function(t){return r(t,i)}},6760:(t,e)=>{"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);e.f=i?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},8929:(t,e,n)=>{var r=n(5526),i=n(6059),o=n(1851);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=r(Object.prototype,"__proto__","set"))(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return i(n),o(r),e?t(n,r):n.__proto__=r,n}}():void 0)},8810:(t,e,n)=>{var r=n(5746),i=n(5329),o=n(4771),g=n(4529),s=i(n(6760).f),A=i([].push),C=function(t){return function(e){for(var n,i=g(e),C=o(i),I=C.length,a=0,u=[];I>a;)n=C[a++],r&&!s(i,n)||A(u,t?[n,i[n]]:i[n]);return u}};t.exports={entries:C(!0),values:C(!1)}},5623:(t,e,n)=>{"use strict";var r=n(2885),i=n(9697);t.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},9811:(t,e,n)=>{var r=n(8834),i=n(7475),o=n(941),g=TypeError;t.exports=function(t,e){var n,s;if("string"===e&&i(n=t.toString)&&!o(s=r(n,t)))return s;if(i(n=t.valueOf)&&!o(s=r(n,t)))return s;if("string"!==e&&i(n=t.toString)&&!o(s=r(n,t)))return s;throw g("Can't convert object to primitive value")}},1136:(t,e,n)=>{var r=n(626),i=n(5329),o=n(946),g=n(7857),s=n(6059),A=i([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=o.f(s(t)),n=g.f;return n?A(e,n(t)):e}},4058:t=>{t.exports={}},2:t=>{t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},7742:(t,e,n)=>{var r=n(1899),i=n(6991),o=n(7475),g=n(7252),s=n(1302),A=n(9813),C=n(3321),I=n(8501),a=n(2529),u=n(3385),c=i&&i.prototype,l=A("species"),h=!1,d=o(r.PromiseRejectionEvent),f=g("Promise",(function(){var t=s(i),e=t!==String(i);if(!e&&66===u)return!0;if(a&&(!c.catch||!c.finally))return!0;if(!u||u<51||!/native code/.test(t)){var n=new i((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};if((n.constructor={})[l]=r,!(h=n.then((function(){}))instanceof r))return!0}return!e&&(C||I)&&!d}));t.exports={CONSTRUCTOR:f,REJECTION_EVENT:d,SUBCLASSING:h}},6991:(t,e,n)=>{var r=n(1899);t.exports=r.Promise},6584:(t,e,n)=>{var r=n(6059),i=n(941),o=n(9520);t.exports=function(t,e){if(r(t),i(e)&&e.constructor===t)return e;var n=o.f(t);return(0,n.resolve)(e),n.promise}},1542:(t,e,n)=>{var r=n(6991),i=n(1385),o=n(7742).CONSTRUCTOR;t.exports=o||!i((function(t){r.all(t).then(void 0,(function(){}))}))},8397:t=>{var e=function(){this.head=null,this.tail=null};e.prototype={add:function(t){var e={item:t,next:null},n=this.tail;n?n.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}},t.exports=e},8219:(t,e,n)=>{var r=n(2119),i=TypeError;t.exports=function(t){if(r(t))throw i("Can't call method on "+t);return t}},7620:(t,e,n)=>{"use strict";var r,i=n(1899),o=n(9730),g=n(7475),s=n(6491),A=n(2861),C=n(3765),I=n(8348),a=i.Function,u=/MSIE .\./.test(A)||s&&((r=i.Bun.version.split(".")).length<3||0==r[0]&&(r[1]<3||3==r[1]&&0==r[2]));t.exports=function(t,e){var n=e?2:1;return u?function(r,i){var s=I(arguments.length,1)>n,A=g(r)?r:a(r),u=s?C(arguments,n):[],c=s?function(){o(A,this,u)}:A;return e?t(c,i):t(c)}:t}},4431:(t,e,n)=>{"use strict";var r=n(626),i=n(9202),o=n(9813),g=n(5746),s=o("species");t.exports=function(t){var e=r(t);g&&e&&!e[s]&&i(e,s,{configurable:!0,get:function(){return this}})}},904:(t,e,n)=>{var r=n(2885),i=n(5988).f,o=n(2029),g=n(953),s=n(5623),A=n(9813)("toStringTag");t.exports=function(t,e,n,C){if(t){var I=n?t:t.prototype;g(I,A)||i(I,A,{configurable:!0,value:e}),C&&!r&&o(I,"toString",s)}}},4262:(t,e,n)=>{var r=n(8726),i=n(9418),o=r("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},3030:(t,e,n)=>{var r=n(1899),i=n(5609),o="__core-js_shared__",g=r[o]||i(o,{});t.exports=g},8726:(t,e,n)=>{var r=n(2529),i=n(3030);(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.30.2",mode:r?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.2/LICENSE",source:"https://github.com/zloirock/core-js"})},487:(t,e,n)=>{var r=n(6059),i=n(174),o=n(2119),g=n(9813)("species");t.exports=function(t,e){var n,s=r(t).constructor;return void 0===s||o(n=r(s)[g])?e:i(n)}},4620:(t,e,n)=>{var r=n(5329),i=n(2435),o=n(5803),g=n(8219),s=r("".charAt),A=r("".charCodeAt),C=r("".slice),I=function(t){return function(e,n){var r,I,a=o(g(e)),u=i(n),c=a.length;return u<0||u>=c?t?"":void 0:(r=A(a,u))<55296||r>56319||u+1===c||(I=A(a,u+1))<56320||I>57343?t?s(a,u):r:t?C(a,u,u+2):I-56320+(r-55296<<10)+65536}};t.exports={codeAt:I(!1),charAt:I(!0)}},3405:(t,e,n)=>{var r=n(3385),i=n(5981),o=n(1899).String;t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol();return!o(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},9630:(t,e,n)=>{var r=n(8834),i=n(626),o=n(9813),g=n(5929);t.exports=function(){var t=i("Symbol"),e=t&&t.prototype,n=e&&e.valueOf,s=o("toPrimitive");e&&!e[s]&&g(e,s,(function(t){return r(n,this)}),{arity:1})}},4680:(t,e,n)=>{var r=n(3405);t.exports=r&&!!Symbol.for&&!!Symbol.keyFor},2941:(t,e,n)=>{var r,i,o,g,s=n(1899),A=n(9730),C=n(6843),I=n(7475),a=n(953),u=n(5981),c=n(5463),l=n(3765),h=n(1333),d=n(8348),f=n(2749),p=n(6049),v=s.setImmediate,y=s.clearImmediate,b=s.process,m=s.Dispatch,w=s.Function,_=s.MessageChannel,x=s.String,E=0,O={},k="onreadystatechange";u((function(){r=s.location}));var T=function(t){if(a(O,t)){var e=O[t];delete O[t],e()}},S=function(t){return function(){T(t)}},P=function(t){T(t.data)},N=function(t){s.postMessage(x(t),r.protocol+"//"+r.host)};v&&y||(v=function(t){d(arguments.length,1);var e=I(t)?t:w(t),n=l(arguments,1);return O[++E]=function(){A(e,void 0,n)},i(E),E},y=function(t){delete O[t]},p?i=function(t){b.nextTick(S(t))}:m&&m.now?i=function(t){m.now(S(t))}:_&&!f?(g=(o=new _).port2,o.port1.onmessage=P,i=C(g.postMessage,g)):s.addEventListener&&I(s.postMessage)&&!s.importScripts&&r&&"file:"!==r.protocol&&!u(N)?(i=N,s.addEventListener("message",P,!1)):i=k in h("script")?function(t){c.appendChild(h("script"))[k]=function(){c.removeChild(this),T(t)}}:function(t){setTimeout(S(t),0)}),t.exports={set:v,clear:y}},9413:(t,e,n)=>{var r=n(2435),i=Math.max,o=Math.min;t.exports=function(t,e){var n=r(t);return n<0?i(n+e,0):o(n,e)}},4529:(t,e,n)=>{var r=n(7026),i=n(8219);t.exports=function(t){return r(i(t))}},2435:(t,e,n)=>{var r=n(5331);t.exports=function(t){var e=+t;return e!=e||0===e?0:r(e)}},3057:(t,e,n)=>{var r=n(2435),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},9678:(t,e,n)=>{var r=n(8219),i=Object;t.exports=function(t){return i(r(t))}},6935:(t,e,n)=>{var r=n(8834),i=n(941),o=n(6664),g=n(4229),s=n(9811),A=n(9813),C=TypeError,I=A("toPrimitive");t.exports=function(t,e){if(!i(t)||o(t))return t;var n,A=g(t,I);if(A){if(void 0===e&&(e="default"),n=r(A,t,e),!i(n)||o(n))return n;throw C("Can't convert object to primitive value")}return void 0===e&&(e="number"),s(t,e)}},3894:(t,e,n)=>{var r=n(6935),i=n(6664);t.exports=function(t){var e=r(t,"string");return i(e)?e:e+""}},2885:(t,e,n)=>{var r={};r[n(9813)("toStringTag")]="z",t.exports="[object z]"===String(r)},5803:(t,e,n)=>{var r=n(9697),i=String;t.exports=function(t){if("Symbol"===r(t))throw TypeError("Cannot convert a Symbol value to a string");return i(t)}},9826:t=>{var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},9418:(t,e,n)=>{var r=n(5329),i=0,o=Math.random(),g=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+g(++i+o,36)}},2302:(t,e,n)=>{var r=n(3405);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3937:(t,e,n)=>{var r=n(5746),i=n(5981);t.exports=r&&i((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},8348:t=>{var e=TypeError;t.exports=function(t,n){if(t{var r=n(1899),i=n(7475),o=r.WeakMap;t.exports=i(o)&&/native code/.test(String(o))},3464:(t,e,n)=>{var r=n(4058),i=n(953),o=n(1477),g=n(5988).f;t.exports=function(t){var e=r.Symbol||(r.Symbol={});i(e,t)||g(e,t,{value:o.f(t)})}},1477:(t,e,n)=>{var r=n(9813);e.f=r},9813:(t,e,n)=>{var r=n(1899),i=n(8726),o=n(953),g=n(9418),s=n(3405),A=n(2302),C=r.Symbol,I=i("wks"),a=A?C.for||C:C&&C.withoutSetter||g;t.exports=function(t){return o(I,t)||(I[t]=s&&o(C,t)?C[t]:a("Symbol."+t)),I[t]}},9812:(t,e,n)=>{"use strict";var r=n(6887),i=n(7046),o=n(249),g=n(8929),s=n(3489),A=n(9290),C=n(2029),I=n(1887),a=n(3794),u=n(9585),c=n(3091),l=n(4649),h=n(9813)("toStringTag"),d=Error,f=[].push,p=function(t,e){var n,r=i(v,this);g?n=g(d(),r?o(this):v):(n=r?this:A(v),C(n,h,"Error")),void 0!==e&&C(n,"message",l(e)),u(n,p,n.stack,1),arguments.length>2&&a(n,arguments[2]);var s=[];return c(t,f,{that:s}),C(n,"errors",s),n};g?g(p,d):s(p,d,{name:!0});var v=p.prototype=A(d.prototype,{constructor:I(1,p),message:I(1,""),name:I(1,"AggregateError")});r({global:!0,constructor:!0,arity:2},{AggregateError:p})},7627:(t,e,n)=>{n(9812)},5906:(t,e,n)=>{"use strict";var r=n(6887),i=n(5981),o=n(1052),g=n(941),s=n(9678),A=n(623),C=n(6796),I=n(5449),a=n(4692),u=n(568),c=n(9813),l=n(3385),h=c("isConcatSpreadable"),d=l>=51||!i((function(){var t=[];return t[h]=!1,t.concat()[0]!==t})),f=function(t){if(!g(t))return!1;var e=t[h];return void 0!==e?!!e:o(t)};r({target:"Array",proto:!0,arity:1,forced:!d||!u("concat")},{concat:function(t){var e,n,r,i,o,g=s(this),u=a(g,0),c=0;for(e=-1,r=arguments.length;e{"use strict";var r=n(6887),i=n(6837);r({target:"Array",proto:!0,forced:[].forEach!=i},{forEach:i})},2988:(t,e,n)=>{n(6887)({target:"Array",stat:!0},{isArray:n(1052)})},6274:(t,e,n)=>{"use strict";var r=n(4529),i=n(8479),o=n(2077),g=n(5402),s=n(5988).f,A=n(5105),C=n(3538),I=n(2529),a=n(5746),u="Array Iterator",c=g.set,l=g.getterFor(u);t.exports=A(Array,"Array",(function(t,e){c(this,{type:u,target:r(t),index:0,kind:e})}),(function(){var t=l(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,C(void 0,!0)):C("keys"==n?r:"values"==n?e[r]:[r,e[r]],!1)}),"values");var h=o.Arguments=o.Array;if(i("keys"),i("values"),i("entries"),!I&&a&&"values"!==h.name)try{s(h,"name",{value:"values"})}catch(t){}},8787:(t,e,n)=>{"use strict";var r=n(6887),i=n(3610).map;r({target:"Array",proto:!0,forced:!n(568)("map")},{map:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},1876:(t,e,n)=>{"use strict";var r=n(6887),i=n(6499).left,o=n(4194),g=n(3385);r({target:"Array",proto:!0,forced:!n(6049)&&g>79&&g<83||!o("reduce")},{reduce:function(t){var e=arguments.length;return i(this,t,e,e>1?arguments[1]:void 0)}})},8084:()=>{},2619:(t,e,n)=>{var r=n(6887),i=n(626),o=n(9730),g=n(8834),s=n(5329),A=n(5981),C=n(7475),I=n(6664),a=n(3765),u=n(3323),c=n(3405),l=String,h=i("JSON","stringify"),d=s(/./.exec),f=s("".charAt),p=s("".charCodeAt),v=s("".replace),y=s(1..toString),b=/[\uD800-\uDFFF]/g,m=/^[\uD800-\uDBFF]$/,w=/^[\uDC00-\uDFFF]$/,_=!c||A((function(){var t=i("Symbol")();return"[null]"!=h([t])||"{}"!=h({a:t})||"{}"!=h(Object(t))})),x=A((function(){return'"\\udf06\\ud834"'!==h("\udf06\ud834")||'"\\udead"'!==h("\udead")})),E=function(t,e){var n=a(arguments),r=u(e);if(C(r)||void 0!==t&&!I(t))return n[1]=function(t,e){if(C(r)&&(e=g(r,this,l(t),e)),!I(e))return e},o(h,null,n)},O=function(t,e,n){var r=f(n,e-1),i=f(n,e+1);return d(m,t)&&!d(w,i)||d(w,t)&&!d(m,r)?"\\u"+y(p(t,0),16):t};h&&r({target:"JSON",stat:!0,arity:3,forced:_||x},{stringify:function(t,e,n){var r=a(arguments),i=o(_?E:h,null,r);return x&&"string"==typeof i?v(i,b,O):i}})},9120:(t,e,n)=>{var r=n(1899);n(904)(r.JSON,"JSON",!0)},5327:()=>{},6450:(t,e,n)=>{var r=n(6887),i=n(5746),o=n(5988).f;r({target:"Object",stat:!0,forced:Object.defineProperty!==o,sham:!i},{defineProperty:o})},1078:(t,e,n)=>{var r=n(6887),i=n(8810).entries;r({target:"Object",stat:!0},{entries:function(t){return i(t)}})},7144:(t,e,n)=>{var r=n(6887),i=n(3405),o=n(5981),g=n(7857),s=n(9678);r({target:"Object",stat:!0,forced:!i||o((function(){g.f(1)}))},{getOwnPropertySymbols:function(t){var e=g.f;return e?e(s(t)):[]}})},1724:(t,e,n)=>{var r=n(6887),i=n(9678),o=n(4771);r({target:"Object",stat:!0,forced:n(5981)((function(){o(1)}))},{keys:function(t){return o(i(t))}})},5967:()=>{},4560:(t,e,n)=>{"use strict";var r=n(6887),i=n(8834),o=n(4883),g=n(9520),s=n(2),A=n(3091);r({target:"Promise",stat:!0,forced:n(1542)},{allSettled:function(t){var e=this,n=g.f(e),r=n.resolve,C=n.reject,I=s((function(){var n=o(e.resolve),g=[],s=0,C=1;A(t,(function(t){var o=s++,A=!1;C++,i(n,e,t).then((function(t){A||(A=!0,g[o]={status:"fulfilled",value:t},--C||r(g))}),(function(t){A||(A=!0,g[o]={status:"rejected",reason:t},--C||r(g))}))})),--C||r(g)}));return I.error&&C(I.value),n.promise}})},6890:(t,e,n)=>{"use strict";var r=n(6887),i=n(8834),o=n(4883),g=n(9520),s=n(2),A=n(3091);r({target:"Promise",stat:!0,forced:n(1542)},{all:function(t){var e=this,n=g.f(e),r=n.resolve,C=n.reject,I=s((function(){var n=o(e.resolve),g=[],s=0,I=1;A(t,(function(t){var o=s++,A=!1;I++,i(n,e,t).then((function(t){A||(A=!0,g[o]=t,--I||r(g))}),C)})),--I||r(g)}));return I.error&&C(I.value),n.promise}})},7206:(t,e,n)=>{"use strict";var r=n(6887),i=n(8834),o=n(4883),g=n(626),s=n(9520),A=n(2),C=n(3091),I=n(1542),a="No one promise resolved";r({target:"Promise",stat:!0,forced:I},{any:function(t){var e=this,n=g("AggregateError"),r=s.f(e),I=r.resolve,u=r.reject,c=A((function(){var r=o(e.resolve),g=[],s=0,A=1,c=!1;C(t,(function(t){var o=s++,C=!1;A++,i(r,e,t).then((function(t){C||c||(c=!0,I(t))}),(function(t){C||c||(C=!0,g[o]=t,--A||u(new n(g,a)))}))})),--A||u(new n(g,a))}));return c.error&&u(c.value),r.promise}})},3376:(t,e,n)=>{"use strict";var r=n(6887),i=n(2529),o=n(7742).CONSTRUCTOR,g=n(6991),s=n(626),A=n(7475),C=n(5929),I=g&&g.prototype;if(r({target:"Promise",proto:!0,forced:o,real:!0},{catch:function(t){return this.then(void 0,t)}}),!i&&A(g)){var a=s("Promise").prototype.catch;I.catch!==a&&C(I,"catch",a,{unsafe:!0})}},6934:(t,e,n)=>{"use strict";var r,i,o,g=n(6887),s=n(2529),A=n(6049),C=n(1899),I=n(8834),a=n(5929),u=n(8929),c=n(904),l=n(4431),h=n(4883),d=n(7475),f=n(941),p=n(5743),v=n(487),y=n(2941).set,b=n(6132),m=n(4845),w=n(2),_=n(8397),x=n(5402),E=n(6991),O=n(7742),k=n(9520),T="Promise",S=O.CONSTRUCTOR,P=O.REJECTION_EVENT,N=O.SUBCLASSING,R=x.getterFor(T),D=x.set,M=E&&E.prototype,j=E,B=M,L=C.TypeError,F=C.document,z=C.process,Z=k.f,U=Z,V=!!(F&&F.createEvent&&C.dispatchEvent),G="unhandledrejection",W=function(t){var e;return!(!f(t)||!d(e=t.then))&&e},Y=function(t,e){var n,r,i,o=e.value,g=1==e.state,s=g?t.ok:t.fail,A=t.resolve,C=t.reject,a=t.domain;try{s?(g||(2===e.rejection&&q(e),e.rejection=1),!0===s?n=o:(a&&a.enter(),n=s(o),a&&(a.exit(),i=!0)),n===t.promise?C(L("Promise-chain cycle")):(r=W(n))?I(r,n,A,C):A(n)):C(o)}catch(t){a&&!i&&a.exit(),C(t)}},H=function(t,e){t.notified||(t.notified=!0,b((function(){for(var n,r=t.reactions;n=r.get();)Y(n,t);t.notified=!1,e&&!t.rejection&&Q(t)})))},K=function(t,e,n){var r,i;V?((r=F.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),C.dispatchEvent(r)):r={promise:e,reason:n},!P&&(i=C["on"+t])?i(r):t===G&&m("Unhandled promise rejection",n)},Q=function(t){I(y,C,(function(){var e,n=t.facade,r=t.value;if(X(t)&&(e=w((function(){A?z.emit("unhandledRejection",r,n):K(G,n,r)})),t.rejection=A||X(t)?2:1,e.error))throw e.value}))},X=function(t){return 1!==t.rejection&&!t.parent},q=function(t){I(y,C,(function(){var e=t.facade;A?z.emit("rejectionHandled",e):K("rejectionhandled",e,t.value)}))},J=function(t,e,n){return function(r){t(e,r,n)}},$=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,H(t,!0))},tt=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw L("Promise can't be resolved itself");var r=W(e);r?b((function(){var n={done:!1};try{I(r,e,J(tt,n,t),J($,n,t))}catch(e){$(n,e,t)}})):(t.value=e,t.state=1,H(t,!1))}catch(e){$({done:!1},e,t)}}};if(S&&(B=(j=function(t){p(this,B),h(t),I(r,this);var e=R(this);try{t(J(tt,e),J($,e))}catch(t){$(e,t)}}).prototype,(r=function(t){D(this,{type:T,done:!1,notified:!1,parent:!1,reactions:new _,rejection:!1,state:0,value:void 0})}).prototype=a(B,"then",(function(t,e){var n=R(this),r=Z(v(this,j));return n.parent=!0,r.ok=!d(t)||t,r.fail=d(e)&&e,r.domain=A?z.domain:void 0,0==n.state?n.reactions.add(r):b((function(){Y(r,n)})),r.promise})),i=function(){var t=new r,e=R(t);this.promise=t,this.resolve=J(tt,e),this.reject=J($,e)},k.f=Z=function(t){return t===j||void 0===t?new i(t):U(t)},!s&&d(E)&&M!==Object.prototype)){o=M.then,N||a(M,"then",(function(t,e){var n=this;return new j((function(t,e){I(o,n,t,e)})).then(t,e)}),{unsafe:!0});try{delete M.constructor}catch(t){}u&&u(M,B)}g({global:!0,constructor:!0,wrap:!0,forced:S},{Promise:j}),c(j,T,!1,!0),l(T)},4349:(t,e,n)=>{"use strict";var r=n(6887),i=n(2529),o=n(6991),g=n(5981),s=n(626),A=n(7475),C=n(487),I=n(6584),a=n(5929),u=o&&o.prototype;if(r({target:"Promise",proto:!0,real:!0,forced:!!o&&g((function(){u.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=C(this,s("Promise")),n=A(t);return this.then(n?function(n){return I(e,t()).then((function(){return n}))}:t,n?function(n){return I(e,t()).then((function(){throw n}))}:t)}}),!i&&A(o)){var c=s("Promise").prototype.finally;u.finally!==c&&a(u,"finally",c,{unsafe:!0})}},8881:(t,e,n)=>{n(6934),n(6890),n(3376),n(5921),n(4069),n(4482)},5921:(t,e,n)=>{"use strict";var r=n(6887),i=n(8834),o=n(4883),g=n(9520),s=n(2),A=n(3091);r({target:"Promise",stat:!0,forced:n(1542)},{race:function(t){var e=this,n=g.f(e),r=n.reject,C=s((function(){var g=o(e.resolve);A(t,(function(t){i(g,e,t).then(n.resolve,r)}))}));return C.error&&r(C.value),n.promise}})},4069:(t,e,n)=>{"use strict";var r=n(6887),i=n(8834),o=n(9520);r({target:"Promise",stat:!0,forced:n(7742).CONSTRUCTOR},{reject:function(t){var e=o.f(this);return i(e.reject,void 0,t),e.promise}})},4482:(t,e,n)=>{"use strict";var r=n(6887),i=n(626),o=n(2529),g=n(6991),s=n(7742).CONSTRUCTOR,A=n(6584),C=i("Promise"),I=o&&!s;r({target:"Promise",stat:!0,forced:o||s},{resolve:function(t){return A(I&&this===C?g:this,t)}})},1502:()=>{},7971:(t,e,n)=>{"use strict";var r=n(4620).charAt,i=n(5803),o=n(5402),g=n(5105),s=n(3538),A="String Iterator",C=o.set,I=o.getterFor(A);g(String,"String",(function(t){C(this,{type:A,string:i(t),index:0})}),(function(){var t,e=I(this),n=e.string,i=e.index;return i>=n.length?s(void 0,!0):(t=r(n,i),e.index+=t.length,s(t,!1))}))},8555:(t,e,n)=>{n(3464)("asyncIterator")},8616:(t,e,n)=>{"use strict";var r=n(6887),i=n(1899),o=n(8834),g=n(5329),s=n(2529),A=n(5746),C=n(3405),I=n(5981),a=n(953),u=n(7046),c=n(6059),l=n(4529),h=n(3894),d=n(5803),f=n(1887),p=n(9290),v=n(4771),y=n(946),b=n(684),m=n(7857),w=n(9677),_=n(5988),x=n(9938),E=n(6760),O=n(5929),k=n(9202),T=n(8726),S=n(4262),P=n(7748),N=n(9418),R=n(9813),D=n(1477),M=n(3464),j=n(9630),B=n(904),L=n(5402),F=n(3610).forEach,z=S("hidden"),Z="Symbol",U="prototype",V=L.set,G=L.getterFor(Z),W=Object[U],Y=i.Symbol,H=Y&&Y[U],K=i.TypeError,Q=i.QObject,X=w.f,q=_.f,J=b.f,$=E.f,tt=g([].push),et=T("symbols"),nt=T("op-symbols"),rt=T("wks"),it=!Q||!Q[U]||!Q[U].findChild,ot=A&&I((function(){return 7!=p(q({},"a",{get:function(){return q(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=X(W,e);r&&delete W[e],q(t,e,n),r&&t!==W&&q(W,e,r)}:q,gt=function(t,e){var n=et[t]=p(H);return V(n,{type:Z,tag:t,description:e}),A||(n.description=e),n},st=function(t,e,n){t===W&&st(nt,e,n),c(t);var r=h(e);return c(n),a(et,r)?(n.enumerable?(a(t,z)&&t[z][r]&&(t[z][r]=!1),n=p(n,{enumerable:f(0,!1)})):(a(t,z)||q(t,z,f(1,{})),t[z][r]=!0),ot(t,r,n)):q(t,r,n)},At=function(t,e){c(t);var n=l(e),r=v(n).concat(ut(n));return F(r,(function(e){A&&!o(Ct,n,e)||st(t,e,n[e])})),t},Ct=function(t){var e=h(t),n=o($,this,e);return!(this===W&&a(et,e)&&!a(nt,e))&&(!(n||!a(this,e)||!a(et,e)||a(this,z)&&this[z][e])||n)},It=function(t,e){var n=l(t),r=h(e);if(n!==W||!a(et,r)||a(nt,r)){var i=X(n,r);return!i||!a(et,r)||a(n,z)&&n[z][r]||(i.enumerable=!0),i}},at=function(t){var e=J(l(t)),n=[];return F(e,(function(t){a(et,t)||a(P,t)||tt(n,t)})),n},ut=function(t){var e=t===W,n=J(e?nt:l(t)),r=[];return F(n,(function(t){!a(et,t)||e&&!a(W,t)||tt(r,et[t])})),r};C||(O(H=(Y=function(){if(u(H,this))throw K("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?d(arguments[0]):void 0,e=N(t),n=function(t){this===W&&o(n,nt,t),a(this,z)&&a(this[z],e)&&(this[z][e]=!1),ot(this,e,f(1,t))};return A&&it&&ot(W,e,{configurable:!0,set:n}),gt(e,t)})[U],"toString",(function(){return G(this).tag})),O(Y,"withoutSetter",(function(t){return gt(N(t),t)})),E.f=Ct,_.f=st,x.f=At,w.f=It,y.f=b.f=at,m.f=ut,D.f=function(t){return gt(R(t),t)},A&&(k(H,"description",{configurable:!0,get:function(){return G(this).description}}),s||O(W,"propertyIsEnumerable",Ct,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!C,sham:!C},{Symbol:Y}),F(v(rt),(function(t){M(t)})),r({target:Z,stat:!0,forced:!C},{useSetter:function(){it=!0},useSimple:function(){it=!1}}),r({target:"Object",stat:!0,forced:!C,sham:!A},{create:function(t,e){return void 0===e?p(t):At(p(t),e)},defineProperty:st,defineProperties:At,getOwnPropertyDescriptor:It}),r({target:"Object",stat:!0,forced:!C},{getOwnPropertyNames:at}),j(),B(Y,Z),P[z]=!0},2615:()=>{},4523:(t,e,n)=>{var r=n(6887),i=n(626),o=n(953),g=n(5803),s=n(8726),A=n(4680),C=s("string-to-symbol-registry"),I=s("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!A},{for:function(t){var e=g(t);if(o(C,e))return C[e];var n=i("Symbol")(e);return C[e]=n,I[n]=e,n}})},1732:(t,e,n)=>{n(3464)("hasInstance")},5903:(t,e,n)=>{n(3464)("isConcatSpreadable")},1825:(t,e,n)=>{n(3464)("iterator")},5824:(t,e,n)=>{n(8616),n(4523),n(8608),n(2619),n(7144)},8608:(t,e,n)=>{var r=n(6887),i=n(953),o=n(6664),g=n(9826),s=n(8726),A=n(4680),C=s("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!A},{keyFor:function(t){if(!o(t))throw TypeError(g(t)+" is not a symbol");if(i(C,t))return C[t]}})},5915:(t,e,n)=>{n(3464)("matchAll")},8394:(t,e,n)=>{n(3464)("match")},1766:(t,e,n)=>{n(3464)("replace")},2737:(t,e,n)=>{n(3464)("search")},9911:(t,e,n)=>{n(3464)("species")},4315:(t,e,n)=>{n(3464)("split")},3131:(t,e,n)=>{var r=n(3464),i=n(9630);r("toPrimitive"),i()},4714:(t,e,n)=>{var r=n(626),i=n(3464),o=n(904);i("toStringTag"),o(r("Symbol"),"Symbol")},659:(t,e,n)=>{n(3464)("unscopables")},4776:(t,e,n)=>{"use strict";var r,i=n(5602),o=n(1899),g=n(5329),s=n(4380),A=n(1647),C=n(4683),I=n(8850),a=n(941),u=n(5402).enforce,c=n(5981),l=n(7093),h=Object,d=Array.isArray,f=h.isExtensible,p=h.isFrozen,v=h.isSealed,y=h.freeze,b=h.seal,m={},w={},_=!o.ActiveXObject&&"ActiveXObject"in o,x=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},E=C("WeakMap",x,I),O=E.prototype,k=g(O.set);if(l)if(_){r=I.getConstructor(x,"WeakMap",!0),A.enable();var T=g(O.delete),S=g(O.has),P=g(O.get);s(O,{delete:function(t){if(a(t)&&!f(t)){var e=u(this);return e.frozen||(e.frozen=new r),T(this,t)||e.frozen.delete(t)}return T(this,t)},has:function(t){if(a(t)&&!f(t)){var e=u(this);return e.frozen||(e.frozen=new r),S(this,t)||e.frozen.has(t)}return S(this,t)},get:function(t){if(a(t)&&!f(t)){var e=u(this);return e.frozen||(e.frozen=new r),S(this,t)?P(this,t):e.frozen.get(t)}return P(this,t)},set:function(t,e){if(a(t)&&!f(t)){var n=u(this);n.frozen||(n.frozen=new r),S(this,t)?k(this,t,e):n.frozen.set(t,e)}else k(this,t,e);return this}})}else i&&c((function(){var t=y([]);return k(new E,t,1),!p(t)}))&&s(O,{set:function(t,e){var n;return d(t)&&(p(t)?n=m:v(t)&&(n=w)),k(this,t,e),n==m&&y(t),n==w&&b(t),this}})},4334:(t,e,n)=>{n(4776)},1115:(t,e,n)=>{"use strict";n(4683)("WeakSet",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),n(8850))},1773:(t,e,n)=>{n(1115)},8783:(t,e,n)=>{n(3464)("asyncDispose")},3975:(t,e,n)=>{n(3464)("dispose")},2731:(t,e,n)=>{var r=n(6887),i=n(626),o=n(5329),g=i("Symbol"),s=g.keyFor,A=o(g.prototype.valueOf);r({target:"Symbol",stat:!0},{isRegistered:function(t){try{return void 0!==s(A(t))}catch(t){return!1}}})},5605:(t,e,n)=>{for(var r=n(6887),i=n(8726),o=n(626),g=n(5329),s=n(6664),A=n(9813),C=o("Symbol"),I=C.isWellKnown,a=o("Object","getOwnPropertyNames"),u=g(C.prototype.valueOf),c=i("wks"),l=0,h=a(C),d=h.length;l{n(3464)("matcher")},1943:(t,e,n)=>{n(3464)("metadataKey")},5414:(t,e,n)=>{n(3464)("metadata")},6774:(t,e,n)=>{n(3464)("observable")},620:(t,e,n)=>{n(3464)("patternMatch")},6172:(t,e,n)=>{n(3464)("replaceAll")},7634:(t,e,n)=>{n(6274);var r=n(3281),i=n(1899),o=n(9697),g=n(2029),s=n(2077),A=n(9813)("toStringTag");for(var C in r){var I=i[C],a=I&&I.prototype;a&&o(a)!==A&&g(a,A,C),s[C]=s.Array}},9229:(t,e,n)=>{var r=n(6887),i=n(1899),o=n(7620)(i.setInterval,!0);r({global:!0,bind:!0,forced:i.setInterval!==o},{setInterval:o})},7749:(t,e,n)=>{var r=n(6887),i=n(1899),o=n(7620)(i.setTimeout,!0);r({global:!0,bind:!0,forced:i.setTimeout!==o},{setTimeout:o})},1249:(t,e,n)=>{n(9229),n(7749)},3363:(t,e,n)=>{var r=n(4034);t.exports=r},9216:(t,e,n)=>{var r=n(9324);t.exports=r},6668:(t,e,n)=>{var r=n(5909);t.exports=r},8065:(t,e,n)=>{var r=n(6043);t.exports=r},6279:(t,e,n)=>{n(7634);var r=n(9697),i=n(953),o=n(7046),g=n(9216),s=Array.prototype,A={DOMTokenList:!0,NodeList:!0};t.exports=function(t){var e=t.forEach;return t===s||o(s,t)&&e===s.forEach||i(A,r(t))?g:e}},3819:(t,e,n)=>{n(7634);var r=n(9697),i=n(953),o=n(7046),g=n(6668),s=Array.prototype,A={DOMTokenList:!0,NodeList:!0};t.exports=function(t){var e=t.keys;return t===s||o(s,t)&&e===s.keys||i(A,r(t))?g:e}},1798:(t,e,n)=>{var r=n(8287);t.exports=r},2527:(t,e,n)=>{var r=n(8025);t.exports=r},1910:(t,e,n)=>{var r=n(8171);t.exports=r},6209:(t,e,n)=>{var r=n(3081);t.exports=r},3059:(t,e,n)=>{var r=n(8494);t.exports=r},7460:(t,e,n)=>{var r=n(2956);n(7634),t.exports=r},7989:(t,e,n)=>{n(1249);var r=n(4058);t.exports=r.setTimeout},2547:(t,e,n)=>{var r=n(7473);n(7634),t.exports=r},6509:(t,e,n)=>{var r=n(4227);n(7634),t.exports=r},5774:(t,e,n)=>{var r=n(2978);t.exports=r},2010:(t,e,n)=>{var r=n(2304);n(7634),t.exports=r},3726:(t,e,n)=>{var r=n(9567);n(7634),t.exports=r},9996:t=>{"use strict";var e=function(t){return function(t){return!!t&&"object"==typeof t}(t)&&!function(t){var e=Object.prototype.toString.call(t);return"[object RegExp]"===e||"[object Date]"===e||function(t){return t.$$typeof===n}(t)}(t)},n="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function r(t,e){return!1!==e.clone&&e.isMergeableObject(t)?s((n=t,Array.isArray(n)?[]:{}),t,e):t;var n}function i(t,e,n){return t.concat(e).map((function(t){return r(t,n)}))}function o(t){return Object.keys(t).concat(function(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter((function(e){return Object.propertyIsEnumerable.call(t,e)})):[]}(t))}function g(t,e){try{return e in t}catch(t){return!1}}function s(t,n,A){(A=A||{}).arrayMerge=A.arrayMerge||i,A.isMergeableObject=A.isMergeableObject||e,A.cloneUnlessOtherwiseSpecified=r;var C=Array.isArray(n);return C===Array.isArray(t)?C?A.arrayMerge(t,n,A):function(t,e,n){var i={};return n.isMergeableObject(t)&&o(t).forEach((function(e){i[e]=r(t[e],n)})),o(e).forEach((function(o){(function(t,e){return g(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))})(t,o)||(g(t,o)&&n.isMergeableObject(e[o])?i[o]=function(t,e){if(!e.customMerge)return s;var n=e.customMerge(t);return"function"==typeof n?n:s}(o,n)(t[o],e[o],n):i[o]=r(e[o],n))})),i}(t,n,A):r(n,A)}s.all=function(t,e){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce((function(t,n){return s(t,n,e)}),{})};var A=s;t.exports=A},645:(t,e)=>{e.read=function(t,e,n,r,i){var o,g,s=8*i-r-1,A=(1<>1,I=-7,a=n?i-1:0,u=n?-1:1,c=t[e+a];for(a+=u,o=c&(1<<-I)-1,c>>=-I,I+=s;I>0;o=256*o+t[e+a],a+=u,I-=8);for(g=o&(1<<-I)-1,o>>=-I,I+=r;I>0;g=256*g+t[e+a],a+=u,I-=8);if(0===o)o=1-C;else{if(o===A)return g?NaN:1/0*(c?-1:1);g+=Math.pow(2,r),o-=C}return(c?-1:1)*g*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var g,s,A,C=8*o-i-1,I=(1<>1,u=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,c=r?0:o-1,l=r?1:-1,h=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,g=I):(g=Math.floor(Math.log(e)/Math.LN2),e*(A=Math.pow(2,-g))<1&&(g--,A*=2),(e+=g+a>=1?u/A:u*Math.pow(2,1-a))*A>=2&&(g++,A/=2),g+a>=I?(s=0,g=I):g+a>=1?(s=(e*A-1)*Math.pow(2,i),g+=a):(s=e*Math.pow(2,a-1)*Math.pow(2,i),g=0));i>=8;t[n+c]=255&s,c+=l,s/=256,i-=8);for(g=g<0;t[n+c]=255&g,c+=l,g/=256,C-=8);t[n+c-l]|=128*h}},1401:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.assertImpersonatedUserIsEmpty=e.assertTxConfigIsEmpty=e.assertDatabaseIsEmpty=void 0;var r=n(758);e.assertTxConfigIsEmpty=function(t,e,n){if(void 0===e&&(e=function(){}),t&&!t.isEmpty()){var i=(0,r.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 e(i.message),n.onError(i),i}},e.assertDatabaseIsEmpty=function(t,e,n){if(void 0===e&&(e=function(){}),t){var i=(0,r.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 e(i.message),n.onError(i),i}},e.assertImpersonatedUserIsEmpty=function(t,e,n){if(void 0===e&&(e=function(){}),t){var i=(0,r.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 "+t+".");throw e(i.message),n.onError(i),i}}},6055:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(1401),o=n(7687),g=r(n(4415)),s=n(1235),A=n(758),C=A.internal.bookmark.Bookmark,I=A.internal.constants,a=I.ACCESS_MODE_WRITE,u=I.BOLT_PROTOCOL_V1,c=(A.internal.logger.Logger,A.internal.txConfig.TxConfig),l=function(){function t(t,e,n,r,i,o){var g=void 0===n?{}:n,s=g.disableLosslessIntegers,A=g.useBigInt;void 0===r&&(r=function(){return null}),this._server=t||{},this._chunker=e,this._packer=this._createPacker(e),this._unpacker=this._createUnpacker(s,A),this._responseHandler=r(this),this._log=i,this._onProtocolError=o,this._fatalError=null}return Object.defineProperty(t.prototype,"version",{get:function(){return u},enumerable:!1,configurable:!0}),t.prototype.packer=function(){return this._packer},t.prototype.unpacker=function(){return this._unpacker},t.prototype.transformMetadata=function(t){return t},t.prototype.initialize=function(t){var e=this,n=void 0===t?{}:t,r=n.userAgent,i=n.authToken,o=n.onError,A=n.onComplete,C=new s.LoginObserver({onError:function(t){return e._onLoginError(t,o)},onCompleted:function(t){return e._onLoginCompleted(t,A)}});return this.write(g.default.init(r,i),C,!0),C},t.prototype.prepareToClose=function(){},t.prototype.beginTransaction=function(t){var e=void 0===t?{}:t,n=e.bookmark,r=e.txConfig,i=e.database,o=e.mode,g=e.impersonatedUser,s=e.beforeError,A=e.afterError,C=e.beforeComplete,I=e.afterComplete;return this.run("BEGIN",n?n.asBeginTransactionParameters():{},{bookmark:n,txConfig:r,database:i,mode:o,impersonatedUser:g,beforeError:s,afterError:A,beforeComplete:C,afterComplete:I,flush:!1})},t.prototype.commitTransaction=function(t){var e=void 0===t?{}:t,n=e.beforeError,r=e.afterError,i=e.beforeComplete,o=e.afterComplete;return this.run("COMMIT",{},{bookmark:C.empty(),txConfig:c.empty(),mode:a,beforeError:n,afterError:r,beforeComplete:i,afterComplete:o})},t.prototype.rollbackTransaction=function(t){var e=void 0===t?{}:t,n=e.beforeError,r=e.afterError,i=e.beforeComplete,o=e.afterComplete;return this.run("ROLLBACK",{},{bookmark:C.empty(),txConfig:c.empty(),mode:a,beforeError:n,afterError:r,beforeComplete:i,afterComplete:o})},t.prototype.run=function(t,e,n){var r=void 0===n?{}:n,o=(r.bookmark,r.txConfig),A=r.database,C=(r.mode,r.impersonatedUser),I=r.beforeKeys,a=r.afterKeys,u=r.beforeError,c=r.afterError,l=r.beforeComplete,h=r.afterComplete,d=r.flush,f=void 0===d||d,p=new s.ResultStreamObserver({server:this._server,beforeKeys:I,afterKeys:a,beforeError:u,afterError:c,beforeComplete:l,afterComplete:h});return(0,i.assertTxConfigIsEmpty)(o,this._onProtocolError,p),(0,i.assertDatabaseIsEmpty)(A,this._onProtocolError,p),(0,i.assertImpersonatedUserIsEmpty)(C,this._onProtocolError,p),this.write(g.default.run(t,e),p,!1),this.write(g.default.pullAll(),p,f),p},Object.defineProperty(t.prototype,"currentFailure",{get:function(){return this._responseHandler.currentFailure},enumerable:!1,configurable:!0}),t.prototype.reset=function(t){var e=void 0===t?{}:t,n=e.onError,r=e.onComplete,i=new s.ResetObserver({onProtocolError:this._onProtocolError,onError:n,onComplete:r});return this.write(g.default.reset(),i,!0),i},t.prototype._createPacker=function(t){return new o.v1.Packer(t)},t.prototype._createUnpacker=function(t,e){return new o.v1.Unpacker(t,e)},t.prototype.write=function(t,e,n){var r=this;this.queueObserverIfProtocolIsNotBroken(e)&&(this._log.isDebugEnabled()&&this._log.debug("C: "+t),this.packer().packStruct(t.signature,t.fields.map((function(t){return r.packer().packable(t)}))),this._chunker.messageBoundary(),n&&this._chunker.flush())},t.prototype.notifyFatalError=function(t){return this._fatalError=t,this._responseHandler._notifyErrorToObservers(t)},t.prototype.updateCurrentObserver=function(){return this._responseHandler._updateCurrentObserver()},t.prototype.hasOngoingObservableRequests=function(){return this._responseHandler.hasOngoingObservableRequests()},t.prototype.queueObserverIfProtocolIsNotBroken=function(t){return this.isBroken()?(this.notifyFatalErrorToObserver(t),!1):this._responseHandler._queueObserver(t)},t.prototype.isBroken=function(){return!!this._fatalError},t.prototype.notifyFatalErrorToObserver=function(t){t&&t.onError&&t.onError(this._fatalError)},t.prototype.resetFailure=function(){this._responseHandler._resetFailure()},t.prototype._onLoginCompleted=function(t,e){if(t){var n=t.server;this._server.version||(this._server.version=n)}e&&e(t)},t.prototype._onLoginError=function(t,e){this._onProtocolError(t.message),e&&e(t)},t}();e.default=l},661:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var g=o(n(6055)),s=o(n(7687)),A=n(758).internal.constants.BOLT_PROTOCOL_V2,C=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype._createPacker=function(t){return new s.default.Packer(t)},e.prototype._createUnpacker=function(t,e){return new s.default.Unpacker(t,e)},Object.defineProperty(e.prototype,"version",{get:function(){return A},enumerable:!1,configurable:!0}),e}(g.default);e.default=C},3619:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__assign||function(){return o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7078),i=n(758);function o(t,e){return{major:t,minor:e}}e.default=function(t){var e=this;return new Promise((function(n,g){var s=function(t){g(t)};t.onerror=s.bind(e),t._error&&s(t._error),t.onmessage=function(t){try{var e=function(t){var e=[t.readUInt8(),t.readUInt8(),t.readUInt8(),t.readUInt8()];if(72===e[0]&&84===e[1]&&84===e[2]&&80===e[3])throw(0,i.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(e[3]+"."+e[2])}(t);n({protocolVersion:e,consumeRemainingBuffer:function(e){t.hasRemaining()&&e(t.readSlice(t.remaining()))}})}catch(t){g(t)}},t.write(function(t){if(t.length>4)throw(0,i.newError)("It should not have more than 4 versions of the protocol");var e=(0,r.alloc)(20);return e.writeInt32(1616949271),t.forEach((function(t){if(t instanceof Array){var n=t[0],r=n.major,i=(o=n.minor)-t[1].minor;e.writeInt32(i<<16|o<<8|r)}else{r=t.major;var o=t.minor;e.writeInt32(o<<8|r)}})),e.reset(),e}([[o(4,4),o(4,2)],o(4,1),o(4,0),o(3,0)]))}))}},7778:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.RawRoutingTable=e.BoltProtocol=void 0;var g=o(n(4904)),s=o(n(5530)),A=o(n(7478)),C=o(n(1548));i(n(1235),e),e.BoltProtocol=A.default,e.RawRoutingTable=C.default,e.default={handshake:g.default,create:s.default}},4415:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(758),i=r.internal.constants,o=i.ACCESS_MODE_READ,g=i.FETCH_ALL,s=r.internal.util.assertString,A=function(){function t(t,e,n){this.signature=t,this.fields=e,this.toString=n}return t.init=function(e,n){return new t(1,[e,n],(function(){return"INIT "+e+" {...}"}))},t.run=function(e,n){return new t(16,[e,n],(function(){return"RUN "+e+" "+r.json.stringify(n)}))},t.pullAll=function(){return a},t.reset=function(){return u},t.hello=function(e,n,r,i){void 0===r&&(r=null),void 0===i&&(i=null);var o=Object.assign({user_agent:e},n);return r&&(o.routing=r),i&&(o.patch_bolt=i),new t(1,[o],(function(){return"HELLO {user_agent: '"+e+"', ...}"}))},t.begin=function(e){var n=void 0===e?{}:e,i=C(n.bookmark,n.txConfig,n.database,n.mode,n.impersonatedUser);return new t(17,[i],(function(){return"BEGIN "+r.json.stringify(i)}))},t.commit=function(){return c},t.rollback=function(){return l},t.runWithMetadata=function(e,n,i){var o=void 0===i?{}:i,g=C(o.bookmark,o.txConfig,o.database,o.mode,o.impersonatedUser);return new t(16,[e,n,g],(function(){return"RUN "+e+" "+r.json.stringify(n)+" "+r.json.stringify(g)}))},t.goodbye=function(){return h},t.pull=function(e){var n=void 0===e?{}:e,i=n.stmtId,o=void 0===i?-1:i,s=n.n,A=I(null==o?-1:o,(void 0===s?g:s)||g);return new t(63,[A],(function(){return"PULL "+r.json.stringify(A)}))},t.discard=function(e){var n=void 0===e?{}:e,i=n.stmtId,o=void 0===i?-1:i,s=n.n,A=I(null==o?-1:o,(void 0===s?g:s)||g);return new t(47,[A],(function(){return"DISCARD "+r.json.stringify(A)}))},t.route=function(e,n,i){return void 0===e&&(e={}),void 0===n&&(n=[]),void 0===i&&(i=null),new t(102,[e,n,i],(function(){return"ROUTE "+r.json.stringify(e)+" "+r.json.stringify(n)+" "+i}))},t.routeV4x4=function(e,n,i){void 0===e&&(e={}),void 0===n&&(n=[]),void 0===i&&(i={});var o={};return i.databaseName&&(o.db=i.databaseName),i.impersonatedUser&&(o.imp_user=i.impersonatedUser),new t(102,[e,n,o],(function(){return"ROUTE "+r.json.stringify(e)+" "+r.json.stringify(n)+" "+r.json.stringify(o)}))},t}();function C(t,e,n,r,i){var g={};return t.isEmpty()||(g.bookmarks=t.values()),e.timeout&&(g.tx_timeout=e.timeout),e.metadata&&(g.tx_metadata=e.metadata),n&&(g.db=s(n,"database")),i&&(g.imp_user=s(i,"impersonatedUser")),r===o&&(g.mode="r"),g}function I(t,e){var n={n:(0,r.int)(e)};return-1!==t&&(n.qid=(0,r.int)(t)),n}e.default=A;var a=new A(63,[],(function(){return"PULL_ALL"})),u=new A(15,[],(function(){return"RESET"})),c=new A(18,[],(function(){return"COMMIT"})),l=new A(19,[],(function(){return"ROLLBACK"})),h=new A(2,[],(function(){return"GOODBYE"}))},2385:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(758);function i(){}function o(t){return t}var g={onNext:i,onCompleted:i,onError:i},s=function(){function t(t){var e=void 0===t?{}:t,n=e.transformMetadata,r=e.log,g=e.observer;this._pendingObservers=[],this._log=r,this._transformMetadata=n||o,this._observer=Object.assign({onPendingObserversChange:i,onError:i,onFailure:i,onErrorApplyTransformation:o},g)}return Object.defineProperty(t.prototype,"currentFailure",{get:function(){return this._currentFailure},enumerable:!1,configurable:!0}),t.prototype.handleResponse=function(t){var e=t.fields[0];switch(t.signature){case 113:this._log.isDebugEnabled()&&this._log.debug("S: RECORD "+r.json.stringify(t)),this._currentObserver.onNext(e);break;case 112:this._log.isDebugEnabled()&&this._log.debug("S: SUCCESS "+r.json.stringify(t));try{var n=this._transformMetadata(e);this._currentObserver.onCompleted(n)}finally{this._updateCurrentObserver()}break;case 127:this._log.isDebugEnabled()&&this._log.debug("S: FAILURE "+r.json.stringify(t));try{var i=(0,r.newError)(e.message,e.code);this._currentFailure=this._observer.onErrorApplyTransformation(i),this._currentObserver.onError(this._currentFailure)}finally{this._updateCurrentObserver(),this._observer.onFailure(this._currentFailure)}break;case 126:this._log.isDebugEnabled()&&this._log.debug("S: IGNORED "+r.json.stringify(t));try{this._currentFailure&&this._currentObserver.onError?this._currentObserver.onError(this._currentFailure):this._currentObserver.onError&&this._currentObserver.onError((0,r.newError)("Ignored either because of an error or RESET"))}finally{this._updateCurrentObserver()}break;default:this._observer.onError((0,r.newError)("Unknown Bolt protocol message: "+t))}},t.prototype._updateCurrentObserver=function(){this._currentObserver=this._pendingObservers.shift(),this._observer.onPendingObserversChange(this._pendingObservers.length)},t.prototype._queueObserver=function(t){return(t=t||g).onCompleted=t.onCompleted||i,t.onError=t.onError||i,t.onNext=t.onNext||i,void 0===this._currentObserver?this._currentObserver=t:this._pendingObservers.push(t),this._observer.onPendingObserversChange(this._pendingObservers.length),!0},t.prototype._notifyErrorToObservers=function(t){for(this._currentObserver&&this._currentObserver.onError&&this._currentObserver.onError(t);this._pendingObservers.length>0;){var e=this._pendingObservers.shift();e&&e.onError&&e.onError(t)}},t.prototype.hasOngoingObservableRequests=function(){return null!=this._currentObserver||this._pendingObservers.length>0},t.prototype._resetFailure=function(){this._currentFailure=null},t}();e.default=s},1548:function(t,e){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(){}return t.ofRecord=function(e){return null===e?t.ofNull():new s(e)},t.ofMessageResponse=function(e){return null===e?t.ofNull():new o(e)},t.ofNull=function(){return new g},Object.defineProperty(t.prototype,"ttl",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"db",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"servers",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isNull",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),t}();e.default=i;var o=function(t){function e(e){var n=t.call(this)||this;return n._response=e,n}return r(e,t),Object.defineProperty(e.prototype,"ttl",{get:function(){return this._response.rt.ttl},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"servers",{get:function(){return this._response.rt.servers},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"db",{get:function(){return this._response.rt.db},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isNull",{get:function(){return null===this._response},enumerable:!1,configurable:!0}),e}(i),g=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),Object.defineProperty(e.prototype,"isNull",{get:function(){return!0},enumerable:!1,configurable:!0}),e}(i),s=function(t){function e(e){var n=t.call(this)||this;return n._record=e,n}return r(e,t),Object.defineProperty(e.prototype,"ttl",{get:function(){return this._record.get("ttl")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"servers",{get:function(){return this._record.get("servers")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"db",{get:function(){return this._record.has("db")?this._record.get("db"):null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isNull",{get:function(){return null===this._record},enumerable:!1,configurable:!0}),e}(i)},1235:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.ProcedureRouteObserver=e.RouteObserver=e.CompletedObserver=e.FailedObserver=e.ResetObserver=e.LoginObserver=e.ResultStreamObserver=e.StreamObserver=void 0;var g=n(758),s=o(n(1548)),A=g.internal.constants.FETCH_ALL,C=g.error.PROTOCOL_ERROR,I=function(){function t(){}return t.prototype.onNext=function(t){},t.prototype.onError=function(t){},t.prototype.onCompleted=function(t){},t}();e.StreamObserver=I;var a=function(t){function e(e){var n=void 0===e?{}:e,r=n.reactive,i=void 0!==r&&r,o=n.moreFunction,g=n.discardFunction,s=n.fetchSize,C=void 0===s?A:s,I=n.beforeError,a=n.afterError,u=n.beforeKeys,c=n.afterKeys,l=n.beforeComplete,h=n.afterComplete,d=n.server,f=t.call(this)||this;return f._fieldKeys=null,f._fieldLookup=null,f._head=null,f._queuedRecords=[],f._tail=null,f._error=null,f._observers=[],f._meta={},f._server=d,f._beforeError=I,f._afterError=a,f._beforeKeys=u,f._afterKeys=c,f._beforeComplete=l,f._afterComplete=h,f._queryId=null,f._moreFunction=o,f._discardFunction=g,f._discard=!1,f._fetchSize=C,f._setState(i?p.READY:p.READY_STREAMING),f._setupAuoPull(C),f}return i(e,t),e.prototype.onNext=function(t){var e=new g.Record(this._fieldKeys,t,this._fieldLookup);this._observers.some((function(t){return t.onNext}))?this._observers.forEach((function(t){t.onNext&&t.onNext(e)})):(this._queuedRecords.push(e),this._queuedRecords.length>this._highRecordWatermark&&(this._autoPull=!1))},e.prototype.onCompleted=function(t){this._state.onSuccess(this,t)},e.prototype.onError=function(t){this._state.onError(this,t)},e.prototype.cancel=function(){this._discard=!0},e.prototype.prepareToHandleSingleResponse=function(){this._head=[],this._fieldKeys=[],this._setState(p.STREAMING)},e.prototype.markCompleted=function(){this._head=[],this._fieldKeys=[],this._tail={},this._setState(p.SUCCEEDED)},e.prototype.subscribe=function(t){if(this._error)t.onError(this._error);else{if(this._head&&t.onKeys&&t.onKeys(this._head),this._queuedRecords.length>0&&t.onNext)for(var e=0;e0){this._fieldKeys=t.fields;for(var r=0;r>8),this.putUInt8(t+1,255&e)},t.prototype.putUInt16=function(t,e){this.putUInt8(t,e>>8&255),this.putUInt8(t+1,255&e)},t.prototype.putInt32=function(t,e){this.putInt8(t,e>>24),this.putUInt8(t+1,e>>16&255),this.putUInt8(t+2,e>>8&255),this.putUInt8(t+3,255&e)},t.prototype.putUInt32=function(t,e){this.putUInt8(t,e>>24&255),this.putUInt8(t+1,e>>16&255),this.putUInt8(t+2,e>>8&255),this.putUInt8(t+3,255&e)},t.prototype.putInt64=function(t,e){this.putInt8(t,e>>48),this.putUInt8(t+1,e>>42&255),this.putUInt8(t+2,e>>36&255),this.putUInt8(t+3,e>>30&255),this.putUInt8(t+4,e>>24&255),this.putUInt8(t+5,e>>16&255),this.putUInt8(t+6,e>>8&255),this.putUInt8(t+7,255&e)},t.prototype.putBytes=function(t,e){for(var n=0,r=e.remaining();n0},t.prototype.reset=function(){this.position=0},t.prototype.toString=function(){return this.constructor.name+"( position="+this.position+" )\n "+this.toHex()},t.prototype.toHex=function(){for(var t="",e=0;e=0}(e);return function(t,e,n){null===n||(t&&!n?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."):e&&n&&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."))}(n,r,g),r?{scheme:"ws",error:null}:g?{scheme:"wss",error:null}:n?i&&"TRUST_SYSTEM_CA_SIGNED_CERTIFICATES"!==i?{scheme:null,error:(0,o.newError)("The browser version of this driver only supports one trust strategy, 'TRUST_SYSTEM_CA_SIGNED_CERTIFICATES'. "+i+' is not supported. Please either use TRUST_SYSTEM_CA_SIGNED_CERTIFICATES or disable encryption by setting `encrypted:"'+s+'"` in the driver configuration.')}:{scheme:"wss",error:null}:{scheme:"ws",error:null}}(t,e),g=r.scheme,C=r.error;if(C)this._error=C;else{this._ws=function(t,e,n){var r=t+"://"+e.asHostPort();try{return n(r)}catch(r){if(function(t,e){return"SyntaxError"===t.name&&("["===(n=e.asHostPort()).charAt(0)&&-1!==n.indexOf("]"));var n}(r,e)){var i=function(t,e){return t+"://"+e.host().replace(new RegExp(":","g"),"-").replace("%","s")+".ipv6-literal.net:"+e.port()}(t,e);return n(i)}throw r}}(g,t.address,n),this._ws.binaryType="arraybuffer";var a=this;this._ws.onclose=function(t){t&&!t.wasClean&&a._handleConnectionError(),a._open=!1},this._ws.onopen=function(){a._clearConnectionTimeout();var t=a._pending;a._pending=null;for(var e=0;e{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(758),i=r.internal.util,o=i.ENCRYPTION_OFF,g=i.ENCRYPTION_ON,s=r.error.SERVICE_UNAVAILABLE,A=[null,void 0,!0,!1,g,o],C=[null,void 0,"TRUST_ALL_CERTIFICATES","TRUST_CUSTOM_CA_SIGNED_CERTIFICATES","TRUST_SYSTEM_CA_SIGNED_CERTIFICATES"];e.default=function(t,e,n){this.address=t,this.encrypted=function(t){var e=t.encrypted;if(-1===A.indexOf(e))throw(0,r.newError)("Illegal value of the encrypted setting "+e+". Expected one of "+A);return e}(e),this.trust=function(t){var e=t.trust;if(-1===C.indexOf(e))throw(0,r.newError)("Illegal value of the trust setting "+e+". Expected one of "+C);return e}(e),this.trustedCertificates=function(t){return t.trustedCertificates||[]}(e),this.knownHostsPath=function(t){return t.knownHosts||null}(e),this.connectionErrorCode=n||s,this.connectionTimeout=function(t){var e=parseInt(t.connectionTimeout,10);return 0===e||e&&e<0?null:e||3e4}(e)}},4985:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Dechunker=e.Chunker=void 0;var g=o(n(8364)),s=n(1731),A=o(n(4603)),C=function(t){function e(e,n){var r=t.call(this,0)||this;return r._bufferSize=n||1400,r._ch=e,r._buffer=(0,s.alloc)(r._bufferSize),r._currentChunkStart=0,r._chunkOpen=!1,r}return i(e,t),e.prototype.putUInt8=function(t,e){this._ensure(1),this._buffer.writeUInt8(e)},e.prototype.putInt8=function(t,e){this._ensure(1),this._buffer.writeInt8(e)},e.prototype.putFloat64=function(t,e){this._ensure(8),this._buffer.writeFloat64(e)},e.prototype.putBytes=function(t,e){for(;e.remaining()>0;)this._ensure(1),this._buffer.remaining()>e.remaining()?this._buffer.writeBytes(e):this._buffer.writeBytes(e.readSlice(this._buffer.remaining()));return this},e.prototype.flush=function(){if(this._buffer.position>0){this._closeChunkIfOpen();var t=this._buffer;this._buffer=null,this._ch.write(t.getSlice(0,t.position)),this._buffer=(0,s.alloc)(this._bufferSize),this._chunkOpen=!1}return this},e.prototype.messageBoundary=function(){this._closeChunkIfOpen(),this._buffer.remaining()<2&&this.flush(),this._buffer.writeInt16(0)},e.prototype._ensure=function(t){var e=this._chunkOpen?t:t+2;this._buffer.remaining()=2?this._onHeader(t.readUInt16()):(this._partialChunkHeader=t.readUInt8()<<8,this.IN_HEADER)},t.prototype.IN_HEADER=function(t){return this._onHeader(65535&(this._partialChunkHeader|t.readUInt8()))},t.prototype.IN_CHUNK=function(t){return this._chunkSize<=t.remaining()?(this._currentMessage.push(t.readSlice(this._chunkSize)),this.AWAITING_CHUNK):(this._chunkSize-=t.remaining(),this._currentMessage.push(t.readSlice(t.remaining())),this.IN_CHUNK)},t.prototype.CLOSED=function(t){},t.prototype._onHeader=function(t){if(0===t){var e=void 0;switch(this._currentMessage.length){case 0:return this.AWAITING_CHUNK;case 1:e=this._currentMessage[0];break;default:e=new A.default(this._currentMessage)}return this._currentMessage=[],this.onmessage(e),this.AWAITING_CHUNK}return this._chunkSize=t,this.IN_CHUNK},t.prototype.write=function(t){for(;t.hasRemaining();)this._state=this._state(t)},t}();e.Dechunker=I},4603:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(7268),g=n(1731),s=function(t){function e(e){for(var n=this,r=0,i=0;i=n.length))return n.getUInt8(t);t-=n.length}},e.prototype.getInt8=function(t){for(var e=0;e=n.length))return n.getInt8(t);t-=n.length}},e.prototype.getFloat64=function(t){for(var e=(0,g.alloc)(8),n=0;n<8;n++)e.putUInt8(n,this.getUInt8(t+n));return e.getFloat64(0)},e}(o.BaseBuffer);e.default=s},7078:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.utf8=e.alloc=e.ChannelConfig=void 0,i(n(2530),e),i(n(4985),e);var g=n(3190);Object.defineProperty(e,"ChannelConfig",{enumerable:!0,get:function(){return o(g).default}});var s=n(1731);Object.defineProperty(e,"alloc",{enumerable:!0,get:function(){return s.alloc}});var A=n(2969);Object.defineProperty(e,"utf8",{enumerable:!0,get:function(){return o(A).default}})},2969:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(1731)),o=n(758),g=r(n(8764)),s=new(n(2553).StringDecoder)("utf8");e.default={encode:function(t){return new i.default(function(t){return"function"==typeof g.default.Buffer.from?g.default.Buffer.from(t,"utf8"):new g.default.Buffer(t,"utf8")}(t))},decode:function(t,e){if(Object.prototype.hasOwnProperty.call(t,"_buffer"))return function(t,e){var n=t.position,r=n+e;return t.position=Math.min(r,t.length),t._buffer.toString("utf8",n,r)}(t,e);if(Object.prototype.hasOwnProperty.call(t,"_buffers"))return function(t,e){return function(t,e,n,r){var i=e,o=t.position;return t._updatePos(Math.min(e,t.length-o)),t._buffers.reduce((function(t,e){if(i<=0)return t;if(o>=e.length)return o-=e.length,"";e._updatePos(o-e.position);var n=Math.min(e.length-o,i),r=e.readSlice(n);return e._updatePos(n),i=Math.max(i-r.length,0),o=0,t+function(t){return s.write(t._buffer)}(r)}),"")+s.end()}(t,e)}(t,e);throw(0,o.newError)("Don't know how to decode strings from '"+t+"'")}}},2358:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function g(t){try{A(r.next(t))}catch(t){o(t)}}function s(t){try{A(r.throw(t))}catch(t){o(t)}}function A(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(g,s)}A((r=r.apply(t,e||[])).next())}))},g=this&&this.__generator||function(t,e){var n,r,i,o,g={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;g;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return g.label++,{value:o[1],done:!1};case 5:g.label++,r=o[1],o=[0];continue;case 7:o=g.ops.pop(),g.trys.pop();continue;default:if(!((i=(i=g.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){g=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=c}))];case 1:return[2,t.sent()]}}))}))},e.prototype.supportsTransactionConfig=function(){return o(this,void 0,void 0,(function(){return g(this,(function(t){switch(t.label){case 0:return[4,this._hasProtocolVersion((function(t){return t>=u}))];case 1:return[2,t.sent()]}}))}))},e.prototype.supportsUserImpersonation=function(){return o(this,void 0,void 0,(function(){return g(this,(function(t){switch(t.label){case 0:return[4,this._hasProtocolVersion((function(t){return t>=l}))];case 1:return[2,t.sent()]}}))}))},e}(A.default));e.default=d},6779:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),g=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return g(e,t),e},A=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function g(t){try{A(r.next(t))}catch(t){o(t)}}function s(t){try{A(r.throw(t))}catch(t){o(t)}}function A(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(g,s)}A((r=r.apply(t,e||[])).next())}))},C=this&&this.__generator||function(t,e){var n,r,i,o,g={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;g;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return g.label++,{value:o[1],done:!1};case 5:g.label++,r=o[1],o=[0];continue;case 7:o=g.ops.pop(),g.trys.pop();continue;default:if(!((i=(i=g.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){g=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){g=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},u=this&&this.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),g=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)g.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return g},c=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var l=n(758),h=A(n(4066)),d=n(7078),f=c(n(9070)),p=c(n(6779)),v=n(6836),y=n(870),b=l.error.SERVICE_UNAVAILABLE,m=l.error.SESSION_EXPIRED,w=l.internal.bookmark.Bookmark,_=l.internal.constants,x=_.ACCESS_MODE_READ,E=_.ACCESS_MODE_WRITE,O=_.BOLT_PROTOCOL_V3,k=_.BOLT_PROTOCOL_V4_0,T=_.BOLT_PROTOCOL_V4_4,S=null,P=(0,l.int)(3e4),N=function(t){function e(e){var n=e.id,r=e.address,i=e.routingContext,g=e.hostNameResolver,s=e.config,A=e.log,C=e.userAgent,I=e.authToken,a=e.routingTablePurgeDelay,u=t.call(this,{id:n,config:s,log:A,userAgent:C,authToken:I},(function(t){return(0,y.createChannelConnection)(t,u._config,u._createConnectionErrorHandler(),u._log,u._routingContext)}))||this;return u._routingContext=o(o({},i),{address:r.toString()}),u._seedRouter=r,u._rediscovery=new h.default(u._routingContext),u._loadBalancingStrategy=new v.LeastConnectedLoadBalancingStrategy(u._connectionPool),u._hostNameResolver=g,u._dnsResolver=new d.HostNameResolver,u._log=A,u._useSeedRouter=!0,u._routingTableRegistry=new R(a?(0,l.int)(a):P),u}return i(e,t),e.prototype._createConnectionErrorHandler=function(){return new y.ConnectionErrorHandler(m)},e.prototype._handleUnavailability=function(t,e,n){return this._log.warn("Routing driver "+this._id+" will forget "+e+" for database '"+n+"' because of an error "+t.code+" '"+t.message+"'"),this.forget(e,n||S),t},e.prototype._handleAuthorizationExpired=function(t,e,n){return this._log.warn("Routing driver "+this._id+" will close connections to "+e+" for database '"+n+"' because of an error "+t.code+" '"+t.message+"'"),this._connectionPool.purge(e).catch((function(){})),t},e.prototype._handleWriteFailure=function(t,e,n){return this._log.warn("Routing driver "+this._id+" will forget writer "+e+" for database '"+n+"' because of an error "+t.code+" '"+t.message+"'"),this.forgetWriter(e,n||S),(0,l.newError)("No longer possible to write to server at "+e,m)},e.prototype.acquireConnection=function(t){var e=void 0===t?{}:t,n=e.accessMode,r=e.database,i=e.bookmarks,o=e.impersonatedUser,g=e.onDatabaseNameResolved;return C(this,void 0,void 0,(function(){var t,e,s,A,C,a,u,c=this;return I(this,(function(I){switch(I.label){case 0:return s={database:r||S},A=new y.ConnectionErrorHandler(m,(function(t,e){return c._handleUnavailability(t,e,s.database)}),(function(t,e){return c._handleWriteFailure(t,e,s.database)}),(function(t,e){return c._handleAuthorizationExpired(t,e,s.database)})),[4,this._freshRoutingTable({accessMode:n,database:s.database,bookmark:i,impersonatedUser:o,onDatabaseNameResolved:function(t){s.database=s.database||t,g&&g(t)}})];case 1:if(C=I.sent(),n===x)e=this._loadBalancingStrategy.selectReader(C.readers),t="read";else{if(n!==E)throw(0,l.newError)("Illegal mode "+n);e=this._loadBalancingStrategy.selectWriter(C.writers),t="write"}if(!e)throw(0,l.newError)("Failed to obtain connection towards "+t+" server. Known routing table is: "+C,m);I.label=2;case 2:return I.trys.push([2,4,,5]),[4,this._acquireConnectionToServer(e,t,C)];case 3:return a=I.sent(),[2,new y.DelegateConnection(a,A)];case 4:throw u=I.sent(),A.handleAndTransformError(u,e);case 5:return[2]}}))}))},e.prototype._hasProtocolVersion=function(t){return C(this,void 0,void 0,(function(){var e,n,r,i,o,g;return I(this,(function(s){switch(s.label){case 0:return[4,this._resolveSeedRouter(this._seedRouter)];case 1:e=s.sent(),r=0,s.label=2;case 2:if(!(r=k}))];case 1:return[2,t.sent()]}}))}))},e.prototype.supportsTransactionConfig=function(){return C(this,void 0,void 0,(function(){return I(this,(function(t){switch(t.label){case 0:return[4,this._hasProtocolVersion((function(t){return t>=O}))];case 1:return[2,t.sent()]}}))}))},e.prototype.supportsUserImpersonation=function(){return C(this,void 0,void 0,(function(){return I(this,(function(t){switch(t.label){case 0:return[4,this._hasProtocolVersion((function(t){return t>=T}))];case 1:return[2,t.sent()]}}))}))},e.prototype.forget=function(t,e){this._routingTableRegistry.apply(e,{applyWhenExists:function(e){return e.forget(t)}}),this._connectionPool.purge(t).catch((function(){}))},e.prototype.forgetWriter=function(t,e){this._routingTableRegistry.apply(e,{applyWhenExists:function(e){return e.forgetWriter(t)}})},e.prototype._acquireConnectionToServer=function(t,e,n){return this._connectionPool.acquire(t)},e.prototype._freshRoutingTable=function(t){var e=void 0===t?{}:t,n=e.accessMode,r=e.database,i=e.bookmark,o=e.impersonatedUser,g=e.onDatabaseNameResolved,s=this._routingTableRegistry.get(r,(function(){return new h.RoutingTable({database:r})}));return s.isStaleFor(n)?(this._log.info('Routing table is stale for database: "'+r+'" and access mode: "'+n+'": '+s),this._refreshRoutingTable(s,i,o,g)):s},e.prototype._refreshRoutingTable=function(t,e,n,r){var i=t.routers;return this._useSeedRouter?this._fetchRoutingTableFromSeedRouterFallbackToKnownRouters(i,t,e,n,r):this._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter(i,t,e,n,r)},e.prototype._fetchRoutingTableFromSeedRouterFallbackToKnownRouters=function(t,e,n,r,i){return C(this,void 0,void 0,(function(){var o,g;return I(this,(function(s){switch(s.label){case 0:return o=[],[4,this._fetchRoutingTableUsingSeedRouter(o,this._seedRouter,e,n,r)];case 1:return(g=s.sent())?(this._useSeedRouter=!1,[3,4]):[3,2];case 2:return[4,this._fetchRoutingTableUsingKnownRouters(t,e,n,r)];case 3:g=s.sent(),s.label=4;case 4:return[4,this._applyRoutingTableIfPossible(e,g,i)];case 5:return[2,s.sent()]}}))}))},e.prototype._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter=function(t,e,n,r,i){return C(this,void 0,void 0,(function(){var o;return I(this,(function(g){switch(g.label){case 0:return[4,this._fetchRoutingTableUsingKnownRouters(t,e,n,r)];case 1:return(o=g.sent())?[3,3]:[4,this._fetchRoutingTableUsingSeedRouter(t,this._seedRouter,e,n,r)];case 2:o=g.sent(),g.label=3;case 3:return[4,this._applyRoutingTableIfPossible(e,o,i)];case 4:return[2,g.sent()]}}))}))},e.prototype._fetchRoutingTableUsingKnownRouters=function(t,n,r,i){return C(this,void 0,void 0,(function(){var o,g;return I(this,(function(s){switch(s.label){case 0:return[4,this._fetchRoutingTable(t,n,r,i)];case 1:return(o=s.sent())?[2,o]:(g=t.length-1,e._forgetRouter(n,t,g),[2,null])}}))}))},e.prototype._fetchRoutingTableUsingSeedRouter=function(t,e,n,r,i){return C(this,void 0,void 0,(function(){var o,g;return I(this,(function(s){switch(s.label){case 0:return[4,this._resolveSeedRouter(e)];case 1:return o=s.sent(),g=o.filter((function(e){return t.indexOf(e)<0})),[4,this._fetchRoutingTable(g,n,r,i)];case 2:return[2,s.sent()]}}))}))},e.prototype._resolveSeedRouter=function(t){return C(this,void 0,void 0,(function(){var e,n,r=this;return I(this,(function(i){switch(i.label){case 0:return[4,this._hostNameResolver.resolve(t)];case 1:return e=i.sent(),[4,Promise.all(e.map((function(t){return r._dnsResolver.resolve(t)})))];case 2:return n=i.sent(),[2,[].concat.apply([],n)]}}))}))},e.prototype._fetchRoutingTable=function(t,n,r,i){var o=this;return t.reduce((function(g,s,A){return C(o,void 0,void 0,(function(){var o,C,a,u;return I(this,(function(I){switch(I.label){case 0:return[4,g];case 1:return(o=I.sent())?[2,o]:(C=A-1,e._forgetRouter(n,t,C),[4,this._createSessionForRediscovery(s,r,i)]);case 2:if(!(a=I.sent()))return[3,8];I.label=3;case 3:return I.trys.push([3,5,6,7]),[4,this._rediscovery.lookupRoutingTableOnRouter(a,n.database,s,i)];case 4:return[2,I.sent()];case 5:if((u=I.sent())&&"Neo.ClientError.Database.DatabaseNotFound"===u.code)throw u;return this._log.warn("unable to fetch routing table because of an error "+u),[2,null];case 6:return a.close(),[7];case 7:return[3,9];case 8:return[2,null];case 9:return[2]}}))}))}),Promise.resolve(null))},e.prototype._createSessionForRediscovery=function(t,e,n){return C(this,void 0,void 0,(function(){var r,i,o,g,s=this;return I(this,(function(A){switch(A.label){case 0:return A.trys.push([0,2,,3]),[4,this._connectionPool.acquire(t)];case 1:return r=A.sent(),i=y.ConnectionErrorHandler.create({errorCode:m,handleAuthorizationExpired:function(t,e){return s._handleAuthorizationExpired(t,e)}}),o=new f.default(new y.DelegateConnection(r,i)),r.protocol().version<4?[2,new l.Session({mode:E,bookmark:w.empty(),connectionProvider:o})]:[2,new l.Session({mode:x,database:"system",bookmark:e,connectionProvider:o,impersonatedUser:n})];case 2:if((g=A.sent())&&"Neo.ClientError.Security.Unauthorized"===g.code)throw g;return[2,null];case 3:return[2]}}))}))},e.prototype._applyRoutingTableIfPossible=function(t,e,n){return C(this,void 0,void 0,(function(){return I(this,(function(r){switch(r.label){case 0:if(!e)throw(0,l.newError)("Could not perform discovery. No routing servers available. Known routing table: "+t,b);return 0===e.writers.length&&(this._useSeedRouter=!0),[4,this._updateRoutingTable(e,n)];case 1:return r.sent(),[2,e]}}))}))},e.prototype._updateRoutingTable=function(t,e){return C(this,void 0,void 0,(function(){return I(this,(function(n){switch(n.label){case 0:return[4,this._connectionPool.keepAll(t.allServers())];case 1:return n.sent(),this._routingTableRegistry.removeExpired(),this._routingTableRegistry.register(t),e(t.database),this._log.info("Updated routing table "+t),[2]}}))}))},e._forgetRouter=function(t,e,n){var r=e[n];t&&r&&t.forgetRouter(r)},e}(p.default);e.default=N;var R=function(){function t(t){this._tables=new Map,this._routingTablePurgeDelay=t}return t.prototype.register=function(t){return this._tables.set(t.database,t),this},t.prototype.apply=function(t,e){var n=void 0===e?{}:e,r=n.applyWhenExists,i=n.applyWhenDontExists,o=void 0===i?function(){}:i;return this._tables.has(t)?r(this._tables.get(t)):"string"==typeof t||null===t?o():this._forEach(r),this},t.prototype.get=function(t,e){return this._tables.has(t)?this._tables.get(t):"function"==typeof e?e():e},t.prototype.removeExpired=function(){var t=this;return this._removeIf((function(e){return e.isExpiredFor(t._routingTablePurgeDelay)}))},t.prototype._forEach=function(t){var e,n;try{for(var r=a(this._tables),i=r.next();!i.done;i=r.next())t(u(i.value,2)[1])}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return this},t.prototype._remove=function(t){return this._tables.delete(t),this},t.prototype._removeIf=function(t){var e,n;try{for(var r=a(this._tables),i=r.next();!i.done;i=r.next()){var o=u(i.value,2),g=o[0];t(o[1])&&this._remove(g)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return this},t}()},9070:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(e){var n=t.call(this)||this;return n._connection=e,n}return i(e,t),e.prototype.acquireConnection=function(t){var e=void 0===t?{}:t,n=(e.accessMode,e.database,e.bookmarks,this._connection);return this._connection=null,Promise.resolve(n)},e}(n(758).ConnectionProvider);e.default=o},1677:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.RoutingConnectionProvider=e.DirectConnectionProvider=e.PooledConnectionProvider=e.SingleConnectionProvider=void 0;var i=n(9070);Object.defineProperty(e,"SingleConnectionProvider",{enumerable:!0,get:function(){return r(i).default}});var o=n(6779);Object.defineProperty(e,"PooledConnectionProvider",{enumerable:!0,get:function(){return r(o).default}});var g=n(2358);Object.defineProperty(e,"DirectConnectionProvider",{enumerable:!0,get:function(){return r(g).default}});var s=n(9223);Object.defineProperty(e,"RoutingConnectionProvider",{enumerable:!0,get:function(){return r(s).default}})},7441:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function g(t){try{A(r.next(t))}catch(t){o(t)}}function s(t){try{A(r.throw(t))}catch(t){o(t)}}function A(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(g,s)}A((r=r.apply(t,e||[])).next())}))},g=this&&this.__generator||function(t,e){var n,r,i,o,g={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;g;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return g.label++,{value:o[1],done:!1};case 5:g.label++,r=o[1],o=[0];continue;case 7:o=g.ops.pop(),g.trys.pop();continue;default:if(!((i=(i=g.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){g=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0?n._ch.setupReceiveTimeout(1e3*s):n._log.info("Server located at "+n._address+" supplied an invalid connection receive timeout value ("+s+"). Please, verify the server configuration and status because this can be the symptom of a bigger issue.")}}}i(r)}})}))},e.prototype.protocol=function(){return this._protocol},Object.defineProperty(e.prototype,"address",{get:function(){return this._address},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._server.version},set:function(t){this._server.version=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"server",{get:function(){return this._server},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"logger",{get:function(){return this._log},enumerable:!1,configurable:!0}),e.prototype._handleFatalError=function(t){this._isBroken=!0,this._error=this.handleAndTransformError(this._protocol.currentFailure||t,this._address),this._log.isErrorEnabled()&&this._log.error("experienced a fatal error caused by "+this._error+" ("+C.json.stringify(this._error)+")"),this._protocol.notifyFatalError(this._error)},e.prototype._queueObserver=function(t){return this._protocol.queueObserverIfProtocolIsNotBroken(t)},e.prototype.hasOngoingObservableRequests=function(){return this._protocol.hasOngoingObservableRequests()},e.prototype.resetAndFlush=function(){var t=this;return new Promise((function(e,n){t._protocol.reset({onError:function(e){if(t._isBroken)n(e);else{var r=t._handleProtocolError("Received FAILURE as a response for RESET: "+e);n(r)}},onComplete:function(){e()}})}))},e.prototype._resetOnFailure=function(){var t=this;this.isOpen()&&this._protocol.reset({onError:function(){t._protocol.resetFailure()},onComplete:function(){t._protocol.resetFailure()}})},e.prototype._updateCurrentObserver=function(){this._protocol.updateCurrentObserver()},e.prototype.isOpen=function(){return!this._isBroken&&this._ch._open},e.prototype._handleOngoingRequestsNumberChange=function(t){0===t?this._ch.stopReceiveTimeout():this._ch.startReceiveTimeout()},e.prototype.close=function(){return o(this,void 0,void 0,(function(){return g(this,(function(t){switch(t.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 t.sent(),this._log.isDebugEnabled()&&this._log.debug("closed"),[2]}}))}))},e.prototype.toString=function(){return"Connection ["+this.id+"]["+(this.databaseId||"")+"]"},e.prototype._handleProtocolError=function(t){this._protocol.resetFailure(),this._updateCurrentObserver();var e=(0,C.newError)(t,u);return this._handleFatalError(e),e},e}(I.default);e.default=h},3124:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var g=function(t){function e(e,n){var r=t.call(this,n)||this;return n&&(r._originalErrorHandler=e._errorHandler,e._errorHandler=r._errorHandler),r._delegate=e,r}return i(e,t),Object.defineProperty(e.prototype,"id",{get:function(){return this._delegate.id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"databaseId",{get:function(){return this._delegate.databaseId},set:function(t){this._delegate.databaseId=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"server",{get:function(){return this._delegate.server},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"address",{get:function(){return this._delegate.address},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._delegate.version},set:function(t){this._delegate.version=t},enumerable:!1,configurable:!0}),e.prototype.isOpen=function(){return this._delegate.isOpen()},e.prototype.protocol=function(){return this._delegate.protocol()},e.prototype.connect=function(t,e){return this._delegate.connect(t,e)},e.prototype.write=function(t,e,n){return this._delegate.write(t,e,n)},e.prototype.resetAndFlush=function(){return this._delegate.resetAndFlush()},e.prototype.close=function(){return this._delegate.close()},e.prototype._release=function(){return this._originalErrorHandler&&(this._delegate._errorHandler=this._originalErrorHandler),this._delegate._release()},e}(o(n(7075)).default);e.default=g},6370:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(758),i=r.error.SERVICE_UNAVAILABLE,o=r.error.SESSION_EXPIRED,g=function(){function t(t,e,n,r){this._errorCode=t,this._handleUnavailability=e||s,this._handleWriteFailure=n||s,this._handleAuthorizationExpired=r||s}return t.create=function(e){return new t(e.errorCode,e.handleUnavailability,e.handleWriteFailure,e.handleAuthorizationExpired)},t.prototype.errorCode=function(){return this._errorCode},t.prototype.handleAndTransformError=function(t,e){return function(t){return t&&("Neo.ClientError.Security.AuthorizationExpired"===t.code||"Neo.ClientError.Security.TokenExpired"===t.code)}(t)?this._handleAuthorizationExpired(t,e):function(t){return!!t&&(t.code===o||t.code===i||"Neo.TransientError.General.DatabaseUnavailable"===t.code)}(t)?this._handleUnavailability(t,e):function(t){return!!t&&("Neo.ClientError.Cluster.NotALeader"===t.code||"Neo.ClientError.General.ForbiddenOnReadOnlyDatabase"===t.code)}(t)?this._handleWriteFailure(t,e):t},t}();function s(t){return t}e.default=g},7075:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this._errorHandler=t}return 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(t){throw new Error("not implemented")},enumerable:!1,configurable:!0}),t.prototype.isOpen=function(){throw new Error("not implemented")},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(t){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(t,e){throw new Error("not implemented")},t.prototype.write=function(t,e,n){throw new Error("not implemented")},t.prototype.resetAndFlush=function(){throw new Error("not implemented")},t.prototype.close=function(){throw new Error("not implemented")},t.prototype.handleAndTransformError=function(t,e){return this._errorHandler?this._errorHandler.handleAndTransformError(t,e):t},t}();e.default=n},870:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e},g=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.createChannelConnection=e.ConnectionErrorHandler=e.DelegateConnection=e.ChannelConnection=e.Connection=void 0;var s=g(n(7075));e.Connection=s.default;var A=o(n(7441));e.ChannelConnection=A.default,Object.defineProperty(e,"createChannelConnection",{enumerable:!0,get:function(){return A.createChannelConnection}});var C=g(n(3124));e.DelegateConnection=C.default;var I=g(n(6370));e.ConnectionErrorHandler=I.default,e.default=s.default},297:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e},g=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.pool=e.packstream=e.channel=e.buf=e.bolt=e.loadBalancing=void 0,e.loadBalancing=o(n(6836)),e.bolt=o(n(7778)),e.buf=o(n(7268)),e.channel=o(n(7078)),e.packstream=o(n(7687)),e.pool=o(n(2043)),g(n(1677),e)},6836:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.LeastConnectedLoadBalancingStrategy=e.LoadBalancingStrategy=void 0;var i=r(n(7986));e.LoadBalancingStrategy=i.default;var o=r(n(7865));e.LeastConnectedLoadBalancingStrategy=o.default,e.default=o.default},7865:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var g=o(n(226)),s=function(t){function e(e){var n=t.call(this)||this;return n._readersIndex=new g.default,n._writersIndex=new g.default,n._connectionPool=e,n}return i(e,t),e.prototype.selectReader=function(t){return this._select(t,this._readersIndex)},e.prototype.selectWriter=function(t){return this._select(t,this._writersIndex)},e.prototype._select=function(t,e){var n=t.length;if(0===n)return null;var r=e.next(n),i=r,o=null,g=Number.MAX_SAFE_INTEGER;do{var s=t[i],A=this._connectionPool.activeResourceCount(s);A{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.selectReader=function(t){throw new Error("Abstract function")},t.prototype.selectWriter=function(t){throw new Error("Abstract function")},t}();e.default=n},226:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this._offset=t||0}return t.prototype.next=function(t){if(0===t)return-1;var e=this._offset;return this._offset+=1,this._offset===Number.MAX_SAFE_INTEGER&&(this._offset=0),e%t},t}();e.default=n},7687:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.v2=e.v1=void 0;var g=o(n(843));e.v1=g;var s=o(n(6303));e.v2=s,e.default=s},5637:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.packDateTime=e.unpackDateTimeWithZoneId=e.unpackDateTimeWithZoneOffset=e.DATE_TIME_WITH_ZONE_ID=e.DATE_TIME_WITH_ZONE_OFFSET=void 0;var r=n(758),i=n(9735),o=r.internal.temporalUtil.localDateTimeToEpochSecond;function g(t,e,n){var i=new Intl.DateTimeFormat("en-US",{timeZone:t,year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1,era:"narrow"}),g=(0,r.int)(e).multiply(1e3).add((0,r.int)(n).div(1e6)).toNumber(),s=i.formatToParts(g).reduce((function(t,e){return"era"===e.type?t.adjustEra="B"===e.value.toUpperCase()?function(t){return t.subtract(1).negate()}:function(t){return t}:"literal"!==e.type&&(t[e.type]=(0,r.int)(e.value)),t}),{});s.year=s.adjustEra(s.year);var A=o(s.year,s.month,s.day,s.hour,s.minute,s.second,s.nanosecond);return s.timeZoneOffsetSeconds=A.subtract(e),s.hour=s.hour.modulo(24),s}function s(t,e,n){if(!e&&!n)return t;var i=function(t){return n?t.toBigInt():t.toNumberOrInfinity()},o=Object.create(Object.getPrototypeOf(t));for(var g in t)if(!0===Object.prototype.hasOwnProperty.call(t,g)){var s=t[g];o[g]=(0,r.isInt)(s)?i(s):s}return Object.freeze(o),o}e.DATE_TIME_WITH_ZONE_OFFSET=73,e.DATE_TIME_WITH_ZONE_ID=105,e.unpackDateTimeWithZoneOffset=function(t,e,n,o,g){t._verifyStructSize("DateTimeWithZoneOffset",3,e);var A=t.unpackInteger(n),C=t.unpackInteger(n),I=t.unpackInteger(n),a=(0,r.int)(A).add(I),u=(0,i.epochSecondAndNanoToLocalDateTime)(a,C);return s(new r.DateTime(u.year,u.month,u.day,u.hour,u.minute,u.second,u.nanosecond,I,null),o,g)},e.unpackDateTimeWithZoneId=function(t,e,n,i,o){t._verifyStructSize("DateTimeWithZoneId",3,e);var A=t.unpackInteger(n),C=t.unpackInteger(n),I=t.unpack(n),a=g(I,A,C);return s(new r.DateTime(a.year,a.month,a.day,a.hour,a.minute,a.second,(0,r.int)(C),a.timeZoneOffsetSeconds,I),i,o)},e.packDateTime=function(t,n){t.timeZoneId?function(t,n){var i=o(t.year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond),s=null!=t.timeZoneOffsetSeconds?t.timeZoneOffsetSeconds:function(t,e,n){var r=g(t,e,n),i=o(r.year,r.month,r.day,r.hour,r.minute,r.second,n).subtract(e),s=e.subtract(i),A=g(t,s,n);return o(A.year,A.month,A.day,A.hour,A.minute,A.second,n).subtract(s)}(t.timeZoneId,i,t.nanosecond),A=i.subtract(s),C=(0,r.int)(t.nanosecond),I=t.timeZoneId,a=[n.packable(A),n.packable(C),n.packable(I)];n.packStruct(e.DATE_TIME_WITH_ZONE_ID,a)}(t,n):function(t,n){var i=o(t.year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond),g=(0,r.int)(t.nanosecond),s=(0,r.int)(t.timeZoneOffsetSeconds),A=i.subtract(s),C=[n.packable(A),n.packable(g),n.packable(s)];n.packStruct(e.DATE_TIME_WITH_ZONE_OFFSET,C)}(t,n)}},843:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Structure=e.Unpacker=e.Packer=void 0;var r=n(7078),i=n(758),o=i.internal.objectUtil,g=i.error.PROTOCOL_ERROR,s=function(){function t(t,e){this.signature=t,this.fields=e}return t.prototype.toString=function(){for(var t="",e=0;e0&&(t+=", "),t+=this.fields[e];return"Structure("+this.signature+", ["+t+"])"},t}();e.Structure=s;var A=function(){function t(t){this._ch=t,this._byteArraysSupported=!0}return t.prototype.packable=function(t){var e,n=this;if(null===t)return function(){return n._ch.writeUInt8(192)};if(!0===t)return function(){return n._ch.writeUInt8(195)};if(!1===t)return function(){return n._ch.writeUInt8(194)};if("number"==typeof t)return function(){return n.packFloat(t)};if("string"==typeof t)return function(){return n.packString(t)};if("bigint"==typeof t)return function(){return n.packInteger((0,i.int)(t))};if((0,i.isInt)(t))return function(){return n.packInteger(t)};if(t instanceof Int8Array)return function(){return n.packBytes(t)};if(t instanceof Array)return function(){n.packListHeader(t.length);for(var e=0;e>0),this._ch.writeUInt8(n%256),this._ch.writeBytes(e);else{if(!(n<4294967296))throw(0,i.newError)("UTF-8 strings of size "+n+" are not supported");this._ch.writeUInt8(210),this._ch.writeUInt8((n/16777216>>0)%256),this._ch.writeUInt8((n/65536>>0)%256),this._ch.writeUInt8((n/256>>0)%256),this._ch.writeUInt8(n%256),this._ch.writeBytes(e)}},t.prototype.packListHeader=function(t){if(t<16)this._ch.writeUInt8(144|t);else if(t<256)this._ch.writeUInt8(212),this._ch.writeUInt8(t);else if(t<65536)this._ch.writeUInt8(213),this._ch.writeUInt8((t/256>>0)%256),this._ch.writeUInt8(t%256);else{if(!(t<4294967296))throw(0,i.newError)("Lists of size "+t+" are not supported");this._ch.writeUInt8(214),this._ch.writeUInt8((t/16777216>>0)%256),this._ch.writeUInt8((t/65536>>0)%256),this._ch.writeUInt8((t/256>>0)%256),this._ch.writeUInt8(t%256)}},t.prototype.packBytes=function(t){if(!this._byteArraysSupported)throw(0,i.newError)("Byte arrays are not supported by the database this driver is connected to");this.packBytesHeader(t.length);for(var e=0;e>0)%256),this._ch.writeUInt8(t%256);else{if(!(t<4294967296))throw(0,i.newError)("Byte arrays of size "+t+" are not supported");this._ch.writeUInt8(206),this._ch.writeUInt8((t/16777216>>0)%256),this._ch.writeUInt8((t/65536>>0)%256),this._ch.writeUInt8((t/256>>0)%256),this._ch.writeUInt8(t%256)}},t.prototype.packMapHeader=function(t){if(t<16)this._ch.writeUInt8(160|t);else if(t<256)this._ch.writeUInt8(216),this._ch.writeUInt8(t);else if(t<65536)this._ch.writeUInt8(217),this._ch.writeUInt8(t/256>>0),this._ch.writeUInt8(t%256);else{if(!(t<4294967296))throw(0,i.newError)("Maps of size "+t+" are not supported");this._ch.writeUInt8(218),this._ch.writeUInt8((t/16777216>>0)%256),this._ch.writeUInt8((t/65536>>0)%256),this._ch.writeUInt8((t/256>>0)%256),this._ch.writeUInt8(t%256)}},t.prototype.packStructHeader=function(t,e){if(t<16)this._ch.writeUInt8(176|t),this._ch.writeUInt8(e);else if(t<256)this._ch.writeUInt8(220),this._ch.writeUInt8(t),this._ch.writeUInt8(e);else{if(!(t<65536))throw(0,i.newError)("Structures of size "+t+" are not supported");this._ch.writeUInt8(221),this._ch.writeUInt8(t/256>>0),this._ch.writeUInt8(t%256)}},t.prototype.disableByteArrays=function(){this._byteArraysSupported=!1},t.prototype._nonPackableValue=function(t){return function(){throw(0,i.newError)(t,g)}},t}();e.Packer=A;var C=function(){function t(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1),this._disableLosslessIntegers=t,this._useBigInt=e}return t.prototype.unpack=function(t){var e=t.readUInt8(),n=240&e,r=15&e;if(192===e)return null;var o=this._unpackBoolean(e);if(null!==o)return o;var g=this._unpackNumberOrInteger(e,t);if(null!==g){if((0,i.isInt)(g)){if(this._useBigInt)return g.toBigInt();if(this._disableLosslessIntegers)return g.toNumberOrInfinity()}return g}var s=this._unpackString(e,n,r,t);if(null!==s)return s;var A=this._unpackList(e,n,r,t);if(null!==A)return A;var C=this._unpackByteArray(e,t);if(null!==C)return C;var I=this._unpackMap(e,n,r,t);if(null!==I)return I;var a=this._unpackStruct(e,n,r,t);if(null!==a)return a;throw(0,i.newError)("Unknown packed value with marker "+e.toString(16))},t.prototype.unpackInteger=function(t){var e=t.readUInt8(),n=this._unpackInteger(e,t);if(null==n)throw(0,i.newError)("Unable to unpack integer value with marker "+e.toString(16));return n},t.prototype._unpackBoolean=function(t){return 195===t||194!==t&&null},t.prototype._unpackNumberOrInteger=function(t,e){return 193===t?e.readFloat64():this._unpackInteger(t,e)},t.prototype._unpackInteger=function(t,e){if(t>=0&&t<128)return(0,i.int)(t);if(t>=240&&t<256)return(0,i.int)(t-256);if(200===t)return(0,i.int)(e.readInt8());if(201===t)return(0,i.int)(e.readInt16());if(202===t){var n=e.readInt32();return(0,i.int)(n)}if(203===t){var r=e.readInt32(),o=e.readInt32();return new i.Integer(o,r)}return null},t.prototype._unpackString=function(t,e,n,i){return 128===e?r.utf8.decode(i,n):208===t?r.utf8.decode(i,i.readUInt8()):209===t?r.utf8.decode(i,i.readUInt16()):210===t?r.utf8.decode(i,i.readUInt32()):null},t.prototype._unpackList=function(t,e,n,r){return 144===e?this._unpackListWithSize(n,r):212===t?this._unpackListWithSize(r.readUInt8(),r):213===t?this._unpackListWithSize(r.readUInt16(),r):214===t?this._unpackListWithSize(r.readUInt32(),r):null},t.prototype._unpackListWithSize=function(t,e){for(var n=[],r=0;r0?(a=r[I-1])instanceof i.UnboundRelationship&&(r[I-1]=a=a.bind(s.identity,C.identity)):(a=r[-I-1])instanceof i.UnboundRelationship&&(r[-I-1]=a=a.bind(C.identity,s.identity)),g.push(new i.PathSegment(s,a,C)),s=C}return new i.Path(n[0],n[n.length-1],g)},t.prototype._unpackUnknownStruct=function(t,e,n){for(var r=new s(t,[]),i=0;i{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.epochSecondAndNanoToLocalDateTime=e.nanoOfDayToLocalTime=e.epochDayToDate=void 0;var r=n(758),i=r.internal.temporalUtil,o=i.DAYS_0000_TO_1970,g=i.DAYS_PER_400_YEAR_CYCLE,s=i.NANOS_PER_HOUR,A=i.NANOS_PER_MINUTE,C=i.NANOS_PER_SECOND,I=i.SECONDS_PER_DAY,a=i.floorDiv,u=i.floorMod;function c(t){var e=(t=(0,r.int)(t)).add(o).subtract(60),n=(0,r.int)(0);if(e.lessThan(0)){var i=e.add(1).div(g).subtract(1);n=i.multiply(400),e=e.add(i.multiply(-g))}var s=e.multiply(400).add(591).div(g),A=e.subtract(s.multiply(365).add(s.div(4)).subtract(s.div(100)).add(s.div(400)));A.lessThan(0)&&(s=s.subtract(1),A=e.subtract(s.multiply(365).add(s.div(4)).subtract(s.div(100)).add(s.div(400)))),s=s.add(n);var C=A,I=C.multiply(5).add(2).div(153),a=I.add(2).modulo(12).add(1),u=C.subtract(I.multiply(306).add(5).div(10)).add(1);return s=s.add(I.div(10)),new r.Date(s,a,u)}function l(t){var e=(t=(0,r.int)(t)).div(s),n=(t=t.subtract(e.multiply(s))).div(A),i=(t=t.subtract(n.multiply(A))).div(C),o=t.subtract(i.multiply(C));return new r.LocalTime(e,n,i,o)}e.epochDayToDate=c,e.nanoOfDayToLocalTime=l,e.epochSecondAndNanoToLocalDateTime=function(t,e){var n=a(t,I),i=u(t,I).multiply(C).add(e),o=c(n),g=l(i);return new r.LocalDateTime(o.year,o.month,o.day,g.hour,g.minute,g.second,g.nanosecond)}},2043:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e},g=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_MAX_SIZE=e.DEFAULT_ACQUISITION_TIMEOUT=e.PoolConfig=e.Pool=void 0;var s=o(n(1269));e.PoolConfig=s.default,Object.defineProperty(e,"DEFAULT_ACQUISITION_TIMEOUT",{enumerable:!0,get:function(){return s.DEFAULT_ACQUISITION_TIMEOUT}}),Object.defineProperty(e,"DEFAULT_MAX_SIZE",{enumerable:!0,get:function(){return s.DEFAULT_MAX_SIZE}});var A=g(n(1971));e.Pool=A.default,e.default=A.default},1269:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_ACQUISITION_TIMEOUT=e.DEFAULT_MAX_SIZE=void 0;var n=100;e.DEFAULT_MAX_SIZE=n;var r=6e4;e.DEFAULT_ACQUISITION_TIMEOUT=r;var i=function(){function t(t,e){this.maxSize=o(t,n),this.acquisitionTimeout=o(e,r)}return t.defaultConfig=function(){return new t(n,r)},t.fromDriverConfig=function(e){return new t(g(e.maxConnectionPoolSize)?e.maxConnectionPoolSize:n,g(e.connectionAcquisitionTimeout)?e.connectionAcquisitionTimeout:r)},t}();function o(t,e){return 0===t||t?t:e}function g(t){return 0===t||t}e.default=i},1971:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function g(t){try{A(r.next(t))}catch(t){o(t)}}function s(t){try{A(r.throw(t))}catch(t){o(t)}}function A(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(g,s)}A((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,o,g={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;g;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return g.label++,{value:o[1],done:!1};case 5:g.label++,r=o[1],o=[0];continue;case 7:o=g.ops.pop(),g.trys.pop();continue;default:if(!((i=(i=g.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){g=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&this.activeResourceCount(t)+this._pendingCreates[e]>=this._maxSize)return[2,null];this._pendingCreates[e]=this._pendingCreates[e]+1,i.label=6;case 6:return i.trys.push([6,,8,9]),[4,this._create(t,(function(t,e){return A._release(r,t,e)}))];case 7:return g=i.sent(),I(e,this._activeResourceCounts),this._log.isDebugEnabled()&&this._log.debug(g+" created for the pool "+e),[3,9];case 8:return this._pendingCreates[e]=this._pendingCreates[e]-1,[7];case 9:return[2,g]}}))}))},t.prototype._release=function(t,e,n){return r(this,void 0,void 0,(function(){var r,o,g=this;return i(this,(function(i){switch(i.label){case 0:return r=e.asKey(),(o=this._pools[r])&&t&&t.isActive()?this._validate(n)?[3,2]:(this._log.isDebugEnabled()&&this._log.debug(n+" destroyed and can't be released to the pool "+r+" because it is not functional"),[4,this._destroy(n)]):[3,4];case 1:return i.sent(),[3,3];case 2:this._installIdleObserver&&this._installIdleObserver(n,{onError:function(t){g._log.debug("Idle connection "+n+" destroyed because of error: "+t);var e=g._pools[r];e&&(g._pools[r]=e.filter((function(t){return t!==n}))),g._destroy(n).catch((function(){}))}}),o.push(n),this._log.isDebugEnabled()&&this._log.debug(n+" released to the pool "+r),i.label=3;case 3:return[3,6];case 4:return this._log.isDebugEnabled()&&this._log.debug(n+" destroyed and can't be released to the pool "+r+" because pool has been purged"),[4,this._destroy(n)];case 5:i.sent(),i.label=6;case 6:return function(t,e){var n=(e[t]||0)-1;n>0?e[t]=n:delete e[t]}(r,this._activeResourceCounts),this._processPendingAcquireRequests(e),[2]}}))}))},t.prototype._purgeKey=function(t){return r(this,void 0,void 0,(function(){var e,n,r,o;return i(this,(function(i){switch(i.label){case 0:for(e=this._pools[t]||[],n=this._poolState[t]||new u,r=[];e.length;)o=e.pop(),this._removeIdleObserver&&this._removeIdleObserver(o),r.push(this._destroy(o));return n.close(),delete this._pools[t],delete this._poolState[t],[4,Promise.all(r)];case 1:return i.sent(),[2]}}))}))},t.prototype._processPendingAcquireRequests=function(t){var e=this,n=t.asKey(),r=this._acquireRequests[n],i=this._poolState[n];if(r){var o=r.shift();o?this._acquire(t).catch((function(t){return o.reject(t),null})).then((function(n){n&&(o.isCompleted()?e._release(i,t,n):o.resolve(n))})):delete this._acquireRequests[n]}},t}();function I(t,e){var n=e[t]||0;e[t]=n+1}var a=function(){function t(t,e,n,r,i){this._key=t,this._resolve=e,this._reject=n,this._timeoutId=r,this._log=i,this._completed=!1}return t.prototype.isCompleted=function(){return this._completed},t.prototype.resolve=function(t){this._completed||(this._completed=!0,clearTimeout(this._timeoutId),this._log.isDebugEnabled()&&this._log.debug(t+" acquired from the pool "+this._key),this._resolve(t))},t.prototype.reject=function(t){this._completed||(this._completed=!0,clearTimeout(this._timeoutId),this._reject(t))},t}(),u=function(){function t(){this._active=!0}return t.prototype.isActive=function(){return this._active},t.prototype.close=function(){this._active=!1},t}();e.default=C},4066:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.RoutingTable=e.Rediscovery=void 0;var i=r(n(8862));e.Rediscovery=i.default;var o=r(n(1852));e.RoutingTable=o.default,e.default=i.default},8862:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(1852)),o=n(7778),g=n(758),s=g.error.SERVICE_UNAVAILABLE,A=function(){function t(t){this._routingContext=t}return t.prototype.lookupRoutingTableOnRouter=function(t,e,n,r){var o=this;return t._acquireConnection((function(g){return o._requestRawRoutingTable(g,t,e,n,r).then((function(t){return t.isNull?null:i.default.fromRawRoutingTable(e,n,t)}))}))},t.prototype._requestRawRoutingTable=function(t,e,n,r,i){var A=this;return new Promise((function(C,I){t.protocol().requestRoutingInformation({routingContext:A._routingContext,databaseName:n,impersonatedUser:i,sessionContext:{bookmark:e._lastBookmark,mode:e._mode,database:e._database,afterComplete:e._onComplete},onCompleted:C,onError:function(t){"Neo.ClientError.Database.DatabaseNotFound"===t.code?I(t):"Neo.ClientError.Procedure.ProcedureNotFound"===t.code?I((0,g.newError)("Server at "+r.asHostPort()+" can't perform routing. Make sure you are connecting to a causal cluster",s)):C(o.RawRoutingTable.ofNull())}})}))},t}();e.default=A},1852:function(t,e,n){"use strict";var r=this&&this.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),g=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)g.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return g},i=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={basic:function(t,e,n){return n?{scheme:"basic",principal:t,credentials:e,realm:n}:{scheme:"basic",principal:t,credentials:e}},kerberos:function(t){return{scheme:"kerberos",principal:"",credentials:t}},bearer:function(t){return{scheme:"bearer",credentials:t}},custom:function(t,e,n,r,i){return i?{scheme:r,principal:t,credentials:e,realm:n,parameters:i}:{scheme:r,principal:t,credentials:e,realm:n}}}},3915:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.acquireConnection=function(t){throw Error("Not implemented")},t.prototype.supportsMultiDb=function(){throw Error("Not implemented")},t.prototype.supportsTransactionConfig=function(){throw Error("Not implemented")},t.prototype.supportsUserImpersonation=function(){throw Error("Not implemented")},t.prototype.close=function(){throw Error("Not implemented")},t}();e.default=n},5287:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){this.id="",this.databaseId=""}return t.prototype.isOpen=function(){return!1},t.prototype.protocol=function(){throw Error("Not implemented")},t.prototype.connect=function(t,e){throw Error("Not implemented")},t.prototype.write=function(t,e,n){throw Error("Not implemented")},t.prototype.resetAndFlush=function(){throw Error("Not implemented")},t.prototype.close=function(){throw Error("Not implemented")},t.prototype._release=function(){return Promise.resolve()},t}();e.default=n},5278:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.WRITE=e.READ=e.Driver=void 0;var i=n(9763),o=n(2783),g=r(n(1406)),s=n(2206),A=n(1205),C=r(n(4777)),I=n(7400),a=s.ACCESS_MODE_READ;e.READ=a;var u=s.ACCESS_MODE_WRITE;e.WRITE=u;var c=0,l=function(){function t(t,e,n,r){void 0===e&&(e={}),void 0===r&&(r=function(t){return new C.default(t)}),function(t){t.maxConnectionLifetime=h(t.maxConnectionLifetime,36e5),t.maxConnectionPoolSize=h(t.maxConnectionPoolSize,s.DEFAULT_POOL_MAX_SIZE),t.connectionAcquisitionTimeout=h(t.connectionAcquisitionTimeout,s.DEFAULT_POOL_ACQUISITION_TIMEOUT),t.fetchSize=d(t.fetchSize,1e3)}(e),function(t){var e=t.resolver;if(e&&"function"!=typeof e)throw new TypeError("Configured resolver should be a function. Got: "+e)}(e),this._id=c++,this._meta=t,this._config=e,this._log=A.Logger.create(e),this._createConnectionProvider=n,this._createSession=r,this._connectionProvider=null,this._afterConstruction()}return t.prototype.verifyConnectivity=function(t){var e=(void 0===t?{}:t).database,n=void 0===e?"":e,r=this._getOrCreateConnectionProvider();return new o.ConnectivityVerifier(r).verify({database:n})},t.prototype.supportsMultiDb=function(){return this._getOrCreateConnectionProvider().supportsMultiDb()},t.prototype.supportsTransactionConfig=function(){return this._getOrCreateConnectionProvider().supportsTransactionConfig()},t.prototype.supportsUserImpersonation=function(){return this._getOrCreateConnectionProvider().supportsUserImpersonation()},t.prototype._supportsRouting=function(){return this._meta.routing},t.prototype._isEncrypted=function(){return this._config.encrypted===I.ENCRYPTION_ON},t.prototype._getTrust=function(){return this._config.trust},t.prototype.session=function(t){var e=void 0===t?{}:t,n=e.defaultAccessMode,r=void 0===n?u:n,i=e.bookmarks,o=e.database,g=void 0===o?"":o,s=e.impersonatedUser,A=e.fetchSize;return this._newSession({defaultAccessMode:r,bookmarkOrBookmarks:i,database:g,reactive:!1,impersonatedUser:s,fetchSize:d(A,this._config.fetchSize)})},t.prototype.close=function(){return this._log.info("Driver "+this._id+" closing"),this._connectionProvider?this._connectionProvider.close():Promise.resolve()},t.prototype._afterConstruction=function(){this._log.info(this._meta.typename+" driver "+this._id+" created for server address "+this._meta.address)},t.prototype._newSession=function(t){var e=t.defaultAccessMode,n=t.bookmarkOrBookmarks,r=t.database,o=t.reactive,g=t.impersonatedUser,s=t.fetchSize,A=C.default._validateSessionMode(e),I=this._getOrCreateConnectionProvider(),a=n?new i.Bookmark(n):i.Bookmark.empty();return this._createSession({mode:A,database:r||"",connectionProvider:I,bookmark:a,config:this._config,reactive:o,impersonatedUser:g,fetchSize:s})},t.prototype._getOrCreateConnectionProvider=function(){var t;return this._connectionProvider||(this._connectionProvider=this._createConnectionProvider(this._id,this._config,this._log,(t=this._config,new g.default(t.resolver)))),this._connectionProvider},t}();function h(t,e){var n=parseInt(t,10);return n>0||0===n?n:n<0?Number.MAX_SAFE_INTEGER:e}function d(t,e){var n=parseInt(t,10);if(n>0||n===s.FETCH_ALL)return n;if(0===n||n<0)throw new Error("The fetch size can only be a positive value or "+s.FETCH_ALL+" for ALL. However fetchSize = "+n);return e}e.Driver=l,e.default=l},4949:function(t,e){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.PROTOCOL_ERROR=e.SESSION_EXPIRED=e.SERVICE_UNAVAILABLE=e.Neo4jError=e.newError=void 0,e.SERVICE_UNAVAILABLE="ServiceUnavailable",e.SESSION_EXPIRED="SessionExpired",e.PROTOCOL_ERROR="ProtocolError";var i=function(t){function e(n,r){var i=t.call(this,n)||this;return i.constructor=e,i.__proto__=e.prototype,i.code=r,i.name="Neo4jError",i}return r(e,t),e}(Error);e.Neo4jError=i,e.newError=function(t,e){return new i(t,null!=e?e:"N/A")}},8156:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isPathSegment=e.PathSegment=e.isPath=e.Path=e.isUnboundRelationship=e.UnboundRelationship=e.isRelationship=e.Relationship=e.isNode=e.Node=void 0;var r=n(2347),i={value:!0,enumerable:!1,configurable:!1,writable:!1},o="__isNode__",g="__isRelationship__",s="__isUnboundRelationship__",A="__isPath__",C="__isPathSegment__";function I(t,e){return!0===(t&&t[e])}var a=function(){function t(t,e,n){this.identity=t,this.labels=e,this.properties=n}return t.prototype.toString=function(){for(var t="("+this.identity,e=0;e0){for(t+=" {",e=0;e0&&(t+=","),t+=n[e]+":"+(0,r.stringify)(this.properties[n[e]]);t+="}"}return t+")"},t}();e.Node=a,Object.defineProperty(a.prototype,o,i),e.isNode=function(t){return I(t,o)};var u=function(){function t(t,e,n,r,i){this.identity=t,this.start=e,this.end=n,this.type=r,this.properties=i}return t.prototype.toString=function(){var t="("+this.start+")-[:"+this.type,e=Object.keys(this.properties);if(e.length>0){t+=" {";for(var n=0;n0&&(t+=","),t+=e[n]+":"+(0,r.stringify)(this.properties[e[n]]);t+="}"}return t+"]->("+this.end+")"},t}();e.Relationship=u,Object.defineProperty(u.prototype,g,i),e.isRelationship=function(t){return I(t,g)};var c=function(){function t(t,e,n){this.identity=t,this.type=e,this.properties=n}return t.prototype.bind=function(t,e){return new u(this.identity,t,e,this.type,this.properties)},t.prototype.toString=function(){var t="-[:"+this.type,e=Object.keys(this.properties);if(e.length>0){t+=" {";for(var n=0;n0&&(t+=","),t+=e[n]+":"+(0,r.stringify)(this.properties[e[n]]);t+="}"}return t+"]->"},t}();e.UnboundRelationship=c,Object.defineProperty(c.prototype,s,i),e.isUnboundRelationship=function(t){return I(t,s)};var l=function(t,e,n){this.start=t,this.relationship=e,this.end=n};e.PathSegment=l,Object.defineProperty(l.prototype,C,i),e.isPathSegment=function(t){return I(t,C)};var h=function(t,e,n){this.start=t,this.end=e,this.segments=n,this.length=n.length};e.Path=h,Object.defineProperty(h.prototype,A,i),e.isPath=function(t){return I(t,A)}},758:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e},g=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.types=e.Driver=e.Session=e.Transaction=e.Connection=e.ConnectionProvider=e.Result=e.Stats=e.QueryStatistics=e.ProfiledPlan=e.Plan=e.Notification=e.ServerInfo=e.queryType=e.ResultSummary=e.Record=e.isPathSegment=e.PathSegment=e.isPath=e.Path=e.isUnboundRelationship=e.UnboundRelationship=e.isRelationship=e.Relationship=e.isNode=e.Node=e.Time=e.LocalTime=e.LocalDateTime=e.isTime=e.isLocalTime=e.isLocalDateTime=e.isDuration=e.isDateTime=e.isDate=e.Duration=e.DateTime=e.Date=e.Point=e.isPoint=e.internal=e.toString=e.toNumber=e.inSafeRange=e.isInt=e.int=e.Integer=e.error=e.Neo4jError=e.newError=void 0,e.auth=e.json=e.driver=void 0;var s=n(4949);Object.defineProperty(e,"newError",{enumerable:!0,get:function(){return s.newError}}),Object.defineProperty(e,"Neo4jError",{enumerable:!0,get:function(){return s.Neo4jError}});var A=o(n(6720));e.Integer=A.default,Object.defineProperty(e,"int",{enumerable:!0,get:function(){return A.int}}),Object.defineProperty(e,"isInt",{enumerable:!0,get:function(){return A.isInt}}),Object.defineProperty(e,"inSafeRange",{enumerable:!0,get:function(){return A.inSafeRange}}),Object.defineProperty(e,"toNumber",{enumerable:!0,get:function(){return A.toNumber}}),Object.defineProperty(e,"toString",{enumerable:!0,get:function(){return A.toString}});var C=n(8718);Object.defineProperty(e,"Date",{enumerable:!0,get:function(){return C.Date}}),Object.defineProperty(e,"DateTime",{enumerable:!0,get:function(){return C.DateTime}}),Object.defineProperty(e,"Duration",{enumerable:!0,get:function(){return C.Duration}}),Object.defineProperty(e,"isDate",{enumerable:!0,get:function(){return C.isDate}}),Object.defineProperty(e,"isDateTime",{enumerable:!0,get:function(){return C.isDateTime}}),Object.defineProperty(e,"isDuration",{enumerable:!0,get:function(){return C.isDuration}}),Object.defineProperty(e,"isLocalDateTime",{enumerable:!0,get:function(){return C.isLocalDateTime}}),Object.defineProperty(e,"isLocalTime",{enumerable:!0,get:function(){return C.isLocalTime}}),Object.defineProperty(e,"isTime",{enumerable:!0,get:function(){return C.isTime}}),Object.defineProperty(e,"LocalDateTime",{enumerable:!0,get:function(){return C.LocalDateTime}}),Object.defineProperty(e,"LocalTime",{enumerable:!0,get:function(){return C.LocalTime}}),Object.defineProperty(e,"Time",{enumerable:!0,get:function(){return C.Time}});var I=n(8156);Object.defineProperty(e,"Node",{enumerable:!0,get:function(){return I.Node}}),Object.defineProperty(e,"isNode",{enumerable:!0,get:function(){return I.isNode}}),Object.defineProperty(e,"Relationship",{enumerable:!0,get:function(){return I.Relationship}}),Object.defineProperty(e,"isRelationship",{enumerable:!0,get:function(){return I.isRelationship}}),Object.defineProperty(e,"UnboundRelationship",{enumerable:!0,get:function(){return I.UnboundRelationship}}),Object.defineProperty(e,"isUnboundRelationship",{enumerable:!0,get:function(){return I.isUnboundRelationship}}),Object.defineProperty(e,"Path",{enumerable:!0,get:function(){return I.Path}}),Object.defineProperty(e,"isPath",{enumerable:!0,get:function(){return I.isPath}}),Object.defineProperty(e,"PathSegment",{enumerable:!0,get:function(){return I.PathSegment}}),Object.defineProperty(e,"isPathSegment",{enumerable:!0,get:function(){return I.isPathSegment}});var a=g(n(1104));e.Record=a.default;var u=n(8729);Object.defineProperty(e,"isPoint",{enumerable:!0,get:function(){return u.isPoint}}),Object.defineProperty(e,"Point",{enumerable:!0,get:function(){return u.Point}});var c=o(n(260));e.ResultSummary=c.default,Object.defineProperty(e,"queryType",{enumerable:!0,get:function(){return c.queryType}}),Object.defineProperty(e,"ServerInfo",{enumerable:!0,get:function(){return c.ServerInfo}}),Object.defineProperty(e,"Notification",{enumerable:!0,get:function(){return c.Notification}}),Object.defineProperty(e,"Plan",{enumerable:!0,get:function(){return c.Plan}}),Object.defineProperty(e,"ProfiledPlan",{enumerable:!0,get:function(){return c.ProfiledPlan}}),Object.defineProperty(e,"QueryStatistics",{enumerable:!0,get:function(){return c.QueryStatistics}}),Object.defineProperty(e,"Stats",{enumerable:!0,get:function(){return c.Stats}});var l=g(n(9675));e.Result=l.default;var h=g(n(3915));e.ConnectionProvider=h.default;var d=g(n(5287));e.Connection=d.default;var f=g(n(7561));e.Transaction=f.default;var p=g(n(4777));e.Session=p.default;var v=o(n(5278)),y=v;e.Driver=v.default,e.driver=y;var b=g(n(1251));e.auth=b.default;var m=o(n(5833));e.types=m;var w=o(n(2347));e.json=w;var _=o(n(6457));e.internal=_;var x={SERVICE_UNAVAILABLE:s.SERVICE_UNAVAILABLE,SESSION_EXPIRED:s.SESSION_EXPIRED,PROTOCOL_ERROR:s.PROTOCOL_ERROR};e.error=x;var E={newError:s.newError,Neo4jError:s.Neo4jError,error:x,Integer:A.default,int:A.int,isInt:A.isInt,inSafeRange:A.inSafeRange,toNumber:A.toNumber,toString:A.toString,internal:_,isPoint:u.isPoint,Point:u.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:I.Node,isNode:I.isNode,Relationship:I.Relationship,isRelationship:I.isRelationship,UnboundRelationship:I.UnboundRelationship,isUnboundRelationship:I.isUnboundRelationship,Path:I.Path,isPath:I.isPath,PathSegment:I.PathSegment,isPathSegment:I.isPathSegment,Record:a.default,ResultSummary:c.default,queryType:c.queryType,ServerInfo:c.ServerInfo,Notification:c.Notification,Plan:c.Plan,ProfiledPlan:c.ProfiledPlan,QueryStatistics:c.QueryStatistics,Stats:c.Stats,Result:l.default,Transaction:f.default,Session:p.default,Driver:v.default,Connection:d.default,types:m,driver:y,json:w,auth:b.default};e.default=E},6720:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toString=e.toNumber=e.inSafeRange=e.isInt=e.int=void 0;var r=n(4949),i=new Map,o=function(){function t(t,e){this.low=t||0,this.high=e||0}return t.prototype.inSafeRange=function(){return this.greaterThanOrEqual(t.MIN_SAFE_VALUE)&&this.lessThanOrEqual(t.MAX_SAFE_VALUE)},t.prototype.toInt=function(){return this.low},t.prototype.toNumber=function(){return this.high*s+(this.low>>>0)},t.prototype.toBigInt=function(){if(this.isZero())return BigInt(0);if(this.isPositive())return BigInt(this.high>>>0)*BigInt(s)+BigInt(this.low>>>0);var t=this.negate();return BigInt(-1)*(BigInt(t.high>>>0)*BigInt(s)+BigInt(t.low>>>0))},t.prototype.toNumberOrInfinity=function(){return this.lessThan(t.MIN_SAFE_VALUE)?Number.NEGATIVE_INFINITY:this.greaterThan(t.MAX_SAFE_VALUE)?Number.POSITIVE_INFINITY:this.toNumber()},t.prototype.toString=function(e){if((e=e||10)<2||e>36)throw RangeError("radix out of range: "+e);if(this.isZero())return"0";var n;if(this.isNegative()){if(this.equals(t.MIN_VALUE)){var r=t.fromNumber(e),i=this.div(r);return n=i.multiply(r).subtract(this),i.toString(e)+n.toInt().toString(e)}return"-"+this.negate().toString(e)}var o=t.fromNumber(Math.pow(e,6));n=this;for(var g="";;){var s=n.div(o),A=(n.subtract(s.multiply(o)).toInt()>>>0).toString(e);if((n=s).isZero())return A+g;for(;A.length<6;)A="0"+A;g=""+A+g}},t.prototype.getHighBits=function(){return this.high},t.prototype.getLowBits=function(){return this.low},t.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.equals(t.MIN_VALUE)?64:this.negate().getNumBitsAbs();for(var e=0!==this.high?this.high:this.low,n=31;n>0&&0==(e&1<=0},t.prototype.isOdd=function(){return 1==(1&this.low)},t.prototype.isEven=function(){return 0==(1&this.low)},t.prototype.equals=function(e){var n=t.fromValue(e);return this.high===n.high&&this.low===n.low},t.prototype.notEquals=function(t){return!this.equals(t)},t.prototype.lessThan=function(t){return this.compare(t)<0},t.prototype.lessThanOrEqual=function(t){return this.compare(t)<=0},t.prototype.greaterThan=function(t){return this.compare(t)>0},t.prototype.greaterThanOrEqual=function(t){return this.compare(t)>=0},t.prototype.compare=function(e){var n=t.fromValue(e);if(this.equals(n))return 0;var r=this.isNegative(),i=n.isNegative();return r&&!i?-1:!r&&i?1:this.subtract(n).isNegative()?-1:1},t.prototype.negate=function(){return this.equals(t.MIN_VALUE)?t.MIN_VALUE:this.not().add(t.ONE)},t.prototype.add=function(e){var n=t.fromValue(e),r=this.high>>>16,i=65535&this.high,o=this.low>>>16,g=65535&this.low,s=n.high>>>16,A=65535&n.high,C=n.low>>>16,I=0,a=0,u=0,c=0;return u+=(c+=g+(65535&n.low))>>>16,c&=65535,a+=(u+=o+C)>>>16,u&=65535,I+=(a+=i+A)>>>16,a&=65535,I+=r+s,I&=65535,t.fromBits(u<<16|c,I<<16|a)},t.prototype.subtract=function(e){var n=t.fromValue(e);return this.add(n.negate())},t.prototype.multiply=function(e){if(this.isZero())return t.ZERO;var n=t.fromValue(e);if(n.isZero())return t.ZERO;if(this.equals(t.MIN_VALUE))return n.isOdd()?t.MIN_VALUE:t.ZERO;if(n.equals(t.MIN_VALUE))return this.isOdd()?t.MIN_VALUE:t.ZERO;if(this.isNegative())return n.isNegative()?this.negate().multiply(n.negate()):this.negate().multiply(n).negate();if(n.isNegative())return this.multiply(n.negate()).negate();if(this.lessThan(C)&&n.lessThan(C))return t.fromNumber(this.toNumber()*n.toNumber());var r=this.high>>>16,i=65535&this.high,o=this.low>>>16,g=65535&this.low,s=n.high>>>16,A=65535&n.high,I=n.low>>>16,a=65535&n.low,u=0,c=0,l=0,h=0;return l+=(h+=g*a)>>>16,h&=65535,c+=(l+=o*a)>>>16,l&=65535,c+=(l+=g*I)>>>16,l&=65535,u+=(c+=i*a)>>>16,c&=65535,u+=(c+=o*I)>>>16,c&=65535,u+=(c+=g*A)>>>16,c&=65535,u+=r*a+i*I+o*A+g*s,u&=65535,t.fromBits(l<<16|h,u<<16|c)},t.prototype.div=function(e){var n,i,o,g=t.fromValue(e);if(g.isZero())throw(0,r.newError)("division by zero");if(this.isZero())return t.ZERO;if(this.equals(t.MIN_VALUE))return g.equals(t.ONE)||g.equals(t.NEG_ONE)?t.MIN_VALUE:g.equals(t.MIN_VALUE)?t.ONE:(n=this.shiftRight(1).div(g).shiftLeft(1)).equals(t.ZERO)?g.isNegative()?t.ONE:t.NEG_ONE:(i=this.subtract(g.multiply(n)),o=n.add(i.div(g)));if(g.equals(t.MIN_VALUE))return t.ZERO;if(this.isNegative())return g.isNegative()?this.negate().div(g.negate()):this.negate().div(g).negate();if(g.isNegative())return this.div(g.negate()).negate();for(o=t.ZERO,i=this;i.greaterThanOrEqual(g);){n=Math.max(1,Math.floor(i.toNumber()/g.toNumber()));for(var s=Math.ceil(Math.log(n)/Math.LN2),A=s<=48?1:Math.pow(2,s-48),C=t.fromNumber(n),I=C.multiply(g);I.isNegative()||I.greaterThan(i);)n-=A,I=(C=t.fromNumber(n)).multiply(g);C.isZero()&&(C=t.ONE),o=o.add(C),i=i.subtract(I)}return o},t.prototype.modulo=function(e){var n=t.fromValue(e);return this.subtract(this.div(n).multiply(n))},t.prototype.not=function(){return t.fromBits(~this.low,~this.high)},t.prototype.and=function(e){var n=t.fromValue(e);return t.fromBits(this.low&n.low,this.high&n.high)},t.prototype.or=function(e){var n=t.fromValue(e);return t.fromBits(this.low|n.low,this.high|n.high)},t.prototype.xor=function(e){var n=t.fromValue(e);return t.fromBits(this.low^n.low,this.high^n.high)},t.prototype.shiftLeft=function(e){var n=t.toNumber(e);return 0==(n&=63)?t.ZERO:n<32?t.fromBits(this.low<>>32-n):t.fromBits(0,this.low<>>n|this.high<<32-n,this.high>>n):t.fromBits(this.high>>n-32,this.high>=0?0:-1)},t.isInteger=function(t){return!0===(t&&t.__isInteger__)},t.fromInt=function(e){var n,r;return(e|=0)>=-128&&e<128&&(r=i.get(e))?r:(n=new t(e,e<0?-1:0),e>=-128&&e<128&&i.set(e,n),n)},t.fromBits=function(e,n){return new t(e,n)},t.fromNumber=function(e){return isNaN(e)||!isFinite(e)?t.ZERO:e<=-A?t.MIN_VALUE:e+1>=A?t.MAX_VALUE:e<0?t.fromNumber(-e).negate():new t(e%s|0,e/s|0)},t.fromString=function(e,n,i){var o,s=(void 0===i?{}:i).strictStringValidation;if(0===e.length)throw(0,r.newError)("number format error: empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return t.ZERO;if((n=n||10)<2||n>36)throw(0,r.newError)("radix out of range: "+n);if((o=e.indexOf("-"))>0)throw(0,r.newError)('number format error: interior "-" character: '+e);if(0===o)return t.fromString(e.substring(1),n).negate();for(var A=t.fromNumber(Math.pow(n,8)),C=t.ZERO,I=0;I{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConnectivityVerifier=void 0;var r=n(1474),i=n(2206),o=n(4949),g=function(){function t(t){this._connectionProvider=t}return t.prototype.verify=function(t){var e=(void 0===t?{}:t).database,n=void 0===e?"":e;return function(t,e){var n=new r.ConnectionHolder({mode:i.ACCESS_MODE_READ,database:e,connectionProvider:t});return n.initializeConnection(),n.getConnection().then((function(t){if(!t)throw(0,o.newError)("Unexpected error acquiring transaction");return n.close().then((function(){return t.server}))})).catch((function(t){return n.close().catch((function(t){})).then((function(){return Promise.reject(t)}))}))}(this._connectionProvider,n)},t}();e.ConnectivityVerifier=g},2206:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BOLT_PROTOCOL_V4_4=e.BOLT_PROTOCOL_V4_3=e.BOLT_PROTOCOL_V4_2=e.BOLT_PROTOCOL_V4_1=e.BOLT_PROTOCOL_V4_0=e.BOLT_PROTOCOL_V3=e.BOLT_PROTOCOL_V2=e.BOLT_PROTOCOL_V1=e.DEFAULT_POOL_MAX_SIZE=e.DEFAULT_POOL_ACQUISITION_TIMEOUT=e.ACCESS_MODE_WRITE=e.ACCESS_MODE_READ=e.FETCH_ALL=void 0,e.FETCH_ALL=-1,e.DEFAULT_POOL_ACQUISITION_TIMEOUT=6e4,e.DEFAULT_POOL_MAX_SIZE=100,e.ACCESS_MODE_READ="READ",e.ACCESS_MODE_WRITE="WRITE",e.BOLT_PROTOCOL_V1=1,e.BOLT_PROTOCOL_V2=2,e.BOLT_PROTOCOL_V3=3,e.BOLT_PROTOCOL_V4_0=4,e.BOLT_PROTOCOL_V4_1=4.1,e.BOLT_PROTOCOL_V4_2=4.2,e.BOLT_PROTOCOL_V4_3=4.3,e.BOLT_PROTOCOL_V4_4=4.4},6457:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.objectUtil=e.retryStrategy=e.resolver=e.serverAddress=e.urlUtil=e.logger=e.connectivityVerifier=e.transactionExecutor=e.txConfig=e.connectionHolder=e.constants=e.bookmark=e.observer=e.temporalUtil=e.util=void 0;var g=o(n(7400));e.util=g;var s=o(n(3355));e.temporalUtil=s;var A=o(n(2130));e.observer=A;var C=o(n(9763));e.bookmark=C;var I=o(n(2206));e.constants=I;var a=o(n(1474));e.connectionHolder=a;var u=o(n(5838));e.txConfig=u;var c=o(n(1475));e.transactionExecutor=c;var l=o(n(2783));e.connectivityVerifier=l;var h=o(n(1205));e.logger=h;var d=o(n(4434));e.urlUtil=d;var f=o(n(4));e.serverAddress=f;var p=o(n(5447));e.resolver=p;var v=o(n(9297));e.retryStrategy=v;var y=o(n(2775));e.objectUtil=y},1205:function(t,e,n){"use strict";var r,i,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.Logger=void 0;var g=n(4949),s="error",A="warn",C="info",I="debug",a=C,u=((i={})[s]=0,i[A]=1,i[C]=2,i[I]=3,i),c=function(){function t(t,e){this._level=t,this._loggerFunction=e}return t.create=function(e){if(e&&e.logging){var n=e.logging,r=function(t){if(t&&t.level){var e=t.level,n=u[e];if(!n&&0!==n)throw(0,g.newError)("Illegal logging level: "+e+". Supported levels are: "+Object.keys(u));return e}return a}(n),i=function(t){if(t&&t.logger){var e=t.logger;if(e&&"function"==typeof e)return e}throw(0,g.newError)("Illegal logger function: "+t.logger)}(n);return new t(r,i)}return this.noOp()},t.noOp=function(){return l},t.prototype.isErrorEnabled=function(){return h(this._level,s)},t.prototype.error=function(t){this.isErrorEnabled()&&this._loggerFunction(s,t)},t.prototype.isWarnEnabled=function(){return h(this._level,A)},t.prototype.warn=function(t){this.isWarnEnabled()&&this._loggerFunction(A,t)},t.prototype.isInfoEnabled=function(){return h(this._level,C)},t.prototype.info=function(t){this.isInfoEnabled()&&this._loggerFunction(C,t)},t.prototype.isDebugEnabled=function(){return h(this._level,I)},t.prototype.debug=function(t){this.isDebugEnabled()&&this._loggerFunction(I,t)},t}();e.Logger=c;var l=new(function(t){function e(){return t.call(this,C,(function(t,e){}))||this}return o(e,t),e.prototype.isErrorEnabled=function(){return!1},e.prototype.error=function(t){},e.prototype.isWarnEnabled=function(){return!1},e.prototype.warn=function(t){},e.prototype.isInfoEnabled=function(){return!1},e.prototype.info=function(t){},e.prototype.isDebugEnabled=function(){return!1},e.prototype.debug=function(t){},e}(c));function h(t,e){return u[t]>=u[e]}},2775:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getBrokenObjectReason=e.isBrokenObject=e.createBrokenObject=void 0;var n="__isBrokenObject__",r="__reason__";e.createBrokenObject=function(t,e){void 0===e&&(e={});var i=function(){throw t};return new Proxy(e,{get:function(e,o){return o===n||(o===r?t:void("toJSON"!==o&&i()))},set:i,apply:i,construct:i,defineProperty:i,deleteProperty:i,getOwnPropertyDescriptor:i,getPrototypeOf:i,has:i,isExtensible:i,ownKeys:i,preventExtensions:i,setPrototypeOf:i})},e.isBrokenObject=function(t){return null!==t&&"object"==typeof t&&!0===t[n]},e.getBrokenObjectReason=function(t){return t[r]}},2130:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FailedObserver=e.CompletedObserver=void 0;var n=function(){function t(){}return t.prototype.subscribe=function(t){i(t,t.onKeys,[]),i(t,t.onCompleted,{})},t.prototype.cancel=function(){},t.prototype.prepareToHandleSingleResponse=function(){},t.prototype.markCompleted=function(){},t.prototype.onError=function(t){throw Error("CompletedObserver not supposed to call onError")},t}();e.CompletedObserver=n;var r=function(){function t(t){var e=t.error,n=t.onError;this._error=e,this._beforeError=n,this._observers=[],this.onError(e)}return t.prototype.subscribe=function(t){i(t,t.onError,this._error),this._observers.push(t)},t.prototype.onError=function(t){var e=this;Promise.resolve(i(this,this._beforeError,t)).then((function(){return e._observers.forEach((function(e){return i(e,e.onError,t)}))}))},t.prototype.cancel=function(){},t.prototype.prepareToHandleSingleResponse=function(){},t.prototype.markCompleted=function(){},t}();function i(t,e,n){e&&e.bind(t)(n)}e.FailedObserver=r},7517:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.resolve=function(){throw new Error("Abstract function")},t.prototype._resolveToItself=function(t){return Promise.resolve([t])},t}();e.default=n},1406:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(4);function i(t){return Promise.resolve([t])}var o=function(){function t(t){this._resolverFunction=t||i}return t.prototype.resolve=function(t){var e=this;return new Promise((function(n){return n(e._resolverFunction(t.asHostPort()))})).then((function(t){if(!Array.isArray(t))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 ':'. Got: "+t);return t.map((function(t){return r.ServerAddress.fromUrl(t)}))}))},t}();e.default=o},5447:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.ConfiguredCustomResolver=e.BaseHostNameResolver=void 0;var i=r(n(7517));e.BaseHostNameResolver=i.default;var o=r(n(1406));e.ConfiguredCustomResolver=o.default},9297:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.canRetryOn=void 0;var r=n(4949);e.canRetryOn=function(t){return t&&t instanceof r.Neo4jError&&t.code&&(t.code===r.SERVICE_UNAVAILABLE||t.code===r.SESSION_EXPIRED||"Neo.ClientError.Security.AuthorizationExpired"===t.code||(e=t.code).indexOf("TransientError")>=0&&"Neo.TransientError.Transaction.Terminated"!==e&&"Neo.TransientError.Transaction.LockClientStopped"!==e);var e}},4:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.ServerAddress=void 0;var g=n(7400),s=o(n(4434)),A=function(){function t(t,e,n,r){this._host=(0,g.assertString)(t,"host"),this._resolved=e?(0,g.assertString)(e,"resolved"):null,this._port=(0,g.assertNumber)(n,"port"),this._hostPort=r,this._stringValue=e?r+"("+e+")":""+r}return t.prototype.host=function(){return this._host},t.prototype.resolvedHost=function(){return this._resolved?this._resolved:this._host},t.prototype.port=function(){return this._port},t.prototype.resolveWith=function(e){return new t(this._host,e,this._port,this._hostPort)},t.prototype.asHostPort=function(){return this._hostPort},t.prototype.asKey=function(){return this._hostPort},t.prototype.toString=function(){return this._stringValue},t.fromUrl=function(e){var n=s.parseDatabaseUrl(e);return new t(n.host,null,n.port,n.hostAndPort)},t}();e.ServerAddress=A},3355:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.floorMod=e.floorDiv=e.assertValidZoneId=e.assertValidNanosecond=e.assertValidSecond=e.assertValidMinute=e.assertValidHour=e.assertValidDay=e.assertValidMonth=e.assertValidYear=e.timeZoneOffsetInSeconds=e.totalNanoseconds=e.newDate=e.toStandardDate=e.isoStringToStandardDate=e.dateToIsoString=e.timeZoneOffsetToIsoString=e.timeToIsoString=e.durationToIsoString=e.dateToEpochDay=e.localDateTimeToEpochSecond=e.localTimeToNanoOfDay=e.normalizeNanosecondsForDuration=e.normalizeSecondsForDuration=e.SECONDS_PER_DAY=e.DAYS_PER_400_YEAR_CYCLE=e.DAYS_0000_TO_1970=e.NANOS_PER_HOUR=e.NANOS_PER_MINUTE=e.NANOS_PER_MILLISECOND=e.NANOS_PER_SECOND=e.SECONDS_PER_HOUR=e.SECONDS_PER_MINUTE=e.MINUTES_PER_HOUR=e.NANOSECOND_OF_SECOND_RANGE=e.SECOND_OF_MINUTE_RANGE=e.MINUTE_OF_HOUR_RANGE=e.HOUR_OF_DAY_RANGE=e.DAY_OF_MONTH_RANGE=e.MONTH_OF_YEAR_RANGE=e.YEAR_RANGE=void 0;var g=o(n(6720)),s=n(4949),A=n(7400),C=function(){function t(t,e){this._minNumber=t,this._maxNumber=e,this._minInteger=(0,g.int)(t),this._maxInteger=(0,g.int)(e)}return t.prototype.contains=function(t){if((0,g.isInt)(t)&&t instanceof g.default)return t.greaterThanOrEqual(this._minInteger)&&t.lessThanOrEqual(this._maxInteger);if("bigint"==typeof t){var e=(0,g.int)(t);return e.greaterThanOrEqual(this._minInteger)&&e.lessThanOrEqual(this._maxInteger)}return t>=this._minNumber&&t<=this._maxNumber},t.prototype.toString=function(){return"["+this._minNumber+", "+this._maxNumber+"]"},t}();function I(t,n,r){t=(0,g.int)(t),n=(0,g.int)(n),r=(0,g.int)(r);var i=t.multiply(365);return i=(i=(i=t.greaterThanOrEqual(0)?i.add(t.add(3).div(4).subtract(t.add(99).div(100)).add(t.add(399).div(400))):i.subtract(t.div(-4).subtract(t.div(-100)).add(t.div(-400)))).add(n.multiply(367).subtract(362).div(12))).add(r.subtract(1)),n.greaterThan(2)&&(i=i.subtract(1),function(t){return!(!(t=(0,g.int)(t)).modulo(4).equals(0)||t.modulo(100).equals(0)&&!t.modulo(400).equals(0))}(t)||(i=i.subtract(1))),i.subtract(e.DAYS_0000_TO_1970)}function a(t,e,n){if((0,A.assertNumberOrInteger)(t,n),!e.contains(t))throw(0,s.newError)(n+" is expected to be in range "+e+" but was: "+t);return t}function u(t,e){t=(0,g.int)(t),e=(0,g.int)(e);var n=t.div(e);return t.isPositive()!==e.isPositive()&&n.multiply(e).notEquals(t)&&(n=n.subtract(1)),n}function c(t,e){return t=(0,g.int)(t),e=(0,g.int)(e),t.subtract(u(t,e).multiply(e))}function l(t){return(t=(0,g.int)(t)).equals(0)?"":"."+h(t,9)}function h(t,e,n){var r=(t=(0,g.int)(t)).isNegative();r&&(t=t.negate());var i=t.toString();if(e)for(;i.length=t.getUTCSeconds()?t.getSeconds()-t.getUTCSeconds():t.getSeconds()-t.getUTCSeconds()+60,r=t.getTimezoneOffset();return 0===r?0+n:-1*r*e.SECONDS_PER_MINUTE+n},e.assertValidYear=function(t){return a(t,e.YEAR_RANGE,"Year")},e.assertValidMonth=function(t){return a(t,e.MONTH_OF_YEAR_RANGE,"Month")},e.assertValidDay=function(t){return a(t,e.DAY_OF_MONTH_RANGE,"Day")},e.assertValidHour=function(t){return a(t,e.HOUR_OF_DAY_RANGE,"Hour")},e.assertValidMinute=function(t){return a(t,e.MINUTE_OF_HOUR_RANGE,"Minute")},e.assertValidSecond=function(t){return a(t,e.SECOND_OF_MINUTE_RANGE,"Second")},e.assertValidNanosecond=function(t){return a(t,e.NANOSECOND_OF_SECOND_RANGE,"Nanosecond")},e.assertValidZoneId=function(t,e){try{Intl.DateTimeFormat(void 0,{timeZone:e})}catch(n){throw(0,s.newError)(t+' is expected to be a valid ZoneId but was: "'+e+'"')}},e.floorDiv=u,e.floorMod=c},1475:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TransactionExecutor=void 0;var r=n(4949),i=n(9297),o=function(){function t(t,e,n,r){this._maxRetryTimeMs=g(t,3e4),this._initialRetryDelayMs=g(e,1e3),this._multiplier=g(n,2),this._jitterFactor=g(r,.2),this._inFlightTimeoutIds=[],this._verifyAfterConstruction()}return t.prototype.execute=function(t,e){var n=this;return new Promise((function(r,i){n._executeTransactionInsidePromise(t,e,r,i)})).catch((function(r){var i=Date.now(),o=n._initialRetryDelayMs;return n._retryTransactionPromise(t,e,r,i,o)}))},t.prototype.close=function(){this._inFlightTimeoutIds.forEach((function(t){return clearTimeout(t)})),this._inFlightTimeoutIds=[]},t.prototype._retryTransactionPromise=function(t,e,n,r,o){var g=this;return Date.now()-r>this._maxRetryTimeMs||!(0,i.canRetryOn)(n)?Promise.reject(n):new Promise((function(n,r){var i=g._computeDelayWithJitter(o),s=setTimeout((function(){g._inFlightTimeoutIds=g._inFlightTimeoutIds.filter((function(t){return t!==s})),g._executeTransactionInsidePromise(t,e,n,r)}),i);g._inFlightTimeoutIds.push(s)})).catch((function(n){var i=o*g._multiplier;return g._retryTransactionPromise(t,e,n,r,i)}))},t.prototype._executeTransactionInsidePromise=function(t,e,n,r){var i,o=this;try{i=t()}catch(t){return void r(t)}this._safeExecuteTransactionWork(i,e).then((function(t){return o._handleTransactionWorkSuccess(t,i,n,r)})).catch((function(t){return o._handleTransactionWorkFailure(t,i,r)}))},t.prototype._safeExecuteTransactionWork=function(t,e){try{var n=e(t);return Promise.resolve(n)}catch(t){return Promise.reject(t)}},t.prototype._handleTransactionWorkSuccess=function(t,e,n,r){e.isOpen()?e.commit().then((function(){n(t)})).catch((function(t){r(t)})):n(t)},t.prototype._handleTransactionWorkFailure=function(t,e,n){e.isOpen()?e.rollback().catch((function(t){})).then((function(){return n(t)})):n(t)},t.prototype._computeDelayWithJitter=function(t){var e=t*this._jitterFactor,n=t-e,r=t+e;return Math.random()*(r-n)+n},t.prototype._verifyAfterConstruction=function(){if(this._maxRetryTimeMs<0)throw(0,r.newError)("Max retry time should be >= 0: "+this._maxRetryTimeMs);if(this._initialRetryDelayMs<0)throw(0,r.newError)("Initial retry delay should >= 0: "+this._initialRetryDelayMs);if(this._multiplier<1)throw(0,r.newError)("Multiplier should be >= 1.0: "+this._multiplier);if(this._jitterFactor<0||this._jitterFactor>1)throw(0,r.newError)("Jitter factor should be in [0.0, 1.0]: "+this._jitterFactor)},t}();function g(t,e){return t||0===t?t:e}e.TransactionExecutor=o},5838:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.TxConfig=void 0;var g=o(n(7400)),s=n(4949),A=n(6720),C=function(){function t(t){!function(t){t&&g.assertObject(t,"Transaction config")}(t),this.timeout=function(t){if(g.isObject(t)&&(t.timeout||0===t.timeout)){g.assertNumberOrInteger(t.timeout,"Transaction timeout");var e=(0,A.int)(t.timeout);if(e.isZero())throw(0,s.newError)("Transaction timeout should not be zero");if(e.isNegative())throw(0,s.newError)("Transaction timeout should not be negative");return e}return null}(t),this.metadata=function(t){if(g.isObject(t)&&t.metadata){var e=t.metadata;if(g.assertObject(e,"config.metadata"),0!==Object.keys(e).length)return e}return null}(t)}return t.empty=function(){return I},t.prototype.isEmpty=function(){return Object.values(this).every((function(t){return null==t}))},t}();e.TxConfig=C;var I=new C({})},4434:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)g.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return g};Object.defineProperty(e,"__esModule",{value:!0}),e.Url=e.formatIPv6Address=e.formatIPv4Address=e.defaultPortForScheme=e.parseDatabaseUrl=void 0;var o=n(7400),g=function(t,e,n,r,i){this.scheme=t,this.host=e,this.port=n,this.hostAndPort=r,this.query=i};function s(t,e,n){if(!(t=(t||"").trim()))throw new Error("Illegal empty "+e+" in URL query '"+n+"'");return t}function A(t){var e="["===t.charAt(0),n="]"===t.charAt(t.length-1);if(e||n){if(e&&n)return t;throw new Error("Illegal IPv6 address "+t)}return"["+t+"]"}function C(t){return"http"===t?7474:"https"===t?7473:7687}e.Url=g,e.parseDatabaseUrl=function(t){(0,o.assertString)(t,"URL");var e=function(t){return-1===(t=t.trim()).indexOf("://")?{schemeMissing:!0,url:"none://"+t}:{schemeMissing:!1,url:t}}(t),n=function(t){function e(t,e){var n=t.indexOf(e);return n>=0?[t.substring(0,n),t[n],t.substring(n+1)]:[t,"",""]}var n,o={};return":"===(n=e(t,":"))[1]&&(o.scheme=decodeURIComponent(n[0]),t=n[2]),"#"===(n=e(t,"#"))[1]&&(o.fragment=decodeURIComponent(n[2]),t=n[0]),"?"===(n=e(t,"?"))[1]&&(o.query=n[2],t=n[0]),t.startsWith("//")?(n=e(t.substr(2),"/"),(o=r(r({},o),function(t){var n,r,o,g,s={};"@"===(r=t,o="@",g=r.lastIndexOf(o),n=g>=0?[r.substring(0,g),r[g],r.substring(g+1)]:["","",r])[1]&&(s.userInfo=decodeURIComponent(n[0]),t=n[2]);var A=i(function(t,n,r){var i=e(t,n),o=e(i[2],r);return[o[0],o[2]]}(t,"[","]"),2),C=A[0],I=A[1];return""!==C?(s.host=C,n=e(I,":")):(n=e(t,":"),s.host=n[0]),":"===n[1]&&(s.port=n[2]),s}(n[0]))).path=n[1]+n[2]):o.path=t,o}(e.url),I=e.schemeMissing?null:function(t){return t?(":"===(t=t.trim()).charAt(t.length-1)&&(t=t.substring(0,t.length-1)),t):null}(n.scheme),a=function(t,e){if(!t)throw new Error("Unable to extract host from "+void 0);return t.trim()}(n.host),u=function(t){if(!t)throw new Error("Illegal host "+t);return t.indexOf(":")>=0?A(t):t}(a),c=function(t,e){var n="string"==typeof t?parseInt(t,10):t;return 0===n||n?n:C(e)}(n.port,I),l=u+":"+c,h=function(t,e){var n=t?function(t){return(t=(t||"").trim())&&"?"===t.charAt(0)&&(t=t.substring(1,t.length)),t}(t):null,r={};return n&&n.split("&").forEach((function(t){var n=t.split("=");if(2!==n.length)throw new Error("Invalid parameters: '"+n+"' in URL '"+e+"'.");var i=s(n[0],"key",e),o=s(n[1],"value",e);if(r[i])throw new Error("Duplicated query parameters with key '"+i+"' in URL '"+e+"'");r[i]=o})),r}(n.query||function(t){if("string"!=typeof t)return null;var e=i(t.split("?"),2);return e[0],e[1]}(n.resourceName),t);return new g(I,a,c,l,h)},e.formatIPv4Address=function(t,e){return t+":"+e},e.formatIPv6Address=function(t,e){return A(t)+":"+e},e.defaultPortForScheme=C},7400:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ENCRYPTION_OFF=e.ENCRYPTION_ON=e.validateQueryAndParameters=e.assertValidDate=e.assertNumberOrInteger=e.assertNumber=e.assertString=e.assertObject=e.isString=e.isObject=e.isEmptyObjectOrNull=void 0;var r=n(6720),i=n(2347);function o(t){return"object"==typeof t&&!Array.isArray(t)&&null!==t}function g(t,e){if(!s(t))throw new TypeError(e+" expected to be string but was: "+(0,i.stringify)(t));return t}function s(t){return"[object String]"===Object.prototype.toString.call(t)}e.ENCRYPTION_ON="ENCRYPTION_ON",e.ENCRYPTION_OFF="ENCRYPTION_OFF",e.isEmptyObjectOrNull=function(t){if(null===t)return!0;if(!o(t))return!1;for(var e in t)if(Object.prototype.hasOwnProperty.bind(t,e))return!1;return!0},e.isObject=o,e.validateQueryAndParameters=function(t,e,n){var r="",i=e||{},s=(null==n?void 0:n.skipAsserts)||!1;return"string"==typeof t?r=t:t instanceof String?r=t.toString():"object"==typeof t&&t.text&&(r=t.text,i=t.parameters||{}),s||(function(t){if(g(t,"Cypher query"),0===t.trim().length)throw new TypeError("Cypher query is expected to be a non-empty string.")}(r),function(t){if(!o(t)){var e=t.constructor?" "+t.constructor.name:"";throw new TypeError("Query parameters are expected to either be undefined/null or an object, given:"+e+" "+t)}}(i)),{validatedQuery:r,params:i}},e.assertObject=function(t,e){if(!o(t))throw new TypeError(e+" expected to be an object but was: "+(0,i.stringify)(t));return t},e.assertString=g,e.assertNumber=function(t,e){if("number"!=typeof t)throw new TypeError(e+" expected to be a number but was: "+(0,i.stringify)(t));return t},e.assertNumberOrInteger=function(t,e){if("number"!=typeof t&&"bigint"!=typeof t&&!(0,r.isInt)(t))throw new TypeError(e+" expected to be either a number or an Integer object but was: "+(0,i.stringify)(t));return t},e.assertValidDate=function(t,e){if("[object Date]"!==Object.prototype.toString.call(t))throw new TypeError(e+" expected to be a standard JavaScript Date but was: "+(0,i.stringify)(t));if(Number.isNaN(t.getTime()))throw new TypeError(e+" expected to be valid JavaScript Date but its time was NaN: "+(0,i.stringify)(t));return t},e.isString=s},2347:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.stringify=void 0;var r=n(2775);e.stringify=function(t){return JSON.stringify(t,(function(t,e){return(0,r.isBrokenObject)(e)?{__isBrokenObject__:!0,__reason__:(0,r.getBrokenObjectReason)(e)}:"bigint"==typeof e?e+"n":e}))}},1104:function(t,e,n){"use strict";var r=this&&this.__generator||function(t,e){var n,r,i,o,g={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;g;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return g.label++,{value:o[1],done:!1};case 5:g.label++,r=o[1],o=[0];continue;case 7:o=g.ops.pop(),g.trys.pop();continue;default:if(!((i=(i=g.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){g=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},o=this&&this.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),g=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)g.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return g};Object.defineProperty(e,"__esModule",{value:!0});var g=n(4949),s=function(){function t(t,e,n){this.keys=t,this.length=t.length,this._fields=e,this._fieldLookup=n||function(t){var e={};return t.forEach((function(t,n){e[t]=n})),e}(t)}return t.prototype.forEach=function(t){var e,n;try{for(var r=i(this.entries()),g=r.next();!g.done;g=r.next()){var s=o(g.value,2),A=s[0];t(s[1],A,this)}}catch(t){e={error:t}}finally{try{g&&!g.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}},t.prototype.map=function(t){var e,n,r=[];try{for(var g=i(this.entries()),s=g.next();!s.done;s=g.next()){var A=o(s.value,2),C=A[0],I=A[1];r.push(t(I,C,this))}}catch(t){e={error:t}}finally{try{s&&!s.done&&(n=g.return)&&n.call(g)}finally{if(e)throw e.error}}return r},t.prototype.entries=function(){var t;return r(this,(function(e){switch(e.label){case 0:t=0,e.label=1;case 1:return tthis._fields.length-1||e<0)throw(0,g.newError)("This record has no field with index '"+e+"'. Remember that indexes start at `0`, and make sure your query returns records in the shape you meant it to.");return this._fields[e]},t.prototype.has=function(t){return"number"==typeof t?t>=0&&t0||this.pageCacheHits>0||this.pageCacheHitRatio>0},t}();e.ProfiledPlan=C;e.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 I=function(){function t(t){var e=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(t).forEach((function(n){var r=n.replace(/(-\w)/g,(function(t){return t[1].toUpperCase()}));r in e._stats?e._stats[r]=c(t[n]):"systemUpdates"===r?e._systemUpdates=c(t[n]):"containsSystemUpdates"===r?e._containsSystemUpdates=t[n]:"containsUpdates"===r&&(e._containsUpdates=t[n])})),this._stats=Object.freeze(this._stats)}return t.prototype.containsUpdates=function(){var t=this;return void 0!==this._containsUpdates?this._containsUpdates:Object.keys(this._stats).reduce((function(e,n){return e+t._stats[n]}),0)>0},t.prototype.updates=function(){return this._stats},t.prototype.containsSystemUpdates=function(){return void 0!==this._containsSystemUpdates?this._containsSystemUpdates:this._systemUpdates>0},t.prototype.systemUpdates=function(){return this._systemUpdates},t}();e.QueryStatistics=I;var a=function(){function t(e){this.code=e.code,this.title=e.title,this.description=e.description,this.severity=e.severity,this.position=t._constructPosition(e.position)}return t._constructPosition=function(t){return t?{offset:c(t.offset),line:c(t.line),column:c(t.column)}:{}},t}();e.Notification=a;var u=function(t,e){t&&(this.address=t.address,this.version=t.version,this.agent=t.version),this.protocolVersion=e};function c(t){return t instanceof g.default?t.toInt():"bigint"==typeof t?(0,g.int)(t).toInt():t}function l(t,e,n){return void 0===n&&(n=0),t in e?c(e[t]):n}e.ServerInfo=u,e.queryType={READ_ONLY:"r",READ_WRITE:"rw",WRITE_ONLY:"w",SCHEMA_WRITE:"s"},e.default=s},9675:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(260)),o=n(6457),g=o.connectionHolder.EMPTY_CONNECTION_HOLDER,s=function(t){console.log("Uncaught error when processing result: "+t)},A=function(t){},C=function(){function t(t,e,n,r){var i;this._stack=(i=new Error("")).stack?i.stack.replace(/^Error(\n\r)*/,""):null,this._streamObserverPromise=t,this._p=null,this._query=e,this._parameters=n||{},this._connectionHolder=r||g}return t.prototype.keys=function(){var t=this;return new Promise((function(e,n){t._streamObserverPromise.then((function(t){return t.subscribe({onKeys:function(t){return e(t)},onError:function(t){return n(t)}})})).catch(n)}))},t.prototype.summary=function(){var t=this;return new Promise((function(e,n){t._streamObserverPromise.then((function(r){r.cancel(),r.subscribe({onCompleted:function(r){return t._createSummary(r).then(e,n)},onError:function(t){return n(t)}})})).catch(n)}))},t.prototype._getOrCreatePromise=function(){var t=this;return this._p||(this._p=new Promise((function(e,n){var r=[],i={onNext:function(t){r.push(t)},onCompleted:function(t){e({records:r,summary:t})},onError:function(t){n(t)}};t.subscribe(i)}))),this._p},t.prototype.then=function(t,e){return this._getOrCreatePromise().then(t,e)},t.prototype.catch=function(t){return this._getOrCreatePromise().catch(t)},t.prototype.finally=function(t){return this._getOrCreatePromise().finally(t)},t.prototype.subscribe=function(t){var e=this,n=t.onCompleted||A;t.onCompleted=function(r){e._createSummary(r).then((function(e){return n.call(t,e)}))};var r=t.onError||s;t.onError=function(n){e._connectionHolder.releaseConnection().then((function(){!function(t,e){e&&(t.stack=t.toString()+"\n"+e)}(n,e._stack),r.call(t,n)}))},this._streamObserverPromise.then((function(e){return e.subscribe(t)})).catch((function(e){return t.onError(e)}))},t.prototype._cancel=function(){this._streamObserverPromise.then((function(t){return t.cancel()}))},t.prototype._createSummary=function(t){var e=o.util.validateQueryAndParameters(this._query,this._parameters,{skipAsserts:!0}),n=e.validatedQuery,r=e.params,g=this._connectionHolder;return g.getConnection().then((function(t){return g.releaseConnection().then((function(){return t?t.protocol().version:void 0}))}),(function(t){})).then((function(e){return new i.default(n,r,t,e)}))},t}();Symbol.toStringTag,e.default=C},4777:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function g(t){try{A(r.next(t))}catch(t){o(t)}}function s(t){try{A(r.throw(t))}catch(t){o(t)}}function A(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(g,s)}A((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,o,g={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;g;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return g.label++,{value:o[1],done:!1};case 5:g.label++,r=o[1],o=[0];continue;case 7:o=g.ops.pop(),g.trys.pop();continue;default:if(!((i=(i=g.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){g=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isPoint=e.Point=void 0;var r=n(7400),i="__isPoint__",o=function(){function t(t,e,n,i){this.srid=(0,r.assertNumberOrInteger)(t,"SRID"),this.x=(0,r.assertNumber)(e,"X coordinate"),this.y=(0,r.assertNumber)(n,"Y coordinate"),this.z=null==i?i:(0,r.assertNumber)(i,"Z coordinate"),Object.freeze(this)}return t.prototype.toString=function(){return this.z||0===this.z?"Point{srid="+g(this.srid)+", x="+g(this.x)+", y="+g(this.y)+", z="+g(this.z)+"}":"Point{srid="+g(this.srid)+", x="+g(this.x)+", y="+g(this.y)+"}"},t}();function g(t){return Number.isInteger(t)?t+".0":t.toString()}e.Point=o,Object.defineProperty(o.prototype,i,{value:!0,enumerable:!1,configurable:!1,writable:!1}),e.isPoint=function(t){return!0===(t&&t[i])}},8718:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e},g=this&&this.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),g=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)g.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return g};Object.defineProperty(e,"__esModule",{value:!0}),e.isDateTime=e.DateTime=e.isLocalDateTime=e.LocalDateTime=e.isDate=e.Date=e.isTime=e.Time=e.isLocalTime=e.LocalTime=e.isDuration=e.Duration=void 0;var s=o(n(3355)),A=n(7400),C=n(4949),I=o(n(6720)),a={value:!0,enumerable:!1,configurable:!1,writable:!1},u="__isDuration__",c="__isLocalTime__",l="__isTime__",h="__isDate__",d="__isLocalDateTime__",f="__isDateTime__",p=function(){function t(t,e,n,r){this.months=(0,A.assertNumberOrInteger)(t,"Months"),this.days=(0,A.assertNumberOrInteger)(e,"Days"),(0,A.assertNumberOrInteger)(n,"Seconds"),(0,A.assertNumberOrInteger)(r,"Nanoseconds"),this.seconds=s.normalizeSecondsForDuration(n,r),this.nanoseconds=s.normalizeNanosecondsForDuration(r),Object.freeze(this)}return t.prototype.toString=function(){return s.durationToIsoString(this.months,this.days,this.seconds,this.nanoseconds)},t}();e.Duration=p,Object.defineProperty(p.prototype,u,a),e.isDuration=function(t){return _(t,u)};var v=function(){function t(t,e,n,r){this.hour=s.assertValidHour(t),this.minute=s.assertValidMinute(e),this.second=s.assertValidSecond(n),this.nanosecond=s.assertValidNanosecond(r),Object.freeze(this)}return t.fromStandardDate=function(e,n){E(e,n);var r=s.totalNanoseconds(e,n);return new t(e.getHours(),e.getMinutes(),e.getSeconds(),r instanceof I.default?r.toInt():"bigint"==typeof r?(0,I.int)(r).toInt():r)},t.prototype.toString=function(){return s.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)},t}();e.LocalTime=v,Object.defineProperty(v.prototype,c,a),e.isLocalTime=function(t){return _(t,c)};var y=function(){function t(t,e,n,r,i){this.hour=s.assertValidHour(t),this.minute=s.assertValidMinute(e),this.second=s.assertValidSecond(n),this.nanosecond=s.assertValidNanosecond(r),this.timeZoneOffsetSeconds=(0,A.assertNumberOrInteger)(i,"Time zone offset in seconds"),Object.freeze(this)}return t.fromStandardDate=function(e,n){return E(e,n),new t(e.getHours(),e.getMinutes(),e.getSeconds(),(0,I.toNumber)(s.totalNanoseconds(e,n)),s.timeZoneOffsetInSeconds(e))},t.prototype.toString=function(){return s.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)+s.timeZoneOffsetToIsoString(this.timeZoneOffsetSeconds)},t}();e.Time=y,Object.defineProperty(y.prototype,l,a),e.isTime=function(t){return _(t,l)};var b=function(){function t(t,e,n){this.year=s.assertValidYear(t),this.month=s.assertValidMonth(e),this.day=s.assertValidDay(n),Object.freeze(this)}return t.fromStandardDate=function(e){return E(e),new t(e.getFullYear(),e.getMonth()+1,e.getDate())},t.prototype.toString=function(){return s.dateToIsoString(this.year,this.month,this.day)},t}();e.Date=b,Object.defineProperty(b.prototype,h,a),e.isDate=function(t){return _(t,h)};var m=function(){function t(t,e,n,r,i,o,g){this.year=s.assertValidYear(t),this.month=s.assertValidMonth(e),this.day=s.assertValidDay(n),this.hour=s.assertValidHour(r),this.minute=s.assertValidMinute(i),this.second=s.assertValidSecond(o),this.nanosecond=s.assertValidNanosecond(g),Object.freeze(this)}return t.fromStandardDate=function(e,n){return E(e,n),new t(e.getFullYear(),e.getMonth()+1,e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),(0,I.toNumber)(s.totalNanoseconds(e,n)))},t.prototype.toString=function(){return x(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)},t}();e.LocalDateTime=m,Object.defineProperty(m.prototype,d,a),e.isLocalDateTime=function(t){return _(t,d)};var w=function(){function t(t,e,n,r,i,o,I,a,u){this.year=s.assertValidYear(t),this.month=s.assertValidMonth(e),this.day=s.assertValidDay(n),this.hour=s.assertValidHour(r),this.minute=s.assertValidMinute(i),this.second=s.assertValidSecond(o),this.nanosecond=s.assertValidNanosecond(I);var c=g(function(t,e){var n=t||0===t,r=e&&""!==e;if(!n&&!r)throw(0,C.newError)("Unable to create DateTime without either time zone offset or id. Please specify either of them. Given offset: "+t+" and id: "+e);var i=[void 0,void 0];return n&&((0,A.assertNumberOrInteger)(t,"Time zone offset in seconds"),i[0]=t),r&&((0,A.assertString)(e,"Time zone ID"),s.assertValidZoneId("Time zone ID",e),i[1]=e),i}(a,u),2),l=c[0],h=c[1];this.timeZoneOffsetSeconds=l,this.timeZoneId=h||void 0,Object.freeze(this)}return t.fromStandardDate=function(e,n){return E(e,n),new t(e.getFullYear(),e.getMonth()+1,e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),(0,I.toNumber)(s.totalNanoseconds(e,n)),s.timeZoneOffsetInSeconds(e),null)},t.prototype.toString=function(){return x(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)+(this.timeZoneId?"["+this.timeZoneId+"]":s.timeZoneOffsetToIsoString(this.timeZoneOffsetSeconds||0))},t}();function _(t,e){return!0===(t&&t[e])}function x(t,e,n,r,i,o,g){return s.dateToIsoString(t,e,n)+"T"+s.timeToIsoString(r,i,o,g)}function E(t,e){(0,A.assertValidDate)(t,"Standard date"),null!=e&&(0,A.assertNumberOrInteger)(e,"Nanosecond")}e.DateTime=w,Object.defineProperty(w.prototype,f,a),e.isDateTime=function(t){return _(t,f)}},7561:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function g(t){try{A(r.next(t))}catch(t){o(t)}}function s(t){try{A(r.throw(t))}catch(t){o(t)}}function A(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(g,s)}A((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,o,g={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;g;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return g.label++,{value:o[1],done:!1};case 5:g.label++,r=o[1],o=[0];continue;case 7:o=g.ops.pop(),g.trys.pop();continue;default:if(!((i=(i=g.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){g=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},6083:(t,e,n)=>{"use strict";var r=n(4836);Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.WRITE=e.READ=e.Driver=void 0;var i=r(n(6690)),o=r(n(9728)),g=r(n(1655)),s=r(n(4993)),A=r(n(3808)),C=n(758),I=r(n(5735));var a=C.internal.constants.FETCH_ALL,u=C.driver.READ,c=C.driver.WRITE;e.WRITE=c,e.READ=u;var l=function(t){(0,g.default)(C,t);var e,n,r=(e=C,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=(0,A.default)(e);if(n){var i=(0,A.default)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,s.default)(this,t)});function C(){return(0,i.default)(this,C),r.apply(this,arguments)}return(0,o.default)(C,[{key:"rxSession",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.defaultAccessMode,n=void 0===e?c:e,r=t.bookmarks,i=t.database,o=void 0===i?"":i,g=t.fetchSize,s=t.impersonatedUser;return new I.default({session:this._newSession({defaultAccessMode:n,bookmarkOrBookmarks:r,database:o,impersonatedUser:s,reactive:!0,fetchSize:h(g,this._config.fetchSize)}),config:this._config})}}]),C}(C.Driver);function h(t,e){var n=parseInt(t,10);if(n>0||n===a)return n;if(0===n||n<0)throw new Error("The fetch size can only be a positive value or ".concat(a," for ALL. However fetchSize = ").concat(n));return e}e.Driver=l;var d=l;e.default=d},7499:(t,e,n)=>{"use strict";var r=n(4836);e.ZP=void 0;var i=n(6083),o=r(n(8289)),g=n(758),s=n(297),A=r(n(5735)),C=r(n(9323)),I=r(n(804)),a=g.internal.util,u=a.ENCRYPTION_ON,c=(a.ENCRYPTION_OFF,a.assertString),l=a.isEmptyObjectOrNull,h=g.internal.serverAddress.ServerAddress,d=g.internal.urlUtil;var f="neo4j-javascript/"+o.default,p={console:function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(t){return{level:t,logger:function(t,e){return console.log("".concat(n.g.Date.now()," ").concat(t.toUpperCase()," ").concat(e))}}}))},v={Node:g.Node,Relationship:g.Relationship,UnboundRelationship:g.UnboundRelationship,PathSegment:g.PathSegment,Path:g.Path,Result:g.Result,ResultSummary:g.ResultSummary,Record:g.Record,Point:g.Point,Date:g.Date,DateTime:g.DateTime,Duration:g.Duration,LocalDateTime:g.LocalDateTime,LocalTime:g.LocalTime,Time:g.Time,Integer:g.Integer},y={READ:i.READ,WRITE:i.WRITE},b={toNumber:g.toNumber,toString:g.toString,inSafeRange:g.inSafeRange},m={isPoint:g.isPoint},w={isDuration:g.isDuration,isLocalTime:g.isLocalTime,isTime:g.isTime,isDate:g.isDate,isLocalDateTime:g.isLocalDateTime,isDateTime:g.isDateTime},_={driver:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};c(t,"Bolt URL");var r,o=d.parseDatabaseUrl(t),g=!1,A=!1;switch(o.scheme){case"bolt":break;case"bolt+s":A=!0,r="TRUST_SYSTEM_CA_SIGNED_CERTIFICATES";break;case"bolt+ssc":A=!0,r="TRUST_ALL_CERTIFICATES";break;case"neo4j":g=!0;break;case"neo4j+s":A=!0,r="TRUST_SYSTEM_CA_SIGNED_CERTIFICATES",g=!0;break;case"neo4j+ssc":A=!0,r="TRUST_ALL_CERTIFICATES",g=!0;break;default:throw new Error("Unknown scheme: ".concat(o.scheme))}if(A){if("encrypted"in n||"trust"in n)throw new Error("Encryption/trust can only be configured either through URL or config, not both");n.encrypted=u,n.trust=r}(e=e||{}).scheme=e.scheme||"none",n.userAgent=n.userAgent||f;var C=h.fromUrl(o.hostAndPort),I={address:C,typename:g?"Routing":"Direct",routing:g};return new i.Driver(I,n,function(){if(g)return function(t,n,r,i){return new s.RoutingConnectionProvider({id:t,config:n,log:r,hostNameResolver:i,authToken:e,address:C,userAgent:n.userAgent,routingContext:o.query})};if(!l(o.query))throw new Error("Parameters are not supported with none routed scheme. Given URL: '".concat(t,"'"));return function(t,n,r){return new s.DirectConnectionProvider({id:t,config:n,log:r,authToken:e,address:C,userAgent:n.userAgent})}}())},int:g.int,isInt:g.isInt,isPoint:g.isPoint,isDuration:g.isDuration,isLocalTime:g.isLocalTime,isTime:g.isTime,isDate:g.isDate,isLocalDateTime:g.isLocalDateTime,isDateTime:g.isDateTime,integer:b,Neo4jError:g.Neo4jError,auth:g.auth,logging:p,types:v,session:y,error:g.error,spatial:m,temporal:w,Driver:i.Driver,Session:g.Session,Transaction:g.Transaction,Result:g.Result,RxSession:A.default,RxTransaction:C.default,RxResult:I.default,ResultSummary:g.ResultSummary,Plan:g.Plan,ProfiledPlan:g.ProfiledPlan,QueryStatistics:g.QueryStatistics,Notification:g.Notification,ServerInfo:g.ServerInfo,Record:g.Record,Node:g.Node,Relationship:g.Relationship,UnboundRelationship:g.UnboundRelationship,Path:g.Path,PathSegment:g.PathSegment,Point:g.Point,Integer:g.Integer,Duration:g.Duration,LocalTime:g.LocalTime,Time:g.Time,Date:g.Date,LocalDateTime:g.LocalDateTime,DateTime:g.DateTime};e.ZP=_},2915:(t,e,n)=>{"use strict";var r=n(4836);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(6690)),o=r(n(9728)),g=n(758),s=n(4143),A=n(1717),C=(g.internal.logger.Logger,g.internal.retryStrategy.canRetryOn),I=g.error.SERVICE_UNAVAILABLE,a=(g.error.SESSION_EXPIRED,function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.maxRetryTimeout,r=void 0===n?3e4:n,o=e.initialDelay,g=void 0===o?1e3:o,s=e.delayMultiplier,A=void 0===s?2:s,C=e.delayJitter,I=void 0===C?.2:C,a=e.logger,c=void 0===a?null:a;(0,i.default)(this,t),this._maxRetryTimeout=u(r,3e4),this._initialDelay=u(g,1e3),this._delayMultiplier=u(A,2),this._delayJitter=u(I,.2),this._logger=c}return(0,o.default)(t,[{key:"retry",value:function(t){var e=this;return t.pipe((0,A.retryWhen)((function(t){var n=[],r=Date.now(),i=1,o=e._initialDelay;return t.pipe((0,A.flatMap)((function(t){if(!C(t))return(0,s.throwError)(t);if(n.push(t),i>=2&&Date.now()-r>=e._maxRetryTimeout){var a=(0,g.newError)("Failed after retried for ".concat(i," times in ").concat(e._maxRetryTimeout," ms. Make sure that your database is online and retry again."),I);return a.seenErrors=n,(0,s.throwError)(a)}var u=e._computeNextDelay(o);return o*=e._delayMultiplier,i++,e._logger&&e._logger.warn("Transaction failed and will be retried in ".concat(u)),(0,s.of)(1).pipe((0,A.delay)(u))})))})))}},{key:"_computeNextDelay",value:function(t){var e=t*this._delayJitter;return t-e+2*e*Math.random()}}]),t}());function u(t,e){return t||0===t?t:e}e.default=a},804:(t,e,n)=>{"use strict";var r=n(4836);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(6690)),o=r(n(9728)),g=n(758),s=n(4143),A=n(1717),C=function(){function t(e){(0,i.default)(this,t);var n=e.pipe((0,A.publishReplay)(1),(0,A.refCount)());this._result=n,this._keys=n.pipe((0,A.flatMap)((function(t){return(0,s.from)(t.keys())})),(0,A.publishReplay)(1),(0,A.refCount)()),this._records=new s.Subject,this._summary=new s.ReplaySubject,this._state=0}return(0,o.default)(t,[{key:"keys",value:function(){return this._keys}},{key:"records",value:function(){var t=this;return this._result.pipe((0,A.flatMap)((function(e){return new s.Observable((function(n){return t._startStreaming({result:e,recordsObserver:n})}))})))}},{key:"consume",value:function(){var t=this;return this._result.pipe((0,A.flatMap)((function(e){return new s.Observable((function(n){return t._startStreaming({result:e,summaryObserver:n})}))})))}},{key:"_startStreaming",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.result,r=e.recordsObserver,i=void 0===r?null:r,o=e.summaryObserver,s=void 0===o?null:o,A=[];return s&&A.push(this._summary.subscribe(s)),this._state<1?(this._state=1,i&&A.push(this._records.subscribe(i)),A.push({unsubscribe:function(){n._cancel&&n._cancel()}}),0===this._records.observers.length&&n._cancel(),n.subscribe({onNext:function(e){t._records.next(e)},onCompleted:function(e){t._records.complete(),t._summary.next(e),t._summary.complete(),t._state=2},onError:function(e){t._records.error(e),t._summary.error(e),t._state=2}})):i&&i.error((0,g.newError)("Streaming has already started/consumed with a previous records or summary subscription.")),function(){A.forEach((function(t){return t.unsubscribe()}))}}}]),t}();e.default=C},5735:(t,e,n)=>{"use strict";var r=n(4836);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(6690)),o=r(n(9728)),g=n(4143),s=n(1717),A=r(n(804)),C=n(758),I=r(n(9323)),a=r(n(2915)),u=C.internal.constants,c=u.ACCESS_MODE_READ,l=u.ACCESS_MODE_WRITE,h=C.internal.txConfig.TxConfig,d=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.session,r=e.config;(0,i.default)(this,t),this._session=n,this._retryLogic=function(t){var e=t&&t.maxTransactionRetryTime?t.maxTransactionRetryTime:null;return new a.default({maxRetryTimeout:e})}(r)}return(0,o.default)(t,[{key:"run",value:function(t,e,n){var r=this;return new A.default(new g.Observable((function(i){try{i.next(r._session.run(t,e,n)),i.complete()}catch(t){i.error(t)}return function(){}})))}},{key:"beginTransaction",value:function(t){return this._beginTransaction(this._session._mode,t)}},{key:"readTransaction",value:function(t,e){return this._runTransaction(c,t,e)}},{key:"writeTransaction",value:function(t,e){return this._runTransaction(l,t,e)}},{key:"close",value:function(){var t=this;return new g.Observable((function(e){t._session.close().then((function(){e.complete()})).catch((function(t){return e.error(t)}))}))}},{key:"lastBookmark",value:function(){return this._session.lastBookmark()}},{key:"_beginTransaction",value:function(t,e){var n=this,r=h.empty();return e&&(r=new h(e)),new g.Observable((function(e){try{e.next(new I.default(n._session._beginTransaction(t,r))),e.complete()}catch(t){e.error(t)}return function(){}}))}},{key:"_runTransaction",value:function(t,e,n){return h.empty(),n&&new h(n),this._retryLogic.retry(this._beginTransaction(t,n).pipe((0,s.flatMap)((function(t){return(0,g.defer)((function(){try{return e(t)}catch(t){return(0,g.throwError)(t)}})).pipe((0,s.catchError)((function(e){return t.rollback().pipe((0,s.concat)((0,g.throwError)(e)))})),(0,s.concat)(t.commit()))}))))}}]),t}();e.default=d},9323:(t,e,n)=>{"use strict";var r=n(4836);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(6690)),o=r(n(9728)),g=n(4143),s=r(n(804)),A=(r(n(758)),function(){function t(e){(0,i.default)(this,t),this._txc=e}return(0,o.default)(t,[{key:"run",value:function(t,e){var n=this;return new s.default(new g.Observable((function(r){try{r.next(n._txc.run(t,e)),r.complete()}catch(t){r.error(t)}return function(){}})))}},{key:"commit",value:function(){var t=this;return new g.Observable((function(e){t._txc.commit().then((function(){e.complete()})).catch((function(t){return e.error(t)}))}))}},{key:"rollback",value:function(){var t=this;return new g.Observable((function(e){t._txc.rollback().then((function(){e.complete()})).catch((function(t){return e.error(t)}))}))}},{key:"close",value:function(){var t=this;return new g.Observable((function(e){t._txc.close().then((function(){e.complete()})).catch((function(t){return e.error(t)}))}))}}]),t}());e.default=A},8289:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default="4.4.10"},4143:(t,e,n)=>{"use strict";n.r(e),n.d(e,{ArgumentOutOfRangeError:()=>S.W,AsyncSubject:()=>I.c,BehaviorSubject:()=>A.X,ConnectableObservable:()=>i.c,EMPTY:()=>Q.E,EmptyError:()=>P.K,GroupedObservable:()=>o.T,NEVER:()=>at,Notification:()=>x.P,NotificationKind:()=>x.W,ObjectUnsubscribedError:()=>N.N,Observable:()=>r.y,ReplaySubject:()=>C.t,Scheduler:()=>m.b,Subject:()=>s.xQ,Subscriber:()=>_.L,Subscription:()=>w.w,TimeoutError:()=>D.W,UnsubscriptionError:()=>R.B,VirtualAction:()=>b,VirtualTimeScheduler:()=>y,animationFrame:()=>v,animationFrameScheduler:()=>p,asap:()=>a.e,asapScheduler:()=>a.E,async:()=>u.P,asyncScheduler:()=>u.z,bindCallback:()=>F,bindNodeCallback:()=>U,combineLatest:()=>Y.aj,concat:()=>H.z,config:()=>Tt.v,defer:()=>K.P,empty:()=>Q.c,forkJoin:()=>J,from:()=>q.D,fromEvent:()=>et,fromEventPattern:()=>rt,generate:()=>it,identity:()=>k.y,iif:()=>gt,interval:()=>At,isObservable:()=>T,merge:()=>It.T,never:()=>ut,noop:()=>O.Z,observable:()=>g.L,of:()=>ct.of,onErrorResumeNext:()=>lt,pairs:()=>ht,partition:()=>yt,pipe:()=>E.z,queue:()=>c.c,queueScheduler:()=>c.N,race:()=>bt.S3,range:()=>mt,scheduled:()=>kt.x,throwError:()=>_t._,timer:()=>xt.H,using:()=>Et,zip:()=>Ot.$R});var r=n(2772),i=n(3140),o=n(1120),g=n(5050),s=n(211),A=n(9233),C=n(2630),I=n(364),a=n(6650),u=n(964),c=n(2546),l=n(655),h=n(6114),d=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return l.ZT(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e.scheduled||(e.scheduled=requestAnimationFrame((function(){return e.flush(null)}))))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);0===e.actions.length&&(cancelAnimationFrame(n),e.scheduled=void 0)},e}(h.o),f=n(8399),p=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l.ZT(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,r=-1,i=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++re.index?1:-1:t.delay>e.delay?1:-1},e}(h.o),m=n(8725),w=n(8760),_=n(979),x=n(2632),E=n(2561),O=n(3306),k=n(3608);function T(t){return!!t&&(t instanceof r.y||"function"==typeof t.lift&&"function"==typeof t.subscribe)}var S=n(6565),P=n(6929),N=n(1016),R=n(8782),D=n(1462),M=n(5709),j=n(3642),B=n(9026),L=n(7507);function F(t,e,n){if(e){if(!(0,L.K)(e))return function(){for(var r=[],i=0;i1?r.next(Array.prototype.slice.call(arguments)):r.next(t)}),r,n)}))}function nt(t,e,n,r,i){var o;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(t)){var g=t;t.addEventListener(e,n,i),o=function(){return g.removeEventListener(e,n,i)}}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(t)){var s=t;t.on(e,n),o=function(){return s.off(e,n)}}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(t)){var A=t;t.addListener(e,n),o=function(){return A.removeListener(e,n)}}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(var C=0,I=t.length;C=e){r.complete();break}if(r.next(o++),r.closed)break}}))}function wt(t){var e=t.start,n=t.index,r=t.count,i=t.subscriber;n>=r?i.complete():(i.next(e),i.closed||(t.index=n+1,t.start=e+1,this.schedule(t)))}var _t=n(4944),xt=n(9604);function Et(t,e){return new r.y((function(n){var r,i;try{r=t()}catch(t){return void n.error(t)}try{i=e(r)}catch(t){return void n.error(t)}var o=(i?(0,q.D)(i):Q.E).subscribe(n);return function(){o.unsubscribe(),r&&r.unsubscribe()}}))}var Ot=n(5080),kt=n(8107),Tt=n(150)},364:(t,e,n)=>{"use strict";n.d(e,{c:()=>g});var r=n(655),i=n(211),o=n(8760),g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.value=null,e.hasNext=!1,e.hasCompleted=!1,e}return r.ZT(e,t),e.prototype._subscribe=function(e){return this.hasError?(e.error(this.thrownError),o.w.EMPTY):this.hasCompleted&&this.hasNext?(e.next(this.value),e.complete(),o.w.EMPTY):t.prototype._subscribe.call(this,e)},e.prototype.next=function(t){this.hasCompleted||(this.value=t,this.hasNext=!0)},e.prototype.error=function(e){this.hasCompleted||t.prototype.error.call(this,e)},e.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&t.prototype.next.call(this,this.value),t.prototype.complete.call(this)},e}(i.xQ)},9233:(t,e,n)=>{"use strict";n.d(e,{X:()=>g});var r=n(655),i=n(211),o=n(1016),g=function(t){function e(e){var n=t.call(this)||this;return n._value=e,n}return r.ZT(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),e.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return n&&!n.closed&&e.next(this._value),n},e.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new o.N;return this._value},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},e}(i.xQ)},2632:(t,e,n)=>{"use strict";n.d(e,{P:()=>s,W:()=>r});var r,i=n(5631),o=n(8170),g=n(4944);r||(r={});var s=function(){function t(t,e,n){this.kind=t,this.value=e,this.error=n,this.hasValue="N"===t}return t.prototype.observe=function(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}},t.prototype.do=function(t,e,n){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return n&&n()}},t.prototype.accept=function(t,e,n){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,n)},t.prototype.toObservable=function(){switch(this.kind){case"N":return(0,o.of)(this.value);case"E":return(0,g._)(this.error);case"C":return(0,i.c)()}throw new Error("unexpected notification kind value")},t.createNext=function(e){return void 0!==e?new t("N",e):t.undefinedValueNotification},t.createError=function(e){return new t("E",void 0,e)},t.createComplete=function(){return t.completeNotification},t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t}()},2772:(t,e,n)=>{"use strict";n.d(e,{y:()=>I});var r=n(3642),i=n(979),o=n(3142),g=n(2174),s=n(5050),A=n(2561),C=n(150),I=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r=this.operator,s=function(t,e,n){if(t){if(t instanceof i.L)return t;if(t[o.b])return t[o.b]()}return t||e||n?new i.L(t,e,n):new i.L(g.c)}(t,e,n);if(r?s.add(r.call(s,this.source)):s.add(this.source||C.v.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),C.v.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){C.v.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),(0,r._)(t)?t.error(e):console.warn(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=a(e))((function(e,r){var i;i=n.subscribe((function(e){try{t(e)}catch(t){r(t),i&&i.unsubscribe()}}),r,e)}))},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[s.L]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e{"use strict";n.d(e,{c:()=>o});var r=n(150),i=n(1644),o={closed:!0,next:function(t){},error:function(t){if(r.v.useDeprecatedSynchronousErrorHandling)throw t;(0,i.z)(t)},complete:function(){}}},2039:(t,e,n)=>{"use strict";n.d(e,{L:()=>i});var r=n(655),i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.ZT(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.destination.next(e)},e.prototype.notifyError=function(t,e){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.complete()},e}(n(979).L)},2630:(t,e,n)=>{"use strict";n.d(e,{t:()=>I});var r=n(655),i=n(211),o=n(2546),g=n(8760),s=n(9276),A=n(1016),C=n(8253),I=function(t){function e(e,n,r){void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===n&&(n=Number.POSITIVE_INFINITY);var i=t.call(this)||this;return i.scheduler=r,i._events=[],i._infiniteTimeWindow=!1,i._bufferSize=e<1?1:e,i._windowTime=n<1?1:n,n===Number.POSITIVE_INFINITY?(i._infiniteTimeWindow=!0,i.next=i.nextInfiniteTimeWindow):i.next=i.nextTimeWindow,i}return r.ZT(e,t),e.prototype.nextInfiniteTimeWindow=function(e){if(!this.isStopped){var n=this._events;n.push(e),n.length>this._bufferSize&&n.shift()}t.prototype.next.call(this,e)},e.prototype.nextTimeWindow=function(e){this.isStopped||(this._events.push(new a(this._getNow(),e)),this._trimBufferThenGetEvents()),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){var e,n=this._infiniteTimeWindow,r=n?this._events:this._trimBufferThenGetEvents(),i=this.scheduler,o=r.length;if(this.closed)throw new A.N;if(this.isStopped||this.hasError?e=g.w.EMPTY:(this.observers.push(t),e=new C.W(this,t)),i&&t.add(t=new s.ht(t,i)),n)for(var I=0;Ie&&(o=Math.max(o,i-e)),o>0&&r.splice(0,o),r},e}(i.xQ),a=function(){return function(t,e){this.time=t,this.value=e}}()},8725:(t,e,n)=>{"use strict";n.d(e,{b:()=>r});var r=function(){function t(e,n){void 0===n&&(n=t.now),this.SchedulerAction=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(n,e)},t.now=function(){return Date.now()},t}()},211:(t,e,n)=>{"use strict";n.d(e,{Yc:()=>I,xQ:()=>a});var r=n(655),i=n(2772),o=n(979),g=n(8760),s=n(1016),A=n(8253),C=n(3142),I=function(t){function e(e){var n=t.call(this,e)||this;return n.destination=e,n}return r.ZT(e,t),e}(o.L),a=function(t){function e(){var e=t.call(this)||this;return e.observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return r.ZT(e,t),e.prototype[C.b]=function(){return new I(this)},e.prototype.lift=function(t){var e=new u(this,this);return e.operator=t,e},e.prototype.next=function(t){if(this.closed)throw new s.N;if(!this.isStopped)for(var e=this.observers,n=e.length,r=e.slice(),i=0;i{"use strict";n.d(e,{W:()=>i});var r=n(655),i=function(t){function e(e,n){var r=t.call(this)||this;return r.subject=e,r.subscriber=n,r.closed=!1,r}return r.ZT(e,t),e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}},e}(n(8760).w)},979:(t,e,n)=>{"use strict";n.d(e,{L:()=>I});var r=n(655),i=n(4156),o=n(2174),g=n(8760),s=n(3142),A=n(150),C=n(1644),I=function(t){function e(n,r,i){var g=t.call(this)||this;switch(g.syncErrorValue=null,g.syncErrorThrown=!1,g.syncErrorThrowable=!1,g.isStopped=!1,arguments.length){case 0:g.destination=o.c;break;case 1:if(!n){g.destination=o.c;break}if("object"==typeof n){n instanceof e?(g.syncErrorThrowable=n.syncErrorThrowable,g.destination=n,n.add(g)):(g.syncErrorThrowable=!0,g.destination=new a(g,n));break}default:g.syncErrorThrowable=!0,g.destination=new a(g,n,r,i)}return g}return r.ZT(e,t),e.prototype[s.b]=function(){return this},e.create=function(t,n,r){var i=new e(t,n,r);return i.syncErrorThrowable=!1,i},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this},e}(g.w),a=function(t){function e(e,n,r,g){var s,A=t.call(this)||this;A._parentSubscriber=e;var C=A;return(0,i.m)(n)?s=n:n&&(s=n.next,r=n.error,g=n.complete,n!==o.c&&(C=Object.create(n),(0,i.m)(C.unsubscribe)&&A.add(C.unsubscribe.bind(C)),C.unsubscribe=A.unsubscribe.bind(A))),A._context=C,A._next=s,A._error=r,A._complete=g,A}return r.ZT(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;A.v.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber,n=A.v.useDeprecatedSynchronousErrorHandling;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):(0,C.z)(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;(0,C.z)(t)}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};A.v.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){if(this.unsubscribe(),A.v.useDeprecatedSynchronousErrorHandling)throw t;(0,C.z)(t)}},e.prototype.__tryOrSetError=function(t,e,n){if(!A.v.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(e){return A.v.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=e,t.syncErrorThrown=!0,!0):((0,C.z)(e),!0)}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(I)},8760:(t,e,n)=>{"use strict";n.d(e,{w:()=>s});var r=n(9026),i=n(2009),o=n(4156),g=n(8782),s=function(){function t(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)}var e;return t.prototype.unsubscribe=function(){var e;if(!this.closed){var n=this,s=n._parentOrParents,C=n._ctorUnsubscribe,I=n._unsubscribe,a=n._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,s instanceof t)s.remove(this);else if(null!==s)for(var u=0;u{"use strict";n.d(e,{v:()=>i});var r=!1,i={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){t&&(new Error).stack,r=t},get useDeprecatedSynchronousErrorHandling(){return r}}},7604:(t,e,n)=>{"use strict";n.d(e,{Ds:()=>A,IY:()=>s,ft:()=>C});var r=n(655),i=n(979),o=n(2772),g=n(7843),s=function(t){function e(e){var n=t.call(this)||this;return n.parent=e,n}return r.ZT(e,t),e.prototype._next=function(t){this.parent.notifyNext(t)},e.prototype._error=function(t){this.parent.notifyError(t),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(),this.unsubscribe()},e}(i.L),A=(i.L,function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.ZT(e,t),e.prototype.notifyNext=function(t){this.destination.next(t)},e.prototype.notifyError=function(t){this.destination.error(t)},e.prototype.notifyComplete=function(){this.destination.complete()},e}(i.L));function C(t,e){if(!e.closed){if(t instanceof o.y)return t.subscribe(e);var n;try{n=(0,g.s)(t)(e)}catch(t){e.error(t)}return n}}i.L},3140:(t,e,n)=>{"use strict";n.d(e,{N:()=>I,c:()=>C});var r=n(655),i=n(211),o=n(2772),g=n(979),s=n(8760),A=n(3018),C=function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subjectFactory=n,r._refCount=0,r._isComplete=!1,r}return r.ZT(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new s.w).add(this.source.subscribe(new a(this.getSubject(),this))),t.closed&&(this._connection=null,t=s.w.EMPTY)),t},e.prototype.refCount=function(){return(0,A.x)()(this)},e}(o.y),I=function(){var t=C.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}}(),a=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return r.ZT(e,t),e.prototype._error=function(e){this._unsubscribe(),t.prototype._error.call(this,e)},e.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}},e}(i.Yc);g.L},5142:(t,e,n)=>{"use strict";n.d(e,{Ms:()=>a,aj:()=>I});var r=n(655),i=n(7507),o=n(9026),g=n(2039),s=n(2080),A=n(3375),C={};function I(){for(var t=[],e=0;e{"use strict";n.d(e,{z:()=>o});var r=n(8170),i=n(2257);function o(){for(var t=[],e=0;e{"use strict";n.d(e,{P:()=>g});var r=n(2772),i=n(5760),o=n(5631);function g(t){return new r.y((function(e){var n;try{n=t()}catch(t){return void e.error(t)}return(n?(0,i.D)(n):(0,o.c)()).subscribe(e)}))}},5631:(t,e,n)=>{"use strict";n.d(e,{E:()=>i,c:()=>o});var r=n(2772),i=new r.y((function(t){return t.complete()}));function o(t){return t?function(t){return new r.y((function(e){return t.schedule((function(){return e.complete()}))}))}(t):i}},5760:(t,e,n)=>{"use strict";n.d(e,{D:()=>g});var r=n(2772),i=n(7843),o=n(8107);function g(t,e){return e?(0,o.x)(t,e):t instanceof r.y?t:new r.y((0,i.s)(t))}},3375:(t,e,n)=>{"use strict";n.d(e,{n:()=>g});var r=n(2772),i=n(6900),o=n(3109);function g(t,e){return e?(0,o.r)(t,e):new r.y((0,i.V)(t))}},4370:(t,e,n)=>{"use strict";n.d(e,{T:()=>s});var r=n(2772),i=n(7507),o=n(2556),g=n(3375);function s(){for(var t=[],e=0;e1&&"number"==typeof t[t.length-1]&&(n=t.pop())):"number"==typeof A&&(n=t.pop()),null===s&&1===t.length&&t[0]instanceof r.y?t[0]:(0,o.J)(n)((0,g.n)(t,s))}},8170:(t,e,n)=>{"use strict";n.d(e,{of:()=>g});var r=n(7507),i=n(3375),o=n(3109);function g(){for(var t=[],e=0;e{"use strict";n.d(e,{S3:()=>A});var r=n(655),i=n(9026),o=n(3375),g=n(2039),s=n(2080);function A(){for(var t=[],e=0;e{"use strict";n.d(e,{_:()=>i});var r=n(2772);function i(t,e){return e?new r.y((function(n){return e.schedule(o,0,{error:t,subscriber:n})})):new r.y((function(e){return e.error(t)}))}function o(t){var e=t.error;t.subscriber.error(e)}},9604:(t,e,n)=>{"use strict";n.d(e,{H:()=>s});var r=n(2772),i=n(964),o=n(5812),g=n(7507);function s(t,e,n){void 0===t&&(t=0);var s=-1;return(0,o.k)(e)?s=Number(e)<1?1:Number(e):(0,g.K)(e)&&(n=e),(0,g.K)(n)||(n=i.P),new r.y((function(e){var r=(0,o.k)(t)?t:+t-n.now();return n.schedule(A,r,{index:0,period:s,subscriber:e})}))}function A(t){var e=t.index,n=t.period,r=t.subscriber;if(r.next(e),!r.closed){if(-1===n)return r.complete();t.index=e+1,this.schedule(t,n)}}},5080:(t,e,n)=>{"use strict";n.d(e,{$R:()=>C,mx:()=>I});var r=n(655),i=n(3375),o=n(9026),g=n(979),s=n(999),A=n(7604);function C(){for(var t=[],e=0;ethis.index},t.prototype.hasCompleted=function(){return this.array.length===this.index},t}(),l=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.parent=n,i.observable=r,i.stillUnsubscribed=!0,i.buffer=[],i.isComplete=!1,i}return r.ZT(e,t),e.prototype[s.hZ]=function(){return this},e.prototype.next=function(){var t=this.buffer;return 0===t.length&&this.isComplete?{value:null,done:!0}:{value:t.shift(),done:!1}},e.prototype.hasValue=function(){return this.buffer.length>0},e.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},e.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},e.prototype.notifyNext=function(t){this.buffer.push(t),this.parent.checkIterators()},e.prototype.subscribe=function(){return(0,A.ft)(this.observable,new A.IY(this))},e}(A.Ds)},2257:(t,e,n)=>{"use strict";n.d(e,{u:()=>i});var r=n(2556);function i(){return(0,r.J)(1)}},6008:(t,e,n)=>{"use strict";n.d(e,{h:()=>o});var r=n(655),i=n(979);function o(t,e){return function(n){return n.lift(new g(t,e))}}var g=function(){function t(t,e){this.predicate=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.predicate,this.thisArg))},t}(),s=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.predicate=n,i.thisArg=r,i.count=0,i}return r.ZT(e,t),e.prototype._next=function(t){var e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}e&&this.destination.next(t)},e}(i.L)},1120:(t,e,n)=>{"use strict";n.d(e,{T:()=>u,v:()=>A});var r=n(655),i=n(979),o=n(8760),g=n(2772),s=n(211);function A(t,e,n,r){return function(i){return i.lift(new C(t,e,n,r))}}var C=function(){function t(t,e,n,r){this.keySelector=t,this.elementSelector=e,this.durationSelector=n,this.subjectSelector=r}return t.prototype.call=function(t,e){return e.subscribe(new I(t,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},t}(),I=function(t){function e(e,n,r,i,o){var g=t.call(this,e)||this;return g.keySelector=n,g.elementSelector=r,g.durationSelector=i,g.subjectSelector=o,g.groups=null,g.attemptedToUnsubscribe=!1,g.count=0,g}return r.ZT(e,t),e.prototype._next=function(t){var e;try{e=this.keySelector(t)}catch(t){return void this.error(t)}this._group(t,e)},e.prototype._group=function(t,e){var n=this.groups;n||(n=this.groups=new Map);var r,i=n.get(e);if(this.elementSelector)try{r=this.elementSelector(t)}catch(t){this.error(t)}else r=t;if(!i){i=this.subjectSelector?this.subjectSelector():new s.xQ,n.set(e,i);var o=new u(e,i,this);if(this.destination.next(o),this.durationSelector){var g=void 0;try{g=this.durationSelector(new u(e,i))}catch(t){return void this.error(t)}this.add(g.subscribe(new a(e,i,this)))}}i.closed||i.next(r)},e.prototype._error=function(t){var e=this.groups;e&&(e.forEach((function(e,n){e.error(t)})),e.clear()),this.destination.error(t)},e.prototype._complete=function(){var t=this.groups;t&&(t.forEach((function(t,e){t.complete()})),t.clear()),this.destination.complete()},e.prototype.removeGroup=function(t){this.groups.delete(t)},e.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&t.prototype.unsubscribe.call(this))},e}(i.L),a=function(t){function e(e,n,r){var i=t.call(this,n)||this;return i.key=e,i.group=n,i.parent=r,i}return r.ZT(e,t),e.prototype._next=function(t){this.complete()},e.prototype._unsubscribe=function(){var t=this.parent,e=this.key;this.key=this.parent=null,t&&t.removeGroup(e)},e}(i.L),u=function(t){function e(e,n,r){var i=t.call(this)||this;return i.key=e,i.groupSubject=n,i.refCountSubscription=r,i}return r.ZT(e,t),e.prototype._subscribe=function(t){var e=new o.w,n=this.refCountSubscription,r=this.groupSubject;return n&&!n.closed&&e.add(new c(n)),e.add(r.subscribe(t)),e},e}(g.y),c=function(t){function e(e){var n=t.call(this)||this;return n.parent=e,e.count++,n}return r.ZT(e,t),e.prototype.unsubscribe=function(){var e=this.parent;e.closed||this.closed||(t.prototype.unsubscribe.call(this),e.count-=1,0===e.count&&e.attemptedToUnsubscribe&&e.unsubscribe())},e}(o.w)},5709:(t,e,n)=>{"use strict";n.d(e,{U:()=>o});var r=n(655),i=n(979);function o(t,e){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new g(t,e))}}var g=function(){function t(t,e){this.project=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.project,this.thisArg))},t}(),s=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.project=n,i.count=0,i.thisArg=r||i,i}return r.ZT(e,t),e.prototype._next=function(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(i.L)},2556:(t,e,n)=>{"use strict";n.d(e,{J:()=>o});var r=n(7746),i=n(3608);function o(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),(0,r.zg)(i.y,t)}},7746:(t,e,n)=>{"use strict";n.d(e,{VS:()=>I,zg:()=>s});var r=n(655),i=n(5709),o=n(5760),g=n(7604);function s(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof e?function(r){return r.pipe(s((function(n,r){return(0,o.D)(t(n,r)).pipe((0,i.U)((function(t,i){return e(n,t,r,i)})))}),n))}:("number"==typeof e&&(n=e),function(e){return e.lift(new A(t,n))})}var A=function(){function t(t,e){void 0===e&&(e=Number.POSITIVE_INFINITY),this.project=t,this.concurrent=e}return t.prototype.call=function(t,e){return e.subscribe(new C(t,this.project,this.concurrent))},t}(),C=function(t){function e(e,n,r){void 0===r&&(r=Number.POSITIVE_INFINITY);var i=t.call(this,e)||this;return i.project=n,i.concurrent=r,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i}return r.ZT(e,t),e.prototype._next=function(t){this.active0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}(g.Ds),I=s},9276:(t,e,n)=>{"use strict";n.d(e,{QV:()=>g,ht:()=>A});var r=n(655),i=n(979),o=n(2632);function g(t,e){return void 0===e&&(e=0),function(n){return n.lift(new s(t,e))}}var s=function(){function t(t,e){void 0===e&&(e=0),this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return e.subscribe(new A(t,this.scheduler,this.delay))},t}(),A=function(t){function e(e,n,r){void 0===r&&(r=0);var i=t.call(this,e)||this;return i.scheduler=n,i.delay=r,i}return r.ZT(e,t),e.dispatch=function(t){var e=t.notification,n=t.destination;e.observe(n),this.unsubscribe()},e.prototype.scheduleMessage=function(t){this.destination.add(this.scheduler.schedule(e.dispatch,this.delay,new C(t,this.destination)))},e.prototype._next=function(t){this.scheduleMessage(o.P.createNext(t))},e.prototype._error=function(t){this.scheduleMessage(o.P.createError(t)),this.unsubscribe()},e.prototype._complete=function(){this.scheduleMessage(o.P.createComplete()),this.unsubscribe()},e}(i.L),C=function(){return function(t,e){this.notification=t,this.destination=e}}()},3018:(t,e,n)=>{"use strict";n.d(e,{x:()=>o});var r=n(655),i=n(979);function o(){return function(t){return t.lift(new g(t))}}var g=function(){function t(t){this.connectable=t}return t.prototype.call=function(t,e){var n=this.connectable;n._refCount++;var r=new s(t,n),i=e.subscribe(r);return r.closed||(r.connection=n.connect()),i},t}(),s=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return r.ZT(e,t),e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else{var n=this.connection,r=t._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null},e}(i.L)},3109:(t,e,n)=>{"use strict";n.d(e,{r:()=>o});var r=n(2772),i=n(8760);function o(t,e){return new r.y((function(n){var r=new i.w,o=0;return r.add(e.schedule((function(){o!==t.length?(n.next(t[o++]),n.closed||r.add(this.schedule())):n.complete()}))),r}))}},8107:(t,e,n)=>{"use strict";n.d(e,{x:()=>I});var r=n(2772),i=n(8760),o=n(5050),g=n(3109),s=n(999),A=n(336),C=n(9217);function I(t,e){if(null!=t){if(function(t){return t&&"function"==typeof t[o.L]}(t))return function(t,e){return new r.y((function(n){var r=new i.w;return r.add(e.schedule((function(){var i=t[o.L]();r.add(i.subscribe({next:function(t){r.add(e.schedule((function(){return n.next(t)})))},error:function(t){r.add(e.schedule((function(){return n.error(t)})))},complete:function(){r.add(e.schedule((function(){return n.complete()})))}}))}))),r}))}(t,e);if((0,A.t)(t))return function(t,e){return new r.y((function(n){var r=new i.w;return r.add(e.schedule((function(){return t.then((function(t){r.add(e.schedule((function(){n.next(t),r.add(e.schedule((function(){return n.complete()})))})))}),(function(t){r.add(e.schedule((function(){return n.error(t)})))}))}))),r}))}(t,e);if((0,C.z)(t))return(0,g.r)(t,e);if(function(t){return t&&"function"==typeof t[s.hZ]}(t)||"string"==typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return new r.y((function(n){var r,o=new i.w;return o.add((function(){r&&"function"==typeof r.return&&r.return()})),o.add(e.schedule((function(){r=t[s.hZ](),o.add(e.schedule((function(){if(!n.closed){var t,e;try{var i=r.next();t=i.value,e=i.done}catch(t){return void n.error(t)}e?n.complete():(n.next(t),this.schedule())}})))}))),o}))}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}},6114:(t,e,n)=>{"use strict";n.d(e,{o:()=>i});var r=n(655),i=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r.pending=!1,r}return r.ZT(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this},e.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),setInterval(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var n=!1,r=void 0;try{this.work(t)}catch(t){n=!0,r=!!t&&t||new Error(t)}if(n)return this.unsubscribe(),r},e.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,n=e.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null},e}(function(t){function e(e,n){return t.call(this)||this}return r.ZT(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(n(8760).w))},8399:(t,e,n)=>{"use strict";n.d(e,{v:()=>o});var r=n(655),i=n(8725),o=function(t){function e(n,r){void 0===r&&(r=i.b.now);var o=t.call(this,n,(function(){return e.delegate&&e.delegate!==o?e.delegate.now():r()}))||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return r.ZT(e,t),e.prototype.schedule=function(n,r,i){return void 0===r&&(r=0),e.delegate&&e.delegate!==this?e.delegate.schedule(n,r,i):t.prototype.schedule.call(this,n,r,i)},e.prototype.flush=function(t){var e=this.actions;if(this.active)e.push(t);else{var n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},e}(i.b)},6650:(t,e,n)=>{"use strict";n.d(e,{e:()=>I,E:()=>C});var r=n(655),i=1,o=function(){return Promise.resolve()}(),g={};function s(t){return t in g&&(delete g[t],!0)}var A=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return r.ZT(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e.scheduled||(e.scheduled=(A=e.flush.bind(e,null),C=i++,g[C]=!0,o.then((function(){return s(C)&&A()})),C)));var A,C},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);0===e.actions.length&&(s(n),e.scheduled=void 0)},e}(n(6114).o),C=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.ZT(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,r=-1,i=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++r{"use strict";n.d(e,{P:()=>o,z:()=>i});var r=n(6114),i=new(n(8399).v)(r.o),o=i},2546:(t,e,n)=>{"use strict";n.d(e,{c:()=>g,N:()=>o});var r=n(655),i=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return r.ZT(e,t),e.prototype.schedule=function(e,n){return void 0===n&&(n=0),n>0?t.prototype.schedule.call(this,e,n):(this.delay=n,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,n){return n>0||this.closed?t.prototype.execute.call(this,e,n):this._execute(e,n)},e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0?t.prototype.requestAsyncId.call(this,e,n,r):e.flush(this)},e}(n(6114).o),o=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.ZT(e,t),e}(n(8399).v))(i),g=o},999:(t,e,n)=>{"use strict";function r(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}n.d(e,{hZ:()=>i});var i=r()},5050:(t,e,n)=>{"use strict";n.d(e,{L:()=>r});var r=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}()},3142:(t,e,n)=>{"use strict";n.d(e,{b:()=>r});var r=function(){return"function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}()},6565:(t,e,n)=>{"use strict";n.d(e,{W:()=>r});var r=function(){function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t}()},6929:(t,e,n)=>{"use strict";n.d(e,{K:()=>r});var r=function(){function t(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return t.prototype=Object.create(Error.prototype),t}()},1016:(t,e,n)=>{"use strict";n.d(e,{N:()=>r});var r=function(){function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t}()},1462:(t,e,n)=>{"use strict";n.d(e,{W:()=>r});var r=function(){function t(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}return t.prototype=Object.create(Error.prototype),t}()},8782:(t,e,n)=>{"use strict";n.d(e,{B:()=>r});var r=function(){function t(t){return Error.call(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t,this}return t.prototype=Object.create(Error.prototype),t}()},3642:(t,e,n)=>{"use strict";n.d(e,{_:()=>i});var r=n(979);function i(t){for(;t;){var e=t,n=e.closed,i=e.destination,o=e.isStopped;if(n||o)return!1;t=i&&i instanceof r.L?i:null}return!0}},1644:(t,e,n)=>{"use strict";function r(t){setTimeout((function(){throw t}),0)}n.d(e,{z:()=>r})},3608:(t,e,n)=>{"use strict";function r(t){return t}n.d(e,{y:()=>r})},9026:(t,e,n)=>{"use strict";n.d(e,{k:()=>r});var r=function(){return Array.isArray||function(t){return t&&"number"==typeof t.length}}()},9217:(t,e,n)=>{"use strict";n.d(e,{z:()=>r});var r=function(t){return t&&"number"==typeof t.length&&"function"!=typeof t}},4156:(t,e,n)=>{"use strict";function r(t){return"function"==typeof t}n.d(e,{m:()=>r})},5812:(t,e,n)=>{"use strict";n.d(e,{k:()=>i});var r=n(9026);function i(t){return!(0,r.k)(t)&&t-parseFloat(t)+1>=0}},2009:(t,e,n)=>{"use strict";function r(t){return null!==t&&"object"==typeof t}n.d(e,{K:()=>r})},336:(t,e,n)=>{"use strict";function r(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}n.d(e,{t:()=>r})},7507:(t,e,n)=>{"use strict";function r(t){return t&&"function"==typeof t.schedule}n.d(e,{K:()=>r})},3306:(t,e,n)=>{"use strict";function r(){}n.d(e,{Z:()=>r})},8463:(t,e,n)=>{"use strict";function r(t,e){function n(){return!n.pred.apply(n.thisArg,arguments)}return n.pred=t,n.thisArg=e,n}n.d(e,{f:()=>r})},2561:(t,e,n)=>{"use strict";n.d(e,{U:()=>o,z:()=>i});var r=n(3608);function i(){for(var t=[],e=0;e{"use strict";n.d(e,{s:()=>I});var r=n(6900),i=n(1644),o=n(999),g=n(5050),s=n(9217),A=n(336),C=n(2009),I=function(t){if(t&&"function"==typeof t[g.L])return I=t,function(t){var e=I[g.L]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(t)};if((0,s.z)(t))return(0,r.V)(t);if((0,A.t)(t))return n=t,function(t){return n.then((function(e){t.closed||(t.next(e),t.complete())}),(function(e){return t.error(e)})).then(null,i.z),t};if(t&&"function"==typeof t[o.hZ])return e=t,function(t){for(var n=e[o.hZ]();;){var r=void 0;try{r=n.next()}catch(e){return t.error(e),t}if(r.done){t.complete();break}if(t.next(r.value),t.closed)break}return"function"==typeof n.return&&t.add((function(){n.return&&n.return()})),t};var e,n,I,a=(0,C.K)(t)?"an invalid object":"'"+t+"'";throw new TypeError("You provided "+a+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")}},6900:(t,e,n)=>{"use strict";n.d(e,{V:()=>r});var r=function(t){return function(e){for(var n=0,r=t.length;n{"use strict";n.d(e,{D:()=>s});var r=n(655),i=function(t){function e(e,n,r){var i=t.call(this)||this;return i.parent=e,i.outerValue=n,i.outerIndex=r,i.index=0,i}return r.ZT(e,t),e.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)},e.prototype._error=function(t){this.parent.notifyError(t,this),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},e}(n(979).L),o=n(7843),g=n(2772);function s(t,e,n,r,s){if(void 0===s&&(s=new i(t,n,r)),!s.closed)return e instanceof g.y?e.subscribe(s):(0,o.s)(e)(s)}},1717:(t,e,n)=>{"use strict";n.r(e),n.d(e,{audit:()=>o,auditTime:()=>I,buffer:()=>a,bufferCount:()=>h,bufferTime:()=>y,bufferToggle:()=>S,bufferWhen:()=>R,catchError:()=>j,combineAll:()=>z,combineLatest:()=>V,concat:()=>W,concatAll:()=>Y.u,concatMap:()=>K,concatMapTo:()=>Q,count:()=>X,debounce:()=>$,debounceTime:()=>nt,defaultIfEmpty:()=>gt,delay:()=>at,delayWhen:()=>dt,dematerialize:()=>bt,distinct:()=>_t,distinctUntilChanged:()=>Ot,distinctUntilKeyChanged:()=>St,elementAt:()=>Ut,endWith:()=>Gt,every:()=>Wt,exhaust:()=>Kt,exhaustMap:()=>Jt,expand:()=>ee,filter:()=>Nt.h,finalize:()=>ie,find:()=>se,findIndex:()=>Ie,first:()=>ue,flatMap:()=>H.VS,groupBy:()=>ce.v,ignoreElements:()=>le,isEmpty:()=>fe,last:()=>we,map:()=>qt.U,mapTo:()=>_e,materialize:()=>Oe,max:()=>Me,merge:()=>Be,mergeAll:()=>Le.J,mergeMap:()=>H.zg,mergeMapTo:()=>Fe,mergeScan:()=>ze,min:()=>Ve,multicast:()=>We,observeOn:()=>He.QV,onErrorResumeNext:()=>Ke,pairwise:()=>qe,partition:()=>en,pluck:()=>nn,publish:()=>on,publishBehavior:()=>sn,publishLast:()=>Cn,publishReplay:()=>an,race:()=>cn,reduce:()=>De,refCount:()=>En.x,repeat:()=>ln,repeatWhen:()=>fn,retry:()=>yn,retryWhen:()=>wn,sample:()=>On,sampleTime:()=>Sn,scan:()=>Se,sequenceEqual:()=>Dn,share:()=>Fn,shareReplay:()=>zn,single:()=>Zn,skip:()=>Gn,skipLast:()=>Hn,skipUntil:()=>Xn,skipWhile:()=>$n,startWith:()=>nr,subscribeOn:()=>gr,switchAll:()=>ar,switchMap:()=>Ar,switchMapTo:()=>ur,take:()=>Ft,takeLast:()=>ye,takeUntil:()=>cr,takeWhile:()=>dr,tap:()=>br,throttle:()=>xr,throttleTime:()=>kr,throwIfEmpty:()=>Dt,timeInterval:()=>Rr,timeout:()=>zr,timeoutWith:()=>jr,timestamp:()=>Zr,toArray:()=>Gr,window:()=>Wr,windowCount:()=>Kr,windowTime:()=>qr,windowToggle:()=>ii,windowWhen:()=>si,withLatestFrom:()=>Ii,zip:()=>li,zipAll:()=>hi});var r=n(655),i=n(7604);function o(t){return function(e){return e.lift(new g(t))}}var g=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.durationSelector))},t}(),s=function(t){function e(e,n){var r=t.call(this,e)||this;return r.durationSelector=n,r.hasValue=!1,r}return r.ZT(e,t),e.prototype._next=function(t){if(this.value=t,this.hasValue=!0,!this.throttled){var e=void 0;try{e=(0,this.durationSelector)(t)}catch(t){return this.destination.error(t)}var n=(0,i.ft)(e,new i.IY(this));!n||n.closed?this.clearThrottle():this.add(this.throttled=n)}},e.prototype.clearThrottle=function(){var t=this,e=t.value,n=t.hasValue,r=t.throttled;r&&(this.remove(r),this.throttled=void 0,r.unsubscribe()),n&&(this.value=void 0,this.hasValue=!1,this.destination.next(e))},e.prototype.notifyNext=function(){this.clearThrottle()},e.prototype.notifyComplete=function(){this.clearThrottle()},e}(i.Ds),A=n(964),C=n(9604);function I(t,e){return void 0===e&&(e=A.P),o((function(){return(0,C.H)(t,e)}))}function a(t){return function(e){return e.lift(new u(t))}}var u=function(){function t(t){this.closingNotifier=t}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.closingNotifier))},t}(),c=function(t){function e(e,n){var r=t.call(this,e)||this;return r.buffer=[],r.add((0,i.ft)(n,new i.IY(r))),r}return r.ZT(e,t),e.prototype._next=function(t){this.buffer.push(t)},e.prototype.notifyNext=function(){var t=this.buffer;this.buffer=[],this.destination.next(t)},e}(i.Ds),l=n(979);function h(t,e){return void 0===e&&(e=null),function(n){return n.lift(new d(t,e))}}var d=function(){function t(t,e){this.bufferSize=t,this.startBufferEvery=e,this.subscriberClass=e&&t!==e?p:f}return t.prototype.call=function(t,e){return e.subscribe(new this.subscriberClass(t,this.bufferSize,this.startBufferEvery))},t}(),f=function(t){function e(e,n){var r=t.call(this,e)||this;return r.bufferSize=n,r.buffer=[],r}return r.ZT(e,t),e.prototype._next=function(t){var e=this.buffer;e.push(t),e.length==this.bufferSize&&(this.destination.next(e),this.buffer=[])},e.prototype._complete=function(){var e=this.buffer;e.length>0&&this.destination.next(e),t.prototype._complete.call(this)},e}(l.L),p=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.bufferSize=n,i.startBufferEvery=r,i.buffers=[],i.count=0,i}return r.ZT(e,t),e.prototype._next=function(t){var e=this,n=e.bufferSize,r=e.startBufferEvery,i=e.buffers,o=e.count;this.count++,o%r==0&&i.push([]);for(var g=i.length;g--;){var s=i[g];s.push(t),s.length===n&&(i.splice(g,1),this.destination.next(s))}},e.prototype._complete=function(){for(var e=this.buffers,n=this.destination;e.length>0;){var r=e.shift();r.length>0&&n.next(r)}t.prototype._complete.call(this)},e}(l.L),v=n(7507);function y(t){var e=arguments.length,n=A.P;(0,v.K)(arguments[arguments.length-1])&&(n=arguments[arguments.length-1],e--);var r=null;e>=2&&(r=arguments[1]);var i=Number.POSITIVE_INFINITY;return e>=3&&(i=arguments[2]),function(e){return e.lift(new b(t,r,i,n))}}var b=function(){function t(t,e,n,r){this.bufferTimeSpan=t,this.bufferCreationInterval=e,this.maxBufferSize=n,this.scheduler=r}return t.prototype.call=function(t,e){return e.subscribe(new w(t,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},t}(),m=function(){return function(){this.buffer=[]}}(),w=function(t){function e(e,n,r,i,o){var g=t.call(this,e)||this;g.bufferTimeSpan=n,g.bufferCreationInterval=r,g.maxBufferSize=i,g.scheduler=o,g.contexts=[];var s=g.openContext();if(g.timespanOnly=null==r||r<0,g.timespanOnly){var A={subscriber:g,context:s,bufferTimeSpan:n};g.add(s.closeAction=o.schedule(_,n,A))}else{var C={subscriber:g,context:s},I={bufferTimeSpan:n,bufferCreationInterval:r,subscriber:g,scheduler:o};g.add(s.closeAction=o.schedule(E,n,C)),g.add(o.schedule(x,r,I))}return g}return r.ZT(e,t),e.prototype._next=function(t){for(var e,n=this.contexts,r=n.length,i=0;i0;){var r=e.shift();n.next(r.buffer)}t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.contexts=null},e.prototype.onBufferFull=function(t){this.closeContext(t);var e=t.closeAction;if(e.unsubscribe(),this.remove(e),!this.closed&&this.timespanOnly){t=this.openContext();var n=this.bufferTimeSpan,r={subscriber:this,context:t,bufferTimeSpan:n};this.add(t.closeAction=this.scheduler.schedule(_,n,r))}},e.prototype.openContext=function(){var t=new m;return this.contexts.push(t),t},e.prototype.closeContext=function(t){this.destination.next(t.buffer);var e=this.contexts;(e?e.indexOf(t):-1)>=0&&e.splice(e.indexOf(t),1)},e}(l.L);function _(t){var e=t.subscriber,n=t.context;n&&e.closeContext(n),e.closed||(t.context=e.openContext(),t.context.closeAction=this.schedule(t,t.bufferTimeSpan))}function x(t){var e=t.bufferCreationInterval,n=t.bufferTimeSpan,r=t.subscriber,i=t.scheduler,o=r.openContext();r.closed||(r.add(o.closeAction=i.schedule(E,n,{subscriber:r,context:o})),this.schedule(t,e))}function E(t){var e=t.subscriber,n=t.context;e.closeContext(n)}var O=n(8760),k=n(2080),T=n(2039);function S(t,e){return function(n){return n.lift(new P(t,e))}}var P=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new N(t,this.openings,this.closingSelector))},t}(),N=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.closingSelector=r,i.contexts=[],i.add((0,k.D)(i,n)),i}return r.ZT(e,t),e.prototype._next=function(t){for(var e=this.contexts,n=e.length,r=0;r0;){var r=n.shift();r.subscription.unsubscribe(),r.buffer=null,r.subscription=null}this.contexts=null,t.prototype._error.call(this,e)},e.prototype._complete=function(){for(var e=this.contexts;e.length>0;){var n=e.shift();this.destination.next(n.buffer),n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,t.prototype._complete.call(this)},e.prototype.notifyNext=function(t,e){t?this.closeBuffer(t):this.openBuffer(e)},e.prototype.notifyComplete=function(t){this.closeBuffer(t.context)},e.prototype.openBuffer=function(t){try{var e=this.closingSelector.call(this,t);e&&this.trySubscribe(e)}catch(t){this._error(t)}},e.prototype.closeBuffer=function(t){var e=this.contexts;if(e&&t){var n=t.buffer,r=t.subscription;this.destination.next(n),e.splice(e.indexOf(t),1),this.remove(r),r.unsubscribe()}},e.prototype.trySubscribe=function(t){var e=this.contexts,n=new O.w,r={buffer:[],subscription:n};e.push(r);var i=(0,k.D)(this,t,r);!i||i.closed?this.closeBuffer(r):(i.context=r,this.add(i),n.add(i))},e}(T.L);function R(t){return function(e){return e.lift(new D(t))}}var D=function(){function t(t){this.closingSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new M(t,this.closingSelector))},t}(),M=function(t){function e(e,n){var r=t.call(this,e)||this;return r.closingSelector=n,r.subscribing=!1,r.openBuffer(),r}return r.ZT(e,t),e.prototype._next=function(t){this.buffer.push(t)},e.prototype._complete=function(){var e=this.buffer;e&&this.destination.next(e),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.buffer=void 0,this.subscribing=!1},e.prototype.notifyNext=function(){this.openBuffer()},e.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},e.prototype.openBuffer=function(){var t=this.closingSubscription;t&&(this.remove(t),t.unsubscribe());var e,n=this.buffer;this.buffer&&this.destination.next(n),this.buffer=[];try{e=(0,this.closingSelector)()}catch(t){return this.error(t)}t=new O.w,this.closingSubscription=t,this.add(t),this.subscribing=!0,t.add((0,i.ft)(e,new i.IY(this))),this.subscribing=!1},e}(i.Ds);function j(t){return function(e){var n=new B(t),r=e.lift(n);return n.caught=r}}var B=function(){function t(t){this.selector=t}return t.prototype.call=function(t,e){return e.subscribe(new L(t,this.selector,this.caught))},t}(),L=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.selector=n,i.caught=r,i}return r.ZT(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=void 0;try{n=this.selector(e,this.caught)}catch(e){return void t.prototype.error.call(this,e)}this._unsubscribeAndRecycle();var r=new i.IY(this);this.add(r);var o=(0,i.ft)(n,r);o!==r&&this.add(o)}},e}(i.Ds),F=n(5142);function z(t){return function(e){return e.lift(new F.Ms(t))}}var Z=n(9026),U=n(5760);function V(){for(var t=[],e=0;e0&&n[0].time-r.now()<=0;)n.shift().notification.observe(i);if(n.length>0){var o=Math.max(0,n[0].time-r.now());this.schedule(t,o)}else this.unsubscribe(),e.active=!1},e.prototype._schedule=function(t){this.active=!0,this.destination.add(t.schedule(e.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))},e.prototype.scheduleNotification=function(t){if(!0!==this.errored){var e=this.scheduler,n=new lt(e.now()+this.delay,t);this.queue.push(n),!1===this.active&&this._schedule(e)}},e.prototype._next=function(t){this.scheduleNotification(It.P.createNext(t))},e.prototype._error=function(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.scheduleNotification(It.P.createComplete()),this.unsubscribe()},e}(l.L),lt=function(){return function(t,e){this.time=t,this.notification=e}}(),ht=n(2772);function dt(t,e){return e?function(n){return new vt(n,e).lift(new ft(t))}:function(e){return e.lift(new ft(t))}}var ft=function(){function t(t){this.delayDurationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new pt(t,this.delayDurationSelector))},t}(),pt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.delayDurationSelector=n,r.completed=!1,r.delayNotifierSubscriptions=[],r.index=0,r}return r.ZT(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.destination.next(t),this.removeSubscription(i),this.tryComplete()},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype.notifyComplete=function(t){var e=this.removeSubscription(t);e&&this.destination.next(e),this.tryComplete()},e.prototype._next=function(t){var e=this.index++;try{var n=this.delayDurationSelector(t,e);n&&this.tryDelay(n,t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},e.prototype.removeSubscription=function(t){t.unsubscribe();var e=this.delayNotifierSubscriptions.indexOf(t);return-1!==e&&this.delayNotifierSubscriptions.splice(e,1),t.outerValue},e.prototype.tryDelay=function(t,e){var n=(0,k.D)(this,t,e);n&&!n.closed&&(this.destination.add(n),this.delayNotifierSubscriptions.push(n))},e.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()},e}(T.L),vt=function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subscriptionDelay=n,r}return r.ZT(e,t),e.prototype._subscribe=function(t){this.subscriptionDelay.subscribe(new yt(t,this.source))},e}(ht.y),yt=function(t){function e(e,n){var r=t.call(this)||this;return r.parent=e,r.source=n,r.sourceSubscribed=!1,r}return r.ZT(e,t),e.prototype._next=function(t){this.subscribeToSource()},e.prototype._error=function(t){this.unsubscribe(),this.parent.error(t)},e.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource()},e.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},e}(l.L);function bt(){return function(t){return t.lift(new mt)}}var mt=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new wt(t))},t}(),wt=function(t){function e(e){return t.call(this,e)||this}return r.ZT(e,t),e.prototype._next=function(t){t.observe(this.destination)},e}(l.L);function _t(t,e){return function(n){return n.lift(new xt(t,e))}}var xt=function(){function t(t,e){this.keySelector=t,this.flushes=e}return t.prototype.call=function(t,e){return e.subscribe(new Et(t,this.keySelector,this.flushes))},t}(),Et=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.keySelector=n,o.values=new Set,r&&o.add((0,i.ft)(r,new i.IY(o))),o}return r.ZT(e,t),e.prototype.notifyNext=function(){this.values.clear()},e.prototype.notifyError=function(t){this._error(t)},e.prototype._next=function(t){this.keySelector?this._useKeySelector(t):this._finalizeNext(t,t)},e.prototype._useKeySelector=function(t){var e,n=this.destination;try{e=this.keySelector(t)}catch(t){return void n.error(t)}this._finalizeNext(e,t)},e.prototype._finalizeNext=function(t,e){var n=this.values;n.has(t)||(n.add(t),this.destination.next(e))},e}(i.Ds);function Ot(t,e){return function(n){return n.lift(new kt(t,e))}}var kt=function(){function t(t,e){this.compare=t,this.keySelector=e}return t.prototype.call=function(t,e){return e.subscribe(new Tt(t,this.compare,this.keySelector))},t}(),Tt=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.keySelector=r,i.hasKey=!1,"function"==typeof n&&(i.compare=n),i}return r.ZT(e,t),e.prototype.compare=function(t,e){return t===e},e.prototype._next=function(t){var e;try{var n=this.keySelector;e=n?n(t):t}catch(t){return this.destination.error(t)}var r=!1;if(this.hasKey)try{r=(0,this.compare)(this.key,e)}catch(t){return this.destination.error(t)}else this.hasKey=!0;r||(this.key=e,this.destination.next(t))},e}(l.L);function St(t,e){return Ot((function(n,r){return e?e(n[t],r[t]):n[t]===r[t]}))}var Pt=n(6565),Nt=n(6008),Rt=n(6929);function Dt(t){return void 0===t&&(t=Bt),function(e){return e.lift(new Mt(t))}}var Mt=function(){function t(t){this.errorFactory=t}return t.prototype.call=function(t,e){return e.subscribe(new jt(t,this.errorFactory))},t}(),jt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.errorFactory=n,r.hasValue=!1,r}return r.ZT(e,t),e.prototype._next=function(t){this.hasValue=!0,this.destination.next(t)},e.prototype._complete=function(){if(this.hasValue)return this.destination.complete();var t=void 0;try{t=this.errorFactory()}catch(e){t=e}this.destination.error(t)},e}(l.L);function Bt(){return new Rt.K}var Lt=n(5631);function Ft(t){return function(e){return 0===t?(0,Lt.c)():e.lift(new zt(t))}}var zt=function(){function t(t){if(this.total=t,this.total<0)throw new Pt.W}return t.prototype.call=function(t,e){return e.subscribe(new Zt(t,this.total))},t}(),Zt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r}return r.ZT(e,t),e.prototype._next=function(t){var e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))},e}(l.L);function Ut(t,e){if(t<0)throw new Pt.W;var n=arguments.length>=2;return function(r){return r.pipe((0,Nt.h)((function(e,n){return n===t})),Ft(1),n?gt(e):Dt((function(){return new Pt.W})))}}var Vt=n(8170);function Gt(){for(var t=[],e=0;e0&&this._next(t.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()},e}(i.Ds);function ie(t){return function(e){return e.lift(new oe(t))}}var oe=function(){function t(t){this.callback=t}return t.prototype.call=function(t,e){return e.subscribe(new ge(t,this.callback))},t}(),ge=function(t){function e(e,n){var r=t.call(this,e)||this;return r.add(new O.w(n)),r}return r.ZT(e,t),e}(l.L);function se(t,e){if("function"!=typeof t)throw new TypeError("predicate is not a function");return function(n){return n.lift(new Ae(t,n,!1,e))}}var Ae=function(){function t(t,e,n,r){this.predicate=t,this.source=e,this.yieldIndex=n,this.thisArg=r}return t.prototype.call=function(t,e){return e.subscribe(new Ce(t,this.predicate,this.source,this.yieldIndex,this.thisArg))},t}(),Ce=function(t){function e(e,n,r,i,o){var g=t.call(this,e)||this;return g.predicate=n,g.source=r,g.yieldIndex=i,g.thisArg=o,g.index=0,g}return r.ZT(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete(),this.unsubscribe()},e.prototype._next=function(t){var e=this.predicate,n=this.thisArg,r=this.index++;try{e.call(n||this,t,r,this.source)&&this.notifyComplete(this.yieldIndex?r:t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},e}(l.L);function Ie(t,e){return function(n){return n.lift(new Ae(t,n,!0,e))}}var ae=n(3608);function ue(t,e){var n=arguments.length>=2;return function(r){return r.pipe(t?(0,Nt.h)((function(e,n){return t(e,n,r)})):ae.y,Ft(1),n?gt(e):Dt((function(){return new Rt.K})))}}var ce=n(1120);function le(){return function(t){return t.lift(new he)}}var he=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new de(t))},t}(),de=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.ZT(e,t),e.prototype._next=function(t){},e}(l.L);function fe(){return function(t){return t.lift(new pe)}}var pe=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new ve(t))},t}(),ve=function(t){function e(e){return t.call(this,e)||this}return r.ZT(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete()},e.prototype._next=function(t){this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(l.L);function ye(t){return function(e){return 0===t?(0,Lt.c)():e.lift(new be(t))}}var be=function(){function t(t){if(this.total=t,this.total<0)throw new Pt.W}return t.prototype.call=function(t,e){return e.subscribe(new me(t,this.total))},t}(),me=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.ring=new Array,r.count=0,r}return r.ZT(e,t),e.prototype._next=function(t){var e=this.ring,n=this.total,r=this.count++;e.length0)for(var n=this.count>=this.total?this.total:this.count,r=this.ring,i=0;i=2;return function(r){return r.pipe(t?(0,Nt.h)((function(e,n){return t(e,n,r)})):ae.y,ye(1),n?gt(e):Dt((function(){return new Rt.K})))}}function _e(t){return function(e){return e.lift(new xe(t))}}var xe=function(){function t(t){this.value=t}return t.prototype.call=function(t,e){return e.subscribe(new Ee(t,this.value))},t}(),Ee=function(t){function e(e,n){var r=t.call(this,e)||this;return r.value=n,r}return r.ZT(e,t),e.prototype._next=function(t){this.destination.next(this.value)},e}(l.L);function Oe(){return function(t){return t.lift(new ke)}}var ke=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Te(t))},t}(),Te=function(t){function e(e){return t.call(this,e)||this}return r.ZT(e,t),e.prototype._next=function(t){this.destination.next(It.P.createNext(t))},e.prototype._error=function(t){var e=this.destination;e.next(It.P.createError(t)),e.complete()},e.prototype._complete=function(){var t=this.destination;t.next(It.P.createComplete()),t.complete()},e}(l.L);function Se(t,e){var n=!1;return arguments.length>=2&&(n=!0),function(r){return r.lift(new Pe(t,e,n))}}var Pe=function(){function t(t,e,n){void 0===n&&(n=!1),this.accumulator=t,this.seed=e,this.hasSeed=n}return t.prototype.call=function(t,e){return e.subscribe(new Ne(t,this.accumulator,this.seed,this.hasSeed))},t}(),Ne=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.accumulator=n,o._seed=r,o.hasSeed=i,o.index=0,o}return r.ZT(e,t),Object.defineProperty(e.prototype,"seed",{get:function(){return this._seed},set:function(t){this.hasSeed=!0,this._seed=t},enumerable:!0,configurable:!0}),e.prototype._next=function(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.accumulator(this.seed,t,n)}catch(t){this.destination.error(t)}this.seed=e,this.destination.next(e)},e}(l.L),Re=n(2561);function De(t,e){return arguments.length>=2?function(n){return(0,Re.z)(Se(t,e),ye(1),gt(e))(n)}:function(e){return(0,Re.z)(Se((function(e,n,r){return t(e,n,r+1)})),ye(1))(e)}}function Me(t){return De("function"==typeof t?function(e,n){return t(e,n)>0?e:n}:function(t,e){return t>e?t:e})}var je=n(4370);function Be(){for(var t=[],e=0;e0?this._next(t.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},e}(i.Ds);function Ve(t){return De("function"==typeof t?function(e,n){return t(e,n)<0?e:n}:function(t,e){return t-1&&(this.count=n-1),e.subscribe(this._unsubscribeAndRecycle())}},e}(l.L);function fn(t){return function(e){return e.lift(new pn(t))}}var pn=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new vn(t,this.notifier,e))},t}(),vn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.notifier=n,i.source=r,i.sourceIsBeingSubscribedTo=!0,i}return r.ZT(e,t),e.prototype.notifyNext=function(){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},e.prototype.notifyComplete=function(){if(!1===this.sourceIsBeingSubscribedTo)return t.prototype.complete.call(this)},e.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return t.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next(void 0)}},e.prototype._unsubscribe=function(){var t=this.notifications,e=this.retriesSubscription;t&&(t.unsubscribe(),this.notifications=void 0),e&&(e.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},e.prototype._unsubscribeAndRecycle=function(){var e=this._unsubscribe;return this._unsubscribe=null,t.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=e,this},e.prototype.subscribeToRetries=function(){var e;this.notifications=new rn.xQ;try{e=(0,this.notifier)(this.notifications)}catch(e){return t.prototype.complete.call(this)}this.retries=e,this.retriesSubscription=(0,i.ft)(e,new i.IY(this))},e}(i.Ds);function yn(t){return void 0===t&&(t=-1),function(e){return e.lift(new bn(t,e))}}var bn=function(){function t(t,e){this.count=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new mn(t,this.count,this.source))},t}(),mn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.count=n,i.source=r,i}return r.ZT(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.source,r=this.count;if(0===r)return t.prototype.error.call(this,e);r>-1&&(this.count=r-1),n.subscribe(this._unsubscribeAndRecycle())}},e}(l.L);function wn(t){return function(e){return e.lift(new _n(t,e))}}var _n=function(){function t(t,e){this.notifier=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new xn(t,this.notifier,this.source))},t}(),xn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.notifier=n,i.source=r,i}return r.ZT(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.errors,r=this.retries,o=this.retriesSubscription;if(r)this.errors=void 0,this.retriesSubscription=void 0;else{n=new rn.xQ;try{r=(0,this.notifier)(n)}catch(e){return t.prototype.error.call(this,e)}o=(0,i.ft)(r,new i.IY(this))}this._unsubscribeAndRecycle(),this.errors=n,this.retries=r,this.retriesSubscription=o,n.next(e)}},e.prototype._unsubscribe=function(){var t=this.errors,e=this.retriesSubscription;t&&(t.unsubscribe(),this.errors=void 0),e&&(e.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},e.prototype.notifyNext=function(){var t=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=t,this.source.subscribe(this)},e}(i.Ds),En=n(3018);function On(t){return function(e){return e.lift(new kn(t))}}var kn=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var n=new Tn(t),r=e.subscribe(n);return r.add((0,i.ft)(this.notifier,new i.IY(n))),r},t}(),Tn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasValue=!1,e}return r.ZT(e,t),e.prototype._next=function(t){this.value=t,this.hasValue=!0},e.prototype.notifyNext=function(){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},e}(i.Ds);function Sn(t,e){return void 0===e&&(e=A.P),function(n){return n.lift(new Pn(t,e))}}var Pn=function(){function t(t,e){this.period=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new Nn(t,this.period,this.scheduler))},t}(),Nn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.period=n,i.scheduler=r,i.hasValue=!1,i.add(r.schedule(Rn,n,{subscriber:i,period:n})),i}return r.ZT(e,t),e.prototype._next=function(t){this.lastValue=t,this.hasValue=!0},e.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},e}(l.L);function Rn(t){var e=t.subscriber,n=t.period;e.notifyNext(),this.schedule(t,n)}function Dn(t,e){return function(n){return n.lift(new Mn(t,e))}}var Mn=function(){function t(t,e){this.compareTo=t,this.comparator=e}return t.prototype.call=function(t,e){return e.subscribe(new jn(t,this.compareTo,this.comparator))},t}(),jn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.compareTo=n,i.comparator=r,i._a=[],i._b=[],i._oneComplete=!1,i.destination.add(n.subscribe(new Bn(e,i))),i}return r.ZT(e,t),e.prototype._next=function(t){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(t),this.checkValues())},e.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe()},e.prototype.checkValues=function(){for(var t=this,e=t._a,n=t._b,r=t.comparator;e.length>0&&n.length>0;){var i=e.shift(),o=n.shift(),g=!1;try{g=r?r(i,o):i===o}catch(t){this.destination.error(t)}g||this.emit(!1)}},e.prototype.emit=function(t){var e=this.destination;e.next(t),e.complete()},e.prototype.nextB=function(t){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(t),this.checkValues())},e.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0},e}(l.L),Bn=function(t){function e(e,n){var r=t.call(this,e)||this;return r.parent=n,r}return r.ZT(e,t),e.prototype._next=function(t){this.parent.nextB(t)},e.prototype._error=function(t){this.parent.error(t),this.unsubscribe()},e.prototype._complete=function(){this.parent.completeB(),this.unsubscribe()},e}(l.L);function Ln(){return new rn.xQ}function Fn(){return function(t){return(0,En.x)()(We(Ln)(t))}}function zn(t,e,n){var r;return r=t&&"object"==typeof t?t:{bufferSize:t,windowTime:e,refCount:!1,scheduler:n},function(t){return t.lift(function(t){var e,n,r=t.bufferSize,i=void 0===r?Number.POSITIVE_INFINITY:r,o=t.windowTime,g=void 0===o?Number.POSITIVE_INFINITY:o,s=t.refCount,A=t.scheduler,C=0,I=!1,a=!1;return function(t){var r;C++,!e||I?(I=!1,e=new In.t(i,g,A),r=e.subscribe(this),n=t.subscribe({next:function(t){e.next(t)},error:function(t){I=!0,e.error(t)},complete:function(){a=!0,n=void 0,e.complete()}}),a&&(n=void 0)):r=e.subscribe(this),this.add((function(){C--,r.unsubscribe(),r=void 0,n&&!a&&s&&0===C&&(n.unsubscribe(),n=void 0,e=void 0)}))}}(r))}}function Zn(t){return function(e){return e.lift(new Un(t,e))}}var Un=function(){function t(t,e){this.predicate=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new Vn(t,this.predicate,this.source))},t}(),Vn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.predicate=n,i.source=r,i.seenValue=!1,i.index=0,i}return r.ZT(e,t),e.prototype.applySingleValue=function(t){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=t)},e.prototype._next=function(t){var e=this.index++;this.predicate?this.tryNext(t,e):this.applySingleValue(t)},e.prototype.tryNext=function(t,e){try{this.predicate(t,e,this.source)&&this.applySingleValue(t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){var t=this.destination;this.index>0?(t.next(this.seenValue?this.singleValue:void 0),t.complete()):t.error(new Rt.K)},e}(l.L);function Gn(t){return function(e){return e.lift(new Wn(t))}}var Wn=function(){function t(t){this.total=t}return t.prototype.call=function(t,e){return e.subscribe(new Yn(t,this.total))},t}(),Yn=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r}return r.ZT(e,t),e.prototype._next=function(t){++this.count>this.total&&this.destination.next(t)},e}(l.L);function Hn(t){return function(e){return e.lift(new Kn(t))}}var Kn=function(){function t(t){if(this._skipCount=t,this._skipCount<0)throw new Pt.W}return t.prototype.call=function(t,e){return 0===this._skipCount?e.subscribe(new l.L(t)):e.subscribe(new Qn(t,this._skipCount))},t}(),Qn=function(t){function e(e,n){var r=t.call(this,e)||this;return r._skipCount=n,r._count=0,r._ring=new Array(n),r}return r.ZT(e,t),e.prototype._next=function(t){var e=this._skipCount,n=this._count++;if(n0?this.startWindowEvery:this.windowSize,n=this.destination,r=this.windowSize,i=this.windows,o=i.length,g=0;g=0&&s%e==0&&!this.closed&&i.shift().complete(),++this.count%e==0&&!this.closed){var A=new rn.xQ;i.push(A),n.next(A)}},e.prototype._error=function(t){var e=this.windows;if(e)for(;e.length>0&&!this.closed;)e.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().complete();this.destination.complete()},e.prototype._unsubscribe=function(){this.count=0,this.windows=null},e}(l.L);function qr(t){var e=A.P,n=null,r=Number.POSITIVE_INFINITY;return(0,v.K)(arguments[3])&&(e=arguments[3]),(0,v.K)(arguments[2])?e=arguments[2]:(0,ir.k)(arguments[2])&&(r=Number(arguments[2])),(0,v.K)(arguments[1])?e=arguments[1]:(0,ir.k)(arguments[1])&&(n=Number(arguments[1])),function(i){return i.lift(new Jr(t,n,r,e))}}var Jr=function(){function t(t,e,n,r){this.windowTimeSpan=t,this.windowCreationInterval=e,this.maxWindowSize=n,this.scheduler=r}return t.prototype.call=function(t,e){return e.subscribe(new ti(t,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},t}(),$r=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._numberOfNextedValues=0,e}return r.ZT(e,t),e.prototype.next=function(e){this._numberOfNextedValues++,t.prototype.next.call(this,e)},Object.defineProperty(e.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),e}(rn.xQ),ti=function(t){function e(e,n,r,i,o){var g=t.call(this,e)||this;g.destination=e,g.windowTimeSpan=n,g.windowCreationInterval=r,g.maxWindowSize=i,g.scheduler=o,g.windows=[];var s=g.openWindow();if(null!==r&&r>=0){var A={subscriber:g,window:s,context:null},C={windowTimeSpan:n,windowCreationInterval:r,subscriber:g,scheduler:o};g.add(o.schedule(ri,n,A)),g.add(o.schedule(ni,r,C))}else{var I={subscriber:g,window:s,windowTimeSpan:n};g.add(o.schedule(ei,n,I))}return g}return r.ZT(e,t),e.prototype._next=function(t){for(var e=this.windows,n=e.length,r=0;r=this.maxWindowSize&&this.closeWindow(i))}},e.prototype._error=function(t){for(var e=this.windows;e.length>0;)e.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){for(var t=this.windows;t.length>0;){var e=t.shift();e.closed||e.complete()}this.destination.complete()},e.prototype.openWindow=function(){var t=new $r;return this.windows.push(t),this.destination.next(t),t},e.prototype.closeWindow=function(t){t.complete();var e=this.windows;e.splice(e.indexOf(t),1)},e}(l.L);function ei(t){var e=t.subscriber,n=t.windowTimeSpan,r=t.window;r&&e.closeWindow(r),t.window=e.openWindow(),this.schedule(t,n)}function ni(t){var e=t.windowTimeSpan,n=t.subscriber,r=t.scheduler,i=t.windowCreationInterval,o=n.openWindow(),g=this,s={action:g,subscription:null},A={subscriber:n,window:o,context:s};s.subscription=r.schedule(ri,e,A),g.add(s.subscription),g.schedule(t,i)}function ri(t){var e=t.subscriber,n=t.window,r=t.context;r&&r.action&&r.subscription&&r.action.remove(r.subscription),e.closeWindow(n)}function ii(t,e){return function(n){return n.lift(new oi(t,e))}}var oi=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new gi(t,this.openings,this.closingSelector))},t}(),gi=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.openings=n,i.closingSelector=r,i.contexts=[],i.add(i.openSubscription=(0,k.D)(i,n,n)),i}return r.ZT(e,t),e.prototype._next=function(t){var e=this.contexts;if(e)for(var n=e.length,r=0;r0){var i=r.indexOf(n);-1!==i&&r.splice(i,1)}},e.prototype.notifyComplete=function(){},e.prototype._next=function(t){if(0===this.toRespond.length){var e=[t].concat(this.values);this.project?this._tryProject(e):this.destination.next(e)}},e.prototype._tryProject=function(t){var e;try{e=this.project.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(T.L),ci=n(5080);function li(){for(var t=[],e=0;e{var r=n(8764),i=r.Buffer;function o(t,e){for(var n in t)e[n]=t[n]}function g(t,e,n){return i(t,e,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,e),e.Buffer=g),g.prototype=Object.create(i.prototype),o(i,g),g.from=function(t,e,n){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,n)},g.alloc=function(t,e,n){if("number"!=typeof t)throw new TypeError("Argument must be a number");var r=i(t);return void 0!==e?"string"==typeof n?r.fill(e,n):r.fill(e):r.fill(0),r},g.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},g.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}},2553:(t,e,n)=>{"use strict";var r=n(9509).Buffer,i=r.isEncoding||function(t){switch((t=""+t)&&t.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 o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){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 t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(r.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=A,this.end=C,e=4;break;case"utf8":this.fillLast=s,e=4;break;case"base64":this.text=I,this.end=a,e=3;break;default:return this.write=u,void(this.end=c)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(e)}function g(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,n=function(t,e,n){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==n?n:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function A(t,e){if((t.length-e)%2==0){var n=t.toString("utf16le",e);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function C(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function I(t,e){var n=(t.length-e)%3;return 0===n?t.toString("base64",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-n))}function a(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function u(t){return t.toString(this.encoding)}function c(t){return t&&t.length?this.write(t):""}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,n;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0?(i>0&&(t.lastNeed=i-1),i):--r=0?(i>0&&(t.lastNeed=i-2),i):--r=0?(i>0&&(2===i?i=0:t.lastNeed=i-3),i):0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=n;var r=t.length-(n-this.lastNeed);return t.copy(this.lastChar,0,r),t.toString("utf8",e,r)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},655:(t,e,n)=>{"use strict";n.d(e,{ZT:()=>i});var r=function(t,e){return r=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])},r(t,e)};function i(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}},8309:(t,e,n)=>{t.exports=n(3363)},9022:(t,e,n)=>{t.exports=n(8065)},86:(t,e,n)=>{t.exports=n(6279)},8712:(t,e,n)=>{t.exports=n(3819)},7606:(t,e,n)=>{t.exports=n(1798)},4282:(t,e,n)=>{t.exports=n(2527)},2018:(t,e,n)=>{t.exports=n(6209)},8222:(t,e,n)=>{t.exports=n(3059)},6226:(t,e,n)=>{t.exports=n(7460)},7198:(t,e,n)=>{t.exports=n(7989)},3733:(t,e,n)=>{t.exports=n(2547)},8886:(t,e,n)=>{t.exports=n(2010)},9030:(t,e,n)=>{t.exports=n(3726)},7445:(t,e,n)=>{t.exports=n(3685)},2472:(t,e,n)=>{t.exports=n(6600)},8994:(t,e,n)=>{t.exports=n(9759)},24:(t,e,n)=>{t.exports=n(1384)},6115:t=>{t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.__esModule=!0,t.exports.default=t.exports},6690:t=>{t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.__esModule=!0,t.exports.default=t.exports},9728:(t,e,n)=>{var r=n(4062);function i(t,e){for(var n=0;n{function e(n){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},1655:(t,e,n)=>{var r=n(6015);t.exports=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&&r(t,e)},t.exports.__esModule=!0,t.exports.default=t.exports},4836:t=>{t.exports=function(t){return t&&t.__esModule?t:{default:t}},t.exports.__esModule=!0,t.exports.default=t.exports},4993:(t,e,n)=>{var r=n(8698).default,i=n(6115);t.exports=function(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return i(t)},t.exports.__esModule=!0,t.exports.default=t.exports},6015:t=>{function e(n,r){return t.exports=e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n,r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},5036:(t,e,n)=>{var r=n(8698).default;t.exports=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)},t.exports.__esModule=!0,t.exports.default=t.exports},4062:(t,e,n)=>{var r=n(8698).default,i=n(5036);t.exports=function(t){var e=i(t,"string");return"symbol"===r(e)?e:String(e)},t.exports.__esModule=!0,t.exports.default=t.exports},8698:t=>{function e(n){return t.exports=e="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},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r].call(o.exports,o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{EventController:()=>Vj,NEOVIS_ADVANCED_CONFIG:()=>Qj,NEOVIS_DEFAULT_CONFIG:()=>Kj,NeoVis:()=>RB,NeoVisEvents:()=>Uj,default:()=>XB,migrateFromOldConfig:()=>QB,objectToTitleHtml:()=>AB,objectToTitleString:()=>CB});var t=n(7445),e=n(2472),i=n(8994);function o(t){return o="function"==typeof e&&"symbol"==typeof i?function(t){return typeof t}:function(t){return t&&"function"==typeof e&&t.constructor===e&&t!==e.prototype?"symbol":typeof t},o(t)}var g=n(24);function s(e,n,r){return(n=function(t){var e=function(t,e){if("object"!==o(t)||null===t)return t;var n=t[g];if(void 0!==n){var r=n.call(t,"string");if("object"!==o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===o(e)?e:String(e)}(n))in e?t(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function A(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function C(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,A(t,e,"set"),n),n}function I(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,A(t,e,"get"))}var a=n(8222),u=n.n(a),c=n(8309),l=n.n(c),h=n(7606),d=n.n(h),f=n(8712),p=n.n(f),v=n(4282),y=n.n(v),b=n(2018),m=n.n(b),w=n(9022),_=n.n(w),x=n(8886),E=n.n(x),O=n(9030),k=n.n(O),T=n(86),S=n.n(T),P=n(6226),N=n.n(P),R=n(7198),D=n.n(R),M=n(7499),j=n(758),B="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{};function L(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var F={},z={get exports(){return F},set exports(t){F=t}},Z=function(t){return t&&t.Math==Math&&t},U=Z("object"==typeof globalThis&&globalThis)||Z("object"==typeof window&&window)||Z("object"==typeof self&&self)||Z("object"==typeof B&&B)||function(){return this}()||Function("return this")(),V=function(t){try{return!!t()}catch(t){return!0}},G=!V((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),W=G,Y=Function.prototype,H=Y.apply,K=Y.call,Q="object"==typeof Reflect&&Reflect.apply||(W?K.bind(H):function(){return K.apply(H,arguments)}),X=G,q=Function.prototype,J=q.call,$=X&&q.bind.bind(J,J),tt=X?$:function(t){return function(){return J.apply(t,arguments)}},et=tt,nt=et({}.toString),rt=et("".slice),it=function(t){return rt(nt(t),8,-1)},ot=it,gt=tt,st=function(t){if("Function"===ot(t))return gt(t)},At="object"==typeof document&&document.all,Ct={all:At,IS_HTMLDDA:void 0===At&&void 0!==At},It=Ct.all,at=Ct.IS_HTMLDDA?function(t){return"function"==typeof t||t===It}:function(t){return"function"==typeof t},ut={},ct=!V((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),lt=G,ht=Function.prototype.call,dt=lt?ht.bind(ht):function(){return ht.apply(ht,arguments)},ft={},pt={}.propertyIsEnumerable,vt=Object.getOwnPropertyDescriptor,yt=vt&&!pt.call({1:2},1);ft.f=yt?function(t){var e=vt(this,t);return!!e&&e.enumerable}:pt;var bt,mt,wt=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},_t=V,xt=it,Et=Object,Ot=tt("".split),kt=_t((function(){return!Et("z").propertyIsEnumerable(0)}))?function(t){return"String"==xt(t)?Ot(t,""):Et(t)}:Et,Tt=function(t){return null==t},St=Tt,Pt=TypeError,Nt=function(t){if(St(t))throw Pt("Can't call method on "+t);return t},Rt=kt,Dt=Nt,Mt=function(t){return Rt(Dt(t))},jt=at,Bt=Ct.all,Lt=Ct.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:jt(t)||t===Bt}:function(t){return"object"==typeof t?null!==t:jt(t)},Ft={},zt=Ft,Zt=U,Ut=at,Vt=function(t){return Ut(t)?t:void 0},Gt=function(t,e){return arguments.length<2?Vt(zt[t])||Vt(Zt[t]):zt[t]&&zt[t][e]||Zt[t]&&Zt[t][e]},Wt=tt({}.isPrototypeOf),Yt="undefined"!=typeof navigator&&String(navigator.userAgent)||"",Ht=U,Kt=Yt,Qt=Ht.process,Xt=Ht.Deno,qt=Qt&&Qt.versions||Xt&&Xt.version,Jt=qt&&qt.v8;Jt&&(mt=(bt=Jt.split("."))[0]>0&&bt[0]<4?1:+(bt[0]+bt[1])),!mt&&Kt&&(!(bt=Kt.match(/Edge\/(\d+)/))||bt[1]>=74)&&(bt=Kt.match(/Chrome\/(\d+)/))&&(mt=+bt[1]);var $t=mt,te=$t,ee=V,ne=!!Object.getOwnPropertySymbols&&!ee((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&te&&te<41})),re=ne&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ie=Gt,oe=at,ge=Wt,se=Object,Ae=re?function(t){return"symbol"==typeof t}:function(t){var e=ie("Symbol");return oe(e)&&ge(e.prototype,se(t))},Ce=String,Ie=function(t){try{return Ce(t)}catch(t){return"Object"}},ae=at,ue=Ie,ce=TypeError,le=function(t){if(ae(t))return t;throw ce(ue(t)+" is not a function")},he=le,de=Tt,fe=function(t,e){var n=t[e];return de(n)?void 0:he(n)},pe=dt,ve=at,ye=Lt,be=TypeError,me={},we={get exports(){return me},set exports(t){me=t}},_e=U,xe=Object.defineProperty,Ee="__core-js_shared__",Oe=U[Ee]||function(t,e){try{xe(_e,t,{value:e,configurable:!0,writable:!0})}catch(n){_e[t]=e}return e}(Ee,{}),ke=Oe;(we.exports=function(t,e){return ke[t]||(ke[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.29.0",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.29.0/LICENSE",source:"https://github.com/zloirock/core-js"});var Te=Nt,Se=Object,Pe=function(t){return Se(Te(t))},Ne=Pe,Re=tt({}.hasOwnProperty),De=Object.hasOwn||function(t,e){return Re(Ne(t),e)},Me=tt,je=0,Be=Math.random(),Le=Me(1..toString),Fe=function(t){return"Symbol("+(void 0===t?"":t)+")_"+Le(++je+Be,36)},ze=me,Ze=De,Ue=Fe,Ve=ne,Ge=re,We=U.Symbol,Ye=ze("wks"),He=Ge?We.for||We:We&&We.withoutSetter||Ue,Ke=function(t){return Ze(Ye,t)||(Ye[t]=Ve&&Ze(We,t)?We[t]:He("Symbol."+t)),Ye[t]},Qe=dt,Xe=Lt,qe=Ae,Je=fe,$e=TypeError,tn=Ke("toPrimitive"),en=function(t,e){if(!Xe(t)||qe(t))return t;var n,r=Je(t,tn);if(r){if(void 0===e&&(e="default"),n=Qe(r,t,e),!Xe(n)||qe(n))return n;throw $e("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var n,r;if("string"===e&&ve(n=t.toString)&&!ye(r=pe(n,t)))return r;if(ve(n=t.valueOf)&&!ye(r=pe(n,t)))return r;if("string"!==e&&ve(n=t.toString)&&!ye(r=pe(n,t)))return r;throw be("Can't convert object to primitive value")}(t,e)},nn=Ae,rn=function(t){var e=en(t,"string");return nn(e)?e:e+""},on=Lt,gn=U.document,sn=on(gn)&&on(gn.createElement),An=function(t){return sn?gn.createElement(t):{}},Cn=An,In=!ct&&!V((function(){return 7!=Object.defineProperty(Cn("div"),"a",{get:function(){return 7}}).a})),an=ct,un=dt,cn=ft,ln=wt,hn=Mt,dn=rn,fn=De,pn=In,vn=Object.getOwnPropertyDescriptor;ut.f=an?vn:function(t,e){if(t=hn(t),e=dn(e),pn)try{return vn(t,e)}catch(t){}if(fn(t,e))return ln(!un(cn.f,t,e),t[e])};var yn=V,bn=at,mn=/#|\.prototype\./,wn=function(t,e){var n=xn[_n(t)];return n==On||n!=En&&(bn(e)?yn(e):!!e)},_n=wn.normalize=function(t){return String(t).replace(mn,".").toLowerCase()},xn=wn.data={},En=wn.NATIVE="N",On=wn.POLYFILL="P",kn=wn,Tn=le,Sn=G,Pn=st(st.bind),Nn=function(t,e){return Tn(t),void 0===e?t:Sn?Pn(t,e):function(){return t.apply(e,arguments)}},Rn={},Dn=ct&&V((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Mn=Lt,jn=String,Bn=TypeError,Ln=function(t){if(Mn(t))return t;throw Bn(jn(t)+" is not an object")},Fn=ct,zn=In,Zn=Dn,Un=Ln,Vn=rn,Gn=TypeError,Wn=Object.defineProperty,Yn=Object.getOwnPropertyDescriptor,Hn="enumerable",Kn="configurable",Qn="writable";Rn.f=Fn?Zn?function(t,e,n){if(Un(t),e=Vn(e),Un(n),"function"==typeof t&&"prototype"===e&&"value"in n&&Qn in n&&!n[Qn]){var r=Yn(t,e);r&&r[Qn]&&(t[e]=n.value,n={configurable:Kn in n?n[Kn]:r[Kn],enumerable:Hn in n?n[Hn]:r[Hn],writable:!1})}return Wn(t,e,n)}:Wn:function(t,e,n){if(Un(t),e=Vn(e),Un(n),zn)try{return Wn(t,e,n)}catch(t){}if("get"in n||"set"in n)throw Gn("Accessors not supported");return"value"in n&&(t[e]=n.value),t};var Xn=Rn,qn=wt,Jn=ct?function(t,e,n){return Xn.f(t,e,qn(1,n))}:function(t,e,n){return t[e]=n,t},$n=U,tr=Q,er=st,nr=at,rr=ut.f,ir=kn,or=Ft,gr=Nn,sr=Jn,Ar=De,Cr=function(t){var e=function(n,r,i){if(this instanceof e){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,r)}return new t(n,r,i)}return tr(t,this,arguments)};return e.prototype=t.prototype,e},Ir=function(t,e){var n,r,i,o,g,s,A,C,I,a=t.target,u=t.global,c=t.stat,l=t.proto,h=u?$n:c?$n[a]:($n[a]||{}).prototype,d=u?or:or[a]||sr(or,a,{})[a],f=d.prototype;for(o in e)r=!(n=ir(u?o:a+(c?".":"#")+o,t.forced))&&h&&Ar(h,o),s=d[o],r&&(A=t.dontCallGetSet?(I=rr(h,o))&&I.value:h[o]),g=r&&A?A:e[o],r&&typeof s==typeof g||(C=t.bind&&r?gr(g,$n):t.wrap&&r?Cr(g):l&&nr(g)?er(g):g,(t.sham||g&&g.sham||s&&s.sham)&&sr(C,"sham",!0),sr(d,o,C),l&&(Ar(or,i=a+"Prototype")||sr(or,i,{}),sr(or[i],o,g),t.real&&f&&(n||!f[o])&&sr(f,o,g)))},ar=Math.ceil,ur=Math.floor,cr=Math.trunc||function(t){var e=+t;return(e>0?ur:ar)(e)},lr=function(t){var e=+t;return e!=e||0===e?0:cr(e)},hr=lr,dr=Math.max,fr=Math.min,pr=function(t,e){var n=hr(t);return n<0?dr(n+e,0):fr(n,e)},vr=lr,yr=Math.min,br=function(t){return(e=t.length)>0?yr(vr(e),9007199254740991):0;var e},mr=Mt,wr=pr,_r=br,xr=function(t){return function(e,n,r){var i,o=mr(e),g=_r(o),s=wr(r,g);if(t&&n!=n){for(;g>s;)if((i=o[s++])!=i)return!0}else for(;g>s;s++)if((t||s in o)&&o[s]===n)return t||s||0;return!t&&-1}},Er={includes:xr(!0),indexOf:xr(!1)},Or={},kr=De,Tr=Mt,Sr=Er.indexOf,Pr=Or,Nr=tt([].push),Rr=function(t,e){var n,r=Tr(t),i=0,o=[];for(n in r)!kr(Pr,n)&&kr(r,n)&&Nr(o,n);for(;e.length>i;)kr(r,n=e[i++])&&(~Sr(o,n)||Nr(o,n));return o},Dr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Mr=Rr,jr=Dr,Br=Object.keys||function(t){return Mr(t,jr)},Lr={};Lr.f=Object.getOwnPropertySymbols;var Fr=ct,zr=tt,Zr=dt,Ur=V,Vr=Br,Gr=Lr,Wr=ft,Yr=Pe,Hr=kt,Kr=Object.assign,Qr=Object.defineProperty,Xr=zr([].concat),qr=!Kr||Ur((function(){if(Fr&&1!==Kr({b:1},Kr(Qr({},"a",{enumerable:!0,get:function(){Qr(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=Kr({},t)[n]||Vr(Kr({},e)).join("")!=r}))?function(t,e){for(var n=Yr(t),r=arguments.length,i=1,o=Gr.f,g=Wr.f;r>i;)for(var s,A=Hr(arguments[i++]),C=o?Xr(Vr(A),o(A)):Vr(A),I=C.length,a=0;I>a;)s=C[a++],Fr&&!Zr(g,A,s)||(n[s]=A[s]);return n}:Kr,Jr=qr;Ir({target:"Object",stat:!0,arity:2,forced:Object.assign!==Jr},{assign:Jr});var $r=Ft.Object.assign;!function(t){t.exports=$r}(z);var ti=L(F),ei={},ni={get exports(){return ei},set exports(t){ei=t}},ri=tt([].slice),ii=tt,oi=le,gi=Lt,si=De,Ai=ri,Ci=G,Ii=Function,ai=ii([].concat),ui=ii([].join),ci={},li=Ci?Ii.bind:function(t){var e=oi(this),n=e.prototype,r=Ai(arguments,1),i=function(){var n=ai(r,Ai(arguments));return this instanceof i?function(t,e,n){if(!si(ci,e)){for(var r=[],i=0;i=.1;)(l=+o[a++%g])>I&&(l=I),c=Math.sqrt(l*l/(1+C*C)),e+=c=s<0?-c:c,n+=C*c,!0===u?t.lineTo(e,n):t.moveTo(e,n),I-=l,u=!u}var Ti={circle:_i,dashedLine:ki,database:Oi,diamond:function(t,e,n,r){t.beginPath(),t.lineTo(e,n+r),t.lineTo(e+r,n),t.lineTo(e,n-r),t.lineTo(e-r,n),t.closePath()},ellipse:Ei,ellipse_vis:Ei,hexagon:function(t,e,n,r){t.beginPath();var i=2*Math.PI/6;t.moveTo(e+r,n);for(var o=1;o<6;o++)t.lineTo(e+r*Math.cos(i*o),n+r*Math.sin(i*o));t.closePath()},roundRect:xi,square:function(t,e,n,r){t.beginPath(),t.rect(e-r,n-r,2*r,2*r),t.closePath()},star:function(t,e,n,r){t.beginPath(),n+=.1*(r*=.82);for(var i=0;i<10;i++){var o=i%2==0?1.3*r:.5*r;t.lineTo(e+o*Math.sin(2*i*Math.PI/10),n-o*Math.cos(2*i*Math.PI/10))}t.closePath()},triangle:function(t,e,n,r){t.beginPath(),n+=.275*(r*=1.15);var i=2*r,o=i/2,g=Math.sqrt(3)/6*i,s=Math.sqrt(i*i-o*o);t.moveTo(e,n-(s-g)),t.lineTo(e+o,n+g),t.lineTo(e-o,n+g),t.lineTo(e,n-(s-g)),t.closePath()},triangleDown:function(t,e,n,r){t.beginPath(),n-=.275*(r*=1.15);var i=2*r,o=i/2,g=Math.sqrt(3)/6*i,s=Math.sqrt(i*i-o*o);t.moveTo(e,n+(s-g)),t.lineTo(e+o,n-g),t.lineTo(e-o,n-g),t.lineTo(e,n+(s-g)),t.closePath()}};function Si(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t))}}Si(".vis-overlay {\n position: absolute;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n\n /* Must be displayed above for example selected Timeline items */\n z-index: 10;\n}\n\n.vis-active {\n box-shadow: 0 0 10px #86d5f8;\n}\n"),Si('/* override some bootstrap styles screwing up the timelines css */\n\n.vis [class*="span"] {\n min-height: 0;\n width: auto;\n}\n'),Si("div.vis-color-picker {\n position: absolute;\n top: 0px;\n left: 30px;\n margin-top: -140px;\n margin-left: 30px;\n width: 310px;\n height: 444px;\n z-index: 1;\n padding: 10px;\n border-radius: 15px;\n background-color: #ffffff;\n display: none;\n box-shadow: rgba(0, 0, 0, 0.5) 0px 0px 10px 0px;\n}\n\ndiv.vis-color-picker div.vis-arrow {\n position: absolute;\n top: 147px;\n left: 5px;\n}\n\ndiv.vis-color-picker div.vis-arrow::after,\ndiv.vis-color-picker div.vis-arrow::before {\n right: 100%;\n top: 50%;\n border: solid transparent;\n content: \" \";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none;\n}\n\ndiv.vis-color-picker div.vis-arrow:after {\n border-color: rgba(255, 255, 255, 0);\n border-right-color: #ffffff;\n border-width: 30px;\n margin-top: -30px;\n}\n\ndiv.vis-color-picker div.vis-color {\n position: absolute;\n width: 289px;\n height: 289px;\n cursor: pointer;\n}\n\ndiv.vis-color-picker div.vis-brightness {\n position: absolute;\n top: 313px;\n}\n\ndiv.vis-color-picker div.vis-opacity {\n position: absolute;\n top: 350px;\n}\n\ndiv.vis-color-picker div.vis-selector {\n position: absolute;\n top: 137px;\n left: 137px;\n width: 15px;\n height: 15px;\n border-radius: 15px;\n border: 1px solid #ffffff;\n background: #4c4c4c; /* Old browsers */\n background: -moz-linear-gradient(\n top,\n #4c4c4c 0%,\n #595959 12%,\n #666666 25%,\n #474747 39%,\n #2c2c2c 50%,\n #000000 51%,\n #111111 60%,\n #2b2b2b 76%,\n #1c1c1c 91%,\n #131313 100%\n ); /* FF3.6+ */\n background: -webkit-gradient(\n linear,\n left top,\n left bottom,\n color-stop(0%, #4c4c4c),\n color-stop(12%, #595959),\n color-stop(25%, #666666),\n color-stop(39%, #474747),\n color-stop(50%, #2c2c2c),\n color-stop(51%, #000000),\n color-stop(60%, #111111),\n color-stop(76%, #2b2b2b),\n color-stop(91%, #1c1c1c),\n color-stop(100%, #131313)\n ); /* Chrome,Safari4+ */\n background: -webkit-linear-gradient(\n top,\n #4c4c4c 0%,\n #595959 12%,\n #666666 25%,\n #474747 39%,\n #2c2c2c 50%,\n #000000 51%,\n #111111 60%,\n #2b2b2b 76%,\n #1c1c1c 91%,\n #131313 100%\n ); /* Chrome10+,Safari5.1+ */\n background: -o-linear-gradient(\n top,\n #4c4c4c 0%,\n #595959 12%,\n #666666 25%,\n #474747 39%,\n #2c2c2c 50%,\n #000000 51%,\n #111111 60%,\n #2b2b2b 76%,\n #1c1c1c 91%,\n #131313 100%\n ); /* Opera 11.10+ */\n background: -ms-linear-gradient(\n top,\n #4c4c4c 0%,\n #595959 12%,\n #666666 25%,\n #474747 39%,\n #2c2c2c 50%,\n #000000 51%,\n #111111 60%,\n #2b2b2b 76%,\n #1c1c1c 91%,\n #131313 100%\n ); /* IE10+ */\n background: linear-gradient(\n to bottom,\n #4c4c4c 0%,\n #595959 12%,\n #666666 25%,\n #474747 39%,\n #2c2c2c 50%,\n #000000 51%,\n #111111 60%,\n #2b2b2b 76%,\n #1c1c1c 91%,\n #131313 100%\n ); /* W3C */\n filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#4c4c4c', endColorstr='#131313',GradientType=0 ); /* IE6-9 */\n}\n\ndiv.vis-color-picker div.vis-new-color {\n position: absolute;\n width: 140px;\n height: 20px;\n border: 1px solid rgba(0, 0, 0, 0.1);\n border-radius: 5px;\n top: 380px;\n left: 159px;\n text-align: right;\n padding-right: 2px;\n font-size: 10px;\n color: rgba(0, 0, 0, 0.4);\n vertical-align: middle;\n line-height: 20px;\n}\n\ndiv.vis-color-picker div.vis-initial-color {\n position: absolute;\n width: 140px;\n height: 20px;\n border: 1px solid rgba(0, 0, 0, 0.1);\n border-radius: 5px;\n top: 380px;\n left: 10px;\n text-align: left;\n padding-left: 2px;\n font-size: 10px;\n color: rgba(0, 0, 0, 0.4);\n vertical-align: middle;\n line-height: 20px;\n}\n\ndiv.vis-color-picker div.vis-label {\n position: absolute;\n width: 300px;\n left: 10px;\n}\n\ndiv.vis-color-picker div.vis-label.vis-brightness {\n top: 300px;\n}\n\ndiv.vis-color-picker div.vis-label.vis-opacity {\n top: 338px;\n}\n\ndiv.vis-color-picker div.vis-button {\n position: absolute;\n width: 68px;\n height: 25px;\n border-radius: 10px;\n vertical-align: middle;\n text-align: center;\n line-height: 25px;\n top: 410px;\n border: 2px solid #d9d9d9;\n background-color: #f7f7f7;\n cursor: pointer;\n}\n\ndiv.vis-color-picker div.vis-button.vis-cancel {\n /*border:2px solid #ff4e33;*/\n /*background-color: #ff7761;*/\n left: 5px;\n}\ndiv.vis-color-picker div.vis-button.vis-load {\n /*border:2px solid #a153e6;*/\n /*background-color: #cb8dff;*/\n left: 82px;\n}\ndiv.vis-color-picker div.vis-button.vis-apply {\n /*border:2px solid #4588e6;*/\n /*background-color: #82b6ff;*/\n left: 159px;\n}\ndiv.vis-color-picker div.vis-button.vis-save {\n /*border:2px solid #45e655;*/\n /*background-color: #6dff7c;*/\n left: 236px;\n}\n\ndiv.vis-color-picker input.vis-range {\n width: 290px;\n height: 20px;\n}\n\n/* TODO: is this redundant?\ndiv.vis-color-picker input.vis-range-brightness {\n width: 289px !important;\n}\n\n\ndiv.vis-color-picker input.vis-saturation-range {\n width: 289px !important;\n}*/\n"),Si("div.vis-configuration {\n position: relative;\n display: block;\n float: left;\n font-size: 12px;\n}\n\ndiv.vis-configuration-wrapper {\n display: block;\n width: 700px;\n}\n\ndiv.vis-configuration-wrapper::after {\n clear: both;\n content: \"\";\n display: block;\n}\n\ndiv.vis-configuration.vis-config-option-container {\n display: block;\n width: 495px;\n background-color: #ffffff;\n border: 2px solid #f7f8fa;\n border-radius: 4px;\n margin-top: 20px;\n left: 10px;\n padding-left: 5px;\n}\n\ndiv.vis-configuration.vis-config-button {\n display: block;\n width: 495px;\n height: 25px;\n vertical-align: middle;\n line-height: 25px;\n background-color: #f7f8fa;\n border: 2px solid #ceced0;\n border-radius: 4px;\n margin-top: 20px;\n left: 10px;\n padding-left: 5px;\n cursor: pointer;\n margin-bottom: 30px;\n}\n\ndiv.vis-configuration.vis-config-button.hover {\n background-color: #4588e6;\n border: 2px solid #214373;\n color: #ffffff;\n}\n\ndiv.vis-configuration.vis-config-item {\n display: block;\n float: left;\n width: 495px;\n height: 25px;\n vertical-align: middle;\n line-height: 25px;\n}\n\ndiv.vis-configuration.vis-config-item.vis-config-s2 {\n left: 10px;\n background-color: #f7f8fa;\n padding-left: 5px;\n border-radius: 3px;\n}\ndiv.vis-configuration.vis-config-item.vis-config-s3 {\n left: 20px;\n background-color: #e4e9f0;\n padding-left: 5px;\n border-radius: 3px;\n}\ndiv.vis-configuration.vis-config-item.vis-config-s4 {\n left: 30px;\n background-color: #cfd8e6;\n padding-left: 5px;\n border-radius: 3px;\n}\n\ndiv.vis-configuration.vis-config-header {\n font-size: 18px;\n font-weight: bold;\n}\n\ndiv.vis-configuration.vis-config-label {\n width: 120px;\n height: 25px;\n line-height: 25px;\n}\n\ndiv.vis-configuration.vis-config-label.vis-config-s3 {\n width: 110px;\n}\ndiv.vis-configuration.vis-config-label.vis-config-s4 {\n width: 100px;\n}\n\ndiv.vis-configuration.vis-config-colorBlock {\n top: 1px;\n width: 30px;\n height: 19px;\n border: 1px solid #444444;\n border-radius: 2px;\n padding: 0px;\n margin: 0px;\n cursor: pointer;\n}\n\ninput.vis-configuration.vis-config-checkbox {\n left: -5px;\n}\n\ninput.vis-configuration.vis-config-rangeinput {\n position: relative;\n top: -5px;\n width: 60px;\n /*height:13px;*/\n padding: 1px;\n margin: 0;\n pointer-events: none;\n}\n\ninput.vis-configuration.vis-config-range {\n /*removes default webkit styles*/\n -webkit-appearance: none;\n\n /*fix for FF unable to apply focus style bug */\n border: 0px solid white;\n background-color: rgba(0, 0, 0, 0);\n\n /*required for proper track sizing in FF*/\n width: 300px;\n height: 20px;\n}\ninput.vis-configuration.vis-config-range::-webkit-slider-runnable-track {\n width: 300px;\n height: 5px;\n background: #dedede; /* Old browsers */\n background: -moz-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* FF3.6+ */\n background: -webkit-gradient(\n linear,\n left top,\n left bottom,\n color-stop(0%, #dedede),\n color-stop(99%, #c8c8c8)\n ); /* Chrome,Safari4+ */\n background: -webkit-linear-gradient(\n top,\n #dedede 0%,\n #c8c8c8 99%\n ); /* Chrome10+,Safari5.1+ */\n background: -o-linear-gradient(\n top,\n #dedede 0%,\n #c8c8c8 99%\n ); /* Opera 11.10+ */\n background: -ms-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* IE10+ */\n background: linear-gradient(to bottom, #dedede 0%, #c8c8c8 99%); /* W3C */\n filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#dedede', endColorstr='#c8c8c8',GradientType=0 ); /* IE6-9 */\n\n border: 1px solid #999999;\n box-shadow: #aaaaaa 0px 0px 3px 0px;\n border-radius: 3px;\n}\ninput.vis-configuration.vis-config-range::-webkit-slider-thumb {\n -webkit-appearance: none;\n border: 1px solid #14334b;\n height: 17px;\n width: 17px;\n border-radius: 50%;\n background: #3876c2; /* Old browsers */\n background: -moz-linear-gradient(top, #3876c2 0%, #385380 100%); /* FF3.6+ */\n background: -webkit-gradient(\n linear,\n left top,\n left bottom,\n color-stop(0%, #3876c2),\n color-stop(100%, #385380)\n ); /* Chrome,Safari4+ */\n background: -webkit-linear-gradient(\n top,\n #3876c2 0%,\n #385380 100%\n ); /* Chrome10+,Safari5.1+ */\n background: -o-linear-gradient(\n top,\n #3876c2 0%,\n #385380 100%\n ); /* Opera 11.10+ */\n background: -ms-linear-gradient(top, #3876c2 0%, #385380 100%); /* IE10+ */\n background: linear-gradient(to bottom, #3876c2 0%, #385380 100%); /* W3C */\n filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#3876c2', endColorstr='#385380',GradientType=0 ); /* IE6-9 */\n box-shadow: #111927 0px 0px 1px 0px;\n margin-top: -7px;\n}\ninput.vis-configuration.vis-config-range:focus {\n outline: none;\n}\ninput.vis-configuration.vis-config-range:focus::-webkit-slider-runnable-track {\n background: #9d9d9d; /* Old browsers */\n background: -moz-linear-gradient(top, #9d9d9d 0%, #c8c8c8 99%); /* FF3.6+ */\n background: -webkit-gradient(\n linear,\n left top,\n left bottom,\n color-stop(0%, #9d9d9d),\n color-stop(99%, #c8c8c8)\n ); /* Chrome,Safari4+ */\n background: -webkit-linear-gradient(\n top,\n #9d9d9d 0%,\n #c8c8c8 99%\n ); /* Chrome10+,Safari5.1+ */\n background: -o-linear-gradient(\n top,\n #9d9d9d 0%,\n #c8c8c8 99%\n ); /* Opera 11.10+ */\n background: -ms-linear-gradient(top, #9d9d9d 0%, #c8c8c8 99%); /* IE10+ */\n background: linear-gradient(to bottom, #9d9d9d 0%, #c8c8c8 99%); /* W3C */\n filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#9d9d9d', endColorstr='#c8c8c8',GradientType=0 ); /* IE6-9 */\n}\n\ninput.vis-configuration.vis-config-range::-moz-range-track {\n width: 300px;\n height: 10px;\n background: #dedede; /* Old browsers */\n background: -moz-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* FF3.6+ */\n background: -webkit-gradient(\n linear,\n left top,\n left bottom,\n color-stop(0%, #dedede),\n color-stop(99%, #c8c8c8)\n ); /* Chrome,Safari4+ */\n background: -webkit-linear-gradient(\n top,\n #dedede 0%,\n #c8c8c8 99%\n ); /* Chrome10+,Safari5.1+ */\n background: -o-linear-gradient(\n top,\n #dedede 0%,\n #c8c8c8 99%\n ); /* Opera 11.10+ */\n background: -ms-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* IE10+ */\n background: linear-gradient(to bottom, #dedede 0%, #c8c8c8 99%); /* W3C */\n filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#dedede', endColorstr='#c8c8c8',GradientType=0 ); /* IE6-9 */\n\n border: 1px solid #999999;\n box-shadow: #aaaaaa 0px 0px 3px 0px;\n border-radius: 3px;\n}\ninput.vis-configuration.vis-config-range::-moz-range-thumb {\n border: none;\n height: 16px;\n width: 16px;\n\n border-radius: 50%;\n background: #385380;\n}\n\n/*hide the outline behind the border*/\ninput.vis-configuration.vis-config-range:-moz-focusring {\n outline: 1px solid white;\n outline-offset: -1px;\n}\n\ninput.vis-configuration.vis-config-range::-ms-track {\n width: 300px;\n height: 5px;\n\n /*remove bg colour from the track, we'll use ms-fill-lower and ms-fill-upper instead */\n background: transparent;\n\n /*leave room for the larger thumb to overflow with a transparent border */\n border-color: transparent;\n border-width: 6px 0;\n\n /*remove default tick marks*/\n color: transparent;\n}\ninput.vis-configuration.vis-config-range::-ms-fill-lower {\n background: #777;\n border-radius: 10px;\n}\ninput.vis-configuration.vis-config-range::-ms-fill-upper {\n background: #ddd;\n border-radius: 10px;\n}\ninput.vis-configuration.vis-config-range::-ms-thumb {\n border: none;\n height: 16px;\n width: 16px;\n border-radius: 50%;\n background: #385380;\n}\ninput.vis-configuration.vis-config-range:focus::-ms-fill-lower {\n background: #888;\n}\ninput.vis-configuration.vis-config-range:focus::-ms-fill-upper {\n background: #ccc;\n}\n\n.vis-configuration-popup {\n position: absolute;\n background: rgba(57, 76, 89, 0.85);\n border: 2px solid #f2faff;\n line-height: 30px;\n height: 30px;\n width: 150px;\n text-align: center;\n color: #ffffff;\n font-size: 14px;\n border-radius: 4px;\n -webkit-transition: opacity 0.3s ease-in-out;\n -moz-transition: opacity 0.3s ease-in-out;\n transition: opacity 0.3s ease-in-out;\n}\n.vis-configuration-popup:after,\n.vis-configuration-popup:before {\n left: 100%;\n top: 50%;\n border: solid transparent;\n content: \" \";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none;\n}\n\n.vis-configuration-popup:after {\n border-color: rgba(136, 183, 213, 0);\n border-left-color: rgba(57, 76, 89, 0.85);\n border-width: 8px;\n margin-top: -8px;\n}\n.vis-configuration-popup:before {\n border-color: rgba(194, 225, 245, 0);\n border-left-color: #f2faff;\n border-width: 12px;\n margin-top: -12px;\n}\n"),Si("div.vis-tooltip {\n position: absolute;\n visibility: hidden;\n padding: 5px;\n white-space: nowrap;\n\n font-family: verdana;\n font-size: 14px;\n color: #000000;\n background-color: #f5f4ed;\n\n -moz-border-radius: 3px;\n -webkit-border-radius: 3px;\n border-radius: 3px;\n border: 1px solid #808074;\n\n box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);\n pointer-events: none;\n\n z-index: 5;\n}\n");var Pi={};!function(t){function e(t){if(t)return function(t){for(var n in e.prototype)t[n]=e.prototype[n];return t}(t)}t.exports=e,e.prototype.on=e.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},e.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},e.prototype.off=e.prototype.removeListener=e.prototype.removeAllListeners=e.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var i=0;i=s?t?"":void 0:(r=eo(o,g))<55296||r>56319||g+1===s||(i=eo(o,g+1))<56320||i>57343?t?to(o,g):r:t?no(o,g,g+2):i-56320+(r-55296<<10)+65536}},io={codeAt:ro(!1),charAt:ro(!0)},oo=at,go=U.WeakMap,so=oo(go)&&/native code/.test(String(go)),Ao=Fe,Co=me("keys"),Io=function(t){return Co[t]||(Co[t]=Ao(t))},ao=so,uo=U,co=Lt,lo=Jn,ho=De,fo=Oe,po=Io,vo=Or,yo="Object already initialized",bo=uo.TypeError,mo=uo.WeakMap;if(ao||fo.state){var wo=fo.state||(fo.state=new mo);wo.get=wo.get,wo.has=wo.has,wo.set=wo.set,ji=function(t,e){if(wo.has(t))throw bo(yo);return e.facade=t,wo.set(t,e),e},Bi=function(t){return wo.get(t)||{}},Li=function(t){return wo.has(t)}}else{var _o=po("state");vo[_o]=!0,ji=function(t,e){if(ho(t,_o))throw bo(yo);return e.facade=t,lo(t,_o,e),e},Bi=function(t){return ho(t,_o)?t[_o]:{}},Li=function(t){return ho(t,_o)}}var xo={set:ji,get:Bi,has:Li,enforce:function(t){return Li(t)?Bi(t):ji(t,{})},getterFor:function(t){return function(e){var n;if(!co(e)||(n=Bi(e)).type!==t)throw bo("Incompatible receiver, "+t+" required");return n}}},Eo=ct,Oo=De,ko=Function.prototype,To=Eo&&Object.getOwnPropertyDescriptor,So=Oo(ko,"name"),Po={EXISTS:So,PROPER:So&&"something"===function(){}.name,CONFIGURABLE:So&&(!Eo||Eo&&To(ko,"name").configurable)},No={},Ro=ct,Do=Dn,Mo=Rn,jo=Ln,Bo=Mt,Lo=Br;No.f=Ro&&!Do?Object.defineProperties:function(t,e){jo(t);for(var n,r=Bo(e),i=Lo(e),o=i.length,g=0;o>g;)Mo.f(t,n=i[g++],r[n]);return t};var Fo,zo=Gt("document","documentElement"),Zo=Ln,Uo=No,Vo=Dr,Go=Or,Wo=zo,Yo=An,Ho="prototype",Ko="script",Qo=Io("IE_PROTO"),Xo=function(){},qo=function(t){return"<"+Ko+">"+t+""},Jo=function(t){t.write(qo("")),t.close();var e=t.parentWindow.Object;return t=null,e},$o=function(){try{Fo=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;$o="undefined"!=typeof document?document.domain&&Fo?Jo(Fo):(e=Yo("iframe"),n="java"+Ko+":",e.style.display="none",Wo.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(qo("document.F=Object")),t.close(),t.F):Jo(Fo);for(var r=Vo.length;r--;)delete $o[Ho][Vo[r]];return $o()};Go[Qo]=!0;var tg,eg,ng,rg=Object.create||function(t,e){var n;return null!==t?(Xo[Ho]=Zo(t),n=new Xo,Xo[Ho]=null,n[Qo]=t):n=$o(),void 0===e?n:Uo.f(n,e)},ig=!V((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),og=De,gg=at,sg=Pe,Ag=ig,Cg=Io("IE_PROTO"),Ig=Object,ag=Ig.prototype,ug=Ag?Ig.getPrototypeOf:function(t){var e=sg(t);if(og(e,Cg))return e[Cg];var n=e.constructor;return gg(n)&&e instanceof n?n.prototype:e instanceof Ig?ag:null},cg=Jn,lg=function(t,e,n,r){return r&&r.enumerable?t[e]=n:cg(t,e,n),t},hg=V,dg=at,fg=Lt,pg=rg,vg=ug,yg=lg,bg=Ke("iterator"),mg=!1;[].keys&&("next"in(ng=[].keys())?(eg=vg(vg(ng)))!==Object.prototype&&(tg=eg):mg=!0);var wg=!fg(tg)||hg((function(){var t={};return tg[bg].call(t)!==t}));dg((tg=wg?{}:pg(tg))[bg])||yg(tg,bg,(function(){return this}));var _g={IteratorPrototype:tg,BUGGY_SAFARI_ITERATORS:mg},xg=Yi,Eg=Fi?{}.toString:function(){return"[object "+xg(this)+"]"},Og=Fi,kg=Rn.f,Tg=Jn,Sg=De,Pg=Eg,Ng=Ke("toStringTag"),Rg=function(t,e,n,r){if(t){var i=n?t:t.prototype;Sg(i,Ng)||kg(i,Ng,{configurable:!0,value:e}),r&&!Og&&Tg(i,"toString",Pg)}},Dg={},Mg=_g.IteratorPrototype,jg=rg,Bg=wt,Lg=Rg,Fg=Dg,zg=function(){return this},Zg=tt,Ug=le,Vg=at,Gg=String,Wg=TypeError,Yg=Ln,Hg=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=function(t,e,n){try{return Zg(Ug(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(t){}}(Object.prototype,"__proto__","set"))(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return Yg(n),function(t){if("object"==typeof t||Vg(t))return t;throw Wg("Can't set "+Gg(t)+" as a prototype")}(r),e?t(n,r):n.__proto__=r,n}}():void 0),Kg=Ir,Qg=dt,Xg=ug,qg=Rg,Jg=lg,$g=Dg,ts=Po.PROPER,es=_g.BUGGY_SAFARI_ITERATORS,ns=Ke("iterator"),rs="keys",is="values",os="entries",gs=function(){return this},ss=function(t,e,n,r,i,o,g){!function(t,e,n,r){var i=e+" Iterator";t.prototype=jg(Mg,{next:Bg(+!r,n)}),Lg(t,i,!1,!0),Fg[i]=zg}(n,e,r);var s,A,C,I=function(t){if(t===i&&h)return h;if(!es&&t in c)return c[t];switch(t){case rs:case is:case os:return function(){return new n(this,t)}}return function(){return new n(this)}},a=e+" Iterator",u=!1,c=t.prototype,l=c[ns]||c["@@iterator"]||i&&c[i],h=!es&&l||I(i),d="Array"==e&&c.entries||l;if(d&&(s=Xg(d.call(new t)))!==Object.prototype&&s.next&&(qg(s,a,!0,!0),$g[a]=gs),ts&&i==is&&l&&l.name!==is&&(u=!0,h=function(){return Qg(l,this)}),i)if(A={values:I(is),keys:o?h:I(rs),entries:I(os)},g)for(C in A)(es||u||!(C in c))&&Jg(c,C,A[C]);else Kg({target:e,proto:!0,forced:es||u},A);return g&&c[ns]!==h&&Jg(c,ns,h,{name:i}),$g[e]=h,A},As=function(t,e){return{value:t,done:e}},Cs=io.charAt,Is=Qi,as=xo,us=ss,cs=As,ls="String Iterator",hs=as.set,ds=as.getterFor(ls);us(String,"String",(function(t){hs(this,{type:ls,string:Is(t),index:0})}),(function(){var t,e=ds(this),n=e.string,r=e.index;return r>=n.length?cs(void 0,!0):(t=Cs(n,r),e.index+=t.length,cs(t,!1))}));var fs=dt,ps=Ln,vs=fe,ys=function(t,e,n){var r,i;ps(t);try{if(!(r=vs(t,"return"))){if("throw"===e)throw n;return n}r=fs(r,t)}catch(t){i=!0,r=t}if("throw"===e)throw n;if(i)throw r;return ps(r),n},bs=Ln,ms=ys,ws=Dg,_s=Ke("iterator"),xs=Array.prototype,Es=function(t){return void 0!==t&&(ws.Array===t||xs[_s]===t)},Os=at,ks=Oe,Ts=tt(Function.toString);Os(ks.inspectSource)||(ks.inspectSource=function(t){return Ts(t)});var Ss=ks.inspectSource,Ps=tt,Ns=V,Rs=at,Ds=Yi,Ms=Ss,js=function(){},Bs=[],Ls=Gt("Reflect","construct"),Fs=/^\s*(?:class|function)\b/,zs=Ps(Fs.exec),Zs=!Fs.exec(js),Us=function(t){if(!Rs(t))return!1;try{return Ls(js,Bs,t),!0}catch(t){return!1}},Vs=function(t){if(!Rs(t))return!1;switch(Ds(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Zs||!!zs(Fs,Ms(t))}catch(t){return!0}};Vs.sham=!0;var Gs=!Ls||Ns((function(){var t;return Us(Us.call)||!Us(Object)||!Us((function(){t=!0}))||t}))?Vs:Us,Ws=rn,Ys=Rn,Hs=wt,Ks=function(t,e,n){var r=Ws(e);r in t?Ys.f(t,r,Hs(0,n)):t[r]=n},Qs=Yi,Xs=fe,qs=Tt,Js=Dg,$s=Ke("iterator"),tA=function(t){if(!qs(t))return Xs(t,$s)||Xs(t,"@@iterator")||Js[Qs(t)]},eA=dt,nA=le,rA=Ln,iA=Ie,oA=tA,gA=TypeError,sA=function(t,e){var n=arguments.length<2?oA(t):e;if(nA(n))return rA(eA(n,t));throw gA(iA(t)+" is not iterable")},AA=Nn,CA=dt,IA=Pe,aA=function(t,e,n,r){try{return r?e(bs(n)[0],n[1]):e(n)}catch(e){ms(t,"throw",e)}},uA=Es,cA=Gs,lA=br,hA=Ks,dA=sA,fA=tA,pA=Array,vA=Ke("iterator"),yA=!1;try{var bA=0,mA={next:function(){return{done:!!bA++}},return:function(){yA=!0}};mA[vA]=function(){return this},Array.from(mA,(function(){throw 2}))}catch(t){}var wA=function(t,e){if(!e&&!yA)return!1;var n=!1;try{var r={};r[vA]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n};Ir({target:"Array",stat:!0,forced:!wA((function(t){Array.from(t)}))},{from:function(t){var e=IA(t),n=cA(this),r=arguments.length,i=r>1?arguments[1]:void 0,o=void 0!==i;o&&(i=AA(i,r>2?arguments[2]:void 0));var g,s,A,C,I,a,u=fA(e),c=0;if(!u||this===pA&&uA(u))for(g=lA(e),s=n?new this(g):pA(g);g>c;c++)a=o?i(e[c],c):e[c],hA(s,c,a);else for(I=(C=dA(e,u)).next,s=n?new this:[];!(A=CA(I,C)).done;c++)a=o?aA(C,i,[A.value,c],!0):A.value,hA(s,c,a);return s.length=c,s}});var _A=Ft.Array.from;!function(t){t.exports=_A}(Di);var xA=L(Ri),EA={},OA={get exports(){return EA},set exports(t){EA=t}},kA={},TA={get exports(){return kA},set exports(t){kA=t}},SA=Mt,PA=Dg,NA=xo;Rn.f;var RA=ss,DA=As,MA="Array Iterator",jA=NA.set,BA=NA.getterFor(MA);RA(Array,"Array",(function(t,e){jA(this,{type:MA,target:SA(t),index:0,kind:e})}),(function(){var t=BA(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,DA(void 0,!0)):DA("keys"==n?r:"values"==n?e[r]:[r,e[r]],!1)}),"values"),PA.Arguments=PA.Array;var LA=tA,FA=U,zA=Yi,ZA=Jn,UA=Dg,VA=Ke("toStringTag");for(var GA in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var WA=FA[GA],YA=WA&&WA.prototype;YA&&zA(YA)!==VA&&ZA(YA,VA,GA),UA[GA]=UA.Array}var HA=LA;!function(t){t.exports=HA}(TA),function(t){t.exports=kA}(OA);var KA=L(EA),QA={},XA={get exports(){return QA},set exports(t){QA=t}},qA={},JA=Rr,$A=Dr.concat("length","prototype");qA.f=Object.getOwnPropertyNames||function(t){return JA(t,$A)};var tC={},eC=pr,nC=br,rC=Ks,iC=Array,oC=Math.max,gC=function(t,e,n){for(var r=nC(t),i=eC(e,r),o=eC(void 0===n?r:n,r),g=iC(oC(o-i,0)),s=0;ip;p++)if((s||p in h)&&(c=d(u=h[p],p,l),t))if(e)y[p]=c;else if(c)switch(t){case 3:return!0;case 5:return u;case 6:return p;case 2:FC(y,u)}else switch(t){case 4:return!1;case 7:FC(y,u)}return o?-1:r||i?i:y}},ZC={forEach:zC(0),map:zC(1),filter:zC(2),some:zC(3),every:zC(4),find:zC(5),findIndex:zC(6),filterReject:zC(7)},UC=Ir,VC=U,GC=dt,WC=tt,YC=ct,HC=ne,KC=V,QC=De,XC=Wt,qC=Ln,JC=Mt,$C=rn,tI=Qi,eI=wt,nI=rg,rI=Br,iI=qA,oI=tC,gI=Lr,sI=ut,AI=Rn,CI=No,II=ft,aI=lg,uI=cC,cI=me,lI=Or,hI=Fe,dI=Ke,fI=lC,pI=yC,vI=xC,yI=Rg,bI=xo,mI=ZC.forEach,wI=Io("hidden"),_I="Symbol",xI="prototype",EI=bI.set,OI=bI.getterFor(_I),kI=Object[xI],TI=VC.Symbol,SI=TI&&TI[xI],PI=VC.TypeError,NI=VC.QObject,RI=sI.f,DI=AI.f,MI=oI.f,jI=II.f,BI=WC([].push),LI=cI("symbols"),FI=cI("op-symbols"),zI=cI("wks"),ZI=!NI||!NI[xI]||!NI[xI].findChild,UI=YC&&KC((function(){return 7!=nI(DI({},"a",{get:function(){return DI(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=RI(kI,e);r&&delete kI[e],DI(t,e,n),r&&t!==kI&&DI(kI,e,r)}:DI,VI=function(t,e){var n=LI[t]=nI(SI);return EI(n,{type:_I,tag:t,description:e}),YC||(n.description=e),n},GI=function(t,e,n){t===kI&&GI(FI,e,n),qC(t);var r=$C(e);return qC(n),QC(LI,r)?(n.enumerable?(QC(t,wI)&&t[wI][r]&&(t[wI][r]=!1),n=nI(n,{enumerable:eI(0,!1)})):(QC(t,wI)||DI(t,wI,eI(1,{})),t[wI][r]=!0),UI(t,r,n)):DI(t,r,n)},WI=function(t,e){qC(t);var n=JC(e),r=rI(n).concat(QI(n));return mI(r,(function(e){YC&&!GC(YI,n,e)||GI(t,e,n[e])})),t},YI=function(t){var e=$C(t),n=GC(jI,this,e);return!(this===kI&&QC(LI,e)&&!QC(FI,e))&&(!(n||!QC(this,e)||!QC(LI,e)||QC(this,wI)&&this[wI][e])||n)},HI=function(t,e){var n=JC(t),r=$C(e);if(n!==kI||!QC(LI,r)||QC(FI,r)){var i=RI(n,r);return!i||!QC(LI,r)||QC(n,wI)&&n[wI][r]||(i.enumerable=!0),i}},KI=function(t){var e=MI(JC(t)),n=[];return mI(e,(function(t){QC(LI,t)||QC(lI,t)||BI(n,t)})),n},QI=function(t){var e=t===kI,n=MI(e?FI:JC(t)),r=[];return mI(n,(function(t){!QC(LI,t)||e&&!QC(kI,t)||BI(r,LI[t])})),r};HC||(aI(SI=(TI=function(){if(XC(SI,this))throw PI("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?tI(arguments[0]):void 0,e=hI(t),n=function(t){this===kI&&GC(n,FI,t),QC(this,wI)&&QC(this[wI],e)&&(this[wI][e]=!1),UI(this,e,eI(1,t))};return YC&&ZI&&UI(kI,e,{configurable:!0,set:n}),VI(e,t)})[xI],"toString",(function(){return OI(this).tag})),aI(TI,"withoutSetter",(function(t){return VI(hI(t),t)})),II.f=YI,AI.f=GI,CI.f=WI,sI.f=HI,iI.f=oI.f=KI,gI.f=QI,fI.f=function(t){return VI(dI(t),t)},YC&&uI(SI,"description",{configurable:!0,get:function(){return OI(this).description}})),UC({global:!0,constructor:!0,wrap:!0,forced:!HC,sham:!HC},{Symbol:TI}),mI(rI(zI),(function(t){pI(t)})),UC({target:_I,stat:!0,forced:!HC},{useSetter:function(){ZI=!0},useSimple:function(){ZI=!1}}),UC({target:"Object",stat:!0,forced:!HC,sham:!YC},{create:function(t,e){return void 0===e?nI(t):WI(nI(t),e)},defineProperty:GI,defineProperties:WI,getOwnPropertyDescriptor:HI}),UC({target:"Object",stat:!0,forced:!HC},{getOwnPropertyNames:KI}),vI(),yI(TI,_I),lI[wI]=!0;var XI=ne&&!!Symbol.for&&!!Symbol.keyFor,qI=Ir,JI=Gt,$I=De,ta=Qi,ea=me,na=XI,ra=ea("string-to-symbol-registry"),ia=ea("symbol-to-string-registry");qI({target:"Symbol",stat:!0,forced:!na},{for:function(t){var e=ta(t);if($I(ra,e))return ra[e];var n=JI("Symbol")(e);return ra[e]=n,ia[n]=e,n}});var oa=Ir,ga=De,sa=Ae,Aa=Ie,Ca=XI,Ia=me("symbol-to-string-registry");oa({target:"Symbol",stat:!0,forced:!Ca},{keyFor:function(t){if(!sa(t))throw TypeError(Aa(t)+" is not a symbol");if(ga(Ia,t))return Ia[t]}});var aa=OC,ua=at,ca=it,la=Qi,ha=tt([].push),da=Ir,fa=Gt,pa=Q,va=dt,ya=tt,ba=V,ma=at,wa=Ae,_a=ri,xa=ne,Ea=String,Oa=fa("JSON","stringify"),ka=ya(/./.exec),Ta=ya("".charAt),Sa=ya("".charCodeAt),Pa=ya("".replace),Na=ya(1..toString),Ra=/[\uD800-\uDFFF]/g,Da=/^[\uD800-\uDBFF]$/,Ma=/^[\uDC00-\uDFFF]$/,ja=!xa||ba((function(){var t=fa("Symbol")();return"[null]"!=Oa([t])||"{}"!=Oa({a:t})||"{}"!=Oa(Object(t))})),Ba=ba((function(){return'"\\udf06\\ud834"'!==Oa("\udf06\ud834")||'"\\udead"'!==Oa("\udead")})),La=function(t,e){var n=_a(arguments),r=function(t){if(ua(t))return t;if(aa(t)){for(var e=t.length,n=[],r=0;rs;)void 0!==(n=i(r,e=o[s++]))&&lu(g,e,n);return g}});var hu=Ft.Object.getOwnPropertyDescriptors;!function(t){t.exports=hu}(iu);var du=L(ru),fu={},pu={get exports(){return fu},set exports(t){fu=t}},vu={},yu={get exports(){return vu},set exports(t){vu=t}},bu=Ir,mu=ct,wu=No.f;bu({target:"Object",stat:!0,forced:Object.defineProperties!==wu,sham:!mu},{defineProperties:wu});var _u=Ft.Object,xu=yu.exports=function(t,e){return _u.defineProperties(t,e)};_u.defineProperties.sham&&(xu.sham=!0);var Eu=vu;!function(t){t.exports=Eu}(pu);var Ou=L(fu),ku={},Tu={get exports(){return ku},set exports(t){ku=t}},Su={},Pu={get exports(){return Su},set exports(t){Su=t}},Nu=Ir,Ru=ct,Du=Rn.f;Nu({target:"Object",stat:!0,forced:Object.defineProperty!==Du,sham:!Ru},{defineProperty:Du});var Mu=Ft.Object,ju=Pu.exports=function(t,e,n){return Mu.defineProperty(t,e,n)};Mu.defineProperty.sham&&(ju.sham=!0);var Bu=Su;!function(t){t.exports=Bu}(Tu);var Lu=L(ku);function Fu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var zu={},Zu={get exports(){return zu},set exports(t){zu=t}},Uu={},Vu=Bu;!function(t){t.exports=Vu}({get exports(){return Uu},set exports(t){Uu=t}}),function(t){t.exports=Uu}(Zu);var Gu=L(zu),Wu={},Yu={get exports(){return Wu},set exports(t){Wu=t}},Hu={},Ku={get exports(){return Hu},set exports(t){Hu=t}},Qu=TypeError,Xu=function(t){if(t>9007199254740991)throw Qu("Maximum allowed index exceeded");return t},qu=V,Ju=$t,$u=Ke("species"),tc=function(t){return Ju>=51||!qu((function(){var e=[];return(e.constructor={})[$u]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},ec=Ir,nc=V,rc=OC,ic=Lt,oc=Pe,gc=br,sc=Xu,Ac=Ks,Cc=RC,Ic=tc,ac=$t,uc=Ke("isConcatSpreadable"),cc=ac>=51||!nc((function(){var t=[];return t[uc]=!1,t.concat()[0]!==t})),lc=function(t){if(!ic(t))return!1;var e=t[uc];return void 0!==e?!!e:rc(t)};ec({target:"Array",proto:!0,arity:1,forced:!cc||!Ic("concat")},{concat:function(t){var e,n,r,i,o,g=oc(this),s=Cc(g,0),A=0;for(e=-1,r=arguments.length;et.length)&&(e=t.length);for(var n=0,r=new Array(e);n1?arguments[1]:void 0)}});var lh=fi("Array").map,hh=Wt,dh=lh,fh=Array.prototype,ph=function(t){var e=t.map;return t===fh||hh(fh,t)&&e===fh.map?dh:e};!function(t){t.exports=ph}(uh);var vh=L(ah),yh={},bh={get exports(){return yh},set exports(t){yh=t}},mh=Pe,wh=Br;Ir({target:"Object",stat:!0,forced:V((function(){wh(1)}))},{keys:function(t){return wh(mh(t))}});var _h=Ft.Object.keys;!function(t){t.exports=_h}(bh);var xh=L(yh),Eh={},Oh={get exports(){return Eh},set exports(t){Eh=t}},kh=Ir,Th=Date,Sh=tt(Th.prototype.getTime);kh({target:"Date",stat:!0},{now:function(){return Sh(new Th)}});var Ph=Ft.Date.now;!function(t){t.exports=Ph}(Oh);var Nh=L(Eh),Rh={},Dh={get exports(){return Rh},set exports(t){Rh=t}},Mh=V,jh=function(t,e){var n=[][t];return!!n&&Mh((function(){n.call(null,e||function(){return 1},1)}))},Bh=ZC.forEach,Lh=jh("forEach")?[].forEach:function(t){return Bh(this,t,arguments.length>1?arguments[1]:void 0)};Ir({target:"Array",proto:!0,forced:[].forEach!=Lh},{forEach:Lh});var Fh=fi("Array").forEach,zh=Yi,Zh=De,Uh=Wt,Vh=Fh,Gh=Array.prototype,Wh={DOMTokenList:!0,NodeList:!0},Yh=function(t){var e=t.forEach;return t===Gh||Uh(Gh,t)&&e===Gh.forEach||Zh(Wh,zh(t))?Vh:e};!function(t){t.exports=Yh}(Dh);var Hh=L(Rh),Kh={},Qh={get exports(){return Kh},set exports(t){Kh=t}},Xh=Ir,qh=OC,Jh=tt([].reverse),$h=[1,2];Xh({target:"Array",proto:!0,forced:String($h)===String($h.reverse())},{reverse:function(){return qh(this)&&(this.length=this.length),Jh(this)}});var td=fi("Array").reverse,ed=Wt,nd=td,rd=Array.prototype,id=function(t){var e=t.reverse;return t===rd||ed(rd,t)&&e===rd.reverse?nd:e};!function(t){t.exports=id}(Qh);var od=L(Kh),gd={},sd={get exports(){return gd},set exports(t){gd=t}},Ad=ct,Cd=OC,Id=TypeError,ad=Object.getOwnPropertyDescriptor,ud=Ad&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}(),cd=Ie,ld=TypeError,hd=function(t,e){if(!delete t[e])throw ld("Cannot delete property "+cd(e)+" of "+cd(t))},dd=Ir,fd=Pe,pd=pr,vd=lr,yd=br,bd=ud?function(t,e){if(Cd(t)&&!ad(t,"length").writable)throw Id("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e},md=Xu,wd=RC,_d=Ks,xd=hd,Ed=tc("splice"),Od=Math.max,kd=Math.min;dd({target:"Array",proto:!0,forced:!Ed},{splice:function(t,e){var n,r,i,o,g,s,A=fd(this),C=yd(A),I=pd(t,C),a=arguments.length;for(0===a?n=r=0:1===a?(n=0,r=C-I):(n=a-2,r=kd(Od(vd(e),0),C-I)),md(C+n-r),i=wd(A,r),o=0;oC-r+n;o--)xd(A,o-1)}else if(n>r)for(o=C-r;o>I;o--)s=o+n-1,(g=o+r-1)in A?A[s]=A[g]:xd(A,s);for(o=0;o1?arguments[1]:void 0)}});var Ld=fi("Array").includes,Fd=Lt,zd=it,Zd=Ke("match"),Ud=TypeError,Vd=Ke("match"),Gd=Ir,Wd=function(t){if(function(t){var e;return Fd(t)&&(void 0!==(e=t[Zd])?!!e:"RegExp"==zd(t))}(t))throw Ud("The method doesn't accept regular expressions");return t},Yd=Nt,Hd=Qi,Kd=tt("".indexOf);Gd({target:"String",proto:!0,forced:!function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[Vd]=!1,"/./"[t](e)}catch(t){}}return!1}("includes")},{includes:function(t){return!!~Kd(Hd(Yd(this)),Hd(Wd(t)),arguments.length>1?arguments[1]:void 0)}});var Qd=fi("String").includes,Xd=Wt,qd=Ld,Jd=Qd,$d=Array.prototype,tf=String.prototype,ef=function(t){var e=t.includes;return t===$d||Xd($d,t)&&e===$d.includes?qd:"string"==typeof t||t===tf||Xd(tf,t)&&e===tf.includes?Jd:e};!function(t){t.exports=ef}(jd);var nf=L(Md),rf={},of={get exports(){return rf},set exports(t){rf=t}},gf=Pe,sf=ug,Af=ig;Ir({target:"Object",stat:!0,forced:V((function(){sf(1)})),sham:!Af},{getPrototypeOf:function(t){return sf(gf(t))}});var Cf=Ft.Object.getPrototypeOf;!function(t){t.exports=Cf}(of);var If=L(rf),af={},uf={get exports(){return af},set exports(t){af=t}},cf=ZC.filter;Ir({target:"Array",proto:!0,forced:!tc("filter")},{filter:function(t){return cf(this,t,arguments.length>1?arguments[1]:void 0)}});var lf=fi("Array").filter,hf=Wt,df=lf,ff=Array.prototype,pf=function(t){var e=t.filter;return t===ff||hf(ff,t)&&e===ff.filter?df:e};!function(t){t.exports=pf}(uf);var vf=L(af),yf={},bf={get exports(){return yf},set exports(t){yf=t}},mf=ct,wf=tt,_f=Br,xf=Mt,Ef=wf(ft.f),Of=wf([].push),kf=function(t){return function(e){for(var n,r=xf(e),i=_f(r),o=i.length,g=0,s=[];o>g;)n=i[g++],mf&&!Ef(r,n)||Of(s,t?[n,r[n]]:r[n]);return s}},Tf=(kf(!0),kf(!1));Ir({target:"Object",stat:!0},{values:function(t){return Tf(t)}});var Sf=Ft.Object.values;!function(t){t.exports=Sf}(bf);var Pf={},Nf={get exports(){return Pf},set exports(t){Pf=t}},Rf="\t\n\v\f\r                 \u2028\u2029\ufeff",Df=Nt,Mf=Qi,jf=Rf,Bf=tt("".replace),Lf=RegExp("^["+jf+"]+"),Ff=RegExp("(^|[^"+jf+"])["+jf+"]+$"),zf=function(t){return function(e){var n=Mf(Df(e));return 1&t&&(n=Bf(n,Lf,"")),2&t&&(n=Bf(n,Ff,"$1")),n}},Zf={start:zf(1),end:zf(2),trim:zf(3)},Uf=U,Vf=V,Gf=tt,Wf=Qi,Yf=Zf.trim,Hf=Rf,Kf=Uf.parseInt,Qf=Uf.Symbol,Xf=Qf&&Qf.iterator,qf=/^[+-]?0x/i,Jf=Gf(qf.exec),$f=8!==Kf(Hf+"08")||22!==Kf(Hf+"0x16")||Xf&&!Vf((function(){Kf(Object(Xf))}))?function(t,e){var n=Yf(Wf(t));return Kf(n,e>>>0||(Jf(qf,n)?16:10))}:Kf;Ir({global:!0,forced:parseInt!=$f},{parseInt:$f});var tp=Ft.parseInt;!function(t){t.exports=tp}(Nf);var ep=L(Pf),np={},rp={get exports(){return np},set exports(t){np=t}},ip=Ir,op=Er.indexOf,gp=jh,sp=st([].indexOf),Ap=!!sp&&1/sp([1],1,-0)<0;ip({target:"Array",proto:!0,forced:Ap||!gp("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return Ap?sp(this,t,e)||0:op(this,t,e)}});var Cp=fi("Array").indexOf,Ip=Wt,ap=Cp,up=Array.prototype,cp=function(t){var e=t.indexOf;return t===up||Ip(up,t)&&e===up.indexOf?ap:e};!function(t){t.exports=cp}(rp);var lp,hp=L(np),dp={},fp={get exports(){return dp},set exports(t){dp=t}},pp=Po.PROPER,vp=Rf,yp=Zf.trim;Ir({target:"String",proto:!0,forced:(lp="trim",V((function(){return!!vp[lp]()||"​…᠎"!=="​…᠎"[lp]()||pp&&vp[lp].name!==lp})))},{trim:function(){return yp(this)}});var bp=fi("String").trim,mp=Wt,wp=bp,_p=String.prototype,xp=function(t){var e=t.trim;return"string"==typeof t||t===_p||mp(_p,t)&&e===_p.trim?wp:e};!function(t){t.exports=xp}(fp);var Ep={},Op={get exports(){return Ep},set exports(t){Ep=t}};Ir({target:"Object",stat:!0,sham:!ct},{create:rg});var kp=Ft.Object,Tp=function(t,e){return kp.create(t,e)};!function(t){t.exports=Tp}(Op);var Sp=L(Ep),Pp={},Np={get exports(){return Pp},set exports(t){Pp=t}},Rp=Ft,Dp=Q;Rp.JSON||(Rp.JSON={stringify:JSON.stringify});var Mp=function(t,e,n){return Dp(Rp.JSON.stringify,null,arguments)};!function(t){t.exports=Mp}(Np);var jp=L(Pp),Bp={},Lp={get exports(){return Bp},set exports(t){Bp=t}},Fp="function"==typeof Bun&&Bun&&"string"==typeof Bun.version,zp=TypeError,Zp=function(t,e){if(tn,g=Gp(r)?r:Qp(r),s=o?Hp(arguments,n):[],A=o?function(){Vp(g,this,s)}:g;return e?t(A,i):t(A)}:t},Jp=Ir,$p=U,tv=qp($p.setInterval,!0);Jp({global:!0,bind:!0,forced:$p.setInterval!==tv},{setInterval:tv});var ev=Ir,nv=U,rv=qp(nv.setTimeout,!0);ev({global:!0,bind:!0,forced:nv.setTimeout!==rv},{setTimeout:rv});var iv=Ft.setTimeout;!function(t){t.exports=iv}(Lp);var ov=L(Bp),gv={},sv={get exports(){return gv},set exports(t){gv=t}},Av=Pe,Cv=pr,Iv=br;Ir({target:"Array",proto:!0},{fill:function(t){for(var e=Av(this),n=Iv(e),r=arguments.length,i=Cv(r>1?arguments[1]:void 0,n),o=r>2?arguments[2]:void 0,g=void 0===o?n:Cv(o,n);g>i;)e[i++]=t;return e}});var av=fi("Array").fill,uv=Wt,cv=av,lv=Array.prototype,hv=function(t){var e=t.fill;return t===lv||uv(lv,t)&&e===lv.fill?cv:e};!function(t){t.exports=hv}(sv);var dv=L(gv);function fv(){return fv=Object.assign||function(t){for(var e=1;e-1}var oy=function(){function t(t,e){this.manager=t,this.set(e)}var e=t.prototype;return e.set=function(t){t===Sv&&(t=this.compute()),Tv&&this.manager.element.style&&jv[t]&&(this.manager.element.style[kv]=t),this.actions=t.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var t=[];return ny(this.manager.recognizers,(function(e){ry(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))})),function(t){if(iy(t,Rv))return Rv;var e=iy(t,Dv),n=iy(t,Mv);return e&&n?Rv:e||n?e?Dv:Mv:iy(t,Nv)?Nv:Pv}(t.join(" "))},e.preventDefaults=function(t){var e=t.srcEvent,n=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var r=this.actions,i=iy(r,Rv)&&!jv[Rv],o=iy(r,Mv)&&!jv[Mv],g=iy(r,Dv)&&!jv[Dv];if(i){var s=1===t.pointers.length,A=t.distance<2,C=t.deltaTime<250;if(s&&A&&C)return}if(!g||!o)return i||o&&n&qv||g&&n&Jv?this.preventSrc(e):void 0}},e.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},t}();function gy(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function sy(t){var e=t.length;if(1===e)return{x:_v(t[0].clientX),y:_v(t[0].clientY)};for(var n=0,r=0,i=0;i=xv(e)?t<0?Hv:Kv:e<0?Qv:Xv}function uy(t,e,n){return{x:e/t||0,y:n/t||0}}function cy(t,e,n){var r=n.pointers.length,i=n.changedPointers.length,o=e&Vv&&r-i==0,g=e&(Gv|Wv)&&r-i==0;n.isFirst=!!o,n.isFinal=!!g,o&&(t.session={}),n.eventType=e,function(t,e){var n=t.session,r=e.pointers,i=r.length;n.firstInput||(n.firstInput=Ay(e)),i>1&&!n.firstMultiple?n.firstMultiple=Ay(e):1===i&&(n.firstMultiple=!1);var o=n.firstInput,g=n.firstMultiple,s=g?g.center:o.center,A=e.center=sy(r);e.timeStamp=Ev(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=Iy(s,A),e.distance=Cy(s,A),function(t,e){var n=e.center,r=t.offsetDelta||{},i=t.prevDelta||{},o=t.prevInput||{};e.eventType!==Vv&&o.eventType!==Gv||(i=t.prevDelta={x:o.deltaX||0,y:o.deltaY||0},r=t.offsetDelta={x:n.x,y:n.y}),e.deltaX=i.x+(n.x-r.x),e.deltaY=i.y+(n.y-r.y)}(n,e),e.offsetDirection=ay(e.deltaX,e.deltaY);var C,I,a=uy(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=a.x,e.overallVelocityY=a.y,e.overallVelocity=xv(a.x)>xv(a.y)?a.x:a.y,e.scale=g?(C=g.pointers,Cy((I=r)[0],I[1],ey)/Cy(C[0],C[1],ey)):1,e.rotation=g?function(t,e){return Iy(e[1],e[0],ey)+Iy(t[1],t[0],ey)}(g.pointers,r):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,function(t,e){var n,r,i,o,g=t.lastInterval||e,s=e.timeStamp-g.timeStamp;if(e.eventType!==Wv&&(s>Uv||void 0===g.velocity)){var A=e.deltaX-g.deltaX,C=e.deltaY-g.deltaY,I=uy(s,A,C);r=I.x,i=I.y,n=xv(I.x)>xv(I.y)?I.x:I.y,o=ay(A,C),t.lastInterval=e}else n=g.velocity,r=g.velocityX,i=g.velocityY,o=g.direction;e.velocity=n,e.velocityX=r,e.velocityY=i,e.direction=o}(n,e);var u,c=t.element,l=e.srcEvent;gy(u=l.composedPath?l.composedPath()[0]:l.path?l.path[0]:l.target,c)&&(c=u),e.target=c}(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function ly(t){return t.trim().split(/\s+/g)}function hy(t,e,n){ny(ly(e),(function(e){t.addEventListener(e,n,!1)}))}function dy(t,e,n){ny(ly(e),(function(e){t.removeEventListener(e,n,!1)}))}function fy(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||window}var py=function(){function t(t,e){var n=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){ry(t.options.enable,[t])&&n.handler(e)},this.init()}var e=t.prototype;return e.handler=function(){},e.init=function(){this.evEl&&hy(this.element,this.evEl,this.domHandler),this.evTarget&&hy(this.target,this.evTarget,this.domHandler),this.evWin&&hy(fy(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&dy(this.element,this.evEl,this.domHandler),this.evTarget&&dy(this.target,this.evTarget,this.domHandler),this.evWin&&dy(fy(this.element),this.evWin,this.domHandler)},t}();function vy(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var r=0;rn[e]})):r.sort()),r}var Oy={touchstart:Vv,touchmove:2,touchend:Gv,touchcancel:Wv},ky=function(t){function e(){var n;return e.prototype.evTarget="touchstart touchmove touchend touchcancel",(n=t.apply(this,arguments)||this).targetIds={},n}return pv(e,t),e.prototype.handler=function(t){var e=Oy[t.type],n=Ty.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:zv,srcEvent:t})},e}(py);function Ty(t,e){var n,r,i=xy(t.touches),o=this.targetIds;if(e&(2|Vv)&&1===i.length)return o[i[0].identifier]=!0,[i,i];var g=xy(t.changedTouches),s=[],A=this.target;if(r=i.filter((function(t){return gy(t.target,A)})),e===Vv)for(n=0;n-1&&r.splice(t,1)}),Ny)}}function Dy(t,e){t&Vv?(this.primaryTouch=e.changedPointers[0].identifier,Ry.call(this,e)):t&(Gv|Wv)&&Ry.call(this,e)}function My(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,r=0;r-1&&this.requireFail.splice(e,1),this},e.hasRequireFailures=function(){return this.requireFail.length>0},e.canRecognizeWith=function(t){return!!this.simultaneous[t.id]},e.emit=function(t){var e=this,n=this.state;function r(n){e.manager.emit(n,t)}n<8&&r(e.options.event+Zy(n)),r(e.options.event),t.additionalEvent&&r(t.additionalEvent),n>=8&&r(e.options.event+Zy(n))},e.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=Ly},e.canEmit=function(){for(var t=0;te.threshold&&i&e.direction},n.attrTest=function(t){return Gy.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},n.emit=function(e){this.pX=e.deltaX,this.pY=e.deltaY;var n=Wy(e.direction);n&&(e.additionalEvent=this.options.event+n),t.prototype.emit.call(this,e)},e}(Gy),Hy=function(t){function e(e){return void 0===e&&(e={}),t.call(this,fv({event:"swipe",threshold:10,velocity:.3,direction:qv|Jv,pointers:1},e))||this}pv(e,t);var n=e.prototype;return n.getTouchAction=function(){return Yy.prototype.getTouchAction.call(this)},n.attrTest=function(e){var n,r=this.options.direction;return r&(qv|Jv)?n=e.overallVelocity:r&qv?n=e.overallVelocityX:r&Jv&&(n=e.overallVelocityY),t.prototype.attrTest.call(this,e)&&r&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers===this.options.pointers&&xv(n)>this.options.velocity&&e.eventType&Gv},n.emit=function(t){var e=Wy(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)},e}(Gy),Ky=function(t){function e(e){return void 0===e&&(e={}),t.call(this,fv({event:"pinch",threshold:0,pointers:2},e))||this}pv(e,t);var n=e.prototype;return n.getTouchAction=function(){return[Rv]},n.attrTest=function(e){return t.prototype.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||2&this.state)},n.emit=function(e){if(1!==e.scale){var n=e.scale<1?"in":"out";e.additionalEvent=this.options.event+n}t.prototype.emit.call(this,e)},e}(Gy),Qy=function(t){function e(e){return void 0===e&&(e={}),t.call(this,fv({event:"rotate",threshold:0,pointers:2},e))||this}pv(e,t);var n=e.prototype;return n.getTouchAction=function(){return[Rv]},n.attrTest=function(e){return t.prototype.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)},e}(Gy),Xy=function(t){function e(e){var n;return void 0===e&&(e={}),(n=t.call(this,fv({event:"press",pointers:1,time:251,threshold:9},e))||this)._timer=null,n._input=null,n}pv(e,t);var n=e.prototype;return n.getTouchAction=function(){return[Pv]},n.process=function(t){var e=this,n=this.options,r=t.pointers.length===n.pointers,i=t.distancen.time;if(this._input=t,!i||!r||t.eventType&(Gv|Wv)&&!o)this.reset();else if(t.eventType&Vv)this.reset(),this._timer=setTimeout((function(){e.state=8,e.tryEmit()}),n.time);else if(t.eventType&Gv)return 8;return Ly},n.reset=function(){clearTimeout(this._timer)},n.emit=function(t){8===this.state&&(t&&t.eventType&Gv?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=Ev(),this.manager.emit(this.options.event,this._input)))},e}(Uy),qy={domEvents:!1,touchAction:Sv,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Jy=[[Qy,{enable:!1}],[Ky,{enable:!1},["rotate"]],[Hy,{direction:qv}],[Yy,{direction:qv},["swipe"]],[Vy],[Vy,{event:"doubletap",taps:2},["tap"]],[Xy]];function $y(t,e){var n,r=t.element;r.style&&(ny(t.options.cssProps,(function(i,o){n=Ov(r.style,o),e?(t.oldCssProps[n]=r.style[n],r.style[n]=i):r.style[n]=t.oldCssProps[n]||""})),e||(t.oldCssProps={}))}var tb=function(){function t(t,e){var n=this;this.options=bv({},qy,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new(this.options.inputClass||(Lv?_y:Fv?ky:Bv?jy:Py))(this,cy),this.touchAction=new oy(this,this.options.touchAction),$y(this,!0),ny(this.options.recognizers,(function(t){var e=n.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])}),this)}var e=t.prototype;return e.set=function(t){return bv(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},e.stop=function(t){this.session.stopped=t?2:1},e.recognize=function(t){var e=this.session;if(!e.stopped){var n;this.touchAction.preventDefaults(t);var r=this.recognizers,i=e.curRecognizer;(!i||i&&8&i.state)&&(e.curRecognizer=null,i=null);for(var o=0;o\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",i=window.console&&(window.console.warn||window.console.log);return i&&i.call(window.console,r,n),t.apply(this,arguments)}}var ob=ib((function(t,e,n){for(var r=Object.keys(e),i=0;i=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,g=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return g=t.done,t},e:function(t){s=!0,o=t},f:function(){try{g||null==n.return||n.return()}finally{if(s)throw o}}}}function ub(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n2)return hb.apply(void 0,nh(r=[lb(e[0],e[1])]).call(r,Yl(ih(e).call(e,2))));var i,o=e[0],g=e[1],s=ab(Ah(g));try{for(s.s();!(i=s.n()).done;){var A=i.value;Object.prototype.propertyIsEnumerable.call(g,A)&&(g[A]===cb?delete o[A]:null===o[A]||null===g[A]||"object"!==Qc(o[A])||"object"!==Qc(g[A])||Ih(o[A])||Ih(g[A])?o[A]=db(g[A]):o[A]=hb(o[A],g[A]))}}catch(t){s.e(t)}finally{s.f()}return o}function db(t){return Ih(t)?vh(t).call(t,(function(t){return db(t)})):"object"===Qc(t)&&null!==t?hb({},t):t}function fb(t){for(var e=0,n=xh(t);e>>0,t=(i*=t)>>>0,t+=4294967296*(i-=t)}return 2.3283064365386963e-10*(t>>>0)}}(),e=t(" "),n=t(" "),r=t(" "),i=0;i2&&void 0!==arguments[2]&&arguments[2];for(var r in t)if(void 0!==e[r])if(null===e[r]||"object"!==Qc(e[r]))kb(t,e,r,n);else{var i=t[r],o=e[r];Ob(i)&&Ob(o)&&Tb(i,o,n)}}function Sb(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(Ih(n))throw new TypeError("Arrays are not supported by deepExtend");for(var i=0;i3&&void 0!==arguments[3]&&arguments[3];if(Ih(n))throw new TypeError("Arrays are not supported by deepExtend");for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&!nf(t).call(t,i))if(n[i]&&n[i].constructor===Object)void 0===e[i]&&(e[i]={}),e[i].constructor===Object?Nb(e[i],n[i]):kb(e,n,i,r);else if(Ih(n[i])){e[i]=[];for(var o=0;o2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)||!0===n)if("object"===Qc(e[i])&&null!==e[i]&&If(e[i])===Object.prototype)void 0===t[i]?t[i]=Nb({},e[i],n):"object"===Qc(t[i])&&null!==t[i]&&If(t[i])===Object.prototype?Nb(t[i],e[i],n):kb(t,e,i,r);else if(Ih(e[i])){var o;t[i]=ih(o=e[i]).call(o)}else kb(t,e,i,r);return t}function Rb(t,e){var n;return nh(n=[]).call(n,Yl(t),[e])}function Db(t){return t.getBoundingClientRect().top}function Mb(t,e){if(Ih(t))for(var n=t.length,r=0;r3&&void 0!==arguments[3]?arguments[3]:{},i=function(t){return null!=t},o=function(t){return null!==t&&"object"===Qc(t)};if(!o(t))throw new Error("Parameter mergeTarget must be an object");if(!o(e))throw new Error("Parameter options must be an object");if(!i(n))throw new Error("Parameter option must have a value");if(!o(r))throw new Error("Parameter globalOptions must be an object");var g=e[n],s=o(r)&&!function(t){for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}(r)?r[n]:void 0,A=s?s.enabled:void 0;if(void 0!==g){if("boolean"==typeof g)return o(t[n])||(t[n]={}),void(t[n].enabled=g);if(null===g&&!o(t[n])){if(!i(s))return;t[n]=Sp(s)}if(o(g)){var C=!0;void 0!==g.enabled?C=g.enabled:void 0!==A&&(C=s.enabled),function(t,e,n){o(t[n])||(t[n]={});var r=e[n],i=t[n];for(var g in r)Object.prototype.hasOwnProperty.call(r,g)&&(i[g]=r[g])}(t,e,n),t[n].enabled=C}}}var Hb={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return t*(2-t)},easeInOutQuad:function(t){return t<.5?2*t*t:(4-2*t)*t-1},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return--t*t*t+1},easeInOutCubic:function(t){return t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return 1- --t*t*t*t},easeInOutQuart:function(t){return t<.5?8*t*t*t*t:1-8*--t*t*t*t},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return 1+--t*t*t*t*t},easeInOutQuint:function(t){return t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t}};function Kb(t,e){var n;Ih(e)||(e=[e]);var r,i=ab(t);try{for(i.s();!(r=i.n()).done;){var o=r.value;if(o){n=o[e[0]];for(var g=1;g0&&void 0!==arguments[0]?arguments[0]:1;Fu(this,t),this.pixelRatio=e,this.generated=!1,this.centerCoordinates={x:144.5,y:144.5},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=function(){},this.closeCallback=function(){},this._create()}return il(t,[{key:"insertTo",value:function(t){void 0!==this.hammer&&(this.hammer.destroy(),this.hammer=void 0),this.container=t,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}},{key:"setUpdateCallback",value:function(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker update callback is not a function.");this.updateCallback=t}},{key:"setCloseCallback",value:function(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker closing callback is not a function.");this.closeCallback=t}},{key:"_isColorString",value:function(t){if("string"==typeof t)return Qb[t]}},{key:"setColor",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if("none"!==t){var n,r=this._isColorString(t);if(void 0!==r&&(t=r),!0===Eb(t)){if(!0===Gb(t)){var i=t.substr(4).substr(0,t.length-5).split(",");n={r:i[0],g:i[1],b:i[2],a:1}}else if(!0===function(t){return _b.test(t)}(t)){var o=t.substr(5).substr(0,t.length-6).split(",");n={r:o[0],g:o[1],b:o[2],a:o[3]}}else if(!0===Vb(t)){var g=jb(t);n={r:g.r,g:g.g,b:g.b,a:1}}}else if(t instanceof Object&&void 0!==t.r&&void 0!==t.g&&void 0!==t.b){var s=void 0!==t.a?t.a:"1.0";n={r:t.r,g:t.g,b:t.b,a:s}}if(void 0===n)throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: "+jp(t));this._setColor(n,e)}}},{key:"show",value:function(){void 0!==this.closeCallback&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}},{key:"_hide",value:function(){var t=this;!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&(this.previousColor=ti({},this.color)),!0===this.applied&&this.updateCallback(this.initialColor),this.frame.style.display="none",ov((function(){void 0!==t.closeCallback&&(t.closeCallback(),t.closeCallback=void 0)}),0)}},{key:"_save",value:function(){this.updateCallback(this.color),this.applied=!1,this._hide()}},{key:"_apply",value:function(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}},{key:"_loadLast",value:function(){void 0!==this.previousColor?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}},{key:"_setColor",value:function(t){!0===(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&(this.initialColor=ti({},t)),this.color=t;var e=zb(t.r,t.g,t.b),n=2*Math.PI,r=this.r*e.s,i=this.centerCoordinates.x+r*Math.sin(n*e.h),o=this.centerCoordinates.y+r*Math.cos(n*e.h);this.colorPickerSelector.style.left=i-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=o-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(t)}},{key:"_setOpacity",value:function(t){this.color.a=t/100,this._updatePicker(this.color)}},{key:"_setBrightness",value:function(t){var e=zb(this.color.r,this.color.g,this.color.b);e.v=t/100;var n=Zb(e.h,e.s,e.v);n.a=this.color.a,this.color=n,this._updatePicker()}},{key:"_updatePicker",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.color,e=zb(t.r,t.g,t.b),n=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(n.webkitBackingStorePixelRatio||n.mozBackingStorePixelRatio||n.msBackingStorePixelRatio||n.oBackingStorePixelRatio||n.backingStorePixelRatio||1)),n.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var r=this.colorPickerCanvas.clientWidth,i=this.colorPickerCanvas.clientHeight;n.clearRect(0,0,r,i),n.putImageData(this.hueCircle,0,0),n.fillStyle="rgba(0,0,0,"+(1-e.v)+")",n.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),dv(n).call(n),this.brightnessRange.value=100*e.v,this.opacityRange.value=100*t.a,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}},{key:"_setSize",value:function(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}},{key:"_create",value:function(){var t,e,n,r;if(this.frame=document.createElement("div"),this.frame.className="vis-color-picker",this.colorPickerDiv=document.createElement("div"),this.colorPickerSelector=document.createElement("div"),this.colorPickerSelector.className="vis-selector",this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement("canvas"),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){var i=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(i.webkitBackingStorePixelRatio||i.mozBackingStorePixelRatio||i.msBackingStorePixelRatio||i.oBackingStorePixelRatio||i.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{var o=document.createElement("DIV");o.style.color="red",o.style.fontWeight="bold",o.style.padding="10px",o.innerText="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(o)}this.colorPickerDiv.className="vis-color",this.opacityDiv=document.createElement("div"),this.opacityDiv.className="vis-opacity",this.brightnessDiv=document.createElement("div"),this.brightnessDiv.className="vis-brightness",this.arrowDiv=document.createElement("div"),this.arrowDiv.className="vis-arrow",this.opacityRange=document.createElement("input");try{this.opacityRange.type="range",this.opacityRange.min="0",this.opacityRange.max="100"}catch(t){}this.opacityRange.value="100",this.opacityRange.className="vis-range",this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range",this.brightnessRange.min="0",this.brightnessRange.max="100"}catch(t){}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);var g=this;this.opacityRange.onchange=function(){g._setOpacity(this.value)},this.opacityRange.oninput=function(){g._setOpacity(this.value)},this.brightnessRange.onchange=function(){g._setBrightness(this.value)},this.brightnessRange.oninput=function(){g._setBrightness(this.value)},this.brightnessLabel=document.createElement("div"),this.brightnessLabel.className="vis-label vis-brightness",this.brightnessLabel.innerText="brightness:",this.opacityLabel=document.createElement("div"),this.opacityLabel.className="vis-label vis-opacity",this.opacityLabel.innerText="opacity:",this.newColorDiv=document.createElement("div"),this.newColorDiv.className="vis-new-color",this.newColorDiv.innerText="new",this.initialColorDiv=document.createElement("div"),this.initialColorDiv.className="vis-initial-color",this.initialColorDiv.innerText="initial",this.cancelButton=document.createElement("div"),this.cancelButton.className="vis-button vis-cancel",this.cancelButton.innerText="cancel",this.cancelButton.onclick=wi(t=this._hide).call(t,this,!1),this.applyButton=document.createElement("div"),this.applyButton.className="vis-button vis-apply",this.applyButton.innerText="apply",this.applyButton.onclick=wi(e=this._apply).call(e,this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerText="save",this.saveButton.onclick=wi(n=this._save).call(n,this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerText="load last",this.loadButton.onclick=wi(r=this._loadLast).call(r,this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}},{key:"_bindHammer",value:function(){var t=this;this.drag={},this.pinch={},this.hammer=new vb(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.on("hammer.input",(function(e){e.isFirst&&t._moveSelector(e)})),this.hammer.on("tap",(function(e){t._moveSelector(e)})),this.hammer.on("panstart",(function(e){t._moveSelector(e)})),this.hammer.on("panmove",(function(e){t._moveSelector(e)})),this.hammer.on("panend",(function(e){t._moveSelector(e)}))}},{key:"_generateHueCircle",value:function(){if(!1===this.generated){var t=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1)),t.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var e,n,r,i,o=this.colorPickerCanvas.clientWidth,g=this.colorPickerCanvas.clientHeight;t.clearRect(0,0,o,g),this.centerCoordinates={x:.5*o,y:.5*g},this.r=.49*o;var s,A=2*Math.PI/360,C=1/this.r;for(r=0;r<360;r++)for(i=0;i3&&void 0!==arguments[3]?arguments[3]:1,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){return!1};Fu(this,t),this.parent=e,this.changedOptions=[],this.container=n,this.allowCreation=!1,this.hideOption=o,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},ti(this.options,this.defaultOptions),this.configureOptions=r,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new Xb(i),this.wrapper=void 0}return il(t,[{key:"setOptions",value:function(t){if(void 0!==t){this.popupHistory={},this._removePopup();var e=!0;if("string"==typeof t)this.options.filter=t;else if(Ih(t))this.options.filter=t.join();else if("object"===Qc(t)){if(null==t)throw new TypeError("options cannot be null");void 0!==t.container&&(this.options.container=t.container),void 0!==vf(t)&&(this.options.filter=vf(t)),void 0!==t.showButton&&(this.options.showButton=t.showButton),void 0!==t.enabled&&(e=t.enabled)}else"boolean"==typeof t?(this.options.filter=!0,e=t):"function"==typeof t&&(this.options.filter=t,e=!0);!1===vf(this.options)&&(e=!1),this.options.enabled=e}this._clean()}},{key:"setModuleOptions",value:function(t){this.moduleOptions=t,!0===this.options.enabled&&(this._clean(),void 0!==this.options.container&&(this.container=this.options.container),this._create())}},{key:"_create",value:function(){this._clean(),this.changedOptions=[];var t=vf(this.options),e=0,n=!1;for(var r in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,r)&&(this.allowCreation=!1,n=!1,"function"==typeof t?n=(n=t(r,[]))||this._handleObject(this.configureOptions[r],[r],!0):!0!==t&&-1===hp(t).call(t,r)||(n=!0),!1!==n&&(this.allowCreation=!0,e>0&&this._makeItem([]),this._makeHeader(r),this._handleObject(this.configureOptions[r],[r])),e++);this._makeButton(),this._push()}},{key:"_push",value:function(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(var t=0;t1?n-1:0),i=1;i2&&void 0!==arguments[2]&&arguments[2],r=document.createElement("div");if(r.className="vis-configuration vis-config-label vis-config-s"+e.length,!0===n){for(;r.firstChild;)r.removeChild(r.firstChild);r.appendChild(qb("i","b",t))}else r.innerText=t+":";return r}},{key:"_makeDropdown",value:function(t,e,n){var r=document.createElement("select");r.className="vis-configuration vis-config-select";var i=0;void 0!==e&&-1!==hp(t).call(t,e)&&(i=hp(t).call(t,e));for(var o=0;oo&&1!==o&&(s.max=Math.ceil(e*I),C=s.max,A="range increased"),s.value=e}else s.value=r;var a=document.createElement("input");a.className="vis-configuration vis-config-rangeinput",a.value=s.value;var u=this;s.onchange=function(){a.value=this.value,u._update(Number(this.value),n)},s.oninput=function(){a.value=this.value};var c=this._makeLabel(n[n.length-1],n),l=this._makeItem(n,c,s,a);""!==A&&this.popupHistory[l]!==C&&(this.popupHistory[l]=C,this._setupPopup(A,l))}},{key:"_makeButton",value:function(){var t=this;if(!0===this.options.showButton){var e=document.createElement("div");e.className="vis-configuration vis-config-button",e.innerText="generate options",e.onclick=function(){t._printOptions()},e.onmouseover=function(){e.className="vis-configuration vis-config-button hover"},e.onmouseout=function(){e.className="vis-configuration vis-config-button"},this.optionsContainer=document.createElement("div"),this.optionsContainer.className="vis-configuration vis-config-option-container",this.domElements.push(this.optionsContainer),this.domElements.push(e)}}},{key:"_setupPopup",value:function(t,e){var n=this;if(!0===this.initialized&&!0===this.allowCreation&&this.popupCounter1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=!1,i=vf(this.options),o=!1;for(var g in t)if(Object.prototype.hasOwnProperty.call(t,g)){r=!0;var s=t[g],A=Rb(e,g);if("function"==typeof i&&!1===(r=i(g,e))&&!Ih(s)&&"string"!=typeof s&&"boolean"!=typeof s&&s instanceof Object&&(this.allowCreation=!1,r=this._handleObject(s,A,!0),this.allowCreation=!1===n),!1!==r){o=!0;var C=this._getValue(A);if(Ih(s))this._handleArray(s,C,A);else if("string"==typeof s)this._makeTextInput(s,C,A);else if("boolean"==typeof s)this._makeCheckbox(s,C,A);else if(s instanceof Object){if(!this.hideOption(e,g,this.moduleOptions))if(void 0!==s.enabled){var I=Rb(A,"enabled"),a=this._getValue(I);if(!0===a){var u=this._makeLabel(g,A,!0);this._makeItem(A,u),o=this._handleObject(s,A)||o}else this._makeCheckbox(s,a,A)}else{var c=this._makeLabel(g,A,!0);this._makeItem(A,c),o=this._handleObject(s,A)||o}}else console.error("dont know how to handle",s,g,A)}}return o}},{key:"_handleArray",value:function(t,e,n){"string"==typeof t[0]&&"color"===t[0]?(this._makeColorField(t,e,n),t[1]!==e&&this.changedOptions.push({path:n,value:e})):"string"==typeof t[0]?(this._makeDropdown(t,e,n),t[0]!==e&&this.changedOptions.push({path:n,value:e})):"number"==typeof t[0]&&(this._makeRange(t,e,n),t[0]!==e&&this.changedOptions.push({path:n,value:Number(e)}))}},{key:"_update",value:function(t,e){var n=this._constructOptions(t,e);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",n),this.initialized=!0,this.parent.setOptions(n)}},{key:"_constructOptions",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n;t="false"!==(t="true"===t||t)&&t;for(var i=0;ii-this.padding&&(s=!0),o=s?this.x-n:this.x,g=A?this.y-e:this.y}else(g=this.y-e)+e+this.padding>r&&(g=r-e-this.padding),gi&&(o=i-n-this.padding),og.distance?" in "+t.printLocation(o.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+t.printLocation(g.path,g.closestMatch,""):o.distance<=8?'. Did you mean "'+o.closestMatch+'"?'+t.printLocation(o.path,e):". Did you mean one of these: "+t.print(xh(n))+t.printLocation(r,e),console.error('%cUnknown option detected: "'+e+'"'+i,nm),em=!0}},{key:"findInOptions",value:function(e,n,r){var i,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],g=1e9,s="",A=[],C=e.toLowerCase(),I=void 0;for(var a in n){var u=void 0;if(void 0!==n[a].__type__&&!0===o){var c=t.findInOptions(e,n[a],Rb(r,a));g>c.distance&&(s=c.closestMatch,A=c.path,g=c.distance,I=c.indexMatch)}else{var l;-1!==hp(l=a.toLowerCase()).call(l,C)&&(I=a),g>(u=t.levenshteinDistance(e,a))&&(s=a,A=ih(i=r).call(i),g=u)}}return{closestMatch:s,path:A,distance:g,indexMatch:I}}},{key:"printLocation",value:function(t,e){for(var n="\n\n"+(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Problem value found at: \n")+"options = {\n",r=0;r":!0,"--":!0},lm="",hm=0,dm="",fm="",pm=um.NULL;function vm(){hm++,dm=lm.charAt(hm)}function ym(){return lm.charAt(hm+1)}function bm(t){var e=t.charCodeAt(0);return e<47?35===e||46===e:e<59?e>47:e<91?e>64:e<96?95===e:e<123&&e>96}function mm(t,e){if(t||(t={}),e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function wm(t,e,n){for(var r=e.split("."),i=t;r.length;){var o=r.shift();r.length?(i[o]||(i[o]={}),i=i[o]):i[o]=n}}function _m(t,e){for(var n,r,i=null,o=[t],g=t;g.parent;)o.push(g.parent),g=g.parent;if(g.nodes)for(n=0,r=g.nodes.length;n=0;n--){var s,A=o[n];A.nodes||(A.nodes=[]),-1===hp(s=A.nodes).call(s,i)&&A.nodes.push(i)}e.attr&&(i.attr=mm(i.attr,e.attr))}function xm(t,e){if(t.edges||(t.edges=[]),t.edges.push(e),t.edge){var n=mm({},t.edge);e.attr=mm(n,e.attr)}}function Em(t,e,n,r,i){var o={from:e,to:n,type:r};return t.edge&&(o.attr=mm({},t.edge)),o.attr=mm(o.attr||{},i),null!=i&&i.hasOwnProperty("arrows")&&null!=i.arrows&&(o.arrows={to:{enabled:!0,type:i.arrows.type}},i.arrows=null),o}function Om(){for(pm=um.NULL,fm="";" "===dm||"\t"===dm||"\n"===dm||"\r"===dm;)vm();do{var t=!1;if("#"===dm){for(var e=hm-1;" "===lm.charAt(e)||"\t"===lm.charAt(e);)e--;if("\n"===lm.charAt(e)||""===lm.charAt(e)){for(;""!=dm&&"\n"!=dm;)vm();t=!0}}if("/"===dm&&"/"===ym()){for(;""!=dm&&"\n"!=dm;)vm();t=!0}if("/"===dm&&"*"===ym()){for(;""!=dm;){if("*"===dm&&"/"===ym()){vm(),vm();break}vm()}t=!0}for(;" "===dm||"\t"===dm||"\n"===dm||"\r"===dm;)vm()}while(t);if(""!==dm){var n=dm+ym();if(cm[n])return pm=um.DELIMITER,fm=n,vm(),void vm();if(cm[dm])return pm=um.DELIMITER,fm=dm,void vm();if(bm(dm)||"-"===dm){for(fm+=dm,vm();bm(dm);)fm+=dm,vm();return"false"===fm?fm=!1:"true"===fm?fm=!0:isNaN(Number(fm))||(fm=Number(fm)),void(pm=um.IDENTIFIER)}if('"'===dm){for(vm();""!=dm&&('"'!=dm||'"'===dm&&'"'===ym());)'"'===dm?(fm+=dm,vm()):"\\"===dm&&"n"===ym()?(fm+="\n",vm()):fm+=dm,vm();if('"'!=dm)throw Rm('End of string " expected');return vm(),void(pm=um.IDENTIFIER)}for(pm=um.UNKNOWN;""!=dm;)fm+=dm,vm();throw new SyntaxError('Syntax error in part "'+Dm(fm,30)+'"')}pm=um.DELIMITER}function km(t){for(;""!==fm&&"}"!=fm;)Tm(t),";"===fm&&Om()}function Tm(t){var e=Sm(t);if(e)Pm(t,e);else{var n=function(t){return"node"===fm?(Om(),t.node=Nm(),"node"):"edge"===fm?(Om(),t.edge=Nm(),"edge"):"graph"===fm?(Om(),t.graph=Nm(),"graph"):null}(t);if(!n){if(pm!=um.IDENTIFIER)throw Rm("Identifier expected");var r=fm;if(Om(),"="===fm){if(Om(),pm!=um.IDENTIFIER)throw Rm("Identifier expected");t[r]=fm,Om()}else!function(t,e){var n={id:e},r=Nm();r&&(n.attr=r),_m(t,n),Pm(t,e)}(t,r)}}}function Sm(t){var e=null;if("subgraph"===fm&&((e={}).type="subgraph",Om(),pm===um.IDENTIFIER&&(e.id=fm,Om())),"{"===fm){if(Om(),e||(e={}),e.parent=t,e.node=t.node,e.edge=t.edge,e.graph=t.graph,km(e),"}"!=fm)throw Rm("Angle bracket } expected");Om(),delete e.node,delete e.edge,delete e.graph,delete e.parent,t.subgraphs||(t.subgraphs=[]),t.subgraphs.push(e)}return e}function Pm(t,e){for(;"->"===fm||"--"===fm;){var n,r=fm;Om();var i=Sm(t);if(i)n=i;else{if(pm!=um.IDENTIFIER)throw Rm("Identifier or subgraph expected");_m(t,{id:n=fm}),Om()}xm(t,Em(t,e,n,r,Nm())),e=n}}function Nm(){for(var t,e,n=null,r={dashed:!0,solid:!1,dotted:[1,5]},i={dot:"circle",box:"box",crow:"crow",curve:"curve",icurve:"inv_curve",normal:"triangle",inv:"inv_triangle",diamond:"diamond",tee:"bar",vee:"vee"},o=new Array,g=new Array;"["===fm;){for(Om(),n={};""!==fm&&"]"!=fm;){if(pm!=um.IDENTIFIER)throw Rm("Attribute name expected");var s=fm;if(Om(),"="!=fm)throw Rm("Equal sign = expected");if(Om(),pm!=um.IDENTIFIER)throw Rm("Attribute value expected");var A=fm;"style"===s&&(A=r[A]),"arrowhead"===s&&(s="arrows",A={to:{enabled:!0,type:i[A]}}),"arrowtail"===s&&(s="arrows",A={from:{enabled:!0,type:i[A]}}),o.push({attr:n,name:s,value:A}),g.push(s),Om(),","==fm&&Om()}if("]"!=fm)throw Rm("Bracket ] expected");Om()}if(nf(g).call(g,"dir")){var C={arrows:{}};for(t=0;t"===t.type&&(e.arrows="to"),e};Hh(i=n.edges).call(i,(function(t){var e,n,i,g,s,A,C;e=t.from instanceof Object?t.from.nodes:{id:t.from},n=t.to instanceof Object?t.to.nodes:{id:t.to},t.from instanceof Object&&t.from.edges&&Hh(i=t.from.edges).call(i,(function(t){var e=o(t);r.edges.push(e)})),s=n,A=function(e,n){var i=Em(r,e.id,n.id,t.type,t.attr),g=o(i);r.edges.push(g)},Ih(g=e)?Hh(g).call(g,(function(t){Ih(s)?Hh(s).call(s,(function(e){A(t,e)})):A(t,s)})):Ih(s)?Hh(s).call(s,(function(t){A(g,t)})):A(g,s),t.to instanceof Object&&t.to.edges&&Hh(C=t.to.edges).call(C,(function(t){var e=o(t);r.edges.push(e)}))}))}return n.attr&&(r.options=n.attr),r}var Lm=Object.freeze({__proto__:null,cn:{addDescription:"单击空白处放置新节点。",addEdge:"添加连接线",addNode:"添加节点",back:"返回",close:"關閉",createEdgeError:"无法将连接线连接到群集。",del:"删除选定",deleteClusterError:"无法删除群集。",edgeDescription:"单击某个节点并将该连接线拖动到另一个节点以连接它们。",edit:"编辑",editClusterError:"无法编辑群集。",editEdge:"编辑连接线",editEdgeDescription:"单击控制节点并将它们拖到节点上连接。",editNode:"编辑节点"},cs:{addDescription:"Kluknutím do prázdného prostoru můžete přidat nový vrchol.",addEdge:"Přidat hranu",addNode:"Přidat vrchol",back:"Zpět",close:"Zavřít",createEdgeError:"Nelze připojit hranu ke shluku.",del:"Smazat výběr",deleteClusterError:"Nelze mazat shluky.",edgeDescription:"Přetažením z jednoho vrcholu do druhého můžete spojit tyto vrcholy novou hranou.",edit:"Upravit",editClusterError:"Nelze upravovat shluky.",editEdge:"Upravit hranu",editEdgeDescription:"Přetažením kontrolního vrcholu hrany ji můžete připojit k jinému vrcholu.",editNode:"Upravit vrchol"},de:{addDescription:"Klicke auf eine freie Stelle, um einen neuen Knoten zu plazieren.",addEdge:"Kante hinzufügen",addNode:"Knoten hinzufügen",back:"Zurück",close:"Schließen",createEdgeError:"Es ist nicht möglich, Kanten mit Clustern zu verbinden.",del:"Lösche Auswahl",deleteClusterError:"Cluster können nicht gelöscht werden.",edgeDescription:"Klicke auf einen Knoten und ziehe die Kante zu einem anderen Knoten, um diese zu verbinden.",edit:"Editieren",editClusterError:"Cluster können nicht editiert werden.",editEdge:"Kante editieren",editEdgeDescription:"Klicke auf die Verbindungspunkte und ziehe diese auf einen Knoten, um sie zu verbinden.",editNode:"Knoten editieren"},en:{addDescription:"Click in an empty space to place a new node.",addEdge:"Add Edge",addNode:"Add Node",back:"Back",close:"Close",createEdgeError:"Cannot link edges to a cluster.",del:"Delete selected",deleteClusterError:"Clusters cannot be deleted.",edgeDescription:"Click on a node and drag the edge to another node to connect them.",edit:"Edit",editClusterError:"Clusters cannot be edited.",editEdge:"Edit Edge",editEdgeDescription:"Click on the control points and drag them to a node to connect to it.",editNode:"Edit Node"},es:{addDescription:"Haga clic en un lugar vacío para colocar un nuevo nodo.",addEdge:"Añadir arista",addNode:"Añadir nodo",back:"Atrás",close:"Cerrar",createEdgeError:"No se puede conectar una arista a un grupo.",del:"Eliminar selección",deleteClusterError:"No es posible eliminar grupos.",edgeDescription:"Haga clic en un nodo y arrastre la arista hacia otro nodo para conectarlos.",edit:"Editar",editClusterError:"No es posible editar grupos.",editEdge:"Editar arista",editEdgeDescription:"Haga clic en un punto de control y arrastrelo a un nodo para conectarlo.",editNode:"Editar nodo"},fr:{addDescription:"Cliquez dans un endroit vide pour placer un nœud.",addEdge:"Ajouter un lien",addNode:"Ajouter un nœud",back:"Retour",close:"Fermer",createEdgeError:"Impossible de créer un lien vers un cluster.",del:"Effacer la sélection",deleteClusterError:"Les clusters ne peuvent pas être effacés.",edgeDescription:"Cliquez sur un nœud et glissez le lien vers un autre nœud pour les connecter.",edit:"Éditer",editClusterError:"Les clusters ne peuvent pas être édités.",editEdge:"Éditer le lien",editEdgeDescription:"Cliquez sur les points de contrôle et glissez-les pour connecter un nœud.",editNode:"Éditer le nœud"},it:{addDescription:"Clicca per aggiungere un nuovo nodo",addEdge:"Aggiungi un vertice",addNode:"Aggiungi un nodo",back:"Indietro",close:"Chiudere",createEdgeError:"Non si possono collegare vertici ad un cluster",del:"Cancella la selezione",deleteClusterError:"I cluster non possono essere cancellati",edgeDescription:"Clicca su un nodo e trascinalo ad un altro nodo per connetterli.",edit:"Modifica",editClusterError:"I clusters non possono essere modificati.",editEdge:"Modifica il vertice",editEdgeDescription:"Clicca sui Punti di controllo e trascinali ad un nodo per connetterli.",editNode:"Modifica il nodo"},nl:{addDescription:"Klik op een leeg gebied om een nieuwe node te maken.",addEdge:"Link toevoegen",addNode:"Node toevoegen",back:"Terug",close:"Sluiten",createEdgeError:"Kan geen link maken naar een cluster.",del:"Selectie verwijderen",deleteClusterError:"Clusters kunnen niet worden verwijderd.",edgeDescription:"Klik op een node en sleep de link naar een andere node om ze te verbinden.",edit:"Wijzigen",editClusterError:"Clusters kunnen niet worden aangepast.",editEdge:"Link wijzigen",editEdgeDescription:"Klik op de verbindingspunten en sleep ze naar een node om daarmee te verbinden.",editNode:"Node wijzigen"},pt:{addDescription:"Clique em um espaço em branco para adicionar um novo nó",addEdge:"Adicionar aresta",addNode:"Adicionar nó",back:"Voltar",close:"Fechar",createEdgeError:"Não foi possível linkar arestas a um cluster.",del:"Remover selecionado",deleteClusterError:"Clusters não puderam ser removidos.",edgeDescription:"Clique em um nó e arraste a aresta até outro nó para conectá-los",edit:"Editar",editClusterError:"Clusters não puderam ser editados.",editEdge:"Editar aresta",editEdgeDescription:"Clique nos pontos de controle e os arraste para um nó para conectá-los",editNode:"Editar nó"},ru:{addDescription:"Кликните в свободное место, чтобы добавить новый узел.",addEdge:"Добавить ребро",addNode:"Добавить узел",back:"Назад",close:"Закрывать",createEdgeError:"Невозможно соединить ребра в кластер.",del:"Удалить выбранное",deleteClusterError:"Кластеры не могут быть удалены",edgeDescription:"Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.",edit:"Редактировать",editClusterError:"Кластеры недоступны для редактирования.",editEdge:"Редактировать ребро",editEdgeDescription:"Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.",editNode:"Редактировать узел"},uk:{addDescription:"Kлікніть на вільне місце, щоб додати новий вузол.",addEdge:"Додати край",addNode:"Додати вузол",back:"Назад",close:"Закрити",createEdgeError:"Не можливо об'єднати краї в групу.",del:"Видалити обране",deleteClusterError:"Групи не можуть бути видалені.",edgeDescription:"Клікніть на вузол і перетягніть край до іншого вузла, щоб їх з'єднати.",edit:"Редагувати",editClusterError:"Групи недоступні для редагування.",editEdge:"Редагувати край",editEdgeDescription:"Клікніть на контрольні точки і перетягніть їх у вузол, щоб підключитися до нього.",editNode:"Редагувати вузол"}}),Fm=function(){function t(){Fu(this,t),this.NUM_ITERATIONS=4,this.image=new Image,this.canvas=document.createElement("canvas")}return il(t,[{key:"init",value:function(){if(!this.initialized()){this.src=this.image.src;var t=this.image.width,e=this.image.height;this.width=t,this.height=e;var n=Math.floor(e/2),r=Math.floor(e/4),i=Math.floor(e/8),o=Math.floor(e/16),g=Math.floor(t/2),s=Math.floor(t/4),A=Math.floor(t/8),C=Math.floor(t/16);this.canvas.width=3*s,this.canvas.height=n,this.coordinates=[[0,0,g,n],[g,0,s,r],[g,r,A,i],[5*A,r,C,o]],this._fillMipMap()}}},{key:"initialized",value:function(){return void 0!==this.coordinates}},{key:"_fillMipMap",value:function(){var t=this.canvas.getContext("2d"),e=this.coordinates[0];t.drawImage(this.image,e[0],e[1],e[2],e[3]);for(var n=1;n2){e*=.5;for(var g=0;e>2&&g=this.NUM_ITERATIONS&&(g=this.NUM_ITERATIONS-1);var s=this.coordinates[g];t.drawImage(this.canvas,s[0],s[1],s[2],s[3],n,r,i,o)}else t.drawImage(this.image,n,r,i,o)}}]),t}(),zm=function(){function t(e){Fu(this,t),this.images={},this.imageBroken={},this.callback=e}return il(t,[{key:"_tryloadBrokenUrl",value:function(t,e,n){void 0!==t&&void 0!==n&&(void 0!==e?(n.image.onerror=function(){console.error("Could not load brokenImage:",e)},n.image.src=e):console.warn("No broken url image defined"))}},{key:"_redrawWithImage",value:function(t){this.callback&&this.callback(t)}},{key:"load",value:function(t,e){var n=this,r=this.images[t];if(r)return r;var i=new Fm;return this.images[t]=i,i.image.onload=function(){n._fixImageCoordinates(i.image),i.init(),n._redrawWithImage(i)},i.image.onerror=function(){console.error("Could not load image:",t),n._tryloadBrokenUrl(t,e,i)},i.image.src=t,i}},{key:"_fixImageCoordinates",value:function(t){0===t.width&&(document.body.appendChild(t),t.width=t.offsetWidth,t.height=t.offsetHeight,document.body.removeChild(t))}}]),t}(),Zm={},Um={get exports(){return Zm},set exports(t){Zm=t}},Vm={},Gm={get exports(){return Vm},set exports(t){Vm=t}},Wm=V((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),Ym=V,Hm=Lt,Km=it,Qm=Wm,Xm=Object.isExtensible,qm=Ym((function(){Xm(1)}))||Qm?function(t){return!!Hm(t)&&(!Qm||"ArrayBuffer"!=Km(t))&&(!Xm||Xm(t))}:Xm,Jm=!V((function(){return Object.isExtensible(Object.preventExtensions({}))})),$m=Ir,tw=tt,ew=Or,nw=Lt,rw=De,iw=Rn.f,ow=qA,gw=tC,sw=qm,Aw=Jm,Cw=!1,Iw=Fe("meta"),aw=0,uw=function(t){iw(t,Iw,{value:{objectID:"O"+aw++,weakData:{}}})},cw=Gm.exports={enable:function(){cw.enable=function(){},Cw=!0;var t=ow.f,e=tw([].splice),n={};n[Iw]=1,t(n).length&&(ow.f=function(n){for(var r=t(n),i=0,o=r.length;io;o++)if((s=f(t[o]))&&yw(Ew,s))return s;return new xw(!1)}r=bw(t,i)}for(A=u?t.next:r.next;!(C=hw(A,r)).done;){try{s=f(C.value)}catch(t){ww(r,"throw",t)}if("object"==typeof s&&s&&yw(Ew,s))return s}return new xw(!1)},kw=Wt,Tw=TypeError,Sw=function(t,e){if(kw(e,t))return t;throw Tw("Incorrect invocation")},Pw=Ir,Nw=U,Rw=Vm,Dw=V,Mw=Jn,jw=Ow,Bw=Sw,Lw=at,Fw=Lt,zw=Rg,Zw=Rn.f,Uw=ZC.forEach,Vw=ct,Gw=xo.set,Ww=xo.getterFor,Yw=function(t,e,n){var r,i=-1!==t.indexOf("Map"),o=-1!==t.indexOf("Weak"),g=i?"set":"add",s=Nw[t],A=s&&s.prototype,C={};if(Vw&&Lw(s)&&(o||A.forEach&&!Dw((function(){(new s).entries().next()})))){var I=(r=e((function(e,n){Gw(Bw(e,I),{type:t,collection:new s}),null!=n&&jw(n,e[g],{that:e,AS_ENTRIES:i})}))).prototype,a=Ww(t);Uw(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(t){var e="add"==t||"set"==t;!(t in A)||o&&"clear"==t||Mw(I,t,(function(n,r){var i=a(this).collection;if(!e&&o&&!Fw(n))return"get"==t&&void 0;var g=i[t](0===n?0:n,r);return e?this:g}))})),o||Zw(I,"size",{configurable:!0,get:function(){return a(this).collection.size}})}else r=n.getConstructor(e,t,i,g),Rw.enable();return zw(r,t,!1,!0),C[t]=r,Pw({global:!0,forced:!0},C),o||n.setStrong(r,t,i),r},Hw=lg,Kw=function(t,e,n){for(var r in e)n&&n.unsafe&&t[r]?t[r]=e[r]:Hw(t,r,e[r],n);return t},Qw=Gt,Xw=cC,qw=ct,Jw=Ke("species"),$w=function(t){var e=Qw(t);qw&&e&&!e[Jw]&&Xw(e,Jw,{configurable:!0,get:function(){return this}})},t_=rg,e_=cC,n_=Kw,r_=Nn,i_=Sw,o_=Tt,g_=Ow,s_=ss,A_=As,C_=$w,I_=ct,a_=Vm.fastKey,u_=xo.set,c_=xo.getterFor,l_={getConstructor:function(t,e,n,r){var i=t((function(t,i){i_(t,o),u_(t,{type:e,index:t_(null),first:void 0,last:void 0,size:0}),I_||(t.size=0),o_(i)||g_(i,t[r],{that:t,AS_ENTRIES:n})})),o=i.prototype,g=c_(e),s=function(t,e,n){var r,i,o=g(t),s=A(t,e);return s?s.value=n:(o.last=s={index:i=a_(e,!0),key:e,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=s),r&&(r.next=s),I_?o.size++:t.size++,"F"!==i&&(o.index[i]=s)),t},A=function(t,e){var n,r=g(t),i=a_(e);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==e)return n};return n_(o,{clear:function(){for(var t=g(this),e=t.index,n=t.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete e[n.index],n=n.next;t.first=t.last=void 0,I_?t.size=0:this.size=0},delete:function(t){var e=this,n=g(e),r=A(e,t);if(r){var i=r.next,o=r.previous;delete n.index[r.index],r.removed=!0,o&&(o.next=i),i&&(i.previous=o),n.first==r&&(n.first=i),n.last==r&&(n.last=o),I_?n.size--:e.size--}return!!r},forEach:function(t){for(var e,n=g(this),r=r_(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:n.first;)for(r(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!A(this,t)}}),n_(o,n?{get:function(t){var e=A(this,t);return e&&e.value},set:function(t,e){return s(this,0===t?0:t,e)}}:{add:function(t){return s(this,t=0===t?0:t,t)}}),I_&&e_(o,"size",{configurable:!0,get:function(){return g(this).size}}),i},setStrong:function(t,e,n){var r=e+" Iterator",i=c_(e),o=c_(r);s_(t,e,(function(t,e){u_(this,{type:r,target:t,state:i(t),kind:e,last:void 0})}),(function(){for(var t=o(this),e=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?A_("keys"==e?n.key:"values"==e?n.value:[n.key,n.value],!1):(t.target=void 0,A_(void 0,!0))}),n?"entries":"values",!n,!0),C_(e)}};Yw("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),l_);var h_=Ft.Map;!function(t){t.exports=h_}(Um);var d_=L(Zm),f_=function(){function t(){Fu(this,t),this.clear(),this._defaultIndex=0,this._groupIndex=0,this._defaultGroups=[{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},{border:"#FFA500",background:"#FFFF00",highlight:{border:"#FFA500",background:"#FFFFA3"},hover:{border:"#FFA500",background:"#FFFFA3"}},{border:"#FA0A10",background:"#FB7E81",highlight:{border:"#FA0A10",background:"#FFAFB1"},hover:{border:"#FA0A10",background:"#FFAFB1"}},{border:"#41A906",background:"#7BE141",highlight:{border:"#41A906",background:"#A1EC76"},hover:{border:"#41A906",background:"#A1EC76"}},{border:"#E129F0",background:"#EB7DF4",highlight:{border:"#E129F0",background:"#F0B3F5"},hover:{border:"#E129F0",background:"#F0B3F5"}},{border:"#7C29F0",background:"#AD85E4",highlight:{border:"#7C29F0",background:"#D3BDF0"},hover:{border:"#7C29F0",background:"#D3BDF0"}},{border:"#C37F00",background:"#FFA807",highlight:{border:"#C37F00",background:"#FFCA66"},hover:{border:"#C37F00",background:"#FFCA66"}},{border:"#4220FB",background:"#6E6EFD",highlight:{border:"#4220FB",background:"#9B9BFD"},hover:{border:"#4220FB",background:"#9B9BFD"}},{border:"#FD5A77",background:"#FFC0CB",highlight:{border:"#FD5A77",background:"#FFD1D9"},hover:{border:"#FD5A77",background:"#FFD1D9"}},{border:"#4AD63A",background:"#C2FABC",highlight:{border:"#4AD63A",background:"#E6FFE3"},hover:{border:"#4AD63A",background:"#E6FFE3"}},{border:"#990000",background:"#EE0000",highlight:{border:"#BB0000",background:"#FF3333"},hover:{border:"#BB0000",background:"#FF3333"}},{border:"#FF6000",background:"#FF6000",highlight:{border:"#FF6000",background:"#FF6000"},hover:{border:"#FF6000",background:"#FF6000"}},{border:"#97C2FC",background:"#2B7CE9",highlight:{border:"#D2E5FF",background:"#2B7CE9"},hover:{border:"#D2E5FF",background:"#2B7CE9"}},{border:"#399605",background:"#255C03",highlight:{border:"#399605",background:"#255C03"},hover:{border:"#399605",background:"#255C03"}},{border:"#B70054",background:"#FF007E",highlight:{border:"#B70054",background:"#FF007E"},hover:{border:"#B70054",background:"#FF007E"}},{border:"#AD85E4",background:"#7C29F0",highlight:{border:"#D3BDF0",background:"#7C29F0"},hover:{border:"#D3BDF0",background:"#7C29F0"}},{border:"#4557FA",background:"#000EA1",highlight:{border:"#6E6EFD",background:"#000EA1"},hover:{border:"#6E6EFD",background:"#000EA1"}},{border:"#FFC0CB",background:"#FD5A77",highlight:{border:"#FFD1D9",background:"#FD5A77"},hover:{border:"#FFD1D9",background:"#FD5A77"}},{border:"#C2FABC",background:"#74D66A",highlight:{border:"#E6FFE3",background:"#74D66A"},hover:{border:"#E6FFE3",background:"#74D66A"}},{border:"#EE0000",background:"#990000",highlight:{border:"#FF3333",background:"#BB0000"},hover:{border:"#FF3333",background:"#BB0000"}}],this.options={},this.defaultOptions={useDefaultGroups:!0},ti(this.options,this.defaultOptions)}return il(t,[{key:"setOptions",value:function(t){var e=["useDefaultGroups"];if(void 0!==t)for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&-1===hp(e).call(e,n)){var r=t[n];this.add(n,r)}}},{key:"clear",value:function(){this._groups=new d_,this._groupNames=[]}},{key:"get",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this._groups.get(t);if(void 0===n&&e)if(!1===this.options.useDefaultGroups&&this._groupNames.length>0){var r=this._groupIndex%this._groupNames.length;++this._groupIndex,(n={}).color=this._groups.get(this._groupNames[r]),this._groups.set(t,n)}else{var i=this._defaultIndex%this._defaultGroups.length;this._defaultIndex++,(n={}).color=this._defaultGroups[i],this._groups.set(t,n)}return n}},{key:"add",value:function(t,e){return this._groups.has(t)||this._groupNames.push(t),this._groups.set(t,e),e}}]),t}(),p_={},v_={get exports(){return p_},set exports(t){p_=t}};Ir({target:"Number",stat:!0},{isNaN:function(t){return t!=t}});var y_=Ft.Number.isNaN;!function(t){t.exports=y_}(v_);var b_=L(p_),m_={},w_={get exports(){return m_},set exports(t){m_=t}},__=U.isFinite;Ir({target:"Number",stat:!0},{isFinite:Number.isFinite||function(t){return"number"==typeof t&&__(t)}});var x_=Ft.Number.isFinite;!function(t){t.exports=x_}(w_);var E_=L(m_),O_={},k_={get exports(){return O_},set exports(t){O_=t}},T_=ZC.some;Ir({target:"Array",proto:!0,forced:!jh("some")},{some:function(t){return T_(this,t,arguments.length>1?arguments[1]:void 0)}});var S_=fi("Array").some,P_=Wt,N_=S_,R_=Array.prototype,D_=function(t){var e=t.some;return t===R_||P_(R_,t)&&e===R_.some?N_:e};!function(t){t.exports=D_}(k_);var M_=L(O_);function j_(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var B_={},L_={get exports(){return B_},set exports(t){B_=t}},F_={},z_=Tp;!function(t){t.exports=z_}({get exports(){return F_},set exports(t){F_=t}}),function(t){t.exports=F_}(L_);var Z_=L(B_),U_={},V_={get exports(){return U_},set exports(t){U_=t}},G_={},W_={get exports(){return G_},set exports(t){G_=t}};Ir({target:"Object",stat:!0},{setPrototypeOf:Hg});var Y_=Ft.Object.setPrototypeOf;!function(t){t.exports=Y_}(W_),function(t){t.exports=G_}(V_);var H_=L(U_),K_={},Q_={get exports(){return K_},set exports(t){K_=t}},X_={},q_=mi;!function(t){t.exports=q_}({get exports(){return X_},set exports(t){X_=t}}),function(t){t.exports=X_}(Q_);var J_=L(K_);function $_(t,e){var n;return $_=H_?J_(n=H_).call(n):function(t,e){return t.__proto__=e,t},$_(t,e)}function tx(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Z_(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Gu(t,"prototype",{writable:!1}),e&&$_(t,e)}function ex(t,e){if(e&&("object"===Qc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return j_(t)}var nx={},rx={get exports(){return nx},set exports(t){nx=t}},ix={},ox=Cf;!function(t){t.exports=ox}({get exports(){return ix},set exports(t){ix=t}}),function(t){t.exports=ix}(rx);var gx=L(nx);function sx(t){var e;return sx=H_?J_(e=gx).call(e):function(t){return t.__proto__||gx(t)},sx(t)}var Ax={},Cx={get exports(){return Ax},set exports(t){Ax=t}},Ix={};!function(t){var e=Wu,n=Uc;function r(i){return t.exports=r="function"==typeof e&&"symbol"==typeof n?function(t){return typeof t}:function(t){return t&&"function"==typeof e&&t.constructor===e&&t!==e.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,r(i)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}({get exports(){return Ix},set exports(t){Ix=t}});var ax={},ux={get exports(){return ax},set exports(t){ax=t}},cx={},lx=Yh;!function(t){t.exports=lx}({get exports(){return cx},set exports(t){cx=t}}),function(t){t.exports=cx}(ux);var hx={},dx={get exports(){return hx},set exports(t){hx=t}},fx={},px={get exports(){return fx},set exports(t){fx=t}},vx=De,yx=Iu,bx=ut,mx=Rn,wx=Lt,_x=Jn,xx=Error,Ex=tt("".replace),Ox=String(xx("zxcasd").stack),kx=/\n\s*at [^:]*:[^\n]*/,Tx=kx.test(Ox),Sx=wt,Px=!V((function(){var t=Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",Sx(1,7)),7!==t.stack)})),Nx=Jn,Rx=Px,Dx=Error.captureStackTrace,Mx=Qi,jx=Ir,Bx=Wt,Lx=ug,Fx=Hg,zx=rg,Zx=Jn,Ux=wt,Vx=function(t,e,n,r){Rx&&(Dx?Dx(t,e):Nx(t,"stack",function(t,e){if(Tx&&"string"==typeof t&&!xx.prepareStackTrace)for(;e--;)t=Ex(t,kx,"");return t}(n,r)))},Gx=Ow,Wx=Ke("toStringTag"),Yx=Error,Hx=[].push,Kx=function(t,e){var n,r,i,o=Bx(Qx,this);Fx?n=Fx(Yx(),o?Lx(this):Qx):(n=o?this:zx(Qx),Zx(n,Wx,"Error")),void 0!==e&&Zx(n,"message",function(t,e){return void 0===t?arguments.length<2?"":e:Mx(t)}(e)),Vx(n,Kx,n.stack,1),arguments.length>2&&(r=n,wx(i=arguments[2])&&"cause"in i&&_x(r,"cause",i.cause));var g=[];return Gx(t,Hx,{that:g}),Zx(n,"errors",g),n};Fx?Fx(Kx,Yx):function(t,e,n){for(var r=yx(e),i=mx.f,o=bx.f,g=0;g=0;--r){var i=this.tryEntries[r],o=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var g=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(g&&s){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),M(n),w}},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;M(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:B(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),w}},u}t.exports=a,t.exports.__esModule=!0,t.exports.default=t.exports}(Cx);var ET=Ax(),OT=ET;try{regeneratorRuntime=ET}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=ET:Function("r","regeneratorRuntime = r")(ET)}var kT={},TT={get exports(){return kT},set exports(t){kT=t}},ST=le,PT=Pe,NT=kt,RT=br,DT=TypeError,MT=function(t){return function(e,n,r,i){ST(n);var o=PT(e),g=NT(o),s=RT(o),A=t?s-1:0,C=t?-1:1;if(r<2)for(;;){if(A in g){i=g[A],A+=C;break}if(A+=C,t?A<0:s<=A)throw DT("Reduce of empty array with no initial value")}for(;t?A>=0:s>A;A+=C)A in g&&(i=n(i,g[A],A,o));return i}},jT=[MT(!1),MT(!0)][0];Ir({target:"Array",proto:!0,forced:!tE&&$t>79&&$t<83||!jh("reduce")},{reduce:function(t){var e=arguments.length;return jT(this,t,e,e>1?arguments[1]:void 0)}});var BT=fi("Array").reduce,LT=Wt,FT=BT,zT=Array.prototype,ZT=function(t){var e=t.reduce;return t===zT||LT(zT,t)&&e===zT.reduce?FT:e};!function(t){t.exports=ZT}(TT);var UT=L(kT),VT={},GT={get exports(){return VT},set exports(t){VT=t}},WT=OC,YT=br,HT=Xu,KT=Nn,QT=function(t,e,n,r,i,o,g,s){for(var A,C,I=i,a=0,u=!!g&&KT(g,s);a0&&WT(A)?(C=YT(A),I=QT(t,e,A,C,I,o-1)-1):(HT(I+1),t[I]=A),I++),a++;return I},XT=QT,qT=le,JT=Pe,$T=br,tS=RC;Ir({target:"Array",proto:!0},{flatMap:function(t){var e,n=JT(this),r=$T(n);return qT(t),(e=tS(n,0)).length=XT(e,n,n,r,0,1,t,arguments.length>1?arguments[1]:void 0),e}});var eS=fi("Array").flatMap,nS=Wt,rS=eS,iS=Array.prototype,oS=function(t){var e=t.flatMap;return t===iS||nS(iS,t)&&e===iS.flatMap?rS:e};!function(t){t.exports=oS}(GT);var gS={},sS={get exports(){return gS},set exports(t){gS=t}};Yw("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),l_);var AS=Ft.Set;!function(t){t.exports=AS}(sS);var CS=L(gS),IS={};!function(t){t.exports=Yc}({get exports(){return IS},set exports(t){IS=t}});var aS=L(IS),uS={},cS={get exports(){return uS},set exports(t){uS=t}},lS={},hS=sA;!function(t){t.exports=hS}({get exports(){return lS},set exports(t){lS=t}}),function(t){t.exports=lS}(cS);var dS=L(uS),fS={},pS={get exports(){return fS},set exports(t){fS=t}},vS=gC,yS=Math.floor,bS=function(t,e){var n=t.length,r=yS(n/2);return n<8?mS(t,e):wS(t,bS(vS(t,0,r),e),bS(vS(t,r),e),e)},mS=function(t,e){for(var n,r,i=t.length,o=1;o0;)t[r]=t[--r];r!==o++&&(t[r]=n)}return t},wS=function(t,e,n,r){for(var i=e.length,o=n.length,g=0,s=0;g3)){if(ZS)return!0;if(VS)return VS<603;var t,e,n,r,i="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)GS.push({k:e+r,v:n})}for(GS.sort((function(t,e){return e.v-t.v})),r=0;rjS(n)?1:-1}}(t)),n=DS(i),r=0;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,g=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return g=t.done,t},e:function(t){s=!0,o=t},f:function(){try{g||null==n.return||n.return()}finally{if(s)throw o}}}}function IN(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);nthis.max&&this.flush(),null!=this._timeout&&(clearTimeout(this._timeout),this._timeout=null),this.queue.length>0&&"number"==typeof this.delay&&(this._timeout=ov((function(){t.flush()}),this.delay))}},{key:"flush",value:function(){var t,e;Hh(t=Dd(e=this._queue).call(e,0)).call(t,(function(t){t.fn.apply(t.context||t.fn,t.args||[])}))}}],[{key:"extend",value:function(e,n){var r=new t(n);if(void 0!==e.flush)throw new Error("Target object already has a property flush");e.flush=function(){r.flush()};var i=[{name:"flush",original:void 0}];if(n&&n.replace)for(var o=0;oi&&(i=A,r=s)}return r}},{key:"min",value:function(t){var e=dS(this._pairs),n=e.next();if(n.done)return null;for(var r=n.value[1],i=t(n.value[1],n.value[0]);!(n=e.next()).done;){var o=Wl(n.value,2),g=o[0],s=o[1],A=t(s,g);A1?n-1:0),i=1;ii?1:ri)&&(r=g,i=s)}}catch(t){o.e(t)}finally{o.f()}return r||null}},{key:"min",value:function(t){var e,n,r=null,i=null,o=CN(_P(e=this._data).call(e));try{for(o.s();!(n=o.n()).done;){var g=n.value,s=g[t];"number"==typeof s&&(null==i||se.x&&t.tope.y}function ZN(t){return"string"==typeof t&&""!==t}function UN(t,e,n,r){var i=r.x,o=r.y;if("function"==typeof r.distanceToBorder){var g=r.distanceToBorder(t,e),s=Math.sin(e)*g,A=Math.cos(e)*g;A===g?(i+=g,o=r.y):s===g?(i=r.x,o-=g):(i+=A,o-=s)}else r.shape.width>r.shape.height?(i=r.x+.5*r.shape.width,o=r.y-n):(i=r.x+n,o=r.y-.5*r.shape.height);return{x:i,y:o}}var VN=function(){function t(e){Fu(this,t),this.measureText=e,this.current=0,this.width=0,this.height=0,this.lines=[]}return il(t,[{key:"_add",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"normal";void 0===this.lines[t]&&(this.lines[t]={width:0,height:0,blocks:[]});var r=e;void 0!==e&&""!==e||(r=" ");var i=this.measureText(r,n),o=ti({},_P(i));o.text=e,o.width=i.width,o.mod=n,void 0!==e&&""!==e||(o.width=0),this.lines[t].blocks.push(o),this.lines[t].width+=o.width}},{key:"curWidth",value:function(){var t=this.lines[this.current];return void 0===t?0:t.width}},{key:"append",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"normal";this._add(this.current,t,e)}},{key:"newLine",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"normal";this._add(this.current,t,e),this.current++}},{key:"determineLineHeights",value:function(){for(var t=0;tt&&(t=r.width),e+=r.height}this.width=t,this.height=e}},{key:"removeEmptyBlocks",value:function(){for(var t=[],e=0;e"://,""://,""://,"":/<\/b>/,"":/<\/i>/,"":/<\/code>/,"*":/\*/,_:/_/,"`":/`/,afterBold:/[^*]/,afterItal:/[^_]/,afterMono:/[^`]/},WN=function(){function t(e){Fu(this,t),this.text=e,this.bold=!1,this.ital=!1,this.mono=!1,this.spacing=!1,this.position=0,this.buffer="",this.modStack=[],this.blocks=[]}return il(t,[{key:"mod",value:function(){return 0===this.modStack.length?"normal":this.modStack[0]}},{key:"modName",value:function(){return 0===this.modStack.length?"normal":"mono"===this.modStack[0]?"mono":this.bold&&this.ital?"boldital":this.bold?"bold":this.ital?"ital":void 0}},{key:"emitBlock",value:function(){this.spacing&&(this.add(" "),this.spacing=!1),this.buffer.length>0&&(this.blocks.push({text:this.buffer,mod:this.modName()}),this.buffer="")}},{key:"add",value:function(t){" "===t&&(this.spacing=!0),this.spacing&&(this.buffer+=" ",this.spacing=!1)," "!=t&&(this.buffer+=t)}},{key:"parseWS",value:function(t){return!!/[ \t]/.test(t)&&(this.mono?this.add(t):this.spacing=!0,!0)}},{key:"setTag",value:function(t){this.emitBlock(),this[t]=!0,this.modStack.unshift(t)}},{key:"unsetTag",value:function(t){this.emitBlock(),this[t]=!1,this.modStack.shift()}},{key:"parseStartTag",value:function(t,e){return!(this.mono||this[t]||!this.match(e)||(this.setTag(t),0))}},{key:"match",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=Wl(this.prepareRegExp(t),2),r=n[0],i=n[1],o=r.test(this.text.substr(this.position,i));return o&&e&&(this.position+=i-1),o}},{key:"parseEndTag",value:function(t,e,n){var r=this.mod()===t;return!(!(r="mono"===t?r&&this.mono:r&&!this.mono)||!this.match(e)||(void 0!==n?(this.position===this.text.length-1||this.match(n,!1))&&this.unsetTag(t):this.unsetTag(t),0))}},{key:"replace",value:function(t,e){return!!this.match(t)&&(this.add(e),this.position+=length-1,!0)}},{key:"prepareRegExp",value:function(t){var e,n;if(t instanceof RegExp)n=t,e=1;else{var r=GN[t];n=void 0!==r?r:new RegExp(t),e=t.length}return[n,e]}}]),t}(),YN=function(){function t(e,n,r,i){var o=this;Fu(this,t),this.ctx=e,this.parent=n,this.selected=r,this.hover=i,this.lines=new VN((function(t,n){if(void 0===t)return 0;var g=o.parent.getFormattingValues(e,r,i,n),s=0;return""!==t&&(s=o.ctx.measureText(t).width),{width:s,values:g}}))}return il(t,[{key:"process",value:function(t){if(!ZN(t))return this.lines.finalize();var e=this.parent.fontOptions;t=(t=t.replace(/\r\n/g,"\n")).replace(/\r/g,"\n");var n=String(t).split("\n"),r=n.length;if(e.multi)for(var i=0;i0)for(var g=0;g0)for(var u=0;u")||e.parseStartTag("ital","")||e.parseStartTag("mono","")||e.parseEndTag("bold","")||e.parseEndTag("ital","")||e.parseEndTag("mono",""))||n(r)||e.add(r),e.position++}return e.emitBlock(),e.blocks}},{key:"splitMarkdownBlocks",value:function(t){for(var e=this,n=new WN(t),r=!0,i=function(t){return!!/\\/.test(t)&&(n.positionthis.parent.fontOptions.maxWdt}},{key:"getLongestFit",value:function(t){for(var e="",n=0;n1&&void 0!==arguments[1]?arguments[1]:"normal",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.parent.getFormattingValues(this.ctx,this.selected,this.hover,e);for(var r=(t=(t=t.replace(/^( +)/g,"$1\r")).replace(/([^\r][^ ]*)( +)/g,"$1\r$2\r")).split("\r");r.length>0;){var i=this.getLongestFit(r);if(0===i){var o=r[0],g=this.getLongestFitWord(o);this.lines.newLine(ih(o).call(o,0,g),e),r[0]=ih(o).call(o,g)}else{var s=i;" "===r[i-1]?i--:" "===r[s]&&s++;var A=ih(r).call(r,0,i).join("");i==r.length&&n?this.lines.append(A,e):this.lines.newLine(A,e),r=ih(r).call(r,s)}}}}]),t}(),HN=["bold","ital","boldital","mono"],KN=function(){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];Fu(this,t),this.body=e,this.pointToSelf=!1,this.baseSize=void 0,this.fontOptions={},this.setOptions(n),this.size={top:0,left:0,width:0,height:0,yLine:0},this.isEdgeLabel=r}return il(t,[{key:"setOptions",value:function(t){if(this.elementOptions=t,this.initFontOptions(t.font),ZN(t.label)?this.labelDirty=!0:t.label=void 0,void 0!==t.font&&null!==t.font)if("string"==typeof t.font)this.baseSize=this.fontOptions.size;else if("object"===Qc(t.font)){var e=t.font.size;void 0!==e&&(this.baseSize=e)}}},{key:"initFontOptions",value:function(e){var n=this;Mb(HN,(function(t){n.fontOptions[t]={}})),t.parseFontString(this.fontOptions,e)?this.fontOptions.vadjust=0:Mb(e,(function(t,e){null!=t&&"object"!==Qc(t)&&(n.fontOptions[e]=t)}))}},{key:"constrain",value:function(t){var e={constrainWidth:!1,maxWdt:-1,minWdt:-1,constrainHeight:!1,minHgt:-1,valign:"middle"},n=Kb(t,"widthConstraint");if("number"==typeof n)e.maxWdt=Number(n),e.minWdt=Number(n);else if("object"===Qc(n)){var r=Kb(t,["widthConstraint","maximum"]);"number"==typeof r&&(e.maxWdt=Number(r));var i=Kb(t,["widthConstraint","minimum"]);"number"==typeof i&&(e.minWdt=Number(i))}var o=Kb(t,"heightConstraint");if("number"==typeof o)e.minHgt=Number(o);else if("object"===Qc(o)){var g=Kb(t,["heightConstraint","minimum"]);"number"==typeof g&&(e.minHgt=Number(g));var s=Kb(t,["heightConstraint","valign"]);"string"==typeof s&&("top"!==s&&"bottom"!==s||(e.valign=s))}return e}},{key:"update",value:function(t,e){this.setOptions(t,!0),this.propagateFonts(e),Nb(this.fontOptions,this.constrain(e)),this.fontOptions.chooser=FN("label",e)}},{key:"adjustSizes",value:function(t){var e=t?t.right+t.left:0;this.fontOptions.constrainWidth&&(this.fontOptions.maxWdt-=e,this.fontOptions.minWdt-=e);var n=t?t.top+t.bottom:0;this.fontOptions.constrainHeight&&(this.fontOptions.minHgt-=n)}},{key:"addFontOptionsToPile",value:function(t,e){for(var n=0;n5&&void 0!==arguments[5]?arguments[5]:"middle";if(void 0!==this.elementOptions.label){var g=this.fontOptions.size*this.body.view.scale;this.elementOptions.label&&g=this.elementOptions.scaling.label.maxVisible&&(g=Number(this.elementOptions.scaling.label.maxVisible)/this.body.view.scale),this.calculateLabelSize(t,r,i,e,n,o),this._drawBackground(t),this._drawText(t,e,this.size.yLine,o,g))}}},{key:"_drawBackground",value:function(t){if(void 0!==this.fontOptions.background&&"none"!==this.fontOptions.background){t.fillStyle=this.fontOptions.background;var e=this.getSize();t.fillRect(e.left,e.top,e.width,e.height)}}},{key:"_drawText",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"middle",i=arguments.length>4?arguments[4]:void 0,o=Wl(this._setAlignment(t,e,n,r),2);e=o[0],n=o[1],t.textAlign="left",e-=this.size.width/2,this.fontOptions.valign&&this.size.height>this.size.labelHeight&&("top"===this.fontOptions.valign&&(n-=(this.size.height-this.size.labelHeight)/2),"bottom"===this.fontOptions.valign&&(n+=(this.size.height-this.size.labelHeight)/2));for(var g=0;g0&&(t.lineWidth=I.strokeWidth,t.strokeStyle=c,t.lineJoin="round"),t.fillStyle=u,I.strokeWidth>0&&t.strokeText(I.text,e+A,n+I.vadjust),t.fillText(I.text,e+A,n+I.vadjust),A+=I.width}n+=s.height}}}},{key:"_setAlignment",value:function(t,e,n,r){return this.isEdgeLabel&&"horizontal"!==this.fontOptions.align&&!1===this.pointToSelf?(e=0,n=0,"top"===this.fontOptions.align?(t.textBaseline="alphabetic",n-=4):"bottom"===this.fontOptions.align?(t.textBaseline="hanging",n+=4):t.textBaseline="middle"):t.textBaseline=r,[e,n]}},{key:"_getColor",value:function(t,e,n){var r=t||"#000000",i=n||"#ffffff";if(e<=this.elementOptions.scaling.label.drawThreshold){var o=Math.max(0,Math.min(1,1-(this.elementOptions.scaling.label.drawThreshold-e)));r=Bb(r,o),i=Bb(i,o)}return[r,i]}},{key:"getTextSize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return this._processLabel(t,e,n),{width:this.size.width,height:this.size.height,lineCount:this.lineCount}}},{key:"getSize",value:function(){var t=this.size.left,e=this.size.top-1;if(this.isEdgeLabel){var n=.5*-this.size.width;switch(this.fontOptions.align){case"middle":t=n,e=.5*-this.size.height;break;case"top":t=n,e=-(this.size.height+2);break;case"bottom":t=n,e=2}}return{left:t,top:e,width:this.size.width,height:this.size.height}}},{key:"calculateLabelSize",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"middle";this._processLabel(t,e,n),this.size.left=r-.5*this.size.width,this.size.top=i-.5*this.size.height,this.size.yLine=i+.5*(1-this.lineCount)*this.fontOptions.size,"hanging"===o&&(this.size.top+=.5*this.fontOptions.size,this.size.top+=4,this.size.yLine+=4)}},{key:"getFormattingValues",value:function(t,e,n,r){var i=function(t,e,n){return"normal"===e?"mod"===n?"":t[n]:void 0!==t[e][n]?t[e][n]:t[n]},o={color:i(this.fontOptions,r,"color"),size:i(this.fontOptions,r,"size"),face:i(this.fontOptions,r,"face"),mod:i(this.fontOptions,r,"mod"),vadjust:i(this.fontOptions,r,"vadjust"),strokeWidth:this.fontOptions.strokeWidth,strokeColor:this.fontOptions.strokeColor};(e||n)&&("normal"===r&&!0===this.fontOptions.chooser&&this.elementOptions.labelHighlightBold?o.mod="bold":"function"==typeof this.fontOptions.chooser&&this.fontOptions.chooser(o,this.elementOptions.id,e,n));var g="";return void 0!==o.mod&&""!==o.mod&&(g+=o.mod+" "),g+=o.size+"px "+o.face,t.font=g.replace(/"/g,""),o.font=t.font,o.height=o.size,o}},{key:"differentState",value:function(t,e){return t!==this.selectedState||e!==this.hoverState}},{key:"_processLabelText",value:function(t,e,n,r){return new YN(t,this,e,n).process(r)}},{key:"_processLabel",value:function(t,e,n){if(!1!==this.labelDirty||this.differentState(e,n)){var r=this._processLabelText(t,e,n,this.elementOptions.label);this.fontOptions.minWdt>0&&r.width0&&r.height0&&(this.enableBorderDashes(t,e),t.stroke(),this.disableBorderDashes(t,e)),t.restore()}},{key:"performFill",value:function(t,e){t.save(),t.fillStyle=e.color,this.enableShadow(t,e),dv(t).call(t),this.disableShadow(t,e),t.restore(),this.performStroke(t,e)}},{key:"_addBoundingBoxMargin",value:function(t){this.boundingBox.left-=t,this.boundingBox.top-=t,this.boundingBox.bottom+=t,this.boundingBox.right+=t}},{key:"_updateBoundingBox",value:function(t,e,n,r,i){void 0!==n&&this.resize(n,r,i),this.left=t-this.width/2,this.top=e-this.height/2,this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width}},{key:"updateBoundingBox",value:function(t,e,n,r,i){this._updateBoundingBox(t,e,n,r,i)}},{key:"getDimensionsFromLabel",value:function(t,e,n){this.textSize=this.labelModule.getTextSize(t,e,n);var r=this.textSize.width,i=this.textSize.height;return 0===r&&(r=14,i=14),{width:r,height:i}}}]),t}();var XN=function(t){tx(i,t);var e,n,r=(e=i,n=function(){if("undefined"==typeof Reflect||!$P)return!1;if($P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($P(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=sx(e);if(n){var i=sx(this).constructor;t=$P(r,arguments,i)}else t=r.apply(this,arguments);return ex(this,t)});function i(t,e,n){var o;return Fu(this,i),(o=r.call(this,t,e,n))._setMargins(n),o}return il(i,[{key:"resize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.selected,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hover;if(this.needsRefresh(e,n)){var r=this.getDimensionsFromLabel(t,e,n);this.width=r.width+this.margin.right+this.margin.left,this.height=r.height+this.margin.top+this.margin.bottom,this.radius=this.width/2}}},{key:"draw",value:function(t,e,n,r,i,o){this.resize(t,r,i),this.left=e-this.width/2,this.top=n-this.height/2,this.initContextForDraw(t,o),xi(t,this.left,this.top,this.width,this.height,o.borderRadius),this.performFill(t,o),this.updateBoundingBox(e,n,t,r,i),this.labelModule.draw(t,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,r,i)}},{key:"updateBoundingBox",value:function(t,e,n,r,i){this._updateBoundingBox(t,e,n,r,i);var o=this.options.shapeProperties.borderRadius;this._addBoundingBoxMargin(o)}},{key:"distanceToBorder",value:function(t,e){t&&this.resize(t);var n=this.options.borderWidth;return Math.min(Math.abs(this.width/2/Math.cos(e)),Math.abs(this.height/2/Math.sin(e)))+n}}]),i}(QN);var qN=function(t){tx(i,t);var e,n,r=(e=i,n=function(){if("undefined"==typeof Reflect||!$P)return!1;if($P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($P(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=sx(e);if(n){var i=sx(this).constructor;t=$P(r,arguments,i)}else t=r.apply(this,arguments);return ex(this,t)});function i(t,e,n){var o;return Fu(this,i),(o=r.call(this,t,e,n)).labelOffset=0,o.selected=!1,o}return il(i,[{key:"setOptions",value:function(t,e,n){this.options=t,void 0===e&&void 0===n||this.setImages(e,n)}},{key:"setImages",value:function(t,e){e&&this.selected?(this.imageObj=e,this.imageObjAlt=t):(this.imageObj=t,this.imageObjAlt=e)}},{key:"switchImages",value:function(t){var e=t&&!this.selected||!t&&this.selected;if(this.selected=t,void 0!==this.imageObjAlt&&e){var n=this.imageObj;this.imageObj=this.imageObjAlt,this.imageObjAlt=n}}},{key:"_getImagePadding",value:function(){var t={top:0,right:0,bottom:0,left:0};if(this.options.imagePadding){var e=this.options.imagePadding;"object"==Qc(e)?(t.top=e.top,t.right=e.right,t.bottom=e.bottom,t.left=e.left):(t.top=e,t.right=e,t.bottom=e,t.left=e)}return t}},{key:"_resizeImage",value:function(){var t,e;if(!1===this.options.shapeProperties.useImageSize){var n=1,r=1;this.imageObj.width&&this.imageObj.height&&(this.imageObj.width>this.imageObj.height?n=this.imageObj.width/this.imageObj.height:r=this.imageObj.height/this.imageObj.width),t=2*this.options.size*n,e=2*this.options.size*r}else{var i=this._getImagePadding();t=this.imageObj.width+i.left+i.right,e=this.imageObj.height+i.top+i.bottom}this.width=t,this.height=e,this.radius=.5*this.width}},{key:"_drawRawCircle",value:function(t,e,n,r){this.initContextForDraw(t,r),_i(t,e,n,r.size),this.performFill(t,r)}},{key:"_drawImageAtPosition",value:function(t,e){if(0!=this.imageObj.width){t.globalAlpha=void 0!==e.opacity?e.opacity:1,this.enableShadow(t,e);var n=1;!0===this.options.shapeProperties.interpolation&&(n=this.imageObj.width/this.width/this.body.view.scale);var r=this._getImagePadding(),i=this.left+r.left,o=this.top+r.top,g=this.width-r.left-r.right,s=this.height-r.top-r.bottom;this.imageObj.drawImageAtPosition(t,n,i,o,g,s),this.disableShadow(t,e)}}},{key:"_drawImageLabel",value:function(t,e,n,r,i){var o=0;if(void 0!==this.height){o=.5*this.height;var g=this.labelModule.getTextSize(t,r,i);g.lineCount>=1&&(o+=g.height/2)}var s=n+o;this.options.label&&(this.labelOffset=o),this.labelModule.draw(t,e,s,r,i,"hanging")}}]),i}(QN);var JN=function(t){tx(i,t);var e,n,r=(e=i,n=function(){if("undefined"==typeof Reflect||!$P)return!1;if($P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($P(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=sx(e);if(n){var i=sx(this).constructor;t=$P(r,arguments,i)}else t=r.apply(this,arguments);return ex(this,t)});function i(t,e,n){var o;return Fu(this,i),(o=r.call(this,t,e,n))._setMargins(n),o}return il(i,[{key:"resize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.selected,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hover;if(this.needsRefresh(e,n)){var r=this.getDimensionsFromLabel(t,e,n),i=Math.max(r.width+this.margin.right+this.margin.left,r.height+this.margin.top+this.margin.bottom);this.options.size=i/2,this.width=i,this.height=i,this.radius=this.width/2}}},{key:"draw",value:function(t,e,n,r,i,o){this.resize(t,r,i),this.left=e-this.width/2,this.top=n-this.height/2,this._drawRawCircle(t,e,n,o),this.updateBoundingBox(e,n),this.labelModule.draw(t,this.left+this.textSize.width/2+this.margin.left,n,r,i)}},{key:"updateBoundingBox",value:function(t,e){this.boundingBox.top=e-this.options.size,this.boundingBox.left=t-this.options.size,this.boundingBox.right=t+this.options.size,this.boundingBox.bottom=e+this.options.size}},{key:"distanceToBorder",value:function(t){return t&&this.resize(t),.5*this.width}}]),i}(qN);var $N=function(t){tx(i,t);var e,n,r=(e=i,n=function(){if("undefined"==typeof Reflect||!$P)return!1;if($P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($P(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=sx(e);if(n){var i=sx(this).constructor;t=$P(r,arguments,i)}else t=r.apply(this,arguments);return ex(this,t)});function i(t,e,n,o,g){var s;return Fu(this,i),(s=r.call(this,t,e,n)).setImages(o,g),s}return il(i,[{key:"resize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.selected,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hover;if(void 0===this.imageObj.src||void 0===this.imageObj.width||void 0===this.imageObj.height){var r=2*this.options.size;return this.width=r,this.height=r,void(this.radius=.5*this.width)}this.needsRefresh(e,n)&&this._resizeImage()}},{key:"draw",value:function(t,e,n,r,i,o){this.switchImages(r),this.resize();var g=e,s=n;"top-left"===this.options.shapeProperties.coordinateOrigin?(this.left=e,this.top=n,g+=this.width/2,s+=this.height/2):(this.left=e-this.width/2,this.top=n-this.height/2),this._drawRawCircle(t,g,s,o),t.save(),t.clip(),this._drawImageAtPosition(t,o),t.restore(),this._drawImageLabel(t,g,s,r,i),this.updateBoundingBox(e,n)}},{key:"updateBoundingBox",value:function(t,e){"top-left"===this.options.shapeProperties.coordinateOrigin?(this.boundingBox.top=e,this.boundingBox.left=t,this.boundingBox.right=t+2*this.options.size,this.boundingBox.bottom=e+2*this.options.size):(this.boundingBox.top=e-this.options.size,this.boundingBox.left=t-this.options.size,this.boundingBox.right=t+this.options.size,this.boundingBox.bottom=e+this.options.size),this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset)}},{key:"distanceToBorder",value:function(t){return t&&this.resize(t),.5*this.width}}]),i}(qN);var tR=function(t){tx(i,t);var e,n,r=(e=i,n=function(){if("undefined"==typeof Reflect||!$P)return!1;if($P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($P(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=sx(e);if(n){var i=sx(this).constructor;t=$P(r,arguments,i)}else t=r.apply(this,arguments);return ex(this,t)});function i(t,e,n){return Fu(this,i),r.call(this,t,e,n)}return il(i,[{key:"resize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.selected,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hover,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{size:this.options.size};if(this.needsRefresh(e,n)){var i,o;this.labelModule.getTextSize(t,e,n);var g=2*r.size;this.width=null!==(i=this.customSizeWidth)&&void 0!==i?i:g,this.height=null!==(o=this.customSizeHeight)&&void 0!==o?o:g,this.radius=.5*this.width}}},{key:"_drawShape",value:function(t,e,n,r,i,o,g,s){var A,C=this;return this.resize(t,o,g,s),this.left=r-this.width/2,this.top=i-this.height/2,this.initContextForDraw(t,s),(A=e,Object.prototype.hasOwnProperty.call(Ti,A)?Ti[A]:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height))}}]),i}(QN);function eR(t,e){var n=xh(t);if(Va){var r=Va(t);e&&(r=vf(r).call(r,(function(e){return nu(t,e).enumerable}))),n.push.apply(n,r)}return n}function nR(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:this.selected,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hover;if(this.needsRefresh(e,n)){var r=this.getDimensionsFromLabel(t,e,n);this.height=2*r.height,this.width=r.width+r.height,this.radius=.5*this.width}}},{key:"draw",value:function(t,e,n,r,i,o){this.resize(t,r,i),this.left=e-.5*this.width,this.top=n-.5*this.height,this.initContextForDraw(t,o),Ei(t,this.left,this.top,this.width,this.height),this.performFill(t,o),this.updateBoundingBox(e,n,t,r,i),this.labelModule.draw(t,e,n,r,i)}},{key:"distanceToBorder",value:function(t,e){t&&this.resize(t);var n=.5*this.width,r=.5*this.height,i=Math.sin(e)*n,o=Math.cos(e)*r;return n*r/Math.sqrt(i*i+o*o)}}]),i}(QN);var AR=function(t){tx(i,t);var e,n,r=(e=i,n=function(){if("undefined"==typeof Reflect||!$P)return!1;if($P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($P(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=sx(e);if(n){var i=sx(this).constructor;t=$P(r,arguments,i)}else t=r.apply(this,arguments);return ex(this,t)});function i(t,e,n){var o;return Fu(this,i),(o=r.call(this,t,e,n))._setMargins(n),o}return il(i,[{key:"resize",value:function(t,e,n){this.needsRefresh(e,n)&&(this.iconSize={width:Number(this.options.icon.size),height:Number(this.options.icon.size)},this.width=this.iconSize.width+this.margin.right+this.margin.left,this.height=this.iconSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}},{key:"draw",value:function(t,e,n,r,i,o){var g=this;return this.resize(t,r,i),this.options.icon.size=this.options.icon.size||50,this.left=e-this.width/2,this.top=n-this.height/2,this._icon(t,e,n,r,i,o),{drawExternalLabel:function(){void 0!==g.options.label&&g.labelModule.draw(t,g.left+g.iconSize.width/2+g.margin.left,n+g.height/2+5,r),g.updateBoundingBox(e,n)}}}},{key:"updateBoundingBox",value:function(t,e){this.boundingBox.top=e-.5*this.options.icon.size,this.boundingBox.left=t-.5*this.options.icon.size,this.boundingBox.right=t+.5*this.options.icon.size,this.boundingBox.bottom=e+.5*this.options.icon.size,void 0!==this.options.label&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height+5))}},{key:"_icon",value:function(t,e,n,r,i,o){var g=Number(this.options.icon.size);void 0!==this.options.icon.code?(t.font=[null!=this.options.icon.weight?this.options.icon.weight:r?"bold":"",(null!=this.options.icon.weight&&r?5:0)+g+"px",this.options.icon.face].join(" "),t.fillStyle=this.options.icon.color||"black",t.textAlign="center",t.textBaseline="middle",this.enableShadow(t,o),t.fillText(this.options.icon.code,e,n),this.disableShadow(t,o)):console.error("When using the icon shape, you need to define the code in the icon options object. This can be done per node or globally.")}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),i}(QN);var CR=function(t){tx(i,t);var e,n,r=(e=i,n=function(){if("undefined"==typeof Reflect||!$P)return!1;if($P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($P(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=sx(e);if(n){var i=sx(this).constructor;t=$P(r,arguments,i)}else t=r.apply(this,arguments);return ex(this,t)});function i(t,e,n,o,g){var s;return Fu(this,i),(s=r.call(this,t,e,n)).setImages(o,g),s}return il(i,[{key:"resize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.selected,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hover;if(void 0===this.imageObj.src||void 0===this.imageObj.width||void 0===this.imageObj.height){var r=2*this.options.size;return this.width=r,void(this.height=r)}this.needsRefresh(e,n)&&this._resizeImage()}},{key:"draw",value:function(t,e,n,r,i,o){t.save(),this.switchImages(r),this.resize();var g=e,s=n;if("top-left"===this.options.shapeProperties.coordinateOrigin?(this.left=e,this.top=n,g+=this.width/2,s+=this.height/2):(this.left=e-this.width/2,this.top=n-this.height/2),!0===this.options.shapeProperties.useBorderWithImage){var A=this.options.borderWidth,C=this.options.borderWidthSelected||2*this.options.borderWidth,I=(r?C:A)/this.body.view.scale;t.lineWidth=Math.min(this.width,I),t.beginPath();var a=r?this.options.color.highlight.border:i?this.options.color.hover.border:this.options.color.border,u=r?this.options.color.highlight.background:i?this.options.color.hover.background:this.options.color.background;void 0!==o.opacity&&(a=Bb(a,o.opacity),u=Bb(u,o.opacity)),t.strokeStyle=a,t.fillStyle=u,t.rect(this.left-.5*t.lineWidth,this.top-.5*t.lineWidth,this.width+t.lineWidth,this.height+t.lineWidth),dv(t).call(t),this.performStroke(t,o),t.closePath()}this._drawImageAtPosition(t,o),this._drawImageLabel(t,g,s,r,i),this.updateBoundingBox(e,n),t.restore()}},{key:"updateBoundingBox",value:function(t,e){this.resize(),"top-left"===this.options.shapeProperties.coordinateOrigin?(this.left=t,this.top=e):(this.left=t-this.width/2,this.top=e-this.height/2),this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width,void 0!==this.options.label&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset))}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),i}(qN);var IR=function(t){tx(i,t);var e,n,r=(e=i,n=function(){if("undefined"==typeof Reflect||!$P)return!1;if($P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($P(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=sx(e);if(n){var i=sx(this).constructor;t=$P(r,arguments,i)}else t=r.apply(this,arguments);return ex(this,t)});function i(t,e,n){return Fu(this,i),r.call(this,t,e,n)}return il(i,[{key:"draw",value:function(t,e,n,r,i,o){return this._drawShape(t,"square",2,e,n,r,i,o)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),i}(tR);var aR=function(t){tx(i,t);var e,n,r=(e=i,n=function(){if("undefined"==typeof Reflect||!$P)return!1;if($P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($P(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=sx(e);if(n){var i=sx(this).constructor;t=$P(r,arguments,i)}else t=r.apply(this,arguments);return ex(this,t)});function i(t,e,n){return Fu(this,i),r.call(this,t,e,n)}return il(i,[{key:"draw",value:function(t,e,n,r,i,o){return this._drawShape(t,"hexagon",4,e,n,r,i,o)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),i}(tR);var uR=function(t){tx(i,t);var e,n,r=(e=i,n=function(){if("undefined"==typeof Reflect||!$P)return!1;if($P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($P(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=sx(e);if(n){var i=sx(this).constructor;t=$P(r,arguments,i)}else t=r.apply(this,arguments);return ex(this,t)});function i(t,e,n){return Fu(this,i),r.call(this,t,e,n)}return il(i,[{key:"draw",value:function(t,e,n,r,i,o){return this._drawShape(t,"star",4,e,n,r,i,o)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),i}(tR);var cR=function(t){tx(i,t);var e,n,r=(e=i,n=function(){if("undefined"==typeof Reflect||!$P)return!1;if($P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($P(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=sx(e);if(n){var i=sx(this).constructor;t=$P(r,arguments,i)}else t=r.apply(this,arguments);return ex(this,t)});function i(t,e,n){var o;return Fu(this,i),(o=r.call(this,t,e,n))._setMargins(n),o}return il(i,[{key:"resize",value:function(t,e,n){this.needsRefresh(e,n)&&(this.textSize=this.labelModule.getTextSize(t,e,n),this.width=this.textSize.width+this.margin.right+this.margin.left,this.height=this.textSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}},{key:"draw",value:function(t,e,n,r,i,o){this.resize(t,r,i),this.left=e-this.width/2,this.top=n-this.height/2,this.enableShadow(t,o),this.labelModule.draw(t,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,r,i),this.disableShadow(t,o),this.updateBoundingBox(e,n,t,r,i)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),i}(QN);var lR=function(t){tx(i,t);var e,n,r=(e=i,n=function(){if("undefined"==typeof Reflect||!$P)return!1;if($P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($P(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=sx(e);if(n){var i=sx(this).constructor;t=$P(r,arguments,i)}else t=r.apply(this,arguments);return ex(this,t)});function i(t,e,n){return Fu(this,i),r.call(this,t,e,n)}return il(i,[{key:"draw",value:function(t,e,n,r,i,o){return this._drawShape(t,"triangle",3,e,n,r,i,o)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),i}(tR);var hR=function(t){tx(i,t);var e,n,r=(e=i,n=function(){if("undefined"==typeof Reflect||!$P)return!1;if($P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($P(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=sx(e);if(n){var i=sx(this).constructor;t=$P(r,arguments,i)}else t=r.apply(this,arguments);return ex(this,t)});function i(t,e,n){return Fu(this,i),r.call(this,t,e,n)}return il(i,[{key:"draw",value:function(t,e,n,r,i,o){return this._drawShape(t,"triangleDown",3,e,n,r,i,o)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),i}(tR);function dR(t,e){var n=xh(t);if(Va){var r=Va(t);e&&(r=vf(r).call(r,(function(e){return nu(t,e).enumerable}))),n.push.apply(n,r)}return n}function fR(t){for(var e=1;et.left&&this.shape.topt.top}},{key:"isBoundingBoxOverlappingWith",value:function(t){return this.shape.boundingBox.leftt.left&&this.shape.boundingBox.topt.top}}],[{key:"checkOpacity",value:function(t){return 0<=t&&t<=1}},{key:"checkCoordinateOrigin",value:function(t){return void 0===t||"center"===t||"top-left"===t}},{key:"updateGroupOptions",value:function(e,n,r){var i;if(void 0!==r){var o=e.group;if(void 0!==n&&void 0!==n.group&&o!==n.group)throw new Error("updateGroupOptions: group values in options don't match.");if("number"==typeof o||"string"==typeof o&&""!=o){var g=r.get(o);void 0!==g.opacity&&void 0===n.opacity&&(t.checkOpacity(g.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+g.opacity),g.opacity=void 0));var s=vf(i=LN(n)).call(i,(function(t){return null!=n[t]}));s.push("font"),Pb(s,e,g),e.color=Fb(e.color)}}}},{key:"parseOptions",value:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4?arguments[4]:void 0;if(Pb(["color","fixed","shadow"],e,n,r),t.checkMass(n),void 0!==e.opacity&&(t.checkOpacity(e.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+e.opacity),e.opacity=void 0)),void 0!==n.opacity&&(t.checkOpacity(n.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+n.opacity),n.opacity=void 0)),n.shapeProperties&&!t.checkCoordinateOrigin(n.shapeProperties.coordinateOrigin)&&console.error("Invalid option for node coordinateOrigin, found: "+n.shapeProperties.coordinateOrigin),Yb(e,n,"shadow",i),void 0!==n.color&&null!==n.color){var g=Fb(n.color);Tb(e.color,g)}else!0===r&&null===n.color&&(e.color=Wb(i.color));void 0!==n.fixed&&null!==n.fixed&&("boolean"==typeof n.fixed?(e.fixed.x=n.fixed,e.fixed.y=n.fixed):(void 0!==n.fixed.x&&"boolean"==typeof n.fixed.x&&(e.fixed.x=n.fixed.x),void 0!==n.fixed.y&&"boolean"==typeof n.fixed.y&&(e.fixed.y=n.fixed.y))),!0===r&&null===n.font&&(e.font=Wb(i.font)),t.updateGroupOptions(e,n,o),void 0!==n.scaling&&Yb(e.scaling,n.scaling,"label",i.scaling)}},{key:"checkMass",value:function(t,e){if(void 0!==t.mass&&t.mass<=0){var n="";void 0!==e&&(n=" in node id: "+e),console.error("%cNegative or zero mass disallowed"+n+", setting mass to 1.",Am),t.mass=1}}}]),t}();function vR(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1?console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+t.opacity):this.options.opacity=t.opacity),void 0!==t.shape)for(var e in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,e)&&this.body.nodes[e].updateShape();if(void 0!==t.font||void 0!==t.widthConstraint||void 0!==t.heightConstraint)for(var n=0,r=xh(this.body.nodes);n1&&void 0!==arguments[1]&&arguments[1],n=this.body.data.nodes;if(dN("id",t))this.body.data.nodes=t;else if(Ih(t))this.body.data.nodes=new hN,this.body.data.nodes.add(t);else{if(t)throw new TypeError("Array or DataSet expected");this.body.data.nodes=new hN}if(n&&Mb(this.nodesListeners,(function(t,e){n.off(e,t)})),this.body.nodes={},this.body.data.nodes){var r=this;Mb(this.nodesListeners,(function(t,e){r.body.data.nodes.on(e,t)}));var i=this.body.data.nodes.getIds();this.add(i,!0)}!1===e&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(t){for(var e,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=[],i=0;i1&&void 0!==arguments[1]?arguments[1]:pR)(t,this.body,this.images,this.groups,this.options,this.defaultOptions)}},{key:"refresh",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Mb(this.body.nodes,(function(n,r){var i=t.body.data.nodes.get(r);void 0!==i&&(!0===e&&n.setOptions({x:null,y:null}),n.setOptions({fixed:!1}),n.setOptions(i))}))}},{key:"getPositions",value:function(t){var e={};if(void 0!==t){if(!0===Ih(t)){for(var n=0;n=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,g=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return g=t.done,t},e:function(t){s=!0,o=t},f:function(){try{g||null==n.return||n.return()}finally{if(s)throw o}}}}(n.get());try{for(r.s();!(t=r.n()).done;){var i=t.value,o=i.id,g=this.body.nodes[o],s=Math.round(g.x),A=Math.round(g.y);i.x===s&&i.y===A||e.push({id:o,x:s,y:A})}}catch(t){r.e(t)}finally{r.f()}n.update(e)}},{key:"getBoundingBox",value:function(t){if(void 0!==this.body.nodes[t])return this.body.nodes[t].shape.boundingBox}},{key:"getConnectedNodes",value:function(t,e){var n=[];if(void 0!==this.body.nodes[t])for(var r=this.body.nodes[t],i={},o=0;o0?(r=n/s)*r:n;return s===1/0?1/0:s*GR(i)}});var WR=Ft.Math.hypot;!function(t){t.exports=WR}(zR);var YR=L(FR);function HR(t){var e=function(){if("undefined"==typeof Reflect||!$P)return!1;if($P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($P(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=sx(t);if(e){var i=sx(this).constructor;n=$P(r,arguments,i)}else n=r.apply(this,arguments);return ex(this,n)}}var KR=function(){function t(){Fu(this,t)}return il(t,null,[{key:"transform",value:function(t,e){Ih(t)||(t=[t]);for(var n=e.point.x,r=e.point.y,i=e.angle,o=e.length,g=0;g4&&void 0!==arguments[4]?arguments[4]:this.getViaNode();t.strokeStyle=this.getColor(t,e),t.lineWidth=e.width,!1!==e.dashes?this._drawDashedLine(t,e,i):this._drawLine(t,e,i)}},{key:"_drawLine",value:function(t,e,n,r,i){if(this.from!=this.to)this._line(t,e,n,r,i);else{var o=Wl(this._getCircleData(t),3),g=o[0],s=o[1],A=o[2];this._circle(t,e,g,s,A)}}},{key:"_drawDashedLine",value:function(t,e,n,r,i){t.lineCap="round";var o=Ih(e.dashes)?e.dashes:[5,5];if(void 0!==t.setLineDash){if(t.save(),t.setLineDash(o),t.lineDashOffset=0,this.from!=this.to)this._line(t,e,n);else{var g=Wl(this._getCircleData(t),3),s=g[0],A=g[1],C=g[2];this._circle(t,e,s,A,C)}t.setLineDash([0]),t.lineDashOffset=0,t.restore()}else{if(this.from!=this.to)ki(t,this.from.x,this.from.y,this.to.x,this.to.y,o);else{var I=Wl(this._getCircleData(t),3),a=I[0],u=I[1],c=I[2];this._circle(t,e,a,u,c)}this.enableShadow(t,e),t.stroke(),this.disableShadow(t,e)}}},{key:"findBorderPosition",value:function(t,e,n){return this.from!=this.to?this._findBorderPosition(t,e,n):this._findBorderPositionCircle(t,e,n)}},{key:"findBorderPositions",value:function(t){if(this.from!=this.to)return{from:this._findBorderPosition(this.from,t),to:this._findBorderPosition(this.to,t)};var e,n=Wl(ih(e=this._getCircleData(t)).call(e,0,2),2),r=n[0],i=n[1];return{from:this._findBorderPositionCircle(this.from,t,{x:r,y:i,low:.25,high:.6,direction:-1}),to:this._findBorderPositionCircle(this.from,t,{x:r,y:i,low:.6,high:.8,direction:1})}}},{key:"_getCircleData",value:function(t){var e=this.options.selfReference.size;void 0!==t&&void 0===this.from.shape.width&&this.from.shape.resize(t);var n=UN(t,this.options.selfReference.angle,e,this.from);return[n.x,n.y,e]}},{key:"_pointOnCircle",value:function(t,e,n,r){var i=2*r*Math.PI;return{x:t+n*Math.cos(i),y:e-n*Math.sin(i)}}},{key:"_findBorderPositionCircle",value:function(t,e,n){var r,i=n.x,o=n.y,g=n.low,s=n.high,A=n.direction,C=this.options.selfReference.size,I=.5*(g+s),a=0;!0===this.options.arrowStrikethrough&&(-1===A?a=this.options.endPointOffset.from:1===A&&(a=this.options.endPointOffset.to));var u=0;do{I=.5*(g+s),r=this._pointOnCircle(i,o,C,I);var c=Math.atan2(t.y-r.y,t.x-r.x),l=t.distanceToBorder(e,c)+a-Math.sqrt(Math.pow(r.x-t.x,2)+Math.pow(r.y-t.y,2));if(Math.abs(l)<.05)break;l>0?A>0?g=I:s=I:A>0?s=I:g=I,++u}while(g<=s&&u<10);return CD(CD({},r),{},{t:I})}},{key:"getLineWidth",value:function(t,e){return!0===t?Math.max(this.selectionWidth,.3/this._body.view.scale):!0===e?Math.max(this.hoverWidth,.3/this._body.view.scale):Math.max(this.options.width,.3/this._body.view.scale)}},{key:"getColor",value:function(t,e){if(!1!==e.inheritsColor){if("both"===e.inheritsColor&&this.from.id!==this.to.id){var n=t.createLinearGradient(this.from.x,this.from.y,this.to.x,this.to.y),r=this.from.options.color.highlight.border,i=this.to.options.color.highlight.border;return!1===this.from.selected&&!1===this.to.selected?(r=Bb(this.from.options.color.border,e.opacity),i=Bb(this.to.options.color.border,e.opacity)):!0===this.from.selected&&!1===this.to.selected?i=this.to.options.color.border:!1===this.from.selected&&!0===this.to.selected&&(r=this.from.options.color.border),n.addColorStop(0,r),n.addColorStop(1,i),n}return"to"===e.inheritsColor?Bb(this.to.options.color.border,e.opacity):Bb(this.from.options.color.border,e.opacity)}return Bb(e.color,e.opacity)}},{key:"_circle",value:function(t,e,n,r,i){this.enableShadow(t,e);var o=0,g=2*Math.PI;if(!this.options.selfReference.renderBehindTheNode){var s=this.options.selfReference.angle,A=this.options.selfReference.angle+Math.PI,C=this._findBorderPositionCircle(this.from,t,{x:n,y:r,low:s,high:A,direction:-1}),I=this._findBorderPositionCircle(this.from,t,{x:n,y:r,low:s,high:A,direction:1});o=Math.atan2(C.y-r,C.x-n),g=Math.atan2(I.y-r,I.x-n)}t.beginPath(),t.arc(n,r,i,o,g,!1),t.stroke(),this.disableShadow(t,e)}},{key:"getDistanceToEdge",value:function(t,e,n,r,i,o){if(this.from!=this.to)return this._getDistanceToEdge(t,e,n,r,i,o);var g=Wl(this._getCircleData(void 0),3),s=g[0],A=g[1],C=g[2],I=s-i,a=A-o;return Math.abs(Math.sqrt(I*I+a*a)-C)}},{key:"_getDistanceToLine",value:function(t,e,n,r,i,o){var g=n-t,s=r-e,A=((i-t)*g+(o-e)*s)/(g*g+s*s);A>1?A=1:A<0&&(A=0);var C=t+A*g-i,I=e+A*s-o;return Math.sqrt(C*C+I*I)}},{key:"getArrowData",value:function(t,e,n,r,i,o){var g,s,A,C,I,a,u,c=o.width;"from"===e?(A=this.from,C=this.to,I=o.fromArrowScale<0,a=Math.abs(o.fromArrowScale),u=o.fromArrowType):"to"===e?(A=this.to,C=this.from,I=o.toArrowScale<0,a=Math.abs(o.toArrowScale),u=o.toArrowType):(A=this.to,C=this.from,I=o.middleArrowScale<0,a=Math.abs(o.middleArrowScale),u=o.middleArrowType);var l=15*a+3*c;if(A!=C){var h=l/YR(A.x-C.x,A.y-C.y);if("middle"!==e)if(!0===this.options.smooth.enabled){var d=this._findBorderPosition(A,t,{via:n}),f=this.getPoint(d.t+h*("from"===e?1:-1),n);g=Math.atan2(d.y-f.y,d.x-f.x),s=d}else g=Math.atan2(A.y-C.y,A.x-C.x),s=this._findBorderPosition(A,t);else{var p=(I?-h:h)/2,v=this.getPoint(.5+p,n),y=this.getPoint(.5-p,n);g=Math.atan2(v.y-y.y,v.x-y.x),s=this.getPoint(.5,n)}}else{var b=Wl(this._getCircleData(t),3),m=b[0],w=b[1],_=b[2];if("from"===e){var x=this.options.selfReference.angle,E=this.options.selfReference.angle+Math.PI,O=this._findBorderPositionCircle(this.from,t,{x:m,y:w,low:x,high:E,direction:-1});g=-2*O.t*Math.PI+1.5*Math.PI+.1*Math.PI,s=O}else if("to"===e){var k=this.options.selfReference.angle,T=this.options.selfReference.angle+Math.PI,S=this._findBorderPositionCircle(this.from,t,{x:m,y:w,low:k,high:T,direction:1});g=-2*S.t*Math.PI+1.5*Math.PI-1.1*Math.PI,s=S}else{var P=this.options.selfReference.angle/(2*Math.PI);s=this._pointOnCircle(m,w,_,P),g=-2*P*Math.PI+1.5*Math.PI+.1*Math.PI}}return{point:s,core:{x:s.x-.9*l*Math.cos(g),y:s.y-.9*l*Math.sin(g)},angle:g,length:l,type:u}}},{key:"drawArrowHead",value:function(t,e,n,r,i){t.strokeStyle=this.getColor(t,e),t.fillStyle=t.strokeStyle,t.lineWidth=e.width,sD.draw(t,i)&&(this.enableShadow(t,e),dv(t).call(t),this.disableShadow(t,e))}},{key:"enableShadow",value:function(t,e){!0===e.shadow&&(t.shadowColor=e.shadowColor,t.shadowBlur=e.shadowSize,t.shadowOffsetX=e.shadowX,t.shadowOffsetY=e.shadowY)}},{key:"disableShadow",value:function(t,e){!0===e.shadow&&(t.shadowColor="rgba(0,0,0,0)",t.shadowBlur=0,t.shadowOffsetX=0,t.shadowOffsetY=0)}},{key:"drawBackground",value:function(t,e){if(!1!==e.background){var n={strokeStyle:t.strokeStyle,lineWidth:t.lineWidth,dashes:t.dashes};t.strokeStyle=e.backgroundColor,t.lineWidth=e.backgroundSize,this.setStrokeDashed(t,e.backgroundDashes),t.stroke(),t.strokeStyle=n.strokeStyle,t.lineWidth=n.lineWidth,t.dashes=n.dashes,this.setStrokeDashed(t,e.dashes)}}},{key:"setStrokeDashed",value:function(t,e){if(!1!==e)if(void 0!==t.setLineDash){var n=Ih(e)?e:[5,5];t.setLineDash(n)}else console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.");else void 0!==t.setLineDash?t.setLineDash([]):console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.")}}]),t}();function aD(t,e){var n=xh(t);if(Va){var r=Va(t);e&&(r=vf(r).call(r,(function(e){return nu(t,e).enumerable}))),n.push.apply(n,r)}return n}function uD(t){for(var e=1;e2&&void 0!==arguments[2]?arguments[2]:this._getViaCoordinates(),o=!1,g=1,s=0,A=this.to,C=this.options.endPointOffset?this.options.endPointOffset.to:0;t.id===this.from.id&&(A=this.from,o=!0,C=this.options.endPointOffset?this.options.endPointOffset.from:0),!1===this.options.arrowStrikethrough&&(C=0);var I=0;do{r=.5*(s+g),n=this.getPoint(r,i);var a=Math.atan2(A.y-n.y,A.x-n.x),u=A.distanceToBorder(e,a)+C-Math.sqrt(Math.pow(n.x-A.x,2)+Math.pow(n.y-A.y,2));if(Math.abs(u)<.2)break;u<0?!1===o?s=r:g=r:!1===o?g=r:s=r,++I}while(s<=g&&I<10);return uD(uD({},n),{},{t:r})}},{key:"_getDistanceToBezierEdge",value:function(t,e,n,r,i,o,g){var s,A,C,I,a,u=1e9,c=t,l=e;for(A=1;A<10;A++)C=.1*A,I=Math.pow(1-C,2)*t+2*C*(1-C)*g.x+Math.pow(C,2)*n,a=Math.pow(1-C,2)*e+2*C*(1-C)*g.y+Math.pow(C,2)*r,A>0&&(u=(s=this._getDistanceToLine(c,l,I,a,i,o))1&&void 0!==arguments[1]?arguments[1]:this.via;if(this.from===this.to){var n=Wl(this._getCircleData(),3),r=n[0],i=n[1],o=n[2],g=2*Math.PI*(1-t);return{x:r+o*Math.sin(g),y:i+o-o*(1-Math.cos(g))}}return{x:Math.pow(1-t,2)*this.fromPoint.x+2*t*(1-t)*e.x+Math.pow(t,2)*this.toPoint.x,y:Math.pow(1-t,2)*this.fromPoint.y+2*t*(1-t)*e.y+Math.pow(t,2)*this.toPoint.y}}},{key:"_findBorderPosition",value:function(t,e){return this._findBorderPositionBezier(t,e,this.via)}},{key:"_getDistanceToEdge",value:function(t,e,n,r,i,o){return this._getDistanceToBezierEdge(t,e,n,r,i,o,this.via)}}]),i}(cD);var hD=function(t){tx(i,t);var e,n,r=(e=i,n=function(){if("undefined"==typeof Reflect||!$P)return!1;if($P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($P(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=sx(e);if(n){var i=sx(this).constructor;t=$P(r,arguments,i)}else t=r.apply(this,arguments);return ex(this,t)});function i(t,e,n){return Fu(this,i),r.call(this,t,e,n)}return il(i,[{key:"_line",value:function(t,e,n){this._bezierCurve(t,e,n)}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_getViaCoordinates",value:function(){var t,e,n=this.options.smooth.roundness,r=this.options.smooth.type,i=Math.abs(this.from.x-this.to.x),o=Math.abs(this.from.y-this.to.y);if("discrete"===r||"diagonalCross"===r){var g,s;g=s=i<=o?n*o:n*i,this.from.x>this.to.x&&(g=-g),this.from.y>=this.to.y&&(s=-s);var A=this.from.x+g,C=this.from.y+s;return"discrete"===r&&(i<=o?A=ithis.to.x&&(t=-t),this.from.y>=this.to.y&&(e=-e);var y=this.from.x+t,b=this.from.y+e;return i<=o?y=this.from.x<=this.to.x?this.to.xy?this.to.x:y:b=this.from.y>=this.to.y?this.to.y>b?this.to.y:b:this.to.y2&&void 0!==arguments[2]?arguments[2]:{};return this._findBorderPositionBezier(t,e,n.via)}},{key:"_getDistanceToEdge",value:function(t,e,n,r,i,o){var g=arguments.length>6&&void 0!==arguments[6]?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge(t,e,n,r,i,o,g)}},{key:"getPoint",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._getViaCoordinates(),n=t;return{x:Math.pow(1-n,2)*this.fromPoint.x+2*n*(1-n)*e.x+Math.pow(n,2)*this.toPoint.x,y:Math.pow(1-n,2)*this.fromPoint.y+2*n*(1-n)*e.y+Math.pow(n,2)*this.toPoint.y}}}]),i}(cD);var dD=function(t){tx(i,t);var e,n,r=(e=i,n=function(){if("undefined"==typeof Reflect||!$P)return!1;if($P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($P(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=sx(e);if(n){var i=sx(this).constructor;t=$P(r,arguments,i)}else t=r.apply(this,arguments);return ex(this,t)});function i(t,e,n){return Fu(this,i),r.call(this,t,e,n)}return il(i,[{key:"_getDistanceToBezierEdge2",value:function(t,e,n,r,i,o,g,s){for(var A=1e9,C=t,I=e,a=[0,0,0,0],u=1;u<10;u++){var c=.1*u;a[0]=Math.pow(1-c,3),a[1]=3*c*Math.pow(1-c,2),a[2]=3*Math.pow(c,2)*(1-c),a[3]=Math.pow(c,3);var l=a[0]*t+a[1]*g.x+a[2]*s.x+a[3]*n,h=a[0]*e+a[1]*g.y+a[2]*s.y+a[3]*r;if(u>0){var d=this._getDistanceToLine(C,I,l,h,i,o);A=dMath.abs(o)||!0===this.options.smooth.forceDirection||"horizontal"===this.options.smooth.forceDirection)&&"vertical"!==this.options.smooth.forceDirection?(e=this.from.y,r=this.to.y,t=this.from.x-g*i,n=this.to.x+g*i):(e=this.from.y-g*o,r=this.to.y+g*o,t=this.from.x,n=this.to.x),[{x:t,y:e},{x:n,y:r}]}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_findBorderPosition",value:function(t,e){return this._findBorderPositionBezier(t,e)}},{key:"_getDistanceToEdge",value:function(t,e,n,r,i,o){var g=Wl(arguments.length>6&&void 0!==arguments[6]?arguments[6]:this._getViaCoordinates(),2),s=g[0],A=g[1];return this._getDistanceToBezierEdge2(t,e,n,r,i,o,s,A)}},{key:"getPoint",value:function(t){var e=Wl(arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._getViaCoordinates(),2),n=e[0],r=e[1],i=t,o=[Math.pow(1-i,3),3*i*Math.pow(1-i,2),3*Math.pow(i,2)*(1-i),Math.pow(i,3)];return{x:o[0]*this.fromPoint.x+o[1]*n.x+o[2]*r.x+o[3]*this.toPoint.x,y:o[0]*this.fromPoint.y+o[1]*n.y+o[2]*r.y+o[3]*this.toPoint.y}}}]),i}(dD);var pD=function(t){tx(i,t);var e,n,r=(e=i,n=function(){if("undefined"==typeof Reflect||!$P)return!1;if($P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($P(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=sx(e);if(n){var i=sx(this).constructor;t=$P(r,arguments,i)}else t=r.apply(this,arguments);return ex(this,t)});function i(t,e,n){return Fu(this,i),r.call(this,t,e,n)}return il(i,[{key:"_line",value:function(t,e){t.beginPath(),t.moveTo(this.fromPoint.x,this.fromPoint.y),t.lineTo(this.toPoint.x,this.toPoint.y),this.enableShadow(t,e),t.stroke(),this.disableShadow(t,e)}},{key:"getViaNode",value:function(){}},{key:"getPoint",value:function(t){return{x:(1-t)*this.fromPoint.x+t*this.toPoint.x,y:(1-t)*this.fromPoint.y+t*this.toPoint.y}}},{key:"_findBorderPosition",value:function(t,e){var n=this.to,r=this.from;t.id===this.from.id&&(n=this.from,r=this.to);var i=Math.atan2(n.y-r.y,n.x-r.x),o=n.x-r.x,g=n.y-r.y,s=Math.sqrt(o*o+g*g),A=(s-t.distanceToBorder(e,i))/s;return{x:(1-A)*r.x+A*n.x,y:(1-A)*r.y+A*n.y,t:0}}},{key:"_getDistanceToEdge",value:function(t,e,n,r,i,o){return this._getDistanceToLine(t,e,n,r,i,o)}}]),i}(ID),vD=function(){function t(e,n,r,i,o){if(Fu(this,t),void 0===n)throw new Error("No body provided");this.options=Wb(i),this.globalOptions=i,this.defaultOptions=o,this.body=n,this.imagelist=r,this.id=void 0,this.fromId=void 0,this.toId=void 0,this.selected=!1,this.hover=!1,this.labelDirty=!0,this.baseWidth=this.options.width,this.baseFontSize=this.options.font.size,this.from=void 0,this.to=void 0,this.edgeType=void 0,this.connected=!1,this.labelModule=new KN(this.body,this.options,!0),this.setOptions(e)}return il(t,[{key:"setOptions",value:function(e){if(e){var n=void 0!==e.physics&&this.options.physics!==e.physics||void 0!==e.hidden&&(this.options.hidden||!1)!==(e.hidden||!1)||void 0!==e.from&&this.options.from!==e.from||void 0!==e.to&&this.options.to!==e.to;t.parseOptions(this.options,e,!0,this.globalOptions),void 0!==e.id&&(this.id=e.id),void 0!==e.from&&(this.fromId=e.from),void 0!==e.to&&(this.toId=e.to),void 0!==e.title&&(this.title=e.title),void 0!==e.value&&(e.value=SN(e.value));var r=[e,this.options,this.defaultOptions];return this.chooser=FN("edge",r),this.updateLabelModule(e),n=this.updateEdgeType()||n,this._setInteractionWidths(),this.connect(),n}}},{key:"getFormattingValues",value:function(){var t=!0===this.options.arrows.to||!0===this.options.arrows.to.enabled,e=!0===this.options.arrows.from||!0===this.options.arrows.from.enabled,n=!0===this.options.arrows.middle||!0===this.options.arrows.middle.enabled,r=this.options.color.inherit,i={toArrow:t,toArrowScale:this.options.arrows.to.scaleFactor,toArrowType:this.options.arrows.to.type,toArrowSrc:this.options.arrows.to.src,toArrowImageWidth:this.options.arrows.to.imageWidth,toArrowImageHeight:this.options.arrows.to.imageHeight,middleArrow:n,middleArrowScale:this.options.arrows.middle.scaleFactor,middleArrowType:this.options.arrows.middle.type,middleArrowSrc:this.options.arrows.middle.src,middleArrowImageWidth:this.options.arrows.middle.imageWidth,middleArrowImageHeight:this.options.arrows.middle.imageHeight,fromArrow:e,fromArrowScale:this.options.arrows.from.scaleFactor,fromArrowType:this.options.arrows.from.type,fromArrowSrc:this.options.arrows.from.src,fromArrowImageWidth:this.options.arrows.from.imageWidth,fromArrowImageHeight:this.options.arrows.from.imageHeight,arrowStrikethrough:this.options.arrowStrikethrough,color:r?void 0:this.options.color.color,inheritsColor:r,opacity:this.options.color.opacity,hidden:this.options.hidden,length:this.options.length,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y,dashes:this.options.dashes,width:this.options.width,background:this.options.background.enabled,backgroundColor:this.options.background.color,backgroundSize:this.options.background.size,backgroundDashes:this.options.background.dashes};if(this.selected||this.hover)if(!0===this.chooser){if(this.selected){var o=this.options.selectionWidth;"function"==typeof o?i.width=o(i.width):"number"==typeof o&&(i.width+=o),i.width=Math.max(i.width,.3/this.body.view.scale),i.color=this.options.color.highlight,i.shadow=this.options.shadow.enabled}else if(this.hover){var g=this.options.hoverWidth;"function"==typeof g?i.width=g(i.width):"number"==typeof g&&(i.width+=g),i.width=Math.max(i.width,.3/this.body.view.scale),i.color=this.options.color.hover,i.shadow=this.options.shadow.enabled}}else"function"==typeof this.chooser&&(this.chooser(i,this.options.id,this.selected,this.hover),void 0!==i.color&&(i.inheritsColor=!1),!1===i.shadow&&(i.shadowColor===this.options.shadow.color&&i.shadowSize===this.options.shadow.size&&i.shadowX===this.options.shadow.x&&i.shadowY===this.options.shadow.y||(i.shadow=!0)));else i.shadow=this.options.shadow.enabled,i.width=Math.max(i.width,.3/this.body.view.scale);return i}},{key:"updateLabelModule",value:function(t){var e=[t,this.options,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,e),void 0!==this.labelModule.baseSize&&(this.baseFontSize=this.labelModule.baseSize)}},{key:"updateEdgeType",value:function(){var t=this.options.smooth,e=!1,n=!0;return void 0!==this.edgeType&&((this.edgeType instanceof lD&&!0===t.enabled&&"dynamic"===t.type||this.edgeType instanceof fD&&!0===t.enabled&&"cubicBezier"===t.type||this.edgeType instanceof hD&&!0===t.enabled&&"dynamic"!==t.type&&"cubicBezier"!==t.type||this.edgeType instanceof pD&&!1===t.type.enabled)&&(n=!1),!0===n&&(e=this.cleanup())),!0===n?!0===t.enabled?"dynamic"===t.type?(e=!0,this.edgeType=new lD(this.options,this.body,this.labelModule)):"cubicBezier"===t.type?this.edgeType=new fD(this.options,this.body,this.labelModule):this.edgeType=new hD(this.options,this.body,this.labelModule):this.edgeType=new pD(this.options,this.body,this.labelModule):this.edgeType.setOptions(this.options),e}},{key:"connect",value:function(){this.disconnect(),this.from=this.body.nodes[this.fromId]||void 0,this.to=this.body.nodes[this.toId]||void 0,this.connected=void 0!==this.from&&void 0!==this.to,!0===this.connected?(this.from.attachEdge(this),this.to.attachEdge(this)):(this.from&&this.from.detachEdge(this),this.to&&this.to.detachEdge(this)),this.edgeType.connect()}},{key:"disconnect",value:function(){this.from&&(this.from.detachEdge(this),this.from=void 0),this.to&&(this.to.detachEdge(this),this.to=void 0),this.connected=!1}},{key:"getTitle",value:function(){return this.title}},{key:"isSelected",value:function(){return this.selected}},{key:"getValue",value:function(){return this.options.value}},{key:"setValueRange",value:function(t,e,n){if(void 0!==this.options.value){var r=this.options.scaling.customScalingFunction(t,e,n,this.options.value),i=this.options.scaling.max-this.options.scaling.min;if(!0===this.options.scaling.label.enabled){var o=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+r*o}this.options.width=this.options.scaling.min+r*i}else this.options.width=this.baseWidth,this.options.font.size=this.baseFontSize;this._setInteractionWidths(),this.updateLabelModule()}},{key:"_setInteractionWidths",value:function(){"function"==typeof this.options.hoverWidth?this.edgeType.hoverWidth=this.options.hoverWidth(this.options.width):this.edgeType.hoverWidth=this.options.hoverWidth+this.options.width,"function"==typeof this.options.selectionWidth?this.edgeType.selectionWidth=this.options.selectionWidth(this.options.width):this.edgeType.selectionWidth=this.options.selectionWidth+this.options.width}},{key:"draw",value:function(t){var e=this.getFormattingValues();if(!e.hidden){var n=this.edgeType.getViaNode();this.edgeType.drawLine(t,e,this.selected,this.hover,n),this.drawLabel(t,n)}}},{key:"drawArrows",value:function(t){var e=this.getFormattingValues();if(!e.hidden){var n=this.edgeType.getViaNode(),r={};this.edgeType.fromPoint=this.edgeType.from,this.edgeType.toPoint=this.edgeType.to,e.fromArrow&&(r.from=this.edgeType.getArrowData(t,"from",n,this.selected,this.hover,e),!1===e.arrowStrikethrough&&(this.edgeType.fromPoint=r.from.core),e.fromArrowSrc&&(r.from.image=this.imagelist.load(e.fromArrowSrc)),e.fromArrowImageWidth&&(r.from.imageWidth=e.fromArrowImageWidth),e.fromArrowImageHeight&&(r.from.imageHeight=e.fromArrowImageHeight)),e.toArrow&&(r.to=this.edgeType.getArrowData(t,"to",n,this.selected,this.hover,e),!1===e.arrowStrikethrough&&(this.edgeType.toPoint=r.to.core),e.toArrowSrc&&(r.to.image=this.imagelist.load(e.toArrowSrc)),e.toArrowImageWidth&&(r.to.imageWidth=e.toArrowImageWidth),e.toArrowImageHeight&&(r.to.imageHeight=e.toArrowImageHeight)),e.middleArrow&&(r.middle=this.edgeType.getArrowData(t,"middle",n,this.selected,this.hover,e),e.middleArrowSrc&&(r.middle.image=this.imagelist.load(e.middleArrowSrc)),e.middleArrowImageWidth&&(r.middle.imageWidth=e.middleArrowImageWidth),e.middleArrowImageHeight&&(r.middle.imageHeight=e.middleArrowImageHeight)),e.fromArrow&&this.edgeType.drawArrowHead(t,e,this.selected,this.hover,r.from),e.middleArrow&&this.edgeType.drawArrowHead(t,e,this.selected,this.hover,r.middle),e.toArrow&&this.edgeType.drawArrowHead(t,e,this.selected,this.hover,r.to)}}},{key:"drawLabel",value:function(t,e){if(void 0!==this.options.label){var n,r=this.from,i=this.to;if(this.labelModule.differentState(this.selected,this.hover)&&this.labelModule.getTextSize(t,this.selected,this.hover),r.id!=i.id){this.labelModule.pointToSelf=!1,n=this.edgeType.getPoint(.5,e),t.save();var o=this._getRotation(t);0!=o.angle&&(t.translate(o.x,o.y),t.rotate(o.angle)),this.labelModule.draw(t,n.x,n.y,this.selected,this.hover),t.restore()}else{this.labelModule.pointToSelf=!0;var g=UN(t,this.options.selfReference.angle,this.options.selfReference.size,r);n=this._pointOnCircle(g.x,g.y,this.options.selfReference.size,this.options.selfReference.angle),this.labelModule.draw(t,n.x,n.y,this.selected,this.hover)}}}},{key:"getItemsOnPoint",value:function(t){var e=[];if(this.labelModule.visible()){var n=this._getRotation();zN(this.labelModule.getSize(),t,n)&&e.push({edgeId:this.id,labelId:0})}var r={left:t.x,top:t.y};return this.isOverlappingWith(r)&&e.push({edgeId:this.id}),e}},{key:"isOverlappingWith",value:function(t){if(this.connected){var e=this.from.x,n=this.from.y,r=this.to.x,i=this.to.y,o=t.left,g=t.top;return this.edgeType.getDistanceToEdge(e,n,r,i,o,g)<10}return!1}},{key:"_getRotation",value:function(t){var e=this.edgeType.getViaNode(),n=this.edgeType.getPoint(.5,e);void 0!==t&&this.labelModule.calculateLabelSize(t,this.selected,this.hover,n.x,n.y);var r={x:n.x,y:this.labelModule.size.yLine,angle:0};if(!this.labelModule.visible())return r;if("horizontal"===this.options.font.align)return r;var i=this.from.y-this.to.y,o=this.from.x-this.to.x,g=Math.atan2(i,o);return(g<-1&&o<0||g>0&&o<0)&&(g+=Math.PI),r.angle=g,r}},{key:"_pointOnCircle",value:function(t,e,n,r){return{x:t+n*Math.cos(r),y:e-n*Math.sin(r)}}},{key:"select",value:function(){this.selected=!0}},{key:"unselect",value:function(){this.selected=!1}},{key:"cleanup",value:function(){return this.edgeType.cleanup()}},{key:"remove",value:function(){this.cleanup(),this.disconnect(),delete this.body.edges[this.id]}},{key:"endPointsValid",value:function(){return void 0!==this.body.nodes[this.fromId]&&void 0!==this.body.nodes[this.toId]}}],[{key:"parseOptions",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(Sb(["endPointOffset","arrowStrikethrough","id","from","hidden","hoverWidth","labelHighlightBold","length","line","opacity","physics","scaling","selectionWidth","selfReferenceSize","selfReference","to","title","value","width","font","chosen","widthConstraint"],t,e,n),void 0!==e.endPointOffset&&void 0!==e.endPointOffset.from&&(E_(e.endPointOffset.from)?t.endPointOffset.from=e.endPointOffset.from:(t.endPointOffset.from=void 0!==r.endPointOffset.from?r.endPointOffset.from:0,console.error("endPointOffset.from is not a valid number"))),void 0!==e.endPointOffset&&void 0!==e.endPointOffset.to&&(E_(e.endPointOffset.to)?t.endPointOffset.to=e.endPointOffset.to:(t.endPointOffset.to=void 0!==r.endPointOffset.to?r.endPointOffset.to:0,console.error("endPointOffset.to is not a valid number"))),ZN(e.label)?t.label=e.label:ZN(t.label)||(t.label=void 0),Yb(t,e,"smooth",r),Yb(t,e,"shadow",r),Yb(t,e,"background",r),void 0!==e.dashes&&null!==e.dashes?t.dashes=e.dashes:!0===n&&null===e.dashes&&(t.dashes=Sp(r.dashes)),void 0!==e.scaling&&null!==e.scaling?(void 0!==e.scaling.min&&(t.scaling.min=e.scaling.min),void 0!==e.scaling.max&&(t.scaling.max=e.scaling.max),Yb(t.scaling,e.scaling,"label",r.scaling)):!0===n&&null===e.scaling&&(t.scaling=Sp(r.scaling)),void 0!==e.arrows&&null!==e.arrows)if("string"==typeof e.arrows){var o=e.arrows.toLowerCase();t.arrows.to.enabled=-1!=hp(o).call(o,"to"),t.arrows.middle.enabled=-1!=hp(o).call(o,"middle"),t.arrows.from.enabled=-1!=hp(o).call(o,"from")}else{if("object"!==Qc(e.arrows))throw new Error("The arrow newOptions can only be an object or a string. Refer to the documentation. You used:"+jp(e.arrows));Yb(t.arrows,e.arrows,"to",r.arrows),Yb(t.arrows,e.arrows,"middle",r.arrows),Yb(t.arrows,e.arrows,"from",r.arrows)}else!0===n&&null===e.arrows&&(t.arrows=Sp(r.arrows));if(void 0!==e.color&&null!==e.color){var g=Eb(e.color)?{color:e.color,highlight:e.color,hover:e.color,inherit:!1,opacity:1}:e.color,s=t.color;if(i)Nb(s,r.color,!1,n);else for(var A in s)Object.prototype.hasOwnProperty.call(s,A)&&delete s[A];if(Eb(s))s.color=s,s.highlight=s,s.hover=s,s.inherit=!1,void 0===g.opacity&&(s.opacity=1);else{var C=!1;void 0!==g.color&&(s.color=g.color,C=!0),void 0!==g.highlight&&(s.highlight=g.highlight,C=!0),void 0!==g.hover&&(s.hover=g.hover,C=!0),void 0!==g.inherit&&(s.inherit=g.inherit),void 0!==g.opacity&&(s.opacity=Math.min(1,Math.max(0,g.opacity))),!0===C?s.inherit=!1:void 0===s.inherit&&(s.inherit="from")}}else!0===n&&null===e.color&&(t.color=Wb(r.color));!0===n&&null===e.font&&(t.font=Wb(r.font)),Object.prototype.hasOwnProperty.call(e,"selfReferenceSize")&&(console.warn("The selfReferenceSize property has been deprecated. Please use selfReference property instead. The selfReference can be set like thise selfReference:{size:30, angle:Math.PI / 4}"),t.selfReference.size=e.selfReferenceSize)}}]),t}(),yD=function(){function t(e,n,r){var i,o=this;Fu(this,t),this.body=e,this.images=n,this.groups=r,this.body.functions.createEdge=wi(i=this.create).call(i,this),this.edgesListeners={add:function(t,e){o.add(e.items)},update:function(t,e){o.update(e.items)},remove:function(t,e){o.remove(e.items)}},this.options={},this.defaultOptions={arrows:{to:{enabled:!1,scaleFactor:1,type:"arrow"},middle:{enabled:!1,scaleFactor:1,type:"arrow"},from:{enabled:!1,scaleFactor:1,type:"arrow"}},endPointOffset:{from:0,to:0},arrowStrikethrough:!0,color:{color:"#848484",highlight:"#848484",hover:"#848484",inherit:"from",opacity:1},dashes:!1,font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:2,strokeColor:"#ffffff",align:"horizontal",multi:!1,vadjust:0,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"courier new",vadjust:2}},hidden:!1,hoverWidth:1.5,label:void 0,labelHighlightBold:!0,length:void 0,physics:!0,scaling:{min:1,max:15,label:{enabled:!0,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(t,e,n,r){if(e===t)return.5;var i=1/(e-t);return Math.max(0,(r-t)*i)}},selectionWidth:1.5,selfReference:{size:20,angle:Math.PI/4,renderBehindTheNode:!0},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},background:{enabled:!1,color:"rgba(111,111,111,1)",size:10,dashes:!1},smooth:{enabled:!0,type:"dynamic",forceDirection:"none",roundness:.5},title:void 0,width:1,value:void 0},Nb(this.options,this.defaultOptions),this.bindEventListeners()}return il(t,[{key:"bindEventListeners",value:function(){var t,e,n=this;this.body.emitter.on("_forceDisableDynamicCurves",(function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];"dynamic"===t&&(t="continuous");var r=!1;for(var i in n.body.edges)if(Object.prototype.hasOwnProperty.call(n.body.edges,i)){var o=n.body.edges[i],g=n.body.data.edges.get(i);if(null!=g){var s=g.smooth;void 0!==s&&!0===s.enabled&&"dynamic"===s.type&&(void 0===t?o.setOptions({smooth:!1}):o.setOptions({smooth:{type:t}}),r=!0)}}!0===e&&!0===r&&n.body.emitter.emit("_dataChanged")})),this.body.emitter.on("_dataUpdated",(function(){n.reconnectEdges()})),this.body.emitter.on("refreshEdges",wi(t=this.refresh).call(t,this)),this.body.emitter.on("refresh",wi(e=this.refresh).call(e,this)),this.body.emitter.on("destroy",(function(){Mb(n.edgesListeners,(function(t,e){n.body.data.edges&&n.body.data.edges.off(e,t)})),delete n.body.functions.createEdge,delete n.edgesListeners.add,delete n.edgesListeners.update,delete n.edgesListeners.remove,delete n.edgesListeners}))}},{key:"setOptions",value:function(t){if(void 0!==t){vD.parseOptions(this.options,t,!0,this.defaultOptions,!0);var e=!1;if(void 0!==t.smooth)for(var n in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,n)&&(e=this.body.edges[n].updateEdgeType()||e);if(void 0!==t.font)for(var r in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,r)&&this.body.edges[r].updateLabelModule();void 0===t.hidden&&void 0===t.physics&&!0!==e||this.body.emitter.emit("_dataChanged")}}},{key:"setData",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.body.data.edges;if(dN("id",t))this.body.data.edges=t;else if(Ih(t))this.body.data.edges=new hN,this.body.data.edges.add(t);else{if(t)throw new TypeError("Array or DataSet expected");this.body.data.edges=new hN}if(r&&Mb(this.edgesListeners,(function(t,e){r.off(e,t)})),this.body.edges={},this.body.data.edges){Mb(this.edgesListeners,(function(t,n){e.body.data.edges.on(n,t)}));var i=this.body.data.edges.getIds();this.add(i,!0)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),!1===n&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.body.edges,r=this.body.data.edges,i=0;i1&&void 0!==arguments[1])||arguments[1];if(0!==t.length){var n=this.body.edges;Mb(t,(function(t){var e=n[t];void 0!==e&&e.remove()})),e&&this.body.emitter.emit("_dataChanged")}}},{key:"refresh",value:function(){var t=this;Mb(this.body.edges,(function(e,n){var r=t.body.data.edges.get(n);void 0!==r&&e.setOptions(r)}))}},{key:"create",value:function(t){return new vD(t,this.body,this.images,this.options,this.defaultOptions)}},{key:"reconnectEdges",value:function(){var t,e=this.body.nodes,n=this.body.edges;for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(e[t].edges=[]);for(t in n)if(Object.prototype.hasOwnProperty.call(n,t)){var r=n[t];r.from=null,r.to=null,r.connect()}}},{key:"getConnectedNodes",value:function(t){var e=[];if(void 0!==this.body.edges[t]){var n=this.body.edges[t];void 0!==n.fromId&&e.push(n.fromId),void 0!==n.toId&&e.push(n.toId)}return e}},{key:"_updateState",value:function(){this._addMissingEdges(),this._removeInvalidEdges()}},{key:"_removeInvalidEdges",value:function(){var t=this,e=[];Mb(this.body.edges,(function(n,r){var i=t.body.nodes[n.toId],o=t.body.nodes[n.fromId];void 0!==i&&!0===i.isCluster||void 0!==o&&!0===o.isCluster||void 0!==i&&void 0!==o||e.push(r)})),this.remove(e,!1)}},{key:"_addMissingEdges",value:function(){var t=this.body.data.edges;if(null!=t){var e=this.body.edges,n=[];Hh(t).call(t,(function(t,r){void 0===e[r]&&n.push(r)})),this.add(n,!0)}}}]),t}(),bD=function(){function t(e,n,r){Fu(this,t),this.body=e,this.physicsBody=n,this.barnesHutTree,this.setOptions(r),this._rng=pb("BARNES HUT SOLVER")}return il(t,[{key:"setOptions",value:function(t){this.options=t,this.thetaInversed=1/this.options.theta,this.overlapAvoidanceFactor=1-Math.max(0,Math.min(1,this.options.avoidOverlap))}},{key:"solve",value:function(){if(0!==this.options.gravitationalConstant&&this.physicsBody.physicsNodeIndices.length>0){var t,e=this.body.nodes,n=this.physicsBody.physicsNodeIndices,r=n.length,i=this._formBarnesHutTree(e,n);this.barnesHutTree=i;for(var o=0;o0&&this._getForceContributions(i.root,t)}}},{key:"_getForceContributions",value:function(t,e){this._getForceContribution(t.children.NW,e),this._getForceContribution(t.children.NE,e),this._getForceContribution(t.children.SW,e),this._getForceContribution(t.children.SE,e)}},{key:"_getForceContribution",value:function(t,e){if(t.childrenCount>0){var n=t.centerOfMass.x-e.x,r=t.centerOfMass.y-e.y,i=Math.sqrt(n*n+r*r);i*t.calcSize>this.thetaInversed?this._calculateForces(i,n,r,e,t):4===t.childrenCount?this._getForceContributions(t,e):t.children.data.id!=e.id&&this._calculateForces(i,n,r,e,t)}}},{key:"_calculateForces",value:function(t,e,n,r,i){0===t&&(e=t=.1),this.overlapAvoidanceFactor<1&&r.shape.radius&&(t=Math.max(.1+this.overlapAvoidanceFactor*r.shape.radius,t-r.shape.radius));var o=this.options.gravitationalConstant*i.mass*r.options.mass/Math.pow(t,3),g=e*o,s=n*o;this.physicsBody.forces[r.id].x+=g,this.physicsBody.forces[r.id].y+=s}},{key:"_formBarnesHutTree",value:function(t,e){for(var n,r=e.length,i=t[e[0]].x,o=t[e[0]].y,g=t[e[0]].x,s=t[e[0]].y,A=1;A0&&(Ig&&(g=I),as&&(s=a))}var u=Math.abs(g-i)-Math.abs(s-o);u>0?(o-=.5*u,s+=.5*u):(i+=.5*u,g-=.5*u);var c=Math.max(1e-5,Math.abs(g-i)),l=.5*c,h=.5*(i+g),d=.5*(o+s),f={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:h-l,maxX:h+l,minY:d-l,maxY:d+l},size:c,calcSize:1/c,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(f.root);for(var p=0;p0&&this._placeInTree(f.root,n);return f}},{key:"_updateBranchMass",value:function(t,e){var n=t.centerOfMass,r=t.mass+e.options.mass,i=1/r;n.x=n.x*t.mass+e.x*e.options.mass,n.x*=i,n.y=n.y*t.mass+e.y*e.options.mass,n.y*=i,t.mass=r;var o=Math.max(Math.max(e.height,e.radius),e.width);t.maxWidth=t.maxWidthe.x?i.maxY>e.y?"NW":"SW":i.maxY>e.y?"NE":"SE",this._placeInRegion(t,e,r)}},{key:"_placeInRegion",value:function(t,e,n){var r=t.children[n];switch(r.childrenCount){case 0:r.children.data=e,r.childrenCount=1,this._updateBranchMass(r,e);break;case 1:r.children.data.x===e.x&&r.children.data.y===e.y?(e.x+=this._rng(),e.y+=this._rng()):(this._splitBranch(r),this._placeInTree(r,e));break;case 4:this._placeInTree(r,e)}}},{key:"_splitBranch",value:function(t){var e=null;1===t.childrenCount&&(e=t.children.data,t.mass=0,t.centerOfMass.x=0,t.centerOfMass.y=0),t.childrenCount=4,t.children.data=null,this._insertRegion(t,"NW"),this._insertRegion(t,"NE"),this._insertRegion(t,"SW"),this._insertRegion(t,"SE"),null!=e&&this._placeInTree(t,e)}},{key:"_insertRegion",value:function(t,e){var n,r,i,o,g=.5*t.size;switch(e){case"NW":n=t.range.minX,r=t.range.minX+g,i=t.range.minY,o=t.range.minY+g;break;case"NE":n=t.range.minX+g,r=t.range.maxX,i=t.range.minY,o=t.range.minY+g;break;case"SW":n=t.range.minX,r=t.range.minX+g,i=t.range.minY+g,o=t.range.maxY;break;case"SE":n=t.range.minX+g,r=t.range.maxX,i=t.range.minY+g,o=t.range.maxY}t.children[e]={centerOfMass:{x:0,y:0},mass:0,range:{minX:n,maxX:r,minY:i,maxY:o},size:.5*t.size,calcSize:2*t.calcSize,children:{data:null},maxWidth:0,level:t.level+1,childrenCount:0}}},{key:"_debug",value:function(t,e){void 0!==this.barnesHutTree&&(t.lineWidth=1,this._drawBranch(this.barnesHutTree.root,t,e))}},{key:"_drawBranch",value:function(t,e,n){void 0===n&&(n="#FF0000"),4===t.childrenCount&&(this._drawBranch(t.children.NW,e),this._drawBranch(t.children.NE,e),this._drawBranch(t.children.SE,e),this._drawBranch(t.children.SW,e)),e.strokeStyle=n,e.beginPath(),e.moveTo(t.range.minX,t.range.minY),e.lineTo(t.range.maxX,t.range.minY),e.stroke(),e.beginPath(),e.moveTo(t.range.maxX,t.range.minY),e.lineTo(t.range.maxX,t.range.maxY),e.stroke(),e.beginPath(),e.moveTo(t.range.maxX,t.range.maxY),e.lineTo(t.range.minX,t.range.maxY),e.stroke(),e.beginPath(),e.moveTo(t.range.minX,t.range.maxY),e.lineTo(t.range.minX,t.range.minY),e.stroke()}}]),t}(),mD=function(){function t(e,n,r){Fu(this,t),this._rng=pb("REPULSION SOLVER"),this.body=e,this.physicsBody=n,this.setOptions(r)}return il(t,[{key:"setOptions",value:function(t){this.options=t}},{key:"solve",value:function(){for(var t,e,n,r,i,o,g,s,A=this.body.nodes,C=this.physicsBody.physicsNodeIndices,I=this.physicsBody.forces,a=this.options.nodeDistance,u=-2/3/a,c=0;c0){var o=i.edges.length+1,g=this.options.centralGravity*o*i.options.mass;r[i.id].x=e*g,r[i.id].y=n*g}}}]),i}(ED),TD=function(){function t(e){Fu(this,t),this.body=e,this.physicsBody={physicsNodeIndices:[],physicsEdgeIndices:[],forces:{},velocities:{}},this.physicsEnabled=!0,this.simulationInterval=1e3/60,this.requiresTimeout=!0,this.previousStates={},this.referenceState={},this.freezeCache={},this.renderTimer=void 0,this.adaptiveTimestep=!1,this.adaptiveTimestepEnabled=!1,this.adaptiveCounter=0,this.adaptiveInterval=3,this.stabilized=!1,this.startedStabilization=!1,this.stabilizationIterations=0,this.ready=!1,this.options={},this.defaultOptions={enabled:!0,barnesHut:{theta:.5,gravitationalConstant:-2e3,centralGravity:.3,springLength:95,springConstant:.04,damping:.09,avoidOverlap:0},forceAtlas2Based:{theta:.5,gravitationalConstant:-50,centralGravity:.01,springConstant:.08,springLength:100,damping:.4,avoidOverlap:0},repulsion:{centralGravity:.2,springLength:200,springConstant:.05,nodeDistance:100,damping:.09,avoidOverlap:0},hierarchicalRepulsion:{centralGravity:0,springLength:100,springConstant:.01,nodeDistance:120,damping:.09},maxVelocity:50,minVelocity:.75,solver:"barnesHut",stabilization:{enabled:!0,iterations:1e3,updateInterval:50,onlyDynamicEdges:!1,fit:!0},timestep:.5,adaptiveTimestep:!0,wind:{x:0,y:0}},ti(this.options,this.defaultOptions),this.timestep=.5,this.layoutFailed=!1,this.bindEventListeners()}return il(t,[{key:"bindEventListeners",value:function(){var t=this;this.body.emitter.on("initPhysics",(function(){t.initPhysics()})),this.body.emitter.on("_layoutFailed",(function(){t.layoutFailed=!0})),this.body.emitter.on("resetPhysics",(function(){t.stopSimulation(),t.ready=!1})),this.body.emitter.on("disablePhysics",(function(){t.physicsEnabled=!1,t.stopSimulation()})),this.body.emitter.on("restorePhysics",(function(){t.setOptions(t.options),!0===t.ready&&t.startSimulation()})),this.body.emitter.on("startSimulation",(function(){!0===t.ready&&t.startSimulation()})),this.body.emitter.on("stopSimulation",(function(){t.stopSimulation()})),this.body.emitter.on("destroy",(function(){t.stopSimulation(!1),t.body.emitter.off()})),this.body.emitter.on("_dataChanged",(function(){t.updatePhysicsData()}))}},{key:"setOptions",value:function(t){if(void 0!==t)if(!1===t)this.options.enabled=!1,this.physicsEnabled=!1,this.stopSimulation();else if(!0===t)this.options.enabled=!0,this.physicsEnabled=!0,this.startSimulation();else{this.physicsEnabled=!0,Pb(["stabilization"],this.options,t),Yb(this.options,t,"stabilization"),void 0===t.enabled&&(this.options.enabled=!0),!1===this.options.enabled&&(this.physicsEnabled=!1,this.stopSimulation());var e=this.options.wind;e&&(("number"!=typeof e.x||b_(e.x))&&(e.x=0),("number"!=typeof e.y||b_(e.y))&&(e.y=0)),this.timestep=this.options.timestep}this.init()}},{key:"init",value:function(){var t;"forceAtlas2Based"===this.options.solver?(t=this.options.forceAtlas2Based,this.nodesSolver=new OD(this.body,this.physicsBody,t),this.edgesSolver=new _D(this.body,this.physicsBody,t),this.gravitySolver=new kD(this.body,this.physicsBody,t)):"repulsion"===this.options.solver?(t=this.options.repulsion,this.nodesSolver=new mD(this.body,this.physicsBody,t),this.edgesSolver=new _D(this.body,this.physicsBody,t),this.gravitySolver=new ED(this.body,this.physicsBody,t)):"hierarchicalRepulsion"===this.options.solver?(t=this.options.hierarchicalRepulsion,this.nodesSolver=new wD(this.body,this.physicsBody,t),this.edgesSolver=new xD(this.body,this.physicsBody,t),this.gravitySolver=new ED(this.body,this.physicsBody,t)):(t=this.options.barnesHut,this.nodesSolver=new bD(this.body,this.physicsBody,t),this.edgesSolver=new _D(this.body,this.physicsBody,t),this.gravitySolver=new ED(this.body,this.physicsBody,t)),this.modelOptions=t}},{key:"initPhysics",value:function(){!0===this.physicsEnabled&&!0===this.options.enabled?!0===this.options.stabilization.enabled?this.stabilize():(this.stabilized=!1,this.ready=!0,this.body.emitter.emit("fit",{},this.layoutFailed),this.startSimulation()):(this.ready=!0,this.body.emitter.emit("fit"))}},{key:"startSimulation",value:function(){var t;!0===this.physicsEnabled&&!0===this.options.enabled?(this.stabilized=!1,this.adaptiveTimestep=!1,this.body.emitter.emit("_resizeNodes"),void 0===this.viewFunction&&(this.viewFunction=wi(t=this.simulationStep).call(t,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering"))):this.body.emitter.emit("_redraw")}},{key:"stopSimulation",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.stabilized=!0,!0===t&&this._emitStabilized(),void 0!==this.viewFunction&&(this.body.emitter.off("initRedraw",this.viewFunction),this.viewFunction=void 0,!0===t&&this.body.emitter.emit("_stopRendering"))}},{key:"simulationStep",value:function(){var t=Nh();this.physicsTick(),(Nh()-t<.4*this.simulationInterval||!0===this.runDoubleSpeed)&&!1===this.stabilized&&(this.physicsTick(),this.runDoubleSpeed=!0),!0===this.stabilized&&this.stopSimulation()}},{key:"_emitStabilized",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.stabilizationIterations;(this.stabilizationIterations>1||!0===this.startedStabilization)&&ov((function(){t.body.emitter.emit("stabilized",{iterations:e}),t.startedStabilization=!1,t.stabilizationIterations=0}),0)}},{key:"physicsStep",value:function(){this.gravitySolver.solve(),this.nodesSolver.solve(),this.edgesSolver.solve(),this.moveNodes()}},{key:"adjustTimeStep",value:function(){!0===this._evaluateStepQuality()?this.timestep=1.2*this.timestep:this.timestep/1.2.3))return!1;return!0}},{key:"moveNodes",value:function(){for(var t=this.physicsBody.physicsNodeIndices,e=0,n=0,r=0;rr&&(t=t>0?r:-r),t}},{key:"_performStep",value:function(t){var e=this.body.nodes[t],n=this.physicsBody.forces[t];this.options.wind&&(n.x+=this.options.wind.x,n.y+=this.options.wind.y);var r=this.physicsBody.velocities[t];return this.previousStates[t]={x:e.x,y:e.y,vx:r.x,vy:r.y},!1===e.options.fixed.x?(r.x=this.calculateComponentVelocity(r.x,n.x,e.options.mass),e.x+=r.x*this.timestep):(n.x=0,r.x=0),!1===e.options.fixed.y?(r.y=this.calculateComponentVelocity(r.y,n.y,e.options.mass),e.y+=r.y*this.timestep):(n.y=0,r.y=0),Math.sqrt(Math.pow(r.x,2)+Math.pow(r.y,2))}},{key:"_freezeNodes",value:function(){var t=this.body.nodes;for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&t[e].x&&t[e].y){var n=t[e].options.fixed;this.freezeCache[e]={x:n.x,y:n.y},n.x=!0,n.y=!0}}},{key:"_restoreFrozenNodes",value:function(){var t=this.body.nodes;for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&void 0!==this.freezeCache[e]&&(t[e].options.fixed.x=this.freezeCache[e].x,t[e].options.fixed.y=this.freezeCache[e].y);this.freezeCache={}}},{key:"stabilize",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.stabilization.iterations;"number"!=typeof e&&(e=this.options.stabilization.iterations,console.error("The stabilize method needs a numeric amount of iterations. Switching to default: ",e)),0!==this.physicsBody.physicsNodeIndices.length?(this.adaptiveTimestep=this.options.adaptiveTimestep,this.body.emitter.emit("_resizeNodes"),this.stopSimulation(),this.stabilized=!1,this.body.emitter.emit("_blockRedraw"),this.targetIterations=e,!0===this.options.stabilization.onlyDynamicEdges&&this._freezeNodes(),this.stabilizationIterations=0,ov((function(){return t._stabilizationBatch()}),0)):this.ready=!0}},{key:"_startStabilizing",value:function(){return!0!==this.startedStabilization&&(this.body.emitter.emit("startStabilizing"),this.startedStabilization=!0,!0)}},{key:"_stabilizationBatch",value:function(){var t=this,e=function(){return!1===t.stabilized&&t.stabilizationIterations1&&void 0!==arguments[1]?arguments[1]:[],r=1e9,i=-1e9,o=1e9,g=-1e9;if(n.length>0)for(var s=0;s(e=t[n[s]]).shape.boundingBox.left&&(o=e.shape.boundingBox.left),ge.shape.boundingBox.top&&(r=e.shape.boundingBox.top),i1&&void 0!==arguments[1]?arguments[1]:[],r=1e9,i=-1e9,o=1e9,g=-1e9;if(n.length>0)for(var s=0;s(e=t[n[s]]).x&&(o=e.x),ge.y&&(r=e.y),i=t&&n.push(i.id)}for(var o=0;o0&&void 0!==arguments[0]?arguments[0]:{},n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(void 0===e.joinCondition)throw new Error("Cannot call clusterByNodeData without a joinCondition function in the options.");e=this._checkOptions(e);var r={},i={};Mb(this.body.nodes,(function(n,o){n.options&&!0===e.joinCondition(n.options)&&(r[o]=n,Mb(n.edges,(function(e){void 0===t.clusteredEdges[e.id]&&(i[e.id]=e)})))})),this._cluster(r,i,e,n)}},{key:"clusterByEdgeCount",value:function(t,e){var n=this,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];e=this._checkOptions(e);for(var i,o,g,s=[],A={},C=function(){var r={},C={},a=n.body.nodeIndices[I],u=n.body.nodes[a];if(void 0===A[a]){g=0,o=[];for(var c=0;c0&&xh(C).length>0&&!0===h){var p=function(){for(var t=0;t1&&void 0!==arguments[1])||arguments[1];this.clusterByEdgeCount(1,t,e)}},{key:"clusterBridges",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.clusterByEdgeCount(2,t,e)}},{key:"clusterByConnection",value:function(t,e){var n,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(void 0===t)throw new Error("No nodeId supplied to clusterByConnection!");if(void 0===this.body.nodes[t])throw new Error("The nodeId given to clusterByConnection does not exist!");var i=this.body.nodes[t];void 0===(e=this._checkOptions(e,i)).clusterNodeProperties.x&&(e.clusterNodeProperties.x=i.x),void 0===e.clusterNodeProperties.y&&(e.clusterNodeProperties.y=i.y),void 0===e.clusterNodeProperties.fixed&&(e.clusterNodeProperties.fixed={},e.clusterNodeProperties.fixed.x=i.options.fixed.x,e.clusterNodeProperties.fixed.y=i.options.fixed.y);var o={},g={},s=i.id,A=SD.cloneOptions(i);o[s]=i;for(var C=0;C-1&&(g[f.id]=f)}this._cluster(o,g,e,r)}},{key:"_createClusterEdges",value:function(t,e,n,r){for(var i,o,g,s,A,C,I=xh(t),a=[],u=0;u0&&void 0!==arguments[0]?arguments[0]:{};return void 0===t.clusterEdgeProperties&&(t.clusterEdgeProperties={}),void 0===t.clusterNodeProperties&&(t.clusterNodeProperties={}),t}},{key:"_cluster",value:function(t,e,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=[];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&void 0!==this.clusteredNodes[o]&&i.push(o);for(var g=0;gi?e.x:i,o=e.yg?e.y:g;return{x:.5*(r+i),y:.5*(o+g)}}},{key:"openCluster",value:function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(void 0===t)throw new Error("No clusterNodeId supplied to openCluster.");var r=this.body.nodes[t];if(void 0===r)throw new Error("The clusterNodeId supplied to openCluster does not exist.");if(!0!==r.isCluster||void 0===r.containedNodes||void 0===r.containedEdges)throw new Error("The node:"+t+" is not a valid cluster.");var i=this.findNode(t),o=hp(i).call(i,t)-1;if(o>=0){var g=i[o];return this.body.nodes[g]._openChildCluster(t),delete this.body.nodes[t],void(!0===n&&this.body.emitter.emit("_dataChanged"))}var s=r.containedNodes,A=r.containedEdges;if(void 0!==e&&void 0!==e.releaseFunction&&"function"==typeof e.releaseFunction){var C={},I={x:r.x,y:r.y};for(var a in s)if(Object.prototype.hasOwnProperty.call(s,a)){var u=this.body.nodes[a];C[a]={x:u.x,y:u.y}}var c=e.releaseFunction(I,C);for(var l in s)if(Object.prototype.hasOwnProperty.call(s,l)){var h=this.body.nodes[l];void 0!==c[l]&&(h.x=void 0===c[l].x?r.x:c[l].x,h.y=void 0===c[l].y?r.y:c[l].y)}}else Mb(s,(function(t){!1===t.options.fixed.x&&(t.x=r.x),!1===t.options.fixed.y&&(t.y=r.y)}));for(var d in s)if(Object.prototype.hasOwnProperty.call(s,d)){var f=this.body.nodes[d];f.vx=r.vx,f.vy=r.vy,f.setOptions({physics:!0}),delete this.clusteredNodes[d]}for(var p=[],v=0;v0&&i<100;){var o=e.pop();if(void 0!==o){var g=this.body.edges[o];if(void 0!==g){i++;var s=g.clusteringEdgeReplacingIds;if(void 0===s)r.push(o);else for(var A=0;Ar&&(r=o.edges.length),t+=o.edges.length,e+=Math.pow(o.edges.length,2),n+=1}t/=n;var g=(e/=n)-Math.pow(t,2),s=Math.sqrt(g),A=Math.floor(t+2*s);return A>r&&(A=r),A}},{key:"_createClusteredEdge",value:function(t,e,n,r,i){var o=SD.cloneOptions(n,"edge");Nb(o,r),o.from=t,o.to=e,o.id="clusterEdge:"+gN(),void 0!==i&&Nb(o,i);var g=this.body.functions.createEdge(o);return g.clusteringEdgeReplacingIds=[n.id],g.connect(),this.body.edges[g.id]=g,g}},{key:"_clusterEdges",value:function(t,e,n,r){if(e instanceof vD){var i=e,o={};o[i.id]=i,e=o}if(t instanceof pR){var g=t,s={};s[g.id]=g,t=s}if(null==n)throw new Error("_clusterEdges: parameter clusterNode required");for(var A in void 0===r&&(r=n.clusterEdgeProperties),this._createClusterEdges(t,e,n,r),e)if(Object.prototype.hasOwnProperty.call(e,A)&&void 0!==this.body.edges[A]){var C=this.body.edges[A];this._backupEdgeOptions(C),C.setOptions({physics:!1})}for(var I in t)Object.prototype.hasOwnProperty.call(t,I)&&(this.clusteredNodes[I]={clusterId:n.id,node:this.body.nodes[I]},this.body.nodes[I].setOptions({physics:!1}))}},{key:"_getClusterNodeForNode",value:function(t){if(void 0!==t){var e=this.clusteredNodes[t];if(void 0!==e){var n=e.clusterId;if(void 0!==n)return this.body.nodes[n]}}}},{key:"_filter",value:function(t,e){var n=[];return Mb(t,(function(t){e(t)&&n.push(t)})),n}},{key:"_updateState",value:function(){var t,e=this,n=[],r={},i=function(t){Mb(e.body.nodes,(function(e){!0===e.isCluster&&t(e)}))};for(t in this.clusteredNodes)Object.prototype.hasOwnProperty.call(this.clusteredNodes,t)&&void 0===this.body.nodes[t]&&n.push(t);i((function(t){for(var e=0;e0}t.endPointsValid()&&i||(r[n]=n)})),i((function(t){Mb(r,(function(n){delete t.containedEdges[n],Mb(t.edges,(function(i,o){i.id!==n?i.clusteringEdgeReplacingIds=e._filter(i.clusteringEdgeReplacingIds,(function(t){return!r[t]})):t.edges[o]=null})),t.edges=e._filter(t.edges,(function(t){return null!==t}))}))})),Mb(r,(function(t){delete e.clusteredEdges[t]})),Mb(r,(function(t){delete e.body.edges[t]})),Mb(xh(this.body.edges),(function(t){var n=e.body.edges[t],r=e._isClusteredNode(n.fromId)||e._isClusteredNode(n.toId);if(r!==e._isClusteredEdge(n.id))if(r){var i=e._getClusterNodeForNode(n.fromId);void 0!==i&&e._clusterEdges(e.body.nodes[n.fromId],n,i);var o=e._getClusterNodeForNode(n.toId);void 0!==o&&e._clusterEdges(e.body.nodes[n.toId],n,o)}else delete e._clusterEdges[t],e._restoreEdge(n)}));for(var g=!1,s=!0,A=function(){var t=[];i((function(e){var n=xh(e.containedNodes).length,r=!0===e.options.allowSingleNodeCluster;(r&&n<1||!r&&n<2)&&t.push(e.id)}));for(var n=0;n0,g=g||s};s;)A();g&&this._updateState()}},{key:"_isClusteredNode",value:function(t){return void 0!==this.clusteredNodes[t]}},{key:"_isClusteredEdge",value:function(t){return void 0!==this.clusteredEdges[t]}}]),t}(),RD=function(){function t(e,n){var r;Fu(this,t),void 0!==window&&(r=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame),window.requestAnimationFrame=void 0===r?function(t){t()}:r,this.body=e,this.canvas=n,this.redrawRequested=!1,this.renderTimer=void 0,this.requiresTimeout=!0,this.renderingActive=!1,this.renderRequests=0,this.allowRedraw=!0,this.dragging=!1,this.zooming=!1,this.options={},this.defaultOptions={hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1},ti(this.options,this.defaultOptions),this._determineBrowserMethod(),this.bindEventListeners()}return il(t,[{key:"bindEventListeners",value:function(){var t,e=this;this.body.emitter.on("dragStart",(function(){e.dragging=!0})),this.body.emitter.on("dragEnd",(function(){e.dragging=!1})),this.body.emitter.on("zoom",(function(){e.zooming=!0,window.clearTimeout(e.zoomTimeoutId),e.zoomTimeoutId=ov((function(){var t;e.zooming=!1,wi(t=e._requestRedraw).call(t,e)()}),250)})),this.body.emitter.on("_resizeNodes",(function(){e._resizeNodes()})),this.body.emitter.on("_redraw",(function(){!1===e.renderingActive&&e._redraw()})),this.body.emitter.on("_blockRedraw",(function(){e.allowRedraw=!1})),this.body.emitter.on("_allowRedraw",(function(){e.allowRedraw=!0,e.redrawRequested=!1})),this.body.emitter.on("_requestRedraw",wi(t=this._requestRedraw).call(t,this)),this.body.emitter.on("_startRendering",(function(){e.renderRequests+=1,e.renderingActive=!0,e._startRendering()})),this.body.emitter.on("_stopRendering",(function(){e.renderRequests-=1,e.renderingActive=e.renderRequests>0,e.renderTimer=void 0})),this.body.emitter.on("destroy",(function(){e.renderRequests=0,e.allowRedraw=!1,e.renderingActive=!1,!0===e.requiresTimeout?clearTimeout(e.renderTimer):window.cancelAnimationFrame(e.renderTimer),e.body.emitter.off()}))}},{key:"setOptions",value:function(t){void 0!==t&&Sb(["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag"],this.options,t)}},{key:"_requestNextFrame",value:function(t,e){if("undefined"!=typeof window){var n,r=window;return!0===this.requiresTimeout?n=ov(t,e):r.requestAnimationFrame&&(n=r.requestAnimationFrame(t)),n}}},{key:"_startRendering",value:function(){var t;!0===this.renderingActive&&void 0===this.renderTimer&&(this.renderTimer=this._requestNextFrame(wi(t=this._renderStep).call(t,this),this.simulationInterval))}},{key:"_renderStep",value:function(){!0===this.renderingActive&&(this.renderTimer=void 0,!0===this.requiresTimeout&&this._startRendering(),this._redraw(),!1===this.requiresTimeout&&this._startRendering())}},{key:"redraw",value:function(){this.body.emitter.emit("setSize"),this._redraw()}},{key:"_requestRedraw",value:function(){var t=this;!0!==this.redrawRequested&&!1===this.renderingActive&&!0===this.allowRedraw&&(this.redrawRequested=!0,this._requestNextFrame((function(){t._redraw(!1)}),0))}},{key:"_redraw",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!0===this.allowRedraw){this.body.emitter.emit("initRedraw"),this.redrawRequested=!1;var e={drawExternalLabels:null};0!==this.canvas.frame.canvas.width&&0!==this.canvas.frame.canvas.height||this.canvas.setSize(),this.canvas.setTransform();var n=this.canvas.getContext(),r=this.canvas.frame.canvas.clientWidth,i=this.canvas.frame.canvas.clientHeight;if(n.clearRect(0,0,r,i),0===this.canvas.frame.clientWidth)return;if(n.save(),n.translate(this.body.view.translation.x,this.body.view.translation.y),n.scale(this.body.view.scale,this.body.view.scale),n.beginPath(),this.body.emitter.emit("beforeDrawing",n),n.closePath(),!1===t&&(!1===this.dragging||!0===this.dragging&&!1===this.options.hideEdgesOnDrag)&&(!1===this.zooming||!0===this.zooming&&!1===this.options.hideEdgesOnZoom)&&this._drawEdges(n),!1===this.dragging||!0===this.dragging&&!1===this.options.hideNodesOnDrag){var o=this._drawNodes(n,t).drawExternalLabels;e.drawExternalLabels=o}!1===t&&(!1===this.dragging||!0===this.dragging&&!1===this.options.hideEdgesOnDrag)&&(!1===this.zooming||!0===this.zooming&&!1===this.options.hideEdgesOnZoom)&&this._drawArrows(n),null!=e.drawExternalLabels&&e.drawExternalLabels(),!1===t&&this._drawSelectionBox(n),n.beginPath(),this.body.emitter.emit("afterDrawing",n),n.closePath(),n.restore(),!0===t&&n.clearRect(0,0,r,i)}}},{key:"_resizeNodes",value:function(){this.canvas.setTransform();var t=this.canvas.getContext();t.save(),t.translate(this.body.view.translation.x,this.body.view.translation.y),t.scale(this.body.view.scale,this.body.view.scale);var e,n=this.body.nodes;for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&((e=n[r]).resize(t),e.updateBoundingBox(t,e.selected));t.restore()}},{key:"_drawNodes",value:function(t){for(var e,n,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.body.nodes,o=this.body.nodeIndices,g=[],s=[],A=this.canvas.DOMtoCanvas({x:-20,y:-20}),C=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+20,y:this.canvas.frame.canvas.clientHeight+20}),I={top:A.y,left:A.x,bottom:C.y,right:C.x},a=[],u=0;u0&&void 0!==arguments[0]?arguments[0]:this.pixelRatio;!0===this.initialized&&(this.cameraState.previousWidth=this.frame.canvas.width/t,this.cameraState.previousHeight=this.frame.canvas.height/t,this.cameraState.scale=this.body.view.scale,this.cameraState.position=this.DOMtoCanvas({x:.5*this.frame.canvas.width/t,y:.5*this.frame.canvas.height/t}))}},{key:"_setCameraState",value:function(){if(void 0!==this.cameraState.scale&&0!==this.frame.canvas.clientWidth&&0!==this.frame.canvas.clientHeight&&0!==this.pixelRatio&&this.cameraState.previousWidth>0&&this.cameraState.previousHeight>0){var t=this.frame.canvas.width/this.pixelRatio/this.cameraState.previousWidth,e=this.frame.canvas.height/this.pixelRatio/this.cameraState.previousHeight,n=this.cameraState.scale;1!=t&&1!=e?n=.5*this.cameraState.scale*(t+e):1!=t?n=this.cameraState.scale*t:1!=e&&(n=this.cameraState.scale*e),this.body.view.scale=n;var r=this.DOMtoCanvas({x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight}),i={x:r.x-this.cameraState.position.x,y:r.y-this.cameraState.position.y};this.body.view.translation.x+=i.x*this.body.view.scale,this.body.view.translation.y+=i.y*this.body.view.scale}}},{key:"_prepareValue",value:function(t){if("number"==typeof t)return t+"px";if("string"==typeof t){if(-1!==hp(t).call(t,"%")||-1!==hp(t).call(t,"px"))return t;if(-1===hp(t).call(t,"%"))return t+"px"}throw new Error("Could not use the value supplied for width or height:"+t)}},{key:"_create",value:function(){for(;this.body.container.hasChildNodes();)this.body.container.removeChild(this.body.container.firstChild);if(this.frame=document.createElement("div"),this.frame.className="vis-network",this.frame.style.position="relative",this.frame.style.overflow="hidden",this.frame.tabIndex=0,this.frame.canvas=document.createElement("canvas"),this.frame.canvas.style.position="relative",this.frame.appendChild(this.frame.canvas),this.frame.canvas.getContext)this._setPixelRatio(),this.setTransform();else{var t=document.createElement("DIV");t.style.color="red",t.style.fontWeight="bold",t.style.padding="10px",t.innerText="Error: your browser does not support HTML canvas",this.frame.canvas.appendChild(t)}this.body.container.appendChild(this.frame),this.body.view.scale=1,this.body.view.translation={x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight},this._bindHammer()}},{key:"_bindHammer",value:function(){var t=this;void 0!==this.hammer&&this.hammer.destroy(),this.drag={},this.pinch={},this.hammer=new gm(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:gm.DIRECTION_ALL}),BD(this.hammer,(function(e){t.body.eventListeners.onTouch(e)})),this.hammer.on("tap",(function(e){t.body.eventListeners.onTap(e)})),this.hammer.on("doubletap",(function(e){t.body.eventListeners.onDoubleTap(e)})),this.hammer.on("press",(function(e){t.body.eventListeners.onHold(e)})),this.hammer.on("panstart",(function(e){t.body.eventListeners.onDragStart(e)})),this.hammer.on("panmove",(function(e){t.body.eventListeners.onDrag(e)})),this.hammer.on("panend",(function(e){t.body.eventListeners.onDragEnd(e)})),this.hammer.on("pinch",(function(e){t.body.eventListeners.onPinch(e)})),this.frame.canvas.addEventListener("wheel",(function(e){t.body.eventListeners.onMouseWheel(e)})),this.frame.canvas.addEventListener("mousemove",(function(e){t.body.eventListeners.onMouseMove(e)})),this.frame.canvas.addEventListener("contextmenu",(function(e){t.body.eventListeners.onContext(e)})),this.hammerFrame=new gm(this.frame),LD(this.hammerFrame,(function(e){t.body.eventListeners.onRelease(e)}))}},{key:"setSize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.width,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.height;t=this._prepareValue(t),e=this._prepareValue(e);var n=!1,r=this.frame.canvas.width,i=this.frame.canvas.height,o=this.pixelRatio;if(this._setPixelRatio(),t!=this.options.width||e!=this.options.height||this.frame.style.width!=t||this.frame.style.height!=e)this._getCameraState(o),this.frame.style.width=t,this.frame.style.height=e,this.frame.canvas.style.width="100%",this.frame.canvas.style.height="100%",this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),this.options.width=t,this.options.height=e,this.canvasViewCenter={x:.5*this.frame.clientWidth,y:.5*this.frame.clientHeight},n=!0;else{var g=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),s=Math.round(this.frame.canvas.clientHeight*this.pixelRatio);this.frame.canvas.width===g&&this.frame.canvas.height===s||this._getCameraState(o),this.frame.canvas.width!==g&&(this.frame.canvas.width=g,n=!0),this.frame.canvas.height!==s&&(this.frame.canvas.height=s,n=!0)}return!0===n&&(this.body.emitter.emit("resize",{width:Math.round(this.frame.canvas.width/this.pixelRatio),height:Math.round(this.frame.canvas.height/this.pixelRatio),oldWidth:Math.round(r/this.pixelRatio),oldHeight:Math.round(i/this.pixelRatio)}),this._setCameraState()),this.initialized=!0,n}},{key:"getContext",value:function(){return this.frame.canvas.getContext("2d")}},{key:"_determinePixelRatio",value:function(){var t=this.getContext();if(void 0===t)throw new Error("Could not get canvax context");var e=1;return"undefined"!=typeof window&&(e=window.devicePixelRatio||1),e/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1)}},{key:"_setPixelRatio",value:function(){this.pixelRatio=this._determinePixelRatio()}},{key:"setTransform",value:function(){var t=this.getContext();if(void 0===t)throw new Error("Could not get canvax context");t.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}},{key:"_XconvertDOMtoCanvas",value:function(t){return(t-this.body.view.translation.x)/this.body.view.scale}},{key:"_XconvertCanvasToDOM",value:function(t){return t*this.body.view.scale+this.body.view.translation.x}},{key:"_YconvertDOMtoCanvas",value:function(t){return(t-this.body.view.translation.y)/this.body.view.scale}},{key:"_YconvertCanvasToDOM",value:function(t){return t*this.body.view.scale+this.body.view.translation.y}},{key:"canvasToDOM",value:function(t){return{x:this._XconvertCanvasToDOM(t.x),y:this._YconvertCanvasToDOM(t.y)}}},{key:"DOMtoCanvas",value:function(t){return{x:this._XconvertDOMtoCanvas(t.x),y:this._YconvertDOMtoCanvas(t.y)}}}]),t}(),zD=function(){function t(e,n){var r,i,o=this;Fu(this,t),this.body=e,this.canvas=n,this.animationSpeed=1/this.renderRefreshRate,this.animationEasingFunction="easeInOutQuint",this.easingTime=0,this.sourceScale=0,this.targetScale=0,this.sourceTranslation=0,this.targetTranslation=0,this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0,this.touchTime=0,this.viewFunction=void 0,this.body.emitter.on("fit",wi(r=this.fit).call(r,this)),this.body.emitter.on("animationFinished",(function(){o.body.emitter.emit("_stopRendering")})),this.body.emitter.on("unlockNode",wi(i=this.releaseNode).call(i,this))}return il(t,[{key:"setOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=t}},{key:"fit",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t=function(t,e){var n=ti({nodes:e,minZoomLevel:Number.MIN_VALUE,maxZoomLevel:1},null!=t?t:{});if(!Ih(n.nodes))throw new TypeError("Nodes has to be an array of ids.");if(0===n.nodes.length&&(n.nodes=e),!("number"==typeof n.minZoomLevel&&n.minZoomLevel>0))throw new TypeError("Min zoom level has to be a number higher than zero.");if(!("number"==typeof n.maxZoomLevel&&n.minZoomLevel<=n.maxZoomLevel))throw new TypeError("Max zoom level has to be a number higher than min zoom level.");return n}(t,this.body.nodeIndices);var n,r,i=this.canvas.frame.canvas.clientWidth,o=this.canvas.frame.canvas.clientHeight;if(0===i||0===o)r=1,n=SD.getRange(this.body.nodes,t.nodes);else if(!0===e){var g=0;for(var s in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,s)&&!0===this.body.nodes[s].predefinedPosition&&(g+=1);if(g>.5*this.body.nodeIndices.length)return void this.fit(t,!1);n=SD.getRange(this.body.nodes,t.nodes),r=12.662/(this.body.nodeIndices.length+7.4147)+.0964822,r*=Math.min(i/600,o/600)}else{this.body.emitter.emit("_resizeNodes"),n=SD.getRange(this.body.nodes,t.nodes);var A=i/(1.1*Math.abs(n.maxX-n.minX)),C=o/(1.1*Math.abs(n.maxY-n.minY));r=A<=C?A:C}r>t.maxZoomLevel?r=t.maxZoomLevel:r1&&void 0!==arguments[1]?arguments[1]:{};if(void 0!==this.body.nodes[t]){var n={x:this.body.nodes[t].x,y:this.body.nodes[t].y};e.position=n,e.lockedOnNode=t,this.moveTo(e)}else console.error("Node: "+t+" cannot be found.")}},{key:"moveTo",value:function(t){if(void 0!==t){if(null!=t.offset){if(null!=t.offset.x){if(t.offset.x=+t.offset.x,!E_(t.offset.x))throw new TypeError('The option "offset.x" has to be a finite number.')}else t.offset.x=0;if(null!=t.offset.y){if(t.offset.y=+t.offset.y,!E_(t.offset.y))throw new TypeError('The option "offset.y" has to be a finite number.')}else t.offset.x=0}else t.offset={x:0,y:0};if(null!=t.position){if(null!=t.position.x){if(t.position.x=+t.position.x,!E_(t.position.x))throw new TypeError('The option "position.x" has to be a finite number.')}else t.position.x=0;if(null!=t.position.y){if(t.position.y=+t.position.y,!E_(t.position.y))throw new TypeError('The option "position.y" has to be a finite number.')}else t.position.x=0}else t.position=this.getViewPosition();if(null!=t.scale){if(t.scale=+t.scale,!(t.scale>0))throw new TypeError('The option "scale" has to be a number greater than zero.')}else t.scale=this.body.view.scale;void 0===t.animation&&(t.animation={duration:0}),!1===t.animation&&(t.animation={duration:0}),!0===t.animation&&(t.animation={}),void 0===t.animation.duration&&(t.animation.duration=1e3),void 0===t.animation.easingFunction&&(t.animation.easingFunction="easeInOutQuad"),this.animateView(t)}else t={}}},{key:"animateView",value:function(t){if(void 0!==t){this.animationEasingFunction=t.animation.easingFunction,this.releaseNode(),!0===t.locked&&(this.lockedOnNodeId=t.lockedOnNode,this.lockedOnNodeOffset=t.offset),0!=this.easingTime&&this._transitionRedraw(!0),this.sourceScale=this.body.view.scale,this.sourceTranslation=this.body.view.translation,this.targetScale=t.scale,this.body.view.scale=this.targetScale;var e,n,r=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i=r.x-t.position.x,o=r.y-t.position.y;this.targetTranslation={x:this.sourceTranslation.x+i*this.targetScale+t.offset.x,y:this.sourceTranslation.y+o*this.targetScale+t.offset.y},0===t.animation.duration?null!=this.lockedOnNodeId?(this.viewFunction=wi(e=this._lockedRedraw).call(e,this),this.body.emitter.on("initRedraw",this.viewFunction)):(this.body.view.scale=this.targetScale,this.body.view.translation=this.targetTranslation,this.body.emitter.emit("_requestRedraw")):(this.animationSpeed=1/(60*t.animation.duration*.001)||1/60,this.animationEasingFunction=t.animation.easingFunction,this.viewFunction=wi(n=this._transitionRedraw).call(n,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering"))}}},{key:"_lockedRedraw",value:function(){var t=this.body.nodes[this.lockedOnNodeId].x,e=this.body.nodes[this.lockedOnNodeId].y,n=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),r=n.x-t,i=n.y-e,o=this.body.view.translation,g={x:o.x+r*this.body.view.scale+this.lockedOnNodeOffset.x,y:o.y+i*this.body.view.scale+this.lockedOnNodeOffset.y};this.body.view.translation=g}},{key:"releaseNode",value:function(){void 0!==this.lockedOnNodeId&&void 0!==this.viewFunction&&(this.body.emitter.off("initRedraw",this.viewFunction),this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0)}},{key:"_transitionRedraw",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.easingTime+=this.animationSpeed,this.easingTime=!0===t?1:this.easingTime;var e,n=Hb[this.animationEasingFunction](this.easingTime);(this.body.view.scale=this.sourceScale+(this.targetScale-this.sourceScale)*n,this.body.view.translation={x:this.sourceTranslation.x+(this.targetTranslation.x-this.sourceTranslation.x)*n,y:this.sourceTranslation.y+(this.targetTranslation.y-this.sourceTranslation.y)*n},this.easingTime>=1)&&(this.body.emitter.off("initRedraw",this.viewFunction),this.easingTime=0,null!=this.lockedOnNodeId&&(this.viewFunction=wi(e=this._lockedRedraw).call(e,this),this.body.emitter.on("initRedraw",this.viewFunction)),this.body.emitter.emit("animationFinished"))}},{key:"getScale",value:function(){return this.body.view.scale}},{key:"getViewPosition",value:function(){return this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight})}}]),t}();function ZD(t){var e,n=t&&t.preventDefault||!1,r=t&&t.container||window,i={},o={keydown:{},keyup:{}},g={};for(e=97;e<=122;e++)g[String.fromCharCode(e)]={code:e-97+65,shift:!1};for(e=65;e<=90;e++)g[String.fromCharCode(e)]={code:e,shift:!0};for(e=0;e<=9;e++)g[""+e]={code:48+e,shift:!1};for(e=1;e<=12;e++)g["F"+e]={code:111+e,shift:!1};for(e=0;e<=9;e++)g["num"+e]={code:96+e,shift:!1};g["num*"]={code:106,shift:!1},g["num+"]={code:107,shift:!1},g["num-"]={code:109,shift:!1},g["num/"]={code:111,shift:!1},g["num."]={code:110,shift:!1},g.left={code:37,shift:!1},g.up={code:38,shift:!1},g.right={code:39,shift:!1},g.down={code:40,shift:!1},g.space={code:32,shift:!1},g.enter={code:13,shift:!1},g.shift={code:16,shift:void 0},g.esc={code:27,shift:!1},g.backspace={code:8,shift:!1},g.tab={code:9,shift:!1},g.ctrl={code:17,shift:!1},g.alt={code:18,shift:!1},g.delete={code:46,shift:!1},g.pageup={code:33,shift:!1},g.pagedown={code:34,shift:!1},g["="]={code:187,shift:!1},g["-"]={code:189,shift:!1},g["]"]={code:221,shift:!1},g["["]={code:219,shift:!1};var s=function(t){C(t,"keydown")},A=function(t){C(t,"keyup")},C=function(t,e){if(void 0!==o[e][t.keyCode]){for(var r=o[e][t.keyCode],i=0;i700&&(this.body.emitter.emit("fit",{duration:700}),this.touchTime=(new Date).valueOf())}},{key:"_stopMovement",value:function(){for(var t in this.boundFunctions)Object.prototype.hasOwnProperty.call(this.boundFunctions,t)&&(this.body.emitter.off("initRedraw",this.boundFunctions[t]),this.body.emitter.emit("_stopRendering"));this.boundFunctions={}}},{key:"_moveUp",value:function(){this.body.view.translation.y+=this.options.keyboard.speed.y}},{key:"_moveDown",value:function(){this.body.view.translation.y-=this.options.keyboard.speed.y}},{key:"_moveLeft",value:function(){this.body.view.translation.x+=this.options.keyboard.speed.x}},{key:"_moveRight",value:function(){this.body.view.translation.x-=this.options.keyboard.speed.x}},{key:"_zoomIn",value:function(){var t=this.body.view.scale,e=this.body.view.scale*(1+this.options.keyboard.speed.zoom),n=this.body.view.translation,r=e/t,i=(1-r)*this.canvas.canvasViewCenter.x+n.x*r,o=(1-r)*this.canvas.canvasViewCenter.y+n.y*r;this.body.view.scale=e,this.body.view.translation={x:i,y:o},this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:null})}},{key:"_zoomOut",value:function(){var t=this.body.view.scale,e=this.body.view.scale/(1+this.options.keyboard.speed.zoom),n=this.body.view.translation,r=e/t,i=(1-r)*this.canvas.canvasViewCenter.x+n.x*r,o=(1-r)*this.canvas.canvasViewCenter.y+n.y*r;this.body.view.scale=e,this.body.view.translation={x:i,y:o},this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:null})}},{key:"configureKeyboardBindings",value:function(){var t,e,n,r,i,o,g,s,A,C,I,a,u,c,l,h,d,f,p,v,y,b,m,w,_=this;void 0!==this.keycharm&&this.keycharm.destroy(),!0===this.options.keyboard.enabled&&(!0===this.options.keyboard.bindToWindow?this.keycharm=ZD({container:window,preventDefault:!0}):this.keycharm=ZD({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),!0===this.activated&&(wi(t=this.keycharm).call(t,"up",(function(){_.bindToRedraw("_moveUp")}),"keydown"),wi(e=this.keycharm).call(e,"down",(function(){_.bindToRedraw("_moveDown")}),"keydown"),wi(n=this.keycharm).call(n,"left",(function(){_.bindToRedraw("_moveLeft")}),"keydown"),wi(r=this.keycharm).call(r,"right",(function(){_.bindToRedraw("_moveRight")}),"keydown"),wi(i=this.keycharm).call(i,"=",(function(){_.bindToRedraw("_zoomIn")}),"keydown"),wi(o=this.keycharm).call(o,"num+",(function(){_.bindToRedraw("_zoomIn")}),"keydown"),wi(g=this.keycharm).call(g,"num-",(function(){_.bindToRedraw("_zoomOut")}),"keydown"),wi(s=this.keycharm).call(s,"-",(function(){_.bindToRedraw("_zoomOut")}),"keydown"),wi(A=this.keycharm).call(A,"[",(function(){_.bindToRedraw("_zoomOut")}),"keydown"),wi(C=this.keycharm).call(C,"]",(function(){_.bindToRedraw("_zoomIn")}),"keydown"),wi(I=this.keycharm).call(I,"pageup",(function(){_.bindToRedraw("_zoomIn")}),"keydown"),wi(a=this.keycharm).call(a,"pagedown",(function(){_.bindToRedraw("_zoomOut")}),"keydown"),wi(u=this.keycharm).call(u,"up",(function(){_.unbindFromRedraw("_moveUp")}),"keyup"),wi(c=this.keycharm).call(c,"down",(function(){_.unbindFromRedraw("_moveDown")}),"keyup"),wi(l=this.keycharm).call(l,"left",(function(){_.unbindFromRedraw("_moveLeft")}),"keyup"),wi(h=this.keycharm).call(h,"right",(function(){_.unbindFromRedraw("_moveRight")}),"keyup"),wi(d=this.keycharm).call(d,"=",(function(){_.unbindFromRedraw("_zoomIn")}),"keyup"),wi(f=this.keycharm).call(f,"num+",(function(){_.unbindFromRedraw("_zoomIn")}),"keyup"),wi(p=this.keycharm).call(p,"num-",(function(){_.unbindFromRedraw("_zoomOut")}),"keyup"),wi(v=this.keycharm).call(v,"-",(function(){_.unbindFromRedraw("_zoomOut")}),"keyup"),wi(y=this.keycharm).call(y,"[",(function(){_.unbindFromRedraw("_zoomOut")}),"keyup"),wi(b=this.keycharm).call(b,"]",(function(){_.unbindFromRedraw("_zoomIn")}),"keyup"),wi(m=this.keycharm).call(m,"pageup",(function(){_.unbindFromRedraw("_zoomIn")}),"keyup"),wi(w=this.keycharm).call(w,"pagedown",(function(){_.unbindFromRedraw("_zoomOut")}),"keyup")))}}]),t}();function VD(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n50&&(this.drag.pointer=this.getPointer(t.center),this.drag.pinched=!1,this.pinch.scale=this.body.view.scale,this.touchTime=(new Date).valueOf())}},{key:"onTap",value:function(t){var e=this.getPointer(t.center),n=this.selectionHandler.options.multiselect&&(t.changedPointers[0].ctrlKey||t.changedPointers[0].metaKey);this.checkSelectionChanges(e,n),this.selectionHandler.commitAndEmit(e,t),this.selectionHandler.generateClickEvent("click",t,e)}},{key:"onDoubleTap",value:function(t){var e=this.getPointer(t.center);this.selectionHandler.generateClickEvent("doubleClick",t,e)}},{key:"onHold",value:function(t){var e=this.getPointer(t.center),n=this.selectionHandler.options.multiselect;this.checkSelectionChanges(e,n),this.selectionHandler.commitAndEmit(e,t),this.selectionHandler.generateClickEvent("click",t,e),this.selectionHandler.generateClickEvent("hold",t,e)}},{key:"onRelease",value:function(t){if((new Date).valueOf()-this.touchTime>10){var e=this.getPointer(t.center);this.selectionHandler.generateClickEvent("release",t,e),this.touchTime=(new Date).valueOf()}}},{key:"onContext",value:function(t){var e=this.getPointer({x:t.clientX,y:t.clientY});this.selectionHandler.generateClickEvent("oncontext",t,e)}},{key:"checkSelectionChanges",value:function(t){!0===(arguments.length>1&&void 0!==arguments[1]&&arguments[1])?this.selectionHandler.selectAdditionalOnPoint(t):this.selectionHandler.selectOnPoint(t)}},{key:"_determineDifference",value:function(t,e){var n=function(t,e){for(var n=[],r=0;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,g=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return g=t.done,t},e:function(t){s=!0,o=t},f:function(){try{g||null==n.return||n.return()}finally{if(s)throw o}}}}(this.selectionHandler.getSelectedNodes());try{for(i.s();!(r=i.n()).done;){var o=r.value,g={id:o.id,node:o,x:o.x,y:o.y,xFixed:o.options.fixed.x,yFixed:o.options.fixed.y};o.options.fixed.x=!0,o.options.fixed.y=!0,this.drag.selection.push(g)}}catch(t){i.e(t)}finally{i.f()}}else this.selectionHandler.generateClickEvent("dragStart",t,this.drag.pointer,void 0,!0)}}},{key:"onDrag",value:function(t){var e=this;if(!0!==this.drag.pinched){this.body.emitter.emit("unlockNode");var n=this.getPointer(t.center),r=this.drag.selection;if(r&&r.length&&!0===this.options.dragNodes){this.selectionHandler.generateClickEvent("dragging",t,n);var i=n.x-this.drag.pointer.x,o=n.y-this.drag.pointer.y;Hh(r).call(r,(function(t){var n=t.node;!1===t.xFixed&&(n.x=e.canvas._XconvertDOMtoCanvas(e.canvas._XconvertCanvasToDOM(t.x)+i)),!1===t.yFixed&&(n.y=e.canvas._YconvertDOMtoCanvas(e.canvas._YconvertCanvasToDOM(t.y)+o))})),this.body.emitter.emit("startSimulation")}else{if(t.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent("dragging",t,n,void 0,!0),void 0===this.drag.pointer)return void this.onDragStart(t);this.body.selectionBox.position.end={x:this.canvas._XconvertDOMtoCanvas(n.x),y:this.canvas._YconvertDOMtoCanvas(n.y)},this.body.emitter.emit("_requestRedraw")}if(!0===this.options.dragView&&!t.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent("dragging",t,n,void 0,!0),void 0===this.drag.pointer)return void this.onDragStart(t);var g=n.x-this.drag.pointer.x,s=n.y-this.drag.pointer.y;this.body.view.translation={x:this.drag.translation.x+g,y:this.drag.translation.y+s},this.body.emitter.emit("_requestRedraw")}}}}},{key:"onDragEnd",value:function(t){var e=this;if(this.drag.dragging=!1,this.body.selectionBox.show){var n;this.body.selectionBox.show=!1;var r=this.body.selectionBox.position,i={minX:Math.min(r.start.x,r.end.x),minY:Math.min(r.start.y,r.end.y),maxX:Math.max(r.start.x,r.end.x),maxY:Math.max(r.start.y,r.end.y)},o=vf(n=this.body.nodeIndices).call(n,(function(t){var n=e.body.nodes[t];return n.x>=i.minX&&n.x<=i.maxX&&n.y>=i.minY&&n.y<=i.maxY}));Hh(o).call(o,(function(t){return e.selectionHandler.selectObject(e.body.nodes[t])}));var g=this.getPointer(t.center);this.selectionHandler.commitAndEmit(g,t),this.selectionHandler.generateClickEvent("dragEnd",t,this.getPointer(t.center),void 0,!0),this.body.emitter.emit("_requestRedraw")}else{var s=this.drag.selection;s&&s.length?(Hh(s).call(s,(function(t){t.node.options.fixed.x=t.xFixed,t.node.options.fixed.y=t.yFixed})),this.selectionHandler.generateClickEvent("dragEnd",t,this.getPointer(t.center)),this.body.emitter.emit("startSimulation")):(this.selectionHandler.generateClickEvent("dragEnd",t,this.getPointer(t.center),void 0,!0),this.body.emitter.emit("_requestRedraw"))}}},{key:"onPinch",value:function(t){var e=this.getPointer(t.center);this.drag.pinched=!0,void 0===this.pinch.scale&&(this.pinch.scale=1);var n=this.pinch.scale*t.scale;this.zoom(n,e)}},{key:"zoom",value:function(t,e){if(!0===this.options.zoomView){var n=this.body.view.scale;t<1e-5&&(t=1e-5),t>10&&(t=10);var r=void 0;void 0!==this.drag&&!0===this.drag.dragging&&(r=this.canvas.DOMtoCanvas(this.drag.pointer));var i=this.body.view.translation,o=t/n,g=(1-o)*e.x+i.x*o,s=(1-o)*e.y+i.y*o;if(this.body.view.scale=t,this.body.view.translation={x:g,y:s},null!=r){var A=this.canvas.canvasToDOM(r);this.drag.pointer.x=A.x,this.drag.pointer.y=A.y}this.body.emitter.emit("_requestRedraw"),n0&&(this.popupObj=C[I[I.length-1]],o=!0)}if(void 0===this.popupObj&&!1===o){for(var u,c=this.body.edgeIndices,l=this.body.edges,h=[],d=0;d0&&(this.popupObj=l[h[h.length-1]],g="edge")}void 0!==this.popupObj?this.popupObj.id!==i&&(void 0===this.popup&&(this.popup=new sm(this.canvas.frame)),this.popup.popupTargetType=g,this.popup.popupTargetId=this.popupObj.id,this.popup.setPosition(t.x+3,t.y-5),this.popup.setText(this.popupObj.getTitle()),this.popup.show(),this.body.emitter.emit("showPopup",this.popupObj.id)):void 0!==this.popup&&(this.popup.hide(),this.body.emitter.emit("hidePopup"))}},{key:"_checkHidePopup",value:function(t){var e=this.selectionHandler._pointerToPositionObject(t),n=!1;if("node"===this.popup.popupTargetType){if(void 0!==this.body.nodes[this.popup.popupTargetId]&&!0===(n=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(e))){var r=this.selectionHandler.getNodeAt(t);n=void 0!==r&&r.id===this.popup.popupTargetId}}else void 0===this.selectionHandler.getNodeAt(t)&&void 0!==this.body.edges[this.popup.popupTargetId]&&(n=this.body.edges[this.popup.popupTargetId].isOverlappingWith(e));!1===n&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit("hidePopup"))}}]),t}(),WD={},YD={get exports(){return WD},set exports(t){WD=t}},HD=tt,KD=Kw,QD=Vm.getWeakData,XD=Sw,qD=Ln,JD=Tt,$D=Lt,tM=Ow,eM=De,nM=xo.set,rM=xo.getterFor,iM=ZC.find,oM=ZC.findIndex,gM=HD([].splice),sM=0,AM=function(t){return t.frozen||(t.frozen=new CM)},CM=function(){this.entries=[]},IM=function(t,e){return iM(t.entries,(function(t){return t[0]===e}))};CM.prototype={get:function(t){var e=IM(this,t);if(e)return e[1]},has:function(t){return!!IM(this,t)},set:function(t,e){var n=IM(this,t);n?n[1]=e:this.entries.push([t,e])},delete:function(t){var e=oM(this.entries,(function(e){return e[0]===t}));return~e&&gM(this.entries,e,1),!!~e}};var aM,uM={getConstructor:function(t,e,n,r){var i=t((function(t,i){XD(t,o),nM(t,{type:e,id:sM++,frozen:void 0}),JD(i)||tM(i,t[r],{that:t,AS_ENTRIES:n})})),o=i.prototype,g=rM(e),s=function(t,e,n){var r=g(t),i=QD(qD(e),!0);return!0===i?AM(r).set(e,n):i[r.id]=n,t};return KD(o,{delete:function(t){var e=g(this);if(!$D(t))return!1;var n=QD(t);return!0===n?AM(e).delete(t):n&&eM(n,e.id)&&delete n[e.id]},has:function(t){var e=g(this);if(!$D(t))return!1;var n=QD(t);return!0===n?AM(e).has(t):n&&eM(n,e.id)}}),KD(o,n?{get:function(t){var e=g(this);if($D(t)){var n=QD(t);return!0===n?AM(e).get(t):n?n[e.id]:void 0}},set:function(t,e){return s(this,t,e)}}:{add:function(t){return s(this,t,!0)}}),i}},cM=Jm,lM=U,hM=tt,dM=Kw,fM=Vm,pM=Yw,vM=uM,yM=Lt,bM=xo.enforce,mM=V,wM=so,_M=Object,xM=Array.isArray,EM=_M.isExtensible,OM=_M.isFrozen,kM=_M.isSealed,TM=_M.freeze,SM=_M.seal,PM={},NM={},RM=!lM.ActiveXObject&&"ActiveXObject"in lM,DM=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},MM=pM("WeakMap",DM,vM),jM=MM.prototype,BM=hM(jM.set);if(wM)if(RM){aM=vM.getConstructor(DM,"WeakMap",!0),fM.enable();var LM=hM(jM.delete),FM=hM(jM.has),zM=hM(jM.get);dM(jM,{delete:function(t){if(yM(t)&&!EM(t)){var e=bM(this);return e.frozen||(e.frozen=new aM),LM(this,t)||e.frozen.delete(t)}return LM(this,t)},has:function(t){if(yM(t)&&!EM(t)){var e=bM(this);return e.frozen||(e.frozen=new aM),FM(this,t)||e.frozen.has(t)}return FM(this,t)},get:function(t){if(yM(t)&&!EM(t)){var e=bM(this);return e.frozen||(e.frozen=new aM),FM(this,t)?zM(this,t):e.frozen.get(t)}return zM(this,t)},set:function(t,e){if(yM(t)&&!EM(t)){var n=bM(this);n.frozen||(n.frozen=new aM),FM(this,t)?BM(this,t,e):n.frozen.set(t,e)}else BM(this,t,e);return this}})}else cM&&mM((function(){var t=TM([]);return BM(new MM,t,1),!OM(t)}))&&dM(jM,{set:function(t,e){var n;return xM(t)&&(OM(t)?n=PM:kM(t)&&(n=NM)),BM(this,t,e),n==PM&&TM(t),n==NM&&SM(t),this}});var ZM=Ft.WeakMap;!function(t){t.exports=ZM}(YD);var UM,VM,GM,WM,YM,HM=L(WD);function KM(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)}function QM(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n}function XM(t,e){var n=void 0!==Kl&&KA(t)||t["@@iterator"];if(!n){if(Ih(t)||(n=function(t,e){var n;if(t){if("string"==typeof t)return qM(t,e);var r=ih(n=Object.prototype.toString.call(t)).call(n,8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?xA(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?qM(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,g=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return g=t.done,t},e:function(t){s=!0,o=t},f:function(){try{g||null==n.return||n.return()}finally{if(s)throw o}}}}function qM(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:function(){};Fu(this,t),GM.set(this,new $M),WM.set(this,new $M),YM.set(this,void 0),QM(this,YM,e,"f")}return il(t,[{key:"sizeNodes",get:function(){return KM(this,GM,"f").size}},{key:"sizeEdges",get:function(){return KM(this,WM,"f").size}},{key:"getNodes",value:function(){return KM(this,GM,"f").getSelection()}},{key:"getEdges",value:function(){return KM(this,WM,"f").getSelection()}},{key:"addNodes",value:function(){var t;(t=KM(this,GM,"f")).add.apply(t,arguments)}},{key:"addEdges",value:function(){var t;(t=KM(this,WM,"f")).add.apply(t,arguments)}},{key:"deleteNodes",value:function(t){KM(this,GM,"f").delete(t)}},{key:"deleteEdges",value:function(t){KM(this,WM,"f").delete(t)}},{key:"clear",value:function(){KM(this,GM,"f").clear(),KM(this,WM,"f").clear()}},{key:"commit",value:function(){for(var t,e,n={nodes:KM(this,GM,"f").commit(),edges:KM(this,WM,"f").commit()},r=arguments.length,i=new Array(r),o=0;o=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,g=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return g=t.done,t},e:function(t){s=!0,o=t},f:function(){try{g||null==n.return||n.return()}finally{if(s)throw o}}}}function nj(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n4&&void 0!==arguments[4]&&arguments[4],o=this._initBaseEvent(e,n);if(!0===i)o.nodes=[],o.edges=[];else{var g=this.getSelection();o.nodes=g.nodes,o.edges=g.edges}void 0!==r&&(o.previousSelection=r),"click"==t&&(o.items=this.getClickedItems(n)),void 0!==e.controlEdge&&(o.controlEdge=e.controlEdge),this.body.emitter.emit(t,o)}},{key:"selectObject",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.selectConnectedEdges;if(void 0!==t){var n;if(t instanceof pR)!0===e&&(n=this._selectionAccumulator).addEdges.apply(n,Yl(t.edges)),this._selectionAccumulator.addNodes(t);else this._selectionAccumulator.addEdges(t);return!0}return!1}},{key:"deselectObject",value:function(t){!0===t.isSelected()&&(t.selected=!1,this._removeFromSelection(t))}},{key:"_getAllNodesOverlappingWith",value:function(t){for(var e=[],n=this.body.nodes,r=0;r1&&void 0!==arguments[1])||arguments[1],n=this._pointerToPositionObject(t),r=this._getAllNodesOverlappingWith(n);return r.length>0?!0===e?this.body.nodes[r[r.length-1]]:r[r.length-1]:void 0}},{key:"_getEdgesOverlappingWith",value:function(t,e){for(var n=this.body.edges,r=0;r1&&void 0!==arguments[1])||arguments[1],n=this.canvas.DOMtoCanvas(t),r=10,i=null,o=this.body.edges,g=0;g0&&(this.generateClickEvent("deselectEdge",e,t,i),n=!0),r.nodes.deleted.length>0&&(this.generateClickEvent("deselectNode",e,t,i),n=!0),r.nodes.added.length>0&&(this.generateClickEvent("selectNode",e,t),n=!0),r.edges.added.length>0&&(this.generateClickEvent("selectEdge",e,t),n=!0),!0===n&&this.generateClickEvent("select",e,t)}},{key:"getSelection",value:function(){return{nodes:this.getSelectedNodeIds(),edges:this.getSelectedEdgeIds()}}},{key:"getSelectedNodes",value:function(){return this._selectionAccumulator.getNodes()}},{key:"getSelectedEdges",value:function(){return this._selectionAccumulator.getEdges()}},{key:"getSelectedNodeIds",value:function(){var t;return vh(t=this._selectionAccumulator.getNodes()).call(t,(function(t){return t.id}))}},{key:"getSelectedEdgeIds",value:function(){var t;return vh(t=this._selectionAccumulator.getEdges()).call(t,(function(t){return t.id}))}},{key:"setSelection",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t||!t.nodes&&!t.edges)throw new TypeError("Selection must be an object with nodes and/or edges properties");if((e.unselectAll||void 0===e.unselectAll)&&this.unselectAll(),t.nodes){var n,r=ej(t.nodes);try{for(r.s();!(n=r.n()).done;){var i=n.value,o=this.body.nodes[i];if(!o)throw new RangeError('Node with id "'+i+'" not found');this.selectObject(o,e.highlightEdges)}}catch(t){r.e(t)}finally{r.f()}}if(t.edges){var g,s=ej(t.edges);try{for(s.s();!(g=s.n()).done;){var A=g.value,C=this.body.edges[A];if(!C)throw new RangeError('Edge with id "'+A+'" not found');this.selectObject(C)}}catch(t){s.e(t)}finally{s.f()}}this.body.emitter.emit("_requestRedraw"),this._selectionAccumulator.commit()}},{key:"selectNodes",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!t||void 0===t.length)throw"Selection must be an array with ids";this.setSelection({nodes:t},{highlightEdges:e})}},{key:"selectEdges",value:function(t){if(!t||void 0===t.length)throw"Selection must be an array with ids";this.setSelection({edges:t})}},{key:"updateSelection",value:function(){for(var t in this._selectionAccumulator.getNodes())Object.prototype.hasOwnProperty.call(this.body.nodes,t.id)||this._selectionAccumulator.deleteNodes(t);for(var e in this._selectionAccumulator.getEdges())Object.prototype.hasOwnProperty.call(this.body.edges,e.id)||this._selectionAccumulator.deleteEdges(e)}},{key:"getClickedItems",value:function(t){for(var e=this.canvas.DOMtoCanvas(t),n=[],r=this.body.nodeIndices,i=this.body.nodes,o=r.length-1;o>=0;o--){var g=i[r[o]].getItemsOnPoint(e);n.push.apply(n,g)}for(var s=this.body.edgeIndices,A=this.body.edges,C=s.length-1;C>=0;C--){var I=A[s[C]].getItemsOnPoint(e);n.push.apply(n,I)}return n}}]),t}(),ij={},oj={get exports(){return ij},set exports(t){ij=t}},gj={};!function(t){!function(t){t.__esModule=!0,t.sort=function(t,n,r,s){if(!Array.isArray(t))throw new TypeError("Can only sort arrays");n?"function"!=typeof n&&(s=r,r=n,n=i):n=i,r||(r=0),s||(s=t.length);var A=s-r;if(!(A<2)){var I=0;if(A=e;)n|=1&t,t>>=1;return t+n}(A);do{if((I=o(t,r,s,n))u&&(c=u),g(t,r,r+c,r+I,n),I=c}a.pushRun(r,I),a.mergeRuns(),A-=I,r+=I}while(0!==A);a.forceMergeRuns()}}};var e=32,n=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9];function r(t){return t<1e5?t<100?t<10?0:1:t<1e4?t<1e3?2:3:4:t<1e7?t<1e6?5:6:t<1e9?t<1e8?7:8:9}function i(t,e){if(t===e)return 0;if(~~t===t&&~~e===e){if(0===t||0===e)return t=0)return-1;if(t>=0)return 1;t=-t,e=-e}var i=r(t),o=r(e),g=0;return io&&(e*=n[i-o-1],t/=10,g=1),t===e?g:t=0;)i++;return i-e}function g(t,e,n,r,i){for(r===e&&r++;r>>1;i(o,t[A])<0?s=A:g=A+1}var C=r-g;switch(C){case 3:t[g+3]=t[g+2];case 2:t[g+2]=t[g+1];case 1:t[g+1]=t[g];break;default:for(;C>0;)t[g+C]=t[g+C-1],C--}t[g]=o}}function s(t,e,n,r,i,o){var g=0,s=0,A=1;if(o(t,e[n+i])>0){for(s=r-i;A0;)g=A,(A=1+(A<<1))<=0&&(A=s);A>s&&(A=s),g+=i,A+=i}else{for(s=i+1;As&&(A=s);var C=g;g=i-A,A=i-C}for(g++;g>>1);o(t,e[n+I])>0?g=I+1:A=I}return A}function A(t,e,n,r,i,o){var g=0,s=0,A=1;if(o(t,e[n+i])<0){for(s=i+1;As&&(A=s);var C=g;g=i-A,A=i-C}else{for(s=r-i;A=0;)g=A,(A=1+(A<<1))<=0&&(A=s);A>s&&(A=s),g+=i,A+=i}for(g++;g>>1);o(t,e[n+I])<0?A=I:g=I+1}return A}var C=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.array=null,this.compare=null,this.minGallop=7,this.length=0,this.tmpStorageLength=256,this.stackLength=0,this.runStart=null,this.runLength=null,this.stackSize=0,this.array=e,this.compare=n,this.length=e.length,this.length<512&&(this.tmpStorageLength=this.length>>>1),this.tmp=new Array(this.tmpStorageLength),this.stackLength=this.length<120?5:this.length<1542?10:this.length<119151?19:40,this.runStart=new Array(this.stackLength),this.runLength=new Array(this.stackLength)}return t.prototype.pushRun=function(t,e){this.runStart[this.stackSize]=t,this.runLength[this.stackSize]=e,this.stackSize+=1},t.prototype.mergeRuns=function(){for(;this.stackSize>1;){var t=this.stackSize-2;if(t>=1&&this.runLength[t-1]<=this.runLength[t]+this.runLength[t+1]||t>=2&&this.runLength[t-2]<=this.runLength[t]+this.runLength[t-1])this.runLength[t-1]this.runLength[t+1])break;this.mergeAt(t)}},t.prototype.forceMergeRuns=function(){for(;this.stackSize>1;){var t=this.stackSize-2;t>0&&this.runLength[t-1]=7||h>=7);if(d)break;c<0&&(c=0),c+=2}if(this.minGallop=c,c<1&&(this.minGallop=1),1===e){for(C=0;C=0;C--)o[l+C]=o[c+C];if(0===e){p=!0;break}}if(o[u--]=g[a--],1==--r){p=!0;break}if(0!=(f=r-s(o[I],g,0,r,r-1,i))){for(r-=f,l=1+(u-=f),c=1+(a-=f),C=0;C=7||f>=7);if(p)break;h<0&&(h=0),h+=2}if(this.minGallop=h,h<1&&(this.minGallop=1),1===r){for(l=1+(u-=e),c=1+(I-=e),C=e-1;C>=0;C--)o[l+C]=o[c+C];o[u]=g[a]}else{if(0===r)throw new Error("mergeHigh preconditions were not respected");for(c=u-(r-1),C=0;C=0;C--)o[l+C]=o[c+C];o[u]=g[a]}else for(c=u-(r-1),C=0;C2&&void 0!==arguments[2]?arguments[2]:void 0;this.fake_use(t,e,n),this.abstract()}},{key:"getTreeSize",value:function(t){return this.fake_use(t),this.abstract()}},{key:"sort",value:function(t){this.fake_use(t),this.abstract()}},{key:"fix",value:function(t,e){this.fake_use(t,e),this.abstract()}},{key:"shift",value:function(t,e){this.fake_use(t,e),this.abstract()}}]),t}(),Ij=function(t){tx(n,t);var e=Aj(n);function n(t){var r;return Fu(this,n),(r=e.call(this)).layout=t,r}return il(n,[{key:"curveType",value:function(){return"horizontal"}},{key:"getPosition",value:function(t){return t.x}},{key:"setPosition",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;void 0!==n&&this.layout.hierarchical.addToOrdering(t,n),t.x=e}},{key:"getTreeSize",value:function(t){var e=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,t);return{min:e.min_x,max:e.max_x}}},{key:"sort",value:function(t){ij.sort(t,(function(t,e){return t.x-e.x}))}},{key:"fix",value:function(t,e){t.y=this.layout.options.hierarchical.levelSeparation*e,t.options.fixed.y=!0}},{key:"shift",value:function(t,e){this.layout.body.nodes[t].x+=e}}]),n}(Cj),aj=function(t){tx(n,t);var e=Aj(n);function n(t){var r;return Fu(this,n),(r=e.call(this)).layout=t,r}return il(n,[{key:"curveType",value:function(){return"vertical"}},{key:"getPosition",value:function(t){return t.y}},{key:"setPosition",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;void 0!==n&&this.layout.hierarchical.addToOrdering(t,n),t.y=e}},{key:"getTreeSize",value:function(t){var e=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,t);return{min:e.min_y,max:e.max_y}}},{key:"sort",value:function(t){ij.sort(t,(function(t,e){return t.y-e.y}))}},{key:"fix",value:function(t,e){t.x=this.layout.options.hierarchical.levelSeparation*e,t.options.fixed.x=!0}},{key:"shift",value:function(t,e){this.layout.body.nodes[t].y+=e}}]),n}(Cj),uj={},cj={get exports(){return uj},set exports(t){uj=t}},lj=ZC.every;Ir({target:"Array",proto:!0,forced:!jh("every")},{every:function(t){return lj(this,t,arguments.length>1?arguments[1]:void 0)}});var hj=fi("Array").every,dj=Wt,fj=hj,pj=Array.prototype,vj=function(t){var e=t.every;return t===pj||dj(pj,t)&&e===pj.every?fj:e};!function(t){t.exports=vj}(cj);var yj=L(uj);function bj(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=e[r])&&(e[r]=e[n]+1)})),e}function wj(t,e,n,r){var i,o,g=Sp(null),s=UT(i=Yl(_P(r).call(r))).call(i,(function(t,e){return t+1+e.edges.length}),0),A=n+"Id",C="to"===n?1:-1,I=function(t,e){var n=void 0!==Kl&&KA(t)||t["@@iterator"];if(!n){if(Ih(t)||(n=function(t,e){var n;if(t){if("string"==typeof t)return bj(t,e);var r=ih(n=Object.prototype.toString.call(t)).call(n,8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?xA(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?bj(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,g=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return g=t.done,t},e:function(t){s=!0,o=t},f:function(){try{g||null==n.return||n.return()}finally{if(s)throw o}}}}(r);try{var a=function(){var i=Wl(o.value,2),I=i[0],a=i[1];if(!r.has(I)||!t(a))return"continue";g[I]=0;for(var u,c=[a],l=0,h=function(){var t,i;if(!r.has(I))return"continue";var o=g[u.id]+C;if(Hh(t=vf(i=u.edges).call(i,(function(t){return t.connected&&t.to!==t.from&&t[n]!==u&&r.has(t.toId)&&r.has(t.fromId)}))).call(t,(function(t){var r=t[A],i=g[r];(null==i||e(o,i))&&(g[r]=o,c.push(t[n]))})),l>s)return{v:{v:mj(r,g)}};++l};u=c.pop();){var d=h();if("continue"!==d&&"object"===Qc(d))return d.v}};for(I.s();!(o=I.n()).done;){var u=a();if("continue"!==u&&"object"===Qc(u))return u.v}}catch(t){I.e(t)}finally{I.f()}return g}var _j=function(){function t(){Fu(this,t),this.childrenReference={},this.parentReference={},this.trees={},this.distributionOrdering={},this.levels={},this.distributionIndex={},this.isTree=!1,this.treeIndex=-1}return il(t,[{key:"addRelation",value:function(t,e){void 0===this.childrenReference[t]&&(this.childrenReference[t]=[]),this.childrenReference[t].push(e),void 0===this.parentReference[e]&&(this.parentReference[e]=[]),this.parentReference[e].push(t)}},{key:"checkIfTree",value:function(){for(var t in this.parentReference)if(this.parentReference[t].length>1)return void(this.isTree=!1);this.isTree=!0}},{key:"numTrees",value:function(){return this.treeIndex+1}},{key:"setTreeIndex",value:function(t,e){void 0!==e&&void 0===this.trees[t.id]&&(this.trees[t.id]=e,this.treeIndex=Math.max(e,this.treeIndex))}},{key:"ensureLevel",value:function(t){void 0===this.levels[t]&&(this.levels[t]=0)}},{key:"getMaxLevel",value:function(t){var e=this,n={};return function t(r){if(void 0!==n[r])return n[r];var i=e.levels[r];if(e.childrenReference[r]){var o=e.childrenReference[r];if(o.length>0)for(var g=0;g0&&(n.levelSeparation*=-1):n.levelSeparation<0&&(n.levelSeparation*=-1),this.setDirectionStrategy(),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(e);if(!0===r)return this.body.emitter.emit("refresh"),Nb(e,this.optionsBackup)}return e}},{key:"_resetRNG",value:function(t){this.initialRandomSeed=t,this._rng=pb(this.initialRandomSeed)}},{key:"adaptAllOptionsForHierarchicalLayout",value:function(t){if(!0===this.options.hierarchical.enabled){var e=this.optionsBackup.physics;void 0===t.physics||!0===t.physics?(t.physics={enabled:void 0===e.enabled||e.enabled,solver:"hierarchicalRepulsion"},e.enabled=void 0===e.enabled||e.enabled,e.solver=e.solver||"barnesHut"):"object"===Qc(t.physics)?(e.enabled=void 0===t.physics.enabled||t.physics.enabled,e.solver=t.physics.solver||"barnesHut",t.physics.solver="hierarchicalRepulsion"):!1!==t.physics&&(e.solver="barnesHut",t.physics={solver:"hierarchicalRepulsion"});var n=this.direction.curveType();if(void 0===t.edges)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},t.edges={smooth:!1};else if(void 0===t.edges.smooth)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},t.edges.smooth=!1;else if("boolean"==typeof t.edges.smooth)this.optionsBackup.edges={smooth:t.edges.smooth},t.edges.smooth={enabled:t.edges.smooth,type:n};else{var r=t.edges.smooth;void 0!==r.type&&"dynamic"!==r.type&&(n=r.type),this.optionsBackup.edges={smooth:{enabled:void 0===r.enabled||r.enabled,type:void 0===r.type?"dynamic":r.type,roundness:void 0===r.roundness?.5:r.roundness,forceDirection:void 0!==r.forceDirection&&r.forceDirection}},t.edges.smooth={enabled:void 0===r.enabled||r.enabled,type:n,roundness:void 0===r.roundness?.5:r.roundness,forceDirection:void 0!==r.forceDirection&&r.forceDirection}}this.body.emitter.emit("_forceDisableDynamicCurves",n)}return t}},{key:"positionInitially",value:function(t){if(!0!==this.options.hierarchical.enabled){this._resetRNG(this.initialRandomSeed);for(var e=t.length+50,n=0;ni){for(var g=t.length;t.length>i&&r<=10;){r+=1;var s=t.length;if(r%3==0?this.body.modules.clustering.clusterBridges(o):this.body.modules.clustering.clusterOutliers(o),s==t.length&&r%3!=0)return this._declusterAll(),this.body.emitter.emit("_layoutFailed"),void console.info("This network could not be positioned by this version of the improved layout algorithm. Please disable improvedLayout for better performance.")}this.body.modules.kamadaKawai.setOptions({springLength:Math.max(150,2*g)})}r>10&&console.info("The clustering didn't succeed within the amount of interations allowed, progressing with partial result."),this.body.modules.kamadaKawai.solve(t,this.body.edgeIndices,!0),this._shiftToCenter();for(var A=0;A0){var t,e,n=!1,r=!1;for(e in this.lastNodeOnLevel={},this.hierarchical=new _j,this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,e)&&(void 0!==(t=this.body.nodes[e]).options.level?(n=!0,this.hierarchical.levels[e]=t.options.level):r=!0);if(!0===r&&!0===n)throw new Error("To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.");if(!0===r){var i=this.options.hierarchical.sortMethod;"hubsize"===i?this._determineLevelsByHubsize():"directed"===i?this._determineLevelsDirected():"custom"===i&&this._determineLevelsCustomCallback()}for(var o in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,o)&&this.hierarchical.ensureLevel(o);var g=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(g),this._condenseHierarchy(),this._shiftToCenter()}}},{key:"_condenseHierarchy",value:function(){var t=this,e=!1,n={},r=function(e,n){var r=t.hierarchical.trees;for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&r[i]===e&&t.direction.shift(i,n)},i=function e(n,r){if(!r[n.id]&&(r[n.id]=!0,t.hierarchical.childrenReference[n.id])){var i=t.hierarchical.childrenReference[n.id];if(i.length>0)for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:1e9,r=1e9,i=1e9,o=1e9,g=-1e9;for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){var A=t.body.nodes[s],C=t.hierarchical.levels[A.id],I=t.direction.getPosition(A),a=Wl(t._getSpaceAroundNode(A,e),2),u=a[0],c=a[1];r=Math.min(u,r),i=Math.min(c,i),C<=n&&(o=Math.min(I,o),g=Math.max(I,g))}return[o,g,r,i]},g=function(e,n,r){for(var i=t.hierarchical,o=0;o1)for(var A=0;A2&&void 0!==arguments[2]&&arguments[2],s=t.direction.getPosition(n),A=t.direction.getPosition(r),C=Math.abs(A-s),I=t.options.hierarchical.nodeSpacing;if(C>I){var a={},u={};i(n,a),i(r,u);var c=function(e,n){var r=t.hierarchical.getMaxLevel(e.id),i=t.hierarchical.getMaxLevel(n.id);return Math.min(r,i)}(n,r),l=o(a,c),h=o(u,c),d=l[1],f=h[0],p=h[2];if(Math.abs(d-f)>I){var v=d-f+I;v<-p+I&&(v=-p+I),v<0&&(t._shiftBlock(r.id,v),e=!0,!0===g&&t._centerParent(r))}}},A=function(r,g){for(var s=g.id,A=g.edges,C=t.hierarchical.levels[g.id],I=t.options.hierarchical.levelSeparation*t.options.hierarchical.levelSeparation,a={},u=[],c=0;c0?c=Math.min(u,a-t.options.hierarchical.nodeSpacing):u<0&&(c=-Math.min(-u,I-t.options.hierarchical.nodeSpacing)),0!=c&&(t._shiftBlock(g.id,c),e=!0)}(v),function(n){var r=t.direction.getPosition(g),i=Wl(t._getSpaceAroundNode(g),2),o=i[0],s=i[1],A=n-r,C=r;A>0?C=Math.min(r+(s-t.options.hierarchical.nodeSpacing),n):A<0&&(C=Math.max(r-(o-t.options.hierarchical.nodeSpacing),n)),C!==r&&(t.direction.setPosition(g,C),e=!0)}(v=p(r,A))};!0===this.options.hierarchical.blockShifting&&(function(n){var r=t.hierarchical.getLevels();r=od(r).call(r);for(var i=0;i<5&&(e=!1,g(s,r,!0),!0===e);i++);}(),function(){for(var e in t.body.nodes)Object.prototype.hasOwnProperty.call(t.body.nodes,e)&&t._centerParent(t.body.nodes[e])}()),!0===this.options.hierarchical.edgeMinimization&&function(n){var r=t.hierarchical.getLevels();r=od(r).call(r);for(var i=0;i<20;i++){e=!1;for(var o=0;o0&&Math.abs(a)0&&(A=this.direction.getPosition(r[o-1])+s),this.direction.setPosition(g,A,e),this._validatePositionAndContinue(g,e,A),i++}}}}},{key:"_placeBranchNodes",value:function(t,e){var n,r=this.hierarchical.childrenReference[t];if(void 0!==r){for(var i=[],o=0;oe&&void 0===this.positionedNodes[s.id]))return;var C,I=this.options.hierarchical.nodeSpacing;C=0===g?this.direction.getPosition(this.body.nodes[t]):this.direction.getPosition(i[g-1])+I,this.direction.setPosition(s,C,A),this._validatePositionAndContinue(s,A,C)}var a=this._getCenterPosition(i);this.direction.setPosition(this.body.nodes[t],a,e)}}},{key:"_validatePositionAndContinue",value:function(t,e,n){if(this.hierarchical.isTree){if(void 0!==this.lastNodeOnLevel[e]){var r=this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[e]]);if(n-rt}),"from",t)}(n),this.hierarchical.setMinLevelToZero(this.body.nodes)}},{key:"_generateMap",value:function(){var t=this;this._crawlNetwork((function(e,n){t.hierarchical.levels[n.id]>t.hierarchical.levels[e.id]&&t.hierarchical.addRelation(e.id,n.id)})),this.hierarchical.checkIfTree()}},{key:"_crawlNetwork",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},n=arguments.length>1?arguments[1]:void 0,r={},i=function n(i,o){if(void 0===r[i.id]){var g;t.hierarchical.setTreeIndex(i,o),r[i.id]=!0;for(var s=t._getActiveEdges(i),A=0;At.length)&&(e=t.length);for(var n=0,r=new Array(e);n{let[n,r]=e;return t[n]=rB(r),t}),{})}function oB(t){return"labels"in t?new M.ZP.types.Node(tB(t.identity),t.labels,iB(t.properties)):"type"in t?new M.ZP.types.Relationship(tB(t.identity),tB(t.start),tB(t.end),t.type,iB(t.properties)):"segments"in t?new M.ZP.types.Path(new M.ZP.types.Node(tB(t.start.identity),t.start.labels,iB(t.start.properties)),new M.ZP.types.Node(tB(t.end.identity),t.end.labels,iB(t.end.properties)),d()(e=t.segments).call(e,(t=>new M.ZP.types.PathSegment(new M.ZP.types.Node(tB(t.start.identity),t.start.labels,iB(t.start.properties)),new M.ZP.types.Relationship(tB(t.relationship.identity),tB(t.relationship.start),tB(t.relationship.end),t.relationship.type,iB(t.relationship.properties)),new M.ZP.types.Node(tB(t.end.identity),t.end.labels,iB(t.end.properties)))))):void 0;var e}function gB(t,e){if(l()(e)&&e.length>1){let n=`${t}:
    `;for(const t of e)n+=`
  • ${t}
  • `;return n+"
"}return`${t}: ${e}
`}function sB(t,e){if("object"==typeof e?.properties)return(0,j.isInt)(e.properties[t])?eB(e.properties[t]):e.properties[t];throw new Error("Neo4j object is not properly constructed")}function AB(t,e){let n="";e||(e=u()(t.properties));for(const r of e){const e=sB(r,t);e&&(n+=gB(r,e))}const r=document.createElement("div");return r.innerHTML=n,r}function CB(t,e){let n="";e||(e=u()(t.properties));for(const r of e){const e=sB(r,t);e&&(n+=`${r}: ${e}\n`)}return n}var IB=new(E()),aB=new(E()),uB=new(E()),cB=new(E()),lB=new(E()),hB=new(E()),dB=new(E()),fB=new(E()),pB=new(k()),vB=new(k()),yB=new(k()),bB=new(k()),mB=new(k()),wB=new(k()),_B=new(k()),xB=new(k()),EB=new(k()),OB=new(k()),kB=new(k()),TB=new(k()),SB=new(k()),PB=new(k()),NB=new(k());class RB{get nodes(){return I(this,IB).nodes}get edges(){return I(this,IB).edges}get _config(){return I(this,cB)}get network(){return I(this,aB)}constructor(t){Xj(this,NB),Xj(this,PB),Xj(this,SB),Xj(this,TB),Xj(this,kB),Xj(this,OB),Xj(this,EB),Xj(this,xB),Xj(this,_B),Xj(this,wB),Xj(this,mB),Xj(this,bB),Xj(this,yB),Xj(this,vB),Xj(this,pB),qj(this,IB,{writable:!0,value:{nodes:new hN,edges:new hN}}),qj(this,aB,{writable:!0,value:null}),qj(this,uB,{writable:!0,value:new Vj}),qj(this,cB,{writable:!0,value:void 0}),qj(this,lB,{writable:!0,value:void 0}),qj(this,hB,{writable:!0,value:void 0}),qj(this,dB,{writable:!0,value:void 0}),qj(this,fB,{writable:!0,value:void 0}),$j(this,vB,MB).call(this,t),$j(this,pB,DB).call(this,t),$j(this,pB,DB).call(this,Zj)}render(t,e){I(this,cB).dataFunction||"function"==typeof t?$j(this,TB,WB).call(this,"function"==typeof t?t:I(this,cB).dataFunction,e):$j(this,SB,YB).call(this,t,e)}clearNetwork(){I(this,IB).nodes.clear(),I(this,IB).edges.clear()}registerOnEvent(t,e){I(this,uB).register(t,e)}reinit(t,e){$j(this,vB,MB).call(this,t),this.render(void 0,e)}reload(t){this.clearNetwork(),this.render(void 0,t)}stabilize(){I(this,aB).stopSimulation(),$j(this,pB,DB).call(this,"Calling stopSimulation")}renderWithCypher(t,e){this.clearNetwork(),C(this,dB,t),this.render(void 0,e)}renderWithFunction(t,e){this.clearNetwork(),this.render(t,e)}updateWithCypher(t,e){this.render(t,e)}updateWithFunction(t,e){this.render(t,e)}}function DB(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"log";("log"!==e||I(this,cB).consoleDebug)&&console[e](t)}function MB(t){let e,n;if(t.nonFlat&&t.defaultLabelConfig){if(e=t.defaultLabelConfig,e[Qj])throw new Error("non flat config can't use NEOVIS_ADVANCED_CONFIG, read the doc to see how the config should look");if(n=t.defaultRelationshipsConfig,n[Qj])throw new Error("non flat config can't use NEOVIS_ADVANCED_CONFIG, read the doc to see how the config should look")}else e=t.labels?.[Kj],n=t.relationships?.[Kj];if(e)for(const n of u()(t.labels))t=t.nonFlat?{...t,labels:{...t.labels,[n]:Wj()(e,t.labels?.[n])}}:{...t,labels:{...t.labels,[n]:{...Wj()(e,t.labels?.[n]),[Qj]:Wj()(e[Qj]??{},(t.labels?.[n])[Qj]??{})}}};if(n)for(const e of u()(t.relationships))t=t.nonFlat?{...t,relationships:{...t.relationships,[e]:Wj()(n,t.relationships?.[e])}}:{...t,relationships:{...t.relationships,[e]:{...Wj()(n,t.relationships?.[e]),[Qj]:Wj()(n[Qj]??{},(t.relationships?.[e])[Qj]??{})}}};C(this,cB,t),t.dataFunction||(C(this,lB,t.neo4j instanceof M.ZP.driver?t.neo4j:M.ZP.driver(t.neo4j?.serverUrl??Zj.neo4j.neo4jUri,M.ZP.auth.basic(t.neo4j?.serverUser??Zj.neo4j.neo4jUser,t.neo4j?.serverPassword??Zj.neo4j.neo4jPassword),Wj()(Zj.neo4j.driverConfig,t.neo4j?.driverConfig??{}))),C(this,hB,t.serverDatabase),C(this,dB,t.initialCypher??Zj.neo4j.initialQuery)),C(this,fB,document.getElementById(t.containerId)),I(this,cB).groupAsLabel=t.groupAsLabel??Zj.neo4j.groupAsLabel}async function jB(t,e){const n=I(this,lB).session(I(this,hB)&&{database:I(this,hB)}),r=[];try{const i=await n.readTransaction((n=>n.run(t,{id:e})));for(const t of i.records)S()(t).call(t,(t=>{r.push(t)}))}finally{await n.close()}if(0!==r.length)return 1===r.length?r.pop():r}function BB(t,e){if("function"==typeof t)return t(e);throw new Error("Function type property field must be a function")}function LB(t,e){if(t&&"object"==typeof t)for(const n of u()(t)){const r=t[n];r&&"object"==typeof r?(e[n]||(e[n]={}),$j(this,mB,LB).call(this,r,e[n])):e[n]=r}}function FB(t,e,n){if(t&&"object"==typeof t)for(const r of u()(t)){const i=t[r];if("object"==typeof i)e[r]||(e[r]={}),$j(this,wB,FB).call(this,i,e[r],n);else{const i=t[r];e[r]=sB(i,n)}}}function*zB(t,e,n){if(t&&"object"==typeof t)for(const r of u()(t)){const i=t[r];if(i&&"object"==typeof i)e[r]||(e[r]={}),yield*$j(this,_B,zB).call(this,i,e[r],n);else{const t=$j(this,yB,jB).call(this,i,n);yield N().resolve(t).then((t=>{e[r]=t}))}}}function*ZB(t,e,n){if(t&&"object"==typeof t)for(const r of u()(t)){const i=t[r];if(i&&"object"==typeof i)e[r]||(e[r]={}),yield*$j(this,xB,ZB).call(this,i,e[r],n);else{const t=$j(this,bB,BB).call(this,i,n);yield N().resolve(t).then((t=>{e[r]=t}))}}}async function UB(t,e,n,r){if(!t)return;let i,o,g,s;if(I(this,cB).nonFlat){if(void 0!==t[Qj])throw new Error("Advanced config and non flat config should not be together");i=t.static,o=t.cypher,g=t.property,s=t.function}else{const e=t[Qj];if(g=t,void 0!==e&&"object"!=typeof e)throw new Error("Advanced config should be an object. See documentation for details.");o=e?.cypher,i=e?.static,s=e?.function}$j(this,wB,FB).call(this,g,e,n),$j(this,mB,LB).call(this,i,e),await N().all($j(this,_B,zB).call(this,o,e,r)),await N().all($j(this,xB,ZB).call(this,s,e,n))}async function VB(t){const e={},n=t.labels[0],r=I(this,cB)?.labels?.[n]??I(this,cB)?.defaultLabelConfig??I(this,cB)?.labels?.[Kj];return e.id=(0,j.isInt)(t.identity)?eB(t.identity):t.identity,e.raw=t,I(this,cB).groupAsLabel&&(e.group=n),await $j(this,EB,UB).call(this,r,e,t,t.identity),e}async function GB(t){const e=I(this,cB)?.relationships?.[t.type]??I(this,cB).defaultRelationshipsConfig??I(this,cB)?.relationships?.[Kj],n={};return n.id=(0,j.isInt)(t.identity)?eB(t.identity):t.identity,n.from=(0,j.isInt)(t.start)?eB(t.start):t.start,n.to=(0,j.isInt)(t.end)?eB(t.end):t.end,n.raw=t,await $j(this,EB,UB).call(this,e,n,t,t.identity),n}async function WB(t,e){let n=0;try{const r=[];for await(const i of await t(e))r.push($j(this,PB,HB).call(this,i)),n++;await N().all(r)}catch(t){return void I(this,uB).generateEvent(Uj.ErrorEvent,{error:t})}$j(this,NB,KB).call(this),I(this,uB).generateEvent(Uj.CompletionEvent,{recordCount:n})}function YB(t,e){let n=0;const r=t||I(this,dB),i=I(this,lB).session(I(this,hB)?{database:I(this,hB)}:void 0),o=[];i.run(r,e).subscribe({onNext:t=>{n++,o.push($j(this,PB,HB).call(this,t))},onCompleted:async()=>{await N().all(o),await i.close(),$j(this,NB,KB).call(this),I(this,uB).generateEvent(Uj.CompletionEvent,{recordCount:n})},onError:t=>{$j(this,pB,DB).call(this,t,"error"),I(this,uB).generateEvent(Uj.ErrorEvent,{error:t})}})}async function HB(t){if(!(t instanceof M.ZP.types.Record)){const e=t._fields;t=new M.ZP.types.Record(p()(t),d()(e).call(e,oB),t._fieldLookup)}$j(this,pB,DB).call(this,"CLASS NAME"),$j(this,pB,DB).call(this,t?.constructor.name),$j(this,pB,DB).call(this,t);const e=d()(t).call(t,(async t=>{if($j(this,pB,DB).call(this,"Constructor:"),$j(this,pB,DB).call(this,t?.constructor.name),(0,j.isNode)(t)){const e=await $j(this,OB,VB).call(this,t);try{I(this,IB).nodes.update(e)}catch(t){$j(this,pB,DB).call(this,t,"error")}}else if((0,j.isRelationship)(t)){const e=await $j(this,kB,GB).call(this,t);I(this,IB).edges.update(e)}else if((0,j.isPath)(t)){$j(this,pB,DB).call(this,"PATH"),$j(this,pB,DB).call(this,t);const e=await $j(this,OB,VB).call(this,t.start),n=await $j(this,OB,VB).call(this,t.end);I(this,IB).nodes.update(e),I(this,IB).nodes.update(n);for(const e of t.segments)I(this,IB).nodes.update(await $j(this,OB,VB).call(this,e.start)),I(this,IB).nodes.update(await $j(this,OB,VB).call(this,e.end)),I(this,IB).edges.update(await $j(this,kB,GB).call(this,e.relationship))}else if(l()(t))for(const e of t)if($j(this,pB,DB).call(this,"Array element constructor:"),$j(this,pB,DB).call(this,e?.constructor.name),(0,j.isNode)(e)){const t=await $j(this,OB,VB).call(this,e);I(this,IB).nodes.update(t)}else if((0,j.isRelationship)(e)){const t=await $j(this,kB,GB).call(this,e);I(this,IB).edges.update(t)}}));return N().all(e)}function KB(){if(!I(this,aB)){const t=Wj()(Zj.visJs,I(this,cB).visConfig??{}),e=I(this,fB);$j(this,pB,DB).call(this,I(this,IB).nodes),$j(this,pB,DB).call(this,I(this,IB).edges),C(this,aB,new zj(e,I(this,IB),t))}$j(this,pB,DB).call(this,"completed"),D()((()=>{I(this,aB).stopSimulation()}),1e4);const t=this;I(this,aB).on("click",(function(e){if(e.nodes.length>0){const n=this.getNodeAt(e.pointer.DOM);I(t,uB).generateEvent(Uj.ClickNodeEvent,{nodeId:n,node:I(t,IB).nodes.get(n)})}else if(e.edges.length>0){const n=this.getEdgeAt(e.pointer.DOM);I(t,uB).generateEvent(Uj.ClickEdgeEvent,{edgeId:n,edge:I(t,IB).edges.get(n)})}}))}function QB(t){var e,n,r,i;return{containerId:t.container_id,initialCypher:t.initial_cypher,consoleDebug:t.console_debug,serverDatabase:t.server_database,neo4j:{serverUrl:t.server_url,serverUser:t.server_user,serverPassword:t.server_password,driverConfig:t.encrypted||t.trust?{encrypted:t.encrypted,trust:t.trust}:void 0},visConfig:t.arrows||t.hierarchical?{edges:t.arrows?{arrows:{to:{enabled:t.arrows}}}:void 0,layout:t.hierarchical?{enabled:t.hierarchical,sortMethod:t.hierarchical_sort_method}:void 0}:void 0,labels:t.labels?y()(e=_()(n=m()(t.labels)).call(n,t.labels?.[Kj]?[[Kj,t.labels[Kj]]]:[])).call(e,((t,e)=>{let[n,r]=e;return t[n]={label:"function"!=typeof r.caption?r.caption:void 0,value:r.size,group:r.community,[Qj]:{cypher:r.sizeCypher?{value:r.sizeCypher}:void 0,function:Wj()({title:t=>AB(t,r.title_properties)},"function"==typeof r.caption?{label:r.caption}:{}),static:{font:r.font,shape:r.image?"image":"dot",image:r.image}}},t}),{}):void 0,relationships:t.relationships?y()(r=_()(i=m()(t.relationships)).call(i,t.relationships[Kj]?[[Kj,t.relationships[Kj]]]:[])).call(r,((t,e)=>{let[n,r]=e;return t[n]={value:r.thickness,label:"string"==typeof r.caption?r.caption:void 0,[Qj]:{function:{title:AB}}},t}),{}):void 0}}s(RB,"NEOVIS_DEFAULT_CONFIG",Kj),s(RB,"NEOVIS_ADVANCED_CONFIG",Qj),s(RB,"objectToTitleHtml",AB),s(RB,"objectToTitleString",CB);const XB=RB})(),r})())); -//# sourceMappingURL=main.map591dd2c8384464a705c7 \ No newline at end of file +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.NeoVis=e():t.NeoVis=e()}(self,(()=>(()=>{var t={9742:(t,e)=>{"use strict";e.byteLength=function(t){var e=s(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,o=s(t),g=o[0],A=o[1],C=new i(function(t,e,n){return 3*(e+n)/4-n}(0,g,A)),I=0,a=A>0?g-4:g;for(n=0;n>16&255,C[I++]=e>>8&255,C[I++]=255&e;return 2===A&&(e=r[t.charCodeAt(n)]<<2|r[t.charCodeAt(n+1)]>>4,C[I++]=255&e),1===A&&(e=r[t.charCodeAt(n)]<<10|r[t.charCodeAt(n+1)]<<4|r[t.charCodeAt(n+2)]>>2,C[I++]=e>>8&255,C[I++]=255&e),C},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],g=16383,s=0,C=r-i;sC?C:s+g));return 1===i?(e=t[r-1],o.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"=")),o.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",g=0;g<64;++g)n[g]=o[g],r[o.charCodeAt(g)]=g;function s(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function A(t,e,r){for(var i,o,g=[],s=e;s>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return g.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},8764:(t,e,n)=>{"use strict";const r=n(9742),i=n(645),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=A,e.SlowBuffer=function(t){return+t!=t&&(t=0),A.alloc(+t)},e.INSPECT_MAX_BYTES=50;const g=2147483647;function s(t){if(t>g)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,A.prototype),e}function A(t,e,n){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return a(t)}return C(t,e,n)}function C(t,e,n){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!A.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const n=0|h(t,e);let r=s(n);const i=r.write(t,e);return i!==n&&(r=r.slice(0,i)),r}(t,e);if(ArrayBuffer.isView(t))return function(t){if(Q(t,Uint8Array)){const e=new Uint8Array(t);return c(e.buffer,e.byteOffset,e.byteLength)}return u(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(Q(t,ArrayBuffer)||t&&Q(t.buffer,ArrayBuffer))return c(t,e,n);if("undefined"!=typeof SharedArrayBuffer&&(Q(t,SharedArrayBuffer)||t&&Q(t.buffer,SharedArrayBuffer)))return c(t,e,n);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=t.valueOf&&t.valueOf();if(null!=r&&r!==t)return A.from(r,e,n);const i=function(t){if(A.isBuffer(t)){const e=0|l(t.length),n=s(e);return 0===n.length||t.copy(n,0,0,e),n}return void 0!==t.length?"number"!=typeof t.length||X(t.length)?s(0):u(t):"Buffer"===t.type&&Array.isArray(t.data)?u(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return A.from(t[Symbol.toPrimitive]("string"),e,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function I(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function a(t){return I(t),s(t<0?0:0|l(t))}function u(t){const e=t.length<0?0:0|l(t.length),n=s(e);for(let r=0;r=g)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+g.toString(16)+" bytes");return 0|t}function h(t,e){if(A.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||Q(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const n=t.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return Y(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return H(t).length;default:if(i)return r?-1:Y(t).length;e=(""+e).toLowerCase(),i=!0}}function d(t,e,n){let r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return S(this,e,n);case"utf8":case"utf-8":return E(this,e,n);case"ascii":return k(this,e,n);case"latin1":case"binary":return T(this,e,n);case"base64":return x(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function f(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function p(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),X(n=+n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=A.from(e,r)),A.isBuffer(e))return 0===e.length?-1:v(t,e,n,r,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):v(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(t,e,n,r,i){let o,g=1,s=t.length,A=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;g=2,s/=2,A/=2,n/=2}function C(t,e){return 1===g?t[e]:t.readUInt16BE(e*g)}if(i){let r=-1;for(o=n;os&&(n=s-A),o=n;o>=0;o--){let n=!0;for(let r=0;ri&&(r=i):r=i;const o=e.length;let g;for(r>o/2&&(r=o/2),g=0;g>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function x(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function E(t,e,n){n=Math.min(t.length,n);const r=[];let i=e;for(;i239?4:e>223?3:e>191?2:1;if(i+g<=n){let n,r,s,A;switch(g){case 1:e<128&&(o=e);break;case 2:n=t[i+1],128==(192&n)&&(A=(31&e)<<6|63&n,A>127&&(o=A));break;case 3:n=t[i+1],r=t[i+2],128==(192&n)&&128==(192&r)&&(A=(15&e)<<12|(63&n)<<6|63&r,A>2047&&(A<55296||A>57343)&&(o=A));break;case 4:n=t[i+1],r=t[i+2],s=t[i+3],128==(192&n)&&128==(192&r)&&128==(192&s)&&(A=(15&e)<<18|(63&n)<<12|(63&r)<<6|63&s,A>65535&&A<1114112&&(o=A))}}null===o?(o=65533,g=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=g}return function(t){const e=t.length;if(e<=O)return String.fromCharCode.apply(String,t);let n="",r=0;for(;rr.length?(A.isBuffer(e)||(e=A.from(e)),e.copy(r,i)):Uint8Array.prototype.set.call(r,e,i);else{if(!A.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(r,i)}i+=e.length}return r},A.byteLength=h,A.prototype._isBuffer=!0,A.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;en&&(t+=" ... "),""},o&&(A.prototype[o]=A.prototype.inspect),A.prototype.compare=function(t,e,n,r,i){if(Q(t,Uint8Array)&&(t=A.from(t,t.offset,t.byteLength)),!A.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;let o=(i>>>=0)-(r>>>=0),g=(n>>>=0)-(e>>>=0);const s=Math.min(o,g),C=this.slice(r,i),I=t.slice(e,n);for(let t=0;t>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let o=!1;for(;;)switch(r){case"hex":return y(this,t,e,n);case"utf8":case"utf-8":return b(this,t,e,n);case"ascii":case"latin1":case"binary":return m(this,t,e,n);case"base64":return w(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},A.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const O=4096;function k(t,e,n){let r="";n=Math.min(t.length,n);for(let i=e;ir)&&(n=r);let i="";for(let r=e;rn)throw new RangeError("Trying to access beyond buffer length")}function R(t,e,n,r,i,o){if(!A.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function D(t,e,n,r,i){U(e,r,i,t,n,7);let o=Number(e&BigInt(4294967295));t[n++]=o,o>>=8,t[n++]=o,o>>=8,t[n++]=o,o>>=8,t[n++]=o;let g=Number(e>>BigInt(32)&BigInt(4294967295));return t[n++]=g,g>>=8,t[n++]=g,g>>=8,t[n++]=g,g>>=8,t[n++]=g,n}function M(t,e,n,r,i){U(e,r,i,t,n,7);let o=Number(e&BigInt(4294967295));t[n+7]=o,o>>=8,t[n+6]=o,o>>=8,t[n+5]=o,o>>=8,t[n+4]=o;let g=Number(e>>BigInt(32)&BigInt(4294967295));return t[n+3]=g,g>>=8,t[n+2]=g,g>>=8,t[n+1]=g,g>>=8,t[n]=g,n+8}function j(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function B(t,e,n,r,o){return e=+e,n>>>=0,o||j(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function L(t,e,n,r,o){return e=+e,n>>>=0,o||j(t,0,n,8),i.write(t,e,n,r,52,8),n+8}A.prototype.slice=function(t,e){const n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e>>=0,e>>>=0,n||N(t,e,this.length);let r=this[t],i=1,o=0;for(;++o>>=0,e>>>=0,n||N(t,e,this.length);let r=this[t+--e],i=1;for(;e>0&&(i*=256);)r+=this[t+--e]*i;return r},A.prototype.readUint8=A.prototype.readUInt8=function(t,e){return t>>>=0,e||N(t,1,this.length),this[t]},A.prototype.readUint16LE=A.prototype.readUInt16LE=function(t,e){return t>>>=0,e||N(t,2,this.length),this[t]|this[t+1]<<8},A.prototype.readUint16BE=A.prototype.readUInt16BE=function(t,e){return t>>>=0,e||N(t,2,this.length),this[t]<<8|this[t+1]},A.prototype.readUint32LE=A.prototype.readUInt32LE=function(t,e){return t>>>=0,e||N(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},A.prototype.readUint32BE=A.prototype.readUInt32BE=function(t,e){return t>>>=0,e||N(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},A.prototype.readBigUInt64LE=J((function(t){V(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||G(t,this.length-8);const r=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+n*2**24;return BigInt(r)+(BigInt(i)<>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||G(t,this.length-8);const r=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+n;return(BigInt(r)<>>=0,e>>>=0,n||N(t,e,this.length);let r=this[t],i=1,o=0;for(;++o=i&&(r-=Math.pow(2,8*e)),r},A.prototype.readIntBE=function(t,e,n){t>>>=0,e>>>=0,n||N(t,e,this.length);let r=e,i=1,o=this[t+--r];for(;r>0&&(i*=256);)o+=this[t+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},A.prototype.readInt8=function(t,e){return t>>>=0,e||N(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},A.prototype.readInt16LE=function(t,e){t>>>=0,e||N(t,2,this.length);const n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},A.prototype.readInt16BE=function(t,e){t>>>=0,e||N(t,2,this.length);const n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},A.prototype.readInt32LE=function(t,e){return t>>>=0,e||N(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},A.prototype.readInt32BE=function(t,e){return t>>>=0,e||N(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},A.prototype.readBigInt64LE=J((function(t){V(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||G(t,this.length-8);const r=this[t+4]+256*this[t+5]+65536*this[t+6]+(n<<24);return(BigInt(r)<>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||G(t,this.length-8);const r=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(r)<>>=0,e||N(t,4,this.length),i.read(this,t,!0,23,4)},A.prototype.readFloatBE=function(t,e){return t>>>=0,e||N(t,4,this.length),i.read(this,t,!1,23,4)},A.prototype.readDoubleLE=function(t,e){return t>>>=0,e||N(t,8,this.length),i.read(this,t,!0,52,8)},A.prototype.readDoubleBE=function(t,e){return t>>>=0,e||N(t,8,this.length),i.read(this,t,!1,52,8)},A.prototype.writeUintLE=A.prototype.writeUIntLE=function(t,e,n,r){t=+t,e>>>=0,n>>>=0,r||R(this,t,e,n,Math.pow(2,8*n)-1,0);let i=1,o=0;for(this[e]=255&t;++o>>=0,n>>>=0,r||R(this,t,e,n,Math.pow(2,8*n)-1,0);let i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},A.prototype.writeUint8=A.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||R(this,t,e,1,255,0),this[e]=255&t,e+1},A.prototype.writeUint16LE=A.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||R(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},A.prototype.writeUint16BE=A.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||R(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},A.prototype.writeUint32LE=A.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||R(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},A.prototype.writeUint32BE=A.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||R(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},A.prototype.writeBigUInt64LE=J((function(t,e=0){return D(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),A.prototype.writeBigUInt64BE=J((function(t,e=0){return M(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),A.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e>>>=0,!r){const r=Math.pow(2,8*n-1);R(this,t,e,n,r-1,-r)}let i=0,o=1,g=0;for(this[e]=255&t;++i>0)-g&255;return e+n},A.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e>>>=0,!r){const r=Math.pow(2,8*n-1);R(this,t,e,n,r-1,-r)}let i=n-1,o=1,g=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===g&&0!==this[e+i+1]&&(g=1),this[e+i]=(t/o>>0)-g&255;return e+n},A.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||R(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},A.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||R(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},A.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||R(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},A.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||R(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},A.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||R(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},A.prototype.writeBigInt64LE=J((function(t,e=0){return D(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),A.prototype.writeBigInt64BE=J((function(t,e=0){return M(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),A.prototype.writeFloatLE=function(t,e,n){return B(this,t,e,!0,n)},A.prototype.writeFloatBE=function(t,e,n){return B(this,t,e,!1,n)},A.prototype.writeDoubleLE=function(t,e,n){return L(this,t,e,!0,n)},A.prototype.writeDoubleBE=function(t,e,n){return L(this,t,e,!1,n)},A.prototype.copy=function(t,e,n,r){if(!A.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(i=e;i=r+4;n-=3)e=`_${t.slice(n-3,n)}${e}`;return`${t.slice(0,n)}${e}`}function U(t,e,n,r,i,o){if(t>n||t3?0===e||e===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(o+1)}${r}`:`>= -(2${r} ** ${8*(o+1)-1}${r}) and < 2 ** ${8*(o+1)-1}${r}`:`>= ${e}${r} and <= ${n}${r}`,new F.ERR_OUT_OF_RANGE("value",i,t)}!function(t,e,n){V(e,"offset"),void 0!==t[e]&&void 0!==t[e+n]||G(e,t.length-(n+1))}(r,i,o)}function V(t,e){if("number"!=typeof t)throw new F.ERR_INVALID_ARG_TYPE(e,"number",t)}function G(t,e,n){if(Math.floor(t)!==t)throw V(t,n),new F.ERR_OUT_OF_RANGE(n||"offset","an integer",t);if(e<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${e}`,t)}z("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),z("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),z("ERR_OUT_OF_RANGE",(function(t,e,n){let r=`The value of "${t}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=Z(String(n)):"bigint"==typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=Z(i)),i+="n"),r+=` It must be ${e}. Received ${i}`,r}),RangeError);const W=/[^+/0-9A-Za-z-_]/g;function Y(t,e){let n;e=e||1/0;const r=t.length;let i=null;const o=[];for(let g=0;g55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(g+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function H(t){return r.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(W,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function K(t,e,n,r){let i;for(i=0;i=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function Q(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function X(t){return t!=t}const q=function(){const t="0123456789abcdef",e=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let i=0;i<16;++i)e[r+i]=t[n]+t[i]}return e}();function J(t){return"undefined"==typeof BigInt?$:t}function $(){throw new Error("BigInt not supported")}},3536:(t,e,n)=>{var r=n(1910);t.exports=r},281:(t,e,n)=>{var r=n(2547);n(3975),t.exports=r},31:(t,e,n)=>{var r=n(6509);t.exports=r},7487:(t,e,n)=>{var r=n(5774);t.exports=r},4034:(t,e,n)=>{n(2988);var r=n(4058);t.exports=r.Array.isArray},5367:(t,e,n)=>{n(5906);var r=n(5703);t.exports=r("Array").concat},9324:(t,e,n)=>{n(2437);var r=n(5703);t.exports=r("Array").forEach},5909:(t,e,n)=>{n(6274),n(5967);var r=n(5703);t.exports=r("Array").keys},3866:(t,e,n)=>{n(8787);var r=n(5703);t.exports=r("Array").map},2999:(t,e,n)=>{n(1876);var r=n(5703);t.exports=r("Array").reduce},6043:(t,e,n)=>{var r=n(7046),i=n(5367),o=Array.prototype;t.exports=function(t){var e=t.concat;return t===o||r(o,t)&&e===o.concat?i:e}},8287:(t,e,n)=>{var r=n(7046),i=n(3866),o=Array.prototype;t.exports=function(t){var e=t.map;return t===o||r(o,t)&&e===o.map?i:e}},8025:(t,e,n)=>{var r=n(7046),i=n(2999),o=Array.prototype;t.exports=function(t){var e=t.reduce;return t===o||r(o,t)&&e===o.reduce?i:e}},8171:(t,e,n)=>{n(6450);var r=n(4058).Object,i=t.exports=function(t,e,n){return r.defineProperty(t,e,n)};r.defineProperty.sham&&(i.sham=!0)},3081:(t,e,n)=>{n(1078);var r=n(4058);t.exports=r.Object.entries},8494:(t,e,n)=>{n(1724);var r=n(4058);t.exports=r.Object.keys},2956:(t,e,n)=>{n(7627),n(6274),n(5967),n(8881),n(4560),n(7206),n(4349),n(7971);var r=n(4058);t.exports=r.Promise},7473:(t,e,n)=>{n(5906),n(5967),n(5824),n(8555),n(2615),n(1732),n(5903),n(1825),n(8394),n(5915),n(1766),n(2737),n(9911),n(4315),n(3131),n(4714),n(659),n(9120),n(5327),n(1502);var r=n(4058);t.exports=r.Symbol},4227:(t,e,n)=>{n(6274),n(5967),n(7971),n(1825);var r=n(1477);t.exports=r.f("iterator")},2978:(t,e,n)=>{n(8084),n(3131);var r=n(1477);t.exports=r.f("toPrimitive")},2304:(t,e,n)=>{n(6274),n(5967),n(4334);var r=n(4058);t.exports=r.WeakMap},9567:(t,e,n)=>{n(6274),n(5967),n(1773);var r=n(4058);t.exports=r.WeakSet},3685:(t,e,n)=>{t.exports=n(621)},6600:(t,e,n)=>{t.exports=n(2201)},9759:(t,e,n)=>{t.exports=n(7398)},1384:(t,e,n)=>{t.exports=n(6189)},621:(t,e,n)=>{var r=n(3536);t.exports=r},2201:(t,e,n)=>{var r=n(281);n(8783),n(2731),n(5605),n(5799),n(1943),n(6774),n(5414),n(620),n(6172),t.exports=r},7398:(t,e,n)=>{var r=n(31);t.exports=r},6189:(t,e,n)=>{var r=n(7487);t.exports=r},4883:(t,e,n)=>{var r=n(7475),i=n(9826),o=TypeError;t.exports=function(t){if(r(t))return t;throw o(i(t)+" is not a function")}},174:(t,e,n)=>{var r=n(4284),i=n(9826),o=TypeError;t.exports=function(t){if(r(t))return t;throw o(i(t)+" is not a constructor")}},1851:(t,e,n)=>{var r=n(7475),i=String,o=TypeError;t.exports=function(t){if("object"==typeof t||r(t))return t;throw o("Can't set "+i(t)+" as a prototype")}},8479:t=>{t.exports=function(){}},5743:(t,e,n)=>{var r=n(7046),i=TypeError;t.exports=function(t,e){if(r(e,t))return t;throw i("Incorrect invocation")}},6059:(t,e,n)=>{var r=n(941),i=String,o=TypeError;t.exports=function(t){if(r(t))return t;throw o(i(t)+" is not an object")}},7135:(t,e,n)=>{var r=n(5981);t.exports=r((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))},6837:(t,e,n)=>{"use strict";var r=n(3610).forEach,i=n(4194)("forEach");t.exports=i?[].forEach:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}},1692:(t,e,n)=>{var r=n(4529),i=n(9413),o=n(623),g=function(t){return function(e,n,g){var s,A=r(e),C=o(A),I=i(g,C);if(t&&n!=n){for(;C>I;)if((s=A[I++])!=s)return!0}else for(;C>I;I++)if((t||I in A)&&A[I]===n)return t||I||0;return!t&&-1}};t.exports={includes:g(!0),indexOf:g(!1)}},3610:(t,e,n)=>{var r=n(6843),i=n(5329),o=n(7026),g=n(9678),s=n(623),A=n(4692),C=i([].push),I=function(t){var e=1==t,n=2==t,i=3==t,I=4==t,a=6==t,u=7==t,c=5==t||a;return function(l,h,d,f){for(var p,v,y=g(l),b=o(y),m=r(h,d),w=s(b),_=0,x=f||A,E=e?x(l,w):n||u?x(l,0):void 0;w>_;_++)if((c||_ in b)&&(v=m(p=b[_],_,y),t))if(e)E[_]=v;else if(v)switch(t){case 3:return!0;case 5:return p;case 6:return _;case 2:C(E,p)}else switch(t){case 4:return!1;case 7:C(E,p)}return a?-1:i||I?I:E}};t.exports={forEach:I(0),map:I(1),filter:I(2),some:I(3),every:I(4),find:I(5),findIndex:I(6),filterReject:I(7)}},568:(t,e,n)=>{var r=n(5981),i=n(9813),o=n(3385),g=i("species");t.exports=function(t){return o>=51||!r((function(){var e=[];return(e.constructor={})[g]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},4194:(t,e,n)=>{"use strict";var r=n(5981);t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){return 1},1)}))}},6499:(t,e,n)=>{var r=n(4883),i=n(9678),o=n(7026),g=n(623),s=TypeError,A=function(t){return function(e,n,A,C){r(n);var I=i(e),a=o(I),u=g(I),c=t?u-1:0,l=t?-1:1;if(A<2)for(;;){if(c in a){C=a[c],c+=l;break}if(c+=l,t?c<0:u<=c)throw s("Reduce of empty array with no initial value")}for(;t?c>=0:u>c;c+=l)c in a&&(C=n(C,a[c],c,I));return C}};t.exports={left:A(!1),right:A(!0)}},5790:(t,e,n)=>{var r=n(9413),i=n(623),o=n(5449),g=Array,s=Math.max;t.exports=function(t,e,n){for(var A=i(t),C=r(e,A),I=r(void 0===n?A:n,A),a=g(s(I-C,0)),u=0;C{var r=n(5329);t.exports=r([].slice)},5693:(t,e,n)=>{var r=n(1052),i=n(4284),o=n(941),g=n(9813)("species"),s=Array;t.exports=function(t){var e;return r(t)&&(e=t.constructor,(i(e)&&(e===s||r(e.prototype))||o(e)&&null===(e=e[g]))&&(e=void 0)),void 0===e?s:e}},4692:(t,e,n)=>{var r=n(5693);t.exports=function(t,e){return new(r(t))(0===e?0:e)}},1385:(t,e,n)=>{var r=n(9813)("iterator"),i=!1;try{var o=0,g={next:function(){return{done:!!o++}},return:function(){i=!0}};g[r]=function(){return this},Array.from(g,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o={};o[r]=function(){return{next:function(){return{done:n=!0}}}},t(o)}catch(t){}return n}},2532:(t,e,n)=>{var r=n(5329),i=r({}.toString),o=r("".slice);t.exports=function(t){return o(i(t),8,-1)}},9697:(t,e,n)=>{var r=n(2885),i=n(7475),o=n(2532),g=n(9813)("toStringTag"),s=Object,A="Arguments"==o(function(){return arguments}());t.exports=r?o:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=s(t),g))?n:A?o(e):"Object"==(r=o(e))&&i(e.callee)?"Arguments":r}},8850:(t,e,n)=>{"use strict";var r=n(5329),i=n(4380),o=n(1647).getWeakData,g=n(5743),s=n(6059),A=n(2119),C=n(941),I=n(3091),a=n(3610),u=n(953),c=n(5402),l=c.set,h=c.getterFor,d=a.find,f=a.findIndex,p=r([].splice),v=0,y=function(t){return t.frozen||(t.frozen=new b)},b=function(){this.entries=[]},m=function(t,e){return d(t.entries,(function(t){return t[0]===e}))};b.prototype={get:function(t){var e=m(this,t);if(e)return e[1]},has:function(t){return!!m(this,t)},set:function(t,e){var n=m(this,t);n?n[1]=e:this.entries.push([t,e])},delete:function(t){var e=f(this.entries,(function(e){return e[0]===t}));return~e&&p(this.entries,e,1),!!~e}},t.exports={getConstructor:function(t,e,n,r){var a=t((function(t,i){g(t,c),l(t,{type:e,id:v++,frozen:void 0}),A(i)||I(i,t[r],{that:t,AS_ENTRIES:n})})),c=a.prototype,d=h(e),f=function(t,e,n){var r=d(t),i=o(s(e),!0);return!0===i?y(r).set(e,n):i[r.id]=n,t};return i(c,{delete:function(t){var e=d(this);if(!C(t))return!1;var n=o(t);return!0===n?y(e).delete(t):n&&u(n,e.id)&&delete n[e.id]},has:function(t){var e=d(this);if(!C(t))return!1;var n=o(t);return!0===n?y(e).has(t):n&&u(n,e.id)}}),i(c,n?{get:function(t){var e=d(this);if(C(t)){var n=o(t);return!0===n?y(e).get(t):n?n[e.id]:void 0}},set:function(t,e){return f(this,t,e)}}:{add:function(t){return f(this,t,!0)}}),a}}},4683:(t,e,n)=>{"use strict";var r=n(6887),i=n(1899),o=n(1647),g=n(5981),s=n(2029),A=n(3091),C=n(5743),I=n(7475),a=n(941),u=n(904),c=n(5988).f,l=n(3610).forEach,h=n(5746),d=n(5402),f=d.set,p=d.getterFor;t.exports=function(t,e,n){var d,v=-1!==t.indexOf("Map"),y=-1!==t.indexOf("Weak"),b=v?"set":"add",m=i[t],w=m&&m.prototype,_={};if(h&&I(m)&&(y||w.forEach&&!g((function(){(new m).entries().next()})))){var x=(d=e((function(e,n){f(C(e,x),{type:t,collection:new m}),null!=n&&A(n,e[b],{that:e,AS_ENTRIES:v})}))).prototype,E=p(t);l(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(t){var e="add"==t||"set"==t;!(t in w)||y&&"clear"==t||s(x,t,(function(n,r){var i=E(this).collection;if(!e&&y&&!a(n))return"get"==t&&void 0;var o=i[t](0===n?0:n,r);return e?this:o}))})),y||c(x,"size",{configurable:!0,get:function(){return E(this).collection.size}})}else d=n.getConstructor(e,t,v,b),o.enable();return u(d,t,!1,!0),_[t]=d,r({global:!0,forced:!0},_),y||n.setStrong(d,t,v),d}},3489:(t,e,n)=>{var r=n(953),i=n(1136),o=n(9677),g=n(5988);t.exports=function(t,e,n){for(var s=i(e),A=g.f,C=o.f,I=0;I{var r=n(5981);t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},3538:t=>{t.exports=function(t,e){return{value:t,done:e}}},2029:(t,e,n)=>{var r=n(5746),i=n(5988),o=n(1887);t.exports=r?function(t,e,n){return i.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},1887:t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},5449:(t,e,n)=>{"use strict";var r=n(3894),i=n(5988),o=n(1887);t.exports=function(t,e,n){var g=r(e);g in t?i.f(t,g,o(0,n)):t[g]=n}},9202:(t,e,n)=>{var r=n(5988);t.exports=function(t,e,n){return r.f(t,e,n)}},5929:(t,e,n)=>{var r=n(2029);t.exports=function(t,e,n,i){return i&&i.enumerable?t[e]=n:r(t,e,n),t}},4380:(t,e,n)=>{var r=n(5929);t.exports=function(t,e,n){for(var i in e)n&&n.unsafe&&t[i]?t[i]=e[i]:r(t,i,e[i],n);return t}},5609:(t,e,n)=>{var r=n(1899),i=Object.defineProperty;t.exports=function(t,e){try{i(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},5746:(t,e,n)=>{var r=n(5981);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},6616:t=>{var e="object"==typeof document&&document.all,n=void 0===e&&void 0!==e;t.exports={all:e,IS_HTMLDDA:n}},1333:(t,e,n)=>{var r=n(1899),i=n(941),o=r.document,g=i(o)&&i(o.createElement);t.exports=function(t){return g?o.createElement(t):{}}},6796:t=>{var e=TypeError;t.exports=function(t){if(t>9007199254740991)throw e("Maximum allowed index exceeded");return t}},3281:t=>{t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},3321:(t,e,n)=>{var r=n(8501),i=n(6049);t.exports=!r&&!i&&"object"==typeof window&&"object"==typeof document},6491:t=>{t.exports="function"==typeof Bun&&Bun&&"string"==typeof Bun.version},8501:t=>{t.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},4470:(t,e,n)=>{var r=n(2861);t.exports=/ipad|iphone|ipod/i.test(r)&&"undefined"!=typeof Pebble},2749:(t,e,n)=>{var r=n(2861);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},6049:(t,e,n)=>{var r=n(2532);t.exports="undefined"!=typeof process&&"process"==r(process)},8045:(t,e,n)=>{var r=n(2861);t.exports=/web0s(?!.*chrome)/i.test(r)},2861:t=>{t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},3385:(t,e,n)=>{var r,i,o=n(1899),g=n(2861),s=o.process,A=o.Deno,C=s&&s.versions||A&&A.version,I=C&&C.v8;I&&(i=(r=I.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&g&&(!(r=g.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=g.match(/Chrome\/(\d+)/))&&(i=+r[1]),t.exports=i},5703:(t,e,n)=>{var r=n(4058);t.exports=function(t){return r[t+"Prototype"]}},6759:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},3995:(t,e,n)=>{var r=n(5329),i=Error,o=r("".replace),g=String(i("zxcasd").stack),s=/\n\s*at [^:]*:[^\n]*/,A=s.test(g);t.exports=function(t,e){if(A&&"string"==typeof t&&!i.prepareStackTrace)for(;e--;)t=o(t,s,"");return t}},9585:(t,e,n)=>{var r=n(2029),i=n(3995),o=n(8780),g=Error.captureStackTrace;t.exports=function(t,e,n,s){o&&(g?g(t,e):r(t,"stack",i(n,s)))}},8780:(t,e,n)=>{var r=n(5981),i=n(1887);t.exports=!r((function(){var t=Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",i(1,7)),7!==t.stack)}))},6887:(t,e,n)=>{"use strict";var r=n(1899),i=n(9730),o=n(7484),g=n(7475),s=n(9677).f,A=n(7252),C=n(4058),I=n(6843),a=n(2029),u=n(953),c=function(t){var e=function(n,r,o){if(this instanceof e){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,r)}return new t(n,r,o)}return i(t,this,arguments)};return e.prototype=t.prototype,e};t.exports=function(t,e){var n,i,l,h,d,f,p,v,y,b=t.target,m=t.global,w=t.stat,_=t.proto,x=m?r:w?r[b]:(r[b]||{}).prototype,E=m?C:C[b]||a(C,b,{})[b],O=E.prototype;for(h in e)i=!(n=A(m?h:b+(w?".":"#")+h,t.forced))&&x&&u(x,h),f=E[h],i&&(p=t.dontCallGetSet?(y=s(x,h))&&y.value:x[h]),d=i&&p?p:e[h],i&&typeof f==typeof d||(v=t.bind&&i?I(d,r):t.wrap&&i?c(d):_&&g(d)?o(d):d,(t.sham||d&&d.sham||f&&f.sham)&&a(v,"sham",!0),a(E,h,v),_&&(u(C,l=b+"Prototype")||a(C,l,{}),a(C[l],h,d),t.real&&O&&(n||!O[h])&&a(O,h,d)))}},5981:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},5602:(t,e,n)=>{var r=n(5981);t.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},9730:(t,e,n)=>{var r=n(8285),i=Function.prototype,o=i.apply,g=i.call;t.exports="object"==typeof Reflect&&Reflect.apply||(r?g.bind(o):function(){return g.apply(o,arguments)})},6843:(t,e,n)=>{var r=n(7484),i=n(4883),o=n(8285),g=r(r.bind);t.exports=function(t,e){return i(t),void 0===e?t:o?g(t,e):function(){return t.apply(e,arguments)}}},8285:(t,e,n)=>{var r=n(5981);t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},8834:(t,e,n)=>{var r=n(8285),i=Function.prototype.call;t.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},9417:(t,e,n)=>{var r=n(5746),i=n(953),o=Function.prototype,g=r&&Object.getOwnPropertyDescriptor,s=i(o,"name"),A=s&&"something"===function(){}.name,C=s&&(!r||r&&g(o,"name").configurable);t.exports={EXISTS:s,PROPER:A,CONFIGURABLE:C}},5526:(t,e,n)=>{var r=n(5329),i=n(4883);t.exports=function(t,e,n){try{return r(i(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(t){}}},7484:(t,e,n)=>{var r=n(2532),i=n(5329);t.exports=function(t){if("Function"===r(t))return i(t)}},5329:(t,e,n)=>{var r=n(8285),i=Function.prototype,o=i.call,g=r&&i.bind.bind(o,o);t.exports=r?g:function(t){return function(){return o.apply(t,arguments)}}},626:(t,e,n)=>{var r=n(4058),i=n(1899),o=n(7475),g=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?g(r[t])||g(i[t]):r[t]&&r[t][e]||i[t]&&i[t][e]}},2902:(t,e,n)=>{var r=n(9697),i=n(4229),o=n(2119),g=n(2077),s=n(9813)("iterator");t.exports=function(t){if(!o(t))return i(t,s)||i(t,"@@iterator")||g[r(t)]}},3476:(t,e,n)=>{var r=n(8834),i=n(4883),o=n(6059),g=n(9826),s=n(2902),A=TypeError;t.exports=function(t,e){var n=arguments.length<2?s(t):e;if(i(n))return o(r(n,t));throw A(g(t)+" is not iterable")}},3323:(t,e,n)=>{var r=n(5329),i=n(1052),o=n(7475),g=n(2532),s=n(5803),A=r([].push);t.exports=function(t){if(o(t))return t;if(i(t)){for(var e=t.length,n=[],r=0;r{var r=n(4883),i=n(2119);t.exports=function(t,e){var n=t[e];return i(n)?void 0:r(n)}},1899:function(t,e,n){var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||this||Function("return this")()},953:(t,e,n)=>{var r=n(5329),i=n(9678),o=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(i(t),e)}},7748:t=>{t.exports={}},4845:t=>{t.exports=function(t,e){try{1==arguments.length?console.error(t):console.error(t,e)}catch(t){}}},5463:(t,e,n)=>{var r=n(626);t.exports=r("document","documentElement")},2840:(t,e,n)=>{var r=n(5746),i=n(5981),o=n(1333);t.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},7026:(t,e,n)=>{var r=n(5329),i=n(5981),o=n(2532),g=Object,s=r("".split);t.exports=i((function(){return!g("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?s(t,""):g(t)}:g},1302:(t,e,n)=>{var r=n(5329),i=n(7475),o=n(3030),g=r(Function.toString);i(o.inspectSource)||(o.inspectSource=function(t){return g(t)}),t.exports=o.inspectSource},3794:(t,e,n)=>{var r=n(941),i=n(2029);t.exports=function(t,e){r(e)&&"cause"in e&&i(t,"cause",e.cause)}},1647:(t,e,n)=>{var r=n(6887),i=n(5329),o=n(7748),g=n(941),s=n(953),A=n(5988).f,C=n(946),I=n(684),a=n(1584),u=n(9418),c=n(5602),l=!1,h=u("meta"),d=0,f=function(t){A(t,h,{value:{objectID:"O"+d++,weakData:{}}})},p=t.exports={enable:function(){p.enable=function(){},l=!0;var t=C.f,e=i([].splice),n={};n[h]=1,t(n).length&&(C.f=function(n){for(var r=t(n),i=0,o=r.length;i{var r,i,o,g=n(7093),s=n(1899),A=n(941),C=n(2029),I=n(953),a=n(3030),u=n(4262),c=n(7748),l="Object already initialized",h=s.TypeError,d=s.WeakMap;if(g||a.state){var f=a.state||(a.state=new d);f.get=f.get,f.has=f.has,f.set=f.set,r=function(t,e){if(f.has(t))throw h(l);return e.facade=t,f.set(t,e),e},i=function(t){return f.get(t)||{}},o=function(t){return f.has(t)}}else{var p=u("state");c[p]=!0,r=function(t,e){if(I(t,p))throw h(l);return e.facade=t,C(t,p,e),e},i=function(t){return I(t,p)?t[p]:{}},o=function(t){return I(t,p)}}t.exports={set:r,get:i,has:o,enforce:function(t){return o(t)?i(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!A(e)||(n=i(e)).type!==t)throw h("Incompatible receiver, "+t+" required");return n}}}},6782:(t,e,n)=>{var r=n(9813),i=n(2077),o=r("iterator"),g=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||g[o]===t)}},1052:(t,e,n)=>{var r=n(2532);t.exports=Array.isArray||function(t){return"Array"==r(t)}},7475:(t,e,n)=>{var r=n(6616),i=r.all;t.exports=r.IS_HTMLDDA?function(t){return"function"==typeof t||t===i}:function(t){return"function"==typeof t}},4284:(t,e,n)=>{var r=n(5329),i=n(5981),o=n(7475),g=n(9697),s=n(626),A=n(1302),C=function(){},I=[],a=s("Reflect","construct"),u=/^\s*(?:class|function)\b/,c=r(u.exec),l=!u.exec(C),h=function(t){if(!o(t))return!1;try{return a(C,I,t),!0}catch(t){return!1}},d=function(t){if(!o(t))return!1;switch(g(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return l||!!c(u,A(t))}catch(t){return!0}};d.sham=!0,t.exports=!a||i((function(){var t;return h(h.call)||!h(Object)||!h((function(){t=!0}))||t}))?d:h},7252:(t,e,n)=>{var r=n(5981),i=n(7475),o=/#|\.prototype\./,g=function(t,e){var n=A[s(t)];return n==I||n!=C&&(i(e)?r(e):!!e)},s=g.normalize=function(t){return String(t).replace(o,".").toLowerCase()},A=g.data={},C=g.NATIVE="N",I=g.POLYFILL="P";t.exports=g},2119:t=>{t.exports=function(t){return null==t}},941:(t,e,n)=>{var r=n(7475),i=n(6616),o=i.all;t.exports=i.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:r(t)||t===o}:function(t){return"object"==typeof t?null!==t:r(t)}},2529:t=>{t.exports=!0},6664:(t,e,n)=>{var r=n(626),i=n(7475),o=n(7046),g=n(2302),s=Object;t.exports=g?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return i(e)&&o(e.prototype,s(t))}},3091:(t,e,n)=>{var r=n(6843),i=n(8834),o=n(6059),g=n(9826),s=n(6782),A=n(623),C=n(7046),I=n(3476),a=n(2902),u=n(7609),c=TypeError,l=function(t,e){this.stopped=t,this.result=e},h=l.prototype;t.exports=function(t,e,n){var d,f,p,v,y,b,m,w=n&&n.that,_=!(!n||!n.AS_ENTRIES),x=!(!n||!n.IS_RECORD),E=!(!n||!n.IS_ITERATOR),O=!(!n||!n.INTERRUPTED),k=r(e,w),T=function(t){return d&&u(d,"normal",t),new l(!0,t)},S=function(t){return _?(o(t),O?k(t[0],t[1],T):k(t[0],t[1])):O?k(t,T):k(t)};if(x)d=t.iterator;else if(E)d=t;else{if(!(f=a(t)))throw c(g(t)+" is not iterable");if(s(f)){for(p=0,v=A(t);v>p;p++)if((y=S(t[p]))&&C(h,y))return y;return new l(!1)}d=I(t,f)}for(b=x?t.next:d.next;!(m=i(b,d)).done;){try{y=S(m.value)}catch(t){u(d,"throw",t)}if("object"==typeof y&&y&&C(h,y))return y}return new l(!1)}},7609:(t,e,n)=>{var r=n(8834),i=n(6059),o=n(4229);t.exports=function(t,e,n){var g,s;i(t);try{if(!(g=o(t,"return"))){if("throw"===e)throw n;return n}g=r(g,t)}catch(t){s=!0,g=t}if("throw"===e)throw n;if(s)throw g;return i(g),n}},3847:(t,e,n)=>{"use strict";var r=n(5143).IteratorPrototype,i=n(9290),o=n(1887),g=n(904),s=n(2077),A=function(){return this};t.exports=function(t,e,n,C){var I=e+" Iterator";return t.prototype=i(r,{next:o(+!C,n)}),g(t,I,!1,!0),s[I]=A,t}},5105:(t,e,n)=>{"use strict";var r=n(6887),i=n(8834),o=n(2529),g=n(9417),s=n(7475),A=n(3847),C=n(249),I=n(8929),a=n(904),u=n(2029),c=n(5929),l=n(9813),h=n(2077),d=n(5143),f=g.PROPER,p=g.CONFIGURABLE,v=d.IteratorPrototype,y=d.BUGGY_SAFARI_ITERATORS,b=l("iterator"),m="keys",w="values",_="entries",x=function(){return this};t.exports=function(t,e,n,g,l,d,E){A(n,e,g);var O,k,T,S=function(t){if(t===l&&M)return M;if(!y&&t in R)return R[t];switch(t){case m:case w:case _:return function(){return new n(this,t)}}return function(){return new n(this)}},P=e+" Iterator",N=!1,R=t.prototype,D=R[b]||R["@@iterator"]||l&&R[l],M=!y&&D||S(l),j="Array"==e&&R.entries||D;if(j&&(O=C(j.call(new t)))!==Object.prototype&&O.next&&(o||C(O)===v||(I?I(O,v):s(O[b])||c(O,b,x)),a(O,P,!0,!0),o&&(h[P]=x)),f&&l==w&&D&&D.name!==w&&(!o&&p?u(R,"name",w):(N=!0,M=function(){return i(D,this)})),l)if(k={values:S(w),keys:d?M:S(m),entries:S(_)},E)for(T in k)(y||N||!(T in R))&&c(R,T,k[T]);else r({target:e,proto:!0,forced:y||N},k);return o&&!E||R[b]===M||c(R,b,M,{name:l}),h[e]=M,k}},5143:(t,e,n)=>{"use strict";var r,i,o,g=n(5981),s=n(7475),A=n(941),C=n(9290),I=n(249),a=n(5929),u=n(9813),c=n(2529),l=u("iterator"),h=!1;[].keys&&("next"in(o=[].keys())?(i=I(I(o)))!==Object.prototype&&(r=i):h=!0),!A(r)||g((function(){var t={};return r[l].call(t)!==t}))?r={}:c&&(r=C(r)),s(r[l])||a(r,l,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:h}},2077:t=>{t.exports={}},623:(t,e,n)=>{var r=n(3057);t.exports=function(t){return r(t.length)}},5331:t=>{var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var r=+t;return(r>0?n:e)(r)}},6132:(t,e,n)=>{var r,i,o,g,s,A=n(1899),C=n(6843),I=n(9677).f,a=n(2941).set,u=n(8397),c=n(2749),l=n(4470),h=n(8045),d=n(6049),f=A.MutationObserver||A.WebKitMutationObserver,p=A.document,v=A.process,y=A.Promise,b=I(A,"queueMicrotask"),m=b&&b.value;if(!m){var w=new u,_=function(){var t,e;for(d&&(t=v.domain)&&t.exit();e=w.get();)try{e()}catch(t){throw w.head&&r(),t}t&&t.enter()};c||d||h||!f||!p?!l&&y&&y.resolve?((g=y.resolve(void 0)).constructor=y,s=C(g.then,g),r=function(){s(_)}):d?r=function(){v.nextTick(_)}:(a=C(a,A),r=function(){a(_)}):(i=!0,o=p.createTextNode(""),new f(_).observe(o,{characterData:!0}),r=function(){o.data=i=!i}),m=function(t){w.head||r(),w.add(t)}}t.exports=m},9520:(t,e,n)=>{"use strict";var r=n(4883),i=TypeError,o=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw i("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)};t.exports.f=function(t){return new o(t)}},4649:(t,e,n)=>{var r=n(5803);t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:r(t)}},9290:(t,e,n)=>{var r,i=n(6059),o=n(9938),g=n(6759),s=n(7748),A=n(5463),C=n(1333),I=n(4262),a="prototype",u="script",c=I("IE_PROTO"),l=function(){},h=function(t){return"<"+u+">"+t+""},d=function(t){t.write(h("")),t.close();var e=t.parentWindow.Object;return t=null,e},f=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;f="undefined"!=typeof document?document.domain&&r?d(r):(e=C("iframe"),n="java"+u+":",e.style.display="none",A.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(h("document.F=Object")),t.close(),t.F):d(r);for(var i=g.length;i--;)delete f[a][g[i]];return f()};s[c]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(l[a]=i(t),n=new l,l[a]=null,n[c]=t):n=f(),void 0===e?n:o.f(n,e)}},9938:(t,e,n)=>{var r=n(5746),i=n(3937),o=n(5988),g=n(6059),s=n(4529),A=n(4771);e.f=r&&!i?Object.defineProperties:function(t,e){g(t);for(var n,r=s(e),i=A(e),C=i.length,I=0;C>I;)o.f(t,n=i[I++],r[n]);return t}},5988:(t,e,n)=>{var r=n(5746),i=n(2840),o=n(3937),g=n(6059),s=n(3894),A=TypeError,C=Object.defineProperty,I=Object.getOwnPropertyDescriptor,a="enumerable",u="configurable",c="writable";e.f=r?o?function(t,e,n){if(g(t),e=s(e),g(n),"function"==typeof t&&"prototype"===e&&"value"in n&&c in n&&!n[c]){var r=I(t,e);r&&r[c]&&(t[e]=n.value,n={configurable:u in n?n[u]:r[u],enumerable:a in n?n[a]:r[a],writable:!1})}return C(t,e,n)}:C:function(t,e,n){if(g(t),e=s(e),g(n),i)try{return C(t,e,n)}catch(t){}if("get"in n||"set"in n)throw A("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},9677:(t,e,n)=>{var r=n(5746),i=n(8834),o=n(6760),g=n(1887),s=n(4529),A=n(3894),C=n(953),I=n(2840),a=Object.getOwnPropertyDescriptor;e.f=r?a:function(t,e){if(t=s(t),e=A(e),I)try{return a(t,e)}catch(t){}if(C(t,e))return g(!i(o.f,t,e),t[e])}},684:(t,e,n)=>{var r=n(2532),i=n(4529),o=n(946).f,g=n(5790),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return s&&"Window"==r(t)?function(t){try{return o(t)}catch(t){return g(s)}}(t):o(i(t))}},946:(t,e,n)=>{var r=n(5629),i=n(6759).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},7857:(t,e)=>{e.f=Object.getOwnPropertySymbols},249:(t,e,n)=>{var r=n(953),i=n(7475),o=n(9678),g=n(4262),s=n(4160),A=g("IE_PROTO"),C=Object,I=C.prototype;t.exports=s?C.getPrototypeOf:function(t){var e=o(t);if(r(e,A))return e[A];var n=e.constructor;return i(n)&&e instanceof n?n.prototype:e instanceof C?I:null}},1584:(t,e,n)=>{var r=n(5981),i=n(941),o=n(2532),g=n(7135),s=Object.isExtensible,A=r((function(){s(1)}));t.exports=A||g?function(t){return!!i(t)&&(!g||"ArrayBuffer"!=o(t))&&(!s||s(t))}:s},7046:(t,e,n)=>{var r=n(5329);t.exports=r({}.isPrototypeOf)},5629:(t,e,n)=>{var r=n(5329),i=n(953),o=n(4529),g=n(1692).indexOf,s=n(7748),A=r([].push);t.exports=function(t,e){var n,r=o(t),C=0,I=[];for(n in r)!i(s,n)&&i(r,n)&&A(I,n);for(;e.length>C;)i(r,n=e[C++])&&(~g(I,n)||A(I,n));return I}},4771:(t,e,n)=>{var r=n(5629),i=n(6759);t.exports=Object.keys||function(t){return r(t,i)}},6760:(t,e)=>{"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);e.f=i?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},8929:(t,e,n)=>{var r=n(5526),i=n(6059),o=n(1851);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=r(Object.prototype,"__proto__","set"))(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return i(n),o(r),e?t(n,r):n.__proto__=r,n}}():void 0)},8810:(t,e,n)=>{var r=n(5746),i=n(5329),o=n(4771),g=n(4529),s=i(n(6760).f),A=i([].push),C=function(t){return function(e){for(var n,i=g(e),C=o(i),I=C.length,a=0,u=[];I>a;)n=C[a++],r&&!s(i,n)||A(u,t?[n,i[n]]:i[n]);return u}};t.exports={entries:C(!0),values:C(!1)}},5623:(t,e,n)=>{"use strict";var r=n(2885),i=n(9697);t.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},9811:(t,e,n)=>{var r=n(8834),i=n(7475),o=n(941),g=TypeError;t.exports=function(t,e){var n,s;if("string"===e&&i(n=t.toString)&&!o(s=r(n,t)))return s;if(i(n=t.valueOf)&&!o(s=r(n,t)))return s;if("string"!==e&&i(n=t.toString)&&!o(s=r(n,t)))return s;throw g("Can't convert object to primitive value")}},1136:(t,e,n)=>{var r=n(626),i=n(5329),o=n(946),g=n(7857),s=n(6059),A=i([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=o.f(s(t)),n=g.f;return n?A(e,n(t)):e}},4058:t=>{t.exports={}},2:t=>{t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},7742:(t,e,n)=>{var r=n(1899),i=n(6991),o=n(7475),g=n(7252),s=n(1302),A=n(9813),C=n(3321),I=n(8501),a=n(2529),u=n(3385),c=i&&i.prototype,l=A("species"),h=!1,d=o(r.PromiseRejectionEvent),f=g("Promise",(function(){var t=s(i),e=t!==String(i);if(!e&&66===u)return!0;if(a&&(!c.catch||!c.finally))return!0;if(!u||u<51||!/native code/.test(t)){var n=new i((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};if((n.constructor={})[l]=r,!(h=n.then((function(){}))instanceof r))return!0}return!e&&(C||I)&&!d}));t.exports={CONSTRUCTOR:f,REJECTION_EVENT:d,SUBCLASSING:h}},6991:(t,e,n)=>{var r=n(1899);t.exports=r.Promise},6584:(t,e,n)=>{var r=n(6059),i=n(941),o=n(9520);t.exports=function(t,e){if(r(t),i(e)&&e.constructor===t)return e;var n=o.f(t);return(0,n.resolve)(e),n.promise}},1542:(t,e,n)=>{var r=n(6991),i=n(1385),o=n(7742).CONSTRUCTOR;t.exports=o||!i((function(t){r.all(t).then(void 0,(function(){}))}))},8397:t=>{var e=function(){this.head=null,this.tail=null};e.prototype={add:function(t){var e={item:t,next:null},n=this.tail;n?n.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}},t.exports=e},8219:(t,e,n)=>{var r=n(2119),i=TypeError;t.exports=function(t){if(r(t))throw i("Can't call method on "+t);return t}},7620:(t,e,n)=>{"use strict";var r,i=n(1899),o=n(9730),g=n(7475),s=n(6491),A=n(2861),C=n(3765),I=n(8348),a=i.Function,u=/MSIE .\./.test(A)||s&&((r=i.Bun.version.split(".")).length<3||0==r[0]&&(r[1]<3||3==r[1]&&0==r[2]));t.exports=function(t,e){var n=e?2:1;return u?function(r,i){var s=I(arguments.length,1)>n,A=g(r)?r:a(r),u=s?C(arguments,n):[],c=s?function(){o(A,this,u)}:A;return e?t(c,i):t(c)}:t}},4431:(t,e,n)=>{"use strict";var r=n(626),i=n(9202),o=n(9813),g=n(5746),s=o("species");t.exports=function(t){var e=r(t);g&&e&&!e[s]&&i(e,s,{configurable:!0,get:function(){return this}})}},904:(t,e,n)=>{var r=n(2885),i=n(5988).f,o=n(2029),g=n(953),s=n(5623),A=n(9813)("toStringTag");t.exports=function(t,e,n,C){if(t){var I=n?t:t.prototype;g(I,A)||i(I,A,{configurable:!0,value:e}),C&&!r&&o(I,"toString",s)}}},4262:(t,e,n)=>{var r=n(8726),i=n(9418),o=r("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},3030:(t,e,n)=>{var r=n(1899),i=n(5609),o="__core-js_shared__",g=r[o]||i(o,{});t.exports=g},8726:(t,e,n)=>{var r=n(2529),i=n(3030);(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.30.2",mode:r?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.2/LICENSE",source:"https://github.com/zloirock/core-js"})},487:(t,e,n)=>{var r=n(6059),i=n(174),o=n(2119),g=n(9813)("species");t.exports=function(t,e){var n,s=r(t).constructor;return void 0===s||o(n=r(s)[g])?e:i(n)}},4620:(t,e,n)=>{var r=n(5329),i=n(2435),o=n(5803),g=n(8219),s=r("".charAt),A=r("".charCodeAt),C=r("".slice),I=function(t){return function(e,n){var r,I,a=o(g(e)),u=i(n),c=a.length;return u<0||u>=c?t?"":void 0:(r=A(a,u))<55296||r>56319||u+1===c||(I=A(a,u+1))<56320||I>57343?t?s(a,u):r:t?C(a,u,u+2):I-56320+(r-55296<<10)+65536}};t.exports={codeAt:I(!1),charAt:I(!0)}},3405:(t,e,n)=>{var r=n(3385),i=n(5981),o=n(1899).String;t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol();return!o(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},9630:(t,e,n)=>{var r=n(8834),i=n(626),o=n(9813),g=n(5929);t.exports=function(){var t=i("Symbol"),e=t&&t.prototype,n=e&&e.valueOf,s=o("toPrimitive");e&&!e[s]&&g(e,s,(function(t){return r(n,this)}),{arity:1})}},4680:(t,e,n)=>{var r=n(3405);t.exports=r&&!!Symbol.for&&!!Symbol.keyFor},2941:(t,e,n)=>{var r,i,o,g,s=n(1899),A=n(9730),C=n(6843),I=n(7475),a=n(953),u=n(5981),c=n(5463),l=n(3765),h=n(1333),d=n(8348),f=n(2749),p=n(6049),v=s.setImmediate,y=s.clearImmediate,b=s.process,m=s.Dispatch,w=s.Function,_=s.MessageChannel,x=s.String,E=0,O={},k="onreadystatechange";u((function(){r=s.location}));var T=function(t){if(a(O,t)){var e=O[t];delete O[t],e()}},S=function(t){return function(){T(t)}},P=function(t){T(t.data)},N=function(t){s.postMessage(x(t),r.protocol+"//"+r.host)};v&&y||(v=function(t){d(arguments.length,1);var e=I(t)?t:w(t),n=l(arguments,1);return O[++E]=function(){A(e,void 0,n)},i(E),E},y=function(t){delete O[t]},p?i=function(t){b.nextTick(S(t))}:m&&m.now?i=function(t){m.now(S(t))}:_&&!f?(g=(o=new _).port2,o.port1.onmessage=P,i=C(g.postMessage,g)):s.addEventListener&&I(s.postMessage)&&!s.importScripts&&r&&"file:"!==r.protocol&&!u(N)?(i=N,s.addEventListener("message",P,!1)):i=k in h("script")?function(t){c.appendChild(h("script"))[k]=function(){c.removeChild(this),T(t)}}:function(t){setTimeout(S(t),0)}),t.exports={set:v,clear:y}},9413:(t,e,n)=>{var r=n(2435),i=Math.max,o=Math.min;t.exports=function(t,e){var n=r(t);return n<0?i(n+e,0):o(n,e)}},4529:(t,e,n)=>{var r=n(7026),i=n(8219);t.exports=function(t){return r(i(t))}},2435:(t,e,n)=>{var r=n(5331);t.exports=function(t){var e=+t;return e!=e||0===e?0:r(e)}},3057:(t,e,n)=>{var r=n(2435),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},9678:(t,e,n)=>{var r=n(8219),i=Object;t.exports=function(t){return i(r(t))}},6935:(t,e,n)=>{var r=n(8834),i=n(941),o=n(6664),g=n(4229),s=n(9811),A=n(9813),C=TypeError,I=A("toPrimitive");t.exports=function(t,e){if(!i(t)||o(t))return t;var n,A=g(t,I);if(A){if(void 0===e&&(e="default"),n=r(A,t,e),!i(n)||o(n))return n;throw C("Can't convert object to primitive value")}return void 0===e&&(e="number"),s(t,e)}},3894:(t,e,n)=>{var r=n(6935),i=n(6664);t.exports=function(t){var e=r(t,"string");return i(e)?e:e+""}},2885:(t,e,n)=>{var r={};r[n(9813)("toStringTag")]="z",t.exports="[object z]"===String(r)},5803:(t,e,n)=>{var r=n(9697),i=String;t.exports=function(t){if("Symbol"===r(t))throw TypeError("Cannot convert a Symbol value to a string");return i(t)}},9826:t=>{var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},9418:(t,e,n)=>{var r=n(5329),i=0,o=Math.random(),g=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+g(++i+o,36)}},2302:(t,e,n)=>{var r=n(3405);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3937:(t,e,n)=>{var r=n(5746),i=n(5981);t.exports=r&&i((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},8348:t=>{var e=TypeError;t.exports=function(t,n){if(t{var r=n(1899),i=n(7475),o=r.WeakMap;t.exports=i(o)&&/native code/.test(String(o))},3464:(t,e,n)=>{var r=n(4058),i=n(953),o=n(1477),g=n(5988).f;t.exports=function(t){var e=r.Symbol||(r.Symbol={});i(e,t)||g(e,t,{value:o.f(t)})}},1477:(t,e,n)=>{var r=n(9813);e.f=r},9813:(t,e,n)=>{var r=n(1899),i=n(8726),o=n(953),g=n(9418),s=n(3405),A=n(2302),C=r.Symbol,I=i("wks"),a=A?C.for||C:C&&C.withoutSetter||g;t.exports=function(t){return o(I,t)||(I[t]=s&&o(C,t)?C[t]:a("Symbol."+t)),I[t]}},9812:(t,e,n)=>{"use strict";var r=n(6887),i=n(7046),o=n(249),g=n(8929),s=n(3489),A=n(9290),C=n(2029),I=n(1887),a=n(3794),u=n(9585),c=n(3091),l=n(4649),h=n(9813)("toStringTag"),d=Error,f=[].push,p=function(t,e){var n,r=i(v,this);g?n=g(d(),r?o(this):v):(n=r?this:A(v),C(n,h,"Error")),void 0!==e&&C(n,"message",l(e)),u(n,p,n.stack,1),arguments.length>2&&a(n,arguments[2]);var s=[];return c(t,f,{that:s}),C(n,"errors",s),n};g?g(p,d):s(p,d,{name:!0});var v=p.prototype=A(d.prototype,{constructor:I(1,p),message:I(1,""),name:I(1,"AggregateError")});r({global:!0,constructor:!0,arity:2},{AggregateError:p})},7627:(t,e,n)=>{n(9812)},5906:(t,e,n)=>{"use strict";var r=n(6887),i=n(5981),o=n(1052),g=n(941),s=n(9678),A=n(623),C=n(6796),I=n(5449),a=n(4692),u=n(568),c=n(9813),l=n(3385),h=c("isConcatSpreadable"),d=l>=51||!i((function(){var t=[];return t[h]=!1,t.concat()[0]!==t})),f=function(t){if(!g(t))return!1;var e=t[h];return void 0!==e?!!e:o(t)};r({target:"Array",proto:!0,arity:1,forced:!d||!u("concat")},{concat:function(t){var e,n,r,i,o,g=s(this),u=a(g,0),c=0;for(e=-1,r=arguments.length;e{"use strict";var r=n(6887),i=n(6837);r({target:"Array",proto:!0,forced:[].forEach!=i},{forEach:i})},2988:(t,e,n)=>{n(6887)({target:"Array",stat:!0},{isArray:n(1052)})},6274:(t,e,n)=>{"use strict";var r=n(4529),i=n(8479),o=n(2077),g=n(5402),s=n(5988).f,A=n(5105),C=n(3538),I=n(2529),a=n(5746),u="Array Iterator",c=g.set,l=g.getterFor(u);t.exports=A(Array,"Array",(function(t,e){c(this,{type:u,target:r(t),index:0,kind:e})}),(function(){var t=l(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,C(void 0,!0)):C("keys"==n?r:"values"==n?e[r]:[r,e[r]],!1)}),"values");var h=o.Arguments=o.Array;if(i("keys"),i("values"),i("entries"),!I&&a&&"values"!==h.name)try{s(h,"name",{value:"values"})}catch(t){}},8787:(t,e,n)=>{"use strict";var r=n(6887),i=n(3610).map;r({target:"Array",proto:!0,forced:!n(568)("map")},{map:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},1876:(t,e,n)=>{"use strict";var r=n(6887),i=n(6499).left,o=n(4194),g=n(3385);r({target:"Array",proto:!0,forced:!n(6049)&&g>79&&g<83||!o("reduce")},{reduce:function(t){var e=arguments.length;return i(this,t,e,e>1?arguments[1]:void 0)}})},8084:()=>{},2619:(t,e,n)=>{var r=n(6887),i=n(626),o=n(9730),g=n(8834),s=n(5329),A=n(5981),C=n(7475),I=n(6664),a=n(3765),u=n(3323),c=n(3405),l=String,h=i("JSON","stringify"),d=s(/./.exec),f=s("".charAt),p=s("".charCodeAt),v=s("".replace),y=s(1..toString),b=/[\uD800-\uDFFF]/g,m=/^[\uD800-\uDBFF]$/,w=/^[\uDC00-\uDFFF]$/,_=!c||A((function(){var t=i("Symbol")();return"[null]"!=h([t])||"{}"!=h({a:t})||"{}"!=h(Object(t))})),x=A((function(){return'"\\udf06\\ud834"'!==h("\udf06\ud834")||'"\\udead"'!==h("\udead")})),E=function(t,e){var n=a(arguments),r=u(e);if(C(r)||void 0!==t&&!I(t))return n[1]=function(t,e){if(C(r)&&(e=g(r,this,l(t),e)),!I(e))return e},o(h,null,n)},O=function(t,e,n){var r=f(n,e-1),i=f(n,e+1);return d(m,t)&&!d(w,i)||d(w,t)&&!d(m,r)?"\\u"+y(p(t,0),16):t};h&&r({target:"JSON",stat:!0,arity:3,forced:_||x},{stringify:function(t,e,n){var r=a(arguments),i=o(_?E:h,null,r);return x&&"string"==typeof i?v(i,b,O):i}})},9120:(t,e,n)=>{var r=n(1899);n(904)(r.JSON,"JSON",!0)},5327:()=>{},6450:(t,e,n)=>{var r=n(6887),i=n(5746),o=n(5988).f;r({target:"Object",stat:!0,forced:Object.defineProperty!==o,sham:!i},{defineProperty:o})},1078:(t,e,n)=>{var r=n(6887),i=n(8810).entries;r({target:"Object",stat:!0},{entries:function(t){return i(t)}})},7144:(t,e,n)=>{var r=n(6887),i=n(3405),o=n(5981),g=n(7857),s=n(9678);r({target:"Object",stat:!0,forced:!i||o((function(){g.f(1)}))},{getOwnPropertySymbols:function(t){var e=g.f;return e?e(s(t)):[]}})},1724:(t,e,n)=>{var r=n(6887),i=n(9678),o=n(4771);r({target:"Object",stat:!0,forced:n(5981)((function(){o(1)}))},{keys:function(t){return o(i(t))}})},5967:()=>{},4560:(t,e,n)=>{"use strict";var r=n(6887),i=n(8834),o=n(4883),g=n(9520),s=n(2),A=n(3091);r({target:"Promise",stat:!0,forced:n(1542)},{allSettled:function(t){var e=this,n=g.f(e),r=n.resolve,C=n.reject,I=s((function(){var n=o(e.resolve),g=[],s=0,C=1;A(t,(function(t){var o=s++,A=!1;C++,i(n,e,t).then((function(t){A||(A=!0,g[o]={status:"fulfilled",value:t},--C||r(g))}),(function(t){A||(A=!0,g[o]={status:"rejected",reason:t},--C||r(g))}))})),--C||r(g)}));return I.error&&C(I.value),n.promise}})},6890:(t,e,n)=>{"use strict";var r=n(6887),i=n(8834),o=n(4883),g=n(9520),s=n(2),A=n(3091);r({target:"Promise",stat:!0,forced:n(1542)},{all:function(t){var e=this,n=g.f(e),r=n.resolve,C=n.reject,I=s((function(){var n=o(e.resolve),g=[],s=0,I=1;A(t,(function(t){var o=s++,A=!1;I++,i(n,e,t).then((function(t){A||(A=!0,g[o]=t,--I||r(g))}),C)})),--I||r(g)}));return I.error&&C(I.value),n.promise}})},7206:(t,e,n)=>{"use strict";var r=n(6887),i=n(8834),o=n(4883),g=n(626),s=n(9520),A=n(2),C=n(3091),I=n(1542),a="No one promise resolved";r({target:"Promise",stat:!0,forced:I},{any:function(t){var e=this,n=g("AggregateError"),r=s.f(e),I=r.resolve,u=r.reject,c=A((function(){var r=o(e.resolve),g=[],s=0,A=1,c=!1;C(t,(function(t){var o=s++,C=!1;A++,i(r,e,t).then((function(t){C||c||(c=!0,I(t))}),(function(t){C||c||(C=!0,g[o]=t,--A||u(new n(g,a)))}))})),--A||u(new n(g,a))}));return c.error&&u(c.value),r.promise}})},3376:(t,e,n)=>{"use strict";var r=n(6887),i=n(2529),o=n(7742).CONSTRUCTOR,g=n(6991),s=n(626),A=n(7475),C=n(5929),I=g&&g.prototype;if(r({target:"Promise",proto:!0,forced:o,real:!0},{catch:function(t){return this.then(void 0,t)}}),!i&&A(g)){var a=s("Promise").prototype.catch;I.catch!==a&&C(I,"catch",a,{unsafe:!0})}},6934:(t,e,n)=>{"use strict";var r,i,o,g=n(6887),s=n(2529),A=n(6049),C=n(1899),I=n(8834),a=n(5929),u=n(8929),c=n(904),l=n(4431),h=n(4883),d=n(7475),f=n(941),p=n(5743),v=n(487),y=n(2941).set,b=n(6132),m=n(4845),w=n(2),_=n(8397),x=n(5402),E=n(6991),O=n(7742),k=n(9520),T="Promise",S=O.CONSTRUCTOR,P=O.REJECTION_EVENT,N=O.SUBCLASSING,R=x.getterFor(T),D=x.set,M=E&&E.prototype,j=E,B=M,L=C.TypeError,F=C.document,z=C.process,Z=k.f,U=Z,V=!!(F&&F.createEvent&&C.dispatchEvent),G="unhandledrejection",W=function(t){var e;return!(!f(t)||!d(e=t.then))&&e},Y=function(t,e){var n,r,i,o=e.value,g=1==e.state,s=g?t.ok:t.fail,A=t.resolve,C=t.reject,a=t.domain;try{s?(g||(2===e.rejection&&q(e),e.rejection=1),!0===s?n=o:(a&&a.enter(),n=s(o),a&&(a.exit(),i=!0)),n===t.promise?C(L("Promise-chain cycle")):(r=W(n))?I(r,n,A,C):A(n)):C(o)}catch(t){a&&!i&&a.exit(),C(t)}},H=function(t,e){t.notified||(t.notified=!0,b((function(){for(var n,r=t.reactions;n=r.get();)Y(n,t);t.notified=!1,e&&!t.rejection&&Q(t)})))},K=function(t,e,n){var r,i;V?((r=F.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),C.dispatchEvent(r)):r={promise:e,reason:n},!P&&(i=C["on"+t])?i(r):t===G&&m("Unhandled promise rejection",n)},Q=function(t){I(y,C,(function(){var e,n=t.facade,r=t.value;if(X(t)&&(e=w((function(){A?z.emit("unhandledRejection",r,n):K(G,n,r)})),t.rejection=A||X(t)?2:1,e.error))throw e.value}))},X=function(t){return 1!==t.rejection&&!t.parent},q=function(t){I(y,C,(function(){var e=t.facade;A?z.emit("rejectionHandled",e):K("rejectionhandled",e,t.value)}))},J=function(t,e,n){return function(r){t(e,r,n)}},$=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,H(t,!0))},tt=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw L("Promise can't be resolved itself");var r=W(e);r?b((function(){var n={done:!1};try{I(r,e,J(tt,n,t),J($,n,t))}catch(e){$(n,e,t)}})):(t.value=e,t.state=1,H(t,!1))}catch(e){$({done:!1},e,t)}}};if(S&&(B=(j=function(t){p(this,B),h(t),I(r,this);var e=R(this);try{t(J(tt,e),J($,e))}catch(t){$(e,t)}}).prototype,(r=function(t){D(this,{type:T,done:!1,notified:!1,parent:!1,reactions:new _,rejection:!1,state:0,value:void 0})}).prototype=a(B,"then",(function(t,e){var n=R(this),r=Z(v(this,j));return n.parent=!0,r.ok=!d(t)||t,r.fail=d(e)&&e,r.domain=A?z.domain:void 0,0==n.state?n.reactions.add(r):b((function(){Y(r,n)})),r.promise})),i=function(){var t=new r,e=R(t);this.promise=t,this.resolve=J(tt,e),this.reject=J($,e)},k.f=Z=function(t){return t===j||void 0===t?new i(t):U(t)},!s&&d(E)&&M!==Object.prototype)){o=M.then,N||a(M,"then",(function(t,e){var n=this;return new j((function(t,e){I(o,n,t,e)})).then(t,e)}),{unsafe:!0});try{delete M.constructor}catch(t){}u&&u(M,B)}g({global:!0,constructor:!0,wrap:!0,forced:S},{Promise:j}),c(j,T,!1,!0),l(T)},4349:(t,e,n)=>{"use strict";var r=n(6887),i=n(2529),o=n(6991),g=n(5981),s=n(626),A=n(7475),C=n(487),I=n(6584),a=n(5929),u=o&&o.prototype;if(r({target:"Promise",proto:!0,real:!0,forced:!!o&&g((function(){u.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=C(this,s("Promise")),n=A(t);return this.then(n?function(n){return I(e,t()).then((function(){return n}))}:t,n?function(n){return I(e,t()).then((function(){throw n}))}:t)}}),!i&&A(o)){var c=s("Promise").prototype.finally;u.finally!==c&&a(u,"finally",c,{unsafe:!0})}},8881:(t,e,n)=>{n(6934),n(6890),n(3376),n(5921),n(4069),n(4482)},5921:(t,e,n)=>{"use strict";var r=n(6887),i=n(8834),o=n(4883),g=n(9520),s=n(2),A=n(3091);r({target:"Promise",stat:!0,forced:n(1542)},{race:function(t){var e=this,n=g.f(e),r=n.reject,C=s((function(){var g=o(e.resolve);A(t,(function(t){i(g,e,t).then(n.resolve,r)}))}));return C.error&&r(C.value),n.promise}})},4069:(t,e,n)=>{"use strict";var r=n(6887),i=n(8834),o=n(9520);r({target:"Promise",stat:!0,forced:n(7742).CONSTRUCTOR},{reject:function(t){var e=o.f(this);return i(e.reject,void 0,t),e.promise}})},4482:(t,e,n)=>{"use strict";var r=n(6887),i=n(626),o=n(2529),g=n(6991),s=n(7742).CONSTRUCTOR,A=n(6584),C=i("Promise"),I=o&&!s;r({target:"Promise",stat:!0,forced:o||s},{resolve:function(t){return A(I&&this===C?g:this,t)}})},1502:()=>{},7971:(t,e,n)=>{"use strict";var r=n(4620).charAt,i=n(5803),o=n(5402),g=n(5105),s=n(3538),A="String Iterator",C=o.set,I=o.getterFor(A);g(String,"String",(function(t){C(this,{type:A,string:i(t),index:0})}),(function(){var t,e=I(this),n=e.string,i=e.index;return i>=n.length?s(void 0,!0):(t=r(n,i),e.index+=t.length,s(t,!1))}))},8555:(t,e,n)=>{n(3464)("asyncIterator")},8616:(t,e,n)=>{"use strict";var r=n(6887),i=n(1899),o=n(8834),g=n(5329),s=n(2529),A=n(5746),C=n(3405),I=n(5981),a=n(953),u=n(7046),c=n(6059),l=n(4529),h=n(3894),d=n(5803),f=n(1887),p=n(9290),v=n(4771),y=n(946),b=n(684),m=n(7857),w=n(9677),_=n(5988),x=n(9938),E=n(6760),O=n(5929),k=n(9202),T=n(8726),S=n(4262),P=n(7748),N=n(9418),R=n(9813),D=n(1477),M=n(3464),j=n(9630),B=n(904),L=n(5402),F=n(3610).forEach,z=S("hidden"),Z="Symbol",U="prototype",V=L.set,G=L.getterFor(Z),W=Object[U],Y=i.Symbol,H=Y&&Y[U],K=i.TypeError,Q=i.QObject,X=w.f,q=_.f,J=b.f,$=E.f,tt=g([].push),et=T("symbols"),nt=T("op-symbols"),rt=T("wks"),it=!Q||!Q[U]||!Q[U].findChild,ot=A&&I((function(){return 7!=p(q({},"a",{get:function(){return q(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=X(W,e);r&&delete W[e],q(t,e,n),r&&t!==W&&q(W,e,r)}:q,gt=function(t,e){var n=et[t]=p(H);return V(n,{type:Z,tag:t,description:e}),A||(n.description=e),n},st=function(t,e,n){t===W&&st(nt,e,n),c(t);var r=h(e);return c(n),a(et,r)?(n.enumerable?(a(t,z)&&t[z][r]&&(t[z][r]=!1),n=p(n,{enumerable:f(0,!1)})):(a(t,z)||q(t,z,f(1,{})),t[z][r]=!0),ot(t,r,n)):q(t,r,n)},At=function(t,e){c(t);var n=l(e),r=v(n).concat(ut(n));return F(r,(function(e){A&&!o(Ct,n,e)||st(t,e,n[e])})),t},Ct=function(t){var e=h(t),n=o($,this,e);return!(this===W&&a(et,e)&&!a(nt,e))&&(!(n||!a(this,e)||!a(et,e)||a(this,z)&&this[z][e])||n)},It=function(t,e){var n=l(t),r=h(e);if(n!==W||!a(et,r)||a(nt,r)){var i=X(n,r);return!i||!a(et,r)||a(n,z)&&n[z][r]||(i.enumerable=!0),i}},at=function(t){var e=J(l(t)),n=[];return F(e,(function(t){a(et,t)||a(P,t)||tt(n,t)})),n},ut=function(t){var e=t===W,n=J(e?nt:l(t)),r=[];return F(n,(function(t){!a(et,t)||e&&!a(W,t)||tt(r,et[t])})),r};C||(O(H=(Y=function(){if(u(H,this))throw K("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?d(arguments[0]):void 0,e=N(t),n=function(t){this===W&&o(n,nt,t),a(this,z)&&a(this[z],e)&&(this[z][e]=!1),ot(this,e,f(1,t))};return A&&it&&ot(W,e,{configurable:!0,set:n}),gt(e,t)})[U],"toString",(function(){return G(this).tag})),O(Y,"withoutSetter",(function(t){return gt(N(t),t)})),E.f=Ct,_.f=st,x.f=At,w.f=It,y.f=b.f=at,m.f=ut,D.f=function(t){return gt(R(t),t)},A&&(k(H,"description",{configurable:!0,get:function(){return G(this).description}}),s||O(W,"propertyIsEnumerable",Ct,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!C,sham:!C},{Symbol:Y}),F(v(rt),(function(t){M(t)})),r({target:Z,stat:!0,forced:!C},{useSetter:function(){it=!0},useSimple:function(){it=!1}}),r({target:"Object",stat:!0,forced:!C,sham:!A},{create:function(t,e){return void 0===e?p(t):At(p(t),e)},defineProperty:st,defineProperties:At,getOwnPropertyDescriptor:It}),r({target:"Object",stat:!0,forced:!C},{getOwnPropertyNames:at}),j(),B(Y,Z),P[z]=!0},2615:()=>{},4523:(t,e,n)=>{var r=n(6887),i=n(626),o=n(953),g=n(5803),s=n(8726),A=n(4680),C=s("string-to-symbol-registry"),I=s("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!A},{for:function(t){var e=g(t);if(o(C,e))return C[e];var n=i("Symbol")(e);return C[e]=n,I[n]=e,n}})},1732:(t,e,n)=>{n(3464)("hasInstance")},5903:(t,e,n)=>{n(3464)("isConcatSpreadable")},1825:(t,e,n)=>{n(3464)("iterator")},5824:(t,e,n)=>{n(8616),n(4523),n(8608),n(2619),n(7144)},8608:(t,e,n)=>{var r=n(6887),i=n(953),o=n(6664),g=n(9826),s=n(8726),A=n(4680),C=s("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!A},{keyFor:function(t){if(!o(t))throw TypeError(g(t)+" is not a symbol");if(i(C,t))return C[t]}})},5915:(t,e,n)=>{n(3464)("matchAll")},8394:(t,e,n)=>{n(3464)("match")},1766:(t,e,n)=>{n(3464)("replace")},2737:(t,e,n)=>{n(3464)("search")},9911:(t,e,n)=>{n(3464)("species")},4315:(t,e,n)=>{n(3464)("split")},3131:(t,e,n)=>{var r=n(3464),i=n(9630);r("toPrimitive"),i()},4714:(t,e,n)=>{var r=n(626),i=n(3464),o=n(904);i("toStringTag"),o(r("Symbol"),"Symbol")},659:(t,e,n)=>{n(3464)("unscopables")},4776:(t,e,n)=>{"use strict";var r,i=n(5602),o=n(1899),g=n(5329),s=n(4380),A=n(1647),C=n(4683),I=n(8850),a=n(941),u=n(5402).enforce,c=n(5981),l=n(7093),h=Object,d=Array.isArray,f=h.isExtensible,p=h.isFrozen,v=h.isSealed,y=h.freeze,b=h.seal,m={},w={},_=!o.ActiveXObject&&"ActiveXObject"in o,x=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},E=C("WeakMap",x,I),O=E.prototype,k=g(O.set);if(l)if(_){r=I.getConstructor(x,"WeakMap",!0),A.enable();var T=g(O.delete),S=g(O.has),P=g(O.get);s(O,{delete:function(t){if(a(t)&&!f(t)){var e=u(this);return e.frozen||(e.frozen=new r),T(this,t)||e.frozen.delete(t)}return T(this,t)},has:function(t){if(a(t)&&!f(t)){var e=u(this);return e.frozen||(e.frozen=new r),S(this,t)||e.frozen.has(t)}return S(this,t)},get:function(t){if(a(t)&&!f(t)){var e=u(this);return e.frozen||(e.frozen=new r),S(this,t)?P(this,t):e.frozen.get(t)}return P(this,t)},set:function(t,e){if(a(t)&&!f(t)){var n=u(this);n.frozen||(n.frozen=new r),S(this,t)?k(this,t,e):n.frozen.set(t,e)}else k(this,t,e);return this}})}else i&&c((function(){var t=y([]);return k(new E,t,1),!p(t)}))&&s(O,{set:function(t,e){var n;return d(t)&&(p(t)?n=m:v(t)&&(n=w)),k(this,t,e),n==m&&y(t),n==w&&b(t),this}})},4334:(t,e,n)=>{n(4776)},1115:(t,e,n)=>{"use strict";n(4683)("WeakSet",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),n(8850))},1773:(t,e,n)=>{n(1115)},8783:(t,e,n)=>{n(3464)("asyncDispose")},3975:(t,e,n)=>{n(3464)("dispose")},2731:(t,e,n)=>{var r=n(6887),i=n(626),o=n(5329),g=i("Symbol"),s=g.keyFor,A=o(g.prototype.valueOf);r({target:"Symbol",stat:!0},{isRegistered:function(t){try{return void 0!==s(A(t))}catch(t){return!1}}})},5605:(t,e,n)=>{for(var r=n(6887),i=n(8726),o=n(626),g=n(5329),s=n(6664),A=n(9813),C=o("Symbol"),I=C.isWellKnown,a=o("Object","getOwnPropertyNames"),u=g(C.prototype.valueOf),c=i("wks"),l=0,h=a(C),d=h.length;l{n(3464)("matcher")},1943:(t,e,n)=>{n(3464)("metadataKey")},5414:(t,e,n)=>{n(3464)("metadata")},6774:(t,e,n)=>{n(3464)("observable")},620:(t,e,n)=>{n(3464)("patternMatch")},6172:(t,e,n)=>{n(3464)("replaceAll")},7634:(t,e,n)=>{n(6274);var r=n(3281),i=n(1899),o=n(9697),g=n(2029),s=n(2077),A=n(9813)("toStringTag");for(var C in r){var I=i[C],a=I&&I.prototype;a&&o(a)!==A&&g(a,A,C),s[C]=s.Array}},9229:(t,e,n)=>{var r=n(6887),i=n(1899),o=n(7620)(i.setInterval,!0);r({global:!0,bind:!0,forced:i.setInterval!==o},{setInterval:o})},7749:(t,e,n)=>{var r=n(6887),i=n(1899),o=n(7620)(i.setTimeout,!0);r({global:!0,bind:!0,forced:i.setTimeout!==o},{setTimeout:o})},1249:(t,e,n)=>{n(9229),n(7749)},3363:(t,e,n)=>{var r=n(4034);t.exports=r},9216:(t,e,n)=>{var r=n(9324);t.exports=r},6668:(t,e,n)=>{var r=n(5909);t.exports=r},8065:(t,e,n)=>{var r=n(6043);t.exports=r},6279:(t,e,n)=>{n(7634);var r=n(9697),i=n(953),o=n(7046),g=n(9216),s=Array.prototype,A={DOMTokenList:!0,NodeList:!0};t.exports=function(t){var e=t.forEach;return t===s||o(s,t)&&e===s.forEach||i(A,r(t))?g:e}},3819:(t,e,n)=>{n(7634);var r=n(9697),i=n(953),o=n(7046),g=n(6668),s=Array.prototype,A={DOMTokenList:!0,NodeList:!0};t.exports=function(t){var e=t.keys;return t===s||o(s,t)&&e===s.keys||i(A,r(t))?g:e}},1798:(t,e,n)=>{var r=n(8287);t.exports=r},2527:(t,e,n)=>{var r=n(8025);t.exports=r},1910:(t,e,n)=>{var r=n(8171);t.exports=r},6209:(t,e,n)=>{var r=n(3081);t.exports=r},3059:(t,e,n)=>{var r=n(8494);t.exports=r},7460:(t,e,n)=>{var r=n(2956);n(7634),t.exports=r},7989:(t,e,n)=>{n(1249);var r=n(4058);t.exports=r.setTimeout},2547:(t,e,n)=>{var r=n(7473);n(7634),t.exports=r},6509:(t,e,n)=>{var r=n(4227);n(7634),t.exports=r},5774:(t,e,n)=>{var r=n(2978);t.exports=r},2010:(t,e,n)=>{var r=n(2304);n(7634),t.exports=r},3726:(t,e,n)=>{var r=n(9567);n(7634),t.exports=r},9996:t=>{"use strict";var e=function(t){return function(t){return!!t&&"object"==typeof t}(t)&&!function(t){var e=Object.prototype.toString.call(t);return"[object RegExp]"===e||"[object Date]"===e||function(t){return t.$$typeof===n}(t)}(t)},n="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function r(t,e){return!1!==e.clone&&e.isMergeableObject(t)?s((n=t,Array.isArray(n)?[]:{}),t,e):t;var n}function i(t,e,n){return t.concat(e).map((function(t){return r(t,n)}))}function o(t){return Object.keys(t).concat(function(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter((function(e){return Object.propertyIsEnumerable.call(t,e)})):[]}(t))}function g(t,e){try{return e in t}catch(t){return!1}}function s(t,n,A){(A=A||{}).arrayMerge=A.arrayMerge||i,A.isMergeableObject=A.isMergeableObject||e,A.cloneUnlessOtherwiseSpecified=r;var C=Array.isArray(n);return C===Array.isArray(t)?C?A.arrayMerge(t,n,A):function(t,e,n){var i={};return n.isMergeableObject(t)&&o(t).forEach((function(e){i[e]=r(t[e],n)})),o(e).forEach((function(o){(function(t,e){return g(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))})(t,o)||(g(t,o)&&n.isMergeableObject(e[o])?i[o]=function(t,e){if(!e.customMerge)return s;var n=e.customMerge(t);return"function"==typeof n?n:s}(o,n)(t[o],e[o],n):i[o]=r(e[o],n))})),i}(t,n,A):r(n,A)}s.all=function(t,e){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce((function(t,n){return s(t,n,e)}),{})};var A=s;t.exports=A},645:(t,e)=>{e.read=function(t,e,n,r,i){var o,g,s=8*i-r-1,A=(1<>1,I=-7,a=n?i-1:0,u=n?-1:1,c=t[e+a];for(a+=u,o=c&(1<<-I)-1,c>>=-I,I+=s;I>0;o=256*o+t[e+a],a+=u,I-=8);for(g=o&(1<<-I)-1,o>>=-I,I+=r;I>0;g=256*g+t[e+a],a+=u,I-=8);if(0===o)o=1-C;else{if(o===A)return g?NaN:1/0*(c?-1:1);g+=Math.pow(2,r),o-=C}return(c?-1:1)*g*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var g,s,A,C=8*o-i-1,I=(1<>1,u=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,c=r?0:o-1,l=r?1:-1,h=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,g=I):(g=Math.floor(Math.log(e)/Math.LN2),e*(A=Math.pow(2,-g))<1&&(g--,A*=2),(e+=g+a>=1?u/A:u*Math.pow(2,1-a))*A>=2&&(g++,A/=2),g+a>=I?(s=0,g=I):g+a>=1?(s=(e*A-1)*Math.pow(2,i),g+=a):(s=e*Math.pow(2,a-1)*Math.pow(2,i),g=0));i>=8;t[n+c]=255&s,c+=l,s/=256,i-=8);for(g=g<0;t[n+c]=255&g,c+=l,g/=256,C-=8);t[n+c-l]|=128*h}},1401:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.assertImpersonatedUserIsEmpty=e.assertTxConfigIsEmpty=e.assertDatabaseIsEmpty=void 0;var r=n(758);e.assertTxConfigIsEmpty=function(t,e,n){if(void 0===e&&(e=function(){}),t&&!t.isEmpty()){var i=(0,r.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 e(i.message),n.onError(i),i}},e.assertDatabaseIsEmpty=function(t,e,n){if(void 0===e&&(e=function(){}),t){var i=(0,r.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 e(i.message),n.onError(i),i}},e.assertImpersonatedUserIsEmpty=function(t,e,n){if(void 0===e&&(e=function(){}),t){var i=(0,r.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 "+t+".");throw e(i.message),n.onError(i),i}}},6055:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(1401),o=n(7687),g=r(n(4415)),s=n(1235),A=n(758),C=A.internal.bookmark.Bookmark,I=A.internal.constants,a=I.ACCESS_MODE_WRITE,u=I.BOLT_PROTOCOL_V1,c=(A.internal.logger.Logger,A.internal.txConfig.TxConfig),l=function(){function t(t,e,n,r,i,o){var g=void 0===n?{}:n,s=g.disableLosslessIntegers,A=g.useBigInt;void 0===r&&(r=function(){return null}),this._server=t||{},this._chunker=e,this._packer=this._createPacker(e),this._unpacker=this._createUnpacker(s,A),this._responseHandler=r(this),this._log=i,this._onProtocolError=o,this._fatalError=null}return Object.defineProperty(t.prototype,"version",{get:function(){return u},enumerable:!1,configurable:!0}),t.prototype.packer=function(){return this._packer},t.prototype.unpacker=function(){return this._unpacker},t.prototype.transformMetadata=function(t){return t},t.prototype.initialize=function(t){var e=this,n=void 0===t?{}:t,r=n.userAgent,i=n.authToken,o=n.onError,A=n.onComplete,C=new s.LoginObserver({onError:function(t){return e._onLoginError(t,o)},onCompleted:function(t){return e._onLoginCompleted(t,A)}});return this.write(g.default.init(r,i),C,!0),C},t.prototype.prepareToClose=function(){},t.prototype.beginTransaction=function(t){var e=void 0===t?{}:t,n=e.bookmark,r=e.txConfig,i=e.database,o=e.mode,g=e.impersonatedUser,s=e.beforeError,A=e.afterError,C=e.beforeComplete,I=e.afterComplete;return this.run("BEGIN",n?n.asBeginTransactionParameters():{},{bookmark:n,txConfig:r,database:i,mode:o,impersonatedUser:g,beforeError:s,afterError:A,beforeComplete:C,afterComplete:I,flush:!1})},t.prototype.commitTransaction=function(t){var e=void 0===t?{}:t,n=e.beforeError,r=e.afterError,i=e.beforeComplete,o=e.afterComplete;return this.run("COMMIT",{},{bookmark:C.empty(),txConfig:c.empty(),mode:a,beforeError:n,afterError:r,beforeComplete:i,afterComplete:o})},t.prototype.rollbackTransaction=function(t){var e=void 0===t?{}:t,n=e.beforeError,r=e.afterError,i=e.beforeComplete,o=e.afterComplete;return this.run("ROLLBACK",{},{bookmark:C.empty(),txConfig:c.empty(),mode:a,beforeError:n,afterError:r,beforeComplete:i,afterComplete:o})},t.prototype.run=function(t,e,n){var r=void 0===n?{}:n,o=(r.bookmark,r.txConfig),A=r.database,C=(r.mode,r.impersonatedUser),I=r.beforeKeys,a=r.afterKeys,u=r.beforeError,c=r.afterError,l=r.beforeComplete,h=r.afterComplete,d=r.flush,f=void 0===d||d,p=new s.ResultStreamObserver({server:this._server,beforeKeys:I,afterKeys:a,beforeError:u,afterError:c,beforeComplete:l,afterComplete:h});return(0,i.assertTxConfigIsEmpty)(o,this._onProtocolError,p),(0,i.assertDatabaseIsEmpty)(A,this._onProtocolError,p),(0,i.assertImpersonatedUserIsEmpty)(C,this._onProtocolError,p),this.write(g.default.run(t,e),p,!1),this.write(g.default.pullAll(),p,f),p},Object.defineProperty(t.prototype,"currentFailure",{get:function(){return this._responseHandler.currentFailure},enumerable:!1,configurable:!0}),t.prototype.reset=function(t){var e=void 0===t?{}:t,n=e.onError,r=e.onComplete,i=new s.ResetObserver({onProtocolError:this._onProtocolError,onError:n,onComplete:r});return this.write(g.default.reset(),i,!0),i},t.prototype._createPacker=function(t){return new o.v1.Packer(t)},t.prototype._createUnpacker=function(t,e){return new o.v1.Unpacker(t,e)},t.prototype.write=function(t,e,n){var r=this;this.queueObserverIfProtocolIsNotBroken(e)&&(this._log.isDebugEnabled()&&this._log.debug("C: "+t),this.packer().packStruct(t.signature,t.fields.map((function(t){return r.packer().packable(t)}))),this._chunker.messageBoundary(),n&&this._chunker.flush())},t.prototype.notifyFatalError=function(t){return this._fatalError=t,this._responseHandler._notifyErrorToObservers(t)},t.prototype.updateCurrentObserver=function(){return this._responseHandler._updateCurrentObserver()},t.prototype.hasOngoingObservableRequests=function(){return this._responseHandler.hasOngoingObservableRequests()},t.prototype.queueObserverIfProtocolIsNotBroken=function(t){return this.isBroken()?(this.notifyFatalErrorToObserver(t),!1):this._responseHandler._queueObserver(t)},t.prototype.isBroken=function(){return!!this._fatalError},t.prototype.notifyFatalErrorToObserver=function(t){t&&t.onError&&t.onError(this._fatalError)},t.prototype.resetFailure=function(){this._responseHandler._resetFailure()},t.prototype._onLoginCompleted=function(t,e){if(t){var n=t.server;this._server.version||(this._server.version=n)}e&&e(t)},t.prototype._onLoginError=function(t,e){this._onProtocolError(t.message),e&&e(t)},t}();e.default=l},661:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var g=o(n(6055)),s=o(n(7687)),A=n(758).internal.constants.BOLT_PROTOCOL_V2,C=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype._createPacker=function(t){return new s.default.Packer(t)},e.prototype._createUnpacker=function(t,e){return new s.default.Unpacker(t,e)},Object.defineProperty(e.prototype,"version",{get:function(){return A},enumerable:!1,configurable:!0}),e}(g.default);e.default=C},3619:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__assign||function(){return o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7078),i=n(758);function o(t,e){return{major:t,minor:e}}e.default=function(t){var e=this;return new Promise((function(n,g){var s=function(t){g(t)};t.onerror=s.bind(e),t._error&&s(t._error),t.onmessage=function(t){try{var e=function(t){var e=[t.readUInt8(),t.readUInt8(),t.readUInt8(),t.readUInt8()];if(72===e[0]&&84===e[1]&&84===e[2]&&80===e[3])throw(0,i.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(e[3]+"."+e[2])}(t);n({protocolVersion:e,consumeRemainingBuffer:function(e){t.hasRemaining()&&e(t.readSlice(t.remaining()))}})}catch(t){g(t)}},t.write(function(t){if(t.length>4)throw(0,i.newError)("It should not have more than 4 versions of the protocol");var e=(0,r.alloc)(20);return e.writeInt32(1616949271),t.forEach((function(t){if(t instanceof Array){var n=t[0],r=n.major,i=(o=n.minor)-t[1].minor;e.writeInt32(i<<16|o<<8|r)}else{r=t.major;var o=t.minor;e.writeInt32(o<<8|r)}})),e.reset(),e}([[o(4,4),o(4,2)],o(4,1),o(4,0),o(3,0)]))}))}},7778:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.RawRoutingTable=e.BoltProtocol=void 0;var g=o(n(4904)),s=o(n(5530)),A=o(n(7478)),C=o(n(1548));i(n(1235),e),e.BoltProtocol=A.default,e.RawRoutingTable=C.default,e.default={handshake:g.default,create:s.default}},4415:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(758),i=r.internal.constants,o=i.ACCESS_MODE_READ,g=i.FETCH_ALL,s=r.internal.util.assertString,A=function(){function t(t,e,n){this.signature=t,this.fields=e,this.toString=n}return t.init=function(e,n){return new t(1,[e,n],(function(){return"INIT "+e+" {...}"}))},t.run=function(e,n){return new t(16,[e,n],(function(){return"RUN "+e+" "+r.json.stringify(n)}))},t.pullAll=function(){return a},t.reset=function(){return u},t.hello=function(e,n,r,i){void 0===r&&(r=null),void 0===i&&(i=null);var o=Object.assign({user_agent:e},n);return r&&(o.routing=r),i&&(o.patch_bolt=i),new t(1,[o],(function(){return"HELLO {user_agent: '"+e+"', ...}"}))},t.begin=function(e){var n=void 0===e?{}:e,i=C(n.bookmark,n.txConfig,n.database,n.mode,n.impersonatedUser);return new t(17,[i],(function(){return"BEGIN "+r.json.stringify(i)}))},t.commit=function(){return c},t.rollback=function(){return l},t.runWithMetadata=function(e,n,i){var o=void 0===i?{}:i,g=C(o.bookmark,o.txConfig,o.database,o.mode,o.impersonatedUser);return new t(16,[e,n,g],(function(){return"RUN "+e+" "+r.json.stringify(n)+" "+r.json.stringify(g)}))},t.goodbye=function(){return h},t.pull=function(e){var n=void 0===e?{}:e,i=n.stmtId,o=void 0===i?-1:i,s=n.n,A=I(null==o?-1:o,(void 0===s?g:s)||g);return new t(63,[A],(function(){return"PULL "+r.json.stringify(A)}))},t.discard=function(e){var n=void 0===e?{}:e,i=n.stmtId,o=void 0===i?-1:i,s=n.n,A=I(null==o?-1:o,(void 0===s?g:s)||g);return new t(47,[A],(function(){return"DISCARD "+r.json.stringify(A)}))},t.route=function(e,n,i){return void 0===e&&(e={}),void 0===n&&(n=[]),void 0===i&&(i=null),new t(102,[e,n,i],(function(){return"ROUTE "+r.json.stringify(e)+" "+r.json.stringify(n)+" "+i}))},t.routeV4x4=function(e,n,i){void 0===e&&(e={}),void 0===n&&(n=[]),void 0===i&&(i={});var o={};return i.databaseName&&(o.db=i.databaseName),i.impersonatedUser&&(o.imp_user=i.impersonatedUser),new t(102,[e,n,o],(function(){return"ROUTE "+r.json.stringify(e)+" "+r.json.stringify(n)+" "+r.json.stringify(o)}))},t}();function C(t,e,n,r,i){var g={};return t.isEmpty()||(g.bookmarks=t.values()),e.timeout&&(g.tx_timeout=e.timeout),e.metadata&&(g.tx_metadata=e.metadata),n&&(g.db=s(n,"database")),i&&(g.imp_user=s(i,"impersonatedUser")),r===o&&(g.mode="r"),g}function I(t,e){var n={n:(0,r.int)(e)};return-1!==t&&(n.qid=(0,r.int)(t)),n}e.default=A;var a=new A(63,[],(function(){return"PULL_ALL"})),u=new A(15,[],(function(){return"RESET"})),c=new A(18,[],(function(){return"COMMIT"})),l=new A(19,[],(function(){return"ROLLBACK"})),h=new A(2,[],(function(){return"GOODBYE"}))},2385:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(758);function i(){}function o(t){return t}var g={onNext:i,onCompleted:i,onError:i},s=function(){function t(t){var e=void 0===t?{}:t,n=e.transformMetadata,r=e.log,g=e.observer;this._pendingObservers=[],this._log=r,this._transformMetadata=n||o,this._observer=Object.assign({onPendingObserversChange:i,onError:i,onFailure:i,onErrorApplyTransformation:o},g)}return Object.defineProperty(t.prototype,"currentFailure",{get:function(){return this._currentFailure},enumerable:!1,configurable:!0}),t.prototype.handleResponse=function(t){var e=t.fields[0];switch(t.signature){case 113:this._log.isDebugEnabled()&&this._log.debug("S: RECORD "+r.json.stringify(t)),this._currentObserver.onNext(e);break;case 112:this._log.isDebugEnabled()&&this._log.debug("S: SUCCESS "+r.json.stringify(t));try{var n=this._transformMetadata(e);this._currentObserver.onCompleted(n)}finally{this._updateCurrentObserver()}break;case 127:this._log.isDebugEnabled()&&this._log.debug("S: FAILURE "+r.json.stringify(t));try{var i=(0,r.newError)(e.message,e.code);this._currentFailure=this._observer.onErrorApplyTransformation(i),this._currentObserver.onError(this._currentFailure)}finally{this._updateCurrentObserver(),this._observer.onFailure(this._currentFailure)}break;case 126:this._log.isDebugEnabled()&&this._log.debug("S: IGNORED "+r.json.stringify(t));try{this._currentFailure&&this._currentObserver.onError?this._currentObserver.onError(this._currentFailure):this._currentObserver.onError&&this._currentObserver.onError((0,r.newError)("Ignored either because of an error or RESET"))}finally{this._updateCurrentObserver()}break;default:this._observer.onError((0,r.newError)("Unknown Bolt protocol message: "+t))}},t.prototype._updateCurrentObserver=function(){this._currentObserver=this._pendingObservers.shift(),this._observer.onPendingObserversChange(this._pendingObservers.length)},t.prototype._queueObserver=function(t){return(t=t||g).onCompleted=t.onCompleted||i,t.onError=t.onError||i,t.onNext=t.onNext||i,void 0===this._currentObserver?this._currentObserver=t:this._pendingObservers.push(t),this._observer.onPendingObserversChange(this._pendingObservers.length),!0},t.prototype._notifyErrorToObservers=function(t){for(this._currentObserver&&this._currentObserver.onError&&this._currentObserver.onError(t);this._pendingObservers.length>0;){var e=this._pendingObservers.shift();e&&e.onError&&e.onError(t)}},t.prototype.hasOngoingObservableRequests=function(){return null!=this._currentObserver||this._pendingObservers.length>0},t.prototype._resetFailure=function(){this._currentFailure=null},t}();e.default=s},1548:function(t,e){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(){}return t.ofRecord=function(e){return null===e?t.ofNull():new s(e)},t.ofMessageResponse=function(e){return null===e?t.ofNull():new o(e)},t.ofNull=function(){return new g},Object.defineProperty(t.prototype,"ttl",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"db",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"servers",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isNull",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),t}();e.default=i;var o=function(t){function e(e){var n=t.call(this)||this;return n._response=e,n}return r(e,t),Object.defineProperty(e.prototype,"ttl",{get:function(){return this._response.rt.ttl},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"servers",{get:function(){return this._response.rt.servers},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"db",{get:function(){return this._response.rt.db},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isNull",{get:function(){return null===this._response},enumerable:!1,configurable:!0}),e}(i),g=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),Object.defineProperty(e.prototype,"isNull",{get:function(){return!0},enumerable:!1,configurable:!0}),e}(i),s=function(t){function e(e){var n=t.call(this)||this;return n._record=e,n}return r(e,t),Object.defineProperty(e.prototype,"ttl",{get:function(){return this._record.get("ttl")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"servers",{get:function(){return this._record.get("servers")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"db",{get:function(){return this._record.has("db")?this._record.get("db"):null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isNull",{get:function(){return null===this._record},enumerable:!1,configurable:!0}),e}(i)},1235:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.ProcedureRouteObserver=e.RouteObserver=e.CompletedObserver=e.FailedObserver=e.ResetObserver=e.LoginObserver=e.ResultStreamObserver=e.StreamObserver=void 0;var g=n(758),s=o(n(1548)),A=g.internal.constants.FETCH_ALL,C=g.error.PROTOCOL_ERROR,I=function(){function t(){}return t.prototype.onNext=function(t){},t.prototype.onError=function(t){},t.prototype.onCompleted=function(t){},t}();e.StreamObserver=I;var a=function(t){function e(e){var n=void 0===e?{}:e,r=n.reactive,i=void 0!==r&&r,o=n.moreFunction,g=n.discardFunction,s=n.fetchSize,C=void 0===s?A:s,I=n.beforeError,a=n.afterError,u=n.beforeKeys,c=n.afterKeys,l=n.beforeComplete,h=n.afterComplete,d=n.server,f=t.call(this)||this;return f._fieldKeys=null,f._fieldLookup=null,f._head=null,f._queuedRecords=[],f._tail=null,f._error=null,f._observers=[],f._meta={},f._server=d,f._beforeError=I,f._afterError=a,f._beforeKeys=u,f._afterKeys=c,f._beforeComplete=l,f._afterComplete=h,f._queryId=null,f._moreFunction=o,f._discardFunction=g,f._discard=!1,f._fetchSize=C,f._setState(i?p.READY:p.READY_STREAMING),f._setupAuoPull(C),f}return i(e,t),e.prototype.onNext=function(t){var e=new g.Record(this._fieldKeys,t,this._fieldLookup);this._observers.some((function(t){return t.onNext}))?this._observers.forEach((function(t){t.onNext&&t.onNext(e)})):(this._queuedRecords.push(e),this._queuedRecords.length>this._highRecordWatermark&&(this._autoPull=!1))},e.prototype.onCompleted=function(t){this._state.onSuccess(this,t)},e.prototype.onError=function(t){this._state.onError(this,t)},e.prototype.cancel=function(){this._discard=!0},e.prototype.prepareToHandleSingleResponse=function(){this._head=[],this._fieldKeys=[],this._setState(p.STREAMING)},e.prototype.markCompleted=function(){this._head=[],this._fieldKeys=[],this._tail={},this._setState(p.SUCCEEDED)},e.prototype.subscribe=function(t){if(this._error)t.onError(this._error);else{if(this._head&&t.onKeys&&t.onKeys(this._head),this._queuedRecords.length>0&&t.onNext)for(var e=0;e0){this._fieldKeys=t.fields;for(var r=0;r>8),this.putUInt8(t+1,255&e)},t.prototype.putUInt16=function(t,e){this.putUInt8(t,e>>8&255),this.putUInt8(t+1,255&e)},t.prototype.putInt32=function(t,e){this.putInt8(t,e>>24),this.putUInt8(t+1,e>>16&255),this.putUInt8(t+2,e>>8&255),this.putUInt8(t+3,255&e)},t.prototype.putUInt32=function(t,e){this.putUInt8(t,e>>24&255),this.putUInt8(t+1,e>>16&255),this.putUInt8(t+2,e>>8&255),this.putUInt8(t+3,255&e)},t.prototype.putInt64=function(t,e){this.putInt8(t,e>>48),this.putUInt8(t+1,e>>42&255),this.putUInt8(t+2,e>>36&255),this.putUInt8(t+3,e>>30&255),this.putUInt8(t+4,e>>24&255),this.putUInt8(t+5,e>>16&255),this.putUInt8(t+6,e>>8&255),this.putUInt8(t+7,255&e)},t.prototype.putBytes=function(t,e){for(var n=0,r=e.remaining();n0},t.prototype.reset=function(){this.position=0},t.prototype.toString=function(){return this.constructor.name+"( position="+this.position+" )\n "+this.toHex()},t.prototype.toHex=function(){for(var t="",e=0;e=0}(e);return function(t,e,n){null===n||(t&&!n?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."):e&&n&&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."))}(n,r,g),r?{scheme:"ws",error:null}:g?{scheme:"wss",error:null}:n?i&&"TRUST_SYSTEM_CA_SIGNED_CERTIFICATES"!==i?{scheme:null,error:(0,o.newError)("The browser version of this driver only supports one trust strategy, 'TRUST_SYSTEM_CA_SIGNED_CERTIFICATES'. "+i+' is not supported. Please either use TRUST_SYSTEM_CA_SIGNED_CERTIFICATES or disable encryption by setting `encrypted:"'+s+'"` in the driver configuration.')}:{scheme:"wss",error:null}:{scheme:"ws",error:null}}(t,e),g=r.scheme,C=r.error;if(C)this._error=C;else{this._ws=function(t,e,n){var r=t+"://"+e.asHostPort();try{return n(r)}catch(r){if(function(t,e){return"SyntaxError"===t.name&&("["===(n=e.asHostPort()).charAt(0)&&-1!==n.indexOf("]"));var n}(r,e)){var i=function(t,e){return t+"://"+e.host().replace(new RegExp(":","g"),"-").replace("%","s")+".ipv6-literal.net:"+e.port()}(t,e);return n(i)}throw r}}(g,t.address,n),this._ws.binaryType="arraybuffer";var a=this;this._ws.onclose=function(t){t&&!t.wasClean&&a._handleConnectionError(),a._open=!1},this._ws.onopen=function(){a._clearConnectionTimeout();var t=a._pending;a._pending=null;for(var e=0;e{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(758),i=r.internal.util,o=i.ENCRYPTION_OFF,g=i.ENCRYPTION_ON,s=r.error.SERVICE_UNAVAILABLE,A=[null,void 0,!0,!1,g,o],C=[null,void 0,"TRUST_ALL_CERTIFICATES","TRUST_CUSTOM_CA_SIGNED_CERTIFICATES","TRUST_SYSTEM_CA_SIGNED_CERTIFICATES"];e.default=function(t,e,n){this.address=t,this.encrypted=function(t){var e=t.encrypted;if(-1===A.indexOf(e))throw(0,r.newError)("Illegal value of the encrypted setting "+e+". Expected one of "+A);return e}(e),this.trust=function(t){var e=t.trust;if(-1===C.indexOf(e))throw(0,r.newError)("Illegal value of the trust setting "+e+". Expected one of "+C);return e}(e),this.trustedCertificates=function(t){return t.trustedCertificates||[]}(e),this.knownHostsPath=function(t){return t.knownHosts||null}(e),this.connectionErrorCode=n||s,this.connectionTimeout=function(t){var e=parseInt(t.connectionTimeout,10);return 0===e||e&&e<0?null:e||3e4}(e)}},4985:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Dechunker=e.Chunker=void 0;var g=o(n(8364)),s=n(1731),A=o(n(4603)),C=function(t){function e(e,n){var r=t.call(this,0)||this;return r._bufferSize=n||1400,r._ch=e,r._buffer=(0,s.alloc)(r._bufferSize),r._currentChunkStart=0,r._chunkOpen=!1,r}return i(e,t),e.prototype.putUInt8=function(t,e){this._ensure(1),this._buffer.writeUInt8(e)},e.prototype.putInt8=function(t,e){this._ensure(1),this._buffer.writeInt8(e)},e.prototype.putFloat64=function(t,e){this._ensure(8),this._buffer.writeFloat64(e)},e.prototype.putBytes=function(t,e){for(;e.remaining()>0;)this._ensure(1),this._buffer.remaining()>e.remaining()?this._buffer.writeBytes(e):this._buffer.writeBytes(e.readSlice(this._buffer.remaining()));return this},e.prototype.flush=function(){if(this._buffer.position>0){this._closeChunkIfOpen();var t=this._buffer;this._buffer=null,this._ch.write(t.getSlice(0,t.position)),this._buffer=(0,s.alloc)(this._bufferSize),this._chunkOpen=!1}return this},e.prototype.messageBoundary=function(){this._closeChunkIfOpen(),this._buffer.remaining()<2&&this.flush(),this._buffer.writeInt16(0)},e.prototype._ensure=function(t){var e=this._chunkOpen?t:t+2;this._buffer.remaining()=2?this._onHeader(t.readUInt16()):(this._partialChunkHeader=t.readUInt8()<<8,this.IN_HEADER)},t.prototype.IN_HEADER=function(t){return this._onHeader(65535&(this._partialChunkHeader|t.readUInt8()))},t.prototype.IN_CHUNK=function(t){return this._chunkSize<=t.remaining()?(this._currentMessage.push(t.readSlice(this._chunkSize)),this.AWAITING_CHUNK):(this._chunkSize-=t.remaining(),this._currentMessage.push(t.readSlice(t.remaining())),this.IN_CHUNK)},t.prototype.CLOSED=function(t){},t.prototype._onHeader=function(t){if(0===t){var e=void 0;switch(this._currentMessage.length){case 0:return this.AWAITING_CHUNK;case 1:e=this._currentMessage[0];break;default:e=new A.default(this._currentMessage)}return this._currentMessage=[],this.onmessage(e),this.AWAITING_CHUNK}return this._chunkSize=t,this.IN_CHUNK},t.prototype.write=function(t){for(;t.hasRemaining();)this._state=this._state(t)},t}();e.Dechunker=I},4603:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(7268),g=n(1731),s=function(t){function e(e){for(var n=this,r=0,i=0;i=n.length))return n.getUInt8(t);t-=n.length}},e.prototype.getInt8=function(t){for(var e=0;e=n.length))return n.getInt8(t);t-=n.length}},e.prototype.getFloat64=function(t){for(var e=(0,g.alloc)(8),n=0;n<8;n++)e.putUInt8(n,this.getUInt8(t+n));return e.getFloat64(0)},e}(o.BaseBuffer);e.default=s},7078:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.utf8=e.alloc=e.ChannelConfig=void 0,i(n(2530),e),i(n(4985),e);var g=n(3190);Object.defineProperty(e,"ChannelConfig",{enumerable:!0,get:function(){return o(g).default}});var s=n(1731);Object.defineProperty(e,"alloc",{enumerable:!0,get:function(){return s.alloc}});var A=n(2969);Object.defineProperty(e,"utf8",{enumerable:!0,get:function(){return o(A).default}})},2969:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(1731)),o=n(758),g=r(n(8764)),s=new(n(2553).StringDecoder)("utf8");e.default={encode:function(t){return new i.default(function(t){return"function"==typeof g.default.Buffer.from?g.default.Buffer.from(t,"utf8"):new g.default.Buffer(t,"utf8")}(t))},decode:function(t,e){if(Object.prototype.hasOwnProperty.call(t,"_buffer"))return function(t,e){var n=t.position,r=n+e;return t.position=Math.min(r,t.length),t._buffer.toString("utf8",n,r)}(t,e);if(Object.prototype.hasOwnProperty.call(t,"_buffers"))return function(t,e){return function(t,e,n,r){var i=e,o=t.position;return t._updatePos(Math.min(e,t.length-o)),t._buffers.reduce((function(t,e){if(i<=0)return t;if(o>=e.length)return o-=e.length,"";e._updatePos(o-e.position);var n=Math.min(e.length-o,i),r=e.readSlice(n);return e._updatePos(n),i=Math.max(i-r.length,0),o=0,t+function(t){return s.write(t._buffer)}(r)}),"")+s.end()}(t,e)}(t,e);throw(0,o.newError)("Don't know how to decode strings from '"+t+"'")}}},2358:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function g(t){try{A(r.next(t))}catch(t){o(t)}}function s(t){try{A(r.throw(t))}catch(t){o(t)}}function A(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(g,s)}A((r=r.apply(t,e||[])).next())}))},g=this&&this.__generator||function(t,e){var n,r,i,o,g={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;g;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return g.label++,{value:o[1],done:!1};case 5:g.label++,r=o[1],o=[0];continue;case 7:o=g.ops.pop(),g.trys.pop();continue;default:if(!((i=(i=g.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){g=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=c}))];case 1:return[2,t.sent()]}}))}))},e.prototype.supportsTransactionConfig=function(){return o(this,void 0,void 0,(function(){return g(this,(function(t){switch(t.label){case 0:return[4,this._hasProtocolVersion((function(t){return t>=u}))];case 1:return[2,t.sent()]}}))}))},e.prototype.supportsUserImpersonation=function(){return o(this,void 0,void 0,(function(){return g(this,(function(t){switch(t.label){case 0:return[4,this._hasProtocolVersion((function(t){return t>=l}))];case 1:return[2,t.sent()]}}))}))},e}(A.default));e.default=d},6779:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),g=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return g(e,t),e},A=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function g(t){try{A(r.next(t))}catch(t){o(t)}}function s(t){try{A(r.throw(t))}catch(t){o(t)}}function A(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(g,s)}A((r=r.apply(t,e||[])).next())}))},C=this&&this.__generator||function(t,e){var n,r,i,o,g={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;g;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return g.label++,{value:o[1],done:!1};case 5:g.label++,r=o[1],o=[0];continue;case 7:o=g.ops.pop(),g.trys.pop();continue;default:if(!((i=(i=g.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){g=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){g=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},u=this&&this.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),g=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)g.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return g},c=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var l=n(758),h=A(n(4066)),d=n(7078),f=c(n(9070)),p=c(n(6779)),v=n(6836),y=n(870),b=l.error.SERVICE_UNAVAILABLE,m=l.error.SESSION_EXPIRED,w=l.internal.bookmark.Bookmark,_=l.internal.constants,x=_.ACCESS_MODE_READ,E=_.ACCESS_MODE_WRITE,O=_.BOLT_PROTOCOL_V3,k=_.BOLT_PROTOCOL_V4_0,T=_.BOLT_PROTOCOL_V4_4,S=null,P=(0,l.int)(3e4),N=function(t){function e(e){var n=e.id,r=e.address,i=e.routingContext,g=e.hostNameResolver,s=e.config,A=e.log,C=e.userAgent,I=e.authToken,a=e.routingTablePurgeDelay,u=t.call(this,{id:n,config:s,log:A,userAgent:C,authToken:I},(function(t){return(0,y.createChannelConnection)(t,u._config,u._createConnectionErrorHandler(),u._log,u._routingContext)}))||this;return u._routingContext=o(o({},i),{address:r.toString()}),u._seedRouter=r,u._rediscovery=new h.default(u._routingContext),u._loadBalancingStrategy=new v.LeastConnectedLoadBalancingStrategy(u._connectionPool),u._hostNameResolver=g,u._dnsResolver=new d.HostNameResolver,u._log=A,u._useSeedRouter=!0,u._routingTableRegistry=new R(a?(0,l.int)(a):P),u}return i(e,t),e.prototype._createConnectionErrorHandler=function(){return new y.ConnectionErrorHandler(m)},e.prototype._handleUnavailability=function(t,e,n){return this._log.warn("Routing driver "+this._id+" will forget "+e+" for database '"+n+"' because of an error "+t.code+" '"+t.message+"'"),this.forget(e,n||S),t},e.prototype._handleAuthorizationExpired=function(t,e,n){return this._log.warn("Routing driver "+this._id+" will close connections to "+e+" for database '"+n+"' because of an error "+t.code+" '"+t.message+"'"),this._connectionPool.purge(e).catch((function(){})),t},e.prototype._handleWriteFailure=function(t,e,n){return this._log.warn("Routing driver "+this._id+" will forget writer "+e+" for database '"+n+"' because of an error "+t.code+" '"+t.message+"'"),this.forgetWriter(e,n||S),(0,l.newError)("No longer possible to write to server at "+e,m)},e.prototype.acquireConnection=function(t){var e=void 0===t?{}:t,n=e.accessMode,r=e.database,i=e.bookmarks,o=e.impersonatedUser,g=e.onDatabaseNameResolved;return C(this,void 0,void 0,(function(){var t,e,s,A,C,a,u,c=this;return I(this,(function(I){switch(I.label){case 0:return s={database:r||S},A=new y.ConnectionErrorHandler(m,(function(t,e){return c._handleUnavailability(t,e,s.database)}),(function(t,e){return c._handleWriteFailure(t,e,s.database)}),(function(t,e){return c._handleAuthorizationExpired(t,e,s.database)})),[4,this._freshRoutingTable({accessMode:n,database:s.database,bookmark:i,impersonatedUser:o,onDatabaseNameResolved:function(t){s.database=s.database||t,g&&g(t)}})];case 1:if(C=I.sent(),n===x)e=this._loadBalancingStrategy.selectReader(C.readers),t="read";else{if(n!==E)throw(0,l.newError)("Illegal mode "+n);e=this._loadBalancingStrategy.selectWriter(C.writers),t="write"}if(!e)throw(0,l.newError)("Failed to obtain connection towards "+t+" server. Known routing table is: "+C,m);I.label=2;case 2:return I.trys.push([2,4,,5]),[4,this._acquireConnectionToServer(e,t,C)];case 3:return a=I.sent(),[2,new y.DelegateConnection(a,A)];case 4:throw u=I.sent(),A.handleAndTransformError(u,e);case 5:return[2]}}))}))},e.prototype._hasProtocolVersion=function(t){return C(this,void 0,void 0,(function(){var e,n,r,i,o,g;return I(this,(function(s){switch(s.label){case 0:return[4,this._resolveSeedRouter(this._seedRouter)];case 1:e=s.sent(),r=0,s.label=2;case 2:if(!(r=k}))];case 1:return[2,t.sent()]}}))}))},e.prototype.supportsTransactionConfig=function(){return C(this,void 0,void 0,(function(){return I(this,(function(t){switch(t.label){case 0:return[4,this._hasProtocolVersion((function(t){return t>=O}))];case 1:return[2,t.sent()]}}))}))},e.prototype.supportsUserImpersonation=function(){return C(this,void 0,void 0,(function(){return I(this,(function(t){switch(t.label){case 0:return[4,this._hasProtocolVersion((function(t){return t>=T}))];case 1:return[2,t.sent()]}}))}))},e.prototype.forget=function(t,e){this._routingTableRegistry.apply(e,{applyWhenExists:function(e){return e.forget(t)}}),this._connectionPool.purge(t).catch((function(){}))},e.prototype.forgetWriter=function(t,e){this._routingTableRegistry.apply(e,{applyWhenExists:function(e){return e.forgetWriter(t)}})},e.prototype._acquireConnectionToServer=function(t,e,n){return this._connectionPool.acquire(t)},e.prototype._freshRoutingTable=function(t){var e=void 0===t?{}:t,n=e.accessMode,r=e.database,i=e.bookmark,o=e.impersonatedUser,g=e.onDatabaseNameResolved,s=this._routingTableRegistry.get(r,(function(){return new h.RoutingTable({database:r})}));return s.isStaleFor(n)?(this._log.info('Routing table is stale for database: "'+r+'" and access mode: "'+n+'": '+s),this._refreshRoutingTable(s,i,o,g)):s},e.prototype._refreshRoutingTable=function(t,e,n,r){var i=t.routers;return this._useSeedRouter?this._fetchRoutingTableFromSeedRouterFallbackToKnownRouters(i,t,e,n,r):this._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter(i,t,e,n,r)},e.prototype._fetchRoutingTableFromSeedRouterFallbackToKnownRouters=function(t,e,n,r,i){return C(this,void 0,void 0,(function(){var o,g;return I(this,(function(s){switch(s.label){case 0:return o=[],[4,this._fetchRoutingTableUsingSeedRouter(o,this._seedRouter,e,n,r)];case 1:return(g=s.sent())?(this._useSeedRouter=!1,[3,4]):[3,2];case 2:return[4,this._fetchRoutingTableUsingKnownRouters(t,e,n,r)];case 3:g=s.sent(),s.label=4;case 4:return[4,this._applyRoutingTableIfPossible(e,g,i)];case 5:return[2,s.sent()]}}))}))},e.prototype._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter=function(t,e,n,r,i){return C(this,void 0,void 0,(function(){var o;return I(this,(function(g){switch(g.label){case 0:return[4,this._fetchRoutingTableUsingKnownRouters(t,e,n,r)];case 1:return(o=g.sent())?[3,3]:[4,this._fetchRoutingTableUsingSeedRouter(t,this._seedRouter,e,n,r)];case 2:o=g.sent(),g.label=3;case 3:return[4,this._applyRoutingTableIfPossible(e,o,i)];case 4:return[2,g.sent()]}}))}))},e.prototype._fetchRoutingTableUsingKnownRouters=function(t,n,r,i){return C(this,void 0,void 0,(function(){var o,g;return I(this,(function(s){switch(s.label){case 0:return[4,this._fetchRoutingTable(t,n,r,i)];case 1:return(o=s.sent())?[2,o]:(g=t.length-1,e._forgetRouter(n,t,g),[2,null])}}))}))},e.prototype._fetchRoutingTableUsingSeedRouter=function(t,e,n,r,i){return C(this,void 0,void 0,(function(){var o,g;return I(this,(function(s){switch(s.label){case 0:return[4,this._resolveSeedRouter(e)];case 1:return o=s.sent(),g=o.filter((function(e){return t.indexOf(e)<0})),[4,this._fetchRoutingTable(g,n,r,i)];case 2:return[2,s.sent()]}}))}))},e.prototype._resolveSeedRouter=function(t){return C(this,void 0,void 0,(function(){var e,n,r=this;return I(this,(function(i){switch(i.label){case 0:return[4,this._hostNameResolver.resolve(t)];case 1:return e=i.sent(),[4,Promise.all(e.map((function(t){return r._dnsResolver.resolve(t)})))];case 2:return n=i.sent(),[2,[].concat.apply([],n)]}}))}))},e.prototype._fetchRoutingTable=function(t,n,r,i){var o=this;return t.reduce((function(g,s,A){return C(o,void 0,void 0,(function(){var o,C,a,u;return I(this,(function(I){switch(I.label){case 0:return[4,g];case 1:return(o=I.sent())?[2,o]:(C=A-1,e._forgetRouter(n,t,C),[4,this._createSessionForRediscovery(s,r,i)]);case 2:if(!(a=I.sent()))return[3,8];I.label=3;case 3:return I.trys.push([3,5,6,7]),[4,this._rediscovery.lookupRoutingTableOnRouter(a,n.database,s,i)];case 4:return[2,I.sent()];case 5:if((u=I.sent())&&"Neo.ClientError.Database.DatabaseNotFound"===u.code)throw u;return this._log.warn("unable to fetch routing table because of an error "+u),[2,null];case 6:return a.close(),[7];case 7:return[3,9];case 8:return[2,null];case 9:return[2]}}))}))}),Promise.resolve(null))},e.prototype._createSessionForRediscovery=function(t,e,n){return C(this,void 0,void 0,(function(){var r,i,o,g,s=this;return I(this,(function(A){switch(A.label){case 0:return A.trys.push([0,2,,3]),[4,this._connectionPool.acquire(t)];case 1:return r=A.sent(),i=y.ConnectionErrorHandler.create({errorCode:m,handleAuthorizationExpired:function(t,e){return s._handleAuthorizationExpired(t,e)}}),o=new f.default(new y.DelegateConnection(r,i)),r.protocol().version<4?[2,new l.Session({mode:E,bookmark:w.empty(),connectionProvider:o})]:[2,new l.Session({mode:x,database:"system",bookmark:e,connectionProvider:o,impersonatedUser:n})];case 2:if((g=A.sent())&&"Neo.ClientError.Security.Unauthorized"===g.code)throw g;return[2,null];case 3:return[2]}}))}))},e.prototype._applyRoutingTableIfPossible=function(t,e,n){return C(this,void 0,void 0,(function(){return I(this,(function(r){switch(r.label){case 0:if(!e)throw(0,l.newError)("Could not perform discovery. No routing servers available. Known routing table: "+t,b);return 0===e.writers.length&&(this._useSeedRouter=!0),[4,this._updateRoutingTable(e,n)];case 1:return r.sent(),[2,e]}}))}))},e.prototype._updateRoutingTable=function(t,e){return C(this,void 0,void 0,(function(){return I(this,(function(n){switch(n.label){case 0:return[4,this._connectionPool.keepAll(t.allServers())];case 1:return n.sent(),this._routingTableRegistry.removeExpired(),this._routingTableRegistry.register(t),e(t.database),this._log.info("Updated routing table "+t),[2]}}))}))},e._forgetRouter=function(t,e,n){var r=e[n];t&&r&&t.forgetRouter(r)},e}(p.default);e.default=N;var R=function(){function t(t){this._tables=new Map,this._routingTablePurgeDelay=t}return t.prototype.register=function(t){return this._tables.set(t.database,t),this},t.prototype.apply=function(t,e){var n=void 0===e?{}:e,r=n.applyWhenExists,i=n.applyWhenDontExists,o=void 0===i?function(){}:i;return this._tables.has(t)?r(this._tables.get(t)):"string"==typeof t||null===t?o():this._forEach(r),this},t.prototype.get=function(t,e){return this._tables.has(t)?this._tables.get(t):"function"==typeof e?e():e},t.prototype.removeExpired=function(){var t=this;return this._removeIf((function(e){return e.isExpiredFor(t._routingTablePurgeDelay)}))},t.prototype._forEach=function(t){var e,n;try{for(var r=a(this._tables),i=r.next();!i.done;i=r.next())t(u(i.value,2)[1])}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return this},t.prototype._remove=function(t){return this._tables.delete(t),this},t.prototype._removeIf=function(t){var e,n;try{for(var r=a(this._tables),i=r.next();!i.done;i=r.next()){var o=u(i.value,2),g=o[0];t(o[1])&&this._remove(g)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return this},t}()},9070:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(e){var n=t.call(this)||this;return n._connection=e,n}return i(e,t),e.prototype.acquireConnection=function(t){var e=void 0===t?{}:t,n=(e.accessMode,e.database,e.bookmarks,this._connection);return this._connection=null,Promise.resolve(n)},e}(n(758).ConnectionProvider);e.default=o},1677:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.RoutingConnectionProvider=e.DirectConnectionProvider=e.PooledConnectionProvider=e.SingleConnectionProvider=void 0;var i=n(9070);Object.defineProperty(e,"SingleConnectionProvider",{enumerable:!0,get:function(){return r(i).default}});var o=n(6779);Object.defineProperty(e,"PooledConnectionProvider",{enumerable:!0,get:function(){return r(o).default}});var g=n(2358);Object.defineProperty(e,"DirectConnectionProvider",{enumerable:!0,get:function(){return r(g).default}});var s=n(9223);Object.defineProperty(e,"RoutingConnectionProvider",{enumerable:!0,get:function(){return r(s).default}})},7441:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function g(t){try{A(r.next(t))}catch(t){o(t)}}function s(t){try{A(r.throw(t))}catch(t){o(t)}}function A(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(g,s)}A((r=r.apply(t,e||[])).next())}))},g=this&&this.__generator||function(t,e){var n,r,i,o,g={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;g;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return g.label++,{value:o[1],done:!1};case 5:g.label++,r=o[1],o=[0];continue;case 7:o=g.ops.pop(),g.trys.pop();continue;default:if(!((i=(i=g.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){g=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0?n._ch.setupReceiveTimeout(1e3*s):n._log.info("Server located at "+n._address+" supplied an invalid connection receive timeout value ("+s+"). Please, verify the server configuration and status because this can be the symptom of a bigger issue.")}}}i(r)}})}))},e.prototype.protocol=function(){return this._protocol},Object.defineProperty(e.prototype,"address",{get:function(){return this._address},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._server.version},set:function(t){this._server.version=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"server",{get:function(){return this._server},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"logger",{get:function(){return this._log},enumerable:!1,configurable:!0}),e.prototype._handleFatalError=function(t){this._isBroken=!0,this._error=this.handleAndTransformError(this._protocol.currentFailure||t,this._address),this._log.isErrorEnabled()&&this._log.error("experienced a fatal error caused by "+this._error+" ("+C.json.stringify(this._error)+")"),this._protocol.notifyFatalError(this._error)},e.prototype._queueObserver=function(t){return this._protocol.queueObserverIfProtocolIsNotBroken(t)},e.prototype.hasOngoingObservableRequests=function(){return this._protocol.hasOngoingObservableRequests()},e.prototype.resetAndFlush=function(){var t=this;return new Promise((function(e,n){t._protocol.reset({onError:function(e){if(t._isBroken)n(e);else{var r=t._handleProtocolError("Received FAILURE as a response for RESET: "+e);n(r)}},onComplete:function(){e()}})}))},e.prototype._resetOnFailure=function(){var t=this;this.isOpen()&&this._protocol.reset({onError:function(){t._protocol.resetFailure()},onComplete:function(){t._protocol.resetFailure()}})},e.prototype._updateCurrentObserver=function(){this._protocol.updateCurrentObserver()},e.prototype.isOpen=function(){return!this._isBroken&&this._ch._open},e.prototype._handleOngoingRequestsNumberChange=function(t){0===t?this._ch.stopReceiveTimeout():this._ch.startReceiveTimeout()},e.prototype.close=function(){return o(this,void 0,void 0,(function(){return g(this,(function(t){switch(t.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 t.sent(),this._log.isDebugEnabled()&&this._log.debug("closed"),[2]}}))}))},e.prototype.toString=function(){return"Connection ["+this.id+"]["+(this.databaseId||"")+"]"},e.prototype._handleProtocolError=function(t){this._protocol.resetFailure(),this._updateCurrentObserver();var e=(0,C.newError)(t,u);return this._handleFatalError(e),e},e}(I.default);e.default=h},3124:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var g=function(t){function e(e,n){var r=t.call(this,n)||this;return n&&(r._originalErrorHandler=e._errorHandler,e._errorHandler=r._errorHandler),r._delegate=e,r}return i(e,t),Object.defineProperty(e.prototype,"id",{get:function(){return this._delegate.id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"databaseId",{get:function(){return this._delegate.databaseId},set:function(t){this._delegate.databaseId=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"server",{get:function(){return this._delegate.server},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"address",{get:function(){return this._delegate.address},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._delegate.version},set:function(t){this._delegate.version=t},enumerable:!1,configurable:!0}),e.prototype.isOpen=function(){return this._delegate.isOpen()},e.prototype.protocol=function(){return this._delegate.protocol()},e.prototype.connect=function(t,e){return this._delegate.connect(t,e)},e.prototype.write=function(t,e,n){return this._delegate.write(t,e,n)},e.prototype.resetAndFlush=function(){return this._delegate.resetAndFlush()},e.prototype.close=function(){return this._delegate.close()},e.prototype._release=function(){return this._originalErrorHandler&&(this._delegate._errorHandler=this._originalErrorHandler),this._delegate._release()},e}(o(n(7075)).default);e.default=g},6370:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(758),i=r.error.SERVICE_UNAVAILABLE,o=r.error.SESSION_EXPIRED,g=function(){function t(t,e,n,r){this._errorCode=t,this._handleUnavailability=e||s,this._handleWriteFailure=n||s,this._handleAuthorizationExpired=r||s}return t.create=function(e){return new t(e.errorCode,e.handleUnavailability,e.handleWriteFailure,e.handleAuthorizationExpired)},t.prototype.errorCode=function(){return this._errorCode},t.prototype.handleAndTransformError=function(t,e){return function(t){return t&&("Neo.ClientError.Security.AuthorizationExpired"===t.code||"Neo.ClientError.Security.TokenExpired"===t.code)}(t)?this._handleAuthorizationExpired(t,e):function(t){return!!t&&(t.code===o||t.code===i||"Neo.TransientError.General.DatabaseUnavailable"===t.code)}(t)?this._handleUnavailability(t,e):function(t){return!!t&&("Neo.ClientError.Cluster.NotALeader"===t.code||"Neo.ClientError.General.ForbiddenOnReadOnlyDatabase"===t.code)}(t)?this._handleWriteFailure(t,e):t},t}();function s(t){return t}e.default=g},7075:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this._errorHandler=t}return 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(t){throw new Error("not implemented")},enumerable:!1,configurable:!0}),t.prototype.isOpen=function(){throw new Error("not implemented")},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(t){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(t,e){throw new Error("not implemented")},t.prototype.write=function(t,e,n){throw new Error("not implemented")},t.prototype.resetAndFlush=function(){throw new Error("not implemented")},t.prototype.close=function(){throw new Error("not implemented")},t.prototype.handleAndTransformError=function(t,e){return this._errorHandler?this._errorHandler.handleAndTransformError(t,e):t},t}();e.default=n},870:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e},g=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.createChannelConnection=e.ConnectionErrorHandler=e.DelegateConnection=e.ChannelConnection=e.Connection=void 0;var s=g(n(7075));e.Connection=s.default;var A=o(n(7441));e.ChannelConnection=A.default,Object.defineProperty(e,"createChannelConnection",{enumerable:!0,get:function(){return A.createChannelConnection}});var C=g(n(3124));e.DelegateConnection=C.default;var I=g(n(6370));e.ConnectionErrorHandler=I.default,e.default=s.default},297:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e},g=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.pool=e.packstream=e.channel=e.buf=e.bolt=e.loadBalancing=void 0,e.loadBalancing=o(n(6836)),e.bolt=o(n(7778)),e.buf=o(n(7268)),e.channel=o(n(7078)),e.packstream=o(n(7687)),e.pool=o(n(2043)),g(n(1677),e)},6836:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.LeastConnectedLoadBalancingStrategy=e.LoadBalancingStrategy=void 0;var i=r(n(7986));e.LoadBalancingStrategy=i.default;var o=r(n(7865));e.LeastConnectedLoadBalancingStrategy=o.default,e.default=o.default},7865:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var g=o(n(226)),s=function(t){function e(e){var n=t.call(this)||this;return n._readersIndex=new g.default,n._writersIndex=new g.default,n._connectionPool=e,n}return i(e,t),e.prototype.selectReader=function(t){return this._select(t,this._readersIndex)},e.prototype.selectWriter=function(t){return this._select(t,this._writersIndex)},e.prototype._select=function(t,e){var n=t.length;if(0===n)return null;var r=e.next(n),i=r,o=null,g=Number.MAX_SAFE_INTEGER;do{var s=t[i],A=this._connectionPool.activeResourceCount(s);A{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.selectReader=function(t){throw new Error("Abstract function")},t.prototype.selectWriter=function(t){throw new Error("Abstract function")},t}();e.default=n},226:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this._offset=t||0}return t.prototype.next=function(t){if(0===t)return-1;var e=this._offset;return this._offset+=1,this._offset===Number.MAX_SAFE_INTEGER&&(this._offset=0),e%t},t}();e.default=n},7687:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.v2=e.v1=void 0;var g=o(n(843));e.v1=g;var s=o(n(6303));e.v2=s,e.default=s},5637:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.packDateTime=e.unpackDateTimeWithZoneId=e.unpackDateTimeWithZoneOffset=e.DATE_TIME_WITH_ZONE_ID=e.DATE_TIME_WITH_ZONE_OFFSET=void 0;var r=n(758),i=n(9735),o=r.internal.temporalUtil.localDateTimeToEpochSecond;function g(t,e,n){var i=new Intl.DateTimeFormat("en-US",{timeZone:t,year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1,era:"narrow"}),g=(0,r.int)(e).multiply(1e3).add((0,r.int)(n).div(1e6)).toNumber(),s=i.formatToParts(g).reduce((function(t,e){return"era"===e.type?t.adjustEra="B"===e.value.toUpperCase()?function(t){return t.subtract(1).negate()}:function(t){return t}:"literal"!==e.type&&(t[e.type]=(0,r.int)(e.value)),t}),{});s.year=s.adjustEra(s.year);var A=o(s.year,s.month,s.day,s.hour,s.minute,s.second,s.nanosecond);return s.timeZoneOffsetSeconds=A.subtract(e),s.hour=s.hour.modulo(24),s}function s(t,e,n){if(!e&&!n)return t;var i=function(t){return n?t.toBigInt():t.toNumberOrInfinity()},o=Object.create(Object.getPrototypeOf(t));for(var g in t)if(!0===Object.prototype.hasOwnProperty.call(t,g)){var s=t[g];o[g]=(0,r.isInt)(s)?i(s):s}return Object.freeze(o),o}e.DATE_TIME_WITH_ZONE_OFFSET=73,e.DATE_TIME_WITH_ZONE_ID=105,e.unpackDateTimeWithZoneOffset=function(t,e,n,o,g){t._verifyStructSize("DateTimeWithZoneOffset",3,e);var A=t.unpackInteger(n),C=t.unpackInteger(n),I=t.unpackInteger(n),a=(0,r.int)(A).add(I),u=(0,i.epochSecondAndNanoToLocalDateTime)(a,C);return s(new r.DateTime(u.year,u.month,u.day,u.hour,u.minute,u.second,u.nanosecond,I,null),o,g)},e.unpackDateTimeWithZoneId=function(t,e,n,i,o){t._verifyStructSize("DateTimeWithZoneId",3,e);var A=t.unpackInteger(n),C=t.unpackInteger(n),I=t.unpack(n),a=g(I,A,C);return s(new r.DateTime(a.year,a.month,a.day,a.hour,a.minute,a.second,(0,r.int)(C),a.timeZoneOffsetSeconds,I),i,o)},e.packDateTime=function(t,n){t.timeZoneId?function(t,n){var i=o(t.year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond),s=null!=t.timeZoneOffsetSeconds?t.timeZoneOffsetSeconds:function(t,e,n){var r=g(t,e,n),i=o(r.year,r.month,r.day,r.hour,r.minute,r.second,n).subtract(e),s=e.subtract(i),A=g(t,s,n);return o(A.year,A.month,A.day,A.hour,A.minute,A.second,n).subtract(s)}(t.timeZoneId,i,t.nanosecond),A=i.subtract(s),C=(0,r.int)(t.nanosecond),I=t.timeZoneId,a=[n.packable(A),n.packable(C),n.packable(I)];n.packStruct(e.DATE_TIME_WITH_ZONE_ID,a)}(t,n):function(t,n){var i=o(t.year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond),g=(0,r.int)(t.nanosecond),s=(0,r.int)(t.timeZoneOffsetSeconds),A=i.subtract(s),C=[n.packable(A),n.packable(g),n.packable(s)];n.packStruct(e.DATE_TIME_WITH_ZONE_OFFSET,C)}(t,n)}},843:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Structure=e.Unpacker=e.Packer=void 0;var r=n(7078),i=n(758),o=i.internal.objectUtil,g=i.error.PROTOCOL_ERROR,s=function(){function t(t,e){this.signature=t,this.fields=e}return t.prototype.toString=function(){for(var t="",e=0;e0&&(t+=", "),t+=this.fields[e];return"Structure("+this.signature+", ["+t+"])"},t}();e.Structure=s;var A=function(){function t(t){this._ch=t,this._byteArraysSupported=!0}return t.prototype.packable=function(t){var e,n=this;if(null===t)return function(){return n._ch.writeUInt8(192)};if(!0===t)return function(){return n._ch.writeUInt8(195)};if(!1===t)return function(){return n._ch.writeUInt8(194)};if("number"==typeof t)return function(){return n.packFloat(t)};if("string"==typeof t)return function(){return n.packString(t)};if("bigint"==typeof t)return function(){return n.packInteger((0,i.int)(t))};if((0,i.isInt)(t))return function(){return n.packInteger(t)};if(t instanceof Int8Array)return function(){return n.packBytes(t)};if(t instanceof Array)return function(){n.packListHeader(t.length);for(var e=0;e>0),this._ch.writeUInt8(n%256),this._ch.writeBytes(e);else{if(!(n<4294967296))throw(0,i.newError)("UTF-8 strings of size "+n+" are not supported");this._ch.writeUInt8(210),this._ch.writeUInt8((n/16777216>>0)%256),this._ch.writeUInt8((n/65536>>0)%256),this._ch.writeUInt8((n/256>>0)%256),this._ch.writeUInt8(n%256),this._ch.writeBytes(e)}},t.prototype.packListHeader=function(t){if(t<16)this._ch.writeUInt8(144|t);else if(t<256)this._ch.writeUInt8(212),this._ch.writeUInt8(t);else if(t<65536)this._ch.writeUInt8(213),this._ch.writeUInt8((t/256>>0)%256),this._ch.writeUInt8(t%256);else{if(!(t<4294967296))throw(0,i.newError)("Lists of size "+t+" are not supported");this._ch.writeUInt8(214),this._ch.writeUInt8((t/16777216>>0)%256),this._ch.writeUInt8((t/65536>>0)%256),this._ch.writeUInt8((t/256>>0)%256),this._ch.writeUInt8(t%256)}},t.prototype.packBytes=function(t){if(!this._byteArraysSupported)throw(0,i.newError)("Byte arrays are not supported by the database this driver is connected to");this.packBytesHeader(t.length);for(var e=0;e>0)%256),this._ch.writeUInt8(t%256);else{if(!(t<4294967296))throw(0,i.newError)("Byte arrays of size "+t+" are not supported");this._ch.writeUInt8(206),this._ch.writeUInt8((t/16777216>>0)%256),this._ch.writeUInt8((t/65536>>0)%256),this._ch.writeUInt8((t/256>>0)%256),this._ch.writeUInt8(t%256)}},t.prototype.packMapHeader=function(t){if(t<16)this._ch.writeUInt8(160|t);else if(t<256)this._ch.writeUInt8(216),this._ch.writeUInt8(t);else if(t<65536)this._ch.writeUInt8(217),this._ch.writeUInt8(t/256>>0),this._ch.writeUInt8(t%256);else{if(!(t<4294967296))throw(0,i.newError)("Maps of size "+t+" are not supported");this._ch.writeUInt8(218),this._ch.writeUInt8((t/16777216>>0)%256),this._ch.writeUInt8((t/65536>>0)%256),this._ch.writeUInt8((t/256>>0)%256),this._ch.writeUInt8(t%256)}},t.prototype.packStructHeader=function(t,e){if(t<16)this._ch.writeUInt8(176|t),this._ch.writeUInt8(e);else if(t<256)this._ch.writeUInt8(220),this._ch.writeUInt8(t),this._ch.writeUInt8(e);else{if(!(t<65536))throw(0,i.newError)("Structures of size "+t+" are not supported");this._ch.writeUInt8(221),this._ch.writeUInt8(t/256>>0),this._ch.writeUInt8(t%256)}},t.prototype.disableByteArrays=function(){this._byteArraysSupported=!1},t.prototype._nonPackableValue=function(t){return function(){throw(0,i.newError)(t,g)}},t}();e.Packer=A;var C=function(){function t(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1),this._disableLosslessIntegers=t,this._useBigInt=e}return t.prototype.unpack=function(t){var e=t.readUInt8(),n=240&e,r=15&e;if(192===e)return null;var o=this._unpackBoolean(e);if(null!==o)return o;var g=this._unpackNumberOrInteger(e,t);if(null!==g){if((0,i.isInt)(g)){if(this._useBigInt)return g.toBigInt();if(this._disableLosslessIntegers)return g.toNumberOrInfinity()}return g}var s=this._unpackString(e,n,r,t);if(null!==s)return s;var A=this._unpackList(e,n,r,t);if(null!==A)return A;var C=this._unpackByteArray(e,t);if(null!==C)return C;var I=this._unpackMap(e,n,r,t);if(null!==I)return I;var a=this._unpackStruct(e,n,r,t);if(null!==a)return a;throw(0,i.newError)("Unknown packed value with marker "+e.toString(16))},t.prototype.unpackInteger=function(t){var e=t.readUInt8(),n=this._unpackInteger(e,t);if(null==n)throw(0,i.newError)("Unable to unpack integer value with marker "+e.toString(16));return n},t.prototype._unpackBoolean=function(t){return 195===t||194!==t&&null},t.prototype._unpackNumberOrInteger=function(t,e){return 193===t?e.readFloat64():this._unpackInteger(t,e)},t.prototype._unpackInteger=function(t,e){if(t>=0&&t<128)return(0,i.int)(t);if(t>=240&&t<256)return(0,i.int)(t-256);if(200===t)return(0,i.int)(e.readInt8());if(201===t)return(0,i.int)(e.readInt16());if(202===t){var n=e.readInt32();return(0,i.int)(n)}if(203===t){var r=e.readInt32(),o=e.readInt32();return new i.Integer(o,r)}return null},t.prototype._unpackString=function(t,e,n,i){return 128===e?r.utf8.decode(i,n):208===t?r.utf8.decode(i,i.readUInt8()):209===t?r.utf8.decode(i,i.readUInt16()):210===t?r.utf8.decode(i,i.readUInt32()):null},t.prototype._unpackList=function(t,e,n,r){return 144===e?this._unpackListWithSize(n,r):212===t?this._unpackListWithSize(r.readUInt8(),r):213===t?this._unpackListWithSize(r.readUInt16(),r):214===t?this._unpackListWithSize(r.readUInt32(),r):null},t.prototype._unpackListWithSize=function(t,e){for(var n=[],r=0;r0?(a=r[I-1])instanceof i.UnboundRelationship&&(r[I-1]=a=a.bind(s.identity,C.identity)):(a=r[-I-1])instanceof i.UnboundRelationship&&(r[-I-1]=a=a.bind(C.identity,s.identity)),g.push(new i.PathSegment(s,a,C)),s=C}return new i.Path(n[0],n[n.length-1],g)},t.prototype._unpackUnknownStruct=function(t,e,n){for(var r=new s(t,[]),i=0;i{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.epochSecondAndNanoToLocalDateTime=e.nanoOfDayToLocalTime=e.epochDayToDate=void 0;var r=n(758),i=r.internal.temporalUtil,o=i.DAYS_0000_TO_1970,g=i.DAYS_PER_400_YEAR_CYCLE,s=i.NANOS_PER_HOUR,A=i.NANOS_PER_MINUTE,C=i.NANOS_PER_SECOND,I=i.SECONDS_PER_DAY,a=i.floorDiv,u=i.floorMod;function c(t){var e=(t=(0,r.int)(t)).add(o).subtract(60),n=(0,r.int)(0);if(e.lessThan(0)){var i=e.add(1).div(g).subtract(1);n=i.multiply(400),e=e.add(i.multiply(-g))}var s=e.multiply(400).add(591).div(g),A=e.subtract(s.multiply(365).add(s.div(4)).subtract(s.div(100)).add(s.div(400)));A.lessThan(0)&&(s=s.subtract(1),A=e.subtract(s.multiply(365).add(s.div(4)).subtract(s.div(100)).add(s.div(400)))),s=s.add(n);var C=A,I=C.multiply(5).add(2).div(153),a=I.add(2).modulo(12).add(1),u=C.subtract(I.multiply(306).add(5).div(10)).add(1);return s=s.add(I.div(10)),new r.Date(s,a,u)}function l(t){var e=(t=(0,r.int)(t)).div(s),n=(t=t.subtract(e.multiply(s))).div(A),i=(t=t.subtract(n.multiply(A))).div(C),o=t.subtract(i.multiply(C));return new r.LocalTime(e,n,i,o)}e.epochDayToDate=c,e.nanoOfDayToLocalTime=l,e.epochSecondAndNanoToLocalDateTime=function(t,e){var n=a(t,I),i=u(t,I).multiply(C).add(e),o=c(n),g=l(i);return new r.LocalDateTime(o.year,o.month,o.day,g.hour,g.minute,g.second,g.nanosecond)}},2043:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e},g=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_MAX_SIZE=e.DEFAULT_ACQUISITION_TIMEOUT=e.PoolConfig=e.Pool=void 0;var s=o(n(1269));e.PoolConfig=s.default,Object.defineProperty(e,"DEFAULT_ACQUISITION_TIMEOUT",{enumerable:!0,get:function(){return s.DEFAULT_ACQUISITION_TIMEOUT}}),Object.defineProperty(e,"DEFAULT_MAX_SIZE",{enumerable:!0,get:function(){return s.DEFAULT_MAX_SIZE}});var A=g(n(1971));e.Pool=A.default,e.default=A.default},1269:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_ACQUISITION_TIMEOUT=e.DEFAULT_MAX_SIZE=void 0;var n=100;e.DEFAULT_MAX_SIZE=n;var r=6e4;e.DEFAULT_ACQUISITION_TIMEOUT=r;var i=function(){function t(t,e){this.maxSize=o(t,n),this.acquisitionTimeout=o(e,r)}return t.defaultConfig=function(){return new t(n,r)},t.fromDriverConfig=function(e){return new t(g(e.maxConnectionPoolSize)?e.maxConnectionPoolSize:n,g(e.connectionAcquisitionTimeout)?e.connectionAcquisitionTimeout:r)},t}();function o(t,e){return 0===t||t?t:e}function g(t){return 0===t||t}e.default=i},1971:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function g(t){try{A(r.next(t))}catch(t){o(t)}}function s(t){try{A(r.throw(t))}catch(t){o(t)}}function A(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(g,s)}A((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,o,g={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;g;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return g.label++,{value:o[1],done:!1};case 5:g.label++,r=o[1],o=[0];continue;case 7:o=g.ops.pop(),g.trys.pop();continue;default:if(!((i=(i=g.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){g=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&this.activeResourceCount(t)+this._pendingCreates[e]>=this._maxSize)return[2,null];this._pendingCreates[e]=this._pendingCreates[e]+1,i.label=6;case 6:return i.trys.push([6,,8,9]),[4,this._create(t,(function(t,e){return A._release(r,t,e)}))];case 7:return g=i.sent(),I(e,this._activeResourceCounts),this._log.isDebugEnabled()&&this._log.debug(g+" created for the pool "+e),[3,9];case 8:return this._pendingCreates[e]=this._pendingCreates[e]-1,[7];case 9:return[2,g]}}))}))},t.prototype._release=function(t,e,n){return r(this,void 0,void 0,(function(){var r,o,g=this;return i(this,(function(i){switch(i.label){case 0:return r=e.asKey(),(o=this._pools[r])&&t&&t.isActive()?this._validate(n)?[3,2]:(this._log.isDebugEnabled()&&this._log.debug(n+" destroyed and can't be released to the pool "+r+" because it is not functional"),[4,this._destroy(n)]):[3,4];case 1:return i.sent(),[3,3];case 2:this._installIdleObserver&&this._installIdleObserver(n,{onError:function(t){g._log.debug("Idle connection "+n+" destroyed because of error: "+t);var e=g._pools[r];e&&(g._pools[r]=e.filter((function(t){return t!==n}))),g._destroy(n).catch((function(){}))}}),o.push(n),this._log.isDebugEnabled()&&this._log.debug(n+" released to the pool "+r),i.label=3;case 3:return[3,6];case 4:return this._log.isDebugEnabled()&&this._log.debug(n+" destroyed and can't be released to the pool "+r+" because pool has been purged"),[4,this._destroy(n)];case 5:i.sent(),i.label=6;case 6:return function(t,e){var n=(e[t]||0)-1;n>0?e[t]=n:delete e[t]}(r,this._activeResourceCounts),this._processPendingAcquireRequests(e),[2]}}))}))},t.prototype._purgeKey=function(t){return r(this,void 0,void 0,(function(){var e,n,r,o;return i(this,(function(i){switch(i.label){case 0:for(e=this._pools[t]||[],n=this._poolState[t]||new u,r=[];e.length;)o=e.pop(),this._removeIdleObserver&&this._removeIdleObserver(o),r.push(this._destroy(o));return n.close(),delete this._pools[t],delete this._poolState[t],[4,Promise.all(r)];case 1:return i.sent(),[2]}}))}))},t.prototype._processPendingAcquireRequests=function(t){var e=this,n=t.asKey(),r=this._acquireRequests[n],i=this._poolState[n];if(r){var o=r.shift();o?this._acquire(t).catch((function(t){return o.reject(t),null})).then((function(n){n&&(o.isCompleted()?e._release(i,t,n):o.resolve(n))})):delete this._acquireRequests[n]}},t}();function I(t,e){var n=e[t]||0;e[t]=n+1}var a=function(){function t(t,e,n,r,i){this._key=t,this._resolve=e,this._reject=n,this._timeoutId=r,this._log=i,this._completed=!1}return t.prototype.isCompleted=function(){return this._completed},t.prototype.resolve=function(t){this._completed||(this._completed=!0,clearTimeout(this._timeoutId),this._log.isDebugEnabled()&&this._log.debug(t+" acquired from the pool "+this._key),this._resolve(t))},t.prototype.reject=function(t){this._completed||(this._completed=!0,clearTimeout(this._timeoutId),this._reject(t))},t}(),u=function(){function t(){this._active=!0}return t.prototype.isActive=function(){return this._active},t.prototype.close=function(){this._active=!1},t}();e.default=C},4066:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.RoutingTable=e.Rediscovery=void 0;var i=r(n(8862));e.Rediscovery=i.default;var o=r(n(1852));e.RoutingTable=o.default,e.default=i.default},8862:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(1852)),o=n(7778),g=n(758),s=g.error.SERVICE_UNAVAILABLE,A=function(){function t(t){this._routingContext=t}return t.prototype.lookupRoutingTableOnRouter=function(t,e,n,r){var o=this;return t._acquireConnection((function(g){return o._requestRawRoutingTable(g,t,e,n,r).then((function(t){return t.isNull?null:i.default.fromRawRoutingTable(e,n,t)}))}))},t.prototype._requestRawRoutingTable=function(t,e,n,r,i){var A=this;return new Promise((function(C,I){t.protocol().requestRoutingInformation({routingContext:A._routingContext,databaseName:n,impersonatedUser:i,sessionContext:{bookmark:e._lastBookmark,mode:e._mode,database:e._database,afterComplete:e._onComplete},onCompleted:C,onError:function(t){"Neo.ClientError.Database.DatabaseNotFound"===t.code?I(t):"Neo.ClientError.Procedure.ProcedureNotFound"===t.code?I((0,g.newError)("Server at "+r.asHostPort()+" can't perform routing. Make sure you are connecting to a causal cluster",s)):C(o.RawRoutingTable.ofNull())}})}))},t}();e.default=A},1852:function(t,e,n){"use strict";var r=this&&this.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),g=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)g.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return g},i=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={basic:function(t,e,n){return n?{scheme:"basic",principal:t,credentials:e,realm:n}:{scheme:"basic",principal:t,credentials:e}},kerberos:function(t){return{scheme:"kerberos",principal:"",credentials:t}},bearer:function(t){return{scheme:"bearer",credentials:t}},custom:function(t,e,n,r,i){return i?{scheme:r,principal:t,credentials:e,realm:n,parameters:i}:{scheme:r,principal:t,credentials:e,realm:n}}}},3915:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.acquireConnection=function(t){throw Error("Not implemented")},t.prototype.supportsMultiDb=function(){throw Error("Not implemented")},t.prototype.supportsTransactionConfig=function(){throw Error("Not implemented")},t.prototype.supportsUserImpersonation=function(){throw Error("Not implemented")},t.prototype.close=function(){throw Error("Not implemented")},t}();e.default=n},5287:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){this.id="",this.databaseId=""}return t.prototype.isOpen=function(){return!1},t.prototype.protocol=function(){throw Error("Not implemented")},t.prototype.connect=function(t,e){throw Error("Not implemented")},t.prototype.write=function(t,e,n){throw Error("Not implemented")},t.prototype.resetAndFlush=function(){throw Error("Not implemented")},t.prototype.close=function(){throw Error("Not implemented")},t.prototype._release=function(){return Promise.resolve()},t}();e.default=n},5278:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.WRITE=e.READ=e.Driver=void 0;var i=n(9763),o=n(2783),g=r(n(1406)),s=n(2206),A=n(1205),C=r(n(4777)),I=n(7400),a=s.ACCESS_MODE_READ;e.READ=a;var u=s.ACCESS_MODE_WRITE;e.WRITE=u;var c=0,l=function(){function t(t,e,n,r){void 0===e&&(e={}),void 0===r&&(r=function(t){return new C.default(t)}),function(t){t.maxConnectionLifetime=h(t.maxConnectionLifetime,36e5),t.maxConnectionPoolSize=h(t.maxConnectionPoolSize,s.DEFAULT_POOL_MAX_SIZE),t.connectionAcquisitionTimeout=h(t.connectionAcquisitionTimeout,s.DEFAULT_POOL_ACQUISITION_TIMEOUT),t.fetchSize=d(t.fetchSize,1e3)}(e),function(t){var e=t.resolver;if(e&&"function"!=typeof e)throw new TypeError("Configured resolver should be a function. Got: "+e)}(e),this._id=c++,this._meta=t,this._config=e,this._log=A.Logger.create(e),this._createConnectionProvider=n,this._createSession=r,this._connectionProvider=null,this._afterConstruction()}return t.prototype.verifyConnectivity=function(t){var e=(void 0===t?{}:t).database,n=void 0===e?"":e,r=this._getOrCreateConnectionProvider();return new o.ConnectivityVerifier(r).verify({database:n})},t.prototype.supportsMultiDb=function(){return this._getOrCreateConnectionProvider().supportsMultiDb()},t.prototype.supportsTransactionConfig=function(){return this._getOrCreateConnectionProvider().supportsTransactionConfig()},t.prototype.supportsUserImpersonation=function(){return this._getOrCreateConnectionProvider().supportsUserImpersonation()},t.prototype._supportsRouting=function(){return this._meta.routing},t.prototype._isEncrypted=function(){return this._config.encrypted===I.ENCRYPTION_ON},t.prototype._getTrust=function(){return this._config.trust},t.prototype.session=function(t){var e=void 0===t?{}:t,n=e.defaultAccessMode,r=void 0===n?u:n,i=e.bookmarks,o=e.database,g=void 0===o?"":o,s=e.impersonatedUser,A=e.fetchSize;return this._newSession({defaultAccessMode:r,bookmarkOrBookmarks:i,database:g,reactive:!1,impersonatedUser:s,fetchSize:d(A,this._config.fetchSize)})},t.prototype.close=function(){return this._log.info("Driver "+this._id+" closing"),this._connectionProvider?this._connectionProvider.close():Promise.resolve()},t.prototype._afterConstruction=function(){this._log.info(this._meta.typename+" driver "+this._id+" created for server address "+this._meta.address)},t.prototype._newSession=function(t){var e=t.defaultAccessMode,n=t.bookmarkOrBookmarks,r=t.database,o=t.reactive,g=t.impersonatedUser,s=t.fetchSize,A=C.default._validateSessionMode(e),I=this._getOrCreateConnectionProvider(),a=n?new i.Bookmark(n):i.Bookmark.empty();return this._createSession({mode:A,database:r||"",connectionProvider:I,bookmark:a,config:this._config,reactive:o,impersonatedUser:g,fetchSize:s})},t.prototype._getOrCreateConnectionProvider=function(){var t;return this._connectionProvider||(this._connectionProvider=this._createConnectionProvider(this._id,this._config,this._log,(t=this._config,new g.default(t.resolver)))),this._connectionProvider},t}();function h(t,e){var n=parseInt(t,10);return n>0||0===n?n:n<0?Number.MAX_SAFE_INTEGER:e}function d(t,e){var n=parseInt(t,10);if(n>0||n===s.FETCH_ALL)return n;if(0===n||n<0)throw new Error("The fetch size can only be a positive value or "+s.FETCH_ALL+" for ALL. However fetchSize = "+n);return e}e.Driver=l,e.default=l},4949:function(t,e){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.PROTOCOL_ERROR=e.SESSION_EXPIRED=e.SERVICE_UNAVAILABLE=e.Neo4jError=e.newError=void 0,e.SERVICE_UNAVAILABLE="ServiceUnavailable",e.SESSION_EXPIRED="SessionExpired",e.PROTOCOL_ERROR="ProtocolError";var i=function(t){function e(n,r){var i=t.call(this,n)||this;return i.constructor=e,i.__proto__=e.prototype,i.code=r,i.name="Neo4jError",i}return r(e,t),e}(Error);e.Neo4jError=i,e.newError=function(t,e){return new i(t,null!=e?e:"N/A")}},8156:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isPathSegment=e.PathSegment=e.isPath=e.Path=e.isUnboundRelationship=e.UnboundRelationship=e.isRelationship=e.Relationship=e.isNode=e.Node=void 0;var r=n(2347),i={value:!0,enumerable:!1,configurable:!1,writable:!1},o="__isNode__",g="__isRelationship__",s="__isUnboundRelationship__",A="__isPath__",C="__isPathSegment__";function I(t,e){return!0===(t&&t[e])}var a=function(){function t(t,e,n){this.identity=t,this.labels=e,this.properties=n}return t.prototype.toString=function(){for(var t="("+this.identity,e=0;e0){for(t+=" {",e=0;e0&&(t+=","),t+=n[e]+":"+(0,r.stringify)(this.properties[n[e]]);t+="}"}return t+")"},t}();e.Node=a,Object.defineProperty(a.prototype,o,i),e.isNode=function(t){return I(t,o)};var u=function(){function t(t,e,n,r,i){this.identity=t,this.start=e,this.end=n,this.type=r,this.properties=i}return t.prototype.toString=function(){var t="("+this.start+")-[:"+this.type,e=Object.keys(this.properties);if(e.length>0){t+=" {";for(var n=0;n0&&(t+=","),t+=e[n]+":"+(0,r.stringify)(this.properties[e[n]]);t+="}"}return t+"]->("+this.end+")"},t}();e.Relationship=u,Object.defineProperty(u.prototype,g,i),e.isRelationship=function(t){return I(t,g)};var c=function(){function t(t,e,n){this.identity=t,this.type=e,this.properties=n}return t.prototype.bind=function(t,e){return new u(this.identity,t,e,this.type,this.properties)},t.prototype.toString=function(){var t="-[:"+this.type,e=Object.keys(this.properties);if(e.length>0){t+=" {";for(var n=0;n0&&(t+=","),t+=e[n]+":"+(0,r.stringify)(this.properties[e[n]]);t+="}"}return t+"]->"},t}();e.UnboundRelationship=c,Object.defineProperty(c.prototype,s,i),e.isUnboundRelationship=function(t){return I(t,s)};var l=function(t,e,n){this.start=t,this.relationship=e,this.end=n};e.PathSegment=l,Object.defineProperty(l.prototype,C,i),e.isPathSegment=function(t){return I(t,C)};var h=function(t,e,n){this.start=t,this.end=e,this.segments=n,this.length=n.length};e.Path=h,Object.defineProperty(h.prototype,A,i),e.isPath=function(t){return I(t,A)}},758:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e},g=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.types=e.Driver=e.Session=e.Transaction=e.Connection=e.ConnectionProvider=e.Result=e.Stats=e.QueryStatistics=e.ProfiledPlan=e.Plan=e.Notification=e.ServerInfo=e.queryType=e.ResultSummary=e.Record=e.isPathSegment=e.PathSegment=e.isPath=e.Path=e.isUnboundRelationship=e.UnboundRelationship=e.isRelationship=e.Relationship=e.isNode=e.Node=e.Time=e.LocalTime=e.LocalDateTime=e.isTime=e.isLocalTime=e.isLocalDateTime=e.isDuration=e.isDateTime=e.isDate=e.Duration=e.DateTime=e.Date=e.Point=e.isPoint=e.internal=e.toString=e.toNumber=e.inSafeRange=e.isInt=e.int=e.Integer=e.error=e.Neo4jError=e.newError=void 0,e.auth=e.json=e.driver=void 0;var s=n(4949);Object.defineProperty(e,"newError",{enumerable:!0,get:function(){return s.newError}}),Object.defineProperty(e,"Neo4jError",{enumerable:!0,get:function(){return s.Neo4jError}});var A=o(n(6720));e.Integer=A.default,Object.defineProperty(e,"int",{enumerable:!0,get:function(){return A.int}}),Object.defineProperty(e,"isInt",{enumerable:!0,get:function(){return A.isInt}}),Object.defineProperty(e,"inSafeRange",{enumerable:!0,get:function(){return A.inSafeRange}}),Object.defineProperty(e,"toNumber",{enumerable:!0,get:function(){return A.toNumber}}),Object.defineProperty(e,"toString",{enumerable:!0,get:function(){return A.toString}});var C=n(8718);Object.defineProperty(e,"Date",{enumerable:!0,get:function(){return C.Date}}),Object.defineProperty(e,"DateTime",{enumerable:!0,get:function(){return C.DateTime}}),Object.defineProperty(e,"Duration",{enumerable:!0,get:function(){return C.Duration}}),Object.defineProperty(e,"isDate",{enumerable:!0,get:function(){return C.isDate}}),Object.defineProperty(e,"isDateTime",{enumerable:!0,get:function(){return C.isDateTime}}),Object.defineProperty(e,"isDuration",{enumerable:!0,get:function(){return C.isDuration}}),Object.defineProperty(e,"isLocalDateTime",{enumerable:!0,get:function(){return C.isLocalDateTime}}),Object.defineProperty(e,"isLocalTime",{enumerable:!0,get:function(){return C.isLocalTime}}),Object.defineProperty(e,"isTime",{enumerable:!0,get:function(){return C.isTime}}),Object.defineProperty(e,"LocalDateTime",{enumerable:!0,get:function(){return C.LocalDateTime}}),Object.defineProperty(e,"LocalTime",{enumerable:!0,get:function(){return C.LocalTime}}),Object.defineProperty(e,"Time",{enumerable:!0,get:function(){return C.Time}});var I=n(8156);Object.defineProperty(e,"Node",{enumerable:!0,get:function(){return I.Node}}),Object.defineProperty(e,"isNode",{enumerable:!0,get:function(){return I.isNode}}),Object.defineProperty(e,"Relationship",{enumerable:!0,get:function(){return I.Relationship}}),Object.defineProperty(e,"isRelationship",{enumerable:!0,get:function(){return I.isRelationship}}),Object.defineProperty(e,"UnboundRelationship",{enumerable:!0,get:function(){return I.UnboundRelationship}}),Object.defineProperty(e,"isUnboundRelationship",{enumerable:!0,get:function(){return I.isUnboundRelationship}}),Object.defineProperty(e,"Path",{enumerable:!0,get:function(){return I.Path}}),Object.defineProperty(e,"isPath",{enumerable:!0,get:function(){return I.isPath}}),Object.defineProperty(e,"PathSegment",{enumerable:!0,get:function(){return I.PathSegment}}),Object.defineProperty(e,"isPathSegment",{enumerable:!0,get:function(){return I.isPathSegment}});var a=g(n(1104));e.Record=a.default;var u=n(8729);Object.defineProperty(e,"isPoint",{enumerable:!0,get:function(){return u.isPoint}}),Object.defineProperty(e,"Point",{enumerable:!0,get:function(){return u.Point}});var c=o(n(260));e.ResultSummary=c.default,Object.defineProperty(e,"queryType",{enumerable:!0,get:function(){return c.queryType}}),Object.defineProperty(e,"ServerInfo",{enumerable:!0,get:function(){return c.ServerInfo}}),Object.defineProperty(e,"Notification",{enumerable:!0,get:function(){return c.Notification}}),Object.defineProperty(e,"Plan",{enumerable:!0,get:function(){return c.Plan}}),Object.defineProperty(e,"ProfiledPlan",{enumerable:!0,get:function(){return c.ProfiledPlan}}),Object.defineProperty(e,"QueryStatistics",{enumerable:!0,get:function(){return c.QueryStatistics}}),Object.defineProperty(e,"Stats",{enumerable:!0,get:function(){return c.Stats}});var l=g(n(9675));e.Result=l.default;var h=g(n(3915));e.ConnectionProvider=h.default;var d=g(n(5287));e.Connection=d.default;var f=g(n(7561));e.Transaction=f.default;var p=g(n(4777));e.Session=p.default;var v=o(n(5278)),y=v;e.Driver=v.default,e.driver=y;var b=g(n(1251));e.auth=b.default;var m=o(n(5833));e.types=m;var w=o(n(2347));e.json=w;var _=o(n(6457));e.internal=_;var x={SERVICE_UNAVAILABLE:s.SERVICE_UNAVAILABLE,SESSION_EXPIRED:s.SESSION_EXPIRED,PROTOCOL_ERROR:s.PROTOCOL_ERROR};e.error=x;var E={newError:s.newError,Neo4jError:s.Neo4jError,error:x,Integer:A.default,int:A.int,isInt:A.isInt,inSafeRange:A.inSafeRange,toNumber:A.toNumber,toString:A.toString,internal:_,isPoint:u.isPoint,Point:u.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:I.Node,isNode:I.isNode,Relationship:I.Relationship,isRelationship:I.isRelationship,UnboundRelationship:I.UnboundRelationship,isUnboundRelationship:I.isUnboundRelationship,Path:I.Path,isPath:I.isPath,PathSegment:I.PathSegment,isPathSegment:I.isPathSegment,Record:a.default,ResultSummary:c.default,queryType:c.queryType,ServerInfo:c.ServerInfo,Notification:c.Notification,Plan:c.Plan,ProfiledPlan:c.ProfiledPlan,QueryStatistics:c.QueryStatistics,Stats:c.Stats,Result:l.default,Transaction:f.default,Session:p.default,Driver:v.default,Connection:d.default,types:m,driver:y,json:w,auth:b.default};e.default=E},6720:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toString=e.toNumber=e.inSafeRange=e.isInt=e.int=void 0;var r=n(4949),i=new Map,o=function(){function t(t,e){this.low=t||0,this.high=e||0}return t.prototype.inSafeRange=function(){return this.greaterThanOrEqual(t.MIN_SAFE_VALUE)&&this.lessThanOrEqual(t.MAX_SAFE_VALUE)},t.prototype.toInt=function(){return this.low},t.prototype.toNumber=function(){return this.high*s+(this.low>>>0)},t.prototype.toBigInt=function(){if(this.isZero())return BigInt(0);if(this.isPositive())return BigInt(this.high>>>0)*BigInt(s)+BigInt(this.low>>>0);var t=this.negate();return BigInt(-1)*(BigInt(t.high>>>0)*BigInt(s)+BigInt(t.low>>>0))},t.prototype.toNumberOrInfinity=function(){return this.lessThan(t.MIN_SAFE_VALUE)?Number.NEGATIVE_INFINITY:this.greaterThan(t.MAX_SAFE_VALUE)?Number.POSITIVE_INFINITY:this.toNumber()},t.prototype.toString=function(e){if((e=e||10)<2||e>36)throw RangeError("radix out of range: "+e);if(this.isZero())return"0";var n;if(this.isNegative()){if(this.equals(t.MIN_VALUE)){var r=t.fromNumber(e),i=this.div(r);return n=i.multiply(r).subtract(this),i.toString(e)+n.toInt().toString(e)}return"-"+this.negate().toString(e)}var o=t.fromNumber(Math.pow(e,6));n=this;for(var g="";;){var s=n.div(o),A=(n.subtract(s.multiply(o)).toInt()>>>0).toString(e);if((n=s).isZero())return A+g;for(;A.length<6;)A="0"+A;g=""+A+g}},t.prototype.getHighBits=function(){return this.high},t.prototype.getLowBits=function(){return this.low},t.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.equals(t.MIN_VALUE)?64:this.negate().getNumBitsAbs();for(var e=0!==this.high?this.high:this.low,n=31;n>0&&0==(e&1<=0},t.prototype.isOdd=function(){return 1==(1&this.low)},t.prototype.isEven=function(){return 0==(1&this.low)},t.prototype.equals=function(e){var n=t.fromValue(e);return this.high===n.high&&this.low===n.low},t.prototype.notEquals=function(t){return!this.equals(t)},t.prototype.lessThan=function(t){return this.compare(t)<0},t.prototype.lessThanOrEqual=function(t){return this.compare(t)<=0},t.prototype.greaterThan=function(t){return this.compare(t)>0},t.prototype.greaterThanOrEqual=function(t){return this.compare(t)>=0},t.prototype.compare=function(e){var n=t.fromValue(e);if(this.equals(n))return 0;var r=this.isNegative(),i=n.isNegative();return r&&!i?-1:!r&&i?1:this.subtract(n).isNegative()?-1:1},t.prototype.negate=function(){return this.equals(t.MIN_VALUE)?t.MIN_VALUE:this.not().add(t.ONE)},t.prototype.add=function(e){var n=t.fromValue(e),r=this.high>>>16,i=65535&this.high,o=this.low>>>16,g=65535&this.low,s=n.high>>>16,A=65535&n.high,C=n.low>>>16,I=0,a=0,u=0,c=0;return u+=(c+=g+(65535&n.low))>>>16,c&=65535,a+=(u+=o+C)>>>16,u&=65535,I+=(a+=i+A)>>>16,a&=65535,I+=r+s,I&=65535,t.fromBits(u<<16|c,I<<16|a)},t.prototype.subtract=function(e){var n=t.fromValue(e);return this.add(n.negate())},t.prototype.multiply=function(e){if(this.isZero())return t.ZERO;var n=t.fromValue(e);if(n.isZero())return t.ZERO;if(this.equals(t.MIN_VALUE))return n.isOdd()?t.MIN_VALUE:t.ZERO;if(n.equals(t.MIN_VALUE))return this.isOdd()?t.MIN_VALUE:t.ZERO;if(this.isNegative())return n.isNegative()?this.negate().multiply(n.negate()):this.negate().multiply(n).negate();if(n.isNegative())return this.multiply(n.negate()).negate();if(this.lessThan(C)&&n.lessThan(C))return t.fromNumber(this.toNumber()*n.toNumber());var r=this.high>>>16,i=65535&this.high,o=this.low>>>16,g=65535&this.low,s=n.high>>>16,A=65535&n.high,I=n.low>>>16,a=65535&n.low,u=0,c=0,l=0,h=0;return l+=(h+=g*a)>>>16,h&=65535,c+=(l+=o*a)>>>16,l&=65535,c+=(l+=g*I)>>>16,l&=65535,u+=(c+=i*a)>>>16,c&=65535,u+=(c+=o*I)>>>16,c&=65535,u+=(c+=g*A)>>>16,c&=65535,u+=r*a+i*I+o*A+g*s,u&=65535,t.fromBits(l<<16|h,u<<16|c)},t.prototype.div=function(e){var n,i,o,g=t.fromValue(e);if(g.isZero())throw(0,r.newError)("division by zero");if(this.isZero())return t.ZERO;if(this.equals(t.MIN_VALUE))return g.equals(t.ONE)||g.equals(t.NEG_ONE)?t.MIN_VALUE:g.equals(t.MIN_VALUE)?t.ONE:(n=this.shiftRight(1).div(g).shiftLeft(1)).equals(t.ZERO)?g.isNegative()?t.ONE:t.NEG_ONE:(i=this.subtract(g.multiply(n)),o=n.add(i.div(g)));if(g.equals(t.MIN_VALUE))return t.ZERO;if(this.isNegative())return g.isNegative()?this.negate().div(g.negate()):this.negate().div(g).negate();if(g.isNegative())return this.div(g.negate()).negate();for(o=t.ZERO,i=this;i.greaterThanOrEqual(g);){n=Math.max(1,Math.floor(i.toNumber()/g.toNumber()));for(var s=Math.ceil(Math.log(n)/Math.LN2),A=s<=48?1:Math.pow(2,s-48),C=t.fromNumber(n),I=C.multiply(g);I.isNegative()||I.greaterThan(i);)n-=A,I=(C=t.fromNumber(n)).multiply(g);C.isZero()&&(C=t.ONE),o=o.add(C),i=i.subtract(I)}return o},t.prototype.modulo=function(e){var n=t.fromValue(e);return this.subtract(this.div(n).multiply(n))},t.prototype.not=function(){return t.fromBits(~this.low,~this.high)},t.prototype.and=function(e){var n=t.fromValue(e);return t.fromBits(this.low&n.low,this.high&n.high)},t.prototype.or=function(e){var n=t.fromValue(e);return t.fromBits(this.low|n.low,this.high|n.high)},t.prototype.xor=function(e){var n=t.fromValue(e);return t.fromBits(this.low^n.low,this.high^n.high)},t.prototype.shiftLeft=function(e){var n=t.toNumber(e);return 0==(n&=63)?t.ZERO:n<32?t.fromBits(this.low<>>32-n):t.fromBits(0,this.low<>>n|this.high<<32-n,this.high>>n):t.fromBits(this.high>>n-32,this.high>=0?0:-1)},t.isInteger=function(t){return!0===(t&&t.__isInteger__)},t.fromInt=function(e){var n,r;return(e|=0)>=-128&&e<128&&(r=i.get(e))?r:(n=new t(e,e<0?-1:0),e>=-128&&e<128&&i.set(e,n),n)},t.fromBits=function(e,n){return new t(e,n)},t.fromNumber=function(e){return isNaN(e)||!isFinite(e)?t.ZERO:e<=-A?t.MIN_VALUE:e+1>=A?t.MAX_VALUE:e<0?t.fromNumber(-e).negate():new t(e%s|0,e/s|0)},t.fromString=function(e,n,i){var o,s=(void 0===i?{}:i).strictStringValidation;if(0===e.length)throw(0,r.newError)("number format error: empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return t.ZERO;if((n=n||10)<2||n>36)throw(0,r.newError)("radix out of range: "+n);if((o=e.indexOf("-"))>0)throw(0,r.newError)('number format error: interior "-" character: '+e);if(0===o)return t.fromString(e.substring(1),n).negate();for(var A=t.fromNumber(Math.pow(n,8)),C=t.ZERO,I=0;I{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConnectivityVerifier=void 0;var r=n(1474),i=n(2206),o=n(4949),g=function(){function t(t){this._connectionProvider=t}return t.prototype.verify=function(t){var e=(void 0===t?{}:t).database,n=void 0===e?"":e;return function(t,e){var n=new r.ConnectionHolder({mode:i.ACCESS_MODE_READ,database:e,connectionProvider:t});return n.initializeConnection(),n.getConnection().then((function(t){if(!t)throw(0,o.newError)("Unexpected error acquiring transaction");return n.close().then((function(){return t.server}))})).catch((function(t){return n.close().catch((function(t){})).then((function(){return Promise.reject(t)}))}))}(this._connectionProvider,n)},t}();e.ConnectivityVerifier=g},2206:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BOLT_PROTOCOL_V4_4=e.BOLT_PROTOCOL_V4_3=e.BOLT_PROTOCOL_V4_2=e.BOLT_PROTOCOL_V4_1=e.BOLT_PROTOCOL_V4_0=e.BOLT_PROTOCOL_V3=e.BOLT_PROTOCOL_V2=e.BOLT_PROTOCOL_V1=e.DEFAULT_POOL_MAX_SIZE=e.DEFAULT_POOL_ACQUISITION_TIMEOUT=e.ACCESS_MODE_WRITE=e.ACCESS_MODE_READ=e.FETCH_ALL=void 0,e.FETCH_ALL=-1,e.DEFAULT_POOL_ACQUISITION_TIMEOUT=6e4,e.DEFAULT_POOL_MAX_SIZE=100,e.ACCESS_MODE_READ="READ",e.ACCESS_MODE_WRITE="WRITE",e.BOLT_PROTOCOL_V1=1,e.BOLT_PROTOCOL_V2=2,e.BOLT_PROTOCOL_V3=3,e.BOLT_PROTOCOL_V4_0=4,e.BOLT_PROTOCOL_V4_1=4.1,e.BOLT_PROTOCOL_V4_2=4.2,e.BOLT_PROTOCOL_V4_3=4.3,e.BOLT_PROTOCOL_V4_4=4.4},6457:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.objectUtil=e.retryStrategy=e.resolver=e.serverAddress=e.urlUtil=e.logger=e.connectivityVerifier=e.transactionExecutor=e.txConfig=e.connectionHolder=e.constants=e.bookmark=e.observer=e.temporalUtil=e.util=void 0;var g=o(n(7400));e.util=g;var s=o(n(3355));e.temporalUtil=s;var A=o(n(2130));e.observer=A;var C=o(n(9763));e.bookmark=C;var I=o(n(2206));e.constants=I;var a=o(n(1474));e.connectionHolder=a;var u=o(n(5838));e.txConfig=u;var c=o(n(1475));e.transactionExecutor=c;var l=o(n(2783));e.connectivityVerifier=l;var h=o(n(1205));e.logger=h;var d=o(n(4434));e.urlUtil=d;var f=o(n(4));e.serverAddress=f;var p=o(n(5447));e.resolver=p;var v=o(n(9297));e.retryStrategy=v;var y=o(n(2775));e.objectUtil=y},1205:function(t,e,n){"use strict";var r,i,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.Logger=void 0;var g=n(4949),s="error",A="warn",C="info",I="debug",a=C,u=((i={})[s]=0,i[A]=1,i[C]=2,i[I]=3,i),c=function(){function t(t,e){this._level=t,this._loggerFunction=e}return t.create=function(e){if(e&&e.logging){var n=e.logging,r=function(t){if(t&&t.level){var e=t.level,n=u[e];if(!n&&0!==n)throw(0,g.newError)("Illegal logging level: "+e+". Supported levels are: "+Object.keys(u));return e}return a}(n),i=function(t){if(t&&t.logger){var e=t.logger;if(e&&"function"==typeof e)return e}throw(0,g.newError)("Illegal logger function: "+t.logger)}(n);return new t(r,i)}return this.noOp()},t.noOp=function(){return l},t.prototype.isErrorEnabled=function(){return h(this._level,s)},t.prototype.error=function(t){this.isErrorEnabled()&&this._loggerFunction(s,t)},t.prototype.isWarnEnabled=function(){return h(this._level,A)},t.prototype.warn=function(t){this.isWarnEnabled()&&this._loggerFunction(A,t)},t.prototype.isInfoEnabled=function(){return h(this._level,C)},t.prototype.info=function(t){this.isInfoEnabled()&&this._loggerFunction(C,t)},t.prototype.isDebugEnabled=function(){return h(this._level,I)},t.prototype.debug=function(t){this.isDebugEnabled()&&this._loggerFunction(I,t)},t}();e.Logger=c;var l=new(function(t){function e(){return t.call(this,C,(function(t,e){}))||this}return o(e,t),e.prototype.isErrorEnabled=function(){return!1},e.prototype.error=function(t){},e.prototype.isWarnEnabled=function(){return!1},e.prototype.warn=function(t){},e.prototype.isInfoEnabled=function(){return!1},e.prototype.info=function(t){},e.prototype.isDebugEnabled=function(){return!1},e.prototype.debug=function(t){},e}(c));function h(t,e){return u[t]>=u[e]}},2775:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getBrokenObjectReason=e.isBrokenObject=e.createBrokenObject=void 0;var n="__isBrokenObject__",r="__reason__";e.createBrokenObject=function(t,e){void 0===e&&(e={});var i=function(){throw t};return new Proxy(e,{get:function(e,o){return o===n||(o===r?t:void("toJSON"!==o&&i()))},set:i,apply:i,construct:i,defineProperty:i,deleteProperty:i,getOwnPropertyDescriptor:i,getPrototypeOf:i,has:i,isExtensible:i,ownKeys:i,preventExtensions:i,setPrototypeOf:i})},e.isBrokenObject=function(t){return null!==t&&"object"==typeof t&&!0===t[n]},e.getBrokenObjectReason=function(t){return t[r]}},2130:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FailedObserver=e.CompletedObserver=void 0;var n=function(){function t(){}return t.prototype.subscribe=function(t){i(t,t.onKeys,[]),i(t,t.onCompleted,{})},t.prototype.cancel=function(){},t.prototype.prepareToHandleSingleResponse=function(){},t.prototype.markCompleted=function(){},t.prototype.onError=function(t){throw Error("CompletedObserver not supposed to call onError")},t}();e.CompletedObserver=n;var r=function(){function t(t){var e=t.error,n=t.onError;this._error=e,this._beforeError=n,this._observers=[],this.onError(e)}return t.prototype.subscribe=function(t){i(t,t.onError,this._error),this._observers.push(t)},t.prototype.onError=function(t){var e=this;Promise.resolve(i(this,this._beforeError,t)).then((function(){return e._observers.forEach((function(e){return i(e,e.onError,t)}))}))},t.prototype.cancel=function(){},t.prototype.prepareToHandleSingleResponse=function(){},t.prototype.markCompleted=function(){},t}();function i(t,e,n){e&&e.bind(t)(n)}e.FailedObserver=r},7517:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.resolve=function(){throw new Error("Abstract function")},t.prototype._resolveToItself=function(t){return Promise.resolve([t])},t}();e.default=n},1406:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(4);function i(t){return Promise.resolve([t])}var o=function(){function t(t){this._resolverFunction=t||i}return t.prototype.resolve=function(t){var e=this;return new Promise((function(n){return n(e._resolverFunction(t.asHostPort()))})).then((function(t){if(!Array.isArray(t))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 ':'. Got: "+t);return t.map((function(t){return r.ServerAddress.fromUrl(t)}))}))},t}();e.default=o},5447:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.ConfiguredCustomResolver=e.BaseHostNameResolver=void 0;var i=r(n(7517));e.BaseHostNameResolver=i.default;var o=r(n(1406));e.ConfiguredCustomResolver=o.default},9297:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.canRetryOn=void 0;var r=n(4949);e.canRetryOn=function(t){return t&&t instanceof r.Neo4jError&&t.code&&(t.code===r.SERVICE_UNAVAILABLE||t.code===r.SESSION_EXPIRED||"Neo.ClientError.Security.AuthorizationExpired"===t.code||(e=t.code).indexOf("TransientError")>=0&&"Neo.TransientError.Transaction.Terminated"!==e&&"Neo.TransientError.Transaction.LockClientStopped"!==e);var e}},4:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.ServerAddress=void 0;var g=n(7400),s=o(n(4434)),A=function(){function t(t,e,n,r){this._host=(0,g.assertString)(t,"host"),this._resolved=e?(0,g.assertString)(e,"resolved"):null,this._port=(0,g.assertNumber)(n,"port"),this._hostPort=r,this._stringValue=e?r+"("+e+")":""+r}return t.prototype.host=function(){return this._host},t.prototype.resolvedHost=function(){return this._resolved?this._resolved:this._host},t.prototype.port=function(){return this._port},t.prototype.resolveWith=function(e){return new t(this._host,e,this._port,this._hostPort)},t.prototype.asHostPort=function(){return this._hostPort},t.prototype.asKey=function(){return this._hostPort},t.prototype.toString=function(){return this._stringValue},t.fromUrl=function(e){var n=s.parseDatabaseUrl(e);return new t(n.host,null,n.port,n.hostAndPort)},t}();e.ServerAddress=A},3355:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.floorMod=e.floorDiv=e.assertValidZoneId=e.assertValidNanosecond=e.assertValidSecond=e.assertValidMinute=e.assertValidHour=e.assertValidDay=e.assertValidMonth=e.assertValidYear=e.timeZoneOffsetInSeconds=e.totalNanoseconds=e.newDate=e.toStandardDate=e.isoStringToStandardDate=e.dateToIsoString=e.timeZoneOffsetToIsoString=e.timeToIsoString=e.durationToIsoString=e.dateToEpochDay=e.localDateTimeToEpochSecond=e.localTimeToNanoOfDay=e.normalizeNanosecondsForDuration=e.normalizeSecondsForDuration=e.SECONDS_PER_DAY=e.DAYS_PER_400_YEAR_CYCLE=e.DAYS_0000_TO_1970=e.NANOS_PER_HOUR=e.NANOS_PER_MINUTE=e.NANOS_PER_MILLISECOND=e.NANOS_PER_SECOND=e.SECONDS_PER_HOUR=e.SECONDS_PER_MINUTE=e.MINUTES_PER_HOUR=e.NANOSECOND_OF_SECOND_RANGE=e.SECOND_OF_MINUTE_RANGE=e.MINUTE_OF_HOUR_RANGE=e.HOUR_OF_DAY_RANGE=e.DAY_OF_MONTH_RANGE=e.MONTH_OF_YEAR_RANGE=e.YEAR_RANGE=void 0;var g=o(n(6720)),s=n(4949),A=n(7400),C=function(){function t(t,e){this._minNumber=t,this._maxNumber=e,this._minInteger=(0,g.int)(t),this._maxInteger=(0,g.int)(e)}return t.prototype.contains=function(t){if((0,g.isInt)(t)&&t instanceof g.default)return t.greaterThanOrEqual(this._minInteger)&&t.lessThanOrEqual(this._maxInteger);if("bigint"==typeof t){var e=(0,g.int)(t);return e.greaterThanOrEqual(this._minInteger)&&e.lessThanOrEqual(this._maxInteger)}return t>=this._minNumber&&t<=this._maxNumber},t.prototype.toString=function(){return"["+this._minNumber+", "+this._maxNumber+"]"},t}();function I(t,n,r){t=(0,g.int)(t),n=(0,g.int)(n),r=(0,g.int)(r);var i=t.multiply(365);return i=(i=(i=t.greaterThanOrEqual(0)?i.add(t.add(3).div(4).subtract(t.add(99).div(100)).add(t.add(399).div(400))):i.subtract(t.div(-4).subtract(t.div(-100)).add(t.div(-400)))).add(n.multiply(367).subtract(362).div(12))).add(r.subtract(1)),n.greaterThan(2)&&(i=i.subtract(1),function(t){return!(!(t=(0,g.int)(t)).modulo(4).equals(0)||t.modulo(100).equals(0)&&!t.modulo(400).equals(0))}(t)||(i=i.subtract(1))),i.subtract(e.DAYS_0000_TO_1970)}function a(t,e,n){if((0,A.assertNumberOrInteger)(t,n),!e.contains(t))throw(0,s.newError)(n+" is expected to be in range "+e+" but was: "+t);return t}function u(t,e){t=(0,g.int)(t),e=(0,g.int)(e);var n=t.div(e);return t.isPositive()!==e.isPositive()&&n.multiply(e).notEquals(t)&&(n=n.subtract(1)),n}function c(t,e){return t=(0,g.int)(t),e=(0,g.int)(e),t.subtract(u(t,e).multiply(e))}function l(t){return(t=(0,g.int)(t)).equals(0)?"":"."+h(t,9)}function h(t,e,n){var r=(t=(0,g.int)(t)).isNegative();r&&(t=t.negate());var i=t.toString();if(e)for(;i.length=t.getUTCSeconds()?t.getSeconds()-t.getUTCSeconds():t.getSeconds()-t.getUTCSeconds()+60,r=t.getTimezoneOffset();return 0===r?0+n:-1*r*e.SECONDS_PER_MINUTE+n},e.assertValidYear=function(t){return a(t,e.YEAR_RANGE,"Year")},e.assertValidMonth=function(t){return a(t,e.MONTH_OF_YEAR_RANGE,"Month")},e.assertValidDay=function(t){return a(t,e.DAY_OF_MONTH_RANGE,"Day")},e.assertValidHour=function(t){return a(t,e.HOUR_OF_DAY_RANGE,"Hour")},e.assertValidMinute=function(t){return a(t,e.MINUTE_OF_HOUR_RANGE,"Minute")},e.assertValidSecond=function(t){return a(t,e.SECOND_OF_MINUTE_RANGE,"Second")},e.assertValidNanosecond=function(t){return a(t,e.NANOSECOND_OF_SECOND_RANGE,"Nanosecond")},e.assertValidZoneId=function(t,e){try{Intl.DateTimeFormat(void 0,{timeZone:e})}catch(n){throw(0,s.newError)(t+' is expected to be a valid ZoneId but was: "'+e+'"')}},e.floorDiv=u,e.floorMod=c},1475:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TransactionExecutor=void 0;var r=n(4949),i=n(9297),o=function(){function t(t,e,n,r){this._maxRetryTimeMs=g(t,3e4),this._initialRetryDelayMs=g(e,1e3),this._multiplier=g(n,2),this._jitterFactor=g(r,.2),this._inFlightTimeoutIds=[],this._verifyAfterConstruction()}return t.prototype.execute=function(t,e){var n=this;return new Promise((function(r,i){n._executeTransactionInsidePromise(t,e,r,i)})).catch((function(r){var i=Date.now(),o=n._initialRetryDelayMs;return n._retryTransactionPromise(t,e,r,i,o)}))},t.prototype.close=function(){this._inFlightTimeoutIds.forEach((function(t){return clearTimeout(t)})),this._inFlightTimeoutIds=[]},t.prototype._retryTransactionPromise=function(t,e,n,r,o){var g=this;return Date.now()-r>this._maxRetryTimeMs||!(0,i.canRetryOn)(n)?Promise.reject(n):new Promise((function(n,r){var i=g._computeDelayWithJitter(o),s=setTimeout((function(){g._inFlightTimeoutIds=g._inFlightTimeoutIds.filter((function(t){return t!==s})),g._executeTransactionInsidePromise(t,e,n,r)}),i);g._inFlightTimeoutIds.push(s)})).catch((function(n){var i=o*g._multiplier;return g._retryTransactionPromise(t,e,n,r,i)}))},t.prototype._executeTransactionInsidePromise=function(t,e,n,r){var i,o=this;try{i=t()}catch(t){return void r(t)}this._safeExecuteTransactionWork(i,e).then((function(t){return o._handleTransactionWorkSuccess(t,i,n,r)})).catch((function(t){return o._handleTransactionWorkFailure(t,i,r)}))},t.prototype._safeExecuteTransactionWork=function(t,e){try{var n=e(t);return Promise.resolve(n)}catch(t){return Promise.reject(t)}},t.prototype._handleTransactionWorkSuccess=function(t,e,n,r){e.isOpen()?e.commit().then((function(){n(t)})).catch((function(t){r(t)})):n(t)},t.prototype._handleTransactionWorkFailure=function(t,e,n){e.isOpen()?e.rollback().catch((function(t){})).then((function(){return n(t)})):n(t)},t.prototype._computeDelayWithJitter=function(t){var e=t*this._jitterFactor,n=t-e,r=t+e;return Math.random()*(r-n)+n},t.prototype._verifyAfterConstruction=function(){if(this._maxRetryTimeMs<0)throw(0,r.newError)("Max retry time should be >= 0: "+this._maxRetryTimeMs);if(this._initialRetryDelayMs<0)throw(0,r.newError)("Initial retry delay should >= 0: "+this._initialRetryDelayMs);if(this._multiplier<1)throw(0,r.newError)("Multiplier should be >= 1.0: "+this._multiplier);if(this._jitterFactor<0||this._jitterFactor>1)throw(0,r.newError)("Jitter factor should be in [0.0, 1.0]: "+this._jitterFactor)},t}();function g(t,e){return t||0===t?t:e}e.TransactionExecutor=o},5838:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.TxConfig=void 0;var g=o(n(7400)),s=n(4949),A=n(6720),C=function(){function t(t){!function(t){t&&g.assertObject(t,"Transaction config")}(t),this.timeout=function(t){if(g.isObject(t)&&(t.timeout||0===t.timeout)){g.assertNumberOrInteger(t.timeout,"Transaction timeout");var e=(0,A.int)(t.timeout);if(e.isZero())throw(0,s.newError)("Transaction timeout should not be zero");if(e.isNegative())throw(0,s.newError)("Transaction timeout should not be negative");return e}return null}(t),this.metadata=function(t){if(g.isObject(t)&&t.metadata){var e=t.metadata;if(g.assertObject(e,"config.metadata"),0!==Object.keys(e).length)return e}return null}(t)}return t.empty=function(){return I},t.prototype.isEmpty=function(){return Object.values(this).every((function(t){return null==t}))},t}();e.TxConfig=C;var I=new C({})},4434:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)g.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return g};Object.defineProperty(e,"__esModule",{value:!0}),e.Url=e.formatIPv6Address=e.formatIPv4Address=e.defaultPortForScheme=e.parseDatabaseUrl=void 0;var o=n(7400),g=function(t,e,n,r,i){this.scheme=t,this.host=e,this.port=n,this.hostAndPort=r,this.query=i};function s(t,e,n){if(!(t=(t||"").trim()))throw new Error("Illegal empty "+e+" in URL query '"+n+"'");return t}function A(t){var e="["===t.charAt(0),n="]"===t.charAt(t.length-1);if(e||n){if(e&&n)return t;throw new Error("Illegal IPv6 address "+t)}return"["+t+"]"}function C(t){return"http"===t?7474:"https"===t?7473:7687}e.Url=g,e.parseDatabaseUrl=function(t){(0,o.assertString)(t,"URL");var e=function(t){return-1===(t=t.trim()).indexOf("://")?{schemeMissing:!0,url:"none://"+t}:{schemeMissing:!1,url:t}}(t),n=function(t){function e(t,e){var n=t.indexOf(e);return n>=0?[t.substring(0,n),t[n],t.substring(n+1)]:[t,"",""]}var n,o={};return":"===(n=e(t,":"))[1]&&(o.scheme=decodeURIComponent(n[0]),t=n[2]),"#"===(n=e(t,"#"))[1]&&(o.fragment=decodeURIComponent(n[2]),t=n[0]),"?"===(n=e(t,"?"))[1]&&(o.query=n[2],t=n[0]),t.startsWith("//")?(n=e(t.substr(2),"/"),(o=r(r({},o),function(t){var n,r,o,g,s={};"@"===(r=t,o="@",g=r.lastIndexOf(o),n=g>=0?[r.substring(0,g),r[g],r.substring(g+1)]:["","",r])[1]&&(s.userInfo=decodeURIComponent(n[0]),t=n[2]);var A=i(function(t,n,r){var i=e(t,n),o=e(i[2],r);return[o[0],o[2]]}(t,"[","]"),2),C=A[0],I=A[1];return""!==C?(s.host=C,n=e(I,":")):(n=e(t,":"),s.host=n[0]),":"===n[1]&&(s.port=n[2]),s}(n[0]))).path=n[1]+n[2]):o.path=t,o}(e.url),I=e.schemeMissing?null:function(t){return t?(":"===(t=t.trim()).charAt(t.length-1)&&(t=t.substring(0,t.length-1)),t):null}(n.scheme),a=function(t,e){if(!t)throw new Error("Unable to extract host from "+void 0);return t.trim()}(n.host),u=function(t){if(!t)throw new Error("Illegal host "+t);return t.indexOf(":")>=0?A(t):t}(a),c=function(t,e){var n="string"==typeof t?parseInt(t,10):t;return 0===n||n?n:C(e)}(n.port,I),l=u+":"+c,h=function(t,e){var n=t?function(t){return(t=(t||"").trim())&&"?"===t.charAt(0)&&(t=t.substring(1,t.length)),t}(t):null,r={};return n&&n.split("&").forEach((function(t){var n=t.split("=");if(2!==n.length)throw new Error("Invalid parameters: '"+n+"' in URL '"+e+"'.");var i=s(n[0],"key",e),o=s(n[1],"value",e);if(r[i])throw new Error("Duplicated query parameters with key '"+i+"' in URL '"+e+"'");r[i]=o})),r}(n.query||function(t){if("string"!=typeof t)return null;var e=i(t.split("?"),2);return e[0],e[1]}(n.resourceName),t);return new g(I,a,c,l,h)},e.formatIPv4Address=function(t,e){return t+":"+e},e.formatIPv6Address=function(t,e){return A(t)+":"+e},e.defaultPortForScheme=C},7400:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ENCRYPTION_OFF=e.ENCRYPTION_ON=e.validateQueryAndParameters=e.assertValidDate=e.assertNumberOrInteger=e.assertNumber=e.assertString=e.assertObject=e.isString=e.isObject=e.isEmptyObjectOrNull=void 0;var r=n(6720),i=n(2347);function o(t){return"object"==typeof t&&!Array.isArray(t)&&null!==t}function g(t,e){if(!s(t))throw new TypeError(e+" expected to be string but was: "+(0,i.stringify)(t));return t}function s(t){return"[object String]"===Object.prototype.toString.call(t)}e.ENCRYPTION_ON="ENCRYPTION_ON",e.ENCRYPTION_OFF="ENCRYPTION_OFF",e.isEmptyObjectOrNull=function(t){if(null===t)return!0;if(!o(t))return!1;for(var e in t)if(Object.prototype.hasOwnProperty.bind(t,e))return!1;return!0},e.isObject=o,e.validateQueryAndParameters=function(t,e,n){var r="",i=e||{},s=(null==n?void 0:n.skipAsserts)||!1;return"string"==typeof t?r=t:t instanceof String?r=t.toString():"object"==typeof t&&t.text&&(r=t.text,i=t.parameters||{}),s||(function(t){if(g(t,"Cypher query"),0===t.trim().length)throw new TypeError("Cypher query is expected to be a non-empty string.")}(r),function(t){if(!o(t)){var e=t.constructor?" "+t.constructor.name:"";throw new TypeError("Query parameters are expected to either be undefined/null or an object, given:"+e+" "+t)}}(i)),{validatedQuery:r,params:i}},e.assertObject=function(t,e){if(!o(t))throw new TypeError(e+" expected to be an object but was: "+(0,i.stringify)(t));return t},e.assertString=g,e.assertNumber=function(t,e){if("number"!=typeof t)throw new TypeError(e+" expected to be a number but was: "+(0,i.stringify)(t));return t},e.assertNumberOrInteger=function(t,e){if("number"!=typeof t&&"bigint"!=typeof t&&!(0,r.isInt)(t))throw new TypeError(e+" expected to be either a number or an Integer object but was: "+(0,i.stringify)(t));return t},e.assertValidDate=function(t,e){if("[object Date]"!==Object.prototype.toString.call(t))throw new TypeError(e+" expected to be a standard JavaScript Date but was: "+(0,i.stringify)(t));if(Number.isNaN(t.getTime()))throw new TypeError(e+" expected to be valid JavaScript Date but its time was NaN: "+(0,i.stringify)(t));return t},e.isString=s},2347:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.stringify=void 0;var r=n(2775);e.stringify=function(t){return JSON.stringify(t,(function(t,e){return(0,r.isBrokenObject)(e)?{__isBrokenObject__:!0,__reason__:(0,r.getBrokenObjectReason)(e)}:"bigint"==typeof e?e+"n":e}))}},1104:function(t,e,n){"use strict";var r=this&&this.__generator||function(t,e){var n,r,i,o,g={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;g;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return g.label++,{value:o[1],done:!1};case 5:g.label++,r=o[1],o=[0];continue;case 7:o=g.ops.pop(),g.trys.pop();continue;default:if(!((i=(i=g.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){g=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},o=this&&this.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),g=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)g.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return g};Object.defineProperty(e,"__esModule",{value:!0});var g=n(4949),s=function(){function t(t,e,n){this.keys=t,this.length=t.length,this._fields=e,this._fieldLookup=n||function(t){var e={};return t.forEach((function(t,n){e[t]=n})),e}(t)}return t.prototype.forEach=function(t){var e,n;try{for(var r=i(this.entries()),g=r.next();!g.done;g=r.next()){var s=o(g.value,2),A=s[0];t(s[1],A,this)}}catch(t){e={error:t}}finally{try{g&&!g.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}},t.prototype.map=function(t){var e,n,r=[];try{for(var g=i(this.entries()),s=g.next();!s.done;s=g.next()){var A=o(s.value,2),C=A[0],I=A[1];r.push(t(I,C,this))}}catch(t){e={error:t}}finally{try{s&&!s.done&&(n=g.return)&&n.call(g)}finally{if(e)throw e.error}}return r},t.prototype.entries=function(){var t;return r(this,(function(e){switch(e.label){case 0:t=0,e.label=1;case 1:return tthis._fields.length-1||e<0)throw(0,g.newError)("This record has no field with index '"+e+"'. Remember that indexes start at `0`, and make sure your query returns records in the shape you meant it to.");return this._fields[e]},t.prototype.has=function(t){return"number"==typeof t?t>=0&&t0||this.pageCacheHits>0||this.pageCacheHitRatio>0},t}();e.ProfiledPlan=C;e.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 I=function(){function t(t){var e=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(t).forEach((function(n){var r=n.replace(/(-\w)/g,(function(t){return t[1].toUpperCase()}));r in e._stats?e._stats[r]=c(t[n]):"systemUpdates"===r?e._systemUpdates=c(t[n]):"containsSystemUpdates"===r?e._containsSystemUpdates=t[n]:"containsUpdates"===r&&(e._containsUpdates=t[n])})),this._stats=Object.freeze(this._stats)}return t.prototype.containsUpdates=function(){var t=this;return void 0!==this._containsUpdates?this._containsUpdates:Object.keys(this._stats).reduce((function(e,n){return e+t._stats[n]}),0)>0},t.prototype.updates=function(){return this._stats},t.prototype.containsSystemUpdates=function(){return void 0!==this._containsSystemUpdates?this._containsSystemUpdates:this._systemUpdates>0},t.prototype.systemUpdates=function(){return this._systemUpdates},t}();e.QueryStatistics=I;var a=function(){function t(e){this.code=e.code,this.title=e.title,this.description=e.description,this.severity=e.severity,this.position=t._constructPosition(e.position)}return t._constructPosition=function(t){return t?{offset:c(t.offset),line:c(t.line),column:c(t.column)}:{}},t}();e.Notification=a;var u=function(t,e){t&&(this.address=t.address,this.version=t.version,this.agent=t.version),this.protocolVersion=e};function c(t){return t instanceof g.default?t.toInt():"bigint"==typeof t?(0,g.int)(t).toInt():t}function l(t,e,n){return void 0===n&&(n=0),t in e?c(e[t]):n}e.ServerInfo=u,e.queryType={READ_ONLY:"r",READ_WRITE:"rw",WRITE_ONLY:"w",SCHEMA_WRITE:"s"},e.default=s},9675:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(260)),o=n(6457),g=o.connectionHolder.EMPTY_CONNECTION_HOLDER,s=function(t){console.log("Uncaught error when processing result: "+t)},A=function(t){},C=function(){function t(t,e,n,r){var i;this._stack=(i=new Error("")).stack?i.stack.replace(/^Error(\n\r)*/,""):null,this._streamObserverPromise=t,this._p=null,this._query=e,this._parameters=n||{},this._connectionHolder=r||g}return t.prototype.keys=function(){var t=this;return new Promise((function(e,n){t._streamObserverPromise.then((function(t){return t.subscribe({onKeys:function(t){return e(t)},onError:function(t){return n(t)}})})).catch(n)}))},t.prototype.summary=function(){var t=this;return new Promise((function(e,n){t._streamObserverPromise.then((function(r){r.cancel(),r.subscribe({onCompleted:function(r){return t._createSummary(r).then(e,n)},onError:function(t){return n(t)}})})).catch(n)}))},t.prototype._getOrCreatePromise=function(){var t=this;return this._p||(this._p=new Promise((function(e,n){var r=[],i={onNext:function(t){r.push(t)},onCompleted:function(t){e({records:r,summary:t})},onError:function(t){n(t)}};t.subscribe(i)}))),this._p},t.prototype.then=function(t,e){return this._getOrCreatePromise().then(t,e)},t.prototype.catch=function(t){return this._getOrCreatePromise().catch(t)},t.prototype.finally=function(t){return this._getOrCreatePromise().finally(t)},t.prototype.subscribe=function(t){var e=this,n=t.onCompleted||A;t.onCompleted=function(r){e._createSummary(r).then((function(e){return n.call(t,e)}))};var r=t.onError||s;t.onError=function(n){e._connectionHolder.releaseConnection().then((function(){!function(t,e){e&&(t.stack=t.toString()+"\n"+e)}(n,e._stack),r.call(t,n)}))},this._streamObserverPromise.then((function(e){return e.subscribe(t)})).catch((function(e){return t.onError(e)}))},t.prototype._cancel=function(){this._streamObserverPromise.then((function(t){return t.cancel()}))},t.prototype._createSummary=function(t){var e=o.util.validateQueryAndParameters(this._query,this._parameters,{skipAsserts:!0}),n=e.validatedQuery,r=e.params,g=this._connectionHolder;return g.getConnection().then((function(t){return g.releaseConnection().then((function(){return t?t.protocol().version:void 0}))}),(function(t){})).then((function(e){return new i.default(n,r,t,e)}))},t}();Symbol.toStringTag,e.default=C},4777:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function g(t){try{A(r.next(t))}catch(t){o(t)}}function s(t){try{A(r.throw(t))}catch(t){o(t)}}function A(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(g,s)}A((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,o,g={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;g;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return g.label++,{value:o[1],done:!1};case 5:g.label++,r=o[1],o=[0];continue;case 7:o=g.ops.pop(),g.trys.pop();continue;default:if(!((i=(i=g.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){g=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isPoint=e.Point=void 0;var r=n(7400),i="__isPoint__",o=function(){function t(t,e,n,i){this.srid=(0,r.assertNumberOrInteger)(t,"SRID"),this.x=(0,r.assertNumber)(e,"X coordinate"),this.y=(0,r.assertNumber)(n,"Y coordinate"),this.z=null==i?i:(0,r.assertNumber)(i,"Z coordinate"),Object.freeze(this)}return t.prototype.toString=function(){return this.z||0===this.z?"Point{srid="+g(this.srid)+", x="+g(this.x)+", y="+g(this.y)+", z="+g(this.z)+"}":"Point{srid="+g(this.srid)+", x="+g(this.x)+", y="+g(this.y)+"}"},t}();function g(t){return Number.isInteger(t)?t+".0":t.toString()}e.Point=o,Object.defineProperty(o.prototype,i,{value:!0,enumerable:!1,configurable:!1,writable:!1}),e.isPoint=function(t){return!0===(t&&t[i])}},8718:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e},g=this&&this.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),g=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)g.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return g};Object.defineProperty(e,"__esModule",{value:!0}),e.isDateTime=e.DateTime=e.isLocalDateTime=e.LocalDateTime=e.isDate=e.Date=e.isTime=e.Time=e.isLocalTime=e.LocalTime=e.isDuration=e.Duration=void 0;var s=o(n(3355)),A=n(7400),C=n(4949),I=o(n(6720)),a={value:!0,enumerable:!1,configurable:!1,writable:!1},u="__isDuration__",c="__isLocalTime__",l="__isTime__",h="__isDate__",d="__isLocalDateTime__",f="__isDateTime__",p=function(){function t(t,e,n,r){this.months=(0,A.assertNumberOrInteger)(t,"Months"),this.days=(0,A.assertNumberOrInteger)(e,"Days"),(0,A.assertNumberOrInteger)(n,"Seconds"),(0,A.assertNumberOrInteger)(r,"Nanoseconds"),this.seconds=s.normalizeSecondsForDuration(n,r),this.nanoseconds=s.normalizeNanosecondsForDuration(r),Object.freeze(this)}return t.prototype.toString=function(){return s.durationToIsoString(this.months,this.days,this.seconds,this.nanoseconds)},t}();e.Duration=p,Object.defineProperty(p.prototype,u,a),e.isDuration=function(t){return _(t,u)};var v=function(){function t(t,e,n,r){this.hour=s.assertValidHour(t),this.minute=s.assertValidMinute(e),this.second=s.assertValidSecond(n),this.nanosecond=s.assertValidNanosecond(r),Object.freeze(this)}return t.fromStandardDate=function(e,n){E(e,n);var r=s.totalNanoseconds(e,n);return new t(e.getHours(),e.getMinutes(),e.getSeconds(),r instanceof I.default?r.toInt():"bigint"==typeof r?(0,I.int)(r).toInt():r)},t.prototype.toString=function(){return s.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)},t}();e.LocalTime=v,Object.defineProperty(v.prototype,c,a),e.isLocalTime=function(t){return _(t,c)};var y=function(){function t(t,e,n,r,i){this.hour=s.assertValidHour(t),this.minute=s.assertValidMinute(e),this.second=s.assertValidSecond(n),this.nanosecond=s.assertValidNanosecond(r),this.timeZoneOffsetSeconds=(0,A.assertNumberOrInteger)(i,"Time zone offset in seconds"),Object.freeze(this)}return t.fromStandardDate=function(e,n){return E(e,n),new t(e.getHours(),e.getMinutes(),e.getSeconds(),(0,I.toNumber)(s.totalNanoseconds(e,n)),s.timeZoneOffsetInSeconds(e))},t.prototype.toString=function(){return s.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)+s.timeZoneOffsetToIsoString(this.timeZoneOffsetSeconds)},t}();e.Time=y,Object.defineProperty(y.prototype,l,a),e.isTime=function(t){return _(t,l)};var b=function(){function t(t,e,n){this.year=s.assertValidYear(t),this.month=s.assertValidMonth(e),this.day=s.assertValidDay(n),Object.freeze(this)}return t.fromStandardDate=function(e){return E(e),new t(e.getFullYear(),e.getMonth()+1,e.getDate())},t.prototype.toString=function(){return s.dateToIsoString(this.year,this.month,this.day)},t}();e.Date=b,Object.defineProperty(b.prototype,h,a),e.isDate=function(t){return _(t,h)};var m=function(){function t(t,e,n,r,i,o,g){this.year=s.assertValidYear(t),this.month=s.assertValidMonth(e),this.day=s.assertValidDay(n),this.hour=s.assertValidHour(r),this.minute=s.assertValidMinute(i),this.second=s.assertValidSecond(o),this.nanosecond=s.assertValidNanosecond(g),Object.freeze(this)}return t.fromStandardDate=function(e,n){return E(e,n),new t(e.getFullYear(),e.getMonth()+1,e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),(0,I.toNumber)(s.totalNanoseconds(e,n)))},t.prototype.toString=function(){return x(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)},t}();e.LocalDateTime=m,Object.defineProperty(m.prototype,d,a),e.isLocalDateTime=function(t){return _(t,d)};var w=function(){function t(t,e,n,r,i,o,I,a,u){this.year=s.assertValidYear(t),this.month=s.assertValidMonth(e),this.day=s.assertValidDay(n),this.hour=s.assertValidHour(r),this.minute=s.assertValidMinute(i),this.second=s.assertValidSecond(o),this.nanosecond=s.assertValidNanosecond(I);var c=g(function(t,e){var n=t||0===t,r=e&&""!==e;if(!n&&!r)throw(0,C.newError)("Unable to create DateTime without either time zone offset or id. Please specify either of them. Given offset: "+t+" and id: "+e);var i=[void 0,void 0];return n&&((0,A.assertNumberOrInteger)(t,"Time zone offset in seconds"),i[0]=t),r&&((0,A.assertString)(e,"Time zone ID"),s.assertValidZoneId("Time zone ID",e),i[1]=e),i}(a,u),2),l=c[0],h=c[1];this.timeZoneOffsetSeconds=l,this.timeZoneId=h||void 0,Object.freeze(this)}return t.fromStandardDate=function(e,n){return E(e,n),new t(e.getFullYear(),e.getMonth()+1,e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),(0,I.toNumber)(s.totalNanoseconds(e,n)),s.timeZoneOffsetInSeconds(e),null)},t.prototype.toString=function(){return x(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)+(this.timeZoneId?"["+this.timeZoneId+"]":s.timeZoneOffsetToIsoString(this.timeZoneOffsetSeconds||0))},t}();function _(t,e){return!0===(t&&t[e])}function x(t,e,n,r,i,o,g){return s.dateToIsoString(t,e,n)+"T"+s.timeToIsoString(r,i,o,g)}function E(t,e){(0,A.assertValidDate)(t,"Standard date"),null!=e&&(0,A.assertNumberOrInteger)(e,"Nanosecond")}e.DateTime=w,Object.defineProperty(w.prototype,f,a),e.isDateTime=function(t){return _(t,f)}},7561:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function g(t){try{A(r.next(t))}catch(t){o(t)}}function s(t){try{A(r.throw(t))}catch(t){o(t)}}function A(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(g,s)}A((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,o,g={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;g;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return g.label++,{value:o[1],done:!1};case 5:g.label++,r=o[1],o=[0];continue;case 7:o=g.ops.pop(),g.trys.pop();continue;default:if(!((i=(i=g.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){g=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},6083:(t,e,n)=>{"use strict";var r=n(4836);Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.WRITE=e.READ=e.Driver=void 0;var i=r(n(6690)),o=r(n(9728)),g=r(n(1655)),s=r(n(4993)),A=r(n(3808)),C=n(758),I=r(n(5735));var a=C.internal.constants.FETCH_ALL,u=C.driver.READ,c=C.driver.WRITE;e.WRITE=c,e.READ=u;var l=function(t){(0,g.default)(C,t);var e,n,r=(e=C,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=(0,A.default)(e);if(n){var i=(0,A.default)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,s.default)(this,t)});function C(){return(0,i.default)(this,C),r.apply(this,arguments)}return(0,o.default)(C,[{key:"rxSession",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.defaultAccessMode,n=void 0===e?c:e,r=t.bookmarks,i=t.database,o=void 0===i?"":i,g=t.fetchSize,s=t.impersonatedUser;return new I.default({session:this._newSession({defaultAccessMode:n,bookmarkOrBookmarks:r,database:o,impersonatedUser:s,reactive:!0,fetchSize:h(g,this._config.fetchSize)}),config:this._config})}}]),C}(C.Driver);function h(t,e){var n=parseInt(t,10);if(n>0||n===a)return n;if(0===n||n<0)throw new Error("The fetch size can only be a positive value or ".concat(a," for ALL. However fetchSize = ").concat(n));return e}e.Driver=l;var d=l;e.default=d},7499:(t,e,n)=>{"use strict";var r=n(4836);e.ZP=void 0;var i=n(6083),o=r(n(8289)),g=n(758),s=n(297),A=r(n(5735)),C=r(n(9323)),I=r(n(804)),a=g.internal.util,u=a.ENCRYPTION_ON,c=(a.ENCRYPTION_OFF,a.assertString),l=a.isEmptyObjectOrNull,h=g.internal.serverAddress.ServerAddress,d=g.internal.urlUtil;var f="neo4j-javascript/"+o.default,p={console:function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(t){return{level:t,logger:function(t,e){return console.log("".concat(n.g.Date.now()," ").concat(t.toUpperCase()," ").concat(e))}}}))},v={Node:g.Node,Relationship:g.Relationship,UnboundRelationship:g.UnboundRelationship,PathSegment:g.PathSegment,Path:g.Path,Result:g.Result,ResultSummary:g.ResultSummary,Record:g.Record,Point:g.Point,Date:g.Date,DateTime:g.DateTime,Duration:g.Duration,LocalDateTime:g.LocalDateTime,LocalTime:g.LocalTime,Time:g.Time,Integer:g.Integer},y={READ:i.READ,WRITE:i.WRITE},b={toNumber:g.toNumber,toString:g.toString,inSafeRange:g.inSafeRange},m={isPoint:g.isPoint},w={isDuration:g.isDuration,isLocalTime:g.isLocalTime,isTime:g.isTime,isDate:g.isDate,isLocalDateTime:g.isLocalDateTime,isDateTime:g.isDateTime},_={driver:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};c(t,"Bolt URL");var r,o=d.parseDatabaseUrl(t),g=!1,A=!1;switch(o.scheme){case"bolt":break;case"bolt+s":A=!0,r="TRUST_SYSTEM_CA_SIGNED_CERTIFICATES";break;case"bolt+ssc":A=!0,r="TRUST_ALL_CERTIFICATES";break;case"neo4j":g=!0;break;case"neo4j+s":A=!0,r="TRUST_SYSTEM_CA_SIGNED_CERTIFICATES",g=!0;break;case"neo4j+ssc":A=!0,r="TRUST_ALL_CERTIFICATES",g=!0;break;default:throw new Error("Unknown scheme: ".concat(o.scheme))}if(A){if("encrypted"in n||"trust"in n)throw new Error("Encryption/trust can only be configured either through URL or config, not both");n.encrypted=u,n.trust=r}(e=e||{}).scheme=e.scheme||"none",n.userAgent=n.userAgent||f;var C=h.fromUrl(o.hostAndPort),I={address:C,typename:g?"Routing":"Direct",routing:g};return new i.Driver(I,n,function(){if(g)return function(t,n,r,i){return new s.RoutingConnectionProvider({id:t,config:n,log:r,hostNameResolver:i,authToken:e,address:C,userAgent:n.userAgent,routingContext:o.query})};if(!l(o.query))throw new Error("Parameters are not supported with none routed scheme. Given URL: '".concat(t,"'"));return function(t,n,r){return new s.DirectConnectionProvider({id:t,config:n,log:r,authToken:e,address:C,userAgent:n.userAgent})}}())},int:g.int,isInt:g.isInt,isPoint:g.isPoint,isDuration:g.isDuration,isLocalTime:g.isLocalTime,isTime:g.isTime,isDate:g.isDate,isLocalDateTime:g.isLocalDateTime,isDateTime:g.isDateTime,integer:b,Neo4jError:g.Neo4jError,auth:g.auth,logging:p,types:v,session:y,error:g.error,spatial:m,temporal:w,Driver:i.Driver,Session:g.Session,Transaction:g.Transaction,Result:g.Result,RxSession:A.default,RxTransaction:C.default,RxResult:I.default,ResultSummary:g.ResultSummary,Plan:g.Plan,ProfiledPlan:g.ProfiledPlan,QueryStatistics:g.QueryStatistics,Notification:g.Notification,ServerInfo:g.ServerInfo,Record:g.Record,Node:g.Node,Relationship:g.Relationship,UnboundRelationship:g.UnboundRelationship,Path:g.Path,PathSegment:g.PathSegment,Point:g.Point,Integer:g.Integer,Duration:g.Duration,LocalTime:g.LocalTime,Time:g.Time,Date:g.Date,LocalDateTime:g.LocalDateTime,DateTime:g.DateTime};e.ZP=_},2915:(t,e,n)=>{"use strict";var r=n(4836);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(6690)),o=r(n(9728)),g=n(758),s=n(4143),A=n(1717),C=(g.internal.logger.Logger,g.internal.retryStrategy.canRetryOn),I=g.error.SERVICE_UNAVAILABLE,a=(g.error.SESSION_EXPIRED,function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.maxRetryTimeout,r=void 0===n?3e4:n,o=e.initialDelay,g=void 0===o?1e3:o,s=e.delayMultiplier,A=void 0===s?2:s,C=e.delayJitter,I=void 0===C?.2:C,a=e.logger,c=void 0===a?null:a;(0,i.default)(this,t),this._maxRetryTimeout=u(r,3e4),this._initialDelay=u(g,1e3),this._delayMultiplier=u(A,2),this._delayJitter=u(I,.2),this._logger=c}return(0,o.default)(t,[{key:"retry",value:function(t){var e=this;return t.pipe((0,A.retryWhen)((function(t){var n=[],r=Date.now(),i=1,o=e._initialDelay;return t.pipe((0,A.flatMap)((function(t){if(!C(t))return(0,s.throwError)(t);if(n.push(t),i>=2&&Date.now()-r>=e._maxRetryTimeout){var a=(0,g.newError)("Failed after retried for ".concat(i," times in ").concat(e._maxRetryTimeout," ms. Make sure that your database is online and retry again."),I);return a.seenErrors=n,(0,s.throwError)(a)}var u=e._computeNextDelay(o);return o*=e._delayMultiplier,i++,e._logger&&e._logger.warn("Transaction failed and will be retried in ".concat(u)),(0,s.of)(1).pipe((0,A.delay)(u))})))})))}},{key:"_computeNextDelay",value:function(t){var e=t*this._delayJitter;return t-e+2*e*Math.random()}}]),t}());function u(t,e){return t||0===t?t:e}e.default=a},804:(t,e,n)=>{"use strict";var r=n(4836);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(6690)),o=r(n(9728)),g=n(758),s=n(4143),A=n(1717),C=function(){function t(e){(0,i.default)(this,t);var n=e.pipe((0,A.publishReplay)(1),(0,A.refCount)());this._result=n,this._keys=n.pipe((0,A.flatMap)((function(t){return(0,s.from)(t.keys())})),(0,A.publishReplay)(1),(0,A.refCount)()),this._records=new s.Subject,this._summary=new s.ReplaySubject,this._state=0}return(0,o.default)(t,[{key:"keys",value:function(){return this._keys}},{key:"records",value:function(){var t=this;return this._result.pipe((0,A.flatMap)((function(e){return new s.Observable((function(n){return t._startStreaming({result:e,recordsObserver:n})}))})))}},{key:"consume",value:function(){var t=this;return this._result.pipe((0,A.flatMap)((function(e){return new s.Observable((function(n){return t._startStreaming({result:e,summaryObserver:n})}))})))}},{key:"_startStreaming",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.result,r=e.recordsObserver,i=void 0===r?null:r,o=e.summaryObserver,s=void 0===o?null:o,A=[];return s&&A.push(this._summary.subscribe(s)),this._state<1?(this._state=1,i&&A.push(this._records.subscribe(i)),A.push({unsubscribe:function(){n._cancel&&n._cancel()}}),0===this._records.observers.length&&n._cancel(),n.subscribe({onNext:function(e){t._records.next(e)},onCompleted:function(e){t._records.complete(),t._summary.next(e),t._summary.complete(),t._state=2},onError:function(e){t._records.error(e),t._summary.error(e),t._state=2}})):i&&i.error((0,g.newError)("Streaming has already started/consumed with a previous records or summary subscription.")),function(){A.forEach((function(t){return t.unsubscribe()}))}}}]),t}();e.default=C},5735:(t,e,n)=>{"use strict";var r=n(4836);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(6690)),o=r(n(9728)),g=n(4143),s=n(1717),A=r(n(804)),C=n(758),I=r(n(9323)),a=r(n(2915)),u=C.internal.constants,c=u.ACCESS_MODE_READ,l=u.ACCESS_MODE_WRITE,h=C.internal.txConfig.TxConfig,d=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.session,r=e.config;(0,i.default)(this,t),this._session=n,this._retryLogic=function(t){var e=t&&t.maxTransactionRetryTime?t.maxTransactionRetryTime:null;return new a.default({maxRetryTimeout:e})}(r)}return(0,o.default)(t,[{key:"run",value:function(t,e,n){var r=this;return new A.default(new g.Observable((function(i){try{i.next(r._session.run(t,e,n)),i.complete()}catch(t){i.error(t)}return function(){}})))}},{key:"beginTransaction",value:function(t){return this._beginTransaction(this._session._mode,t)}},{key:"readTransaction",value:function(t,e){return this._runTransaction(c,t,e)}},{key:"writeTransaction",value:function(t,e){return this._runTransaction(l,t,e)}},{key:"close",value:function(){var t=this;return new g.Observable((function(e){t._session.close().then((function(){e.complete()})).catch((function(t){return e.error(t)}))}))}},{key:"lastBookmark",value:function(){return this._session.lastBookmark()}},{key:"_beginTransaction",value:function(t,e){var n=this,r=h.empty();return e&&(r=new h(e)),new g.Observable((function(e){try{e.next(new I.default(n._session._beginTransaction(t,r))),e.complete()}catch(t){e.error(t)}return function(){}}))}},{key:"_runTransaction",value:function(t,e,n){return h.empty(),n&&new h(n),this._retryLogic.retry(this._beginTransaction(t,n).pipe((0,s.flatMap)((function(t){return(0,g.defer)((function(){try{return e(t)}catch(t){return(0,g.throwError)(t)}})).pipe((0,s.catchError)((function(e){return t.rollback().pipe((0,s.concat)((0,g.throwError)(e)))})),(0,s.concat)(t.commit()))}))))}}]),t}();e.default=d},9323:(t,e,n)=>{"use strict";var r=n(4836);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(6690)),o=r(n(9728)),g=n(4143),s=r(n(804)),A=(r(n(758)),function(){function t(e){(0,i.default)(this,t),this._txc=e}return(0,o.default)(t,[{key:"run",value:function(t,e){var n=this;return new s.default(new g.Observable((function(r){try{r.next(n._txc.run(t,e)),r.complete()}catch(t){r.error(t)}return function(){}})))}},{key:"commit",value:function(){var t=this;return new g.Observable((function(e){t._txc.commit().then((function(){e.complete()})).catch((function(t){return e.error(t)}))}))}},{key:"rollback",value:function(){var t=this;return new g.Observable((function(e){t._txc.rollback().then((function(){e.complete()})).catch((function(t){return e.error(t)}))}))}},{key:"close",value:function(){var t=this;return new g.Observable((function(e){t._txc.close().then((function(){e.complete()})).catch((function(t){return e.error(t)}))}))}}]),t}());e.default=A},8289:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default="4.4.10"},4143:(t,e,n)=>{"use strict";n.r(e),n.d(e,{ArgumentOutOfRangeError:()=>S.W,AsyncSubject:()=>I.c,BehaviorSubject:()=>A.X,ConnectableObservable:()=>i.c,EMPTY:()=>Q.E,EmptyError:()=>P.K,GroupedObservable:()=>o.T,NEVER:()=>at,Notification:()=>x.P,NotificationKind:()=>x.W,ObjectUnsubscribedError:()=>N.N,Observable:()=>r.y,ReplaySubject:()=>C.t,Scheduler:()=>m.b,Subject:()=>s.xQ,Subscriber:()=>_.L,Subscription:()=>w.w,TimeoutError:()=>D.W,UnsubscriptionError:()=>R.B,VirtualAction:()=>b,VirtualTimeScheduler:()=>y,animationFrame:()=>v,animationFrameScheduler:()=>p,asap:()=>a.e,asapScheduler:()=>a.E,async:()=>u.P,asyncScheduler:()=>u.z,bindCallback:()=>F,bindNodeCallback:()=>U,combineLatest:()=>Y.aj,concat:()=>H.z,config:()=>Tt.v,defer:()=>K.P,empty:()=>Q.c,forkJoin:()=>J,from:()=>q.D,fromEvent:()=>et,fromEventPattern:()=>rt,generate:()=>it,identity:()=>k.y,iif:()=>gt,interval:()=>At,isObservable:()=>T,merge:()=>It.T,never:()=>ut,noop:()=>O.Z,observable:()=>g.L,of:()=>ct.of,onErrorResumeNext:()=>lt,pairs:()=>ht,partition:()=>yt,pipe:()=>E.z,queue:()=>c.c,queueScheduler:()=>c.N,race:()=>bt.S3,range:()=>mt,scheduled:()=>kt.x,throwError:()=>_t._,timer:()=>xt.H,using:()=>Et,zip:()=>Ot.$R});var r=n(2772),i=n(3140),o=n(1120),g=n(5050),s=n(211),A=n(9233),C=n(2630),I=n(364),a=n(6650),u=n(964),c=n(2546),l=n(655),h=n(6114),d=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return l.ZT(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e.scheduled||(e.scheduled=requestAnimationFrame((function(){return e.flush(null)}))))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);0===e.actions.length&&(cancelAnimationFrame(n),e.scheduled=void 0)},e}(h.o),f=n(8399),p=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l.ZT(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,r=-1,i=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++re.index?1:-1:t.delay>e.delay?1:-1},e}(h.o),m=n(8725),w=n(8760),_=n(979),x=n(2632),E=n(2561),O=n(3306),k=n(3608);function T(t){return!!t&&(t instanceof r.y||"function"==typeof t.lift&&"function"==typeof t.subscribe)}var S=n(6565),P=n(6929),N=n(1016),R=n(8782),D=n(1462),M=n(5709),j=n(3642),B=n(9026),L=n(7507);function F(t,e,n){if(e){if(!(0,L.K)(e))return function(){for(var r=[],i=0;i1?r.next(Array.prototype.slice.call(arguments)):r.next(t)}),r,n)}))}function nt(t,e,n,r,i){var o;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(t)){var g=t;t.addEventListener(e,n,i),o=function(){return g.removeEventListener(e,n,i)}}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(t)){var s=t;t.on(e,n),o=function(){return s.off(e,n)}}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(t)){var A=t;t.addListener(e,n),o=function(){return A.removeListener(e,n)}}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(var C=0,I=t.length;C=e){r.complete();break}if(r.next(o++),r.closed)break}}))}function wt(t){var e=t.start,n=t.index,r=t.count,i=t.subscriber;n>=r?i.complete():(i.next(e),i.closed||(t.index=n+1,t.start=e+1,this.schedule(t)))}var _t=n(4944),xt=n(9604);function Et(t,e){return new r.y((function(n){var r,i;try{r=t()}catch(t){return void n.error(t)}try{i=e(r)}catch(t){return void n.error(t)}var o=(i?(0,q.D)(i):Q.E).subscribe(n);return function(){o.unsubscribe(),r&&r.unsubscribe()}}))}var Ot=n(5080),kt=n(8107),Tt=n(150)},364:(t,e,n)=>{"use strict";n.d(e,{c:()=>g});var r=n(655),i=n(211),o=n(8760),g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.value=null,e.hasNext=!1,e.hasCompleted=!1,e}return r.ZT(e,t),e.prototype._subscribe=function(e){return this.hasError?(e.error(this.thrownError),o.w.EMPTY):this.hasCompleted&&this.hasNext?(e.next(this.value),e.complete(),o.w.EMPTY):t.prototype._subscribe.call(this,e)},e.prototype.next=function(t){this.hasCompleted||(this.value=t,this.hasNext=!0)},e.prototype.error=function(e){this.hasCompleted||t.prototype.error.call(this,e)},e.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&t.prototype.next.call(this,this.value),t.prototype.complete.call(this)},e}(i.xQ)},9233:(t,e,n)=>{"use strict";n.d(e,{X:()=>g});var r=n(655),i=n(211),o=n(1016),g=function(t){function e(e){var n=t.call(this)||this;return n._value=e,n}return r.ZT(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),e.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return n&&!n.closed&&e.next(this._value),n},e.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new o.N;return this._value},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},e}(i.xQ)},2632:(t,e,n)=>{"use strict";n.d(e,{P:()=>s,W:()=>r});var r,i=n(5631),o=n(8170),g=n(4944);r||(r={});var s=function(){function t(t,e,n){this.kind=t,this.value=e,this.error=n,this.hasValue="N"===t}return t.prototype.observe=function(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}},t.prototype.do=function(t,e,n){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return n&&n()}},t.prototype.accept=function(t,e,n){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,n)},t.prototype.toObservable=function(){switch(this.kind){case"N":return(0,o.of)(this.value);case"E":return(0,g._)(this.error);case"C":return(0,i.c)()}throw new Error("unexpected notification kind value")},t.createNext=function(e){return void 0!==e?new t("N",e):t.undefinedValueNotification},t.createError=function(e){return new t("E",void 0,e)},t.createComplete=function(){return t.completeNotification},t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t}()},2772:(t,e,n)=>{"use strict";n.d(e,{y:()=>I});var r=n(3642),i=n(979),o=n(3142),g=n(2174),s=n(5050),A=n(2561),C=n(150),I=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r=this.operator,s=function(t,e,n){if(t){if(t instanceof i.L)return t;if(t[o.b])return t[o.b]()}return t||e||n?new i.L(t,e,n):new i.L(g.c)}(t,e,n);if(r?s.add(r.call(s,this.source)):s.add(this.source||C.v.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),C.v.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){C.v.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),(0,r._)(t)?t.error(e):console.warn(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=a(e))((function(e,r){var i;i=n.subscribe((function(e){try{t(e)}catch(t){r(t),i&&i.unsubscribe()}}),r,e)}))},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[s.L]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e{"use strict";n.d(e,{c:()=>o});var r=n(150),i=n(1644),o={closed:!0,next:function(t){},error:function(t){if(r.v.useDeprecatedSynchronousErrorHandling)throw t;(0,i.z)(t)},complete:function(){}}},2039:(t,e,n)=>{"use strict";n.d(e,{L:()=>i});var r=n(655),i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.ZT(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.destination.next(e)},e.prototype.notifyError=function(t,e){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.complete()},e}(n(979).L)},2630:(t,e,n)=>{"use strict";n.d(e,{t:()=>I});var r=n(655),i=n(211),o=n(2546),g=n(8760),s=n(9276),A=n(1016),C=n(8253),I=function(t){function e(e,n,r){void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===n&&(n=Number.POSITIVE_INFINITY);var i=t.call(this)||this;return i.scheduler=r,i._events=[],i._infiniteTimeWindow=!1,i._bufferSize=e<1?1:e,i._windowTime=n<1?1:n,n===Number.POSITIVE_INFINITY?(i._infiniteTimeWindow=!0,i.next=i.nextInfiniteTimeWindow):i.next=i.nextTimeWindow,i}return r.ZT(e,t),e.prototype.nextInfiniteTimeWindow=function(e){if(!this.isStopped){var n=this._events;n.push(e),n.length>this._bufferSize&&n.shift()}t.prototype.next.call(this,e)},e.prototype.nextTimeWindow=function(e){this.isStopped||(this._events.push(new a(this._getNow(),e)),this._trimBufferThenGetEvents()),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){var e,n=this._infiniteTimeWindow,r=n?this._events:this._trimBufferThenGetEvents(),i=this.scheduler,o=r.length;if(this.closed)throw new A.N;if(this.isStopped||this.hasError?e=g.w.EMPTY:(this.observers.push(t),e=new C.W(this,t)),i&&t.add(t=new s.ht(t,i)),n)for(var I=0;Ie&&(o=Math.max(o,i-e)),o>0&&r.splice(0,o),r},e}(i.xQ),a=function(){return function(t,e){this.time=t,this.value=e}}()},8725:(t,e,n)=>{"use strict";n.d(e,{b:()=>r});var r=function(){function t(e,n){void 0===n&&(n=t.now),this.SchedulerAction=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(n,e)},t.now=function(){return Date.now()},t}()},211:(t,e,n)=>{"use strict";n.d(e,{Yc:()=>I,xQ:()=>a});var r=n(655),i=n(2772),o=n(979),g=n(8760),s=n(1016),A=n(8253),C=n(3142),I=function(t){function e(e){var n=t.call(this,e)||this;return n.destination=e,n}return r.ZT(e,t),e}(o.L),a=function(t){function e(){var e=t.call(this)||this;return e.observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return r.ZT(e,t),e.prototype[C.b]=function(){return new I(this)},e.prototype.lift=function(t){var e=new u(this,this);return e.operator=t,e},e.prototype.next=function(t){if(this.closed)throw new s.N;if(!this.isStopped)for(var e=this.observers,n=e.length,r=e.slice(),i=0;i{"use strict";n.d(e,{W:()=>i});var r=n(655),i=function(t){function e(e,n){var r=t.call(this)||this;return r.subject=e,r.subscriber=n,r.closed=!1,r}return r.ZT(e,t),e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}},e}(n(8760).w)},979:(t,e,n)=>{"use strict";n.d(e,{L:()=>I});var r=n(655),i=n(4156),o=n(2174),g=n(8760),s=n(3142),A=n(150),C=n(1644),I=function(t){function e(n,r,i){var g=t.call(this)||this;switch(g.syncErrorValue=null,g.syncErrorThrown=!1,g.syncErrorThrowable=!1,g.isStopped=!1,arguments.length){case 0:g.destination=o.c;break;case 1:if(!n){g.destination=o.c;break}if("object"==typeof n){n instanceof e?(g.syncErrorThrowable=n.syncErrorThrowable,g.destination=n,n.add(g)):(g.syncErrorThrowable=!0,g.destination=new a(g,n));break}default:g.syncErrorThrowable=!0,g.destination=new a(g,n,r,i)}return g}return r.ZT(e,t),e.prototype[s.b]=function(){return this},e.create=function(t,n,r){var i=new e(t,n,r);return i.syncErrorThrowable=!1,i},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this},e}(g.w),a=function(t){function e(e,n,r,g){var s,A=t.call(this)||this;A._parentSubscriber=e;var C=A;return(0,i.m)(n)?s=n:n&&(s=n.next,r=n.error,g=n.complete,n!==o.c&&(C=Object.create(n),(0,i.m)(C.unsubscribe)&&A.add(C.unsubscribe.bind(C)),C.unsubscribe=A.unsubscribe.bind(A))),A._context=C,A._next=s,A._error=r,A._complete=g,A}return r.ZT(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;A.v.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber,n=A.v.useDeprecatedSynchronousErrorHandling;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):(0,C.z)(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;(0,C.z)(t)}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};A.v.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){if(this.unsubscribe(),A.v.useDeprecatedSynchronousErrorHandling)throw t;(0,C.z)(t)}},e.prototype.__tryOrSetError=function(t,e,n){if(!A.v.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(e){return A.v.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=e,t.syncErrorThrown=!0,!0):((0,C.z)(e),!0)}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(I)},8760:(t,e,n)=>{"use strict";n.d(e,{w:()=>s});var r=n(9026),i=n(2009),o=n(4156),g=n(8782),s=function(){function t(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)}var e;return t.prototype.unsubscribe=function(){var e;if(!this.closed){var n=this,s=n._parentOrParents,C=n._ctorUnsubscribe,I=n._unsubscribe,a=n._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,s instanceof t)s.remove(this);else if(null!==s)for(var u=0;u{"use strict";n.d(e,{v:()=>i});var r=!1,i={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){t&&(new Error).stack,r=t},get useDeprecatedSynchronousErrorHandling(){return r}}},7604:(t,e,n)=>{"use strict";n.d(e,{Ds:()=>A,IY:()=>s,ft:()=>C});var r=n(655),i=n(979),o=n(2772),g=n(7843),s=function(t){function e(e){var n=t.call(this)||this;return n.parent=e,n}return r.ZT(e,t),e.prototype._next=function(t){this.parent.notifyNext(t)},e.prototype._error=function(t){this.parent.notifyError(t),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(),this.unsubscribe()},e}(i.L),A=(i.L,function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.ZT(e,t),e.prototype.notifyNext=function(t){this.destination.next(t)},e.prototype.notifyError=function(t){this.destination.error(t)},e.prototype.notifyComplete=function(){this.destination.complete()},e}(i.L));function C(t,e){if(!e.closed){if(t instanceof o.y)return t.subscribe(e);var n;try{n=(0,g.s)(t)(e)}catch(t){e.error(t)}return n}}i.L},3140:(t,e,n)=>{"use strict";n.d(e,{N:()=>I,c:()=>C});var r=n(655),i=n(211),o=n(2772),g=n(979),s=n(8760),A=n(3018),C=function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subjectFactory=n,r._refCount=0,r._isComplete=!1,r}return r.ZT(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new s.w).add(this.source.subscribe(new a(this.getSubject(),this))),t.closed&&(this._connection=null,t=s.w.EMPTY)),t},e.prototype.refCount=function(){return(0,A.x)()(this)},e}(o.y),I=function(){var t=C.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}}(),a=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return r.ZT(e,t),e.prototype._error=function(e){this._unsubscribe(),t.prototype._error.call(this,e)},e.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}},e}(i.Yc);g.L},5142:(t,e,n)=>{"use strict";n.d(e,{Ms:()=>a,aj:()=>I});var r=n(655),i=n(7507),o=n(9026),g=n(2039),s=n(2080),A=n(3375),C={};function I(){for(var t=[],e=0;e{"use strict";n.d(e,{z:()=>o});var r=n(8170),i=n(2257);function o(){for(var t=[],e=0;e{"use strict";n.d(e,{P:()=>g});var r=n(2772),i=n(5760),o=n(5631);function g(t){return new r.y((function(e){var n;try{n=t()}catch(t){return void e.error(t)}return(n?(0,i.D)(n):(0,o.c)()).subscribe(e)}))}},5631:(t,e,n)=>{"use strict";n.d(e,{E:()=>i,c:()=>o});var r=n(2772),i=new r.y((function(t){return t.complete()}));function o(t){return t?function(t){return new r.y((function(e){return t.schedule((function(){return e.complete()}))}))}(t):i}},5760:(t,e,n)=>{"use strict";n.d(e,{D:()=>g});var r=n(2772),i=n(7843),o=n(8107);function g(t,e){return e?(0,o.x)(t,e):t instanceof r.y?t:new r.y((0,i.s)(t))}},3375:(t,e,n)=>{"use strict";n.d(e,{n:()=>g});var r=n(2772),i=n(6900),o=n(3109);function g(t,e){return e?(0,o.r)(t,e):new r.y((0,i.V)(t))}},4370:(t,e,n)=>{"use strict";n.d(e,{T:()=>s});var r=n(2772),i=n(7507),o=n(2556),g=n(3375);function s(){for(var t=[],e=0;e1&&"number"==typeof t[t.length-1]&&(n=t.pop())):"number"==typeof A&&(n=t.pop()),null===s&&1===t.length&&t[0]instanceof r.y?t[0]:(0,o.J)(n)((0,g.n)(t,s))}},8170:(t,e,n)=>{"use strict";n.d(e,{of:()=>g});var r=n(7507),i=n(3375),o=n(3109);function g(){for(var t=[],e=0;e{"use strict";n.d(e,{S3:()=>A});var r=n(655),i=n(9026),o=n(3375),g=n(2039),s=n(2080);function A(){for(var t=[],e=0;e{"use strict";n.d(e,{_:()=>i});var r=n(2772);function i(t,e){return e?new r.y((function(n){return e.schedule(o,0,{error:t,subscriber:n})})):new r.y((function(e){return e.error(t)}))}function o(t){var e=t.error;t.subscriber.error(e)}},9604:(t,e,n)=>{"use strict";n.d(e,{H:()=>s});var r=n(2772),i=n(964),o=n(5812),g=n(7507);function s(t,e,n){void 0===t&&(t=0);var s=-1;return(0,o.k)(e)?s=Number(e)<1?1:Number(e):(0,g.K)(e)&&(n=e),(0,g.K)(n)||(n=i.P),new r.y((function(e){var r=(0,o.k)(t)?t:+t-n.now();return n.schedule(A,r,{index:0,period:s,subscriber:e})}))}function A(t){var e=t.index,n=t.period,r=t.subscriber;if(r.next(e),!r.closed){if(-1===n)return r.complete();t.index=e+1,this.schedule(t,n)}}},5080:(t,e,n)=>{"use strict";n.d(e,{$R:()=>C,mx:()=>I});var r=n(655),i=n(3375),o=n(9026),g=n(979),s=n(999),A=n(7604);function C(){for(var t=[],e=0;ethis.index},t.prototype.hasCompleted=function(){return this.array.length===this.index},t}(),l=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.parent=n,i.observable=r,i.stillUnsubscribed=!0,i.buffer=[],i.isComplete=!1,i}return r.ZT(e,t),e.prototype[s.hZ]=function(){return this},e.prototype.next=function(){var t=this.buffer;return 0===t.length&&this.isComplete?{value:null,done:!0}:{value:t.shift(),done:!1}},e.prototype.hasValue=function(){return this.buffer.length>0},e.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},e.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},e.prototype.notifyNext=function(t){this.buffer.push(t),this.parent.checkIterators()},e.prototype.subscribe=function(){return(0,A.ft)(this.observable,new A.IY(this))},e}(A.Ds)},2257:(t,e,n)=>{"use strict";n.d(e,{u:()=>i});var r=n(2556);function i(){return(0,r.J)(1)}},6008:(t,e,n)=>{"use strict";n.d(e,{h:()=>o});var r=n(655),i=n(979);function o(t,e){return function(n){return n.lift(new g(t,e))}}var g=function(){function t(t,e){this.predicate=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.predicate,this.thisArg))},t}(),s=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.predicate=n,i.thisArg=r,i.count=0,i}return r.ZT(e,t),e.prototype._next=function(t){var e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}e&&this.destination.next(t)},e}(i.L)},1120:(t,e,n)=>{"use strict";n.d(e,{T:()=>u,v:()=>A});var r=n(655),i=n(979),o=n(8760),g=n(2772),s=n(211);function A(t,e,n,r){return function(i){return i.lift(new C(t,e,n,r))}}var C=function(){function t(t,e,n,r){this.keySelector=t,this.elementSelector=e,this.durationSelector=n,this.subjectSelector=r}return t.prototype.call=function(t,e){return e.subscribe(new I(t,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},t}(),I=function(t){function e(e,n,r,i,o){var g=t.call(this,e)||this;return g.keySelector=n,g.elementSelector=r,g.durationSelector=i,g.subjectSelector=o,g.groups=null,g.attemptedToUnsubscribe=!1,g.count=0,g}return r.ZT(e,t),e.prototype._next=function(t){var e;try{e=this.keySelector(t)}catch(t){return void this.error(t)}this._group(t,e)},e.prototype._group=function(t,e){var n=this.groups;n||(n=this.groups=new Map);var r,i=n.get(e);if(this.elementSelector)try{r=this.elementSelector(t)}catch(t){this.error(t)}else r=t;if(!i){i=this.subjectSelector?this.subjectSelector():new s.xQ,n.set(e,i);var o=new u(e,i,this);if(this.destination.next(o),this.durationSelector){var g=void 0;try{g=this.durationSelector(new u(e,i))}catch(t){return void this.error(t)}this.add(g.subscribe(new a(e,i,this)))}}i.closed||i.next(r)},e.prototype._error=function(t){var e=this.groups;e&&(e.forEach((function(e,n){e.error(t)})),e.clear()),this.destination.error(t)},e.prototype._complete=function(){var t=this.groups;t&&(t.forEach((function(t,e){t.complete()})),t.clear()),this.destination.complete()},e.prototype.removeGroup=function(t){this.groups.delete(t)},e.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&t.prototype.unsubscribe.call(this))},e}(i.L),a=function(t){function e(e,n,r){var i=t.call(this,n)||this;return i.key=e,i.group=n,i.parent=r,i}return r.ZT(e,t),e.prototype._next=function(t){this.complete()},e.prototype._unsubscribe=function(){var t=this.parent,e=this.key;this.key=this.parent=null,t&&t.removeGroup(e)},e}(i.L),u=function(t){function e(e,n,r){var i=t.call(this)||this;return i.key=e,i.groupSubject=n,i.refCountSubscription=r,i}return r.ZT(e,t),e.prototype._subscribe=function(t){var e=new o.w,n=this.refCountSubscription,r=this.groupSubject;return n&&!n.closed&&e.add(new c(n)),e.add(r.subscribe(t)),e},e}(g.y),c=function(t){function e(e){var n=t.call(this)||this;return n.parent=e,e.count++,n}return r.ZT(e,t),e.prototype.unsubscribe=function(){var e=this.parent;e.closed||this.closed||(t.prototype.unsubscribe.call(this),e.count-=1,0===e.count&&e.attemptedToUnsubscribe&&e.unsubscribe())},e}(o.w)},5709:(t,e,n)=>{"use strict";n.d(e,{U:()=>o});var r=n(655),i=n(979);function o(t,e){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new g(t,e))}}var g=function(){function t(t,e){this.project=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.project,this.thisArg))},t}(),s=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.project=n,i.count=0,i.thisArg=r||i,i}return r.ZT(e,t),e.prototype._next=function(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(i.L)},2556:(t,e,n)=>{"use strict";n.d(e,{J:()=>o});var r=n(7746),i=n(3608);function o(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),(0,r.zg)(i.y,t)}},7746:(t,e,n)=>{"use strict";n.d(e,{VS:()=>I,zg:()=>s});var r=n(655),i=n(5709),o=n(5760),g=n(7604);function s(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof e?function(r){return r.pipe(s((function(n,r){return(0,o.D)(t(n,r)).pipe((0,i.U)((function(t,i){return e(n,t,r,i)})))}),n))}:("number"==typeof e&&(n=e),function(e){return e.lift(new A(t,n))})}var A=function(){function t(t,e){void 0===e&&(e=Number.POSITIVE_INFINITY),this.project=t,this.concurrent=e}return t.prototype.call=function(t,e){return e.subscribe(new C(t,this.project,this.concurrent))},t}(),C=function(t){function e(e,n,r){void 0===r&&(r=Number.POSITIVE_INFINITY);var i=t.call(this,e)||this;return i.project=n,i.concurrent=r,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i}return r.ZT(e,t),e.prototype._next=function(t){this.active0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}(g.Ds),I=s},9276:(t,e,n)=>{"use strict";n.d(e,{QV:()=>g,ht:()=>A});var r=n(655),i=n(979),o=n(2632);function g(t,e){return void 0===e&&(e=0),function(n){return n.lift(new s(t,e))}}var s=function(){function t(t,e){void 0===e&&(e=0),this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return e.subscribe(new A(t,this.scheduler,this.delay))},t}(),A=function(t){function e(e,n,r){void 0===r&&(r=0);var i=t.call(this,e)||this;return i.scheduler=n,i.delay=r,i}return r.ZT(e,t),e.dispatch=function(t){var e=t.notification,n=t.destination;e.observe(n),this.unsubscribe()},e.prototype.scheduleMessage=function(t){this.destination.add(this.scheduler.schedule(e.dispatch,this.delay,new C(t,this.destination)))},e.prototype._next=function(t){this.scheduleMessage(o.P.createNext(t))},e.prototype._error=function(t){this.scheduleMessage(o.P.createError(t)),this.unsubscribe()},e.prototype._complete=function(){this.scheduleMessage(o.P.createComplete()),this.unsubscribe()},e}(i.L),C=function(){return function(t,e){this.notification=t,this.destination=e}}()},3018:(t,e,n)=>{"use strict";n.d(e,{x:()=>o});var r=n(655),i=n(979);function o(){return function(t){return t.lift(new g(t))}}var g=function(){function t(t){this.connectable=t}return t.prototype.call=function(t,e){var n=this.connectable;n._refCount++;var r=new s(t,n),i=e.subscribe(r);return r.closed||(r.connection=n.connect()),i},t}(),s=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return r.ZT(e,t),e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else{var n=this.connection,r=t._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null},e}(i.L)},3109:(t,e,n)=>{"use strict";n.d(e,{r:()=>o});var r=n(2772),i=n(8760);function o(t,e){return new r.y((function(n){var r=new i.w,o=0;return r.add(e.schedule((function(){o!==t.length?(n.next(t[o++]),n.closed||r.add(this.schedule())):n.complete()}))),r}))}},8107:(t,e,n)=>{"use strict";n.d(e,{x:()=>I});var r=n(2772),i=n(8760),o=n(5050),g=n(3109),s=n(999),A=n(336),C=n(9217);function I(t,e){if(null!=t){if(function(t){return t&&"function"==typeof t[o.L]}(t))return function(t,e){return new r.y((function(n){var r=new i.w;return r.add(e.schedule((function(){var i=t[o.L]();r.add(i.subscribe({next:function(t){r.add(e.schedule((function(){return n.next(t)})))},error:function(t){r.add(e.schedule((function(){return n.error(t)})))},complete:function(){r.add(e.schedule((function(){return n.complete()})))}}))}))),r}))}(t,e);if((0,A.t)(t))return function(t,e){return new r.y((function(n){var r=new i.w;return r.add(e.schedule((function(){return t.then((function(t){r.add(e.schedule((function(){n.next(t),r.add(e.schedule((function(){return n.complete()})))})))}),(function(t){r.add(e.schedule((function(){return n.error(t)})))}))}))),r}))}(t,e);if((0,C.z)(t))return(0,g.r)(t,e);if(function(t){return t&&"function"==typeof t[s.hZ]}(t)||"string"==typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return new r.y((function(n){var r,o=new i.w;return o.add((function(){r&&"function"==typeof r.return&&r.return()})),o.add(e.schedule((function(){r=t[s.hZ](),o.add(e.schedule((function(){if(!n.closed){var t,e;try{var i=r.next();t=i.value,e=i.done}catch(t){return void n.error(t)}e?n.complete():(n.next(t),this.schedule())}})))}))),o}))}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}},6114:(t,e,n)=>{"use strict";n.d(e,{o:()=>i});var r=n(655),i=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r.pending=!1,r}return r.ZT(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this},e.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),setInterval(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var n=!1,r=void 0;try{this.work(t)}catch(t){n=!0,r=!!t&&t||new Error(t)}if(n)return this.unsubscribe(),r},e.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,n=e.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null},e}(function(t){function e(e,n){return t.call(this)||this}return r.ZT(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(n(8760).w))},8399:(t,e,n)=>{"use strict";n.d(e,{v:()=>o});var r=n(655),i=n(8725),o=function(t){function e(n,r){void 0===r&&(r=i.b.now);var o=t.call(this,n,(function(){return e.delegate&&e.delegate!==o?e.delegate.now():r()}))||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return r.ZT(e,t),e.prototype.schedule=function(n,r,i){return void 0===r&&(r=0),e.delegate&&e.delegate!==this?e.delegate.schedule(n,r,i):t.prototype.schedule.call(this,n,r,i)},e.prototype.flush=function(t){var e=this.actions;if(this.active)e.push(t);else{var n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},e}(i.b)},6650:(t,e,n)=>{"use strict";n.d(e,{e:()=>I,E:()=>C});var r=n(655),i=1,o=function(){return Promise.resolve()}(),g={};function s(t){return t in g&&(delete g[t],!0)}var A=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return r.ZT(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e.scheduled||(e.scheduled=(A=e.flush.bind(e,null),C=i++,g[C]=!0,o.then((function(){return s(C)&&A()})),C)));var A,C},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);0===e.actions.length&&(s(n),e.scheduled=void 0)},e}(n(6114).o),C=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.ZT(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,r=-1,i=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++r{"use strict";n.d(e,{P:()=>o,z:()=>i});var r=n(6114),i=new(n(8399).v)(r.o),o=i},2546:(t,e,n)=>{"use strict";n.d(e,{c:()=>g,N:()=>o});var r=n(655),i=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return r.ZT(e,t),e.prototype.schedule=function(e,n){return void 0===n&&(n=0),n>0?t.prototype.schedule.call(this,e,n):(this.delay=n,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,n){return n>0||this.closed?t.prototype.execute.call(this,e,n):this._execute(e,n)},e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0?t.prototype.requestAsyncId.call(this,e,n,r):e.flush(this)},e}(n(6114).o),o=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.ZT(e,t),e}(n(8399).v))(i),g=o},999:(t,e,n)=>{"use strict";function r(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}n.d(e,{hZ:()=>i});var i=r()},5050:(t,e,n)=>{"use strict";n.d(e,{L:()=>r});var r=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}()},3142:(t,e,n)=>{"use strict";n.d(e,{b:()=>r});var r=function(){return"function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}()},6565:(t,e,n)=>{"use strict";n.d(e,{W:()=>r});var r=function(){function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t}()},6929:(t,e,n)=>{"use strict";n.d(e,{K:()=>r});var r=function(){function t(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return t.prototype=Object.create(Error.prototype),t}()},1016:(t,e,n)=>{"use strict";n.d(e,{N:()=>r});var r=function(){function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t}()},1462:(t,e,n)=>{"use strict";n.d(e,{W:()=>r});var r=function(){function t(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}return t.prototype=Object.create(Error.prototype),t}()},8782:(t,e,n)=>{"use strict";n.d(e,{B:()=>r});var r=function(){function t(t){return Error.call(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t,this}return t.prototype=Object.create(Error.prototype),t}()},3642:(t,e,n)=>{"use strict";n.d(e,{_:()=>i});var r=n(979);function i(t){for(;t;){var e=t,n=e.closed,i=e.destination,o=e.isStopped;if(n||o)return!1;t=i&&i instanceof r.L?i:null}return!0}},1644:(t,e,n)=>{"use strict";function r(t){setTimeout((function(){throw t}),0)}n.d(e,{z:()=>r})},3608:(t,e,n)=>{"use strict";function r(t){return t}n.d(e,{y:()=>r})},9026:(t,e,n)=>{"use strict";n.d(e,{k:()=>r});var r=function(){return Array.isArray||function(t){return t&&"number"==typeof t.length}}()},9217:(t,e,n)=>{"use strict";n.d(e,{z:()=>r});var r=function(t){return t&&"number"==typeof t.length&&"function"!=typeof t}},4156:(t,e,n)=>{"use strict";function r(t){return"function"==typeof t}n.d(e,{m:()=>r})},5812:(t,e,n)=>{"use strict";n.d(e,{k:()=>i});var r=n(9026);function i(t){return!(0,r.k)(t)&&t-parseFloat(t)+1>=0}},2009:(t,e,n)=>{"use strict";function r(t){return null!==t&&"object"==typeof t}n.d(e,{K:()=>r})},336:(t,e,n)=>{"use strict";function r(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}n.d(e,{t:()=>r})},7507:(t,e,n)=>{"use strict";function r(t){return t&&"function"==typeof t.schedule}n.d(e,{K:()=>r})},3306:(t,e,n)=>{"use strict";function r(){}n.d(e,{Z:()=>r})},8463:(t,e,n)=>{"use strict";function r(t,e){function n(){return!n.pred.apply(n.thisArg,arguments)}return n.pred=t,n.thisArg=e,n}n.d(e,{f:()=>r})},2561:(t,e,n)=>{"use strict";n.d(e,{U:()=>o,z:()=>i});var r=n(3608);function i(){for(var t=[],e=0;e{"use strict";n.d(e,{s:()=>I});var r=n(6900),i=n(1644),o=n(999),g=n(5050),s=n(9217),A=n(336),C=n(2009),I=function(t){if(t&&"function"==typeof t[g.L])return I=t,function(t){var e=I[g.L]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(t)};if((0,s.z)(t))return(0,r.V)(t);if((0,A.t)(t))return n=t,function(t){return n.then((function(e){t.closed||(t.next(e),t.complete())}),(function(e){return t.error(e)})).then(null,i.z),t};if(t&&"function"==typeof t[o.hZ])return e=t,function(t){for(var n=e[o.hZ]();;){var r=void 0;try{r=n.next()}catch(e){return t.error(e),t}if(r.done){t.complete();break}if(t.next(r.value),t.closed)break}return"function"==typeof n.return&&t.add((function(){n.return&&n.return()})),t};var e,n,I,a=(0,C.K)(t)?"an invalid object":"'"+t+"'";throw new TypeError("You provided "+a+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")}},6900:(t,e,n)=>{"use strict";n.d(e,{V:()=>r});var r=function(t){return function(e){for(var n=0,r=t.length;n{"use strict";n.d(e,{D:()=>s});var r=n(655),i=function(t){function e(e,n,r){var i=t.call(this)||this;return i.parent=e,i.outerValue=n,i.outerIndex=r,i.index=0,i}return r.ZT(e,t),e.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)},e.prototype._error=function(t){this.parent.notifyError(t,this),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},e}(n(979).L),o=n(7843),g=n(2772);function s(t,e,n,r,s){if(void 0===s&&(s=new i(t,n,r)),!s.closed)return e instanceof g.y?e.subscribe(s):(0,o.s)(e)(s)}},1717:(t,e,n)=>{"use strict";n.r(e),n.d(e,{audit:()=>o,auditTime:()=>I,buffer:()=>a,bufferCount:()=>h,bufferTime:()=>y,bufferToggle:()=>S,bufferWhen:()=>R,catchError:()=>j,combineAll:()=>z,combineLatest:()=>V,concat:()=>W,concatAll:()=>Y.u,concatMap:()=>K,concatMapTo:()=>Q,count:()=>X,debounce:()=>$,debounceTime:()=>nt,defaultIfEmpty:()=>gt,delay:()=>at,delayWhen:()=>dt,dematerialize:()=>bt,distinct:()=>_t,distinctUntilChanged:()=>Ot,distinctUntilKeyChanged:()=>St,elementAt:()=>Ut,endWith:()=>Gt,every:()=>Wt,exhaust:()=>Kt,exhaustMap:()=>Jt,expand:()=>ee,filter:()=>Nt.h,finalize:()=>ie,find:()=>se,findIndex:()=>Ie,first:()=>ue,flatMap:()=>H.VS,groupBy:()=>ce.v,ignoreElements:()=>le,isEmpty:()=>fe,last:()=>we,map:()=>qt.U,mapTo:()=>_e,materialize:()=>Oe,max:()=>Me,merge:()=>Be,mergeAll:()=>Le.J,mergeMap:()=>H.zg,mergeMapTo:()=>Fe,mergeScan:()=>ze,min:()=>Ve,multicast:()=>We,observeOn:()=>He.QV,onErrorResumeNext:()=>Ke,pairwise:()=>qe,partition:()=>en,pluck:()=>nn,publish:()=>on,publishBehavior:()=>sn,publishLast:()=>Cn,publishReplay:()=>an,race:()=>cn,reduce:()=>De,refCount:()=>En.x,repeat:()=>ln,repeatWhen:()=>fn,retry:()=>yn,retryWhen:()=>wn,sample:()=>On,sampleTime:()=>Sn,scan:()=>Se,sequenceEqual:()=>Dn,share:()=>Fn,shareReplay:()=>zn,single:()=>Zn,skip:()=>Gn,skipLast:()=>Hn,skipUntil:()=>Xn,skipWhile:()=>$n,startWith:()=>nr,subscribeOn:()=>gr,switchAll:()=>ar,switchMap:()=>Ar,switchMapTo:()=>ur,take:()=>Ft,takeLast:()=>ye,takeUntil:()=>cr,takeWhile:()=>dr,tap:()=>br,throttle:()=>xr,throttleTime:()=>kr,throwIfEmpty:()=>Dt,timeInterval:()=>Rr,timeout:()=>zr,timeoutWith:()=>jr,timestamp:()=>Zr,toArray:()=>Gr,window:()=>Wr,windowCount:()=>Kr,windowTime:()=>qr,windowToggle:()=>ii,windowWhen:()=>si,withLatestFrom:()=>Ii,zip:()=>li,zipAll:()=>hi});var r=n(655),i=n(7604);function o(t){return function(e){return e.lift(new g(t))}}var g=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.durationSelector))},t}(),s=function(t){function e(e,n){var r=t.call(this,e)||this;return r.durationSelector=n,r.hasValue=!1,r}return r.ZT(e,t),e.prototype._next=function(t){if(this.value=t,this.hasValue=!0,!this.throttled){var e=void 0;try{e=(0,this.durationSelector)(t)}catch(t){return this.destination.error(t)}var n=(0,i.ft)(e,new i.IY(this));!n||n.closed?this.clearThrottle():this.add(this.throttled=n)}},e.prototype.clearThrottle=function(){var t=this,e=t.value,n=t.hasValue,r=t.throttled;r&&(this.remove(r),this.throttled=void 0,r.unsubscribe()),n&&(this.value=void 0,this.hasValue=!1,this.destination.next(e))},e.prototype.notifyNext=function(){this.clearThrottle()},e.prototype.notifyComplete=function(){this.clearThrottle()},e}(i.Ds),A=n(964),C=n(9604);function I(t,e){return void 0===e&&(e=A.P),o((function(){return(0,C.H)(t,e)}))}function a(t){return function(e){return e.lift(new u(t))}}var u=function(){function t(t){this.closingNotifier=t}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.closingNotifier))},t}(),c=function(t){function e(e,n){var r=t.call(this,e)||this;return r.buffer=[],r.add((0,i.ft)(n,new i.IY(r))),r}return r.ZT(e,t),e.prototype._next=function(t){this.buffer.push(t)},e.prototype.notifyNext=function(){var t=this.buffer;this.buffer=[],this.destination.next(t)},e}(i.Ds),l=n(979);function h(t,e){return void 0===e&&(e=null),function(n){return n.lift(new d(t,e))}}var d=function(){function t(t,e){this.bufferSize=t,this.startBufferEvery=e,this.subscriberClass=e&&t!==e?p:f}return t.prototype.call=function(t,e){return e.subscribe(new this.subscriberClass(t,this.bufferSize,this.startBufferEvery))},t}(),f=function(t){function e(e,n){var r=t.call(this,e)||this;return r.bufferSize=n,r.buffer=[],r}return r.ZT(e,t),e.prototype._next=function(t){var e=this.buffer;e.push(t),e.length==this.bufferSize&&(this.destination.next(e),this.buffer=[])},e.prototype._complete=function(){var e=this.buffer;e.length>0&&this.destination.next(e),t.prototype._complete.call(this)},e}(l.L),p=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.bufferSize=n,i.startBufferEvery=r,i.buffers=[],i.count=0,i}return r.ZT(e,t),e.prototype._next=function(t){var e=this,n=e.bufferSize,r=e.startBufferEvery,i=e.buffers,o=e.count;this.count++,o%r==0&&i.push([]);for(var g=i.length;g--;){var s=i[g];s.push(t),s.length===n&&(i.splice(g,1),this.destination.next(s))}},e.prototype._complete=function(){for(var e=this.buffers,n=this.destination;e.length>0;){var r=e.shift();r.length>0&&n.next(r)}t.prototype._complete.call(this)},e}(l.L),v=n(7507);function y(t){var e=arguments.length,n=A.P;(0,v.K)(arguments[arguments.length-1])&&(n=arguments[arguments.length-1],e--);var r=null;e>=2&&(r=arguments[1]);var i=Number.POSITIVE_INFINITY;return e>=3&&(i=arguments[2]),function(e){return e.lift(new b(t,r,i,n))}}var b=function(){function t(t,e,n,r){this.bufferTimeSpan=t,this.bufferCreationInterval=e,this.maxBufferSize=n,this.scheduler=r}return t.prototype.call=function(t,e){return e.subscribe(new w(t,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},t}(),m=function(){return function(){this.buffer=[]}}(),w=function(t){function e(e,n,r,i,o){var g=t.call(this,e)||this;g.bufferTimeSpan=n,g.bufferCreationInterval=r,g.maxBufferSize=i,g.scheduler=o,g.contexts=[];var s=g.openContext();if(g.timespanOnly=null==r||r<0,g.timespanOnly){var A={subscriber:g,context:s,bufferTimeSpan:n};g.add(s.closeAction=o.schedule(_,n,A))}else{var C={subscriber:g,context:s},I={bufferTimeSpan:n,bufferCreationInterval:r,subscriber:g,scheduler:o};g.add(s.closeAction=o.schedule(E,n,C)),g.add(o.schedule(x,r,I))}return g}return r.ZT(e,t),e.prototype._next=function(t){for(var e,n=this.contexts,r=n.length,i=0;i0;){var r=e.shift();n.next(r.buffer)}t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.contexts=null},e.prototype.onBufferFull=function(t){this.closeContext(t);var e=t.closeAction;if(e.unsubscribe(),this.remove(e),!this.closed&&this.timespanOnly){t=this.openContext();var n=this.bufferTimeSpan,r={subscriber:this,context:t,bufferTimeSpan:n};this.add(t.closeAction=this.scheduler.schedule(_,n,r))}},e.prototype.openContext=function(){var t=new m;return this.contexts.push(t),t},e.prototype.closeContext=function(t){this.destination.next(t.buffer);var e=this.contexts;(e?e.indexOf(t):-1)>=0&&e.splice(e.indexOf(t),1)},e}(l.L);function _(t){var e=t.subscriber,n=t.context;n&&e.closeContext(n),e.closed||(t.context=e.openContext(),t.context.closeAction=this.schedule(t,t.bufferTimeSpan))}function x(t){var e=t.bufferCreationInterval,n=t.bufferTimeSpan,r=t.subscriber,i=t.scheduler,o=r.openContext();r.closed||(r.add(o.closeAction=i.schedule(E,n,{subscriber:r,context:o})),this.schedule(t,e))}function E(t){var e=t.subscriber,n=t.context;e.closeContext(n)}var O=n(8760),k=n(2080),T=n(2039);function S(t,e){return function(n){return n.lift(new P(t,e))}}var P=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new N(t,this.openings,this.closingSelector))},t}(),N=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.closingSelector=r,i.contexts=[],i.add((0,k.D)(i,n)),i}return r.ZT(e,t),e.prototype._next=function(t){for(var e=this.contexts,n=e.length,r=0;r0;){var r=n.shift();r.subscription.unsubscribe(),r.buffer=null,r.subscription=null}this.contexts=null,t.prototype._error.call(this,e)},e.prototype._complete=function(){for(var e=this.contexts;e.length>0;){var n=e.shift();this.destination.next(n.buffer),n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,t.prototype._complete.call(this)},e.prototype.notifyNext=function(t,e){t?this.closeBuffer(t):this.openBuffer(e)},e.prototype.notifyComplete=function(t){this.closeBuffer(t.context)},e.prototype.openBuffer=function(t){try{var e=this.closingSelector.call(this,t);e&&this.trySubscribe(e)}catch(t){this._error(t)}},e.prototype.closeBuffer=function(t){var e=this.contexts;if(e&&t){var n=t.buffer,r=t.subscription;this.destination.next(n),e.splice(e.indexOf(t),1),this.remove(r),r.unsubscribe()}},e.prototype.trySubscribe=function(t){var e=this.contexts,n=new O.w,r={buffer:[],subscription:n};e.push(r);var i=(0,k.D)(this,t,r);!i||i.closed?this.closeBuffer(r):(i.context=r,this.add(i),n.add(i))},e}(T.L);function R(t){return function(e){return e.lift(new D(t))}}var D=function(){function t(t){this.closingSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new M(t,this.closingSelector))},t}(),M=function(t){function e(e,n){var r=t.call(this,e)||this;return r.closingSelector=n,r.subscribing=!1,r.openBuffer(),r}return r.ZT(e,t),e.prototype._next=function(t){this.buffer.push(t)},e.prototype._complete=function(){var e=this.buffer;e&&this.destination.next(e),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.buffer=void 0,this.subscribing=!1},e.prototype.notifyNext=function(){this.openBuffer()},e.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},e.prototype.openBuffer=function(){var t=this.closingSubscription;t&&(this.remove(t),t.unsubscribe());var e,n=this.buffer;this.buffer&&this.destination.next(n),this.buffer=[];try{e=(0,this.closingSelector)()}catch(t){return this.error(t)}t=new O.w,this.closingSubscription=t,this.add(t),this.subscribing=!0,t.add((0,i.ft)(e,new i.IY(this))),this.subscribing=!1},e}(i.Ds);function j(t){return function(e){var n=new B(t),r=e.lift(n);return n.caught=r}}var B=function(){function t(t){this.selector=t}return t.prototype.call=function(t,e){return e.subscribe(new L(t,this.selector,this.caught))},t}(),L=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.selector=n,i.caught=r,i}return r.ZT(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=void 0;try{n=this.selector(e,this.caught)}catch(e){return void t.prototype.error.call(this,e)}this._unsubscribeAndRecycle();var r=new i.IY(this);this.add(r);var o=(0,i.ft)(n,r);o!==r&&this.add(o)}},e}(i.Ds),F=n(5142);function z(t){return function(e){return e.lift(new F.Ms(t))}}var Z=n(9026),U=n(5760);function V(){for(var t=[],e=0;e0&&n[0].time-r.now()<=0;)n.shift().notification.observe(i);if(n.length>0){var o=Math.max(0,n[0].time-r.now());this.schedule(t,o)}else this.unsubscribe(),e.active=!1},e.prototype._schedule=function(t){this.active=!0,this.destination.add(t.schedule(e.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))},e.prototype.scheduleNotification=function(t){if(!0!==this.errored){var e=this.scheduler,n=new lt(e.now()+this.delay,t);this.queue.push(n),!1===this.active&&this._schedule(e)}},e.prototype._next=function(t){this.scheduleNotification(It.P.createNext(t))},e.prototype._error=function(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.scheduleNotification(It.P.createComplete()),this.unsubscribe()},e}(l.L),lt=function(){return function(t,e){this.time=t,this.notification=e}}(),ht=n(2772);function dt(t,e){return e?function(n){return new vt(n,e).lift(new ft(t))}:function(e){return e.lift(new ft(t))}}var ft=function(){function t(t){this.delayDurationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new pt(t,this.delayDurationSelector))},t}(),pt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.delayDurationSelector=n,r.completed=!1,r.delayNotifierSubscriptions=[],r.index=0,r}return r.ZT(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.destination.next(t),this.removeSubscription(i),this.tryComplete()},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype.notifyComplete=function(t){var e=this.removeSubscription(t);e&&this.destination.next(e),this.tryComplete()},e.prototype._next=function(t){var e=this.index++;try{var n=this.delayDurationSelector(t,e);n&&this.tryDelay(n,t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},e.prototype.removeSubscription=function(t){t.unsubscribe();var e=this.delayNotifierSubscriptions.indexOf(t);return-1!==e&&this.delayNotifierSubscriptions.splice(e,1),t.outerValue},e.prototype.tryDelay=function(t,e){var n=(0,k.D)(this,t,e);n&&!n.closed&&(this.destination.add(n),this.delayNotifierSubscriptions.push(n))},e.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()},e}(T.L),vt=function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subscriptionDelay=n,r}return r.ZT(e,t),e.prototype._subscribe=function(t){this.subscriptionDelay.subscribe(new yt(t,this.source))},e}(ht.y),yt=function(t){function e(e,n){var r=t.call(this)||this;return r.parent=e,r.source=n,r.sourceSubscribed=!1,r}return r.ZT(e,t),e.prototype._next=function(t){this.subscribeToSource()},e.prototype._error=function(t){this.unsubscribe(),this.parent.error(t)},e.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource()},e.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},e}(l.L);function bt(){return function(t){return t.lift(new mt)}}var mt=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new wt(t))},t}(),wt=function(t){function e(e){return t.call(this,e)||this}return r.ZT(e,t),e.prototype._next=function(t){t.observe(this.destination)},e}(l.L);function _t(t,e){return function(n){return n.lift(new xt(t,e))}}var xt=function(){function t(t,e){this.keySelector=t,this.flushes=e}return t.prototype.call=function(t,e){return e.subscribe(new Et(t,this.keySelector,this.flushes))},t}(),Et=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.keySelector=n,o.values=new Set,r&&o.add((0,i.ft)(r,new i.IY(o))),o}return r.ZT(e,t),e.prototype.notifyNext=function(){this.values.clear()},e.prototype.notifyError=function(t){this._error(t)},e.prototype._next=function(t){this.keySelector?this._useKeySelector(t):this._finalizeNext(t,t)},e.prototype._useKeySelector=function(t){var e,n=this.destination;try{e=this.keySelector(t)}catch(t){return void n.error(t)}this._finalizeNext(e,t)},e.prototype._finalizeNext=function(t,e){var n=this.values;n.has(t)||(n.add(t),this.destination.next(e))},e}(i.Ds);function Ot(t,e){return function(n){return n.lift(new kt(t,e))}}var kt=function(){function t(t,e){this.compare=t,this.keySelector=e}return t.prototype.call=function(t,e){return e.subscribe(new Tt(t,this.compare,this.keySelector))},t}(),Tt=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.keySelector=r,i.hasKey=!1,"function"==typeof n&&(i.compare=n),i}return r.ZT(e,t),e.prototype.compare=function(t,e){return t===e},e.prototype._next=function(t){var e;try{var n=this.keySelector;e=n?n(t):t}catch(t){return this.destination.error(t)}var r=!1;if(this.hasKey)try{r=(0,this.compare)(this.key,e)}catch(t){return this.destination.error(t)}else this.hasKey=!0;r||(this.key=e,this.destination.next(t))},e}(l.L);function St(t,e){return Ot((function(n,r){return e?e(n[t],r[t]):n[t]===r[t]}))}var Pt=n(6565),Nt=n(6008),Rt=n(6929);function Dt(t){return void 0===t&&(t=Bt),function(e){return e.lift(new Mt(t))}}var Mt=function(){function t(t){this.errorFactory=t}return t.prototype.call=function(t,e){return e.subscribe(new jt(t,this.errorFactory))},t}(),jt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.errorFactory=n,r.hasValue=!1,r}return r.ZT(e,t),e.prototype._next=function(t){this.hasValue=!0,this.destination.next(t)},e.prototype._complete=function(){if(this.hasValue)return this.destination.complete();var t=void 0;try{t=this.errorFactory()}catch(e){t=e}this.destination.error(t)},e}(l.L);function Bt(){return new Rt.K}var Lt=n(5631);function Ft(t){return function(e){return 0===t?(0,Lt.c)():e.lift(new zt(t))}}var zt=function(){function t(t){if(this.total=t,this.total<0)throw new Pt.W}return t.prototype.call=function(t,e){return e.subscribe(new Zt(t,this.total))},t}(),Zt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r}return r.ZT(e,t),e.prototype._next=function(t){var e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))},e}(l.L);function Ut(t,e){if(t<0)throw new Pt.W;var n=arguments.length>=2;return function(r){return r.pipe((0,Nt.h)((function(e,n){return n===t})),Ft(1),n?gt(e):Dt((function(){return new Pt.W})))}}var Vt=n(8170);function Gt(){for(var t=[],e=0;e0&&this._next(t.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()},e}(i.Ds);function ie(t){return function(e){return e.lift(new oe(t))}}var oe=function(){function t(t){this.callback=t}return t.prototype.call=function(t,e){return e.subscribe(new ge(t,this.callback))},t}(),ge=function(t){function e(e,n){var r=t.call(this,e)||this;return r.add(new O.w(n)),r}return r.ZT(e,t),e}(l.L);function se(t,e){if("function"!=typeof t)throw new TypeError("predicate is not a function");return function(n){return n.lift(new Ae(t,n,!1,e))}}var Ae=function(){function t(t,e,n,r){this.predicate=t,this.source=e,this.yieldIndex=n,this.thisArg=r}return t.prototype.call=function(t,e){return e.subscribe(new Ce(t,this.predicate,this.source,this.yieldIndex,this.thisArg))},t}(),Ce=function(t){function e(e,n,r,i,o){var g=t.call(this,e)||this;return g.predicate=n,g.source=r,g.yieldIndex=i,g.thisArg=o,g.index=0,g}return r.ZT(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete(),this.unsubscribe()},e.prototype._next=function(t){var e=this.predicate,n=this.thisArg,r=this.index++;try{e.call(n||this,t,r,this.source)&&this.notifyComplete(this.yieldIndex?r:t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},e}(l.L);function Ie(t,e){return function(n){return n.lift(new Ae(t,n,!0,e))}}var ae=n(3608);function ue(t,e){var n=arguments.length>=2;return function(r){return r.pipe(t?(0,Nt.h)((function(e,n){return t(e,n,r)})):ae.y,Ft(1),n?gt(e):Dt((function(){return new Rt.K})))}}var ce=n(1120);function le(){return function(t){return t.lift(new he)}}var he=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new de(t))},t}(),de=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.ZT(e,t),e.prototype._next=function(t){},e}(l.L);function fe(){return function(t){return t.lift(new pe)}}var pe=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new ve(t))},t}(),ve=function(t){function e(e){return t.call(this,e)||this}return r.ZT(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete()},e.prototype._next=function(t){this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(l.L);function ye(t){return function(e){return 0===t?(0,Lt.c)():e.lift(new be(t))}}var be=function(){function t(t){if(this.total=t,this.total<0)throw new Pt.W}return t.prototype.call=function(t,e){return e.subscribe(new me(t,this.total))},t}(),me=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.ring=new Array,r.count=0,r}return r.ZT(e,t),e.prototype._next=function(t){var e=this.ring,n=this.total,r=this.count++;e.length0)for(var n=this.count>=this.total?this.total:this.count,r=this.ring,i=0;i=2;return function(r){return r.pipe(t?(0,Nt.h)((function(e,n){return t(e,n,r)})):ae.y,ye(1),n?gt(e):Dt((function(){return new Rt.K})))}}function _e(t){return function(e){return e.lift(new xe(t))}}var xe=function(){function t(t){this.value=t}return t.prototype.call=function(t,e){return e.subscribe(new Ee(t,this.value))},t}(),Ee=function(t){function e(e,n){var r=t.call(this,e)||this;return r.value=n,r}return r.ZT(e,t),e.prototype._next=function(t){this.destination.next(this.value)},e}(l.L);function Oe(){return function(t){return t.lift(new ke)}}var ke=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Te(t))},t}(),Te=function(t){function e(e){return t.call(this,e)||this}return r.ZT(e,t),e.prototype._next=function(t){this.destination.next(It.P.createNext(t))},e.prototype._error=function(t){var e=this.destination;e.next(It.P.createError(t)),e.complete()},e.prototype._complete=function(){var t=this.destination;t.next(It.P.createComplete()),t.complete()},e}(l.L);function Se(t,e){var n=!1;return arguments.length>=2&&(n=!0),function(r){return r.lift(new Pe(t,e,n))}}var Pe=function(){function t(t,e,n){void 0===n&&(n=!1),this.accumulator=t,this.seed=e,this.hasSeed=n}return t.prototype.call=function(t,e){return e.subscribe(new Ne(t,this.accumulator,this.seed,this.hasSeed))},t}(),Ne=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.accumulator=n,o._seed=r,o.hasSeed=i,o.index=0,o}return r.ZT(e,t),Object.defineProperty(e.prototype,"seed",{get:function(){return this._seed},set:function(t){this.hasSeed=!0,this._seed=t},enumerable:!0,configurable:!0}),e.prototype._next=function(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.accumulator(this.seed,t,n)}catch(t){this.destination.error(t)}this.seed=e,this.destination.next(e)},e}(l.L),Re=n(2561);function De(t,e){return arguments.length>=2?function(n){return(0,Re.z)(Se(t,e),ye(1),gt(e))(n)}:function(e){return(0,Re.z)(Se((function(e,n,r){return t(e,n,r+1)})),ye(1))(e)}}function Me(t){return De("function"==typeof t?function(e,n){return t(e,n)>0?e:n}:function(t,e){return t>e?t:e})}var je=n(4370);function Be(){for(var t=[],e=0;e0?this._next(t.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},e}(i.Ds);function Ve(t){return De("function"==typeof t?function(e,n){return t(e,n)<0?e:n}:function(t,e){return t-1&&(this.count=n-1),e.subscribe(this._unsubscribeAndRecycle())}},e}(l.L);function fn(t){return function(e){return e.lift(new pn(t))}}var pn=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new vn(t,this.notifier,e))},t}(),vn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.notifier=n,i.source=r,i.sourceIsBeingSubscribedTo=!0,i}return r.ZT(e,t),e.prototype.notifyNext=function(){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},e.prototype.notifyComplete=function(){if(!1===this.sourceIsBeingSubscribedTo)return t.prototype.complete.call(this)},e.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return t.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next(void 0)}},e.prototype._unsubscribe=function(){var t=this.notifications,e=this.retriesSubscription;t&&(t.unsubscribe(),this.notifications=void 0),e&&(e.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},e.prototype._unsubscribeAndRecycle=function(){var e=this._unsubscribe;return this._unsubscribe=null,t.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=e,this},e.prototype.subscribeToRetries=function(){var e;this.notifications=new rn.xQ;try{e=(0,this.notifier)(this.notifications)}catch(e){return t.prototype.complete.call(this)}this.retries=e,this.retriesSubscription=(0,i.ft)(e,new i.IY(this))},e}(i.Ds);function yn(t){return void 0===t&&(t=-1),function(e){return e.lift(new bn(t,e))}}var bn=function(){function t(t,e){this.count=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new mn(t,this.count,this.source))},t}(),mn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.count=n,i.source=r,i}return r.ZT(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.source,r=this.count;if(0===r)return t.prototype.error.call(this,e);r>-1&&(this.count=r-1),n.subscribe(this._unsubscribeAndRecycle())}},e}(l.L);function wn(t){return function(e){return e.lift(new _n(t,e))}}var _n=function(){function t(t,e){this.notifier=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new xn(t,this.notifier,this.source))},t}(),xn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.notifier=n,i.source=r,i}return r.ZT(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.errors,r=this.retries,o=this.retriesSubscription;if(r)this.errors=void 0,this.retriesSubscription=void 0;else{n=new rn.xQ;try{r=(0,this.notifier)(n)}catch(e){return t.prototype.error.call(this,e)}o=(0,i.ft)(r,new i.IY(this))}this._unsubscribeAndRecycle(),this.errors=n,this.retries=r,this.retriesSubscription=o,n.next(e)}},e.prototype._unsubscribe=function(){var t=this.errors,e=this.retriesSubscription;t&&(t.unsubscribe(),this.errors=void 0),e&&(e.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},e.prototype.notifyNext=function(){var t=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=t,this.source.subscribe(this)},e}(i.Ds),En=n(3018);function On(t){return function(e){return e.lift(new kn(t))}}var kn=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var n=new Tn(t),r=e.subscribe(n);return r.add((0,i.ft)(this.notifier,new i.IY(n))),r},t}(),Tn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasValue=!1,e}return r.ZT(e,t),e.prototype._next=function(t){this.value=t,this.hasValue=!0},e.prototype.notifyNext=function(){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},e}(i.Ds);function Sn(t,e){return void 0===e&&(e=A.P),function(n){return n.lift(new Pn(t,e))}}var Pn=function(){function t(t,e){this.period=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new Nn(t,this.period,this.scheduler))},t}(),Nn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.period=n,i.scheduler=r,i.hasValue=!1,i.add(r.schedule(Rn,n,{subscriber:i,period:n})),i}return r.ZT(e,t),e.prototype._next=function(t){this.lastValue=t,this.hasValue=!0},e.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},e}(l.L);function Rn(t){var e=t.subscriber,n=t.period;e.notifyNext(),this.schedule(t,n)}function Dn(t,e){return function(n){return n.lift(new Mn(t,e))}}var Mn=function(){function t(t,e){this.compareTo=t,this.comparator=e}return t.prototype.call=function(t,e){return e.subscribe(new jn(t,this.compareTo,this.comparator))},t}(),jn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.compareTo=n,i.comparator=r,i._a=[],i._b=[],i._oneComplete=!1,i.destination.add(n.subscribe(new Bn(e,i))),i}return r.ZT(e,t),e.prototype._next=function(t){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(t),this.checkValues())},e.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe()},e.prototype.checkValues=function(){for(var t=this,e=t._a,n=t._b,r=t.comparator;e.length>0&&n.length>0;){var i=e.shift(),o=n.shift(),g=!1;try{g=r?r(i,o):i===o}catch(t){this.destination.error(t)}g||this.emit(!1)}},e.prototype.emit=function(t){var e=this.destination;e.next(t),e.complete()},e.prototype.nextB=function(t){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(t),this.checkValues())},e.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0},e}(l.L),Bn=function(t){function e(e,n){var r=t.call(this,e)||this;return r.parent=n,r}return r.ZT(e,t),e.prototype._next=function(t){this.parent.nextB(t)},e.prototype._error=function(t){this.parent.error(t),this.unsubscribe()},e.prototype._complete=function(){this.parent.completeB(),this.unsubscribe()},e}(l.L);function Ln(){return new rn.xQ}function Fn(){return function(t){return(0,En.x)()(We(Ln)(t))}}function zn(t,e,n){var r;return r=t&&"object"==typeof t?t:{bufferSize:t,windowTime:e,refCount:!1,scheduler:n},function(t){return t.lift(function(t){var e,n,r=t.bufferSize,i=void 0===r?Number.POSITIVE_INFINITY:r,o=t.windowTime,g=void 0===o?Number.POSITIVE_INFINITY:o,s=t.refCount,A=t.scheduler,C=0,I=!1,a=!1;return function(t){var r;C++,!e||I?(I=!1,e=new In.t(i,g,A),r=e.subscribe(this),n=t.subscribe({next:function(t){e.next(t)},error:function(t){I=!0,e.error(t)},complete:function(){a=!0,n=void 0,e.complete()}}),a&&(n=void 0)):r=e.subscribe(this),this.add((function(){C--,r.unsubscribe(),r=void 0,n&&!a&&s&&0===C&&(n.unsubscribe(),n=void 0,e=void 0)}))}}(r))}}function Zn(t){return function(e){return e.lift(new Un(t,e))}}var Un=function(){function t(t,e){this.predicate=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new Vn(t,this.predicate,this.source))},t}(),Vn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.predicate=n,i.source=r,i.seenValue=!1,i.index=0,i}return r.ZT(e,t),e.prototype.applySingleValue=function(t){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=t)},e.prototype._next=function(t){var e=this.index++;this.predicate?this.tryNext(t,e):this.applySingleValue(t)},e.prototype.tryNext=function(t,e){try{this.predicate(t,e,this.source)&&this.applySingleValue(t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){var t=this.destination;this.index>0?(t.next(this.seenValue?this.singleValue:void 0),t.complete()):t.error(new Rt.K)},e}(l.L);function Gn(t){return function(e){return e.lift(new Wn(t))}}var Wn=function(){function t(t){this.total=t}return t.prototype.call=function(t,e){return e.subscribe(new Yn(t,this.total))},t}(),Yn=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r}return r.ZT(e,t),e.prototype._next=function(t){++this.count>this.total&&this.destination.next(t)},e}(l.L);function Hn(t){return function(e){return e.lift(new Kn(t))}}var Kn=function(){function t(t){if(this._skipCount=t,this._skipCount<0)throw new Pt.W}return t.prototype.call=function(t,e){return 0===this._skipCount?e.subscribe(new l.L(t)):e.subscribe(new Qn(t,this._skipCount))},t}(),Qn=function(t){function e(e,n){var r=t.call(this,e)||this;return r._skipCount=n,r._count=0,r._ring=new Array(n),r}return r.ZT(e,t),e.prototype._next=function(t){var e=this._skipCount,n=this._count++;if(n0?this.startWindowEvery:this.windowSize,n=this.destination,r=this.windowSize,i=this.windows,o=i.length,g=0;g=0&&s%e==0&&!this.closed&&i.shift().complete(),++this.count%e==0&&!this.closed){var A=new rn.xQ;i.push(A),n.next(A)}},e.prototype._error=function(t){var e=this.windows;if(e)for(;e.length>0&&!this.closed;)e.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().complete();this.destination.complete()},e.prototype._unsubscribe=function(){this.count=0,this.windows=null},e}(l.L);function qr(t){var e=A.P,n=null,r=Number.POSITIVE_INFINITY;return(0,v.K)(arguments[3])&&(e=arguments[3]),(0,v.K)(arguments[2])?e=arguments[2]:(0,ir.k)(arguments[2])&&(r=Number(arguments[2])),(0,v.K)(arguments[1])?e=arguments[1]:(0,ir.k)(arguments[1])&&(n=Number(arguments[1])),function(i){return i.lift(new Jr(t,n,r,e))}}var Jr=function(){function t(t,e,n,r){this.windowTimeSpan=t,this.windowCreationInterval=e,this.maxWindowSize=n,this.scheduler=r}return t.prototype.call=function(t,e){return e.subscribe(new ti(t,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},t}(),$r=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._numberOfNextedValues=0,e}return r.ZT(e,t),e.prototype.next=function(e){this._numberOfNextedValues++,t.prototype.next.call(this,e)},Object.defineProperty(e.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),e}(rn.xQ),ti=function(t){function e(e,n,r,i,o){var g=t.call(this,e)||this;g.destination=e,g.windowTimeSpan=n,g.windowCreationInterval=r,g.maxWindowSize=i,g.scheduler=o,g.windows=[];var s=g.openWindow();if(null!==r&&r>=0){var A={subscriber:g,window:s,context:null},C={windowTimeSpan:n,windowCreationInterval:r,subscriber:g,scheduler:o};g.add(o.schedule(ri,n,A)),g.add(o.schedule(ni,r,C))}else{var I={subscriber:g,window:s,windowTimeSpan:n};g.add(o.schedule(ei,n,I))}return g}return r.ZT(e,t),e.prototype._next=function(t){for(var e=this.windows,n=e.length,r=0;r=this.maxWindowSize&&this.closeWindow(i))}},e.prototype._error=function(t){for(var e=this.windows;e.length>0;)e.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){for(var t=this.windows;t.length>0;){var e=t.shift();e.closed||e.complete()}this.destination.complete()},e.prototype.openWindow=function(){var t=new $r;return this.windows.push(t),this.destination.next(t),t},e.prototype.closeWindow=function(t){t.complete();var e=this.windows;e.splice(e.indexOf(t),1)},e}(l.L);function ei(t){var e=t.subscriber,n=t.windowTimeSpan,r=t.window;r&&e.closeWindow(r),t.window=e.openWindow(),this.schedule(t,n)}function ni(t){var e=t.windowTimeSpan,n=t.subscriber,r=t.scheduler,i=t.windowCreationInterval,o=n.openWindow(),g=this,s={action:g,subscription:null},A={subscriber:n,window:o,context:s};s.subscription=r.schedule(ri,e,A),g.add(s.subscription),g.schedule(t,i)}function ri(t){var e=t.subscriber,n=t.window,r=t.context;r&&r.action&&r.subscription&&r.action.remove(r.subscription),e.closeWindow(n)}function ii(t,e){return function(n){return n.lift(new oi(t,e))}}var oi=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new gi(t,this.openings,this.closingSelector))},t}(),gi=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.openings=n,i.closingSelector=r,i.contexts=[],i.add(i.openSubscription=(0,k.D)(i,n,n)),i}return r.ZT(e,t),e.prototype._next=function(t){var e=this.contexts;if(e)for(var n=e.length,r=0;r0){var i=r.indexOf(n);-1!==i&&r.splice(i,1)}},e.prototype.notifyComplete=function(){},e.prototype._next=function(t){if(0===this.toRespond.length){var e=[t].concat(this.values);this.project?this._tryProject(e):this.destination.next(e)}},e.prototype._tryProject=function(t){var e;try{e=this.project.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(T.L),ci=n(5080);function li(){for(var t=[],e=0;e{var r=n(8764),i=r.Buffer;function o(t,e){for(var n in t)e[n]=t[n]}function g(t,e,n){return i(t,e,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,e),e.Buffer=g),g.prototype=Object.create(i.prototype),o(i,g),g.from=function(t,e,n){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,n)},g.alloc=function(t,e,n){if("number"!=typeof t)throw new TypeError("Argument must be a number");var r=i(t);return void 0!==e?"string"==typeof n?r.fill(e,n):r.fill(e):r.fill(0),r},g.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},g.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}},2553:(t,e,n)=>{"use strict";var r=n(9509).Buffer,i=r.isEncoding||function(t){switch((t=""+t)&&t.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 o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){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 t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(r.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=A,this.end=C,e=4;break;case"utf8":this.fillLast=s,e=4;break;case"base64":this.text=I,this.end=a,e=3;break;default:return this.write=u,void(this.end=c)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(e)}function g(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,n=function(t,e,n){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==n?n:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function A(t,e){if((t.length-e)%2==0){var n=t.toString("utf16le",e);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function C(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function I(t,e){var n=(t.length-e)%3;return 0===n?t.toString("base64",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-n))}function a(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function u(t){return t.toString(this.encoding)}function c(t){return t&&t.length?this.write(t):""}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,n;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0?(i>0&&(t.lastNeed=i-1),i):--r=0?(i>0&&(t.lastNeed=i-2),i):--r=0?(i>0&&(2===i?i=0:t.lastNeed=i-3),i):0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=n;var r=t.length-(n-this.lastNeed);return t.copy(this.lastChar,0,r),t.toString("utf8",e,r)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},655:(t,e,n)=>{"use strict";n.d(e,{ZT:()=>i});var r=function(t,e){return r=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])},r(t,e)};function i(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}},8309:(t,e,n)=>{t.exports=n(3363)},9022:(t,e,n)=>{t.exports=n(8065)},86:(t,e,n)=>{t.exports=n(6279)},8712:(t,e,n)=>{t.exports=n(3819)},7606:(t,e,n)=>{t.exports=n(1798)},4282:(t,e,n)=>{t.exports=n(2527)},2018:(t,e,n)=>{t.exports=n(6209)},8222:(t,e,n)=>{t.exports=n(3059)},6226:(t,e,n)=>{t.exports=n(7460)},7198:(t,e,n)=>{t.exports=n(7989)},3733:(t,e,n)=>{t.exports=n(2547)},8886:(t,e,n)=>{t.exports=n(2010)},9030:(t,e,n)=>{t.exports=n(3726)},7445:(t,e,n)=>{t.exports=n(3685)},2472:(t,e,n)=>{t.exports=n(6600)},8994:(t,e,n)=>{t.exports=n(9759)},24:(t,e,n)=>{t.exports=n(1384)},6115:t=>{t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.__esModule=!0,t.exports.default=t.exports},6690:t=>{t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.__esModule=!0,t.exports.default=t.exports},9728:(t,e,n)=>{var r=n(4062);function i(t,e){for(var n=0;n{function e(n){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},1655:(t,e,n)=>{var r=n(6015);t.exports=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&&r(t,e)},t.exports.__esModule=!0,t.exports.default=t.exports},4836:t=>{t.exports=function(t){return t&&t.__esModule?t:{default:t}},t.exports.__esModule=!0,t.exports.default=t.exports},4993:(t,e,n)=>{var r=n(8698).default,i=n(6115);t.exports=function(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return i(t)},t.exports.__esModule=!0,t.exports.default=t.exports},6015:t=>{function e(n,r){return t.exports=e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n,r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},5036:(t,e,n)=>{var r=n(8698).default;t.exports=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)},t.exports.__esModule=!0,t.exports.default=t.exports},4062:(t,e,n)=>{var r=n(8698).default,i=n(5036);t.exports=function(t){var e=i(t,"string");return"symbol"===r(e)?e:String(e)},t.exports.__esModule=!0,t.exports.default=t.exports},8698:t=>{function e(n){return t.exports=e="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},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r].call(o.exports,o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{EventController:()=>Vj,NEOVIS_ADVANCED_CONFIG:()=>Qj,NEOVIS_DEFAULT_CONFIG:()=>Kj,NeoVis:()=>DB,NeoVisEvents:()=>Uj,default:()=>qB,migrateFromOldConfig:()=>XB,objectToTitleHtml:()=>AB,objectToTitleString:()=>CB});var t=n(7445),e=n(2472),i=n(8994);function o(t){return o="function"==typeof e&&"symbol"==typeof i?function(t){return typeof t}:function(t){return t&&"function"==typeof e&&t.constructor===e&&t!==e.prototype?"symbol":typeof t},o(t)}var g=n(24);function s(e,n,r){return(n=function(t){var e=function(t,e){if("object"!==o(t)||null===t)return t;var n=t[g];if(void 0!==n){var r=n.call(t,"string");if("object"!==o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===o(e)?e:String(e)}(n))in e?t(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function A(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function C(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,A(t,e,"set"),n),n}function I(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,A(t,e,"get"))}var a=n(8222),u=n.n(a),c=n(8309),l=n.n(c),h=n(7606),d=n.n(h),f=n(8712),p=n.n(f),v=n(4282),y=n.n(v),b=n(2018),m=n.n(b),w=n(9022),_=n.n(w),x=n(8886),E=n.n(x),O=n(9030),k=n.n(O),T=n(86),S=n.n(T),P=n(6226),N=n.n(P),R=n(7198),D=n.n(R),M=n(7499),j=n(758),B="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{};function L(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var F={},z={get exports(){return F},set exports(t){F=t}},Z=function(t){return t&&t.Math==Math&&t},U=Z("object"==typeof globalThis&&globalThis)||Z("object"==typeof window&&window)||Z("object"==typeof self&&self)||Z("object"==typeof B&&B)||function(){return this}()||Function("return this")(),V=function(t){try{return!!t()}catch(t){return!0}},G=!V((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),W=G,Y=Function.prototype,H=Y.apply,K=Y.call,Q="object"==typeof Reflect&&Reflect.apply||(W?K.bind(H):function(){return K.apply(H,arguments)}),X=G,q=Function.prototype,J=q.call,$=X&&q.bind.bind(J,J),tt=X?$:function(t){return function(){return J.apply(t,arguments)}},et=tt,nt=et({}.toString),rt=et("".slice),it=function(t){return rt(nt(t),8,-1)},ot=it,gt=tt,st=function(t){if("Function"===ot(t))return gt(t)},At="object"==typeof document&&document.all,Ct={all:At,IS_HTMLDDA:void 0===At&&void 0!==At},It=Ct.all,at=Ct.IS_HTMLDDA?function(t){return"function"==typeof t||t===It}:function(t){return"function"==typeof t},ut={},ct=!V((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),lt=G,ht=Function.prototype.call,dt=lt?ht.bind(ht):function(){return ht.apply(ht,arguments)},ft={},pt={}.propertyIsEnumerable,vt=Object.getOwnPropertyDescriptor,yt=vt&&!pt.call({1:2},1);ft.f=yt?function(t){var e=vt(this,t);return!!e&&e.enumerable}:pt;var bt,mt,wt=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},_t=V,xt=it,Et=Object,Ot=tt("".split),kt=_t((function(){return!Et("z").propertyIsEnumerable(0)}))?function(t){return"String"==xt(t)?Ot(t,""):Et(t)}:Et,Tt=function(t){return null==t},St=Tt,Pt=TypeError,Nt=function(t){if(St(t))throw Pt("Can't call method on "+t);return t},Rt=kt,Dt=Nt,Mt=function(t){return Rt(Dt(t))},jt=at,Bt=Ct.all,Lt=Ct.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:jt(t)||t===Bt}:function(t){return"object"==typeof t?null!==t:jt(t)},Ft={},zt=Ft,Zt=U,Ut=at,Vt=function(t){return Ut(t)?t:void 0},Gt=function(t,e){return arguments.length<2?Vt(zt[t])||Vt(Zt[t]):zt[t]&&zt[t][e]||Zt[t]&&Zt[t][e]},Wt=tt({}.isPrototypeOf),Yt="undefined"!=typeof navigator&&String(navigator.userAgent)||"",Ht=U,Kt=Yt,Qt=Ht.process,Xt=Ht.Deno,qt=Qt&&Qt.versions||Xt&&Xt.version,Jt=qt&&qt.v8;Jt&&(mt=(bt=Jt.split("."))[0]>0&&bt[0]<4?1:+(bt[0]+bt[1])),!mt&&Kt&&(!(bt=Kt.match(/Edge\/(\d+)/))||bt[1]>=74)&&(bt=Kt.match(/Chrome\/(\d+)/))&&(mt=+bt[1]);var $t=mt,te=$t,ee=V,ne=!!Object.getOwnPropertySymbols&&!ee((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&te&&te<41})),re=ne&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ie=Gt,oe=at,ge=Wt,se=Object,Ae=re?function(t){return"symbol"==typeof t}:function(t){var e=ie("Symbol");return oe(e)&&ge(e.prototype,se(t))},Ce=String,Ie=function(t){try{return Ce(t)}catch(t){return"Object"}},ae=at,ue=Ie,ce=TypeError,le=function(t){if(ae(t))return t;throw ce(ue(t)+" is not a function")},he=le,de=Tt,fe=function(t,e){var n=t[e];return de(n)?void 0:he(n)},pe=dt,ve=at,ye=Lt,be=TypeError,me={},we={get exports(){return me},set exports(t){me=t}},_e=U,xe=Object.defineProperty,Ee="__core-js_shared__",Oe=U[Ee]||function(t,e){try{xe(_e,t,{value:e,configurable:!0,writable:!0})}catch(n){_e[t]=e}return e}(Ee,{}),ke=Oe;(we.exports=function(t,e){return ke[t]||(ke[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.29.0",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.29.0/LICENSE",source:"https://github.com/zloirock/core-js"});var Te=Nt,Se=Object,Pe=function(t){return Se(Te(t))},Ne=Pe,Re=tt({}.hasOwnProperty),De=Object.hasOwn||function(t,e){return Re(Ne(t),e)},Me=tt,je=0,Be=Math.random(),Le=Me(1..toString),Fe=function(t){return"Symbol("+(void 0===t?"":t)+")_"+Le(++je+Be,36)},ze=me,Ze=De,Ue=Fe,Ve=ne,Ge=re,We=U.Symbol,Ye=ze("wks"),He=Ge?We.for||We:We&&We.withoutSetter||Ue,Ke=function(t){return Ze(Ye,t)||(Ye[t]=Ve&&Ze(We,t)?We[t]:He("Symbol."+t)),Ye[t]},Qe=dt,Xe=Lt,qe=Ae,Je=fe,$e=TypeError,tn=Ke("toPrimitive"),en=function(t,e){if(!Xe(t)||qe(t))return t;var n,r=Je(t,tn);if(r){if(void 0===e&&(e="default"),n=Qe(r,t,e),!Xe(n)||qe(n))return n;throw $e("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var n,r;if("string"===e&&ve(n=t.toString)&&!ye(r=pe(n,t)))return r;if(ve(n=t.valueOf)&&!ye(r=pe(n,t)))return r;if("string"!==e&&ve(n=t.toString)&&!ye(r=pe(n,t)))return r;throw be("Can't convert object to primitive value")}(t,e)},nn=Ae,rn=function(t){var e=en(t,"string");return nn(e)?e:e+""},on=Lt,gn=U.document,sn=on(gn)&&on(gn.createElement),An=function(t){return sn?gn.createElement(t):{}},Cn=An,In=!ct&&!V((function(){return 7!=Object.defineProperty(Cn("div"),"a",{get:function(){return 7}}).a})),an=ct,un=dt,cn=ft,ln=wt,hn=Mt,dn=rn,fn=De,pn=In,vn=Object.getOwnPropertyDescriptor;ut.f=an?vn:function(t,e){if(t=hn(t),e=dn(e),pn)try{return vn(t,e)}catch(t){}if(fn(t,e))return ln(!un(cn.f,t,e),t[e])};var yn=V,bn=at,mn=/#|\.prototype\./,wn=function(t,e){var n=xn[_n(t)];return n==On||n!=En&&(bn(e)?yn(e):!!e)},_n=wn.normalize=function(t){return String(t).replace(mn,".").toLowerCase()},xn=wn.data={},En=wn.NATIVE="N",On=wn.POLYFILL="P",kn=wn,Tn=le,Sn=G,Pn=st(st.bind),Nn=function(t,e){return Tn(t),void 0===e?t:Sn?Pn(t,e):function(){return t.apply(e,arguments)}},Rn={},Dn=ct&&V((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Mn=Lt,jn=String,Bn=TypeError,Ln=function(t){if(Mn(t))return t;throw Bn(jn(t)+" is not an object")},Fn=ct,zn=In,Zn=Dn,Un=Ln,Vn=rn,Gn=TypeError,Wn=Object.defineProperty,Yn=Object.getOwnPropertyDescriptor,Hn="enumerable",Kn="configurable",Qn="writable";Rn.f=Fn?Zn?function(t,e,n){if(Un(t),e=Vn(e),Un(n),"function"==typeof t&&"prototype"===e&&"value"in n&&Qn in n&&!n[Qn]){var r=Yn(t,e);r&&r[Qn]&&(t[e]=n.value,n={configurable:Kn in n?n[Kn]:r[Kn],enumerable:Hn in n?n[Hn]:r[Hn],writable:!1})}return Wn(t,e,n)}:Wn:function(t,e,n){if(Un(t),e=Vn(e),Un(n),zn)try{return Wn(t,e,n)}catch(t){}if("get"in n||"set"in n)throw Gn("Accessors not supported");return"value"in n&&(t[e]=n.value),t};var Xn=Rn,qn=wt,Jn=ct?function(t,e,n){return Xn.f(t,e,qn(1,n))}:function(t,e,n){return t[e]=n,t},$n=U,tr=Q,er=st,nr=at,rr=ut.f,ir=kn,or=Ft,gr=Nn,sr=Jn,Ar=De,Cr=function(t){var e=function(n,r,i){if(this instanceof e){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,r)}return new t(n,r,i)}return tr(t,this,arguments)};return e.prototype=t.prototype,e},Ir=function(t,e){var n,r,i,o,g,s,A,C,I,a=t.target,u=t.global,c=t.stat,l=t.proto,h=u?$n:c?$n[a]:($n[a]||{}).prototype,d=u?or:or[a]||sr(or,a,{})[a],f=d.prototype;for(o in e)r=!(n=ir(u?o:a+(c?".":"#")+o,t.forced))&&h&&Ar(h,o),s=d[o],r&&(A=t.dontCallGetSet?(I=rr(h,o))&&I.value:h[o]),g=r&&A?A:e[o],r&&typeof s==typeof g||(C=t.bind&&r?gr(g,$n):t.wrap&&r?Cr(g):l&&nr(g)?er(g):g,(t.sham||g&&g.sham||s&&s.sham)&&sr(C,"sham",!0),sr(d,o,C),l&&(Ar(or,i=a+"Prototype")||sr(or,i,{}),sr(or[i],o,g),t.real&&f&&(n||!f[o])&&sr(f,o,g)))},ar=Math.ceil,ur=Math.floor,cr=Math.trunc||function(t){var e=+t;return(e>0?ur:ar)(e)},lr=function(t){var e=+t;return e!=e||0===e?0:cr(e)},hr=lr,dr=Math.max,fr=Math.min,pr=function(t,e){var n=hr(t);return n<0?dr(n+e,0):fr(n,e)},vr=lr,yr=Math.min,br=function(t){return(e=t.length)>0?yr(vr(e),9007199254740991):0;var e},mr=Mt,wr=pr,_r=br,xr=function(t){return function(e,n,r){var i,o=mr(e),g=_r(o),s=wr(r,g);if(t&&n!=n){for(;g>s;)if((i=o[s++])!=i)return!0}else for(;g>s;s++)if((t||s in o)&&o[s]===n)return t||s||0;return!t&&-1}},Er={includes:xr(!0),indexOf:xr(!1)},Or={},kr=De,Tr=Mt,Sr=Er.indexOf,Pr=Or,Nr=tt([].push),Rr=function(t,e){var n,r=Tr(t),i=0,o=[];for(n in r)!kr(Pr,n)&&kr(r,n)&&Nr(o,n);for(;e.length>i;)kr(r,n=e[i++])&&(~Sr(o,n)||Nr(o,n));return o},Dr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Mr=Rr,jr=Dr,Br=Object.keys||function(t){return Mr(t,jr)},Lr={};Lr.f=Object.getOwnPropertySymbols;var Fr=ct,zr=tt,Zr=dt,Ur=V,Vr=Br,Gr=Lr,Wr=ft,Yr=Pe,Hr=kt,Kr=Object.assign,Qr=Object.defineProperty,Xr=zr([].concat),qr=!Kr||Ur((function(){if(Fr&&1!==Kr({b:1},Kr(Qr({},"a",{enumerable:!0,get:function(){Qr(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=Kr({},t)[n]||Vr(Kr({},e)).join("")!=r}))?function(t,e){for(var n=Yr(t),r=arguments.length,i=1,o=Gr.f,g=Wr.f;r>i;)for(var s,A=Hr(arguments[i++]),C=o?Xr(Vr(A),o(A)):Vr(A),I=C.length,a=0;I>a;)s=C[a++],Fr&&!Zr(g,A,s)||(n[s]=A[s]);return n}:Kr,Jr=qr;Ir({target:"Object",stat:!0,arity:2,forced:Object.assign!==Jr},{assign:Jr});var $r=Ft.Object.assign;!function(t){t.exports=$r}(z);var ti=L(F),ei={},ni={get exports(){return ei},set exports(t){ei=t}},ri=tt([].slice),ii=tt,oi=le,gi=Lt,si=De,Ai=ri,Ci=G,Ii=Function,ai=ii([].concat),ui=ii([].join),ci={},li=Ci?Ii.bind:function(t){var e=oi(this),n=e.prototype,r=Ai(arguments,1),i=function(){var n=ai(r,Ai(arguments));return this instanceof i?function(t,e,n){if(!si(ci,e)){for(var r=[],i=0;i=.1;)(l=+o[a++%g])>I&&(l=I),c=Math.sqrt(l*l/(1+C*C)),e+=c=s<0?-c:c,n+=C*c,!0===u?t.lineTo(e,n):t.moveTo(e,n),I-=l,u=!u}var Ti={circle:_i,dashedLine:ki,database:Oi,diamond:function(t,e,n,r){t.beginPath(),t.lineTo(e,n+r),t.lineTo(e+r,n),t.lineTo(e,n-r),t.lineTo(e-r,n),t.closePath()},ellipse:Ei,ellipse_vis:Ei,hexagon:function(t,e,n,r){t.beginPath();var i=2*Math.PI/6;t.moveTo(e+r,n);for(var o=1;o<6;o++)t.lineTo(e+r*Math.cos(i*o),n+r*Math.sin(i*o));t.closePath()},roundRect:xi,square:function(t,e,n,r){t.beginPath(),t.rect(e-r,n-r,2*r,2*r),t.closePath()},star:function(t,e,n,r){t.beginPath(),n+=.1*(r*=.82);for(var i=0;i<10;i++){var o=i%2==0?1.3*r:.5*r;t.lineTo(e+o*Math.sin(2*i*Math.PI/10),n-o*Math.cos(2*i*Math.PI/10))}t.closePath()},triangle:function(t,e,n,r){t.beginPath(),n+=.275*(r*=1.15);var i=2*r,o=i/2,g=Math.sqrt(3)/6*i,s=Math.sqrt(i*i-o*o);t.moveTo(e,n-(s-g)),t.lineTo(e+o,n+g),t.lineTo(e-o,n+g),t.lineTo(e,n-(s-g)),t.closePath()},triangleDown:function(t,e,n,r){t.beginPath(),n-=.275*(r*=1.15);var i=2*r,o=i/2,g=Math.sqrt(3)/6*i,s=Math.sqrt(i*i-o*o);t.moveTo(e,n+(s-g)),t.lineTo(e+o,n-g),t.lineTo(e-o,n-g),t.lineTo(e,n+(s-g)),t.closePath()}};function Si(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t))}}Si(".vis-overlay {\n position: absolute;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n\n /* Must be displayed above for example selected Timeline items */\n z-index: 10;\n}\n\n.vis-active {\n box-shadow: 0 0 10px #86d5f8;\n}\n"),Si('/* override some bootstrap styles screwing up the timelines css */\n\n.vis [class*="span"] {\n min-height: 0;\n width: auto;\n}\n'),Si("div.vis-color-picker {\n position: absolute;\n top: 0px;\n left: 30px;\n margin-top: -140px;\n margin-left: 30px;\n width: 310px;\n height: 444px;\n z-index: 1;\n padding: 10px;\n border-radius: 15px;\n background-color: #ffffff;\n display: none;\n box-shadow: rgba(0, 0, 0, 0.5) 0px 0px 10px 0px;\n}\n\ndiv.vis-color-picker div.vis-arrow {\n position: absolute;\n top: 147px;\n left: 5px;\n}\n\ndiv.vis-color-picker div.vis-arrow::after,\ndiv.vis-color-picker div.vis-arrow::before {\n right: 100%;\n top: 50%;\n border: solid transparent;\n content: \" \";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none;\n}\n\ndiv.vis-color-picker div.vis-arrow:after {\n border-color: rgba(255, 255, 255, 0);\n border-right-color: #ffffff;\n border-width: 30px;\n margin-top: -30px;\n}\n\ndiv.vis-color-picker div.vis-color {\n position: absolute;\n width: 289px;\n height: 289px;\n cursor: pointer;\n}\n\ndiv.vis-color-picker div.vis-brightness {\n position: absolute;\n top: 313px;\n}\n\ndiv.vis-color-picker div.vis-opacity {\n position: absolute;\n top: 350px;\n}\n\ndiv.vis-color-picker div.vis-selector {\n position: absolute;\n top: 137px;\n left: 137px;\n width: 15px;\n height: 15px;\n border-radius: 15px;\n border: 1px solid #ffffff;\n background: #4c4c4c; /* Old browsers */\n background: -moz-linear-gradient(\n top,\n #4c4c4c 0%,\n #595959 12%,\n #666666 25%,\n #474747 39%,\n #2c2c2c 50%,\n #000000 51%,\n #111111 60%,\n #2b2b2b 76%,\n #1c1c1c 91%,\n #131313 100%\n ); /* FF3.6+ */\n background: -webkit-gradient(\n linear,\n left top,\n left bottom,\n color-stop(0%, #4c4c4c),\n color-stop(12%, #595959),\n color-stop(25%, #666666),\n color-stop(39%, #474747),\n color-stop(50%, #2c2c2c),\n color-stop(51%, #000000),\n color-stop(60%, #111111),\n color-stop(76%, #2b2b2b),\n color-stop(91%, #1c1c1c),\n color-stop(100%, #131313)\n ); /* Chrome,Safari4+ */\n background: -webkit-linear-gradient(\n top,\n #4c4c4c 0%,\n #595959 12%,\n #666666 25%,\n #474747 39%,\n #2c2c2c 50%,\n #000000 51%,\n #111111 60%,\n #2b2b2b 76%,\n #1c1c1c 91%,\n #131313 100%\n ); /* Chrome10+,Safari5.1+ */\n background: -o-linear-gradient(\n top,\n #4c4c4c 0%,\n #595959 12%,\n #666666 25%,\n #474747 39%,\n #2c2c2c 50%,\n #000000 51%,\n #111111 60%,\n #2b2b2b 76%,\n #1c1c1c 91%,\n #131313 100%\n ); /* Opera 11.10+ */\n background: -ms-linear-gradient(\n top,\n #4c4c4c 0%,\n #595959 12%,\n #666666 25%,\n #474747 39%,\n #2c2c2c 50%,\n #000000 51%,\n #111111 60%,\n #2b2b2b 76%,\n #1c1c1c 91%,\n #131313 100%\n ); /* IE10+ */\n background: linear-gradient(\n to bottom,\n #4c4c4c 0%,\n #595959 12%,\n #666666 25%,\n #474747 39%,\n #2c2c2c 50%,\n #000000 51%,\n #111111 60%,\n #2b2b2b 76%,\n #1c1c1c 91%,\n #131313 100%\n ); /* W3C */\n filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#4c4c4c', endColorstr='#131313',GradientType=0 ); /* IE6-9 */\n}\n\ndiv.vis-color-picker div.vis-new-color {\n position: absolute;\n width: 140px;\n height: 20px;\n border: 1px solid rgba(0, 0, 0, 0.1);\n border-radius: 5px;\n top: 380px;\n left: 159px;\n text-align: right;\n padding-right: 2px;\n font-size: 10px;\n color: rgba(0, 0, 0, 0.4);\n vertical-align: middle;\n line-height: 20px;\n}\n\ndiv.vis-color-picker div.vis-initial-color {\n position: absolute;\n width: 140px;\n height: 20px;\n border: 1px solid rgba(0, 0, 0, 0.1);\n border-radius: 5px;\n top: 380px;\n left: 10px;\n text-align: left;\n padding-left: 2px;\n font-size: 10px;\n color: rgba(0, 0, 0, 0.4);\n vertical-align: middle;\n line-height: 20px;\n}\n\ndiv.vis-color-picker div.vis-label {\n position: absolute;\n width: 300px;\n left: 10px;\n}\n\ndiv.vis-color-picker div.vis-label.vis-brightness {\n top: 300px;\n}\n\ndiv.vis-color-picker div.vis-label.vis-opacity {\n top: 338px;\n}\n\ndiv.vis-color-picker div.vis-button {\n position: absolute;\n width: 68px;\n height: 25px;\n border-radius: 10px;\n vertical-align: middle;\n text-align: center;\n line-height: 25px;\n top: 410px;\n border: 2px solid #d9d9d9;\n background-color: #f7f7f7;\n cursor: pointer;\n}\n\ndiv.vis-color-picker div.vis-button.vis-cancel {\n /*border:2px solid #ff4e33;*/\n /*background-color: #ff7761;*/\n left: 5px;\n}\ndiv.vis-color-picker div.vis-button.vis-load {\n /*border:2px solid #a153e6;*/\n /*background-color: #cb8dff;*/\n left: 82px;\n}\ndiv.vis-color-picker div.vis-button.vis-apply {\n /*border:2px solid #4588e6;*/\n /*background-color: #82b6ff;*/\n left: 159px;\n}\ndiv.vis-color-picker div.vis-button.vis-save {\n /*border:2px solid #45e655;*/\n /*background-color: #6dff7c;*/\n left: 236px;\n}\n\ndiv.vis-color-picker input.vis-range {\n width: 290px;\n height: 20px;\n}\n\n/* TODO: is this redundant?\ndiv.vis-color-picker input.vis-range-brightness {\n width: 289px !important;\n}\n\n\ndiv.vis-color-picker input.vis-saturation-range {\n width: 289px !important;\n}*/\n"),Si("div.vis-configuration {\n position: relative;\n display: block;\n float: left;\n font-size: 12px;\n}\n\ndiv.vis-configuration-wrapper {\n display: block;\n width: 700px;\n}\n\ndiv.vis-configuration-wrapper::after {\n clear: both;\n content: \"\";\n display: block;\n}\n\ndiv.vis-configuration.vis-config-option-container {\n display: block;\n width: 495px;\n background-color: #ffffff;\n border: 2px solid #f7f8fa;\n border-radius: 4px;\n margin-top: 20px;\n left: 10px;\n padding-left: 5px;\n}\n\ndiv.vis-configuration.vis-config-button {\n display: block;\n width: 495px;\n height: 25px;\n vertical-align: middle;\n line-height: 25px;\n background-color: #f7f8fa;\n border: 2px solid #ceced0;\n border-radius: 4px;\n margin-top: 20px;\n left: 10px;\n padding-left: 5px;\n cursor: pointer;\n margin-bottom: 30px;\n}\n\ndiv.vis-configuration.vis-config-button.hover {\n background-color: #4588e6;\n border: 2px solid #214373;\n color: #ffffff;\n}\n\ndiv.vis-configuration.vis-config-item {\n display: block;\n float: left;\n width: 495px;\n height: 25px;\n vertical-align: middle;\n line-height: 25px;\n}\n\ndiv.vis-configuration.vis-config-item.vis-config-s2 {\n left: 10px;\n background-color: #f7f8fa;\n padding-left: 5px;\n border-radius: 3px;\n}\ndiv.vis-configuration.vis-config-item.vis-config-s3 {\n left: 20px;\n background-color: #e4e9f0;\n padding-left: 5px;\n border-radius: 3px;\n}\ndiv.vis-configuration.vis-config-item.vis-config-s4 {\n left: 30px;\n background-color: #cfd8e6;\n padding-left: 5px;\n border-radius: 3px;\n}\n\ndiv.vis-configuration.vis-config-header {\n font-size: 18px;\n font-weight: bold;\n}\n\ndiv.vis-configuration.vis-config-label {\n width: 120px;\n height: 25px;\n line-height: 25px;\n}\n\ndiv.vis-configuration.vis-config-label.vis-config-s3 {\n width: 110px;\n}\ndiv.vis-configuration.vis-config-label.vis-config-s4 {\n width: 100px;\n}\n\ndiv.vis-configuration.vis-config-colorBlock {\n top: 1px;\n width: 30px;\n height: 19px;\n border: 1px solid #444444;\n border-radius: 2px;\n padding: 0px;\n margin: 0px;\n cursor: pointer;\n}\n\ninput.vis-configuration.vis-config-checkbox {\n left: -5px;\n}\n\ninput.vis-configuration.vis-config-rangeinput {\n position: relative;\n top: -5px;\n width: 60px;\n /*height:13px;*/\n padding: 1px;\n margin: 0;\n pointer-events: none;\n}\n\ninput.vis-configuration.vis-config-range {\n /*removes default webkit styles*/\n -webkit-appearance: none;\n\n /*fix for FF unable to apply focus style bug */\n border: 0px solid white;\n background-color: rgba(0, 0, 0, 0);\n\n /*required for proper track sizing in FF*/\n width: 300px;\n height: 20px;\n}\ninput.vis-configuration.vis-config-range::-webkit-slider-runnable-track {\n width: 300px;\n height: 5px;\n background: #dedede; /* Old browsers */\n background: -moz-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* FF3.6+ */\n background: -webkit-gradient(\n linear,\n left top,\n left bottom,\n color-stop(0%, #dedede),\n color-stop(99%, #c8c8c8)\n ); /* Chrome,Safari4+ */\n background: -webkit-linear-gradient(\n top,\n #dedede 0%,\n #c8c8c8 99%\n ); /* Chrome10+,Safari5.1+ */\n background: -o-linear-gradient(\n top,\n #dedede 0%,\n #c8c8c8 99%\n ); /* Opera 11.10+ */\n background: -ms-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* IE10+ */\n background: linear-gradient(to bottom, #dedede 0%, #c8c8c8 99%); /* W3C */\n filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#dedede', endColorstr='#c8c8c8',GradientType=0 ); /* IE6-9 */\n\n border: 1px solid #999999;\n box-shadow: #aaaaaa 0px 0px 3px 0px;\n border-radius: 3px;\n}\ninput.vis-configuration.vis-config-range::-webkit-slider-thumb {\n -webkit-appearance: none;\n border: 1px solid #14334b;\n height: 17px;\n width: 17px;\n border-radius: 50%;\n background: #3876c2; /* Old browsers */\n background: -moz-linear-gradient(top, #3876c2 0%, #385380 100%); /* FF3.6+ */\n background: -webkit-gradient(\n linear,\n left top,\n left bottom,\n color-stop(0%, #3876c2),\n color-stop(100%, #385380)\n ); /* Chrome,Safari4+ */\n background: -webkit-linear-gradient(\n top,\n #3876c2 0%,\n #385380 100%\n ); /* Chrome10+,Safari5.1+ */\n background: -o-linear-gradient(\n top,\n #3876c2 0%,\n #385380 100%\n ); /* Opera 11.10+ */\n background: -ms-linear-gradient(top, #3876c2 0%, #385380 100%); /* IE10+ */\n background: linear-gradient(to bottom, #3876c2 0%, #385380 100%); /* W3C */\n filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#3876c2', endColorstr='#385380',GradientType=0 ); /* IE6-9 */\n box-shadow: #111927 0px 0px 1px 0px;\n margin-top: -7px;\n}\ninput.vis-configuration.vis-config-range:focus {\n outline: none;\n}\ninput.vis-configuration.vis-config-range:focus::-webkit-slider-runnable-track {\n background: #9d9d9d; /* Old browsers */\n background: -moz-linear-gradient(top, #9d9d9d 0%, #c8c8c8 99%); /* FF3.6+ */\n background: -webkit-gradient(\n linear,\n left top,\n left bottom,\n color-stop(0%, #9d9d9d),\n color-stop(99%, #c8c8c8)\n ); /* Chrome,Safari4+ */\n background: -webkit-linear-gradient(\n top,\n #9d9d9d 0%,\n #c8c8c8 99%\n ); /* Chrome10+,Safari5.1+ */\n background: -o-linear-gradient(\n top,\n #9d9d9d 0%,\n #c8c8c8 99%\n ); /* Opera 11.10+ */\n background: -ms-linear-gradient(top, #9d9d9d 0%, #c8c8c8 99%); /* IE10+ */\n background: linear-gradient(to bottom, #9d9d9d 0%, #c8c8c8 99%); /* W3C */\n filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#9d9d9d', endColorstr='#c8c8c8',GradientType=0 ); /* IE6-9 */\n}\n\ninput.vis-configuration.vis-config-range::-moz-range-track {\n width: 300px;\n height: 10px;\n background: #dedede; /* Old browsers */\n background: -moz-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* FF3.6+ */\n background: -webkit-gradient(\n linear,\n left top,\n left bottom,\n color-stop(0%, #dedede),\n color-stop(99%, #c8c8c8)\n ); /* Chrome,Safari4+ */\n background: -webkit-linear-gradient(\n top,\n #dedede 0%,\n #c8c8c8 99%\n ); /* Chrome10+,Safari5.1+ */\n background: -o-linear-gradient(\n top,\n #dedede 0%,\n #c8c8c8 99%\n ); /* Opera 11.10+ */\n background: -ms-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* IE10+ */\n background: linear-gradient(to bottom, #dedede 0%, #c8c8c8 99%); /* W3C */\n filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#dedede', endColorstr='#c8c8c8',GradientType=0 ); /* IE6-9 */\n\n border: 1px solid #999999;\n box-shadow: #aaaaaa 0px 0px 3px 0px;\n border-radius: 3px;\n}\ninput.vis-configuration.vis-config-range::-moz-range-thumb {\n border: none;\n height: 16px;\n width: 16px;\n\n border-radius: 50%;\n background: #385380;\n}\n\n/*hide the outline behind the border*/\ninput.vis-configuration.vis-config-range:-moz-focusring {\n outline: 1px solid white;\n outline-offset: -1px;\n}\n\ninput.vis-configuration.vis-config-range::-ms-track {\n width: 300px;\n height: 5px;\n\n /*remove bg colour from the track, we'll use ms-fill-lower and ms-fill-upper instead */\n background: transparent;\n\n /*leave room for the larger thumb to overflow with a transparent border */\n border-color: transparent;\n border-width: 6px 0;\n\n /*remove default tick marks*/\n color: transparent;\n}\ninput.vis-configuration.vis-config-range::-ms-fill-lower {\n background: #777;\n border-radius: 10px;\n}\ninput.vis-configuration.vis-config-range::-ms-fill-upper {\n background: #ddd;\n border-radius: 10px;\n}\ninput.vis-configuration.vis-config-range::-ms-thumb {\n border: none;\n height: 16px;\n width: 16px;\n border-radius: 50%;\n background: #385380;\n}\ninput.vis-configuration.vis-config-range:focus::-ms-fill-lower {\n background: #888;\n}\ninput.vis-configuration.vis-config-range:focus::-ms-fill-upper {\n background: #ccc;\n}\n\n.vis-configuration-popup {\n position: absolute;\n background: rgba(57, 76, 89, 0.85);\n border: 2px solid #f2faff;\n line-height: 30px;\n height: 30px;\n width: 150px;\n text-align: center;\n color: #ffffff;\n font-size: 14px;\n border-radius: 4px;\n -webkit-transition: opacity 0.3s ease-in-out;\n -moz-transition: opacity 0.3s ease-in-out;\n transition: opacity 0.3s ease-in-out;\n}\n.vis-configuration-popup:after,\n.vis-configuration-popup:before {\n left: 100%;\n top: 50%;\n border: solid transparent;\n content: \" \";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none;\n}\n\n.vis-configuration-popup:after {\n border-color: rgba(136, 183, 213, 0);\n border-left-color: rgba(57, 76, 89, 0.85);\n border-width: 8px;\n margin-top: -8px;\n}\n.vis-configuration-popup:before {\n border-color: rgba(194, 225, 245, 0);\n border-left-color: #f2faff;\n border-width: 12px;\n margin-top: -12px;\n}\n"),Si("div.vis-tooltip {\n position: absolute;\n visibility: hidden;\n padding: 5px;\n white-space: nowrap;\n\n font-family: verdana;\n font-size: 14px;\n color: #000000;\n background-color: #f5f4ed;\n\n -moz-border-radius: 3px;\n -webkit-border-radius: 3px;\n border-radius: 3px;\n border: 1px solid #808074;\n\n box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);\n pointer-events: none;\n\n z-index: 5;\n}\n");var Pi={};!function(t){function e(t){if(t)return function(t){for(var n in e.prototype)t[n]=e.prototype[n];return t}(t)}t.exports=e,e.prototype.on=e.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},e.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},e.prototype.off=e.prototype.removeListener=e.prototype.removeAllListeners=e.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var i=0;i=s?t?"":void 0:(r=eo(o,g))<55296||r>56319||g+1===s||(i=eo(o,g+1))<56320||i>57343?t?to(o,g):r:t?no(o,g,g+2):i-56320+(r-55296<<10)+65536}},io={codeAt:ro(!1),charAt:ro(!0)},oo=at,go=U.WeakMap,so=oo(go)&&/native code/.test(String(go)),Ao=Fe,Co=me("keys"),Io=function(t){return Co[t]||(Co[t]=Ao(t))},ao=so,uo=U,co=Lt,lo=Jn,ho=De,fo=Oe,po=Io,vo=Or,yo="Object already initialized",bo=uo.TypeError,mo=uo.WeakMap;if(ao||fo.state){var wo=fo.state||(fo.state=new mo);wo.get=wo.get,wo.has=wo.has,wo.set=wo.set,ji=function(t,e){if(wo.has(t))throw bo(yo);return e.facade=t,wo.set(t,e),e},Bi=function(t){return wo.get(t)||{}},Li=function(t){return wo.has(t)}}else{var _o=po("state");vo[_o]=!0,ji=function(t,e){if(ho(t,_o))throw bo(yo);return e.facade=t,lo(t,_o,e),e},Bi=function(t){return ho(t,_o)?t[_o]:{}},Li=function(t){return ho(t,_o)}}var xo={set:ji,get:Bi,has:Li,enforce:function(t){return Li(t)?Bi(t):ji(t,{})},getterFor:function(t){return function(e){var n;if(!co(e)||(n=Bi(e)).type!==t)throw bo("Incompatible receiver, "+t+" required");return n}}},Eo=ct,Oo=De,ko=Function.prototype,To=Eo&&Object.getOwnPropertyDescriptor,So=Oo(ko,"name"),Po={EXISTS:So,PROPER:So&&"something"===function(){}.name,CONFIGURABLE:So&&(!Eo||Eo&&To(ko,"name").configurable)},No={},Ro=ct,Do=Dn,Mo=Rn,jo=Ln,Bo=Mt,Lo=Br;No.f=Ro&&!Do?Object.defineProperties:function(t,e){jo(t);for(var n,r=Bo(e),i=Lo(e),o=i.length,g=0;o>g;)Mo.f(t,n=i[g++],r[n]);return t};var Fo,zo=Gt("document","documentElement"),Zo=Ln,Uo=No,Vo=Dr,Go=Or,Wo=zo,Yo=An,Ho="prototype",Ko="script",Qo=Io("IE_PROTO"),Xo=function(){},qo=function(t){return"<"+Ko+">"+t+""},Jo=function(t){t.write(qo("")),t.close();var e=t.parentWindow.Object;return t=null,e},$o=function(){try{Fo=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;$o="undefined"!=typeof document?document.domain&&Fo?Jo(Fo):(e=Yo("iframe"),n="java"+Ko+":",e.style.display="none",Wo.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(qo("document.F=Object")),t.close(),t.F):Jo(Fo);for(var r=Vo.length;r--;)delete $o[Ho][Vo[r]];return $o()};Go[Qo]=!0;var tg,eg,ng,rg=Object.create||function(t,e){var n;return null!==t?(Xo[Ho]=Zo(t),n=new Xo,Xo[Ho]=null,n[Qo]=t):n=$o(),void 0===e?n:Uo.f(n,e)},ig=!V((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),og=De,gg=at,sg=Pe,Ag=ig,Cg=Io("IE_PROTO"),Ig=Object,ag=Ig.prototype,ug=Ag?Ig.getPrototypeOf:function(t){var e=sg(t);if(og(e,Cg))return e[Cg];var n=e.constructor;return gg(n)&&e instanceof n?n.prototype:e instanceof Ig?ag:null},cg=Jn,lg=function(t,e,n,r){return r&&r.enumerable?t[e]=n:cg(t,e,n),t},hg=V,dg=at,fg=Lt,pg=rg,vg=ug,yg=lg,bg=Ke("iterator"),mg=!1;[].keys&&("next"in(ng=[].keys())?(eg=vg(vg(ng)))!==Object.prototype&&(tg=eg):mg=!0);var wg=!fg(tg)||hg((function(){var t={};return tg[bg].call(t)!==t}));dg((tg=wg?{}:pg(tg))[bg])||yg(tg,bg,(function(){return this}));var _g={IteratorPrototype:tg,BUGGY_SAFARI_ITERATORS:mg},xg=Yi,Eg=Fi?{}.toString:function(){return"[object "+xg(this)+"]"},Og=Fi,kg=Rn.f,Tg=Jn,Sg=De,Pg=Eg,Ng=Ke("toStringTag"),Rg=function(t,e,n,r){if(t){var i=n?t:t.prototype;Sg(i,Ng)||kg(i,Ng,{configurable:!0,value:e}),r&&!Og&&Tg(i,"toString",Pg)}},Dg={},Mg=_g.IteratorPrototype,jg=rg,Bg=wt,Lg=Rg,Fg=Dg,zg=function(){return this},Zg=tt,Ug=le,Vg=at,Gg=String,Wg=TypeError,Yg=Ln,Hg=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=function(t,e,n){try{return Zg(Ug(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(t){}}(Object.prototype,"__proto__","set"))(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return Yg(n),function(t){if("object"==typeof t||Vg(t))return t;throw Wg("Can't set "+Gg(t)+" as a prototype")}(r),e?t(n,r):n.__proto__=r,n}}():void 0),Kg=Ir,Qg=dt,Xg=ug,qg=Rg,Jg=lg,$g=Dg,ts=Po.PROPER,es=_g.BUGGY_SAFARI_ITERATORS,ns=Ke("iterator"),rs="keys",is="values",os="entries",gs=function(){return this},ss=function(t,e,n,r,i,o,g){!function(t,e,n,r){var i=e+" Iterator";t.prototype=jg(Mg,{next:Bg(+!r,n)}),Lg(t,i,!1,!0),Fg[i]=zg}(n,e,r);var s,A,C,I=function(t){if(t===i&&h)return h;if(!es&&t in c)return c[t];switch(t){case rs:case is:case os:return function(){return new n(this,t)}}return function(){return new n(this)}},a=e+" Iterator",u=!1,c=t.prototype,l=c[ns]||c["@@iterator"]||i&&c[i],h=!es&&l||I(i),d="Array"==e&&c.entries||l;if(d&&(s=Xg(d.call(new t)))!==Object.prototype&&s.next&&(qg(s,a,!0,!0),$g[a]=gs),ts&&i==is&&l&&l.name!==is&&(u=!0,h=function(){return Qg(l,this)}),i)if(A={values:I(is),keys:o?h:I(rs),entries:I(os)},g)for(C in A)(es||u||!(C in c))&&Jg(c,C,A[C]);else Kg({target:e,proto:!0,forced:es||u},A);return g&&c[ns]!==h&&Jg(c,ns,h,{name:i}),$g[e]=h,A},As=function(t,e){return{value:t,done:e}},Cs=io.charAt,Is=Qi,as=xo,us=ss,cs=As,ls="String Iterator",hs=as.set,ds=as.getterFor(ls);us(String,"String",(function(t){hs(this,{type:ls,string:Is(t),index:0})}),(function(){var t,e=ds(this),n=e.string,r=e.index;return r>=n.length?cs(void 0,!0):(t=Cs(n,r),e.index+=t.length,cs(t,!1))}));var fs=dt,ps=Ln,vs=fe,ys=function(t,e,n){var r,i;ps(t);try{if(!(r=vs(t,"return"))){if("throw"===e)throw n;return n}r=fs(r,t)}catch(t){i=!0,r=t}if("throw"===e)throw n;if(i)throw r;return ps(r),n},bs=Ln,ms=ys,ws=Dg,_s=Ke("iterator"),xs=Array.prototype,Es=function(t){return void 0!==t&&(ws.Array===t||xs[_s]===t)},Os=at,ks=Oe,Ts=tt(Function.toString);Os(ks.inspectSource)||(ks.inspectSource=function(t){return Ts(t)});var Ss=ks.inspectSource,Ps=tt,Ns=V,Rs=at,Ds=Yi,Ms=Ss,js=function(){},Bs=[],Ls=Gt("Reflect","construct"),Fs=/^\s*(?:class|function)\b/,zs=Ps(Fs.exec),Zs=!Fs.exec(js),Us=function(t){if(!Rs(t))return!1;try{return Ls(js,Bs,t),!0}catch(t){return!1}},Vs=function(t){if(!Rs(t))return!1;switch(Ds(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Zs||!!zs(Fs,Ms(t))}catch(t){return!0}};Vs.sham=!0;var Gs=!Ls||Ns((function(){var t;return Us(Us.call)||!Us(Object)||!Us((function(){t=!0}))||t}))?Vs:Us,Ws=rn,Ys=Rn,Hs=wt,Ks=function(t,e,n){var r=Ws(e);r in t?Ys.f(t,r,Hs(0,n)):t[r]=n},Qs=Yi,Xs=fe,qs=Tt,Js=Dg,$s=Ke("iterator"),tA=function(t){if(!qs(t))return Xs(t,$s)||Xs(t,"@@iterator")||Js[Qs(t)]},eA=dt,nA=le,rA=Ln,iA=Ie,oA=tA,gA=TypeError,sA=function(t,e){var n=arguments.length<2?oA(t):e;if(nA(n))return rA(eA(n,t));throw gA(iA(t)+" is not iterable")},AA=Nn,CA=dt,IA=Pe,aA=function(t,e,n,r){try{return r?e(bs(n)[0],n[1]):e(n)}catch(e){ms(t,"throw",e)}},uA=Es,cA=Gs,lA=br,hA=Ks,dA=sA,fA=tA,pA=Array,vA=Ke("iterator"),yA=!1;try{var bA=0,mA={next:function(){return{done:!!bA++}},return:function(){yA=!0}};mA[vA]=function(){return this},Array.from(mA,(function(){throw 2}))}catch(t){}var wA=function(t,e){if(!e&&!yA)return!1;var n=!1;try{var r={};r[vA]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n};Ir({target:"Array",stat:!0,forced:!wA((function(t){Array.from(t)}))},{from:function(t){var e=IA(t),n=cA(this),r=arguments.length,i=r>1?arguments[1]:void 0,o=void 0!==i;o&&(i=AA(i,r>2?arguments[2]:void 0));var g,s,A,C,I,a,u=fA(e),c=0;if(!u||this===pA&&uA(u))for(g=lA(e),s=n?new this(g):pA(g);g>c;c++)a=o?i(e[c],c):e[c],hA(s,c,a);else for(I=(C=dA(e,u)).next,s=n?new this:[];!(A=CA(I,C)).done;c++)a=o?aA(C,i,[A.value,c],!0):A.value,hA(s,c,a);return s.length=c,s}});var _A=Ft.Array.from;!function(t){t.exports=_A}(Di);var xA=L(Ri),EA={},OA={get exports(){return EA},set exports(t){EA=t}},kA={},TA={get exports(){return kA},set exports(t){kA=t}},SA=Mt,PA=Dg,NA=xo;Rn.f;var RA=ss,DA=As,MA="Array Iterator",jA=NA.set,BA=NA.getterFor(MA);RA(Array,"Array",(function(t,e){jA(this,{type:MA,target:SA(t),index:0,kind:e})}),(function(){var t=BA(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,DA(void 0,!0)):DA("keys"==n?r:"values"==n?e[r]:[r,e[r]],!1)}),"values"),PA.Arguments=PA.Array;var LA=tA,FA=U,zA=Yi,ZA=Jn,UA=Dg,VA=Ke("toStringTag");for(var GA in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var WA=FA[GA],YA=WA&&WA.prototype;YA&&zA(YA)!==VA&&ZA(YA,VA,GA),UA[GA]=UA.Array}var HA=LA;!function(t){t.exports=HA}(TA),function(t){t.exports=kA}(OA);var KA=L(EA),QA={},XA={get exports(){return QA},set exports(t){QA=t}},qA={},JA=Rr,$A=Dr.concat("length","prototype");qA.f=Object.getOwnPropertyNames||function(t){return JA(t,$A)};var tC={},eC=pr,nC=br,rC=Ks,iC=Array,oC=Math.max,gC=function(t,e,n){for(var r=nC(t),i=eC(e,r),o=eC(void 0===n?r:n,r),g=iC(oC(o-i,0)),s=0;ip;p++)if((s||p in h)&&(c=d(u=h[p],p,l),t))if(e)y[p]=c;else if(c)switch(t){case 3:return!0;case 5:return u;case 6:return p;case 2:FC(y,u)}else switch(t){case 4:return!1;case 7:FC(y,u)}return o?-1:r||i?i:y}},ZC={forEach:zC(0),map:zC(1),filter:zC(2),some:zC(3),every:zC(4),find:zC(5),findIndex:zC(6),filterReject:zC(7)},UC=Ir,VC=U,GC=dt,WC=tt,YC=ct,HC=ne,KC=V,QC=De,XC=Wt,qC=Ln,JC=Mt,$C=rn,tI=Qi,eI=wt,nI=rg,rI=Br,iI=qA,oI=tC,gI=Lr,sI=ut,AI=Rn,CI=No,II=ft,aI=lg,uI=cC,cI=me,lI=Or,hI=Fe,dI=Ke,fI=lC,pI=yC,vI=xC,yI=Rg,bI=xo,mI=ZC.forEach,wI=Io("hidden"),_I="Symbol",xI="prototype",EI=bI.set,OI=bI.getterFor(_I),kI=Object[xI],TI=VC.Symbol,SI=TI&&TI[xI],PI=VC.TypeError,NI=VC.QObject,RI=sI.f,DI=AI.f,MI=oI.f,jI=II.f,BI=WC([].push),LI=cI("symbols"),FI=cI("op-symbols"),zI=cI("wks"),ZI=!NI||!NI[xI]||!NI[xI].findChild,UI=YC&&KC((function(){return 7!=nI(DI({},"a",{get:function(){return DI(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=RI(kI,e);r&&delete kI[e],DI(t,e,n),r&&t!==kI&&DI(kI,e,r)}:DI,VI=function(t,e){var n=LI[t]=nI(SI);return EI(n,{type:_I,tag:t,description:e}),YC||(n.description=e),n},GI=function(t,e,n){t===kI&&GI(FI,e,n),qC(t);var r=$C(e);return qC(n),QC(LI,r)?(n.enumerable?(QC(t,wI)&&t[wI][r]&&(t[wI][r]=!1),n=nI(n,{enumerable:eI(0,!1)})):(QC(t,wI)||DI(t,wI,eI(1,{})),t[wI][r]=!0),UI(t,r,n)):DI(t,r,n)},WI=function(t,e){qC(t);var n=JC(e),r=rI(n).concat(QI(n));return mI(r,(function(e){YC&&!GC(YI,n,e)||GI(t,e,n[e])})),t},YI=function(t){var e=$C(t),n=GC(jI,this,e);return!(this===kI&&QC(LI,e)&&!QC(FI,e))&&(!(n||!QC(this,e)||!QC(LI,e)||QC(this,wI)&&this[wI][e])||n)},HI=function(t,e){var n=JC(t),r=$C(e);if(n!==kI||!QC(LI,r)||QC(FI,r)){var i=RI(n,r);return!i||!QC(LI,r)||QC(n,wI)&&n[wI][r]||(i.enumerable=!0),i}},KI=function(t){var e=MI(JC(t)),n=[];return mI(e,(function(t){QC(LI,t)||QC(lI,t)||BI(n,t)})),n},QI=function(t){var e=t===kI,n=MI(e?FI:JC(t)),r=[];return mI(n,(function(t){!QC(LI,t)||e&&!QC(kI,t)||BI(r,LI[t])})),r};HC||(aI(SI=(TI=function(){if(XC(SI,this))throw PI("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?tI(arguments[0]):void 0,e=hI(t),n=function(t){this===kI&&GC(n,FI,t),QC(this,wI)&&QC(this[wI],e)&&(this[wI][e]=!1),UI(this,e,eI(1,t))};return YC&&ZI&&UI(kI,e,{configurable:!0,set:n}),VI(e,t)})[xI],"toString",(function(){return OI(this).tag})),aI(TI,"withoutSetter",(function(t){return VI(hI(t),t)})),II.f=YI,AI.f=GI,CI.f=WI,sI.f=HI,iI.f=oI.f=KI,gI.f=QI,fI.f=function(t){return VI(dI(t),t)},YC&&uI(SI,"description",{configurable:!0,get:function(){return OI(this).description}})),UC({global:!0,constructor:!0,wrap:!0,forced:!HC,sham:!HC},{Symbol:TI}),mI(rI(zI),(function(t){pI(t)})),UC({target:_I,stat:!0,forced:!HC},{useSetter:function(){ZI=!0},useSimple:function(){ZI=!1}}),UC({target:"Object",stat:!0,forced:!HC,sham:!YC},{create:function(t,e){return void 0===e?nI(t):WI(nI(t),e)},defineProperty:GI,defineProperties:WI,getOwnPropertyDescriptor:HI}),UC({target:"Object",stat:!0,forced:!HC},{getOwnPropertyNames:KI}),vI(),yI(TI,_I),lI[wI]=!0;var XI=ne&&!!Symbol.for&&!!Symbol.keyFor,qI=Ir,JI=Gt,$I=De,ta=Qi,ea=me,na=XI,ra=ea("string-to-symbol-registry"),ia=ea("symbol-to-string-registry");qI({target:"Symbol",stat:!0,forced:!na},{for:function(t){var e=ta(t);if($I(ra,e))return ra[e];var n=JI("Symbol")(e);return ra[e]=n,ia[n]=e,n}});var oa=Ir,ga=De,sa=Ae,Aa=Ie,Ca=XI,Ia=me("symbol-to-string-registry");oa({target:"Symbol",stat:!0,forced:!Ca},{keyFor:function(t){if(!sa(t))throw TypeError(Aa(t)+" is not a symbol");if(ga(Ia,t))return Ia[t]}});var aa=OC,ua=at,ca=it,la=Qi,ha=tt([].push),da=Ir,fa=Gt,pa=Q,va=dt,ya=tt,ba=V,ma=at,wa=Ae,_a=ri,xa=ne,Ea=String,Oa=fa("JSON","stringify"),ka=ya(/./.exec),Ta=ya("".charAt),Sa=ya("".charCodeAt),Pa=ya("".replace),Na=ya(1..toString),Ra=/[\uD800-\uDFFF]/g,Da=/^[\uD800-\uDBFF]$/,Ma=/^[\uDC00-\uDFFF]$/,ja=!xa||ba((function(){var t=fa("Symbol")();return"[null]"!=Oa([t])||"{}"!=Oa({a:t})||"{}"!=Oa(Object(t))})),Ba=ba((function(){return'"\\udf06\\ud834"'!==Oa("\udf06\ud834")||'"\\udead"'!==Oa("\udead")})),La=function(t,e){var n=_a(arguments),r=function(t){if(ua(t))return t;if(aa(t)){for(var e=t.length,n=[],r=0;rs;)void 0!==(n=i(r,e=o[s++]))&&lu(g,e,n);return g}});var hu=Ft.Object.getOwnPropertyDescriptors;!function(t){t.exports=hu}(iu);var du=L(ru),fu={},pu={get exports(){return fu},set exports(t){fu=t}},vu={},yu={get exports(){return vu},set exports(t){vu=t}},bu=Ir,mu=ct,wu=No.f;bu({target:"Object",stat:!0,forced:Object.defineProperties!==wu,sham:!mu},{defineProperties:wu});var _u=Ft.Object,xu=yu.exports=function(t,e){return _u.defineProperties(t,e)};_u.defineProperties.sham&&(xu.sham=!0);var Eu=vu;!function(t){t.exports=Eu}(pu);var Ou=L(fu),ku={},Tu={get exports(){return ku},set exports(t){ku=t}},Su={},Pu={get exports(){return Su},set exports(t){Su=t}},Nu=Ir,Ru=ct,Du=Rn.f;Nu({target:"Object",stat:!0,forced:Object.defineProperty!==Du,sham:!Ru},{defineProperty:Du});var Mu=Ft.Object,ju=Pu.exports=function(t,e,n){return Mu.defineProperty(t,e,n)};Mu.defineProperty.sham&&(ju.sham=!0);var Bu=Su;!function(t){t.exports=Bu}(Tu);var Lu=L(ku);function Fu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var zu={},Zu={get exports(){return zu},set exports(t){zu=t}},Uu={},Vu=Bu;!function(t){t.exports=Vu}({get exports(){return Uu},set exports(t){Uu=t}}),function(t){t.exports=Uu}(Zu);var Gu=L(zu),Wu={},Yu={get exports(){return Wu},set exports(t){Wu=t}},Hu={},Ku={get exports(){return Hu},set exports(t){Hu=t}},Qu=TypeError,Xu=function(t){if(t>9007199254740991)throw Qu("Maximum allowed index exceeded");return t},qu=V,Ju=$t,$u=Ke("species"),tc=function(t){return Ju>=51||!qu((function(){var e=[];return(e.constructor={})[$u]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},ec=Ir,nc=V,rc=OC,ic=Lt,oc=Pe,gc=br,sc=Xu,Ac=Ks,Cc=RC,Ic=tc,ac=$t,uc=Ke("isConcatSpreadable"),cc=ac>=51||!nc((function(){var t=[];return t[uc]=!1,t.concat()[0]!==t})),lc=function(t){if(!ic(t))return!1;var e=t[uc];return void 0!==e?!!e:rc(t)};ec({target:"Array",proto:!0,arity:1,forced:!cc||!Ic("concat")},{concat:function(t){var e,n,r,i,o,g=oc(this),s=Cc(g,0),A=0;for(e=-1,r=arguments.length;et.length)&&(e=t.length);for(var n=0,r=new Array(e);n1?arguments[1]:void 0)}});var lh=fi("Array").map,hh=Wt,dh=lh,fh=Array.prototype,ph=function(t){var e=t.map;return t===fh||hh(fh,t)&&e===fh.map?dh:e};!function(t){t.exports=ph}(uh);var vh=L(ah),yh={},bh={get exports(){return yh},set exports(t){yh=t}},mh=Pe,wh=Br;Ir({target:"Object",stat:!0,forced:V((function(){wh(1)}))},{keys:function(t){return wh(mh(t))}});var _h=Ft.Object.keys;!function(t){t.exports=_h}(bh);var xh=L(yh),Eh={},Oh={get exports(){return Eh},set exports(t){Eh=t}},kh=Ir,Th=Date,Sh=tt(Th.prototype.getTime);kh({target:"Date",stat:!0},{now:function(){return Sh(new Th)}});var Ph=Ft.Date.now;!function(t){t.exports=Ph}(Oh);var Nh=L(Eh),Rh={},Dh={get exports(){return Rh},set exports(t){Rh=t}},Mh=V,jh=function(t,e){var n=[][t];return!!n&&Mh((function(){n.call(null,e||function(){return 1},1)}))},Bh=ZC.forEach,Lh=jh("forEach")?[].forEach:function(t){return Bh(this,t,arguments.length>1?arguments[1]:void 0)};Ir({target:"Array",proto:!0,forced:[].forEach!=Lh},{forEach:Lh});var Fh=fi("Array").forEach,zh=Yi,Zh=De,Uh=Wt,Vh=Fh,Gh=Array.prototype,Wh={DOMTokenList:!0,NodeList:!0},Yh=function(t){var e=t.forEach;return t===Gh||Uh(Gh,t)&&e===Gh.forEach||Zh(Wh,zh(t))?Vh:e};!function(t){t.exports=Yh}(Dh);var Hh=L(Rh),Kh={},Qh={get exports(){return Kh},set exports(t){Kh=t}},Xh=Ir,qh=OC,Jh=tt([].reverse),$h=[1,2];Xh({target:"Array",proto:!0,forced:String($h)===String($h.reverse())},{reverse:function(){return qh(this)&&(this.length=this.length),Jh(this)}});var td=fi("Array").reverse,ed=Wt,nd=td,rd=Array.prototype,id=function(t){var e=t.reverse;return t===rd||ed(rd,t)&&e===rd.reverse?nd:e};!function(t){t.exports=id}(Qh);var od=L(Kh),gd={},sd={get exports(){return gd},set exports(t){gd=t}},Ad=ct,Cd=OC,Id=TypeError,ad=Object.getOwnPropertyDescriptor,ud=Ad&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}(),cd=Ie,ld=TypeError,hd=function(t,e){if(!delete t[e])throw ld("Cannot delete property "+cd(e)+" of "+cd(t))},dd=Ir,fd=Pe,pd=pr,vd=lr,yd=br,bd=ud?function(t,e){if(Cd(t)&&!ad(t,"length").writable)throw Id("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e},md=Xu,wd=RC,_d=Ks,xd=hd,Ed=tc("splice"),Od=Math.max,kd=Math.min;dd({target:"Array",proto:!0,forced:!Ed},{splice:function(t,e){var n,r,i,o,g,s,A=fd(this),C=yd(A),I=pd(t,C),a=arguments.length;for(0===a?n=r=0:1===a?(n=0,r=C-I):(n=a-2,r=kd(Od(vd(e),0),C-I)),md(C+n-r),i=wd(A,r),o=0;oC-r+n;o--)xd(A,o-1)}else if(n>r)for(o=C-r;o>I;o--)s=o+n-1,(g=o+r-1)in A?A[s]=A[g]:xd(A,s);for(o=0;o1?arguments[1]:void 0)}});var Ld=fi("Array").includes,Fd=Lt,zd=it,Zd=Ke("match"),Ud=TypeError,Vd=Ke("match"),Gd=Ir,Wd=function(t){if(function(t){var e;return Fd(t)&&(void 0!==(e=t[Zd])?!!e:"RegExp"==zd(t))}(t))throw Ud("The method doesn't accept regular expressions");return t},Yd=Nt,Hd=Qi,Kd=tt("".indexOf);Gd({target:"String",proto:!0,forced:!function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[Vd]=!1,"/./"[t](e)}catch(t){}}return!1}("includes")},{includes:function(t){return!!~Kd(Hd(Yd(this)),Hd(Wd(t)),arguments.length>1?arguments[1]:void 0)}});var Qd=fi("String").includes,Xd=Wt,qd=Ld,Jd=Qd,$d=Array.prototype,tf=String.prototype,ef=function(t){var e=t.includes;return t===$d||Xd($d,t)&&e===$d.includes?qd:"string"==typeof t||t===tf||Xd(tf,t)&&e===tf.includes?Jd:e};!function(t){t.exports=ef}(jd);var nf=L(Md),rf={},of={get exports(){return rf},set exports(t){rf=t}},gf=Pe,sf=ug,Af=ig;Ir({target:"Object",stat:!0,forced:V((function(){sf(1)})),sham:!Af},{getPrototypeOf:function(t){return sf(gf(t))}});var Cf=Ft.Object.getPrototypeOf;!function(t){t.exports=Cf}(of);var If=L(rf),af={},uf={get exports(){return af},set exports(t){af=t}},cf=ZC.filter;Ir({target:"Array",proto:!0,forced:!tc("filter")},{filter:function(t){return cf(this,t,arguments.length>1?arguments[1]:void 0)}});var lf=fi("Array").filter,hf=Wt,df=lf,ff=Array.prototype,pf=function(t){var e=t.filter;return t===ff||hf(ff,t)&&e===ff.filter?df:e};!function(t){t.exports=pf}(uf);var vf=L(af),yf={},bf={get exports(){return yf},set exports(t){yf=t}},mf=ct,wf=tt,_f=Br,xf=Mt,Ef=wf(ft.f),Of=wf([].push),kf=function(t){return function(e){for(var n,r=xf(e),i=_f(r),o=i.length,g=0,s=[];o>g;)n=i[g++],mf&&!Ef(r,n)||Of(s,t?[n,r[n]]:r[n]);return s}},Tf=(kf(!0),kf(!1));Ir({target:"Object",stat:!0},{values:function(t){return Tf(t)}});var Sf=Ft.Object.values;!function(t){t.exports=Sf}(bf);var Pf={},Nf={get exports(){return Pf},set exports(t){Pf=t}},Rf="\t\n\v\f\r                 \u2028\u2029\ufeff",Df=Nt,Mf=Qi,jf=Rf,Bf=tt("".replace),Lf=RegExp("^["+jf+"]+"),Ff=RegExp("(^|[^"+jf+"])["+jf+"]+$"),zf=function(t){return function(e){var n=Mf(Df(e));return 1&t&&(n=Bf(n,Lf,"")),2&t&&(n=Bf(n,Ff,"$1")),n}},Zf={start:zf(1),end:zf(2),trim:zf(3)},Uf=U,Vf=V,Gf=tt,Wf=Qi,Yf=Zf.trim,Hf=Rf,Kf=Uf.parseInt,Qf=Uf.Symbol,Xf=Qf&&Qf.iterator,qf=/^[+-]?0x/i,Jf=Gf(qf.exec),$f=8!==Kf(Hf+"08")||22!==Kf(Hf+"0x16")||Xf&&!Vf((function(){Kf(Object(Xf))}))?function(t,e){var n=Yf(Wf(t));return Kf(n,e>>>0||(Jf(qf,n)?16:10))}:Kf;Ir({global:!0,forced:parseInt!=$f},{parseInt:$f});var tp=Ft.parseInt;!function(t){t.exports=tp}(Nf);var ep=L(Pf),np={},rp={get exports(){return np},set exports(t){np=t}},ip=Ir,op=Er.indexOf,gp=jh,sp=st([].indexOf),Ap=!!sp&&1/sp([1],1,-0)<0;ip({target:"Array",proto:!0,forced:Ap||!gp("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return Ap?sp(this,t,e)||0:op(this,t,e)}});var Cp=fi("Array").indexOf,Ip=Wt,ap=Cp,up=Array.prototype,cp=function(t){var e=t.indexOf;return t===up||Ip(up,t)&&e===up.indexOf?ap:e};!function(t){t.exports=cp}(rp);var lp,hp=L(np),dp={},fp={get exports(){return dp},set exports(t){dp=t}},pp=Po.PROPER,vp=Rf,yp=Zf.trim;Ir({target:"String",proto:!0,forced:(lp="trim",V((function(){return!!vp[lp]()||"​…᠎"!=="​…᠎"[lp]()||pp&&vp[lp].name!==lp})))},{trim:function(){return yp(this)}});var bp=fi("String").trim,mp=Wt,wp=bp,_p=String.prototype,xp=function(t){var e=t.trim;return"string"==typeof t||t===_p||mp(_p,t)&&e===_p.trim?wp:e};!function(t){t.exports=xp}(fp);var Ep={},Op={get exports(){return Ep},set exports(t){Ep=t}};Ir({target:"Object",stat:!0,sham:!ct},{create:rg});var kp=Ft.Object,Tp=function(t,e){return kp.create(t,e)};!function(t){t.exports=Tp}(Op);var Sp=L(Ep),Pp={},Np={get exports(){return Pp},set exports(t){Pp=t}},Rp=Ft,Dp=Q;Rp.JSON||(Rp.JSON={stringify:JSON.stringify});var Mp=function(t,e,n){return Dp(Rp.JSON.stringify,null,arguments)};!function(t){t.exports=Mp}(Np);var jp=L(Pp),Bp={},Lp={get exports(){return Bp},set exports(t){Bp=t}},Fp="function"==typeof Bun&&Bun&&"string"==typeof Bun.version,zp=TypeError,Zp=function(t,e){if(tn,g=Gp(r)?r:Qp(r),s=o?Hp(arguments,n):[],A=o?function(){Vp(g,this,s)}:g;return e?t(A,i):t(A)}:t},Jp=Ir,$p=U,tv=qp($p.setInterval,!0);Jp({global:!0,bind:!0,forced:$p.setInterval!==tv},{setInterval:tv});var ev=Ir,nv=U,rv=qp(nv.setTimeout,!0);ev({global:!0,bind:!0,forced:nv.setTimeout!==rv},{setTimeout:rv});var iv=Ft.setTimeout;!function(t){t.exports=iv}(Lp);var ov=L(Bp),gv={},sv={get exports(){return gv},set exports(t){gv=t}},Av=Pe,Cv=pr,Iv=br;Ir({target:"Array",proto:!0},{fill:function(t){for(var e=Av(this),n=Iv(e),r=arguments.length,i=Cv(r>1?arguments[1]:void 0,n),o=r>2?arguments[2]:void 0,g=void 0===o?n:Cv(o,n);g>i;)e[i++]=t;return e}});var av=fi("Array").fill,uv=Wt,cv=av,lv=Array.prototype,hv=function(t){var e=t.fill;return t===lv||uv(lv,t)&&e===lv.fill?cv:e};!function(t){t.exports=hv}(sv);var dv=L(gv);function fv(){return fv=Object.assign||function(t){for(var e=1;e-1}var oy=function(){function t(t,e){this.manager=t,this.set(e)}var e=t.prototype;return e.set=function(t){t===Sv&&(t=this.compute()),Tv&&this.manager.element.style&&jv[t]&&(this.manager.element.style[kv]=t),this.actions=t.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var t=[];return ny(this.manager.recognizers,(function(e){ry(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))})),function(t){if(iy(t,Rv))return Rv;var e=iy(t,Dv),n=iy(t,Mv);return e&&n?Rv:e||n?e?Dv:Mv:iy(t,Nv)?Nv:Pv}(t.join(" "))},e.preventDefaults=function(t){var e=t.srcEvent,n=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var r=this.actions,i=iy(r,Rv)&&!jv[Rv],o=iy(r,Mv)&&!jv[Mv],g=iy(r,Dv)&&!jv[Dv];if(i){var s=1===t.pointers.length,A=t.distance<2,C=t.deltaTime<250;if(s&&A&&C)return}if(!g||!o)return i||o&&n&qv||g&&n&Jv?this.preventSrc(e):void 0}},e.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},t}();function gy(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function sy(t){var e=t.length;if(1===e)return{x:_v(t[0].clientX),y:_v(t[0].clientY)};for(var n=0,r=0,i=0;i=xv(e)?t<0?Hv:Kv:e<0?Qv:Xv}function uy(t,e,n){return{x:e/t||0,y:n/t||0}}function cy(t,e,n){var r=n.pointers.length,i=n.changedPointers.length,o=e&Vv&&r-i==0,g=e&(Gv|Wv)&&r-i==0;n.isFirst=!!o,n.isFinal=!!g,o&&(t.session={}),n.eventType=e,function(t,e){var n=t.session,r=e.pointers,i=r.length;n.firstInput||(n.firstInput=Ay(e)),i>1&&!n.firstMultiple?n.firstMultiple=Ay(e):1===i&&(n.firstMultiple=!1);var o=n.firstInput,g=n.firstMultiple,s=g?g.center:o.center,A=e.center=sy(r);e.timeStamp=Ev(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=Iy(s,A),e.distance=Cy(s,A),function(t,e){var n=e.center,r=t.offsetDelta||{},i=t.prevDelta||{},o=t.prevInput||{};e.eventType!==Vv&&o.eventType!==Gv||(i=t.prevDelta={x:o.deltaX||0,y:o.deltaY||0},r=t.offsetDelta={x:n.x,y:n.y}),e.deltaX=i.x+(n.x-r.x),e.deltaY=i.y+(n.y-r.y)}(n,e),e.offsetDirection=ay(e.deltaX,e.deltaY);var C,I,a=uy(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=a.x,e.overallVelocityY=a.y,e.overallVelocity=xv(a.x)>xv(a.y)?a.x:a.y,e.scale=g?(C=g.pointers,Cy((I=r)[0],I[1],ey)/Cy(C[0],C[1],ey)):1,e.rotation=g?function(t,e){return Iy(e[1],e[0],ey)+Iy(t[1],t[0],ey)}(g.pointers,r):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,function(t,e){var n,r,i,o,g=t.lastInterval||e,s=e.timeStamp-g.timeStamp;if(e.eventType!==Wv&&(s>Uv||void 0===g.velocity)){var A=e.deltaX-g.deltaX,C=e.deltaY-g.deltaY,I=uy(s,A,C);r=I.x,i=I.y,n=xv(I.x)>xv(I.y)?I.x:I.y,o=ay(A,C),t.lastInterval=e}else n=g.velocity,r=g.velocityX,i=g.velocityY,o=g.direction;e.velocity=n,e.velocityX=r,e.velocityY=i,e.direction=o}(n,e);var u,c=t.element,l=e.srcEvent;gy(u=l.composedPath?l.composedPath()[0]:l.path?l.path[0]:l.target,c)&&(c=u),e.target=c}(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function ly(t){return t.trim().split(/\s+/g)}function hy(t,e,n){ny(ly(e),(function(e){t.addEventListener(e,n,!1)}))}function dy(t,e,n){ny(ly(e),(function(e){t.removeEventListener(e,n,!1)}))}function fy(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||window}var py=function(){function t(t,e){var n=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){ry(t.options.enable,[t])&&n.handler(e)},this.init()}var e=t.prototype;return e.handler=function(){},e.init=function(){this.evEl&&hy(this.element,this.evEl,this.domHandler),this.evTarget&&hy(this.target,this.evTarget,this.domHandler),this.evWin&&hy(fy(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&dy(this.element,this.evEl,this.domHandler),this.evTarget&&dy(this.target,this.evTarget,this.domHandler),this.evWin&&dy(fy(this.element),this.evWin,this.domHandler)},t}();function vy(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var r=0;rn[e]})):r.sort()),r}var Oy={touchstart:Vv,touchmove:2,touchend:Gv,touchcancel:Wv},ky=function(t){function e(){var n;return e.prototype.evTarget="touchstart touchmove touchend touchcancel",(n=t.apply(this,arguments)||this).targetIds={},n}return pv(e,t),e.prototype.handler=function(t){var e=Oy[t.type],n=Ty.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:zv,srcEvent:t})},e}(py);function Ty(t,e){var n,r,i=xy(t.touches),o=this.targetIds;if(e&(2|Vv)&&1===i.length)return o[i[0].identifier]=!0,[i,i];var g=xy(t.changedTouches),s=[],A=this.target;if(r=i.filter((function(t){return gy(t.target,A)})),e===Vv)for(n=0;n-1&&r.splice(t,1)}),Ny)}}function Dy(t,e){t&Vv?(this.primaryTouch=e.changedPointers[0].identifier,Ry.call(this,e)):t&(Gv|Wv)&&Ry.call(this,e)}function My(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,r=0;r-1&&this.requireFail.splice(e,1),this},e.hasRequireFailures=function(){return this.requireFail.length>0},e.canRecognizeWith=function(t){return!!this.simultaneous[t.id]},e.emit=function(t){var e=this,n=this.state;function r(n){e.manager.emit(n,t)}n<8&&r(e.options.event+Zy(n)),r(e.options.event),t.additionalEvent&&r(t.additionalEvent),n>=8&&r(e.options.event+Zy(n))},e.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=Ly},e.canEmit=function(){for(var t=0;te.threshold&&i&e.direction},n.attrTest=function(t){return Gy.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},n.emit=function(e){this.pX=e.deltaX,this.pY=e.deltaY;var n=Wy(e.direction);n&&(e.additionalEvent=this.options.event+n),t.prototype.emit.call(this,e)},e}(Gy),Hy=function(t){function e(e){return void 0===e&&(e={}),t.call(this,fv({event:"swipe",threshold:10,velocity:.3,direction:qv|Jv,pointers:1},e))||this}pv(e,t);var n=e.prototype;return n.getTouchAction=function(){return Yy.prototype.getTouchAction.call(this)},n.attrTest=function(e){var n,r=this.options.direction;return r&(qv|Jv)?n=e.overallVelocity:r&qv?n=e.overallVelocityX:r&Jv&&(n=e.overallVelocityY),t.prototype.attrTest.call(this,e)&&r&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers===this.options.pointers&&xv(n)>this.options.velocity&&e.eventType&Gv},n.emit=function(t){var e=Wy(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)},e}(Gy),Ky=function(t){function e(e){return void 0===e&&(e={}),t.call(this,fv({event:"pinch",threshold:0,pointers:2},e))||this}pv(e,t);var n=e.prototype;return n.getTouchAction=function(){return[Rv]},n.attrTest=function(e){return t.prototype.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||2&this.state)},n.emit=function(e){if(1!==e.scale){var n=e.scale<1?"in":"out";e.additionalEvent=this.options.event+n}t.prototype.emit.call(this,e)},e}(Gy),Qy=function(t){function e(e){return void 0===e&&(e={}),t.call(this,fv({event:"rotate",threshold:0,pointers:2},e))||this}pv(e,t);var n=e.prototype;return n.getTouchAction=function(){return[Rv]},n.attrTest=function(e){return t.prototype.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)},e}(Gy),Xy=function(t){function e(e){var n;return void 0===e&&(e={}),(n=t.call(this,fv({event:"press",pointers:1,time:251,threshold:9},e))||this)._timer=null,n._input=null,n}pv(e,t);var n=e.prototype;return n.getTouchAction=function(){return[Pv]},n.process=function(t){var e=this,n=this.options,r=t.pointers.length===n.pointers,i=t.distancen.time;if(this._input=t,!i||!r||t.eventType&(Gv|Wv)&&!o)this.reset();else if(t.eventType&Vv)this.reset(),this._timer=setTimeout((function(){e.state=8,e.tryEmit()}),n.time);else if(t.eventType&Gv)return 8;return Ly},n.reset=function(){clearTimeout(this._timer)},n.emit=function(t){8===this.state&&(t&&t.eventType&Gv?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=Ev(),this.manager.emit(this.options.event,this._input)))},e}(Uy),qy={domEvents:!1,touchAction:Sv,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Jy=[[Qy,{enable:!1}],[Ky,{enable:!1},["rotate"]],[Hy,{direction:qv}],[Yy,{direction:qv},["swipe"]],[Vy],[Vy,{event:"doubletap",taps:2},["tap"]],[Xy]];function $y(t,e){var n,r=t.element;r.style&&(ny(t.options.cssProps,(function(i,o){n=Ov(r.style,o),e?(t.oldCssProps[n]=r.style[n],r.style[n]=i):r.style[n]=t.oldCssProps[n]||""})),e||(t.oldCssProps={}))}var tb=function(){function t(t,e){var n=this;this.options=bv({},qy,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new(this.options.inputClass||(Lv?_y:Fv?ky:Bv?jy:Py))(this,cy),this.touchAction=new oy(this,this.options.touchAction),$y(this,!0),ny(this.options.recognizers,(function(t){var e=n.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])}),this)}var e=t.prototype;return e.set=function(t){return bv(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},e.stop=function(t){this.session.stopped=t?2:1},e.recognize=function(t){var e=this.session;if(!e.stopped){var n;this.touchAction.preventDefaults(t);var r=this.recognizers,i=e.curRecognizer;(!i||i&&8&i.state)&&(e.curRecognizer=null,i=null);for(var o=0;o\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",i=window.console&&(window.console.warn||window.console.log);return i&&i.call(window.console,r,n),t.apply(this,arguments)}}var ob=ib((function(t,e,n){for(var r=Object.keys(e),i=0;i=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,g=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return g=t.done,t},e:function(t){s=!0,o=t},f:function(){try{g||null==n.return||n.return()}finally{if(s)throw o}}}}function ub(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n2)return hb.apply(void 0,nh(r=[lb(e[0],e[1])]).call(r,Yl(ih(e).call(e,2))));var i,o=e[0],g=e[1],s=ab(Ah(g));try{for(s.s();!(i=s.n()).done;){var A=i.value;Object.prototype.propertyIsEnumerable.call(g,A)&&(g[A]===cb?delete o[A]:null===o[A]||null===g[A]||"object"!==Qc(o[A])||"object"!==Qc(g[A])||Ih(o[A])||Ih(g[A])?o[A]=db(g[A]):o[A]=hb(o[A],g[A]))}}catch(t){s.e(t)}finally{s.f()}return o}function db(t){return Ih(t)?vh(t).call(t,(function(t){return db(t)})):"object"===Qc(t)&&null!==t?hb({},t):t}function fb(t){for(var e=0,n=xh(t);e>>0,t=(i*=t)>>>0,t+=4294967296*(i-=t)}return 2.3283064365386963e-10*(t>>>0)}}(),e=t(" "),n=t(" "),r=t(" "),i=0;i2&&void 0!==arguments[2]&&arguments[2];for(var r in t)if(void 0!==e[r])if(null===e[r]||"object"!==Qc(e[r]))kb(t,e,r,n);else{var i=t[r],o=e[r];Ob(i)&&Ob(o)&&Tb(i,o,n)}}function Sb(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(Ih(n))throw new TypeError("Arrays are not supported by deepExtend");for(var i=0;i3&&void 0!==arguments[3]&&arguments[3];if(Ih(n))throw new TypeError("Arrays are not supported by deepExtend");for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&!nf(t).call(t,i))if(n[i]&&n[i].constructor===Object)void 0===e[i]&&(e[i]={}),e[i].constructor===Object?Nb(e[i],n[i]):kb(e,n,i,r);else if(Ih(n[i])){e[i]=[];for(var o=0;o2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)||!0===n)if("object"===Qc(e[i])&&null!==e[i]&&If(e[i])===Object.prototype)void 0===t[i]?t[i]=Nb({},e[i],n):"object"===Qc(t[i])&&null!==t[i]&&If(t[i])===Object.prototype?Nb(t[i],e[i],n):kb(t,e,i,r);else if(Ih(e[i])){var o;t[i]=ih(o=e[i]).call(o)}else kb(t,e,i,r);return t}function Rb(t,e){var n;return nh(n=[]).call(n,Yl(t),[e])}function Db(t){return t.getBoundingClientRect().top}function Mb(t,e){if(Ih(t))for(var n=t.length,r=0;r3&&void 0!==arguments[3]?arguments[3]:{},i=function(t){return null!=t},o=function(t){return null!==t&&"object"===Qc(t)};if(!o(t))throw new Error("Parameter mergeTarget must be an object");if(!o(e))throw new Error("Parameter options must be an object");if(!i(n))throw new Error("Parameter option must have a value");if(!o(r))throw new Error("Parameter globalOptions must be an object");var g=e[n],s=o(r)&&!function(t){for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}(r)?r[n]:void 0,A=s?s.enabled:void 0;if(void 0!==g){if("boolean"==typeof g)return o(t[n])||(t[n]={}),void(t[n].enabled=g);if(null===g&&!o(t[n])){if(!i(s))return;t[n]=Sp(s)}if(o(g)){var C=!0;void 0!==g.enabled?C=g.enabled:void 0!==A&&(C=s.enabled),function(t,e,n){o(t[n])||(t[n]={});var r=e[n],i=t[n];for(var g in r)Object.prototype.hasOwnProperty.call(r,g)&&(i[g]=r[g])}(t,e,n),t[n].enabled=C}}}var Hb={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return t*(2-t)},easeInOutQuad:function(t){return t<.5?2*t*t:(4-2*t)*t-1},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return--t*t*t+1},easeInOutCubic:function(t){return t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return 1- --t*t*t*t},easeInOutQuart:function(t){return t<.5?8*t*t*t*t:1-8*--t*t*t*t},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return 1+--t*t*t*t*t},easeInOutQuint:function(t){return t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t}};function Kb(t,e){var n;Ih(e)||(e=[e]);var r,i=ab(t);try{for(i.s();!(r=i.n()).done;){var o=r.value;if(o){n=o[e[0]];for(var g=1;g0&&void 0!==arguments[0]?arguments[0]:1;Fu(this,t),this.pixelRatio=e,this.generated=!1,this.centerCoordinates={x:144.5,y:144.5},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=function(){},this.closeCallback=function(){},this._create()}return il(t,[{key:"insertTo",value:function(t){void 0!==this.hammer&&(this.hammer.destroy(),this.hammer=void 0),this.container=t,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}},{key:"setUpdateCallback",value:function(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker update callback is not a function.");this.updateCallback=t}},{key:"setCloseCallback",value:function(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker closing callback is not a function.");this.closeCallback=t}},{key:"_isColorString",value:function(t){if("string"==typeof t)return Qb[t]}},{key:"setColor",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if("none"!==t){var n,r=this._isColorString(t);if(void 0!==r&&(t=r),!0===Eb(t)){if(!0===Gb(t)){var i=t.substr(4).substr(0,t.length-5).split(",");n={r:i[0],g:i[1],b:i[2],a:1}}else if(!0===function(t){return _b.test(t)}(t)){var o=t.substr(5).substr(0,t.length-6).split(",");n={r:o[0],g:o[1],b:o[2],a:o[3]}}else if(!0===Vb(t)){var g=jb(t);n={r:g.r,g:g.g,b:g.b,a:1}}}else if(t instanceof Object&&void 0!==t.r&&void 0!==t.g&&void 0!==t.b){var s=void 0!==t.a?t.a:"1.0";n={r:t.r,g:t.g,b:t.b,a:s}}if(void 0===n)throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: "+jp(t));this._setColor(n,e)}}},{key:"show",value:function(){void 0!==this.closeCallback&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}},{key:"_hide",value:function(){var t=this;!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&(this.previousColor=ti({},this.color)),!0===this.applied&&this.updateCallback(this.initialColor),this.frame.style.display="none",ov((function(){void 0!==t.closeCallback&&(t.closeCallback(),t.closeCallback=void 0)}),0)}},{key:"_save",value:function(){this.updateCallback(this.color),this.applied=!1,this._hide()}},{key:"_apply",value:function(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}},{key:"_loadLast",value:function(){void 0!==this.previousColor?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}},{key:"_setColor",value:function(t){!0===(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&(this.initialColor=ti({},t)),this.color=t;var e=zb(t.r,t.g,t.b),n=2*Math.PI,r=this.r*e.s,i=this.centerCoordinates.x+r*Math.sin(n*e.h),o=this.centerCoordinates.y+r*Math.cos(n*e.h);this.colorPickerSelector.style.left=i-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=o-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(t)}},{key:"_setOpacity",value:function(t){this.color.a=t/100,this._updatePicker(this.color)}},{key:"_setBrightness",value:function(t){var e=zb(this.color.r,this.color.g,this.color.b);e.v=t/100;var n=Zb(e.h,e.s,e.v);n.a=this.color.a,this.color=n,this._updatePicker()}},{key:"_updatePicker",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.color,e=zb(t.r,t.g,t.b),n=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(n.webkitBackingStorePixelRatio||n.mozBackingStorePixelRatio||n.msBackingStorePixelRatio||n.oBackingStorePixelRatio||n.backingStorePixelRatio||1)),n.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var r=this.colorPickerCanvas.clientWidth,i=this.colorPickerCanvas.clientHeight;n.clearRect(0,0,r,i),n.putImageData(this.hueCircle,0,0),n.fillStyle="rgba(0,0,0,"+(1-e.v)+")",n.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),dv(n).call(n),this.brightnessRange.value=100*e.v,this.opacityRange.value=100*t.a,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}},{key:"_setSize",value:function(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}},{key:"_create",value:function(){var t,e,n,r;if(this.frame=document.createElement("div"),this.frame.className="vis-color-picker",this.colorPickerDiv=document.createElement("div"),this.colorPickerSelector=document.createElement("div"),this.colorPickerSelector.className="vis-selector",this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement("canvas"),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){var i=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(i.webkitBackingStorePixelRatio||i.mozBackingStorePixelRatio||i.msBackingStorePixelRatio||i.oBackingStorePixelRatio||i.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{var o=document.createElement("DIV");o.style.color="red",o.style.fontWeight="bold",o.style.padding="10px",o.innerText="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(o)}this.colorPickerDiv.className="vis-color",this.opacityDiv=document.createElement("div"),this.opacityDiv.className="vis-opacity",this.brightnessDiv=document.createElement("div"),this.brightnessDiv.className="vis-brightness",this.arrowDiv=document.createElement("div"),this.arrowDiv.className="vis-arrow",this.opacityRange=document.createElement("input");try{this.opacityRange.type="range",this.opacityRange.min="0",this.opacityRange.max="100"}catch(t){}this.opacityRange.value="100",this.opacityRange.className="vis-range",this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range",this.brightnessRange.min="0",this.brightnessRange.max="100"}catch(t){}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);var g=this;this.opacityRange.onchange=function(){g._setOpacity(this.value)},this.opacityRange.oninput=function(){g._setOpacity(this.value)},this.brightnessRange.onchange=function(){g._setBrightness(this.value)},this.brightnessRange.oninput=function(){g._setBrightness(this.value)},this.brightnessLabel=document.createElement("div"),this.brightnessLabel.className="vis-label vis-brightness",this.brightnessLabel.innerText="brightness:",this.opacityLabel=document.createElement("div"),this.opacityLabel.className="vis-label vis-opacity",this.opacityLabel.innerText="opacity:",this.newColorDiv=document.createElement("div"),this.newColorDiv.className="vis-new-color",this.newColorDiv.innerText="new",this.initialColorDiv=document.createElement("div"),this.initialColorDiv.className="vis-initial-color",this.initialColorDiv.innerText="initial",this.cancelButton=document.createElement("div"),this.cancelButton.className="vis-button vis-cancel",this.cancelButton.innerText="cancel",this.cancelButton.onclick=wi(t=this._hide).call(t,this,!1),this.applyButton=document.createElement("div"),this.applyButton.className="vis-button vis-apply",this.applyButton.innerText="apply",this.applyButton.onclick=wi(e=this._apply).call(e,this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerText="save",this.saveButton.onclick=wi(n=this._save).call(n,this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerText="load last",this.loadButton.onclick=wi(r=this._loadLast).call(r,this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}},{key:"_bindHammer",value:function(){var t=this;this.drag={},this.pinch={},this.hammer=new vb(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.on("hammer.input",(function(e){e.isFirst&&t._moveSelector(e)})),this.hammer.on("tap",(function(e){t._moveSelector(e)})),this.hammer.on("panstart",(function(e){t._moveSelector(e)})),this.hammer.on("panmove",(function(e){t._moveSelector(e)})),this.hammer.on("panend",(function(e){t._moveSelector(e)}))}},{key:"_generateHueCircle",value:function(){if(!1===this.generated){var t=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1)),t.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var e,n,r,i,o=this.colorPickerCanvas.clientWidth,g=this.colorPickerCanvas.clientHeight;t.clearRect(0,0,o,g),this.centerCoordinates={x:.5*o,y:.5*g},this.r=.49*o;var s,A=2*Math.PI/360,C=1/this.r;for(r=0;r<360;r++)for(i=0;i3&&void 0!==arguments[3]?arguments[3]:1,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){return!1};Fu(this,t),this.parent=e,this.changedOptions=[],this.container=n,this.allowCreation=!1,this.hideOption=o,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},ti(this.options,this.defaultOptions),this.configureOptions=r,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new Xb(i),this.wrapper=void 0}return il(t,[{key:"setOptions",value:function(t){if(void 0!==t){this.popupHistory={},this._removePopup();var e=!0;if("string"==typeof t)this.options.filter=t;else if(Ih(t))this.options.filter=t.join();else if("object"===Qc(t)){if(null==t)throw new TypeError("options cannot be null");void 0!==t.container&&(this.options.container=t.container),void 0!==vf(t)&&(this.options.filter=vf(t)),void 0!==t.showButton&&(this.options.showButton=t.showButton),void 0!==t.enabled&&(e=t.enabled)}else"boolean"==typeof t?(this.options.filter=!0,e=t):"function"==typeof t&&(this.options.filter=t,e=!0);!1===vf(this.options)&&(e=!1),this.options.enabled=e}this._clean()}},{key:"setModuleOptions",value:function(t){this.moduleOptions=t,!0===this.options.enabled&&(this._clean(),void 0!==this.options.container&&(this.container=this.options.container),this._create())}},{key:"_create",value:function(){this._clean(),this.changedOptions=[];var t=vf(this.options),e=0,n=!1;for(var r in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,r)&&(this.allowCreation=!1,n=!1,"function"==typeof t?n=(n=t(r,[]))||this._handleObject(this.configureOptions[r],[r],!0):!0!==t&&-1===hp(t).call(t,r)||(n=!0),!1!==n&&(this.allowCreation=!0,e>0&&this._makeItem([]),this._makeHeader(r),this._handleObject(this.configureOptions[r],[r])),e++);this._makeButton(),this._push()}},{key:"_push",value:function(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(var t=0;t1?n-1:0),i=1;i2&&void 0!==arguments[2]&&arguments[2],r=document.createElement("div");if(r.className="vis-configuration vis-config-label vis-config-s"+e.length,!0===n){for(;r.firstChild;)r.removeChild(r.firstChild);r.appendChild(qb("i","b",t))}else r.innerText=t+":";return r}},{key:"_makeDropdown",value:function(t,e,n){var r=document.createElement("select");r.className="vis-configuration vis-config-select";var i=0;void 0!==e&&-1!==hp(t).call(t,e)&&(i=hp(t).call(t,e));for(var o=0;oo&&1!==o&&(s.max=Math.ceil(e*I),C=s.max,A="range increased"),s.value=e}else s.value=r;var a=document.createElement("input");a.className="vis-configuration vis-config-rangeinput",a.value=s.value;var u=this;s.onchange=function(){a.value=this.value,u._update(Number(this.value),n)},s.oninput=function(){a.value=this.value};var c=this._makeLabel(n[n.length-1],n),l=this._makeItem(n,c,s,a);""!==A&&this.popupHistory[l]!==C&&(this.popupHistory[l]=C,this._setupPopup(A,l))}},{key:"_makeButton",value:function(){var t=this;if(!0===this.options.showButton){var e=document.createElement("div");e.className="vis-configuration vis-config-button",e.innerText="generate options",e.onclick=function(){t._printOptions()},e.onmouseover=function(){e.className="vis-configuration vis-config-button hover"},e.onmouseout=function(){e.className="vis-configuration vis-config-button"},this.optionsContainer=document.createElement("div"),this.optionsContainer.className="vis-configuration vis-config-option-container",this.domElements.push(this.optionsContainer),this.domElements.push(e)}}},{key:"_setupPopup",value:function(t,e){var n=this;if(!0===this.initialized&&!0===this.allowCreation&&this.popupCounter1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=!1,i=vf(this.options),o=!1;for(var g in t)if(Object.prototype.hasOwnProperty.call(t,g)){r=!0;var s=t[g],A=Rb(e,g);if("function"==typeof i&&!1===(r=i(g,e))&&!Ih(s)&&"string"!=typeof s&&"boolean"!=typeof s&&s instanceof Object&&(this.allowCreation=!1,r=this._handleObject(s,A,!0),this.allowCreation=!1===n),!1!==r){o=!0;var C=this._getValue(A);if(Ih(s))this._handleArray(s,C,A);else if("string"==typeof s)this._makeTextInput(s,C,A);else if("boolean"==typeof s)this._makeCheckbox(s,C,A);else if(s instanceof Object){if(!this.hideOption(e,g,this.moduleOptions))if(void 0!==s.enabled){var I=Rb(A,"enabled"),a=this._getValue(I);if(!0===a){var u=this._makeLabel(g,A,!0);this._makeItem(A,u),o=this._handleObject(s,A)||o}else this._makeCheckbox(s,a,A)}else{var c=this._makeLabel(g,A,!0);this._makeItem(A,c),o=this._handleObject(s,A)||o}}else console.error("dont know how to handle",s,g,A)}}return o}},{key:"_handleArray",value:function(t,e,n){"string"==typeof t[0]&&"color"===t[0]?(this._makeColorField(t,e,n),t[1]!==e&&this.changedOptions.push({path:n,value:e})):"string"==typeof t[0]?(this._makeDropdown(t,e,n),t[0]!==e&&this.changedOptions.push({path:n,value:e})):"number"==typeof t[0]&&(this._makeRange(t,e,n),t[0]!==e&&this.changedOptions.push({path:n,value:Number(e)}))}},{key:"_update",value:function(t,e){var n=this._constructOptions(t,e);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",n),this.initialized=!0,this.parent.setOptions(n)}},{key:"_constructOptions",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n;t="false"!==(t="true"===t||t)&&t;for(var i=0;ii-this.padding&&(s=!0),o=s?this.x-n:this.x,g=A?this.y-e:this.y}else(g=this.y-e)+e+this.padding>r&&(g=r-e-this.padding),gi&&(o=i-n-this.padding),og.distance?" in "+t.printLocation(o.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+t.printLocation(g.path,g.closestMatch,""):o.distance<=8?'. Did you mean "'+o.closestMatch+'"?'+t.printLocation(o.path,e):". Did you mean one of these: "+t.print(xh(n))+t.printLocation(r,e),console.error('%cUnknown option detected: "'+e+'"'+i,nm),em=!0}},{key:"findInOptions",value:function(e,n,r){var i,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],g=1e9,s="",A=[],C=e.toLowerCase(),I=void 0;for(var a in n){var u=void 0;if(void 0!==n[a].__type__&&!0===o){var c=t.findInOptions(e,n[a],Rb(r,a));g>c.distance&&(s=c.closestMatch,A=c.path,g=c.distance,I=c.indexMatch)}else{var l;-1!==hp(l=a.toLowerCase()).call(l,C)&&(I=a),g>(u=t.levenshteinDistance(e,a))&&(s=a,A=ih(i=r).call(i),g=u)}}return{closestMatch:s,path:A,distance:g,indexMatch:I}}},{key:"printLocation",value:function(t,e){for(var n="\n\n"+(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Problem value found at: \n")+"options = {\n",r=0;r":!0,"--":!0},lm="",hm=0,dm="",fm="",pm=um.NULL;function vm(){hm++,dm=lm.charAt(hm)}function ym(){return lm.charAt(hm+1)}function bm(t){var e=t.charCodeAt(0);return e<47?35===e||46===e:e<59?e>47:e<91?e>64:e<96?95===e:e<123&&e>96}function mm(t,e){if(t||(t={}),e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function wm(t,e,n){for(var r=e.split("."),i=t;r.length;){var o=r.shift();r.length?(i[o]||(i[o]={}),i=i[o]):i[o]=n}}function _m(t,e){for(var n,r,i=null,o=[t],g=t;g.parent;)o.push(g.parent),g=g.parent;if(g.nodes)for(n=0,r=g.nodes.length;n=0;n--){var s,A=o[n];A.nodes||(A.nodes=[]),-1===hp(s=A.nodes).call(s,i)&&A.nodes.push(i)}e.attr&&(i.attr=mm(i.attr,e.attr))}function xm(t,e){if(t.edges||(t.edges=[]),t.edges.push(e),t.edge){var n=mm({},t.edge);e.attr=mm(n,e.attr)}}function Em(t,e,n,r,i){var o={from:e,to:n,type:r};return t.edge&&(o.attr=mm({},t.edge)),o.attr=mm(o.attr||{},i),null!=i&&i.hasOwnProperty("arrows")&&null!=i.arrows&&(o.arrows={to:{enabled:!0,type:i.arrows.type}},i.arrows=null),o}function Om(){for(pm=um.NULL,fm="";" "===dm||"\t"===dm||"\n"===dm||"\r"===dm;)vm();do{var t=!1;if("#"===dm){for(var e=hm-1;" "===lm.charAt(e)||"\t"===lm.charAt(e);)e--;if("\n"===lm.charAt(e)||""===lm.charAt(e)){for(;""!=dm&&"\n"!=dm;)vm();t=!0}}if("/"===dm&&"/"===ym()){for(;""!=dm&&"\n"!=dm;)vm();t=!0}if("/"===dm&&"*"===ym()){for(;""!=dm;){if("*"===dm&&"/"===ym()){vm(),vm();break}vm()}t=!0}for(;" "===dm||"\t"===dm||"\n"===dm||"\r"===dm;)vm()}while(t);if(""!==dm){var n=dm+ym();if(cm[n])return pm=um.DELIMITER,fm=n,vm(),void vm();if(cm[dm])return pm=um.DELIMITER,fm=dm,void vm();if(bm(dm)||"-"===dm){for(fm+=dm,vm();bm(dm);)fm+=dm,vm();return"false"===fm?fm=!1:"true"===fm?fm=!0:isNaN(Number(fm))||(fm=Number(fm)),void(pm=um.IDENTIFIER)}if('"'===dm){for(vm();""!=dm&&('"'!=dm||'"'===dm&&'"'===ym());)'"'===dm?(fm+=dm,vm()):"\\"===dm&&"n"===ym()?(fm+="\n",vm()):fm+=dm,vm();if('"'!=dm)throw Rm('End of string " expected');return vm(),void(pm=um.IDENTIFIER)}for(pm=um.UNKNOWN;""!=dm;)fm+=dm,vm();throw new SyntaxError('Syntax error in part "'+Dm(fm,30)+'"')}pm=um.DELIMITER}function km(t){for(;""!==fm&&"}"!=fm;)Tm(t),";"===fm&&Om()}function Tm(t){var e=Sm(t);if(e)Pm(t,e);else{var n=function(t){return"node"===fm?(Om(),t.node=Nm(),"node"):"edge"===fm?(Om(),t.edge=Nm(),"edge"):"graph"===fm?(Om(),t.graph=Nm(),"graph"):null}(t);if(!n){if(pm!=um.IDENTIFIER)throw Rm("Identifier expected");var r=fm;if(Om(),"="===fm){if(Om(),pm!=um.IDENTIFIER)throw Rm("Identifier expected");t[r]=fm,Om()}else!function(t,e){var n={id:e},r=Nm();r&&(n.attr=r),_m(t,n),Pm(t,e)}(t,r)}}}function Sm(t){var e=null;if("subgraph"===fm&&((e={}).type="subgraph",Om(),pm===um.IDENTIFIER&&(e.id=fm,Om())),"{"===fm){if(Om(),e||(e={}),e.parent=t,e.node=t.node,e.edge=t.edge,e.graph=t.graph,km(e),"}"!=fm)throw Rm("Angle bracket } expected");Om(),delete e.node,delete e.edge,delete e.graph,delete e.parent,t.subgraphs||(t.subgraphs=[]),t.subgraphs.push(e)}return e}function Pm(t,e){for(;"->"===fm||"--"===fm;){var n,r=fm;Om();var i=Sm(t);if(i)n=i;else{if(pm!=um.IDENTIFIER)throw Rm("Identifier or subgraph expected");_m(t,{id:n=fm}),Om()}xm(t,Em(t,e,n,r,Nm())),e=n}}function Nm(){for(var t,e,n=null,r={dashed:!0,solid:!1,dotted:[1,5]},i={dot:"circle",box:"box",crow:"crow",curve:"curve",icurve:"inv_curve",normal:"triangle",inv:"inv_triangle",diamond:"diamond",tee:"bar",vee:"vee"},o=new Array,g=new Array;"["===fm;){for(Om(),n={};""!==fm&&"]"!=fm;){if(pm!=um.IDENTIFIER)throw Rm("Attribute name expected");var s=fm;if(Om(),"="!=fm)throw Rm("Equal sign = expected");if(Om(),pm!=um.IDENTIFIER)throw Rm("Attribute value expected");var A=fm;"style"===s&&(A=r[A]),"arrowhead"===s&&(s="arrows",A={to:{enabled:!0,type:i[A]}}),"arrowtail"===s&&(s="arrows",A={from:{enabled:!0,type:i[A]}}),o.push({attr:n,name:s,value:A}),g.push(s),Om(),","==fm&&Om()}if("]"!=fm)throw Rm("Bracket ] expected");Om()}if(nf(g).call(g,"dir")){var C={arrows:{}};for(t=0;t"===t.type&&(e.arrows="to"),e};Hh(i=n.edges).call(i,(function(t){var e,n,i,g,s,A,C;e=t.from instanceof Object?t.from.nodes:{id:t.from},n=t.to instanceof Object?t.to.nodes:{id:t.to},t.from instanceof Object&&t.from.edges&&Hh(i=t.from.edges).call(i,(function(t){var e=o(t);r.edges.push(e)})),s=n,A=function(e,n){var i=Em(r,e.id,n.id,t.type,t.attr),g=o(i);r.edges.push(g)},Ih(g=e)?Hh(g).call(g,(function(t){Ih(s)?Hh(s).call(s,(function(e){A(t,e)})):A(t,s)})):Ih(s)?Hh(s).call(s,(function(t){A(g,t)})):A(g,s),t.to instanceof Object&&t.to.edges&&Hh(C=t.to.edges).call(C,(function(t){var e=o(t);r.edges.push(e)}))}))}return n.attr&&(r.options=n.attr),r}var Lm=Object.freeze({__proto__:null,cn:{addDescription:"单击空白处放置新节点。",addEdge:"添加连接线",addNode:"添加节点",back:"返回",close:"關閉",createEdgeError:"无法将连接线连接到群集。",del:"删除选定",deleteClusterError:"无法删除群集。",edgeDescription:"单击某个节点并将该连接线拖动到另一个节点以连接它们。",edit:"编辑",editClusterError:"无法编辑群集。",editEdge:"编辑连接线",editEdgeDescription:"单击控制节点并将它们拖到节点上连接。",editNode:"编辑节点"},cs:{addDescription:"Kluknutím do prázdného prostoru můžete přidat nový vrchol.",addEdge:"Přidat hranu",addNode:"Přidat vrchol",back:"Zpět",close:"Zavřít",createEdgeError:"Nelze připojit hranu ke shluku.",del:"Smazat výběr",deleteClusterError:"Nelze mazat shluky.",edgeDescription:"Přetažením z jednoho vrcholu do druhého můžete spojit tyto vrcholy novou hranou.",edit:"Upravit",editClusterError:"Nelze upravovat shluky.",editEdge:"Upravit hranu",editEdgeDescription:"Přetažením kontrolního vrcholu hrany ji můžete připojit k jinému vrcholu.",editNode:"Upravit vrchol"},de:{addDescription:"Klicke auf eine freie Stelle, um einen neuen Knoten zu plazieren.",addEdge:"Kante hinzufügen",addNode:"Knoten hinzufügen",back:"Zurück",close:"Schließen",createEdgeError:"Es ist nicht möglich, Kanten mit Clustern zu verbinden.",del:"Lösche Auswahl",deleteClusterError:"Cluster können nicht gelöscht werden.",edgeDescription:"Klicke auf einen Knoten und ziehe die Kante zu einem anderen Knoten, um diese zu verbinden.",edit:"Editieren",editClusterError:"Cluster können nicht editiert werden.",editEdge:"Kante editieren",editEdgeDescription:"Klicke auf die Verbindungspunkte und ziehe diese auf einen Knoten, um sie zu verbinden.",editNode:"Knoten editieren"},en:{addDescription:"Click in an empty space to place a new node.",addEdge:"Add Edge",addNode:"Add Node",back:"Back",close:"Close",createEdgeError:"Cannot link edges to a cluster.",del:"Delete selected",deleteClusterError:"Clusters cannot be deleted.",edgeDescription:"Click on a node and drag the edge to another node to connect them.",edit:"Edit",editClusterError:"Clusters cannot be edited.",editEdge:"Edit Edge",editEdgeDescription:"Click on the control points and drag them to a node to connect to it.",editNode:"Edit Node"},es:{addDescription:"Haga clic en un lugar vacío para colocar un nuevo nodo.",addEdge:"Añadir arista",addNode:"Añadir nodo",back:"Atrás",close:"Cerrar",createEdgeError:"No se puede conectar una arista a un grupo.",del:"Eliminar selección",deleteClusterError:"No es posible eliminar grupos.",edgeDescription:"Haga clic en un nodo y arrastre la arista hacia otro nodo para conectarlos.",edit:"Editar",editClusterError:"No es posible editar grupos.",editEdge:"Editar arista",editEdgeDescription:"Haga clic en un punto de control y arrastrelo a un nodo para conectarlo.",editNode:"Editar nodo"},fr:{addDescription:"Cliquez dans un endroit vide pour placer un nœud.",addEdge:"Ajouter un lien",addNode:"Ajouter un nœud",back:"Retour",close:"Fermer",createEdgeError:"Impossible de créer un lien vers un cluster.",del:"Effacer la sélection",deleteClusterError:"Les clusters ne peuvent pas être effacés.",edgeDescription:"Cliquez sur un nœud et glissez le lien vers un autre nœud pour les connecter.",edit:"Éditer",editClusterError:"Les clusters ne peuvent pas être édités.",editEdge:"Éditer le lien",editEdgeDescription:"Cliquez sur les points de contrôle et glissez-les pour connecter un nœud.",editNode:"Éditer le nœud"},it:{addDescription:"Clicca per aggiungere un nuovo nodo",addEdge:"Aggiungi un vertice",addNode:"Aggiungi un nodo",back:"Indietro",close:"Chiudere",createEdgeError:"Non si possono collegare vertici ad un cluster",del:"Cancella la selezione",deleteClusterError:"I cluster non possono essere cancellati",edgeDescription:"Clicca su un nodo e trascinalo ad un altro nodo per connetterli.",edit:"Modifica",editClusterError:"I clusters non possono essere modificati.",editEdge:"Modifica il vertice",editEdgeDescription:"Clicca sui Punti di controllo e trascinali ad un nodo per connetterli.",editNode:"Modifica il nodo"},nl:{addDescription:"Klik op een leeg gebied om een nieuwe node te maken.",addEdge:"Link toevoegen",addNode:"Node toevoegen",back:"Terug",close:"Sluiten",createEdgeError:"Kan geen link maken naar een cluster.",del:"Selectie verwijderen",deleteClusterError:"Clusters kunnen niet worden verwijderd.",edgeDescription:"Klik op een node en sleep de link naar een andere node om ze te verbinden.",edit:"Wijzigen",editClusterError:"Clusters kunnen niet worden aangepast.",editEdge:"Link wijzigen",editEdgeDescription:"Klik op de verbindingspunten en sleep ze naar een node om daarmee te verbinden.",editNode:"Node wijzigen"},pt:{addDescription:"Clique em um espaço em branco para adicionar um novo nó",addEdge:"Adicionar aresta",addNode:"Adicionar nó",back:"Voltar",close:"Fechar",createEdgeError:"Não foi possível linkar arestas a um cluster.",del:"Remover selecionado",deleteClusterError:"Clusters não puderam ser removidos.",edgeDescription:"Clique em um nó e arraste a aresta até outro nó para conectá-los",edit:"Editar",editClusterError:"Clusters não puderam ser editados.",editEdge:"Editar aresta",editEdgeDescription:"Clique nos pontos de controle e os arraste para um nó para conectá-los",editNode:"Editar nó"},ru:{addDescription:"Кликните в свободное место, чтобы добавить новый узел.",addEdge:"Добавить ребро",addNode:"Добавить узел",back:"Назад",close:"Закрывать",createEdgeError:"Невозможно соединить ребра в кластер.",del:"Удалить выбранное",deleteClusterError:"Кластеры не могут быть удалены",edgeDescription:"Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.",edit:"Редактировать",editClusterError:"Кластеры недоступны для редактирования.",editEdge:"Редактировать ребро",editEdgeDescription:"Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.",editNode:"Редактировать узел"},uk:{addDescription:"Kлікніть на вільне місце, щоб додати новий вузол.",addEdge:"Додати край",addNode:"Додати вузол",back:"Назад",close:"Закрити",createEdgeError:"Не можливо об'єднати краї в групу.",del:"Видалити обране",deleteClusterError:"Групи не можуть бути видалені.",edgeDescription:"Клікніть на вузол і перетягніть край до іншого вузла, щоб їх з'єднати.",edit:"Редагувати",editClusterError:"Групи недоступні для редагування.",editEdge:"Редагувати край",editEdgeDescription:"Клікніть на контрольні точки і перетягніть їх у вузол, щоб підключитися до нього.",editNode:"Редагувати вузол"}}),Fm=function(){function t(){Fu(this,t),this.NUM_ITERATIONS=4,this.image=new Image,this.canvas=document.createElement("canvas")}return il(t,[{key:"init",value:function(){if(!this.initialized()){this.src=this.image.src;var t=this.image.width,e=this.image.height;this.width=t,this.height=e;var n=Math.floor(e/2),r=Math.floor(e/4),i=Math.floor(e/8),o=Math.floor(e/16),g=Math.floor(t/2),s=Math.floor(t/4),A=Math.floor(t/8),C=Math.floor(t/16);this.canvas.width=3*s,this.canvas.height=n,this.coordinates=[[0,0,g,n],[g,0,s,r],[g,r,A,i],[5*A,r,C,o]],this._fillMipMap()}}},{key:"initialized",value:function(){return void 0!==this.coordinates}},{key:"_fillMipMap",value:function(){var t=this.canvas.getContext("2d"),e=this.coordinates[0];t.drawImage(this.image,e[0],e[1],e[2],e[3]);for(var n=1;n2){e*=.5;for(var g=0;e>2&&g=this.NUM_ITERATIONS&&(g=this.NUM_ITERATIONS-1);var s=this.coordinates[g];t.drawImage(this.canvas,s[0],s[1],s[2],s[3],n,r,i,o)}else t.drawImage(this.image,n,r,i,o)}}]),t}(),zm=function(){function t(e){Fu(this,t),this.images={},this.imageBroken={},this.callback=e}return il(t,[{key:"_tryloadBrokenUrl",value:function(t,e,n){void 0!==t&&void 0!==n&&(void 0!==e?(n.image.onerror=function(){console.error("Could not load brokenImage:",e)},n.image.src=e):console.warn("No broken url image defined"))}},{key:"_redrawWithImage",value:function(t){this.callback&&this.callback(t)}},{key:"load",value:function(t,e){var n=this,r=this.images[t];if(r)return r;var i=new Fm;return this.images[t]=i,i.image.onload=function(){n._fixImageCoordinates(i.image),i.init(),n._redrawWithImage(i)},i.image.onerror=function(){console.error("Could not load image:",t),n._tryloadBrokenUrl(t,e,i)},i.image.src=t,i}},{key:"_fixImageCoordinates",value:function(t){0===t.width&&(document.body.appendChild(t),t.width=t.offsetWidth,t.height=t.offsetHeight,document.body.removeChild(t))}}]),t}(),Zm={},Um={get exports(){return Zm},set exports(t){Zm=t}},Vm={},Gm={get exports(){return Vm},set exports(t){Vm=t}},Wm=V((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),Ym=V,Hm=Lt,Km=it,Qm=Wm,Xm=Object.isExtensible,qm=Ym((function(){Xm(1)}))||Qm?function(t){return!!Hm(t)&&(!Qm||"ArrayBuffer"!=Km(t))&&(!Xm||Xm(t))}:Xm,Jm=!V((function(){return Object.isExtensible(Object.preventExtensions({}))})),$m=Ir,tw=tt,ew=Or,nw=Lt,rw=De,iw=Rn.f,ow=qA,gw=tC,sw=qm,Aw=Jm,Cw=!1,Iw=Fe("meta"),aw=0,uw=function(t){iw(t,Iw,{value:{objectID:"O"+aw++,weakData:{}}})},cw=Gm.exports={enable:function(){cw.enable=function(){},Cw=!0;var t=ow.f,e=tw([].splice),n={};n[Iw]=1,t(n).length&&(ow.f=function(n){for(var r=t(n),i=0,o=r.length;io;o++)if((s=f(t[o]))&&yw(Ew,s))return s;return new xw(!1)}r=bw(t,i)}for(A=u?t.next:r.next;!(C=hw(A,r)).done;){try{s=f(C.value)}catch(t){ww(r,"throw",t)}if("object"==typeof s&&s&&yw(Ew,s))return s}return new xw(!1)},kw=Wt,Tw=TypeError,Sw=function(t,e){if(kw(e,t))return t;throw Tw("Incorrect invocation")},Pw=Ir,Nw=U,Rw=Vm,Dw=V,Mw=Jn,jw=Ow,Bw=Sw,Lw=at,Fw=Lt,zw=Rg,Zw=Rn.f,Uw=ZC.forEach,Vw=ct,Gw=xo.set,Ww=xo.getterFor,Yw=function(t,e,n){var r,i=-1!==t.indexOf("Map"),o=-1!==t.indexOf("Weak"),g=i?"set":"add",s=Nw[t],A=s&&s.prototype,C={};if(Vw&&Lw(s)&&(o||A.forEach&&!Dw((function(){(new s).entries().next()})))){var I=(r=e((function(e,n){Gw(Bw(e,I),{type:t,collection:new s}),null!=n&&jw(n,e[g],{that:e,AS_ENTRIES:i})}))).prototype,a=Ww(t);Uw(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(t){var e="add"==t||"set"==t;!(t in A)||o&&"clear"==t||Mw(I,t,(function(n,r){var i=a(this).collection;if(!e&&o&&!Fw(n))return"get"==t&&void 0;var g=i[t](0===n?0:n,r);return e?this:g}))})),o||Zw(I,"size",{configurable:!0,get:function(){return a(this).collection.size}})}else r=n.getConstructor(e,t,i,g),Rw.enable();return zw(r,t,!1,!0),C[t]=r,Pw({global:!0,forced:!0},C),o||n.setStrong(r,t,i),r},Hw=lg,Kw=function(t,e,n){for(var r in e)n&&n.unsafe&&t[r]?t[r]=e[r]:Hw(t,r,e[r],n);return t},Qw=Gt,Xw=cC,qw=ct,Jw=Ke("species"),$w=function(t){var e=Qw(t);qw&&e&&!e[Jw]&&Xw(e,Jw,{configurable:!0,get:function(){return this}})},t_=rg,e_=cC,n_=Kw,r_=Nn,i_=Sw,o_=Tt,g_=Ow,s_=ss,A_=As,C_=$w,I_=ct,a_=Vm.fastKey,u_=xo.set,c_=xo.getterFor,l_={getConstructor:function(t,e,n,r){var i=t((function(t,i){i_(t,o),u_(t,{type:e,index:t_(null),first:void 0,last:void 0,size:0}),I_||(t.size=0),o_(i)||g_(i,t[r],{that:t,AS_ENTRIES:n})})),o=i.prototype,g=c_(e),s=function(t,e,n){var r,i,o=g(t),s=A(t,e);return s?s.value=n:(o.last=s={index:i=a_(e,!0),key:e,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=s),r&&(r.next=s),I_?o.size++:t.size++,"F"!==i&&(o.index[i]=s)),t},A=function(t,e){var n,r=g(t),i=a_(e);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==e)return n};return n_(o,{clear:function(){for(var t=g(this),e=t.index,n=t.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete e[n.index],n=n.next;t.first=t.last=void 0,I_?t.size=0:this.size=0},delete:function(t){var e=this,n=g(e),r=A(e,t);if(r){var i=r.next,o=r.previous;delete n.index[r.index],r.removed=!0,o&&(o.next=i),i&&(i.previous=o),n.first==r&&(n.first=i),n.last==r&&(n.last=o),I_?n.size--:e.size--}return!!r},forEach:function(t){for(var e,n=g(this),r=r_(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:n.first;)for(r(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!A(this,t)}}),n_(o,n?{get:function(t){var e=A(this,t);return e&&e.value},set:function(t,e){return s(this,0===t?0:t,e)}}:{add:function(t){return s(this,t=0===t?0:t,t)}}),I_&&e_(o,"size",{configurable:!0,get:function(){return g(this).size}}),i},setStrong:function(t,e,n){var r=e+" Iterator",i=c_(e),o=c_(r);s_(t,e,(function(t,e){u_(this,{type:r,target:t,state:i(t),kind:e,last:void 0})}),(function(){for(var t=o(this),e=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?A_("keys"==e?n.key:"values"==e?n.value:[n.key,n.value],!1):(t.target=void 0,A_(void 0,!0))}),n?"entries":"values",!n,!0),C_(e)}};Yw("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),l_);var h_=Ft.Map;!function(t){t.exports=h_}(Um);var d_=L(Zm),f_=function(){function t(){Fu(this,t),this.clear(),this._defaultIndex=0,this._groupIndex=0,this._defaultGroups=[{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},{border:"#FFA500",background:"#FFFF00",highlight:{border:"#FFA500",background:"#FFFFA3"},hover:{border:"#FFA500",background:"#FFFFA3"}},{border:"#FA0A10",background:"#FB7E81",highlight:{border:"#FA0A10",background:"#FFAFB1"},hover:{border:"#FA0A10",background:"#FFAFB1"}},{border:"#41A906",background:"#7BE141",highlight:{border:"#41A906",background:"#A1EC76"},hover:{border:"#41A906",background:"#A1EC76"}},{border:"#E129F0",background:"#EB7DF4",highlight:{border:"#E129F0",background:"#F0B3F5"},hover:{border:"#E129F0",background:"#F0B3F5"}},{border:"#7C29F0",background:"#AD85E4",highlight:{border:"#7C29F0",background:"#D3BDF0"},hover:{border:"#7C29F0",background:"#D3BDF0"}},{border:"#C37F00",background:"#FFA807",highlight:{border:"#C37F00",background:"#FFCA66"},hover:{border:"#C37F00",background:"#FFCA66"}},{border:"#4220FB",background:"#6E6EFD",highlight:{border:"#4220FB",background:"#9B9BFD"},hover:{border:"#4220FB",background:"#9B9BFD"}},{border:"#FD5A77",background:"#FFC0CB",highlight:{border:"#FD5A77",background:"#FFD1D9"},hover:{border:"#FD5A77",background:"#FFD1D9"}},{border:"#4AD63A",background:"#C2FABC",highlight:{border:"#4AD63A",background:"#E6FFE3"},hover:{border:"#4AD63A",background:"#E6FFE3"}},{border:"#990000",background:"#EE0000",highlight:{border:"#BB0000",background:"#FF3333"},hover:{border:"#BB0000",background:"#FF3333"}},{border:"#FF6000",background:"#FF6000",highlight:{border:"#FF6000",background:"#FF6000"},hover:{border:"#FF6000",background:"#FF6000"}},{border:"#97C2FC",background:"#2B7CE9",highlight:{border:"#D2E5FF",background:"#2B7CE9"},hover:{border:"#D2E5FF",background:"#2B7CE9"}},{border:"#399605",background:"#255C03",highlight:{border:"#399605",background:"#255C03"},hover:{border:"#399605",background:"#255C03"}},{border:"#B70054",background:"#FF007E",highlight:{border:"#B70054",background:"#FF007E"},hover:{border:"#B70054",background:"#FF007E"}},{border:"#AD85E4",background:"#7C29F0",highlight:{border:"#D3BDF0",background:"#7C29F0"},hover:{border:"#D3BDF0",background:"#7C29F0"}},{border:"#4557FA",background:"#000EA1",highlight:{border:"#6E6EFD",background:"#000EA1"},hover:{border:"#6E6EFD",background:"#000EA1"}},{border:"#FFC0CB",background:"#FD5A77",highlight:{border:"#FFD1D9",background:"#FD5A77"},hover:{border:"#FFD1D9",background:"#FD5A77"}},{border:"#C2FABC",background:"#74D66A",highlight:{border:"#E6FFE3",background:"#74D66A"},hover:{border:"#E6FFE3",background:"#74D66A"}},{border:"#EE0000",background:"#990000",highlight:{border:"#FF3333",background:"#BB0000"},hover:{border:"#FF3333",background:"#BB0000"}}],this.options={},this.defaultOptions={useDefaultGroups:!0},ti(this.options,this.defaultOptions)}return il(t,[{key:"setOptions",value:function(t){var e=["useDefaultGroups"];if(void 0!==t)for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&-1===hp(e).call(e,n)){var r=t[n];this.add(n,r)}}},{key:"clear",value:function(){this._groups=new d_,this._groupNames=[]}},{key:"get",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this._groups.get(t);if(void 0===n&&e)if(!1===this.options.useDefaultGroups&&this._groupNames.length>0){var r=this._groupIndex%this._groupNames.length;++this._groupIndex,(n={}).color=this._groups.get(this._groupNames[r]),this._groups.set(t,n)}else{var i=this._defaultIndex%this._defaultGroups.length;this._defaultIndex++,(n={}).color=this._defaultGroups[i],this._groups.set(t,n)}return n}},{key:"add",value:function(t,e){return this._groups.has(t)||this._groupNames.push(t),this._groups.set(t,e),e}}]),t}(),p_={},v_={get exports(){return p_},set exports(t){p_=t}};Ir({target:"Number",stat:!0},{isNaN:function(t){return t!=t}});var y_=Ft.Number.isNaN;!function(t){t.exports=y_}(v_);var b_=L(p_),m_={},w_={get exports(){return m_},set exports(t){m_=t}},__=U.isFinite;Ir({target:"Number",stat:!0},{isFinite:Number.isFinite||function(t){return"number"==typeof t&&__(t)}});var x_=Ft.Number.isFinite;!function(t){t.exports=x_}(w_);var E_=L(m_),O_={},k_={get exports(){return O_},set exports(t){O_=t}},T_=ZC.some;Ir({target:"Array",proto:!0,forced:!jh("some")},{some:function(t){return T_(this,t,arguments.length>1?arguments[1]:void 0)}});var S_=fi("Array").some,P_=Wt,N_=S_,R_=Array.prototype,D_=function(t){var e=t.some;return t===R_||P_(R_,t)&&e===R_.some?N_:e};!function(t){t.exports=D_}(k_);var M_=L(O_);function j_(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var B_={},L_={get exports(){return B_},set exports(t){B_=t}},F_={},z_=Tp;!function(t){t.exports=z_}({get exports(){return F_},set exports(t){F_=t}}),function(t){t.exports=F_}(L_);var Z_=L(B_),U_={},V_={get exports(){return U_},set exports(t){U_=t}},G_={},W_={get exports(){return G_},set exports(t){G_=t}};Ir({target:"Object",stat:!0},{setPrototypeOf:Hg});var Y_=Ft.Object.setPrototypeOf;!function(t){t.exports=Y_}(W_),function(t){t.exports=G_}(V_);var H_=L(U_),K_={},Q_={get exports(){return K_},set exports(t){K_=t}},X_={},q_=mi;!function(t){t.exports=q_}({get exports(){return X_},set exports(t){X_=t}}),function(t){t.exports=X_}(Q_);var J_=L(K_);function $_(t,e){var n;return $_=H_?J_(n=H_).call(n):function(t,e){return t.__proto__=e,t},$_(t,e)}function tx(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Z_(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Gu(t,"prototype",{writable:!1}),e&&$_(t,e)}function ex(t,e){if(e&&("object"===Qc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return j_(t)}var nx={},rx={get exports(){return nx},set exports(t){nx=t}},ix={},ox=Cf;!function(t){t.exports=ox}({get exports(){return ix},set exports(t){ix=t}}),function(t){t.exports=ix}(rx);var gx=L(nx);function sx(t){var e;return sx=H_?J_(e=gx).call(e):function(t){return t.__proto__||gx(t)},sx(t)}var Ax={},Cx={get exports(){return Ax},set exports(t){Ax=t}},Ix={};!function(t){var e=Wu,n=Uc;function r(i){return t.exports=r="function"==typeof e&&"symbol"==typeof n?function(t){return typeof t}:function(t){return t&&"function"==typeof e&&t.constructor===e&&t!==e.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,r(i)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}({get exports(){return Ix},set exports(t){Ix=t}});var ax={},ux={get exports(){return ax},set exports(t){ax=t}},cx={},lx=Yh;!function(t){t.exports=lx}({get exports(){return cx},set exports(t){cx=t}}),function(t){t.exports=cx}(ux);var hx={},dx={get exports(){return hx},set exports(t){hx=t}},fx={},px={get exports(){return fx},set exports(t){fx=t}},vx=De,yx=Iu,bx=ut,mx=Rn,wx=Lt,_x=Jn,xx=Error,Ex=tt("".replace),Ox=String(xx("zxcasd").stack),kx=/\n\s*at [^:]*:[^\n]*/,Tx=kx.test(Ox),Sx=wt,Px=!V((function(){var t=Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",Sx(1,7)),7!==t.stack)})),Nx=Jn,Rx=Px,Dx=Error.captureStackTrace,Mx=Qi,jx=Ir,Bx=Wt,Lx=ug,Fx=Hg,zx=rg,Zx=Jn,Ux=wt,Vx=function(t,e,n,r){Rx&&(Dx?Dx(t,e):Nx(t,"stack",function(t,e){if(Tx&&"string"==typeof t&&!xx.prepareStackTrace)for(;e--;)t=Ex(t,kx,"");return t}(n,r)))},Gx=Ow,Wx=Ke("toStringTag"),Yx=Error,Hx=[].push,Kx=function(t,e){var n,r,i,o=Bx(Qx,this);Fx?n=Fx(Yx(),o?Lx(this):Qx):(n=o?this:zx(Qx),Zx(n,Wx,"Error")),void 0!==e&&Zx(n,"message",function(t,e){return void 0===t?arguments.length<2?"":e:Mx(t)}(e)),Vx(n,Kx,n.stack,1),arguments.length>2&&(r=n,wx(i=arguments[2])&&"cause"in i&&_x(r,"cause",i.cause));var g=[];return Gx(t,Hx,{that:g}),Zx(n,"errors",g),n};Fx?Fx(Kx,Yx):function(t,e,n){for(var r=yx(e),i=mx.f,o=bx.f,g=0;g=0;--r){var i=this.tryEntries[r],o=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var g=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(g&&s){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),M(n),w}},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;M(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:B(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),w}},u}t.exports=a,t.exports.__esModule=!0,t.exports.default=t.exports}(Cx);var ET=Ax(),OT=ET;try{regeneratorRuntime=ET}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=ET:Function("r","regeneratorRuntime = r")(ET)}var kT={},TT={get exports(){return kT},set exports(t){kT=t}},ST=le,PT=Pe,NT=kt,RT=br,DT=TypeError,MT=function(t){return function(e,n,r,i){ST(n);var o=PT(e),g=NT(o),s=RT(o),A=t?s-1:0,C=t?-1:1;if(r<2)for(;;){if(A in g){i=g[A],A+=C;break}if(A+=C,t?A<0:s<=A)throw DT("Reduce of empty array with no initial value")}for(;t?A>=0:s>A;A+=C)A in g&&(i=n(i,g[A],A,o));return i}},jT=[MT(!1),MT(!0)][0];Ir({target:"Array",proto:!0,forced:!tE&&$t>79&&$t<83||!jh("reduce")},{reduce:function(t){var e=arguments.length;return jT(this,t,e,e>1?arguments[1]:void 0)}});var BT=fi("Array").reduce,LT=Wt,FT=BT,zT=Array.prototype,ZT=function(t){var e=t.reduce;return t===zT||LT(zT,t)&&e===zT.reduce?FT:e};!function(t){t.exports=ZT}(TT);var UT=L(kT),VT={},GT={get exports(){return VT},set exports(t){VT=t}},WT=OC,YT=br,HT=Xu,KT=Nn,QT=function(t,e,n,r,i,o,g,s){for(var A,C,I=i,a=0,u=!!g&&KT(g,s);a0&&WT(A)?(C=YT(A),I=QT(t,e,A,C,I,o-1)-1):(HT(I+1),t[I]=A),I++),a++;return I},XT=QT,qT=le,JT=Pe,$T=br,tS=RC;Ir({target:"Array",proto:!0},{flatMap:function(t){var e,n=JT(this),r=$T(n);return qT(t),(e=tS(n,0)).length=XT(e,n,n,r,0,1,t,arguments.length>1?arguments[1]:void 0),e}});var eS=fi("Array").flatMap,nS=Wt,rS=eS,iS=Array.prototype,oS=function(t){var e=t.flatMap;return t===iS||nS(iS,t)&&e===iS.flatMap?rS:e};!function(t){t.exports=oS}(GT);var gS={},sS={get exports(){return gS},set exports(t){gS=t}};Yw("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),l_);var AS=Ft.Set;!function(t){t.exports=AS}(sS);var CS=L(gS),IS={};!function(t){t.exports=Yc}({get exports(){return IS},set exports(t){IS=t}});var aS=L(IS),uS={},cS={get exports(){return uS},set exports(t){uS=t}},lS={},hS=sA;!function(t){t.exports=hS}({get exports(){return lS},set exports(t){lS=t}}),function(t){t.exports=lS}(cS);var dS=L(uS),fS={},pS={get exports(){return fS},set exports(t){fS=t}},vS=gC,yS=Math.floor,bS=function(t,e){var n=t.length,r=yS(n/2);return n<8?mS(t,e):wS(t,bS(vS(t,0,r),e),bS(vS(t,r),e),e)},mS=function(t,e){for(var n,r,i=t.length,o=1;o0;)t[r]=t[--r];r!==o++&&(t[r]=n)}return t},wS=function(t,e,n,r){for(var i=e.length,o=n.length,g=0,s=0;g3)){if(ZS)return!0;if(VS)return VS<603;var t,e,n,r,i="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)GS.push({k:e+r,v:n})}for(GS.sort((function(t,e){return e.v-t.v})),r=0;rjS(n)?1:-1}}(t)),n=DS(i),r=0;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,g=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return g=t.done,t},e:function(t){s=!0,o=t},f:function(){try{g||null==n.return||n.return()}finally{if(s)throw o}}}}function IN(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);nthis.max&&this.flush(),null!=this._timeout&&(clearTimeout(this._timeout),this._timeout=null),this.queue.length>0&&"number"==typeof this.delay&&(this._timeout=ov((function(){t.flush()}),this.delay))}},{key:"flush",value:function(){var t,e;Hh(t=Dd(e=this._queue).call(e,0)).call(t,(function(t){t.fn.apply(t.context||t.fn,t.args||[])}))}}],[{key:"extend",value:function(e,n){var r=new t(n);if(void 0!==e.flush)throw new Error("Target object already has a property flush");e.flush=function(){r.flush()};var i=[{name:"flush",original:void 0}];if(n&&n.replace)for(var o=0;oi&&(i=A,r=s)}return r}},{key:"min",value:function(t){var e=dS(this._pairs),n=e.next();if(n.done)return null;for(var r=n.value[1],i=t(n.value[1],n.value[0]);!(n=e.next()).done;){var o=Wl(n.value,2),g=o[0],s=o[1],A=t(s,g);A1?n-1:0),i=1;ii?1:ri)&&(r=g,i=s)}}catch(t){o.e(t)}finally{o.f()}return r||null}},{key:"min",value:function(t){var e,n,r=null,i=null,o=CN(_P(e=this._data).call(e));try{for(o.s();!(n=o.n()).done;){var g=n.value,s=g[t];"number"==typeof s&&(null==i||se.x&&t.tope.y}function ZN(t){return"string"==typeof t&&""!==t}function UN(t,e,n,r){var i=r.x,o=r.y;if("function"==typeof r.distanceToBorder){var g=r.distanceToBorder(t,e),s=Math.sin(e)*g,A=Math.cos(e)*g;A===g?(i+=g,o=r.y):s===g?(i=r.x,o-=g):(i+=A,o-=s)}else r.shape.width>r.shape.height?(i=r.x+.5*r.shape.width,o=r.y-n):(i=r.x+n,o=r.y-.5*r.shape.height);return{x:i,y:o}}var VN=function(){function t(e){Fu(this,t),this.measureText=e,this.current=0,this.width=0,this.height=0,this.lines=[]}return il(t,[{key:"_add",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"normal";void 0===this.lines[t]&&(this.lines[t]={width:0,height:0,blocks:[]});var r=e;void 0!==e&&""!==e||(r=" ");var i=this.measureText(r,n),o=ti({},_P(i));o.text=e,o.width=i.width,o.mod=n,void 0!==e&&""!==e||(o.width=0),this.lines[t].blocks.push(o),this.lines[t].width+=o.width}},{key:"curWidth",value:function(){var t=this.lines[this.current];return void 0===t?0:t.width}},{key:"append",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"normal";this._add(this.current,t,e)}},{key:"newLine",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"normal";this._add(this.current,t,e),this.current++}},{key:"determineLineHeights",value:function(){for(var t=0;tt&&(t=r.width),e+=r.height}this.width=t,this.height=e}},{key:"removeEmptyBlocks",value:function(){for(var t=[],e=0;e"://,""://,""://,"":/<\/b>/,"":/<\/i>/,"":/<\/code>/,"*":/\*/,_:/_/,"`":/`/,afterBold:/[^*]/,afterItal:/[^_]/,afterMono:/[^`]/},WN=function(){function t(e){Fu(this,t),this.text=e,this.bold=!1,this.ital=!1,this.mono=!1,this.spacing=!1,this.position=0,this.buffer="",this.modStack=[],this.blocks=[]}return il(t,[{key:"mod",value:function(){return 0===this.modStack.length?"normal":this.modStack[0]}},{key:"modName",value:function(){return 0===this.modStack.length?"normal":"mono"===this.modStack[0]?"mono":this.bold&&this.ital?"boldital":this.bold?"bold":this.ital?"ital":void 0}},{key:"emitBlock",value:function(){this.spacing&&(this.add(" "),this.spacing=!1),this.buffer.length>0&&(this.blocks.push({text:this.buffer,mod:this.modName()}),this.buffer="")}},{key:"add",value:function(t){" "===t&&(this.spacing=!0),this.spacing&&(this.buffer+=" ",this.spacing=!1)," "!=t&&(this.buffer+=t)}},{key:"parseWS",value:function(t){return!!/[ \t]/.test(t)&&(this.mono?this.add(t):this.spacing=!0,!0)}},{key:"setTag",value:function(t){this.emitBlock(),this[t]=!0,this.modStack.unshift(t)}},{key:"unsetTag",value:function(t){this.emitBlock(),this[t]=!1,this.modStack.shift()}},{key:"parseStartTag",value:function(t,e){return!(this.mono||this[t]||!this.match(e)||(this.setTag(t),0))}},{key:"match",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=Wl(this.prepareRegExp(t),2),r=n[0],i=n[1],o=r.test(this.text.substr(this.position,i));return o&&e&&(this.position+=i-1),o}},{key:"parseEndTag",value:function(t,e,n){var r=this.mod()===t;return!(!(r="mono"===t?r&&this.mono:r&&!this.mono)||!this.match(e)||(void 0!==n?(this.position===this.text.length-1||this.match(n,!1))&&this.unsetTag(t):this.unsetTag(t),0))}},{key:"replace",value:function(t,e){return!!this.match(t)&&(this.add(e),this.position+=length-1,!0)}},{key:"prepareRegExp",value:function(t){var e,n;if(t instanceof RegExp)n=t,e=1;else{var r=GN[t];n=void 0!==r?r:new RegExp(t),e=t.length}return[n,e]}}]),t}(),YN=function(){function t(e,n,r,i){var o=this;Fu(this,t),this.ctx=e,this.parent=n,this.selected=r,this.hover=i,this.lines=new VN((function(t,n){if(void 0===t)return 0;var g=o.parent.getFormattingValues(e,r,i,n),s=0;return""!==t&&(s=o.ctx.measureText(t).width),{width:s,values:g}}))}return il(t,[{key:"process",value:function(t){if(!ZN(t))return this.lines.finalize();var e=this.parent.fontOptions;t=(t=t.replace(/\r\n/g,"\n")).replace(/\r/g,"\n");var n=String(t).split("\n"),r=n.length;if(e.multi)for(var i=0;i0)for(var g=0;g0)for(var u=0;u")||e.parseStartTag("ital","")||e.parseStartTag("mono","")||e.parseEndTag("bold","")||e.parseEndTag("ital","")||e.parseEndTag("mono",""))||n(r)||e.add(r),e.position++}return e.emitBlock(),e.blocks}},{key:"splitMarkdownBlocks",value:function(t){for(var e=this,n=new WN(t),r=!0,i=function(t){return!!/\\/.test(t)&&(n.positionthis.parent.fontOptions.maxWdt}},{key:"getLongestFit",value:function(t){for(var e="",n=0;n1&&void 0!==arguments[1]?arguments[1]:"normal",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.parent.getFormattingValues(this.ctx,this.selected,this.hover,e);for(var r=(t=(t=t.replace(/^( +)/g,"$1\r")).replace(/([^\r][^ ]*)( +)/g,"$1\r$2\r")).split("\r");r.length>0;){var i=this.getLongestFit(r);if(0===i){var o=r[0],g=this.getLongestFitWord(o);this.lines.newLine(ih(o).call(o,0,g),e),r[0]=ih(o).call(o,g)}else{var s=i;" "===r[i-1]?i--:" "===r[s]&&s++;var A=ih(r).call(r,0,i).join("");i==r.length&&n?this.lines.append(A,e):this.lines.newLine(A,e),r=ih(r).call(r,s)}}}}]),t}(),HN=["bold","ital","boldital","mono"],KN=function(){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];Fu(this,t),this.body=e,this.pointToSelf=!1,this.baseSize=void 0,this.fontOptions={},this.setOptions(n),this.size={top:0,left:0,width:0,height:0,yLine:0},this.isEdgeLabel=r}return il(t,[{key:"setOptions",value:function(t){if(this.elementOptions=t,this.initFontOptions(t.font),ZN(t.label)?this.labelDirty=!0:t.label=void 0,void 0!==t.font&&null!==t.font)if("string"==typeof t.font)this.baseSize=this.fontOptions.size;else if("object"===Qc(t.font)){var e=t.font.size;void 0!==e&&(this.baseSize=e)}}},{key:"initFontOptions",value:function(e){var n=this;Mb(HN,(function(t){n.fontOptions[t]={}})),t.parseFontString(this.fontOptions,e)?this.fontOptions.vadjust=0:Mb(e,(function(t,e){null!=t&&"object"!==Qc(t)&&(n.fontOptions[e]=t)}))}},{key:"constrain",value:function(t){var e={constrainWidth:!1,maxWdt:-1,minWdt:-1,constrainHeight:!1,minHgt:-1,valign:"middle"},n=Kb(t,"widthConstraint");if("number"==typeof n)e.maxWdt=Number(n),e.minWdt=Number(n);else if("object"===Qc(n)){var r=Kb(t,["widthConstraint","maximum"]);"number"==typeof r&&(e.maxWdt=Number(r));var i=Kb(t,["widthConstraint","minimum"]);"number"==typeof i&&(e.minWdt=Number(i))}var o=Kb(t,"heightConstraint");if("number"==typeof o)e.minHgt=Number(o);else if("object"===Qc(o)){var g=Kb(t,["heightConstraint","minimum"]);"number"==typeof g&&(e.minHgt=Number(g));var s=Kb(t,["heightConstraint","valign"]);"string"==typeof s&&("top"!==s&&"bottom"!==s||(e.valign=s))}return e}},{key:"update",value:function(t,e){this.setOptions(t,!0),this.propagateFonts(e),Nb(this.fontOptions,this.constrain(e)),this.fontOptions.chooser=FN("label",e)}},{key:"adjustSizes",value:function(t){var e=t?t.right+t.left:0;this.fontOptions.constrainWidth&&(this.fontOptions.maxWdt-=e,this.fontOptions.minWdt-=e);var n=t?t.top+t.bottom:0;this.fontOptions.constrainHeight&&(this.fontOptions.minHgt-=n)}},{key:"addFontOptionsToPile",value:function(t,e){for(var n=0;n5&&void 0!==arguments[5]?arguments[5]:"middle";if(void 0!==this.elementOptions.label){var g=this.fontOptions.size*this.body.view.scale;this.elementOptions.label&&g=this.elementOptions.scaling.label.maxVisible&&(g=Number(this.elementOptions.scaling.label.maxVisible)/this.body.view.scale),this.calculateLabelSize(t,r,i,e,n,o),this._drawBackground(t),this._drawText(t,e,this.size.yLine,o,g))}}},{key:"_drawBackground",value:function(t){if(void 0!==this.fontOptions.background&&"none"!==this.fontOptions.background){t.fillStyle=this.fontOptions.background;var e=this.getSize();t.fillRect(e.left,e.top,e.width,e.height)}}},{key:"_drawText",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"middle",i=arguments.length>4?arguments[4]:void 0,o=Wl(this._setAlignment(t,e,n,r),2);e=o[0],n=o[1],t.textAlign="left",e-=this.size.width/2,this.fontOptions.valign&&this.size.height>this.size.labelHeight&&("top"===this.fontOptions.valign&&(n-=(this.size.height-this.size.labelHeight)/2),"bottom"===this.fontOptions.valign&&(n+=(this.size.height-this.size.labelHeight)/2));for(var g=0;g0&&(t.lineWidth=I.strokeWidth,t.strokeStyle=c,t.lineJoin="round"),t.fillStyle=u,I.strokeWidth>0&&t.strokeText(I.text,e+A,n+I.vadjust),t.fillText(I.text,e+A,n+I.vadjust),A+=I.width}n+=s.height}}}},{key:"_setAlignment",value:function(t,e,n,r){return this.isEdgeLabel&&"horizontal"!==this.fontOptions.align&&!1===this.pointToSelf?(e=0,n=0,"top"===this.fontOptions.align?(t.textBaseline="alphabetic",n-=4):"bottom"===this.fontOptions.align?(t.textBaseline="hanging",n+=4):t.textBaseline="middle"):t.textBaseline=r,[e,n]}},{key:"_getColor",value:function(t,e,n){var r=t||"#000000",i=n||"#ffffff";if(e<=this.elementOptions.scaling.label.drawThreshold){var o=Math.max(0,Math.min(1,1-(this.elementOptions.scaling.label.drawThreshold-e)));r=Bb(r,o),i=Bb(i,o)}return[r,i]}},{key:"getTextSize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return this._processLabel(t,e,n),{width:this.size.width,height:this.size.height,lineCount:this.lineCount}}},{key:"getSize",value:function(){var t=this.size.left,e=this.size.top-1;if(this.isEdgeLabel){var n=.5*-this.size.width;switch(this.fontOptions.align){case"middle":t=n,e=.5*-this.size.height;break;case"top":t=n,e=-(this.size.height+2);break;case"bottom":t=n,e=2}}return{left:t,top:e,width:this.size.width,height:this.size.height}}},{key:"calculateLabelSize",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"middle";this._processLabel(t,e,n),this.size.left=r-.5*this.size.width,this.size.top=i-.5*this.size.height,this.size.yLine=i+.5*(1-this.lineCount)*this.fontOptions.size,"hanging"===o&&(this.size.top+=.5*this.fontOptions.size,this.size.top+=4,this.size.yLine+=4)}},{key:"getFormattingValues",value:function(t,e,n,r){var i=function(t,e,n){return"normal"===e?"mod"===n?"":t[n]:void 0!==t[e][n]?t[e][n]:t[n]},o={color:i(this.fontOptions,r,"color"),size:i(this.fontOptions,r,"size"),face:i(this.fontOptions,r,"face"),mod:i(this.fontOptions,r,"mod"),vadjust:i(this.fontOptions,r,"vadjust"),strokeWidth:this.fontOptions.strokeWidth,strokeColor:this.fontOptions.strokeColor};(e||n)&&("normal"===r&&!0===this.fontOptions.chooser&&this.elementOptions.labelHighlightBold?o.mod="bold":"function"==typeof this.fontOptions.chooser&&this.fontOptions.chooser(o,this.elementOptions.id,e,n));var g="";return void 0!==o.mod&&""!==o.mod&&(g+=o.mod+" "),g+=o.size+"px "+o.face,t.font=g.replace(/"/g,""),o.font=t.font,o.height=o.size,o}},{key:"differentState",value:function(t,e){return t!==this.selectedState||e!==this.hoverState}},{key:"_processLabelText",value:function(t,e,n,r){return new YN(t,this,e,n).process(r)}},{key:"_processLabel",value:function(t,e,n){if(!1!==this.labelDirty||this.differentState(e,n)){var r=this._processLabelText(t,e,n,this.elementOptions.label);this.fontOptions.minWdt>0&&r.width0&&r.height0&&(this.enableBorderDashes(t,e),t.stroke(),this.disableBorderDashes(t,e)),t.restore()}},{key:"performFill",value:function(t,e){t.save(),t.fillStyle=e.color,this.enableShadow(t,e),dv(t).call(t),this.disableShadow(t,e),t.restore(),this.performStroke(t,e)}},{key:"_addBoundingBoxMargin",value:function(t){this.boundingBox.left-=t,this.boundingBox.top-=t,this.boundingBox.bottom+=t,this.boundingBox.right+=t}},{key:"_updateBoundingBox",value:function(t,e,n,r,i){void 0!==n&&this.resize(n,r,i),this.left=t-this.width/2,this.top=e-this.height/2,this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width}},{key:"updateBoundingBox",value:function(t,e,n,r,i){this._updateBoundingBox(t,e,n,r,i)}},{key:"getDimensionsFromLabel",value:function(t,e,n){this.textSize=this.labelModule.getTextSize(t,e,n);var r=this.textSize.width,i=this.textSize.height;return 0===r&&(r=14,i=14),{width:r,height:i}}}]),t}();var XN=function(t){tx(i,t);var e,n,r=(e=i,n=function(){if("undefined"==typeof Reflect||!$P)return!1;if($P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($P(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=sx(e);if(n){var i=sx(this).constructor;t=$P(r,arguments,i)}else t=r.apply(this,arguments);return ex(this,t)});function i(t,e,n){var o;return Fu(this,i),(o=r.call(this,t,e,n))._setMargins(n),o}return il(i,[{key:"resize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.selected,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hover;if(this.needsRefresh(e,n)){var r=this.getDimensionsFromLabel(t,e,n);this.width=r.width+this.margin.right+this.margin.left,this.height=r.height+this.margin.top+this.margin.bottom,this.radius=this.width/2}}},{key:"draw",value:function(t,e,n,r,i,o){this.resize(t,r,i),this.left=e-this.width/2,this.top=n-this.height/2,this.initContextForDraw(t,o),xi(t,this.left,this.top,this.width,this.height,o.borderRadius),this.performFill(t,o),this.updateBoundingBox(e,n,t,r,i),this.labelModule.draw(t,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,r,i)}},{key:"updateBoundingBox",value:function(t,e,n,r,i){this._updateBoundingBox(t,e,n,r,i);var o=this.options.shapeProperties.borderRadius;this._addBoundingBoxMargin(o)}},{key:"distanceToBorder",value:function(t,e){t&&this.resize(t);var n=this.options.borderWidth;return Math.min(Math.abs(this.width/2/Math.cos(e)),Math.abs(this.height/2/Math.sin(e)))+n}}]),i}(QN);var qN=function(t){tx(i,t);var e,n,r=(e=i,n=function(){if("undefined"==typeof Reflect||!$P)return!1;if($P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($P(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=sx(e);if(n){var i=sx(this).constructor;t=$P(r,arguments,i)}else t=r.apply(this,arguments);return ex(this,t)});function i(t,e,n){var o;return Fu(this,i),(o=r.call(this,t,e,n)).labelOffset=0,o.selected=!1,o}return il(i,[{key:"setOptions",value:function(t,e,n){this.options=t,void 0===e&&void 0===n||this.setImages(e,n)}},{key:"setImages",value:function(t,e){e&&this.selected?(this.imageObj=e,this.imageObjAlt=t):(this.imageObj=t,this.imageObjAlt=e)}},{key:"switchImages",value:function(t){var e=t&&!this.selected||!t&&this.selected;if(this.selected=t,void 0!==this.imageObjAlt&&e){var n=this.imageObj;this.imageObj=this.imageObjAlt,this.imageObjAlt=n}}},{key:"_getImagePadding",value:function(){var t={top:0,right:0,bottom:0,left:0};if(this.options.imagePadding){var e=this.options.imagePadding;"object"==Qc(e)?(t.top=e.top,t.right=e.right,t.bottom=e.bottom,t.left=e.left):(t.top=e,t.right=e,t.bottom=e,t.left=e)}return t}},{key:"_resizeImage",value:function(){var t,e;if(!1===this.options.shapeProperties.useImageSize){var n=1,r=1;this.imageObj.width&&this.imageObj.height&&(this.imageObj.width>this.imageObj.height?n=this.imageObj.width/this.imageObj.height:r=this.imageObj.height/this.imageObj.width),t=2*this.options.size*n,e=2*this.options.size*r}else{var i=this._getImagePadding();t=this.imageObj.width+i.left+i.right,e=this.imageObj.height+i.top+i.bottom}this.width=t,this.height=e,this.radius=.5*this.width}},{key:"_drawRawCircle",value:function(t,e,n,r){this.initContextForDraw(t,r),_i(t,e,n,r.size),this.performFill(t,r)}},{key:"_drawImageAtPosition",value:function(t,e){if(0!=this.imageObj.width){t.globalAlpha=void 0!==e.opacity?e.opacity:1,this.enableShadow(t,e);var n=1;!0===this.options.shapeProperties.interpolation&&(n=this.imageObj.width/this.width/this.body.view.scale);var r=this._getImagePadding(),i=this.left+r.left,o=this.top+r.top,g=this.width-r.left-r.right,s=this.height-r.top-r.bottom;this.imageObj.drawImageAtPosition(t,n,i,o,g,s),this.disableShadow(t,e)}}},{key:"_drawImageLabel",value:function(t,e,n,r,i){var o=0;if(void 0!==this.height){o=.5*this.height;var g=this.labelModule.getTextSize(t,r,i);g.lineCount>=1&&(o+=g.height/2)}var s=n+o;this.options.label&&(this.labelOffset=o),this.labelModule.draw(t,e,s,r,i,"hanging")}}]),i}(QN);var JN=function(t){tx(i,t);var e,n,r=(e=i,n=function(){if("undefined"==typeof Reflect||!$P)return!1;if($P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($P(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=sx(e);if(n){var i=sx(this).constructor;t=$P(r,arguments,i)}else t=r.apply(this,arguments);return ex(this,t)});function i(t,e,n){var o;return Fu(this,i),(o=r.call(this,t,e,n))._setMargins(n),o}return il(i,[{key:"resize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.selected,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hover;if(this.needsRefresh(e,n)){var r=this.getDimensionsFromLabel(t,e,n),i=Math.max(r.width+this.margin.right+this.margin.left,r.height+this.margin.top+this.margin.bottom);this.options.size=i/2,this.width=i,this.height=i,this.radius=this.width/2}}},{key:"draw",value:function(t,e,n,r,i,o){this.resize(t,r,i),this.left=e-this.width/2,this.top=n-this.height/2,this._drawRawCircle(t,e,n,o),this.updateBoundingBox(e,n),this.labelModule.draw(t,this.left+this.textSize.width/2+this.margin.left,n,r,i)}},{key:"updateBoundingBox",value:function(t,e){this.boundingBox.top=e-this.options.size,this.boundingBox.left=t-this.options.size,this.boundingBox.right=t+this.options.size,this.boundingBox.bottom=e+this.options.size}},{key:"distanceToBorder",value:function(t){return t&&this.resize(t),.5*this.width}}]),i}(qN);var $N=function(t){tx(i,t);var e,n,r=(e=i,n=function(){if("undefined"==typeof Reflect||!$P)return!1;if($P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($P(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=sx(e);if(n){var i=sx(this).constructor;t=$P(r,arguments,i)}else t=r.apply(this,arguments);return ex(this,t)});function i(t,e,n,o,g){var s;return Fu(this,i),(s=r.call(this,t,e,n)).setImages(o,g),s}return il(i,[{key:"resize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.selected,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hover;if(void 0===this.imageObj.src||void 0===this.imageObj.width||void 0===this.imageObj.height){var r=2*this.options.size;return this.width=r,this.height=r,void(this.radius=.5*this.width)}this.needsRefresh(e,n)&&this._resizeImage()}},{key:"draw",value:function(t,e,n,r,i,o){this.switchImages(r),this.resize();var g=e,s=n;"top-left"===this.options.shapeProperties.coordinateOrigin?(this.left=e,this.top=n,g+=this.width/2,s+=this.height/2):(this.left=e-this.width/2,this.top=n-this.height/2),this._drawRawCircle(t,g,s,o),t.save(),t.clip(),this._drawImageAtPosition(t,o),t.restore(),this._drawImageLabel(t,g,s,r,i),this.updateBoundingBox(e,n)}},{key:"updateBoundingBox",value:function(t,e){"top-left"===this.options.shapeProperties.coordinateOrigin?(this.boundingBox.top=e,this.boundingBox.left=t,this.boundingBox.right=t+2*this.options.size,this.boundingBox.bottom=e+2*this.options.size):(this.boundingBox.top=e-this.options.size,this.boundingBox.left=t-this.options.size,this.boundingBox.right=t+this.options.size,this.boundingBox.bottom=e+this.options.size),this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset)}},{key:"distanceToBorder",value:function(t){return t&&this.resize(t),.5*this.width}}]),i}(qN);var tR=function(t){tx(i,t);var e,n,r=(e=i,n=function(){if("undefined"==typeof Reflect||!$P)return!1;if($P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($P(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=sx(e);if(n){var i=sx(this).constructor;t=$P(r,arguments,i)}else t=r.apply(this,arguments);return ex(this,t)});function i(t,e,n){return Fu(this,i),r.call(this,t,e,n)}return il(i,[{key:"resize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.selected,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hover,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{size:this.options.size};if(this.needsRefresh(e,n)){var i,o;this.labelModule.getTextSize(t,e,n);var g=2*r.size;this.width=null!==(i=this.customSizeWidth)&&void 0!==i?i:g,this.height=null!==(o=this.customSizeHeight)&&void 0!==o?o:g,this.radius=.5*this.width}}},{key:"_drawShape",value:function(t,e,n,r,i,o,g,s){var A,C=this;return this.resize(t,o,g,s),this.left=r-this.width/2,this.top=i-this.height/2,this.initContextForDraw(t,s),(A=e,Object.prototype.hasOwnProperty.call(Ti,A)?Ti[A]:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height))}}]),i}(QN);function eR(t,e){var n=xh(t);if(Va){var r=Va(t);e&&(r=vf(r).call(r,(function(e){return nu(t,e).enumerable}))),n.push.apply(n,r)}return n}function nR(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:this.selected,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hover;if(this.needsRefresh(e,n)){var r=this.getDimensionsFromLabel(t,e,n);this.height=2*r.height,this.width=r.width+r.height,this.radius=.5*this.width}}},{key:"draw",value:function(t,e,n,r,i,o){this.resize(t,r,i),this.left=e-.5*this.width,this.top=n-.5*this.height,this.initContextForDraw(t,o),Ei(t,this.left,this.top,this.width,this.height),this.performFill(t,o),this.updateBoundingBox(e,n,t,r,i),this.labelModule.draw(t,e,n,r,i)}},{key:"distanceToBorder",value:function(t,e){t&&this.resize(t);var n=.5*this.width,r=.5*this.height,i=Math.sin(e)*n,o=Math.cos(e)*r;return n*r/Math.sqrt(i*i+o*o)}}]),i}(QN);var AR=function(t){tx(i,t);var e,n,r=(e=i,n=function(){if("undefined"==typeof Reflect||!$P)return!1;if($P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($P(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=sx(e);if(n){var i=sx(this).constructor;t=$P(r,arguments,i)}else t=r.apply(this,arguments);return ex(this,t)});function i(t,e,n){var o;return Fu(this,i),(o=r.call(this,t,e,n))._setMargins(n),o}return il(i,[{key:"resize",value:function(t,e,n){this.needsRefresh(e,n)&&(this.iconSize={width:Number(this.options.icon.size),height:Number(this.options.icon.size)},this.width=this.iconSize.width+this.margin.right+this.margin.left,this.height=this.iconSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}},{key:"draw",value:function(t,e,n,r,i,o){var g=this;return this.resize(t,r,i),this.options.icon.size=this.options.icon.size||50,this.left=e-this.width/2,this.top=n-this.height/2,this._icon(t,e,n,r,i,o),{drawExternalLabel:function(){void 0!==g.options.label&&g.labelModule.draw(t,g.left+g.iconSize.width/2+g.margin.left,n+g.height/2+5,r),g.updateBoundingBox(e,n)}}}},{key:"updateBoundingBox",value:function(t,e){this.boundingBox.top=e-.5*this.options.icon.size,this.boundingBox.left=t-.5*this.options.icon.size,this.boundingBox.right=t+.5*this.options.icon.size,this.boundingBox.bottom=e+.5*this.options.icon.size,void 0!==this.options.label&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height+5))}},{key:"_icon",value:function(t,e,n,r,i,o){var g=Number(this.options.icon.size);void 0!==this.options.icon.code?(t.font=[null!=this.options.icon.weight?this.options.icon.weight:r?"bold":"",(null!=this.options.icon.weight&&r?5:0)+g+"px",this.options.icon.face].join(" "),t.fillStyle=this.options.icon.color||"black",t.textAlign="center",t.textBaseline="middle",this.enableShadow(t,o),t.fillText(this.options.icon.code,e,n),this.disableShadow(t,o)):console.error("When using the icon shape, you need to define the code in the icon options object. This can be done per node or globally.")}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),i}(QN);var CR=function(t){tx(i,t);var e,n,r=(e=i,n=function(){if("undefined"==typeof Reflect||!$P)return!1;if($P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($P(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=sx(e);if(n){var i=sx(this).constructor;t=$P(r,arguments,i)}else t=r.apply(this,arguments);return ex(this,t)});function i(t,e,n,o,g){var s;return Fu(this,i),(s=r.call(this,t,e,n)).setImages(o,g),s}return il(i,[{key:"resize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.selected,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hover;if(void 0===this.imageObj.src||void 0===this.imageObj.width||void 0===this.imageObj.height){var r=2*this.options.size;return this.width=r,void(this.height=r)}this.needsRefresh(e,n)&&this._resizeImage()}},{key:"draw",value:function(t,e,n,r,i,o){t.save(),this.switchImages(r),this.resize();var g=e,s=n;if("top-left"===this.options.shapeProperties.coordinateOrigin?(this.left=e,this.top=n,g+=this.width/2,s+=this.height/2):(this.left=e-this.width/2,this.top=n-this.height/2),!0===this.options.shapeProperties.useBorderWithImage){var A=this.options.borderWidth,C=this.options.borderWidthSelected||2*this.options.borderWidth,I=(r?C:A)/this.body.view.scale;t.lineWidth=Math.min(this.width,I),t.beginPath();var a=r?this.options.color.highlight.border:i?this.options.color.hover.border:this.options.color.border,u=r?this.options.color.highlight.background:i?this.options.color.hover.background:this.options.color.background;void 0!==o.opacity&&(a=Bb(a,o.opacity),u=Bb(u,o.opacity)),t.strokeStyle=a,t.fillStyle=u,t.rect(this.left-.5*t.lineWidth,this.top-.5*t.lineWidth,this.width+t.lineWidth,this.height+t.lineWidth),dv(t).call(t),this.performStroke(t,o),t.closePath()}this._drawImageAtPosition(t,o),this._drawImageLabel(t,g,s,r,i),this.updateBoundingBox(e,n),t.restore()}},{key:"updateBoundingBox",value:function(t,e){this.resize(),"top-left"===this.options.shapeProperties.coordinateOrigin?(this.left=t,this.top=e):(this.left=t-this.width/2,this.top=e-this.height/2),this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width,void 0!==this.options.label&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset))}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),i}(qN);var IR=function(t){tx(i,t);var e,n,r=(e=i,n=function(){if("undefined"==typeof Reflect||!$P)return!1;if($P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($P(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=sx(e);if(n){var i=sx(this).constructor;t=$P(r,arguments,i)}else t=r.apply(this,arguments);return ex(this,t)});function i(t,e,n){return Fu(this,i),r.call(this,t,e,n)}return il(i,[{key:"draw",value:function(t,e,n,r,i,o){return this._drawShape(t,"square",2,e,n,r,i,o)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),i}(tR);var aR=function(t){tx(i,t);var e,n,r=(e=i,n=function(){if("undefined"==typeof Reflect||!$P)return!1;if($P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($P(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=sx(e);if(n){var i=sx(this).constructor;t=$P(r,arguments,i)}else t=r.apply(this,arguments);return ex(this,t)});function i(t,e,n){return Fu(this,i),r.call(this,t,e,n)}return il(i,[{key:"draw",value:function(t,e,n,r,i,o){return this._drawShape(t,"hexagon",4,e,n,r,i,o)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),i}(tR);var uR=function(t){tx(i,t);var e,n,r=(e=i,n=function(){if("undefined"==typeof Reflect||!$P)return!1;if($P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($P(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=sx(e);if(n){var i=sx(this).constructor;t=$P(r,arguments,i)}else t=r.apply(this,arguments);return ex(this,t)});function i(t,e,n){return Fu(this,i),r.call(this,t,e,n)}return il(i,[{key:"draw",value:function(t,e,n,r,i,o){return this._drawShape(t,"star",4,e,n,r,i,o)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),i}(tR);var cR=function(t){tx(i,t);var e,n,r=(e=i,n=function(){if("undefined"==typeof Reflect||!$P)return!1;if($P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($P(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=sx(e);if(n){var i=sx(this).constructor;t=$P(r,arguments,i)}else t=r.apply(this,arguments);return ex(this,t)});function i(t,e,n){var o;return Fu(this,i),(o=r.call(this,t,e,n))._setMargins(n),o}return il(i,[{key:"resize",value:function(t,e,n){this.needsRefresh(e,n)&&(this.textSize=this.labelModule.getTextSize(t,e,n),this.width=this.textSize.width+this.margin.right+this.margin.left,this.height=this.textSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}},{key:"draw",value:function(t,e,n,r,i,o){this.resize(t,r,i),this.left=e-this.width/2,this.top=n-this.height/2,this.enableShadow(t,o),this.labelModule.draw(t,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,r,i),this.disableShadow(t,o),this.updateBoundingBox(e,n,t,r,i)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),i}(QN);var lR=function(t){tx(i,t);var e,n,r=(e=i,n=function(){if("undefined"==typeof Reflect||!$P)return!1;if($P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($P(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=sx(e);if(n){var i=sx(this).constructor;t=$P(r,arguments,i)}else t=r.apply(this,arguments);return ex(this,t)});function i(t,e,n){return Fu(this,i),r.call(this,t,e,n)}return il(i,[{key:"draw",value:function(t,e,n,r,i,o){return this._drawShape(t,"triangle",3,e,n,r,i,o)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),i}(tR);var hR=function(t){tx(i,t);var e,n,r=(e=i,n=function(){if("undefined"==typeof Reflect||!$P)return!1;if($P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($P(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=sx(e);if(n){var i=sx(this).constructor;t=$P(r,arguments,i)}else t=r.apply(this,arguments);return ex(this,t)});function i(t,e,n){return Fu(this,i),r.call(this,t,e,n)}return il(i,[{key:"draw",value:function(t,e,n,r,i,o){return this._drawShape(t,"triangleDown",3,e,n,r,i,o)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),i}(tR);function dR(t,e){var n=xh(t);if(Va){var r=Va(t);e&&(r=vf(r).call(r,(function(e){return nu(t,e).enumerable}))),n.push.apply(n,r)}return n}function fR(t){for(var e=1;et.left&&this.shape.topt.top}},{key:"isBoundingBoxOverlappingWith",value:function(t){return this.shape.boundingBox.leftt.left&&this.shape.boundingBox.topt.top}}],[{key:"checkOpacity",value:function(t){return 0<=t&&t<=1}},{key:"checkCoordinateOrigin",value:function(t){return void 0===t||"center"===t||"top-left"===t}},{key:"updateGroupOptions",value:function(e,n,r){var i;if(void 0!==r){var o=e.group;if(void 0!==n&&void 0!==n.group&&o!==n.group)throw new Error("updateGroupOptions: group values in options don't match.");if("number"==typeof o||"string"==typeof o&&""!=o){var g=r.get(o);void 0!==g.opacity&&void 0===n.opacity&&(t.checkOpacity(g.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+g.opacity),g.opacity=void 0));var s=vf(i=LN(n)).call(i,(function(t){return null!=n[t]}));s.push("font"),Pb(s,e,g),e.color=Fb(e.color)}}}},{key:"parseOptions",value:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4?arguments[4]:void 0;if(Pb(["color","fixed","shadow"],e,n,r),t.checkMass(n),void 0!==e.opacity&&(t.checkOpacity(e.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+e.opacity),e.opacity=void 0)),void 0!==n.opacity&&(t.checkOpacity(n.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+n.opacity),n.opacity=void 0)),n.shapeProperties&&!t.checkCoordinateOrigin(n.shapeProperties.coordinateOrigin)&&console.error("Invalid option for node coordinateOrigin, found: "+n.shapeProperties.coordinateOrigin),Yb(e,n,"shadow",i),void 0!==n.color&&null!==n.color){var g=Fb(n.color);Tb(e.color,g)}else!0===r&&null===n.color&&(e.color=Wb(i.color));void 0!==n.fixed&&null!==n.fixed&&("boolean"==typeof n.fixed?(e.fixed.x=n.fixed,e.fixed.y=n.fixed):(void 0!==n.fixed.x&&"boolean"==typeof n.fixed.x&&(e.fixed.x=n.fixed.x),void 0!==n.fixed.y&&"boolean"==typeof n.fixed.y&&(e.fixed.y=n.fixed.y))),!0===r&&null===n.font&&(e.font=Wb(i.font)),t.updateGroupOptions(e,n,o),void 0!==n.scaling&&Yb(e.scaling,n.scaling,"label",i.scaling)}},{key:"checkMass",value:function(t,e){if(void 0!==t.mass&&t.mass<=0){var n="";void 0!==e&&(n=" in node id: "+e),console.error("%cNegative or zero mass disallowed"+n+", setting mass to 1.",Am),t.mass=1}}}]),t}();function vR(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1?console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+t.opacity):this.options.opacity=t.opacity),void 0!==t.shape)for(var e in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,e)&&this.body.nodes[e].updateShape();if(void 0!==t.font||void 0!==t.widthConstraint||void 0!==t.heightConstraint)for(var n=0,r=xh(this.body.nodes);n1&&void 0!==arguments[1]&&arguments[1],n=this.body.data.nodes;if(dN("id",t))this.body.data.nodes=t;else if(Ih(t))this.body.data.nodes=new hN,this.body.data.nodes.add(t);else{if(t)throw new TypeError("Array or DataSet expected");this.body.data.nodes=new hN}if(n&&Mb(this.nodesListeners,(function(t,e){n.off(e,t)})),this.body.nodes={},this.body.data.nodes){var r=this;Mb(this.nodesListeners,(function(t,e){r.body.data.nodes.on(e,t)}));var i=this.body.data.nodes.getIds();this.add(i,!0)}!1===e&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(t){for(var e,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=[],i=0;i1&&void 0!==arguments[1]?arguments[1]:pR)(t,this.body,this.images,this.groups,this.options,this.defaultOptions)}},{key:"refresh",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Mb(this.body.nodes,(function(n,r){var i=t.body.data.nodes.get(r);void 0!==i&&(!0===e&&n.setOptions({x:null,y:null}),n.setOptions({fixed:!1}),n.setOptions(i))}))}},{key:"getPositions",value:function(t){var e={};if(void 0!==t){if(!0===Ih(t)){for(var n=0;n=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,g=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return g=t.done,t},e:function(t){s=!0,o=t},f:function(){try{g||null==n.return||n.return()}finally{if(s)throw o}}}}(n.get());try{for(r.s();!(t=r.n()).done;){var i=t.value,o=i.id,g=this.body.nodes[o],s=Math.round(g.x),A=Math.round(g.y);i.x===s&&i.y===A||e.push({id:o,x:s,y:A})}}catch(t){r.e(t)}finally{r.f()}n.update(e)}},{key:"getBoundingBox",value:function(t){if(void 0!==this.body.nodes[t])return this.body.nodes[t].shape.boundingBox}},{key:"getConnectedNodes",value:function(t,e){var n=[];if(void 0!==this.body.nodes[t])for(var r=this.body.nodes[t],i={},o=0;o0?(r=n/s)*r:n;return s===1/0?1/0:s*GR(i)}});var WR=Ft.Math.hypot;!function(t){t.exports=WR}(zR);var YR=L(FR);function HR(t){var e=function(){if("undefined"==typeof Reflect||!$P)return!1;if($P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($P(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=sx(t);if(e){var i=sx(this).constructor;n=$P(r,arguments,i)}else n=r.apply(this,arguments);return ex(this,n)}}var KR=function(){function t(){Fu(this,t)}return il(t,null,[{key:"transform",value:function(t,e){Ih(t)||(t=[t]);for(var n=e.point.x,r=e.point.y,i=e.angle,o=e.length,g=0;g4&&void 0!==arguments[4]?arguments[4]:this.getViaNode();t.strokeStyle=this.getColor(t,e),t.lineWidth=e.width,!1!==e.dashes?this._drawDashedLine(t,e,i):this._drawLine(t,e,i)}},{key:"_drawLine",value:function(t,e,n,r,i){if(this.from!=this.to)this._line(t,e,n,r,i);else{var o=Wl(this._getCircleData(t),3),g=o[0],s=o[1],A=o[2];this._circle(t,e,g,s,A)}}},{key:"_drawDashedLine",value:function(t,e,n,r,i){t.lineCap="round";var o=Ih(e.dashes)?e.dashes:[5,5];if(void 0!==t.setLineDash){if(t.save(),t.setLineDash(o),t.lineDashOffset=0,this.from!=this.to)this._line(t,e,n);else{var g=Wl(this._getCircleData(t),3),s=g[0],A=g[1],C=g[2];this._circle(t,e,s,A,C)}t.setLineDash([0]),t.lineDashOffset=0,t.restore()}else{if(this.from!=this.to)ki(t,this.from.x,this.from.y,this.to.x,this.to.y,o);else{var I=Wl(this._getCircleData(t),3),a=I[0],u=I[1],c=I[2];this._circle(t,e,a,u,c)}this.enableShadow(t,e),t.stroke(),this.disableShadow(t,e)}}},{key:"findBorderPosition",value:function(t,e,n){return this.from!=this.to?this._findBorderPosition(t,e,n):this._findBorderPositionCircle(t,e,n)}},{key:"findBorderPositions",value:function(t){if(this.from!=this.to)return{from:this._findBorderPosition(this.from,t),to:this._findBorderPosition(this.to,t)};var e,n=Wl(ih(e=this._getCircleData(t)).call(e,0,2),2),r=n[0],i=n[1];return{from:this._findBorderPositionCircle(this.from,t,{x:r,y:i,low:.25,high:.6,direction:-1}),to:this._findBorderPositionCircle(this.from,t,{x:r,y:i,low:.6,high:.8,direction:1})}}},{key:"_getCircleData",value:function(t){var e=this.options.selfReference.size;void 0!==t&&void 0===this.from.shape.width&&this.from.shape.resize(t);var n=UN(t,this.options.selfReference.angle,e,this.from);return[n.x,n.y,e]}},{key:"_pointOnCircle",value:function(t,e,n,r){var i=2*r*Math.PI;return{x:t+n*Math.cos(i),y:e-n*Math.sin(i)}}},{key:"_findBorderPositionCircle",value:function(t,e,n){var r,i=n.x,o=n.y,g=n.low,s=n.high,A=n.direction,C=this.options.selfReference.size,I=.5*(g+s),a=0;!0===this.options.arrowStrikethrough&&(-1===A?a=this.options.endPointOffset.from:1===A&&(a=this.options.endPointOffset.to));var u=0;do{I=.5*(g+s),r=this._pointOnCircle(i,o,C,I);var c=Math.atan2(t.y-r.y,t.x-r.x),l=t.distanceToBorder(e,c)+a-Math.sqrt(Math.pow(r.x-t.x,2)+Math.pow(r.y-t.y,2));if(Math.abs(l)<.05)break;l>0?A>0?g=I:s=I:A>0?s=I:g=I,++u}while(g<=s&&u<10);return CD(CD({},r),{},{t:I})}},{key:"getLineWidth",value:function(t,e){return!0===t?Math.max(this.selectionWidth,.3/this._body.view.scale):!0===e?Math.max(this.hoverWidth,.3/this._body.view.scale):Math.max(this.options.width,.3/this._body.view.scale)}},{key:"getColor",value:function(t,e){if(!1!==e.inheritsColor){if("both"===e.inheritsColor&&this.from.id!==this.to.id){var n=t.createLinearGradient(this.from.x,this.from.y,this.to.x,this.to.y),r=this.from.options.color.highlight.border,i=this.to.options.color.highlight.border;return!1===this.from.selected&&!1===this.to.selected?(r=Bb(this.from.options.color.border,e.opacity),i=Bb(this.to.options.color.border,e.opacity)):!0===this.from.selected&&!1===this.to.selected?i=this.to.options.color.border:!1===this.from.selected&&!0===this.to.selected&&(r=this.from.options.color.border),n.addColorStop(0,r),n.addColorStop(1,i),n}return"to"===e.inheritsColor?Bb(this.to.options.color.border,e.opacity):Bb(this.from.options.color.border,e.opacity)}return Bb(e.color,e.opacity)}},{key:"_circle",value:function(t,e,n,r,i){this.enableShadow(t,e);var o=0,g=2*Math.PI;if(!this.options.selfReference.renderBehindTheNode){var s=this.options.selfReference.angle,A=this.options.selfReference.angle+Math.PI,C=this._findBorderPositionCircle(this.from,t,{x:n,y:r,low:s,high:A,direction:-1}),I=this._findBorderPositionCircle(this.from,t,{x:n,y:r,low:s,high:A,direction:1});o=Math.atan2(C.y-r,C.x-n),g=Math.atan2(I.y-r,I.x-n)}t.beginPath(),t.arc(n,r,i,o,g,!1),t.stroke(),this.disableShadow(t,e)}},{key:"getDistanceToEdge",value:function(t,e,n,r,i,o){if(this.from!=this.to)return this._getDistanceToEdge(t,e,n,r,i,o);var g=Wl(this._getCircleData(void 0),3),s=g[0],A=g[1],C=g[2],I=s-i,a=A-o;return Math.abs(Math.sqrt(I*I+a*a)-C)}},{key:"_getDistanceToLine",value:function(t,e,n,r,i,o){var g=n-t,s=r-e,A=((i-t)*g+(o-e)*s)/(g*g+s*s);A>1?A=1:A<0&&(A=0);var C=t+A*g-i,I=e+A*s-o;return Math.sqrt(C*C+I*I)}},{key:"getArrowData",value:function(t,e,n,r,i,o){var g,s,A,C,I,a,u,c=o.width;"from"===e?(A=this.from,C=this.to,I=o.fromArrowScale<0,a=Math.abs(o.fromArrowScale),u=o.fromArrowType):"to"===e?(A=this.to,C=this.from,I=o.toArrowScale<0,a=Math.abs(o.toArrowScale),u=o.toArrowType):(A=this.to,C=this.from,I=o.middleArrowScale<0,a=Math.abs(o.middleArrowScale),u=o.middleArrowType);var l=15*a+3*c;if(A!=C){var h=l/YR(A.x-C.x,A.y-C.y);if("middle"!==e)if(!0===this.options.smooth.enabled){var d=this._findBorderPosition(A,t,{via:n}),f=this.getPoint(d.t+h*("from"===e?1:-1),n);g=Math.atan2(d.y-f.y,d.x-f.x),s=d}else g=Math.atan2(A.y-C.y,A.x-C.x),s=this._findBorderPosition(A,t);else{var p=(I?-h:h)/2,v=this.getPoint(.5+p,n),y=this.getPoint(.5-p,n);g=Math.atan2(v.y-y.y,v.x-y.x),s=this.getPoint(.5,n)}}else{var b=Wl(this._getCircleData(t),3),m=b[0],w=b[1],_=b[2];if("from"===e){var x=this.options.selfReference.angle,E=this.options.selfReference.angle+Math.PI,O=this._findBorderPositionCircle(this.from,t,{x:m,y:w,low:x,high:E,direction:-1});g=-2*O.t*Math.PI+1.5*Math.PI+.1*Math.PI,s=O}else if("to"===e){var k=this.options.selfReference.angle,T=this.options.selfReference.angle+Math.PI,S=this._findBorderPositionCircle(this.from,t,{x:m,y:w,low:k,high:T,direction:1});g=-2*S.t*Math.PI+1.5*Math.PI-1.1*Math.PI,s=S}else{var P=this.options.selfReference.angle/(2*Math.PI);s=this._pointOnCircle(m,w,_,P),g=-2*P*Math.PI+1.5*Math.PI+.1*Math.PI}}return{point:s,core:{x:s.x-.9*l*Math.cos(g),y:s.y-.9*l*Math.sin(g)},angle:g,length:l,type:u}}},{key:"drawArrowHead",value:function(t,e,n,r,i){t.strokeStyle=this.getColor(t,e),t.fillStyle=t.strokeStyle,t.lineWidth=e.width,sD.draw(t,i)&&(this.enableShadow(t,e),dv(t).call(t),this.disableShadow(t,e))}},{key:"enableShadow",value:function(t,e){!0===e.shadow&&(t.shadowColor=e.shadowColor,t.shadowBlur=e.shadowSize,t.shadowOffsetX=e.shadowX,t.shadowOffsetY=e.shadowY)}},{key:"disableShadow",value:function(t,e){!0===e.shadow&&(t.shadowColor="rgba(0,0,0,0)",t.shadowBlur=0,t.shadowOffsetX=0,t.shadowOffsetY=0)}},{key:"drawBackground",value:function(t,e){if(!1!==e.background){var n={strokeStyle:t.strokeStyle,lineWidth:t.lineWidth,dashes:t.dashes};t.strokeStyle=e.backgroundColor,t.lineWidth=e.backgroundSize,this.setStrokeDashed(t,e.backgroundDashes),t.stroke(),t.strokeStyle=n.strokeStyle,t.lineWidth=n.lineWidth,t.dashes=n.dashes,this.setStrokeDashed(t,e.dashes)}}},{key:"setStrokeDashed",value:function(t,e){if(!1!==e)if(void 0!==t.setLineDash){var n=Ih(e)?e:[5,5];t.setLineDash(n)}else console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.");else void 0!==t.setLineDash?t.setLineDash([]):console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.")}}]),t}();function aD(t,e){var n=xh(t);if(Va){var r=Va(t);e&&(r=vf(r).call(r,(function(e){return nu(t,e).enumerable}))),n.push.apply(n,r)}return n}function uD(t){for(var e=1;e2&&void 0!==arguments[2]?arguments[2]:this._getViaCoordinates(),o=!1,g=1,s=0,A=this.to,C=this.options.endPointOffset?this.options.endPointOffset.to:0;t.id===this.from.id&&(A=this.from,o=!0,C=this.options.endPointOffset?this.options.endPointOffset.from:0),!1===this.options.arrowStrikethrough&&(C=0);var I=0;do{r=.5*(s+g),n=this.getPoint(r,i);var a=Math.atan2(A.y-n.y,A.x-n.x),u=A.distanceToBorder(e,a)+C-Math.sqrt(Math.pow(n.x-A.x,2)+Math.pow(n.y-A.y,2));if(Math.abs(u)<.2)break;u<0?!1===o?s=r:g=r:!1===o?g=r:s=r,++I}while(s<=g&&I<10);return uD(uD({},n),{},{t:r})}},{key:"_getDistanceToBezierEdge",value:function(t,e,n,r,i,o,g){var s,A,C,I,a,u=1e9,c=t,l=e;for(A=1;A<10;A++)C=.1*A,I=Math.pow(1-C,2)*t+2*C*(1-C)*g.x+Math.pow(C,2)*n,a=Math.pow(1-C,2)*e+2*C*(1-C)*g.y+Math.pow(C,2)*r,A>0&&(u=(s=this._getDistanceToLine(c,l,I,a,i,o))1&&void 0!==arguments[1]?arguments[1]:this.via;if(this.from===this.to){var n=Wl(this._getCircleData(),3),r=n[0],i=n[1],o=n[2],g=2*Math.PI*(1-t);return{x:r+o*Math.sin(g),y:i+o-o*(1-Math.cos(g))}}return{x:Math.pow(1-t,2)*this.fromPoint.x+2*t*(1-t)*e.x+Math.pow(t,2)*this.toPoint.x,y:Math.pow(1-t,2)*this.fromPoint.y+2*t*(1-t)*e.y+Math.pow(t,2)*this.toPoint.y}}},{key:"_findBorderPosition",value:function(t,e){return this._findBorderPositionBezier(t,e,this.via)}},{key:"_getDistanceToEdge",value:function(t,e,n,r,i,o){return this._getDistanceToBezierEdge(t,e,n,r,i,o,this.via)}}]),i}(cD);var hD=function(t){tx(i,t);var e,n,r=(e=i,n=function(){if("undefined"==typeof Reflect||!$P)return!1;if($P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($P(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=sx(e);if(n){var i=sx(this).constructor;t=$P(r,arguments,i)}else t=r.apply(this,arguments);return ex(this,t)});function i(t,e,n){return Fu(this,i),r.call(this,t,e,n)}return il(i,[{key:"_line",value:function(t,e,n){this._bezierCurve(t,e,n)}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_getViaCoordinates",value:function(){var t,e,n=this.options.smooth.roundness,r=this.options.smooth.type,i=Math.abs(this.from.x-this.to.x),o=Math.abs(this.from.y-this.to.y);if("discrete"===r||"diagonalCross"===r){var g,s;g=s=i<=o?n*o:n*i,this.from.x>this.to.x&&(g=-g),this.from.y>=this.to.y&&(s=-s);var A=this.from.x+g,C=this.from.y+s;return"discrete"===r&&(i<=o?A=ithis.to.x&&(t=-t),this.from.y>=this.to.y&&(e=-e);var y=this.from.x+t,b=this.from.y+e;return i<=o?y=this.from.x<=this.to.x?this.to.xy?this.to.x:y:b=this.from.y>=this.to.y?this.to.y>b?this.to.y:b:this.to.y2&&void 0!==arguments[2]?arguments[2]:{};return this._findBorderPositionBezier(t,e,n.via)}},{key:"_getDistanceToEdge",value:function(t,e,n,r,i,o){var g=arguments.length>6&&void 0!==arguments[6]?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge(t,e,n,r,i,o,g)}},{key:"getPoint",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._getViaCoordinates(),n=t;return{x:Math.pow(1-n,2)*this.fromPoint.x+2*n*(1-n)*e.x+Math.pow(n,2)*this.toPoint.x,y:Math.pow(1-n,2)*this.fromPoint.y+2*n*(1-n)*e.y+Math.pow(n,2)*this.toPoint.y}}}]),i}(cD);var dD=function(t){tx(i,t);var e,n,r=(e=i,n=function(){if("undefined"==typeof Reflect||!$P)return!1;if($P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($P(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=sx(e);if(n){var i=sx(this).constructor;t=$P(r,arguments,i)}else t=r.apply(this,arguments);return ex(this,t)});function i(t,e,n){return Fu(this,i),r.call(this,t,e,n)}return il(i,[{key:"_getDistanceToBezierEdge2",value:function(t,e,n,r,i,o,g,s){for(var A=1e9,C=t,I=e,a=[0,0,0,0],u=1;u<10;u++){var c=.1*u;a[0]=Math.pow(1-c,3),a[1]=3*c*Math.pow(1-c,2),a[2]=3*Math.pow(c,2)*(1-c),a[3]=Math.pow(c,3);var l=a[0]*t+a[1]*g.x+a[2]*s.x+a[3]*n,h=a[0]*e+a[1]*g.y+a[2]*s.y+a[3]*r;if(u>0){var d=this._getDistanceToLine(C,I,l,h,i,o);A=dMath.abs(o)||!0===this.options.smooth.forceDirection||"horizontal"===this.options.smooth.forceDirection)&&"vertical"!==this.options.smooth.forceDirection?(e=this.from.y,r=this.to.y,t=this.from.x-g*i,n=this.to.x+g*i):(e=this.from.y-g*o,r=this.to.y+g*o,t=this.from.x,n=this.to.x),[{x:t,y:e},{x:n,y:r}]}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_findBorderPosition",value:function(t,e){return this._findBorderPositionBezier(t,e)}},{key:"_getDistanceToEdge",value:function(t,e,n,r,i,o){var g=Wl(arguments.length>6&&void 0!==arguments[6]?arguments[6]:this._getViaCoordinates(),2),s=g[0],A=g[1];return this._getDistanceToBezierEdge2(t,e,n,r,i,o,s,A)}},{key:"getPoint",value:function(t){var e=Wl(arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._getViaCoordinates(),2),n=e[0],r=e[1],i=t,o=[Math.pow(1-i,3),3*i*Math.pow(1-i,2),3*Math.pow(i,2)*(1-i),Math.pow(i,3)];return{x:o[0]*this.fromPoint.x+o[1]*n.x+o[2]*r.x+o[3]*this.toPoint.x,y:o[0]*this.fromPoint.y+o[1]*n.y+o[2]*r.y+o[3]*this.toPoint.y}}}]),i}(dD);var pD=function(t){tx(i,t);var e,n,r=(e=i,n=function(){if("undefined"==typeof Reflect||!$P)return!1;if($P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($P(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=sx(e);if(n){var i=sx(this).constructor;t=$P(r,arguments,i)}else t=r.apply(this,arguments);return ex(this,t)});function i(t,e,n){return Fu(this,i),r.call(this,t,e,n)}return il(i,[{key:"_line",value:function(t,e){t.beginPath(),t.moveTo(this.fromPoint.x,this.fromPoint.y),t.lineTo(this.toPoint.x,this.toPoint.y),this.enableShadow(t,e),t.stroke(),this.disableShadow(t,e)}},{key:"getViaNode",value:function(){}},{key:"getPoint",value:function(t){return{x:(1-t)*this.fromPoint.x+t*this.toPoint.x,y:(1-t)*this.fromPoint.y+t*this.toPoint.y}}},{key:"_findBorderPosition",value:function(t,e){var n=this.to,r=this.from;t.id===this.from.id&&(n=this.from,r=this.to);var i=Math.atan2(n.y-r.y,n.x-r.x),o=n.x-r.x,g=n.y-r.y,s=Math.sqrt(o*o+g*g),A=(s-t.distanceToBorder(e,i))/s;return{x:(1-A)*r.x+A*n.x,y:(1-A)*r.y+A*n.y,t:0}}},{key:"_getDistanceToEdge",value:function(t,e,n,r,i,o){return this._getDistanceToLine(t,e,n,r,i,o)}}]),i}(ID),vD=function(){function t(e,n,r,i,o){if(Fu(this,t),void 0===n)throw new Error("No body provided");this.options=Wb(i),this.globalOptions=i,this.defaultOptions=o,this.body=n,this.imagelist=r,this.id=void 0,this.fromId=void 0,this.toId=void 0,this.selected=!1,this.hover=!1,this.labelDirty=!0,this.baseWidth=this.options.width,this.baseFontSize=this.options.font.size,this.from=void 0,this.to=void 0,this.edgeType=void 0,this.connected=!1,this.labelModule=new KN(this.body,this.options,!0),this.setOptions(e)}return il(t,[{key:"setOptions",value:function(e){if(e){var n=void 0!==e.physics&&this.options.physics!==e.physics||void 0!==e.hidden&&(this.options.hidden||!1)!==(e.hidden||!1)||void 0!==e.from&&this.options.from!==e.from||void 0!==e.to&&this.options.to!==e.to;t.parseOptions(this.options,e,!0,this.globalOptions),void 0!==e.id&&(this.id=e.id),void 0!==e.from&&(this.fromId=e.from),void 0!==e.to&&(this.toId=e.to),void 0!==e.title&&(this.title=e.title),void 0!==e.value&&(e.value=SN(e.value));var r=[e,this.options,this.defaultOptions];return this.chooser=FN("edge",r),this.updateLabelModule(e),n=this.updateEdgeType()||n,this._setInteractionWidths(),this.connect(),n}}},{key:"getFormattingValues",value:function(){var t=!0===this.options.arrows.to||!0===this.options.arrows.to.enabled,e=!0===this.options.arrows.from||!0===this.options.arrows.from.enabled,n=!0===this.options.arrows.middle||!0===this.options.arrows.middle.enabled,r=this.options.color.inherit,i={toArrow:t,toArrowScale:this.options.arrows.to.scaleFactor,toArrowType:this.options.arrows.to.type,toArrowSrc:this.options.arrows.to.src,toArrowImageWidth:this.options.arrows.to.imageWidth,toArrowImageHeight:this.options.arrows.to.imageHeight,middleArrow:n,middleArrowScale:this.options.arrows.middle.scaleFactor,middleArrowType:this.options.arrows.middle.type,middleArrowSrc:this.options.arrows.middle.src,middleArrowImageWidth:this.options.arrows.middle.imageWidth,middleArrowImageHeight:this.options.arrows.middle.imageHeight,fromArrow:e,fromArrowScale:this.options.arrows.from.scaleFactor,fromArrowType:this.options.arrows.from.type,fromArrowSrc:this.options.arrows.from.src,fromArrowImageWidth:this.options.arrows.from.imageWidth,fromArrowImageHeight:this.options.arrows.from.imageHeight,arrowStrikethrough:this.options.arrowStrikethrough,color:r?void 0:this.options.color.color,inheritsColor:r,opacity:this.options.color.opacity,hidden:this.options.hidden,length:this.options.length,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y,dashes:this.options.dashes,width:this.options.width,background:this.options.background.enabled,backgroundColor:this.options.background.color,backgroundSize:this.options.background.size,backgroundDashes:this.options.background.dashes};if(this.selected||this.hover)if(!0===this.chooser){if(this.selected){var o=this.options.selectionWidth;"function"==typeof o?i.width=o(i.width):"number"==typeof o&&(i.width+=o),i.width=Math.max(i.width,.3/this.body.view.scale),i.color=this.options.color.highlight,i.shadow=this.options.shadow.enabled}else if(this.hover){var g=this.options.hoverWidth;"function"==typeof g?i.width=g(i.width):"number"==typeof g&&(i.width+=g),i.width=Math.max(i.width,.3/this.body.view.scale),i.color=this.options.color.hover,i.shadow=this.options.shadow.enabled}}else"function"==typeof this.chooser&&(this.chooser(i,this.options.id,this.selected,this.hover),void 0!==i.color&&(i.inheritsColor=!1),!1===i.shadow&&(i.shadowColor===this.options.shadow.color&&i.shadowSize===this.options.shadow.size&&i.shadowX===this.options.shadow.x&&i.shadowY===this.options.shadow.y||(i.shadow=!0)));else i.shadow=this.options.shadow.enabled,i.width=Math.max(i.width,.3/this.body.view.scale);return i}},{key:"updateLabelModule",value:function(t){var e=[t,this.options,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,e),void 0!==this.labelModule.baseSize&&(this.baseFontSize=this.labelModule.baseSize)}},{key:"updateEdgeType",value:function(){var t=this.options.smooth,e=!1,n=!0;return void 0!==this.edgeType&&((this.edgeType instanceof lD&&!0===t.enabled&&"dynamic"===t.type||this.edgeType instanceof fD&&!0===t.enabled&&"cubicBezier"===t.type||this.edgeType instanceof hD&&!0===t.enabled&&"dynamic"!==t.type&&"cubicBezier"!==t.type||this.edgeType instanceof pD&&!1===t.type.enabled)&&(n=!1),!0===n&&(e=this.cleanup())),!0===n?!0===t.enabled?"dynamic"===t.type?(e=!0,this.edgeType=new lD(this.options,this.body,this.labelModule)):"cubicBezier"===t.type?this.edgeType=new fD(this.options,this.body,this.labelModule):this.edgeType=new hD(this.options,this.body,this.labelModule):this.edgeType=new pD(this.options,this.body,this.labelModule):this.edgeType.setOptions(this.options),e}},{key:"connect",value:function(){this.disconnect(),this.from=this.body.nodes[this.fromId]||void 0,this.to=this.body.nodes[this.toId]||void 0,this.connected=void 0!==this.from&&void 0!==this.to,!0===this.connected?(this.from.attachEdge(this),this.to.attachEdge(this)):(this.from&&this.from.detachEdge(this),this.to&&this.to.detachEdge(this)),this.edgeType.connect()}},{key:"disconnect",value:function(){this.from&&(this.from.detachEdge(this),this.from=void 0),this.to&&(this.to.detachEdge(this),this.to=void 0),this.connected=!1}},{key:"getTitle",value:function(){return this.title}},{key:"isSelected",value:function(){return this.selected}},{key:"getValue",value:function(){return this.options.value}},{key:"setValueRange",value:function(t,e,n){if(void 0!==this.options.value){var r=this.options.scaling.customScalingFunction(t,e,n,this.options.value),i=this.options.scaling.max-this.options.scaling.min;if(!0===this.options.scaling.label.enabled){var o=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+r*o}this.options.width=this.options.scaling.min+r*i}else this.options.width=this.baseWidth,this.options.font.size=this.baseFontSize;this._setInteractionWidths(),this.updateLabelModule()}},{key:"_setInteractionWidths",value:function(){"function"==typeof this.options.hoverWidth?this.edgeType.hoverWidth=this.options.hoverWidth(this.options.width):this.edgeType.hoverWidth=this.options.hoverWidth+this.options.width,"function"==typeof this.options.selectionWidth?this.edgeType.selectionWidth=this.options.selectionWidth(this.options.width):this.edgeType.selectionWidth=this.options.selectionWidth+this.options.width}},{key:"draw",value:function(t){var e=this.getFormattingValues();if(!e.hidden){var n=this.edgeType.getViaNode();this.edgeType.drawLine(t,e,this.selected,this.hover,n),this.drawLabel(t,n)}}},{key:"drawArrows",value:function(t){var e=this.getFormattingValues();if(!e.hidden){var n=this.edgeType.getViaNode(),r={};this.edgeType.fromPoint=this.edgeType.from,this.edgeType.toPoint=this.edgeType.to,e.fromArrow&&(r.from=this.edgeType.getArrowData(t,"from",n,this.selected,this.hover,e),!1===e.arrowStrikethrough&&(this.edgeType.fromPoint=r.from.core),e.fromArrowSrc&&(r.from.image=this.imagelist.load(e.fromArrowSrc)),e.fromArrowImageWidth&&(r.from.imageWidth=e.fromArrowImageWidth),e.fromArrowImageHeight&&(r.from.imageHeight=e.fromArrowImageHeight)),e.toArrow&&(r.to=this.edgeType.getArrowData(t,"to",n,this.selected,this.hover,e),!1===e.arrowStrikethrough&&(this.edgeType.toPoint=r.to.core),e.toArrowSrc&&(r.to.image=this.imagelist.load(e.toArrowSrc)),e.toArrowImageWidth&&(r.to.imageWidth=e.toArrowImageWidth),e.toArrowImageHeight&&(r.to.imageHeight=e.toArrowImageHeight)),e.middleArrow&&(r.middle=this.edgeType.getArrowData(t,"middle",n,this.selected,this.hover,e),e.middleArrowSrc&&(r.middle.image=this.imagelist.load(e.middleArrowSrc)),e.middleArrowImageWidth&&(r.middle.imageWidth=e.middleArrowImageWidth),e.middleArrowImageHeight&&(r.middle.imageHeight=e.middleArrowImageHeight)),e.fromArrow&&this.edgeType.drawArrowHead(t,e,this.selected,this.hover,r.from),e.middleArrow&&this.edgeType.drawArrowHead(t,e,this.selected,this.hover,r.middle),e.toArrow&&this.edgeType.drawArrowHead(t,e,this.selected,this.hover,r.to)}}},{key:"drawLabel",value:function(t,e){if(void 0!==this.options.label){var n,r=this.from,i=this.to;if(this.labelModule.differentState(this.selected,this.hover)&&this.labelModule.getTextSize(t,this.selected,this.hover),r.id!=i.id){this.labelModule.pointToSelf=!1,n=this.edgeType.getPoint(.5,e),t.save();var o=this._getRotation(t);0!=o.angle&&(t.translate(o.x,o.y),t.rotate(o.angle)),this.labelModule.draw(t,n.x,n.y,this.selected,this.hover),t.restore()}else{this.labelModule.pointToSelf=!0;var g=UN(t,this.options.selfReference.angle,this.options.selfReference.size,r);n=this._pointOnCircle(g.x,g.y,this.options.selfReference.size,this.options.selfReference.angle),this.labelModule.draw(t,n.x,n.y,this.selected,this.hover)}}}},{key:"getItemsOnPoint",value:function(t){var e=[];if(this.labelModule.visible()){var n=this._getRotation();zN(this.labelModule.getSize(),t,n)&&e.push({edgeId:this.id,labelId:0})}var r={left:t.x,top:t.y};return this.isOverlappingWith(r)&&e.push({edgeId:this.id}),e}},{key:"isOverlappingWith",value:function(t){if(this.connected){var e=this.from.x,n=this.from.y,r=this.to.x,i=this.to.y,o=t.left,g=t.top;return this.edgeType.getDistanceToEdge(e,n,r,i,o,g)<10}return!1}},{key:"_getRotation",value:function(t){var e=this.edgeType.getViaNode(),n=this.edgeType.getPoint(.5,e);void 0!==t&&this.labelModule.calculateLabelSize(t,this.selected,this.hover,n.x,n.y);var r={x:n.x,y:this.labelModule.size.yLine,angle:0};if(!this.labelModule.visible())return r;if("horizontal"===this.options.font.align)return r;var i=this.from.y-this.to.y,o=this.from.x-this.to.x,g=Math.atan2(i,o);return(g<-1&&o<0||g>0&&o<0)&&(g+=Math.PI),r.angle=g,r}},{key:"_pointOnCircle",value:function(t,e,n,r){return{x:t+n*Math.cos(r),y:e-n*Math.sin(r)}}},{key:"select",value:function(){this.selected=!0}},{key:"unselect",value:function(){this.selected=!1}},{key:"cleanup",value:function(){return this.edgeType.cleanup()}},{key:"remove",value:function(){this.cleanup(),this.disconnect(),delete this.body.edges[this.id]}},{key:"endPointsValid",value:function(){return void 0!==this.body.nodes[this.fromId]&&void 0!==this.body.nodes[this.toId]}}],[{key:"parseOptions",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(Sb(["endPointOffset","arrowStrikethrough","id","from","hidden","hoverWidth","labelHighlightBold","length","line","opacity","physics","scaling","selectionWidth","selfReferenceSize","selfReference","to","title","value","width","font","chosen","widthConstraint"],t,e,n),void 0!==e.endPointOffset&&void 0!==e.endPointOffset.from&&(E_(e.endPointOffset.from)?t.endPointOffset.from=e.endPointOffset.from:(t.endPointOffset.from=void 0!==r.endPointOffset.from?r.endPointOffset.from:0,console.error("endPointOffset.from is not a valid number"))),void 0!==e.endPointOffset&&void 0!==e.endPointOffset.to&&(E_(e.endPointOffset.to)?t.endPointOffset.to=e.endPointOffset.to:(t.endPointOffset.to=void 0!==r.endPointOffset.to?r.endPointOffset.to:0,console.error("endPointOffset.to is not a valid number"))),ZN(e.label)?t.label=e.label:ZN(t.label)||(t.label=void 0),Yb(t,e,"smooth",r),Yb(t,e,"shadow",r),Yb(t,e,"background",r),void 0!==e.dashes&&null!==e.dashes?t.dashes=e.dashes:!0===n&&null===e.dashes&&(t.dashes=Sp(r.dashes)),void 0!==e.scaling&&null!==e.scaling?(void 0!==e.scaling.min&&(t.scaling.min=e.scaling.min),void 0!==e.scaling.max&&(t.scaling.max=e.scaling.max),Yb(t.scaling,e.scaling,"label",r.scaling)):!0===n&&null===e.scaling&&(t.scaling=Sp(r.scaling)),void 0!==e.arrows&&null!==e.arrows)if("string"==typeof e.arrows){var o=e.arrows.toLowerCase();t.arrows.to.enabled=-1!=hp(o).call(o,"to"),t.arrows.middle.enabled=-1!=hp(o).call(o,"middle"),t.arrows.from.enabled=-1!=hp(o).call(o,"from")}else{if("object"!==Qc(e.arrows))throw new Error("The arrow newOptions can only be an object or a string. Refer to the documentation. You used:"+jp(e.arrows));Yb(t.arrows,e.arrows,"to",r.arrows),Yb(t.arrows,e.arrows,"middle",r.arrows),Yb(t.arrows,e.arrows,"from",r.arrows)}else!0===n&&null===e.arrows&&(t.arrows=Sp(r.arrows));if(void 0!==e.color&&null!==e.color){var g=Eb(e.color)?{color:e.color,highlight:e.color,hover:e.color,inherit:!1,opacity:1}:e.color,s=t.color;if(i)Nb(s,r.color,!1,n);else for(var A in s)Object.prototype.hasOwnProperty.call(s,A)&&delete s[A];if(Eb(s))s.color=s,s.highlight=s,s.hover=s,s.inherit=!1,void 0===g.opacity&&(s.opacity=1);else{var C=!1;void 0!==g.color&&(s.color=g.color,C=!0),void 0!==g.highlight&&(s.highlight=g.highlight,C=!0),void 0!==g.hover&&(s.hover=g.hover,C=!0),void 0!==g.inherit&&(s.inherit=g.inherit),void 0!==g.opacity&&(s.opacity=Math.min(1,Math.max(0,g.opacity))),!0===C?s.inherit=!1:void 0===s.inherit&&(s.inherit="from")}}else!0===n&&null===e.color&&(t.color=Wb(r.color));!0===n&&null===e.font&&(t.font=Wb(r.font)),Object.prototype.hasOwnProperty.call(e,"selfReferenceSize")&&(console.warn("The selfReferenceSize property has been deprecated. Please use selfReference property instead. The selfReference can be set like thise selfReference:{size:30, angle:Math.PI / 4}"),t.selfReference.size=e.selfReferenceSize)}}]),t}(),yD=function(){function t(e,n,r){var i,o=this;Fu(this,t),this.body=e,this.images=n,this.groups=r,this.body.functions.createEdge=wi(i=this.create).call(i,this),this.edgesListeners={add:function(t,e){o.add(e.items)},update:function(t,e){o.update(e.items)},remove:function(t,e){o.remove(e.items)}},this.options={},this.defaultOptions={arrows:{to:{enabled:!1,scaleFactor:1,type:"arrow"},middle:{enabled:!1,scaleFactor:1,type:"arrow"},from:{enabled:!1,scaleFactor:1,type:"arrow"}},endPointOffset:{from:0,to:0},arrowStrikethrough:!0,color:{color:"#848484",highlight:"#848484",hover:"#848484",inherit:"from",opacity:1},dashes:!1,font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:2,strokeColor:"#ffffff",align:"horizontal",multi:!1,vadjust:0,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"courier new",vadjust:2}},hidden:!1,hoverWidth:1.5,label:void 0,labelHighlightBold:!0,length:void 0,physics:!0,scaling:{min:1,max:15,label:{enabled:!0,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(t,e,n,r){if(e===t)return.5;var i=1/(e-t);return Math.max(0,(r-t)*i)}},selectionWidth:1.5,selfReference:{size:20,angle:Math.PI/4,renderBehindTheNode:!0},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},background:{enabled:!1,color:"rgba(111,111,111,1)",size:10,dashes:!1},smooth:{enabled:!0,type:"dynamic",forceDirection:"none",roundness:.5},title:void 0,width:1,value:void 0},Nb(this.options,this.defaultOptions),this.bindEventListeners()}return il(t,[{key:"bindEventListeners",value:function(){var t,e,n=this;this.body.emitter.on("_forceDisableDynamicCurves",(function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];"dynamic"===t&&(t="continuous");var r=!1;for(var i in n.body.edges)if(Object.prototype.hasOwnProperty.call(n.body.edges,i)){var o=n.body.edges[i],g=n.body.data.edges.get(i);if(null!=g){var s=g.smooth;void 0!==s&&!0===s.enabled&&"dynamic"===s.type&&(void 0===t?o.setOptions({smooth:!1}):o.setOptions({smooth:{type:t}}),r=!0)}}!0===e&&!0===r&&n.body.emitter.emit("_dataChanged")})),this.body.emitter.on("_dataUpdated",(function(){n.reconnectEdges()})),this.body.emitter.on("refreshEdges",wi(t=this.refresh).call(t,this)),this.body.emitter.on("refresh",wi(e=this.refresh).call(e,this)),this.body.emitter.on("destroy",(function(){Mb(n.edgesListeners,(function(t,e){n.body.data.edges&&n.body.data.edges.off(e,t)})),delete n.body.functions.createEdge,delete n.edgesListeners.add,delete n.edgesListeners.update,delete n.edgesListeners.remove,delete n.edgesListeners}))}},{key:"setOptions",value:function(t){if(void 0!==t){vD.parseOptions(this.options,t,!0,this.defaultOptions,!0);var e=!1;if(void 0!==t.smooth)for(var n in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,n)&&(e=this.body.edges[n].updateEdgeType()||e);if(void 0!==t.font)for(var r in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,r)&&this.body.edges[r].updateLabelModule();void 0===t.hidden&&void 0===t.physics&&!0!==e||this.body.emitter.emit("_dataChanged")}}},{key:"setData",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.body.data.edges;if(dN("id",t))this.body.data.edges=t;else if(Ih(t))this.body.data.edges=new hN,this.body.data.edges.add(t);else{if(t)throw new TypeError("Array or DataSet expected");this.body.data.edges=new hN}if(r&&Mb(this.edgesListeners,(function(t,e){r.off(e,t)})),this.body.edges={},this.body.data.edges){Mb(this.edgesListeners,(function(t,n){e.body.data.edges.on(n,t)}));var i=this.body.data.edges.getIds();this.add(i,!0)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),!1===n&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.body.edges,r=this.body.data.edges,i=0;i1&&void 0!==arguments[1])||arguments[1];if(0!==t.length){var n=this.body.edges;Mb(t,(function(t){var e=n[t];void 0!==e&&e.remove()})),e&&this.body.emitter.emit("_dataChanged")}}},{key:"refresh",value:function(){var t=this;Mb(this.body.edges,(function(e,n){var r=t.body.data.edges.get(n);void 0!==r&&e.setOptions(r)}))}},{key:"create",value:function(t){return new vD(t,this.body,this.images,this.options,this.defaultOptions)}},{key:"reconnectEdges",value:function(){var t,e=this.body.nodes,n=this.body.edges;for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(e[t].edges=[]);for(t in n)if(Object.prototype.hasOwnProperty.call(n,t)){var r=n[t];r.from=null,r.to=null,r.connect()}}},{key:"getConnectedNodes",value:function(t){var e=[];if(void 0!==this.body.edges[t]){var n=this.body.edges[t];void 0!==n.fromId&&e.push(n.fromId),void 0!==n.toId&&e.push(n.toId)}return e}},{key:"_updateState",value:function(){this._addMissingEdges(),this._removeInvalidEdges()}},{key:"_removeInvalidEdges",value:function(){var t=this,e=[];Mb(this.body.edges,(function(n,r){var i=t.body.nodes[n.toId],o=t.body.nodes[n.fromId];void 0!==i&&!0===i.isCluster||void 0!==o&&!0===o.isCluster||void 0!==i&&void 0!==o||e.push(r)})),this.remove(e,!1)}},{key:"_addMissingEdges",value:function(){var t=this.body.data.edges;if(null!=t){var e=this.body.edges,n=[];Hh(t).call(t,(function(t,r){void 0===e[r]&&n.push(r)})),this.add(n,!0)}}}]),t}(),bD=function(){function t(e,n,r){Fu(this,t),this.body=e,this.physicsBody=n,this.barnesHutTree,this.setOptions(r),this._rng=pb("BARNES HUT SOLVER")}return il(t,[{key:"setOptions",value:function(t){this.options=t,this.thetaInversed=1/this.options.theta,this.overlapAvoidanceFactor=1-Math.max(0,Math.min(1,this.options.avoidOverlap))}},{key:"solve",value:function(){if(0!==this.options.gravitationalConstant&&this.physicsBody.physicsNodeIndices.length>0){var t,e=this.body.nodes,n=this.physicsBody.physicsNodeIndices,r=n.length,i=this._formBarnesHutTree(e,n);this.barnesHutTree=i;for(var o=0;o0&&this._getForceContributions(i.root,t)}}},{key:"_getForceContributions",value:function(t,e){this._getForceContribution(t.children.NW,e),this._getForceContribution(t.children.NE,e),this._getForceContribution(t.children.SW,e),this._getForceContribution(t.children.SE,e)}},{key:"_getForceContribution",value:function(t,e){if(t.childrenCount>0){var n=t.centerOfMass.x-e.x,r=t.centerOfMass.y-e.y,i=Math.sqrt(n*n+r*r);i*t.calcSize>this.thetaInversed?this._calculateForces(i,n,r,e,t):4===t.childrenCount?this._getForceContributions(t,e):t.children.data.id!=e.id&&this._calculateForces(i,n,r,e,t)}}},{key:"_calculateForces",value:function(t,e,n,r,i){0===t&&(e=t=.1),this.overlapAvoidanceFactor<1&&r.shape.radius&&(t=Math.max(.1+this.overlapAvoidanceFactor*r.shape.radius,t-r.shape.radius));var o=this.options.gravitationalConstant*i.mass*r.options.mass/Math.pow(t,3),g=e*o,s=n*o;this.physicsBody.forces[r.id].x+=g,this.physicsBody.forces[r.id].y+=s}},{key:"_formBarnesHutTree",value:function(t,e){for(var n,r=e.length,i=t[e[0]].x,o=t[e[0]].y,g=t[e[0]].x,s=t[e[0]].y,A=1;A0&&(Ig&&(g=I),as&&(s=a))}var u=Math.abs(g-i)-Math.abs(s-o);u>0?(o-=.5*u,s+=.5*u):(i+=.5*u,g-=.5*u);var c=Math.max(1e-5,Math.abs(g-i)),l=.5*c,h=.5*(i+g),d=.5*(o+s),f={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:h-l,maxX:h+l,minY:d-l,maxY:d+l},size:c,calcSize:1/c,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(f.root);for(var p=0;p0&&this._placeInTree(f.root,n);return f}},{key:"_updateBranchMass",value:function(t,e){var n=t.centerOfMass,r=t.mass+e.options.mass,i=1/r;n.x=n.x*t.mass+e.x*e.options.mass,n.x*=i,n.y=n.y*t.mass+e.y*e.options.mass,n.y*=i,t.mass=r;var o=Math.max(Math.max(e.height,e.radius),e.width);t.maxWidth=t.maxWidthe.x?i.maxY>e.y?"NW":"SW":i.maxY>e.y?"NE":"SE",this._placeInRegion(t,e,r)}},{key:"_placeInRegion",value:function(t,e,n){var r=t.children[n];switch(r.childrenCount){case 0:r.children.data=e,r.childrenCount=1,this._updateBranchMass(r,e);break;case 1:r.children.data.x===e.x&&r.children.data.y===e.y?(e.x+=this._rng(),e.y+=this._rng()):(this._splitBranch(r),this._placeInTree(r,e));break;case 4:this._placeInTree(r,e)}}},{key:"_splitBranch",value:function(t){var e=null;1===t.childrenCount&&(e=t.children.data,t.mass=0,t.centerOfMass.x=0,t.centerOfMass.y=0),t.childrenCount=4,t.children.data=null,this._insertRegion(t,"NW"),this._insertRegion(t,"NE"),this._insertRegion(t,"SW"),this._insertRegion(t,"SE"),null!=e&&this._placeInTree(t,e)}},{key:"_insertRegion",value:function(t,e){var n,r,i,o,g=.5*t.size;switch(e){case"NW":n=t.range.minX,r=t.range.minX+g,i=t.range.minY,o=t.range.minY+g;break;case"NE":n=t.range.minX+g,r=t.range.maxX,i=t.range.minY,o=t.range.minY+g;break;case"SW":n=t.range.minX,r=t.range.minX+g,i=t.range.minY+g,o=t.range.maxY;break;case"SE":n=t.range.minX+g,r=t.range.maxX,i=t.range.minY+g,o=t.range.maxY}t.children[e]={centerOfMass:{x:0,y:0},mass:0,range:{minX:n,maxX:r,minY:i,maxY:o},size:.5*t.size,calcSize:2*t.calcSize,children:{data:null},maxWidth:0,level:t.level+1,childrenCount:0}}},{key:"_debug",value:function(t,e){void 0!==this.barnesHutTree&&(t.lineWidth=1,this._drawBranch(this.barnesHutTree.root,t,e))}},{key:"_drawBranch",value:function(t,e,n){void 0===n&&(n="#FF0000"),4===t.childrenCount&&(this._drawBranch(t.children.NW,e),this._drawBranch(t.children.NE,e),this._drawBranch(t.children.SE,e),this._drawBranch(t.children.SW,e)),e.strokeStyle=n,e.beginPath(),e.moveTo(t.range.minX,t.range.minY),e.lineTo(t.range.maxX,t.range.minY),e.stroke(),e.beginPath(),e.moveTo(t.range.maxX,t.range.minY),e.lineTo(t.range.maxX,t.range.maxY),e.stroke(),e.beginPath(),e.moveTo(t.range.maxX,t.range.maxY),e.lineTo(t.range.minX,t.range.maxY),e.stroke(),e.beginPath(),e.moveTo(t.range.minX,t.range.maxY),e.lineTo(t.range.minX,t.range.minY),e.stroke()}}]),t}(),mD=function(){function t(e,n,r){Fu(this,t),this._rng=pb("REPULSION SOLVER"),this.body=e,this.physicsBody=n,this.setOptions(r)}return il(t,[{key:"setOptions",value:function(t){this.options=t}},{key:"solve",value:function(){for(var t,e,n,r,i,o,g,s,A=this.body.nodes,C=this.physicsBody.physicsNodeIndices,I=this.physicsBody.forces,a=this.options.nodeDistance,u=-2/3/a,c=0;c0){var o=i.edges.length+1,g=this.options.centralGravity*o*i.options.mass;r[i.id].x=e*g,r[i.id].y=n*g}}}]),i}(ED),TD=function(){function t(e){Fu(this,t),this.body=e,this.physicsBody={physicsNodeIndices:[],physicsEdgeIndices:[],forces:{},velocities:{}},this.physicsEnabled=!0,this.simulationInterval=1e3/60,this.requiresTimeout=!0,this.previousStates={},this.referenceState={},this.freezeCache={},this.renderTimer=void 0,this.adaptiveTimestep=!1,this.adaptiveTimestepEnabled=!1,this.adaptiveCounter=0,this.adaptiveInterval=3,this.stabilized=!1,this.startedStabilization=!1,this.stabilizationIterations=0,this.ready=!1,this.options={},this.defaultOptions={enabled:!0,barnesHut:{theta:.5,gravitationalConstant:-2e3,centralGravity:.3,springLength:95,springConstant:.04,damping:.09,avoidOverlap:0},forceAtlas2Based:{theta:.5,gravitationalConstant:-50,centralGravity:.01,springConstant:.08,springLength:100,damping:.4,avoidOverlap:0},repulsion:{centralGravity:.2,springLength:200,springConstant:.05,nodeDistance:100,damping:.09,avoidOverlap:0},hierarchicalRepulsion:{centralGravity:0,springLength:100,springConstant:.01,nodeDistance:120,damping:.09},maxVelocity:50,minVelocity:.75,solver:"barnesHut",stabilization:{enabled:!0,iterations:1e3,updateInterval:50,onlyDynamicEdges:!1,fit:!0},timestep:.5,adaptiveTimestep:!0,wind:{x:0,y:0}},ti(this.options,this.defaultOptions),this.timestep=.5,this.layoutFailed=!1,this.bindEventListeners()}return il(t,[{key:"bindEventListeners",value:function(){var t=this;this.body.emitter.on("initPhysics",(function(){t.initPhysics()})),this.body.emitter.on("_layoutFailed",(function(){t.layoutFailed=!0})),this.body.emitter.on("resetPhysics",(function(){t.stopSimulation(),t.ready=!1})),this.body.emitter.on("disablePhysics",(function(){t.physicsEnabled=!1,t.stopSimulation()})),this.body.emitter.on("restorePhysics",(function(){t.setOptions(t.options),!0===t.ready&&t.startSimulation()})),this.body.emitter.on("startSimulation",(function(){!0===t.ready&&t.startSimulation()})),this.body.emitter.on("stopSimulation",(function(){t.stopSimulation()})),this.body.emitter.on("destroy",(function(){t.stopSimulation(!1),t.body.emitter.off()})),this.body.emitter.on("_dataChanged",(function(){t.updatePhysicsData()}))}},{key:"setOptions",value:function(t){if(void 0!==t)if(!1===t)this.options.enabled=!1,this.physicsEnabled=!1,this.stopSimulation();else if(!0===t)this.options.enabled=!0,this.physicsEnabled=!0,this.startSimulation();else{this.physicsEnabled=!0,Pb(["stabilization"],this.options,t),Yb(this.options,t,"stabilization"),void 0===t.enabled&&(this.options.enabled=!0),!1===this.options.enabled&&(this.physicsEnabled=!1,this.stopSimulation());var e=this.options.wind;e&&(("number"!=typeof e.x||b_(e.x))&&(e.x=0),("number"!=typeof e.y||b_(e.y))&&(e.y=0)),this.timestep=this.options.timestep}this.init()}},{key:"init",value:function(){var t;"forceAtlas2Based"===this.options.solver?(t=this.options.forceAtlas2Based,this.nodesSolver=new OD(this.body,this.physicsBody,t),this.edgesSolver=new _D(this.body,this.physicsBody,t),this.gravitySolver=new kD(this.body,this.physicsBody,t)):"repulsion"===this.options.solver?(t=this.options.repulsion,this.nodesSolver=new mD(this.body,this.physicsBody,t),this.edgesSolver=new _D(this.body,this.physicsBody,t),this.gravitySolver=new ED(this.body,this.physicsBody,t)):"hierarchicalRepulsion"===this.options.solver?(t=this.options.hierarchicalRepulsion,this.nodesSolver=new wD(this.body,this.physicsBody,t),this.edgesSolver=new xD(this.body,this.physicsBody,t),this.gravitySolver=new ED(this.body,this.physicsBody,t)):(t=this.options.barnesHut,this.nodesSolver=new bD(this.body,this.physicsBody,t),this.edgesSolver=new _D(this.body,this.physicsBody,t),this.gravitySolver=new ED(this.body,this.physicsBody,t)),this.modelOptions=t}},{key:"initPhysics",value:function(){!0===this.physicsEnabled&&!0===this.options.enabled?!0===this.options.stabilization.enabled?this.stabilize():(this.stabilized=!1,this.ready=!0,this.body.emitter.emit("fit",{},this.layoutFailed),this.startSimulation()):(this.ready=!0,this.body.emitter.emit("fit"))}},{key:"startSimulation",value:function(){var t;!0===this.physicsEnabled&&!0===this.options.enabled?(this.stabilized=!1,this.adaptiveTimestep=!1,this.body.emitter.emit("_resizeNodes"),void 0===this.viewFunction&&(this.viewFunction=wi(t=this.simulationStep).call(t,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering"))):this.body.emitter.emit("_redraw")}},{key:"stopSimulation",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.stabilized=!0,!0===t&&this._emitStabilized(),void 0!==this.viewFunction&&(this.body.emitter.off("initRedraw",this.viewFunction),this.viewFunction=void 0,!0===t&&this.body.emitter.emit("_stopRendering"))}},{key:"simulationStep",value:function(){var t=Nh();this.physicsTick(),(Nh()-t<.4*this.simulationInterval||!0===this.runDoubleSpeed)&&!1===this.stabilized&&(this.physicsTick(),this.runDoubleSpeed=!0),!0===this.stabilized&&this.stopSimulation()}},{key:"_emitStabilized",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.stabilizationIterations;(this.stabilizationIterations>1||!0===this.startedStabilization)&&ov((function(){t.body.emitter.emit("stabilized",{iterations:e}),t.startedStabilization=!1,t.stabilizationIterations=0}),0)}},{key:"physicsStep",value:function(){this.gravitySolver.solve(),this.nodesSolver.solve(),this.edgesSolver.solve(),this.moveNodes()}},{key:"adjustTimeStep",value:function(){!0===this._evaluateStepQuality()?this.timestep=1.2*this.timestep:this.timestep/1.2.3))return!1;return!0}},{key:"moveNodes",value:function(){for(var t=this.physicsBody.physicsNodeIndices,e=0,n=0,r=0;rr&&(t=t>0?r:-r),t}},{key:"_performStep",value:function(t){var e=this.body.nodes[t],n=this.physicsBody.forces[t];this.options.wind&&(n.x+=this.options.wind.x,n.y+=this.options.wind.y);var r=this.physicsBody.velocities[t];return this.previousStates[t]={x:e.x,y:e.y,vx:r.x,vy:r.y},!1===e.options.fixed.x?(r.x=this.calculateComponentVelocity(r.x,n.x,e.options.mass),e.x+=r.x*this.timestep):(n.x=0,r.x=0),!1===e.options.fixed.y?(r.y=this.calculateComponentVelocity(r.y,n.y,e.options.mass),e.y+=r.y*this.timestep):(n.y=0,r.y=0),Math.sqrt(Math.pow(r.x,2)+Math.pow(r.y,2))}},{key:"_freezeNodes",value:function(){var t=this.body.nodes;for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&t[e].x&&t[e].y){var n=t[e].options.fixed;this.freezeCache[e]={x:n.x,y:n.y},n.x=!0,n.y=!0}}},{key:"_restoreFrozenNodes",value:function(){var t=this.body.nodes;for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&void 0!==this.freezeCache[e]&&(t[e].options.fixed.x=this.freezeCache[e].x,t[e].options.fixed.y=this.freezeCache[e].y);this.freezeCache={}}},{key:"stabilize",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.stabilization.iterations;"number"!=typeof e&&(e=this.options.stabilization.iterations,console.error("The stabilize method needs a numeric amount of iterations. Switching to default: ",e)),0!==this.physicsBody.physicsNodeIndices.length?(this.adaptiveTimestep=this.options.adaptiveTimestep,this.body.emitter.emit("_resizeNodes"),this.stopSimulation(),this.stabilized=!1,this.body.emitter.emit("_blockRedraw"),this.targetIterations=e,!0===this.options.stabilization.onlyDynamicEdges&&this._freezeNodes(),this.stabilizationIterations=0,ov((function(){return t._stabilizationBatch()}),0)):this.ready=!0}},{key:"_startStabilizing",value:function(){return!0!==this.startedStabilization&&(this.body.emitter.emit("startStabilizing"),this.startedStabilization=!0,!0)}},{key:"_stabilizationBatch",value:function(){var t=this,e=function(){return!1===t.stabilized&&t.stabilizationIterations1&&void 0!==arguments[1]?arguments[1]:[],r=1e9,i=-1e9,o=1e9,g=-1e9;if(n.length>0)for(var s=0;s(e=t[n[s]]).shape.boundingBox.left&&(o=e.shape.boundingBox.left),ge.shape.boundingBox.top&&(r=e.shape.boundingBox.top),i1&&void 0!==arguments[1]?arguments[1]:[],r=1e9,i=-1e9,o=1e9,g=-1e9;if(n.length>0)for(var s=0;s(e=t[n[s]]).x&&(o=e.x),ge.y&&(r=e.y),i=t&&n.push(i.id)}for(var o=0;o0&&void 0!==arguments[0]?arguments[0]:{},n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(void 0===e.joinCondition)throw new Error("Cannot call clusterByNodeData without a joinCondition function in the options.");e=this._checkOptions(e);var r={},i={};Mb(this.body.nodes,(function(n,o){n.options&&!0===e.joinCondition(n.options)&&(r[o]=n,Mb(n.edges,(function(e){void 0===t.clusteredEdges[e.id]&&(i[e.id]=e)})))})),this._cluster(r,i,e,n)}},{key:"clusterByEdgeCount",value:function(t,e){var n=this,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];e=this._checkOptions(e);for(var i,o,g,s=[],A={},C=function(){var r={},C={},a=n.body.nodeIndices[I],u=n.body.nodes[a];if(void 0===A[a]){g=0,o=[];for(var c=0;c0&&xh(C).length>0&&!0===h){var p=function(){for(var t=0;t1&&void 0!==arguments[1])||arguments[1];this.clusterByEdgeCount(1,t,e)}},{key:"clusterBridges",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.clusterByEdgeCount(2,t,e)}},{key:"clusterByConnection",value:function(t,e){var n,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(void 0===t)throw new Error("No nodeId supplied to clusterByConnection!");if(void 0===this.body.nodes[t])throw new Error("The nodeId given to clusterByConnection does not exist!");var i=this.body.nodes[t];void 0===(e=this._checkOptions(e,i)).clusterNodeProperties.x&&(e.clusterNodeProperties.x=i.x),void 0===e.clusterNodeProperties.y&&(e.clusterNodeProperties.y=i.y),void 0===e.clusterNodeProperties.fixed&&(e.clusterNodeProperties.fixed={},e.clusterNodeProperties.fixed.x=i.options.fixed.x,e.clusterNodeProperties.fixed.y=i.options.fixed.y);var o={},g={},s=i.id,A=SD.cloneOptions(i);o[s]=i;for(var C=0;C-1&&(g[f.id]=f)}this._cluster(o,g,e,r)}},{key:"_createClusterEdges",value:function(t,e,n,r){for(var i,o,g,s,A,C,I=xh(t),a=[],u=0;u0&&void 0!==arguments[0]?arguments[0]:{};return void 0===t.clusterEdgeProperties&&(t.clusterEdgeProperties={}),void 0===t.clusterNodeProperties&&(t.clusterNodeProperties={}),t}},{key:"_cluster",value:function(t,e,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=[];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&void 0!==this.clusteredNodes[o]&&i.push(o);for(var g=0;gi?e.x:i,o=e.yg?e.y:g;return{x:.5*(r+i),y:.5*(o+g)}}},{key:"openCluster",value:function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(void 0===t)throw new Error("No clusterNodeId supplied to openCluster.");var r=this.body.nodes[t];if(void 0===r)throw new Error("The clusterNodeId supplied to openCluster does not exist.");if(!0!==r.isCluster||void 0===r.containedNodes||void 0===r.containedEdges)throw new Error("The node:"+t+" is not a valid cluster.");var i=this.findNode(t),o=hp(i).call(i,t)-1;if(o>=0){var g=i[o];return this.body.nodes[g]._openChildCluster(t),delete this.body.nodes[t],void(!0===n&&this.body.emitter.emit("_dataChanged"))}var s=r.containedNodes,A=r.containedEdges;if(void 0!==e&&void 0!==e.releaseFunction&&"function"==typeof e.releaseFunction){var C={},I={x:r.x,y:r.y};for(var a in s)if(Object.prototype.hasOwnProperty.call(s,a)){var u=this.body.nodes[a];C[a]={x:u.x,y:u.y}}var c=e.releaseFunction(I,C);for(var l in s)if(Object.prototype.hasOwnProperty.call(s,l)){var h=this.body.nodes[l];void 0!==c[l]&&(h.x=void 0===c[l].x?r.x:c[l].x,h.y=void 0===c[l].y?r.y:c[l].y)}}else Mb(s,(function(t){!1===t.options.fixed.x&&(t.x=r.x),!1===t.options.fixed.y&&(t.y=r.y)}));for(var d in s)if(Object.prototype.hasOwnProperty.call(s,d)){var f=this.body.nodes[d];f.vx=r.vx,f.vy=r.vy,f.setOptions({physics:!0}),delete this.clusteredNodes[d]}for(var p=[],v=0;v0&&i<100;){var o=e.pop();if(void 0!==o){var g=this.body.edges[o];if(void 0!==g){i++;var s=g.clusteringEdgeReplacingIds;if(void 0===s)r.push(o);else for(var A=0;Ar&&(r=o.edges.length),t+=o.edges.length,e+=Math.pow(o.edges.length,2),n+=1}t/=n;var g=(e/=n)-Math.pow(t,2),s=Math.sqrt(g),A=Math.floor(t+2*s);return A>r&&(A=r),A}},{key:"_createClusteredEdge",value:function(t,e,n,r,i){var o=SD.cloneOptions(n,"edge");Nb(o,r),o.from=t,o.to=e,o.id="clusterEdge:"+gN(),void 0!==i&&Nb(o,i);var g=this.body.functions.createEdge(o);return g.clusteringEdgeReplacingIds=[n.id],g.connect(),this.body.edges[g.id]=g,g}},{key:"_clusterEdges",value:function(t,e,n,r){if(e instanceof vD){var i=e,o={};o[i.id]=i,e=o}if(t instanceof pR){var g=t,s={};s[g.id]=g,t=s}if(null==n)throw new Error("_clusterEdges: parameter clusterNode required");for(var A in void 0===r&&(r=n.clusterEdgeProperties),this._createClusterEdges(t,e,n,r),e)if(Object.prototype.hasOwnProperty.call(e,A)&&void 0!==this.body.edges[A]){var C=this.body.edges[A];this._backupEdgeOptions(C),C.setOptions({physics:!1})}for(var I in t)Object.prototype.hasOwnProperty.call(t,I)&&(this.clusteredNodes[I]={clusterId:n.id,node:this.body.nodes[I]},this.body.nodes[I].setOptions({physics:!1}))}},{key:"_getClusterNodeForNode",value:function(t){if(void 0!==t){var e=this.clusteredNodes[t];if(void 0!==e){var n=e.clusterId;if(void 0!==n)return this.body.nodes[n]}}}},{key:"_filter",value:function(t,e){var n=[];return Mb(t,(function(t){e(t)&&n.push(t)})),n}},{key:"_updateState",value:function(){var t,e=this,n=[],r={},i=function(t){Mb(e.body.nodes,(function(e){!0===e.isCluster&&t(e)}))};for(t in this.clusteredNodes)Object.prototype.hasOwnProperty.call(this.clusteredNodes,t)&&void 0===this.body.nodes[t]&&n.push(t);i((function(t){for(var e=0;e0}t.endPointsValid()&&i||(r[n]=n)})),i((function(t){Mb(r,(function(n){delete t.containedEdges[n],Mb(t.edges,(function(i,o){i.id!==n?i.clusteringEdgeReplacingIds=e._filter(i.clusteringEdgeReplacingIds,(function(t){return!r[t]})):t.edges[o]=null})),t.edges=e._filter(t.edges,(function(t){return null!==t}))}))})),Mb(r,(function(t){delete e.clusteredEdges[t]})),Mb(r,(function(t){delete e.body.edges[t]})),Mb(xh(this.body.edges),(function(t){var n=e.body.edges[t],r=e._isClusteredNode(n.fromId)||e._isClusteredNode(n.toId);if(r!==e._isClusteredEdge(n.id))if(r){var i=e._getClusterNodeForNode(n.fromId);void 0!==i&&e._clusterEdges(e.body.nodes[n.fromId],n,i);var o=e._getClusterNodeForNode(n.toId);void 0!==o&&e._clusterEdges(e.body.nodes[n.toId],n,o)}else delete e._clusterEdges[t],e._restoreEdge(n)}));for(var g=!1,s=!0,A=function(){var t=[];i((function(e){var n=xh(e.containedNodes).length,r=!0===e.options.allowSingleNodeCluster;(r&&n<1||!r&&n<2)&&t.push(e.id)}));for(var n=0;n0,g=g||s};s;)A();g&&this._updateState()}},{key:"_isClusteredNode",value:function(t){return void 0!==this.clusteredNodes[t]}},{key:"_isClusteredEdge",value:function(t){return void 0!==this.clusteredEdges[t]}}]),t}(),RD=function(){function t(e,n){var r;Fu(this,t),void 0!==window&&(r=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame),window.requestAnimationFrame=void 0===r?function(t){t()}:r,this.body=e,this.canvas=n,this.redrawRequested=!1,this.renderTimer=void 0,this.requiresTimeout=!0,this.renderingActive=!1,this.renderRequests=0,this.allowRedraw=!0,this.dragging=!1,this.zooming=!1,this.options={},this.defaultOptions={hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1},ti(this.options,this.defaultOptions),this._determineBrowserMethod(),this.bindEventListeners()}return il(t,[{key:"bindEventListeners",value:function(){var t,e=this;this.body.emitter.on("dragStart",(function(){e.dragging=!0})),this.body.emitter.on("dragEnd",(function(){e.dragging=!1})),this.body.emitter.on("zoom",(function(){e.zooming=!0,window.clearTimeout(e.zoomTimeoutId),e.zoomTimeoutId=ov((function(){var t;e.zooming=!1,wi(t=e._requestRedraw).call(t,e)()}),250)})),this.body.emitter.on("_resizeNodes",(function(){e._resizeNodes()})),this.body.emitter.on("_redraw",(function(){!1===e.renderingActive&&e._redraw()})),this.body.emitter.on("_blockRedraw",(function(){e.allowRedraw=!1})),this.body.emitter.on("_allowRedraw",(function(){e.allowRedraw=!0,e.redrawRequested=!1})),this.body.emitter.on("_requestRedraw",wi(t=this._requestRedraw).call(t,this)),this.body.emitter.on("_startRendering",(function(){e.renderRequests+=1,e.renderingActive=!0,e._startRendering()})),this.body.emitter.on("_stopRendering",(function(){e.renderRequests-=1,e.renderingActive=e.renderRequests>0,e.renderTimer=void 0})),this.body.emitter.on("destroy",(function(){e.renderRequests=0,e.allowRedraw=!1,e.renderingActive=!1,!0===e.requiresTimeout?clearTimeout(e.renderTimer):window.cancelAnimationFrame(e.renderTimer),e.body.emitter.off()}))}},{key:"setOptions",value:function(t){void 0!==t&&Sb(["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag"],this.options,t)}},{key:"_requestNextFrame",value:function(t,e){if("undefined"!=typeof window){var n,r=window;return!0===this.requiresTimeout?n=ov(t,e):r.requestAnimationFrame&&(n=r.requestAnimationFrame(t)),n}}},{key:"_startRendering",value:function(){var t;!0===this.renderingActive&&void 0===this.renderTimer&&(this.renderTimer=this._requestNextFrame(wi(t=this._renderStep).call(t,this),this.simulationInterval))}},{key:"_renderStep",value:function(){!0===this.renderingActive&&(this.renderTimer=void 0,!0===this.requiresTimeout&&this._startRendering(),this._redraw(),!1===this.requiresTimeout&&this._startRendering())}},{key:"redraw",value:function(){this.body.emitter.emit("setSize"),this._redraw()}},{key:"_requestRedraw",value:function(){var t=this;!0!==this.redrawRequested&&!1===this.renderingActive&&!0===this.allowRedraw&&(this.redrawRequested=!0,this._requestNextFrame((function(){t._redraw(!1)}),0))}},{key:"_redraw",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!0===this.allowRedraw){this.body.emitter.emit("initRedraw"),this.redrawRequested=!1;var e={drawExternalLabels:null};0!==this.canvas.frame.canvas.width&&0!==this.canvas.frame.canvas.height||this.canvas.setSize(),this.canvas.setTransform();var n=this.canvas.getContext(),r=this.canvas.frame.canvas.clientWidth,i=this.canvas.frame.canvas.clientHeight;if(n.clearRect(0,0,r,i),0===this.canvas.frame.clientWidth)return;if(n.save(),n.translate(this.body.view.translation.x,this.body.view.translation.y),n.scale(this.body.view.scale,this.body.view.scale),n.beginPath(),this.body.emitter.emit("beforeDrawing",n),n.closePath(),!1===t&&(!1===this.dragging||!0===this.dragging&&!1===this.options.hideEdgesOnDrag)&&(!1===this.zooming||!0===this.zooming&&!1===this.options.hideEdgesOnZoom)&&this._drawEdges(n),!1===this.dragging||!0===this.dragging&&!1===this.options.hideNodesOnDrag){var o=this._drawNodes(n,t).drawExternalLabels;e.drawExternalLabels=o}!1===t&&(!1===this.dragging||!0===this.dragging&&!1===this.options.hideEdgesOnDrag)&&(!1===this.zooming||!0===this.zooming&&!1===this.options.hideEdgesOnZoom)&&this._drawArrows(n),null!=e.drawExternalLabels&&e.drawExternalLabels(),!1===t&&this._drawSelectionBox(n),n.beginPath(),this.body.emitter.emit("afterDrawing",n),n.closePath(),n.restore(),!0===t&&n.clearRect(0,0,r,i)}}},{key:"_resizeNodes",value:function(){this.canvas.setTransform();var t=this.canvas.getContext();t.save(),t.translate(this.body.view.translation.x,this.body.view.translation.y),t.scale(this.body.view.scale,this.body.view.scale);var e,n=this.body.nodes;for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&((e=n[r]).resize(t),e.updateBoundingBox(t,e.selected));t.restore()}},{key:"_drawNodes",value:function(t){for(var e,n,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.body.nodes,o=this.body.nodeIndices,g=[],s=[],A=this.canvas.DOMtoCanvas({x:-20,y:-20}),C=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+20,y:this.canvas.frame.canvas.clientHeight+20}),I={top:A.y,left:A.x,bottom:C.y,right:C.x},a=[],u=0;u0&&void 0!==arguments[0]?arguments[0]:this.pixelRatio;!0===this.initialized&&(this.cameraState.previousWidth=this.frame.canvas.width/t,this.cameraState.previousHeight=this.frame.canvas.height/t,this.cameraState.scale=this.body.view.scale,this.cameraState.position=this.DOMtoCanvas({x:.5*this.frame.canvas.width/t,y:.5*this.frame.canvas.height/t}))}},{key:"_setCameraState",value:function(){if(void 0!==this.cameraState.scale&&0!==this.frame.canvas.clientWidth&&0!==this.frame.canvas.clientHeight&&0!==this.pixelRatio&&this.cameraState.previousWidth>0&&this.cameraState.previousHeight>0){var t=this.frame.canvas.width/this.pixelRatio/this.cameraState.previousWidth,e=this.frame.canvas.height/this.pixelRatio/this.cameraState.previousHeight,n=this.cameraState.scale;1!=t&&1!=e?n=.5*this.cameraState.scale*(t+e):1!=t?n=this.cameraState.scale*t:1!=e&&(n=this.cameraState.scale*e),this.body.view.scale=n;var r=this.DOMtoCanvas({x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight}),i={x:r.x-this.cameraState.position.x,y:r.y-this.cameraState.position.y};this.body.view.translation.x+=i.x*this.body.view.scale,this.body.view.translation.y+=i.y*this.body.view.scale}}},{key:"_prepareValue",value:function(t){if("number"==typeof t)return t+"px";if("string"==typeof t){if(-1!==hp(t).call(t,"%")||-1!==hp(t).call(t,"px"))return t;if(-1===hp(t).call(t,"%"))return t+"px"}throw new Error("Could not use the value supplied for width or height:"+t)}},{key:"_create",value:function(){for(;this.body.container.hasChildNodes();)this.body.container.removeChild(this.body.container.firstChild);if(this.frame=document.createElement("div"),this.frame.className="vis-network",this.frame.style.position="relative",this.frame.style.overflow="hidden",this.frame.tabIndex=0,this.frame.canvas=document.createElement("canvas"),this.frame.canvas.style.position="relative",this.frame.appendChild(this.frame.canvas),this.frame.canvas.getContext)this._setPixelRatio(),this.setTransform();else{var t=document.createElement("DIV");t.style.color="red",t.style.fontWeight="bold",t.style.padding="10px",t.innerText="Error: your browser does not support HTML canvas",this.frame.canvas.appendChild(t)}this.body.container.appendChild(this.frame),this.body.view.scale=1,this.body.view.translation={x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight},this._bindHammer()}},{key:"_bindHammer",value:function(){var t=this;void 0!==this.hammer&&this.hammer.destroy(),this.drag={},this.pinch={},this.hammer=new gm(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:gm.DIRECTION_ALL}),BD(this.hammer,(function(e){t.body.eventListeners.onTouch(e)})),this.hammer.on("tap",(function(e){t.body.eventListeners.onTap(e)})),this.hammer.on("doubletap",(function(e){t.body.eventListeners.onDoubleTap(e)})),this.hammer.on("press",(function(e){t.body.eventListeners.onHold(e)})),this.hammer.on("panstart",(function(e){t.body.eventListeners.onDragStart(e)})),this.hammer.on("panmove",(function(e){t.body.eventListeners.onDrag(e)})),this.hammer.on("panend",(function(e){t.body.eventListeners.onDragEnd(e)})),this.hammer.on("pinch",(function(e){t.body.eventListeners.onPinch(e)})),this.frame.canvas.addEventListener("wheel",(function(e){t.body.eventListeners.onMouseWheel(e)})),this.frame.canvas.addEventListener("mousemove",(function(e){t.body.eventListeners.onMouseMove(e)})),this.frame.canvas.addEventListener("contextmenu",(function(e){t.body.eventListeners.onContext(e)})),this.hammerFrame=new gm(this.frame),LD(this.hammerFrame,(function(e){t.body.eventListeners.onRelease(e)}))}},{key:"setSize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.width,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.height;t=this._prepareValue(t),e=this._prepareValue(e);var n=!1,r=this.frame.canvas.width,i=this.frame.canvas.height,o=this.pixelRatio;if(this._setPixelRatio(),t!=this.options.width||e!=this.options.height||this.frame.style.width!=t||this.frame.style.height!=e)this._getCameraState(o),this.frame.style.width=t,this.frame.style.height=e,this.frame.canvas.style.width="100%",this.frame.canvas.style.height="100%",this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),this.options.width=t,this.options.height=e,this.canvasViewCenter={x:.5*this.frame.clientWidth,y:.5*this.frame.clientHeight},n=!0;else{var g=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),s=Math.round(this.frame.canvas.clientHeight*this.pixelRatio);this.frame.canvas.width===g&&this.frame.canvas.height===s||this._getCameraState(o),this.frame.canvas.width!==g&&(this.frame.canvas.width=g,n=!0),this.frame.canvas.height!==s&&(this.frame.canvas.height=s,n=!0)}return!0===n&&(this.body.emitter.emit("resize",{width:Math.round(this.frame.canvas.width/this.pixelRatio),height:Math.round(this.frame.canvas.height/this.pixelRatio),oldWidth:Math.round(r/this.pixelRatio),oldHeight:Math.round(i/this.pixelRatio)}),this._setCameraState()),this.initialized=!0,n}},{key:"getContext",value:function(){return this.frame.canvas.getContext("2d")}},{key:"_determinePixelRatio",value:function(){var t=this.getContext();if(void 0===t)throw new Error("Could not get canvax context");var e=1;return"undefined"!=typeof window&&(e=window.devicePixelRatio||1),e/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1)}},{key:"_setPixelRatio",value:function(){this.pixelRatio=this._determinePixelRatio()}},{key:"setTransform",value:function(){var t=this.getContext();if(void 0===t)throw new Error("Could not get canvax context");t.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}},{key:"_XconvertDOMtoCanvas",value:function(t){return(t-this.body.view.translation.x)/this.body.view.scale}},{key:"_XconvertCanvasToDOM",value:function(t){return t*this.body.view.scale+this.body.view.translation.x}},{key:"_YconvertDOMtoCanvas",value:function(t){return(t-this.body.view.translation.y)/this.body.view.scale}},{key:"_YconvertCanvasToDOM",value:function(t){return t*this.body.view.scale+this.body.view.translation.y}},{key:"canvasToDOM",value:function(t){return{x:this._XconvertCanvasToDOM(t.x),y:this._YconvertCanvasToDOM(t.y)}}},{key:"DOMtoCanvas",value:function(t){return{x:this._XconvertDOMtoCanvas(t.x),y:this._YconvertDOMtoCanvas(t.y)}}}]),t}(),zD=function(){function t(e,n){var r,i,o=this;Fu(this,t),this.body=e,this.canvas=n,this.animationSpeed=1/this.renderRefreshRate,this.animationEasingFunction="easeInOutQuint",this.easingTime=0,this.sourceScale=0,this.targetScale=0,this.sourceTranslation=0,this.targetTranslation=0,this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0,this.touchTime=0,this.viewFunction=void 0,this.body.emitter.on("fit",wi(r=this.fit).call(r,this)),this.body.emitter.on("animationFinished",(function(){o.body.emitter.emit("_stopRendering")})),this.body.emitter.on("unlockNode",wi(i=this.releaseNode).call(i,this))}return il(t,[{key:"setOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=t}},{key:"fit",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t=function(t,e){var n=ti({nodes:e,minZoomLevel:Number.MIN_VALUE,maxZoomLevel:1},null!=t?t:{});if(!Ih(n.nodes))throw new TypeError("Nodes has to be an array of ids.");if(0===n.nodes.length&&(n.nodes=e),!("number"==typeof n.minZoomLevel&&n.minZoomLevel>0))throw new TypeError("Min zoom level has to be a number higher than zero.");if(!("number"==typeof n.maxZoomLevel&&n.minZoomLevel<=n.maxZoomLevel))throw new TypeError("Max zoom level has to be a number higher than min zoom level.");return n}(t,this.body.nodeIndices);var n,r,i=this.canvas.frame.canvas.clientWidth,o=this.canvas.frame.canvas.clientHeight;if(0===i||0===o)r=1,n=SD.getRange(this.body.nodes,t.nodes);else if(!0===e){var g=0;for(var s in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,s)&&!0===this.body.nodes[s].predefinedPosition&&(g+=1);if(g>.5*this.body.nodeIndices.length)return void this.fit(t,!1);n=SD.getRange(this.body.nodes,t.nodes),r=12.662/(this.body.nodeIndices.length+7.4147)+.0964822,r*=Math.min(i/600,o/600)}else{this.body.emitter.emit("_resizeNodes"),n=SD.getRange(this.body.nodes,t.nodes);var A=i/(1.1*Math.abs(n.maxX-n.minX)),C=o/(1.1*Math.abs(n.maxY-n.minY));r=A<=C?A:C}r>t.maxZoomLevel?r=t.maxZoomLevel:r1&&void 0!==arguments[1]?arguments[1]:{};if(void 0!==this.body.nodes[t]){var n={x:this.body.nodes[t].x,y:this.body.nodes[t].y};e.position=n,e.lockedOnNode=t,this.moveTo(e)}else console.error("Node: "+t+" cannot be found.")}},{key:"moveTo",value:function(t){if(void 0!==t){if(null!=t.offset){if(null!=t.offset.x){if(t.offset.x=+t.offset.x,!E_(t.offset.x))throw new TypeError('The option "offset.x" has to be a finite number.')}else t.offset.x=0;if(null!=t.offset.y){if(t.offset.y=+t.offset.y,!E_(t.offset.y))throw new TypeError('The option "offset.y" has to be a finite number.')}else t.offset.x=0}else t.offset={x:0,y:0};if(null!=t.position){if(null!=t.position.x){if(t.position.x=+t.position.x,!E_(t.position.x))throw new TypeError('The option "position.x" has to be a finite number.')}else t.position.x=0;if(null!=t.position.y){if(t.position.y=+t.position.y,!E_(t.position.y))throw new TypeError('The option "position.y" has to be a finite number.')}else t.position.x=0}else t.position=this.getViewPosition();if(null!=t.scale){if(t.scale=+t.scale,!(t.scale>0))throw new TypeError('The option "scale" has to be a number greater than zero.')}else t.scale=this.body.view.scale;void 0===t.animation&&(t.animation={duration:0}),!1===t.animation&&(t.animation={duration:0}),!0===t.animation&&(t.animation={}),void 0===t.animation.duration&&(t.animation.duration=1e3),void 0===t.animation.easingFunction&&(t.animation.easingFunction="easeInOutQuad"),this.animateView(t)}else t={}}},{key:"animateView",value:function(t){if(void 0!==t){this.animationEasingFunction=t.animation.easingFunction,this.releaseNode(),!0===t.locked&&(this.lockedOnNodeId=t.lockedOnNode,this.lockedOnNodeOffset=t.offset),0!=this.easingTime&&this._transitionRedraw(!0),this.sourceScale=this.body.view.scale,this.sourceTranslation=this.body.view.translation,this.targetScale=t.scale,this.body.view.scale=this.targetScale;var e,n,r=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i=r.x-t.position.x,o=r.y-t.position.y;this.targetTranslation={x:this.sourceTranslation.x+i*this.targetScale+t.offset.x,y:this.sourceTranslation.y+o*this.targetScale+t.offset.y},0===t.animation.duration?null!=this.lockedOnNodeId?(this.viewFunction=wi(e=this._lockedRedraw).call(e,this),this.body.emitter.on("initRedraw",this.viewFunction)):(this.body.view.scale=this.targetScale,this.body.view.translation=this.targetTranslation,this.body.emitter.emit("_requestRedraw")):(this.animationSpeed=1/(60*t.animation.duration*.001)||1/60,this.animationEasingFunction=t.animation.easingFunction,this.viewFunction=wi(n=this._transitionRedraw).call(n,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering"))}}},{key:"_lockedRedraw",value:function(){var t=this.body.nodes[this.lockedOnNodeId].x,e=this.body.nodes[this.lockedOnNodeId].y,n=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),r=n.x-t,i=n.y-e,o=this.body.view.translation,g={x:o.x+r*this.body.view.scale+this.lockedOnNodeOffset.x,y:o.y+i*this.body.view.scale+this.lockedOnNodeOffset.y};this.body.view.translation=g}},{key:"releaseNode",value:function(){void 0!==this.lockedOnNodeId&&void 0!==this.viewFunction&&(this.body.emitter.off("initRedraw",this.viewFunction),this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0)}},{key:"_transitionRedraw",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.easingTime+=this.animationSpeed,this.easingTime=!0===t?1:this.easingTime;var e,n=Hb[this.animationEasingFunction](this.easingTime);(this.body.view.scale=this.sourceScale+(this.targetScale-this.sourceScale)*n,this.body.view.translation={x:this.sourceTranslation.x+(this.targetTranslation.x-this.sourceTranslation.x)*n,y:this.sourceTranslation.y+(this.targetTranslation.y-this.sourceTranslation.y)*n},this.easingTime>=1)&&(this.body.emitter.off("initRedraw",this.viewFunction),this.easingTime=0,null!=this.lockedOnNodeId&&(this.viewFunction=wi(e=this._lockedRedraw).call(e,this),this.body.emitter.on("initRedraw",this.viewFunction)),this.body.emitter.emit("animationFinished"))}},{key:"getScale",value:function(){return this.body.view.scale}},{key:"getViewPosition",value:function(){return this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight})}}]),t}();function ZD(t){var e,n=t&&t.preventDefault||!1,r=t&&t.container||window,i={},o={keydown:{},keyup:{}},g={};for(e=97;e<=122;e++)g[String.fromCharCode(e)]={code:e-97+65,shift:!1};for(e=65;e<=90;e++)g[String.fromCharCode(e)]={code:e,shift:!0};for(e=0;e<=9;e++)g[""+e]={code:48+e,shift:!1};for(e=1;e<=12;e++)g["F"+e]={code:111+e,shift:!1};for(e=0;e<=9;e++)g["num"+e]={code:96+e,shift:!1};g["num*"]={code:106,shift:!1},g["num+"]={code:107,shift:!1},g["num-"]={code:109,shift:!1},g["num/"]={code:111,shift:!1},g["num."]={code:110,shift:!1},g.left={code:37,shift:!1},g.up={code:38,shift:!1},g.right={code:39,shift:!1},g.down={code:40,shift:!1},g.space={code:32,shift:!1},g.enter={code:13,shift:!1},g.shift={code:16,shift:void 0},g.esc={code:27,shift:!1},g.backspace={code:8,shift:!1},g.tab={code:9,shift:!1},g.ctrl={code:17,shift:!1},g.alt={code:18,shift:!1},g.delete={code:46,shift:!1},g.pageup={code:33,shift:!1},g.pagedown={code:34,shift:!1},g["="]={code:187,shift:!1},g["-"]={code:189,shift:!1},g["]"]={code:221,shift:!1},g["["]={code:219,shift:!1};var s=function(t){C(t,"keydown")},A=function(t){C(t,"keyup")},C=function(t,e){if(void 0!==o[e][t.keyCode]){for(var r=o[e][t.keyCode],i=0;i700&&(this.body.emitter.emit("fit",{duration:700}),this.touchTime=(new Date).valueOf())}},{key:"_stopMovement",value:function(){for(var t in this.boundFunctions)Object.prototype.hasOwnProperty.call(this.boundFunctions,t)&&(this.body.emitter.off("initRedraw",this.boundFunctions[t]),this.body.emitter.emit("_stopRendering"));this.boundFunctions={}}},{key:"_moveUp",value:function(){this.body.view.translation.y+=this.options.keyboard.speed.y}},{key:"_moveDown",value:function(){this.body.view.translation.y-=this.options.keyboard.speed.y}},{key:"_moveLeft",value:function(){this.body.view.translation.x+=this.options.keyboard.speed.x}},{key:"_moveRight",value:function(){this.body.view.translation.x-=this.options.keyboard.speed.x}},{key:"_zoomIn",value:function(){var t=this.body.view.scale,e=this.body.view.scale*(1+this.options.keyboard.speed.zoom),n=this.body.view.translation,r=e/t,i=(1-r)*this.canvas.canvasViewCenter.x+n.x*r,o=(1-r)*this.canvas.canvasViewCenter.y+n.y*r;this.body.view.scale=e,this.body.view.translation={x:i,y:o},this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:null})}},{key:"_zoomOut",value:function(){var t=this.body.view.scale,e=this.body.view.scale/(1+this.options.keyboard.speed.zoom),n=this.body.view.translation,r=e/t,i=(1-r)*this.canvas.canvasViewCenter.x+n.x*r,o=(1-r)*this.canvas.canvasViewCenter.y+n.y*r;this.body.view.scale=e,this.body.view.translation={x:i,y:o},this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:null})}},{key:"configureKeyboardBindings",value:function(){var t,e,n,r,i,o,g,s,A,C,I,a,u,c,l,h,d,f,p,v,y,b,m,w,_=this;void 0!==this.keycharm&&this.keycharm.destroy(),!0===this.options.keyboard.enabled&&(!0===this.options.keyboard.bindToWindow?this.keycharm=ZD({container:window,preventDefault:!0}):this.keycharm=ZD({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),!0===this.activated&&(wi(t=this.keycharm).call(t,"up",(function(){_.bindToRedraw("_moveUp")}),"keydown"),wi(e=this.keycharm).call(e,"down",(function(){_.bindToRedraw("_moveDown")}),"keydown"),wi(n=this.keycharm).call(n,"left",(function(){_.bindToRedraw("_moveLeft")}),"keydown"),wi(r=this.keycharm).call(r,"right",(function(){_.bindToRedraw("_moveRight")}),"keydown"),wi(i=this.keycharm).call(i,"=",(function(){_.bindToRedraw("_zoomIn")}),"keydown"),wi(o=this.keycharm).call(o,"num+",(function(){_.bindToRedraw("_zoomIn")}),"keydown"),wi(g=this.keycharm).call(g,"num-",(function(){_.bindToRedraw("_zoomOut")}),"keydown"),wi(s=this.keycharm).call(s,"-",(function(){_.bindToRedraw("_zoomOut")}),"keydown"),wi(A=this.keycharm).call(A,"[",(function(){_.bindToRedraw("_zoomOut")}),"keydown"),wi(C=this.keycharm).call(C,"]",(function(){_.bindToRedraw("_zoomIn")}),"keydown"),wi(I=this.keycharm).call(I,"pageup",(function(){_.bindToRedraw("_zoomIn")}),"keydown"),wi(a=this.keycharm).call(a,"pagedown",(function(){_.bindToRedraw("_zoomOut")}),"keydown"),wi(u=this.keycharm).call(u,"up",(function(){_.unbindFromRedraw("_moveUp")}),"keyup"),wi(c=this.keycharm).call(c,"down",(function(){_.unbindFromRedraw("_moveDown")}),"keyup"),wi(l=this.keycharm).call(l,"left",(function(){_.unbindFromRedraw("_moveLeft")}),"keyup"),wi(h=this.keycharm).call(h,"right",(function(){_.unbindFromRedraw("_moveRight")}),"keyup"),wi(d=this.keycharm).call(d,"=",(function(){_.unbindFromRedraw("_zoomIn")}),"keyup"),wi(f=this.keycharm).call(f,"num+",(function(){_.unbindFromRedraw("_zoomIn")}),"keyup"),wi(p=this.keycharm).call(p,"num-",(function(){_.unbindFromRedraw("_zoomOut")}),"keyup"),wi(v=this.keycharm).call(v,"-",(function(){_.unbindFromRedraw("_zoomOut")}),"keyup"),wi(y=this.keycharm).call(y,"[",(function(){_.unbindFromRedraw("_zoomOut")}),"keyup"),wi(b=this.keycharm).call(b,"]",(function(){_.unbindFromRedraw("_zoomIn")}),"keyup"),wi(m=this.keycharm).call(m,"pageup",(function(){_.unbindFromRedraw("_zoomIn")}),"keyup"),wi(w=this.keycharm).call(w,"pagedown",(function(){_.unbindFromRedraw("_zoomOut")}),"keyup")))}}]),t}();function VD(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n50&&(this.drag.pointer=this.getPointer(t.center),this.drag.pinched=!1,this.pinch.scale=this.body.view.scale,this.touchTime=(new Date).valueOf())}},{key:"onTap",value:function(t){var e=this.getPointer(t.center),n=this.selectionHandler.options.multiselect&&(t.changedPointers[0].ctrlKey||t.changedPointers[0].metaKey);this.checkSelectionChanges(e,n),this.selectionHandler.commitAndEmit(e,t),this.selectionHandler.generateClickEvent("click",t,e)}},{key:"onDoubleTap",value:function(t){var e=this.getPointer(t.center);this.selectionHandler.generateClickEvent("doubleClick",t,e)}},{key:"onHold",value:function(t){var e=this.getPointer(t.center),n=this.selectionHandler.options.multiselect;this.checkSelectionChanges(e,n),this.selectionHandler.commitAndEmit(e,t),this.selectionHandler.generateClickEvent("click",t,e),this.selectionHandler.generateClickEvent("hold",t,e)}},{key:"onRelease",value:function(t){if((new Date).valueOf()-this.touchTime>10){var e=this.getPointer(t.center);this.selectionHandler.generateClickEvent("release",t,e),this.touchTime=(new Date).valueOf()}}},{key:"onContext",value:function(t){var e=this.getPointer({x:t.clientX,y:t.clientY});this.selectionHandler.generateClickEvent("oncontext",t,e)}},{key:"checkSelectionChanges",value:function(t){!0===(arguments.length>1&&void 0!==arguments[1]&&arguments[1])?this.selectionHandler.selectAdditionalOnPoint(t):this.selectionHandler.selectOnPoint(t)}},{key:"_determineDifference",value:function(t,e){var n=function(t,e){for(var n=[],r=0;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,g=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return g=t.done,t},e:function(t){s=!0,o=t},f:function(){try{g||null==n.return||n.return()}finally{if(s)throw o}}}}(this.selectionHandler.getSelectedNodes());try{for(i.s();!(r=i.n()).done;){var o=r.value,g={id:o.id,node:o,x:o.x,y:o.y,xFixed:o.options.fixed.x,yFixed:o.options.fixed.y};o.options.fixed.x=!0,o.options.fixed.y=!0,this.drag.selection.push(g)}}catch(t){i.e(t)}finally{i.f()}}else this.selectionHandler.generateClickEvent("dragStart",t,this.drag.pointer,void 0,!0)}}},{key:"onDrag",value:function(t){var e=this;if(!0!==this.drag.pinched){this.body.emitter.emit("unlockNode");var n=this.getPointer(t.center),r=this.drag.selection;if(r&&r.length&&!0===this.options.dragNodes){this.selectionHandler.generateClickEvent("dragging",t,n);var i=n.x-this.drag.pointer.x,o=n.y-this.drag.pointer.y;Hh(r).call(r,(function(t){var n=t.node;!1===t.xFixed&&(n.x=e.canvas._XconvertDOMtoCanvas(e.canvas._XconvertCanvasToDOM(t.x)+i)),!1===t.yFixed&&(n.y=e.canvas._YconvertDOMtoCanvas(e.canvas._YconvertCanvasToDOM(t.y)+o))})),this.body.emitter.emit("startSimulation")}else{if(t.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent("dragging",t,n,void 0,!0),void 0===this.drag.pointer)return void this.onDragStart(t);this.body.selectionBox.position.end={x:this.canvas._XconvertDOMtoCanvas(n.x),y:this.canvas._YconvertDOMtoCanvas(n.y)},this.body.emitter.emit("_requestRedraw")}if(!0===this.options.dragView&&!t.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent("dragging",t,n,void 0,!0),void 0===this.drag.pointer)return void this.onDragStart(t);var g=n.x-this.drag.pointer.x,s=n.y-this.drag.pointer.y;this.body.view.translation={x:this.drag.translation.x+g,y:this.drag.translation.y+s},this.body.emitter.emit("_requestRedraw")}}}}},{key:"onDragEnd",value:function(t){var e=this;if(this.drag.dragging=!1,this.body.selectionBox.show){var n;this.body.selectionBox.show=!1;var r=this.body.selectionBox.position,i={minX:Math.min(r.start.x,r.end.x),minY:Math.min(r.start.y,r.end.y),maxX:Math.max(r.start.x,r.end.x),maxY:Math.max(r.start.y,r.end.y)},o=vf(n=this.body.nodeIndices).call(n,(function(t){var n=e.body.nodes[t];return n.x>=i.minX&&n.x<=i.maxX&&n.y>=i.minY&&n.y<=i.maxY}));Hh(o).call(o,(function(t){return e.selectionHandler.selectObject(e.body.nodes[t])}));var g=this.getPointer(t.center);this.selectionHandler.commitAndEmit(g,t),this.selectionHandler.generateClickEvent("dragEnd",t,this.getPointer(t.center),void 0,!0),this.body.emitter.emit("_requestRedraw")}else{var s=this.drag.selection;s&&s.length?(Hh(s).call(s,(function(t){t.node.options.fixed.x=t.xFixed,t.node.options.fixed.y=t.yFixed})),this.selectionHandler.generateClickEvent("dragEnd",t,this.getPointer(t.center)),this.body.emitter.emit("startSimulation")):(this.selectionHandler.generateClickEvent("dragEnd",t,this.getPointer(t.center),void 0,!0),this.body.emitter.emit("_requestRedraw"))}}},{key:"onPinch",value:function(t){var e=this.getPointer(t.center);this.drag.pinched=!0,void 0===this.pinch.scale&&(this.pinch.scale=1);var n=this.pinch.scale*t.scale;this.zoom(n,e)}},{key:"zoom",value:function(t,e){if(!0===this.options.zoomView){var n=this.body.view.scale;t<1e-5&&(t=1e-5),t>10&&(t=10);var r=void 0;void 0!==this.drag&&!0===this.drag.dragging&&(r=this.canvas.DOMtoCanvas(this.drag.pointer));var i=this.body.view.translation,o=t/n,g=(1-o)*e.x+i.x*o,s=(1-o)*e.y+i.y*o;if(this.body.view.scale=t,this.body.view.translation={x:g,y:s},null!=r){var A=this.canvas.canvasToDOM(r);this.drag.pointer.x=A.x,this.drag.pointer.y=A.y}this.body.emitter.emit("_requestRedraw"),n0&&(this.popupObj=C[I[I.length-1]],o=!0)}if(void 0===this.popupObj&&!1===o){for(var u,c=this.body.edgeIndices,l=this.body.edges,h=[],d=0;d0&&(this.popupObj=l[h[h.length-1]],g="edge")}void 0!==this.popupObj?this.popupObj.id!==i&&(void 0===this.popup&&(this.popup=new sm(this.canvas.frame)),this.popup.popupTargetType=g,this.popup.popupTargetId=this.popupObj.id,this.popup.setPosition(t.x+3,t.y-5),this.popup.setText(this.popupObj.getTitle()),this.popup.show(),this.body.emitter.emit("showPopup",this.popupObj.id)):void 0!==this.popup&&(this.popup.hide(),this.body.emitter.emit("hidePopup"))}},{key:"_checkHidePopup",value:function(t){var e=this.selectionHandler._pointerToPositionObject(t),n=!1;if("node"===this.popup.popupTargetType){if(void 0!==this.body.nodes[this.popup.popupTargetId]&&!0===(n=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(e))){var r=this.selectionHandler.getNodeAt(t);n=void 0!==r&&r.id===this.popup.popupTargetId}}else void 0===this.selectionHandler.getNodeAt(t)&&void 0!==this.body.edges[this.popup.popupTargetId]&&(n=this.body.edges[this.popup.popupTargetId].isOverlappingWith(e));!1===n&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit("hidePopup"))}}]),t}(),WD={},YD={get exports(){return WD},set exports(t){WD=t}},HD=tt,KD=Kw,QD=Vm.getWeakData,XD=Sw,qD=Ln,JD=Tt,$D=Lt,tM=Ow,eM=De,nM=xo.set,rM=xo.getterFor,iM=ZC.find,oM=ZC.findIndex,gM=HD([].splice),sM=0,AM=function(t){return t.frozen||(t.frozen=new CM)},CM=function(){this.entries=[]},IM=function(t,e){return iM(t.entries,(function(t){return t[0]===e}))};CM.prototype={get:function(t){var e=IM(this,t);if(e)return e[1]},has:function(t){return!!IM(this,t)},set:function(t,e){var n=IM(this,t);n?n[1]=e:this.entries.push([t,e])},delete:function(t){var e=oM(this.entries,(function(e){return e[0]===t}));return~e&&gM(this.entries,e,1),!!~e}};var aM,uM={getConstructor:function(t,e,n,r){var i=t((function(t,i){XD(t,o),nM(t,{type:e,id:sM++,frozen:void 0}),JD(i)||tM(i,t[r],{that:t,AS_ENTRIES:n})})),o=i.prototype,g=rM(e),s=function(t,e,n){var r=g(t),i=QD(qD(e),!0);return!0===i?AM(r).set(e,n):i[r.id]=n,t};return KD(o,{delete:function(t){var e=g(this);if(!$D(t))return!1;var n=QD(t);return!0===n?AM(e).delete(t):n&&eM(n,e.id)&&delete n[e.id]},has:function(t){var e=g(this);if(!$D(t))return!1;var n=QD(t);return!0===n?AM(e).has(t):n&&eM(n,e.id)}}),KD(o,n?{get:function(t){var e=g(this);if($D(t)){var n=QD(t);return!0===n?AM(e).get(t):n?n[e.id]:void 0}},set:function(t,e){return s(this,t,e)}}:{add:function(t){return s(this,t,!0)}}),i}},cM=Jm,lM=U,hM=tt,dM=Kw,fM=Vm,pM=Yw,vM=uM,yM=Lt,bM=xo.enforce,mM=V,wM=so,_M=Object,xM=Array.isArray,EM=_M.isExtensible,OM=_M.isFrozen,kM=_M.isSealed,TM=_M.freeze,SM=_M.seal,PM={},NM={},RM=!lM.ActiveXObject&&"ActiveXObject"in lM,DM=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},MM=pM("WeakMap",DM,vM),jM=MM.prototype,BM=hM(jM.set);if(wM)if(RM){aM=vM.getConstructor(DM,"WeakMap",!0),fM.enable();var LM=hM(jM.delete),FM=hM(jM.has),zM=hM(jM.get);dM(jM,{delete:function(t){if(yM(t)&&!EM(t)){var e=bM(this);return e.frozen||(e.frozen=new aM),LM(this,t)||e.frozen.delete(t)}return LM(this,t)},has:function(t){if(yM(t)&&!EM(t)){var e=bM(this);return e.frozen||(e.frozen=new aM),FM(this,t)||e.frozen.has(t)}return FM(this,t)},get:function(t){if(yM(t)&&!EM(t)){var e=bM(this);return e.frozen||(e.frozen=new aM),FM(this,t)?zM(this,t):e.frozen.get(t)}return zM(this,t)},set:function(t,e){if(yM(t)&&!EM(t)){var n=bM(this);n.frozen||(n.frozen=new aM),FM(this,t)?BM(this,t,e):n.frozen.set(t,e)}else BM(this,t,e);return this}})}else cM&&mM((function(){var t=TM([]);return BM(new MM,t,1),!OM(t)}))&&dM(jM,{set:function(t,e){var n;return xM(t)&&(OM(t)?n=PM:kM(t)&&(n=NM)),BM(this,t,e),n==PM&&TM(t),n==NM&&SM(t),this}});var ZM=Ft.WeakMap;!function(t){t.exports=ZM}(YD);var UM,VM,GM,WM,YM,HM=L(WD);function KM(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)}function QM(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n}function XM(t,e){var n=void 0!==Kl&&KA(t)||t["@@iterator"];if(!n){if(Ih(t)||(n=function(t,e){var n;if(t){if("string"==typeof t)return qM(t,e);var r=ih(n=Object.prototype.toString.call(t)).call(n,8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?xA(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?qM(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,g=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return g=t.done,t},e:function(t){s=!0,o=t},f:function(){try{g||null==n.return||n.return()}finally{if(s)throw o}}}}function qM(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:function(){};Fu(this,t),GM.set(this,new $M),WM.set(this,new $M),YM.set(this,void 0),QM(this,YM,e,"f")}return il(t,[{key:"sizeNodes",get:function(){return KM(this,GM,"f").size}},{key:"sizeEdges",get:function(){return KM(this,WM,"f").size}},{key:"getNodes",value:function(){return KM(this,GM,"f").getSelection()}},{key:"getEdges",value:function(){return KM(this,WM,"f").getSelection()}},{key:"addNodes",value:function(){var t;(t=KM(this,GM,"f")).add.apply(t,arguments)}},{key:"addEdges",value:function(){var t;(t=KM(this,WM,"f")).add.apply(t,arguments)}},{key:"deleteNodes",value:function(t){KM(this,GM,"f").delete(t)}},{key:"deleteEdges",value:function(t){KM(this,WM,"f").delete(t)}},{key:"clear",value:function(){KM(this,GM,"f").clear(),KM(this,WM,"f").clear()}},{key:"commit",value:function(){for(var t,e,n={nodes:KM(this,GM,"f").commit(),edges:KM(this,WM,"f").commit()},r=arguments.length,i=new Array(r),o=0;o=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,g=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return g=t.done,t},e:function(t){s=!0,o=t},f:function(){try{g||null==n.return||n.return()}finally{if(s)throw o}}}}function nj(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n4&&void 0!==arguments[4]&&arguments[4],o=this._initBaseEvent(e,n);if(!0===i)o.nodes=[],o.edges=[];else{var g=this.getSelection();o.nodes=g.nodes,o.edges=g.edges}void 0!==r&&(o.previousSelection=r),"click"==t&&(o.items=this.getClickedItems(n)),void 0!==e.controlEdge&&(o.controlEdge=e.controlEdge),this.body.emitter.emit(t,o)}},{key:"selectObject",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.selectConnectedEdges;if(void 0!==t){var n;if(t instanceof pR)!0===e&&(n=this._selectionAccumulator).addEdges.apply(n,Yl(t.edges)),this._selectionAccumulator.addNodes(t);else this._selectionAccumulator.addEdges(t);return!0}return!1}},{key:"deselectObject",value:function(t){!0===t.isSelected()&&(t.selected=!1,this._removeFromSelection(t))}},{key:"_getAllNodesOverlappingWith",value:function(t){for(var e=[],n=this.body.nodes,r=0;r1&&void 0!==arguments[1])||arguments[1],n=this._pointerToPositionObject(t),r=this._getAllNodesOverlappingWith(n);return r.length>0?!0===e?this.body.nodes[r[r.length-1]]:r[r.length-1]:void 0}},{key:"_getEdgesOverlappingWith",value:function(t,e){for(var n=this.body.edges,r=0;r1&&void 0!==arguments[1])||arguments[1],n=this.canvas.DOMtoCanvas(t),r=10,i=null,o=this.body.edges,g=0;g0&&(this.generateClickEvent("deselectEdge",e,t,i),n=!0),r.nodes.deleted.length>0&&(this.generateClickEvent("deselectNode",e,t,i),n=!0),r.nodes.added.length>0&&(this.generateClickEvent("selectNode",e,t),n=!0),r.edges.added.length>0&&(this.generateClickEvent("selectEdge",e,t),n=!0),!0===n&&this.generateClickEvent("select",e,t)}},{key:"getSelection",value:function(){return{nodes:this.getSelectedNodeIds(),edges:this.getSelectedEdgeIds()}}},{key:"getSelectedNodes",value:function(){return this._selectionAccumulator.getNodes()}},{key:"getSelectedEdges",value:function(){return this._selectionAccumulator.getEdges()}},{key:"getSelectedNodeIds",value:function(){var t;return vh(t=this._selectionAccumulator.getNodes()).call(t,(function(t){return t.id}))}},{key:"getSelectedEdgeIds",value:function(){var t;return vh(t=this._selectionAccumulator.getEdges()).call(t,(function(t){return t.id}))}},{key:"setSelection",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t||!t.nodes&&!t.edges)throw new TypeError("Selection must be an object with nodes and/or edges properties");if((e.unselectAll||void 0===e.unselectAll)&&this.unselectAll(),t.nodes){var n,r=ej(t.nodes);try{for(r.s();!(n=r.n()).done;){var i=n.value,o=this.body.nodes[i];if(!o)throw new RangeError('Node with id "'+i+'" not found');this.selectObject(o,e.highlightEdges)}}catch(t){r.e(t)}finally{r.f()}}if(t.edges){var g,s=ej(t.edges);try{for(s.s();!(g=s.n()).done;){var A=g.value,C=this.body.edges[A];if(!C)throw new RangeError('Edge with id "'+A+'" not found');this.selectObject(C)}}catch(t){s.e(t)}finally{s.f()}}this.body.emitter.emit("_requestRedraw"),this._selectionAccumulator.commit()}},{key:"selectNodes",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!t||void 0===t.length)throw"Selection must be an array with ids";this.setSelection({nodes:t},{highlightEdges:e})}},{key:"selectEdges",value:function(t){if(!t||void 0===t.length)throw"Selection must be an array with ids";this.setSelection({edges:t})}},{key:"updateSelection",value:function(){for(var t in this._selectionAccumulator.getNodes())Object.prototype.hasOwnProperty.call(this.body.nodes,t.id)||this._selectionAccumulator.deleteNodes(t);for(var e in this._selectionAccumulator.getEdges())Object.prototype.hasOwnProperty.call(this.body.edges,e.id)||this._selectionAccumulator.deleteEdges(e)}},{key:"getClickedItems",value:function(t){for(var e=this.canvas.DOMtoCanvas(t),n=[],r=this.body.nodeIndices,i=this.body.nodes,o=r.length-1;o>=0;o--){var g=i[r[o]].getItemsOnPoint(e);n.push.apply(n,g)}for(var s=this.body.edgeIndices,A=this.body.edges,C=s.length-1;C>=0;C--){var I=A[s[C]].getItemsOnPoint(e);n.push.apply(n,I)}return n}}]),t}(),ij={},oj={get exports(){return ij},set exports(t){ij=t}},gj={};!function(t){!function(t){t.__esModule=!0,t.sort=function(t,n,r,s){if(!Array.isArray(t))throw new TypeError("Can only sort arrays");n?"function"!=typeof n&&(s=r,r=n,n=i):n=i,r||(r=0),s||(s=t.length);var A=s-r;if(!(A<2)){var I=0;if(A=e;)n|=1&t,t>>=1;return t+n}(A);do{if((I=o(t,r,s,n))u&&(c=u),g(t,r,r+c,r+I,n),I=c}a.pushRun(r,I),a.mergeRuns(),A-=I,r+=I}while(0!==A);a.forceMergeRuns()}}};var e=32,n=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9];function r(t){return t<1e5?t<100?t<10?0:1:t<1e4?t<1e3?2:3:4:t<1e7?t<1e6?5:6:t<1e9?t<1e8?7:8:9}function i(t,e){if(t===e)return 0;if(~~t===t&&~~e===e){if(0===t||0===e)return t=0)return-1;if(t>=0)return 1;t=-t,e=-e}var i=r(t),o=r(e),g=0;return io&&(e*=n[i-o-1],t/=10,g=1),t===e?g:t=0;)i++;return i-e}function g(t,e,n,r,i){for(r===e&&r++;r>>1;i(o,t[A])<0?s=A:g=A+1}var C=r-g;switch(C){case 3:t[g+3]=t[g+2];case 2:t[g+2]=t[g+1];case 1:t[g+1]=t[g];break;default:for(;C>0;)t[g+C]=t[g+C-1],C--}t[g]=o}}function s(t,e,n,r,i,o){var g=0,s=0,A=1;if(o(t,e[n+i])>0){for(s=r-i;A0;)g=A,(A=1+(A<<1))<=0&&(A=s);A>s&&(A=s),g+=i,A+=i}else{for(s=i+1;As&&(A=s);var C=g;g=i-A,A=i-C}for(g++;g>>1);o(t,e[n+I])>0?g=I+1:A=I}return A}function A(t,e,n,r,i,o){var g=0,s=0,A=1;if(o(t,e[n+i])<0){for(s=i+1;As&&(A=s);var C=g;g=i-A,A=i-C}else{for(s=r-i;A=0;)g=A,(A=1+(A<<1))<=0&&(A=s);A>s&&(A=s),g+=i,A+=i}for(g++;g>>1);o(t,e[n+I])<0?A=I:g=I+1}return A}var C=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.array=null,this.compare=null,this.minGallop=7,this.length=0,this.tmpStorageLength=256,this.stackLength=0,this.runStart=null,this.runLength=null,this.stackSize=0,this.array=e,this.compare=n,this.length=e.length,this.length<512&&(this.tmpStorageLength=this.length>>>1),this.tmp=new Array(this.tmpStorageLength),this.stackLength=this.length<120?5:this.length<1542?10:this.length<119151?19:40,this.runStart=new Array(this.stackLength),this.runLength=new Array(this.stackLength)}return t.prototype.pushRun=function(t,e){this.runStart[this.stackSize]=t,this.runLength[this.stackSize]=e,this.stackSize+=1},t.prototype.mergeRuns=function(){for(;this.stackSize>1;){var t=this.stackSize-2;if(t>=1&&this.runLength[t-1]<=this.runLength[t]+this.runLength[t+1]||t>=2&&this.runLength[t-2]<=this.runLength[t]+this.runLength[t-1])this.runLength[t-1]this.runLength[t+1])break;this.mergeAt(t)}},t.prototype.forceMergeRuns=function(){for(;this.stackSize>1;){var t=this.stackSize-2;t>0&&this.runLength[t-1]=7||h>=7);if(d)break;c<0&&(c=0),c+=2}if(this.minGallop=c,c<1&&(this.minGallop=1),1===e){for(C=0;C=0;C--)o[l+C]=o[c+C];if(0===e){p=!0;break}}if(o[u--]=g[a--],1==--r){p=!0;break}if(0!=(f=r-s(o[I],g,0,r,r-1,i))){for(r-=f,l=1+(u-=f),c=1+(a-=f),C=0;C=7||f>=7);if(p)break;h<0&&(h=0),h+=2}if(this.minGallop=h,h<1&&(this.minGallop=1),1===r){for(l=1+(u-=e),c=1+(I-=e),C=e-1;C>=0;C--)o[l+C]=o[c+C];o[u]=g[a]}else{if(0===r)throw new Error("mergeHigh preconditions were not respected");for(c=u-(r-1),C=0;C=0;C--)o[l+C]=o[c+C];o[u]=g[a]}else for(c=u-(r-1),C=0;C2&&void 0!==arguments[2]?arguments[2]:void 0;this.fake_use(t,e,n),this.abstract()}},{key:"getTreeSize",value:function(t){return this.fake_use(t),this.abstract()}},{key:"sort",value:function(t){this.fake_use(t),this.abstract()}},{key:"fix",value:function(t,e){this.fake_use(t,e),this.abstract()}},{key:"shift",value:function(t,e){this.fake_use(t,e),this.abstract()}}]),t}(),Ij=function(t){tx(n,t);var e=Aj(n);function n(t){var r;return Fu(this,n),(r=e.call(this)).layout=t,r}return il(n,[{key:"curveType",value:function(){return"horizontal"}},{key:"getPosition",value:function(t){return t.x}},{key:"setPosition",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;void 0!==n&&this.layout.hierarchical.addToOrdering(t,n),t.x=e}},{key:"getTreeSize",value:function(t){var e=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,t);return{min:e.min_x,max:e.max_x}}},{key:"sort",value:function(t){ij.sort(t,(function(t,e){return t.x-e.x}))}},{key:"fix",value:function(t,e){t.y=this.layout.options.hierarchical.levelSeparation*e,t.options.fixed.y=!0}},{key:"shift",value:function(t,e){this.layout.body.nodes[t].x+=e}}]),n}(Cj),aj=function(t){tx(n,t);var e=Aj(n);function n(t){var r;return Fu(this,n),(r=e.call(this)).layout=t,r}return il(n,[{key:"curveType",value:function(){return"vertical"}},{key:"getPosition",value:function(t){return t.y}},{key:"setPosition",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;void 0!==n&&this.layout.hierarchical.addToOrdering(t,n),t.y=e}},{key:"getTreeSize",value:function(t){var e=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,t);return{min:e.min_y,max:e.max_y}}},{key:"sort",value:function(t){ij.sort(t,(function(t,e){return t.y-e.y}))}},{key:"fix",value:function(t,e){t.x=this.layout.options.hierarchical.levelSeparation*e,t.options.fixed.x=!0}},{key:"shift",value:function(t,e){this.layout.body.nodes[t].y+=e}}]),n}(Cj),uj={},cj={get exports(){return uj},set exports(t){uj=t}},lj=ZC.every;Ir({target:"Array",proto:!0,forced:!jh("every")},{every:function(t){return lj(this,t,arguments.length>1?arguments[1]:void 0)}});var hj=fi("Array").every,dj=Wt,fj=hj,pj=Array.prototype,vj=function(t){var e=t.every;return t===pj||dj(pj,t)&&e===pj.every?fj:e};!function(t){t.exports=vj}(cj);var yj=L(uj);function bj(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=e[r])&&(e[r]=e[n]+1)})),e}function wj(t,e,n,r){var i,o,g=Sp(null),s=UT(i=Yl(_P(r).call(r))).call(i,(function(t,e){return t+1+e.edges.length}),0),A=n+"Id",C="to"===n?1:-1,I=function(t,e){var n=void 0!==Kl&&KA(t)||t["@@iterator"];if(!n){if(Ih(t)||(n=function(t,e){var n;if(t){if("string"==typeof t)return bj(t,e);var r=ih(n=Object.prototype.toString.call(t)).call(n,8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?xA(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?bj(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,g=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return g=t.done,t},e:function(t){s=!0,o=t},f:function(){try{g||null==n.return||n.return()}finally{if(s)throw o}}}}(r);try{var a=function(){var i=Wl(o.value,2),I=i[0],a=i[1];if(!r.has(I)||!t(a))return"continue";g[I]=0;for(var u,c=[a],l=0,h=function(){var t,i;if(!r.has(I))return"continue";var o=g[u.id]+C;if(Hh(t=vf(i=u.edges).call(i,(function(t){return t.connected&&t.to!==t.from&&t[n]!==u&&r.has(t.toId)&&r.has(t.fromId)}))).call(t,(function(t){var r=t[A],i=g[r];(null==i||e(o,i))&&(g[r]=o,c.push(t[n]))})),l>s)return{v:{v:mj(r,g)}};++l};u=c.pop();){var d=h();if("continue"!==d&&"object"===Qc(d))return d.v}};for(I.s();!(o=I.n()).done;){var u=a();if("continue"!==u&&"object"===Qc(u))return u.v}}catch(t){I.e(t)}finally{I.f()}return g}var _j=function(){function t(){Fu(this,t),this.childrenReference={},this.parentReference={},this.trees={},this.distributionOrdering={},this.levels={},this.distributionIndex={},this.isTree=!1,this.treeIndex=-1}return il(t,[{key:"addRelation",value:function(t,e){void 0===this.childrenReference[t]&&(this.childrenReference[t]=[]),this.childrenReference[t].push(e),void 0===this.parentReference[e]&&(this.parentReference[e]=[]),this.parentReference[e].push(t)}},{key:"checkIfTree",value:function(){for(var t in this.parentReference)if(this.parentReference[t].length>1)return void(this.isTree=!1);this.isTree=!0}},{key:"numTrees",value:function(){return this.treeIndex+1}},{key:"setTreeIndex",value:function(t,e){void 0!==e&&void 0===this.trees[t.id]&&(this.trees[t.id]=e,this.treeIndex=Math.max(e,this.treeIndex))}},{key:"ensureLevel",value:function(t){void 0===this.levels[t]&&(this.levels[t]=0)}},{key:"getMaxLevel",value:function(t){var e=this,n={};return function t(r){if(void 0!==n[r])return n[r];var i=e.levels[r];if(e.childrenReference[r]){var o=e.childrenReference[r];if(o.length>0)for(var g=0;g0&&(n.levelSeparation*=-1):n.levelSeparation<0&&(n.levelSeparation*=-1),this.setDirectionStrategy(),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(e);if(!0===r)return this.body.emitter.emit("refresh"),Nb(e,this.optionsBackup)}return e}},{key:"_resetRNG",value:function(t){this.initialRandomSeed=t,this._rng=pb(this.initialRandomSeed)}},{key:"adaptAllOptionsForHierarchicalLayout",value:function(t){if(!0===this.options.hierarchical.enabled){var e=this.optionsBackup.physics;void 0===t.physics||!0===t.physics?(t.physics={enabled:void 0===e.enabled||e.enabled,solver:"hierarchicalRepulsion"},e.enabled=void 0===e.enabled||e.enabled,e.solver=e.solver||"barnesHut"):"object"===Qc(t.physics)?(e.enabled=void 0===t.physics.enabled||t.physics.enabled,e.solver=t.physics.solver||"barnesHut",t.physics.solver="hierarchicalRepulsion"):!1!==t.physics&&(e.solver="barnesHut",t.physics={solver:"hierarchicalRepulsion"});var n=this.direction.curveType();if(void 0===t.edges)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},t.edges={smooth:!1};else if(void 0===t.edges.smooth)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},t.edges.smooth=!1;else if("boolean"==typeof t.edges.smooth)this.optionsBackup.edges={smooth:t.edges.smooth},t.edges.smooth={enabled:t.edges.smooth,type:n};else{var r=t.edges.smooth;void 0!==r.type&&"dynamic"!==r.type&&(n=r.type),this.optionsBackup.edges={smooth:{enabled:void 0===r.enabled||r.enabled,type:void 0===r.type?"dynamic":r.type,roundness:void 0===r.roundness?.5:r.roundness,forceDirection:void 0!==r.forceDirection&&r.forceDirection}},t.edges.smooth={enabled:void 0===r.enabled||r.enabled,type:n,roundness:void 0===r.roundness?.5:r.roundness,forceDirection:void 0!==r.forceDirection&&r.forceDirection}}this.body.emitter.emit("_forceDisableDynamicCurves",n)}return t}},{key:"positionInitially",value:function(t){if(!0!==this.options.hierarchical.enabled){this._resetRNG(this.initialRandomSeed);for(var e=t.length+50,n=0;ni){for(var g=t.length;t.length>i&&r<=10;){r+=1;var s=t.length;if(r%3==0?this.body.modules.clustering.clusterBridges(o):this.body.modules.clustering.clusterOutliers(o),s==t.length&&r%3!=0)return this._declusterAll(),this.body.emitter.emit("_layoutFailed"),void console.info("This network could not be positioned by this version of the improved layout algorithm. Please disable improvedLayout for better performance.")}this.body.modules.kamadaKawai.setOptions({springLength:Math.max(150,2*g)})}r>10&&console.info("The clustering didn't succeed within the amount of interations allowed, progressing with partial result."),this.body.modules.kamadaKawai.solve(t,this.body.edgeIndices,!0),this._shiftToCenter();for(var A=0;A0){var t,e,n=!1,r=!1;for(e in this.lastNodeOnLevel={},this.hierarchical=new _j,this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,e)&&(void 0!==(t=this.body.nodes[e]).options.level?(n=!0,this.hierarchical.levels[e]=t.options.level):r=!0);if(!0===r&&!0===n)throw new Error("To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.");if(!0===r){var i=this.options.hierarchical.sortMethod;"hubsize"===i?this._determineLevelsByHubsize():"directed"===i?this._determineLevelsDirected():"custom"===i&&this._determineLevelsCustomCallback()}for(var o in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,o)&&this.hierarchical.ensureLevel(o);var g=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(g),this._condenseHierarchy(),this._shiftToCenter()}}},{key:"_condenseHierarchy",value:function(){var t=this,e=!1,n={},r=function(e,n){var r=t.hierarchical.trees;for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&r[i]===e&&t.direction.shift(i,n)},i=function e(n,r){if(!r[n.id]&&(r[n.id]=!0,t.hierarchical.childrenReference[n.id])){var i=t.hierarchical.childrenReference[n.id];if(i.length>0)for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:1e9,r=1e9,i=1e9,o=1e9,g=-1e9;for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){var A=t.body.nodes[s],C=t.hierarchical.levels[A.id],I=t.direction.getPosition(A),a=Wl(t._getSpaceAroundNode(A,e),2),u=a[0],c=a[1];r=Math.min(u,r),i=Math.min(c,i),C<=n&&(o=Math.min(I,o),g=Math.max(I,g))}return[o,g,r,i]},g=function(e,n,r){for(var i=t.hierarchical,o=0;o1)for(var A=0;A2&&void 0!==arguments[2]&&arguments[2],s=t.direction.getPosition(n),A=t.direction.getPosition(r),C=Math.abs(A-s),I=t.options.hierarchical.nodeSpacing;if(C>I){var a={},u={};i(n,a),i(r,u);var c=function(e,n){var r=t.hierarchical.getMaxLevel(e.id),i=t.hierarchical.getMaxLevel(n.id);return Math.min(r,i)}(n,r),l=o(a,c),h=o(u,c),d=l[1],f=h[0],p=h[2];if(Math.abs(d-f)>I){var v=d-f+I;v<-p+I&&(v=-p+I),v<0&&(t._shiftBlock(r.id,v),e=!0,!0===g&&t._centerParent(r))}}},A=function(r,g){for(var s=g.id,A=g.edges,C=t.hierarchical.levels[g.id],I=t.options.hierarchical.levelSeparation*t.options.hierarchical.levelSeparation,a={},u=[],c=0;c0?c=Math.min(u,a-t.options.hierarchical.nodeSpacing):u<0&&(c=-Math.min(-u,I-t.options.hierarchical.nodeSpacing)),0!=c&&(t._shiftBlock(g.id,c),e=!0)}(v),function(n){var r=t.direction.getPosition(g),i=Wl(t._getSpaceAroundNode(g),2),o=i[0],s=i[1],A=n-r,C=r;A>0?C=Math.min(r+(s-t.options.hierarchical.nodeSpacing),n):A<0&&(C=Math.max(r-(o-t.options.hierarchical.nodeSpacing),n)),C!==r&&(t.direction.setPosition(g,C),e=!0)}(v=p(r,A))};!0===this.options.hierarchical.blockShifting&&(function(n){var r=t.hierarchical.getLevels();r=od(r).call(r);for(var i=0;i<5&&(e=!1,g(s,r,!0),!0===e);i++);}(),function(){for(var e in t.body.nodes)Object.prototype.hasOwnProperty.call(t.body.nodes,e)&&t._centerParent(t.body.nodes[e])}()),!0===this.options.hierarchical.edgeMinimization&&function(n){var r=t.hierarchical.getLevels();r=od(r).call(r);for(var i=0;i<20;i++){e=!1;for(var o=0;o0&&Math.abs(a)0&&(A=this.direction.getPosition(r[o-1])+s),this.direction.setPosition(g,A,e),this._validatePositionAndContinue(g,e,A),i++}}}}},{key:"_placeBranchNodes",value:function(t,e){var n,r=this.hierarchical.childrenReference[t];if(void 0!==r){for(var i=[],o=0;oe&&void 0===this.positionedNodes[s.id]))return;var C,I=this.options.hierarchical.nodeSpacing;C=0===g?this.direction.getPosition(this.body.nodes[t]):this.direction.getPosition(i[g-1])+I,this.direction.setPosition(s,C,A),this._validatePositionAndContinue(s,A,C)}var a=this._getCenterPosition(i);this.direction.setPosition(this.body.nodes[t],a,e)}}},{key:"_validatePositionAndContinue",value:function(t,e,n){if(this.hierarchical.isTree){if(void 0!==this.lastNodeOnLevel[e]){var r=this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[e]]);if(n-rt}),"from",t)}(n),this.hierarchical.setMinLevelToZero(this.body.nodes)}},{key:"_generateMap",value:function(){var t=this;this._crawlNetwork((function(e,n){t.hierarchical.levels[n.id]>t.hierarchical.levels[e.id]&&t.hierarchical.addRelation(e.id,n.id)})),this.hierarchical.checkIfTree()}},{key:"_crawlNetwork",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},n=arguments.length>1?arguments[1]:void 0,r={},i=function n(i,o){if(void 0===r[i.id]){var g;t.hierarchical.setTreeIndex(i,o),r[i.id]=!0;for(var s=t._getActiveEdges(i),A=0;At.length)&&(e=t.length);for(var n=0,r=new Array(e);n{let[n,r]=e;return t[n]=rB(r),t}),{})}function oB(t){return"labels"in t?new M.ZP.types.Node(tB(t.identity),t.labels,iB(t.properties)):"type"in t?new M.ZP.types.Relationship(tB(t.identity),tB(t.start),tB(t.end),t.type,iB(t.properties)):"segments"in t?new M.ZP.types.Path(new M.ZP.types.Node(tB(t.start.identity),t.start.labels,iB(t.start.properties)),new M.ZP.types.Node(tB(t.end.identity),t.end.labels,iB(t.end.properties)),d()(e=t.segments).call(e,(t=>new M.ZP.types.PathSegment(new M.ZP.types.Node(tB(t.start.identity),t.start.labels,iB(t.start.properties)),new M.ZP.types.Relationship(tB(t.relationship.identity),tB(t.relationship.start),tB(t.relationship.end),t.relationship.type,iB(t.relationship.properties)),new M.ZP.types.Node(tB(t.end.identity),t.end.labels,iB(t.end.properties)))))):void 0;var e}function gB(t,e){if(l()(e)&&e.length>1){let n=`${t}:
    `;for(const t of e)n+=`
  • ${t}
  • `;return n+"
"}return`${t}: ${e}
`}function sB(t,e){if("object"==typeof e?.properties)return(0,j.isInt)(e.properties[t])?eB(e.properties[t]):e.properties[t];throw new Error("Neo4j object is not properly constructed")}function AB(t,e){let n="";e||(e=u()(t.properties));for(const r of e){const e=sB(r,t);e&&(n+=gB(r,e))}const r=document.createElement("div");return r.innerHTML=n,r}function CB(t,e){let n="";e||(e=u()(t.properties));for(const r of e){const e=sB(r,t);e&&(n+=`${r}: ${e}\n`)}return n}var IB=new(E()),aB=new(E()),uB=new(E()),cB=new(E()),lB=new(E()),hB=new(E()),dB=new(E()),fB=new(E()),pB=new(E()),vB=new(k()),yB=new(k()),bB=new(k()),mB=new(k()),wB=new(k()),_B=new(k()),xB=new(k()),EB=new(k()),OB=new(k()),kB=new(k()),TB=new(k()),SB=new(k()),PB=new(k()),NB=new(k()),RB=new(k());class DB{get nodes(){return I(this,IB).nodes}get dataInfo(){return I(this,aB)}get edges(){return I(this,IB).edges}get _config(){return I(this,lB)}get network(){return I(this,uB)}constructor(t){Xj(this,RB),Xj(this,NB),Xj(this,PB),Xj(this,SB),Xj(this,TB),Xj(this,kB),Xj(this,OB),Xj(this,EB),Xj(this,xB),Xj(this,_B),Xj(this,wB),Xj(this,mB),Xj(this,bB),Xj(this,yB),Xj(this,vB),qj(this,IB,{writable:!0,value:{nodes:new hN,edges:new hN}}),qj(this,aB,{writable:!0,value:new Array}),qj(this,uB,{writable:!0,value:null}),qj(this,cB,{writable:!0,value:new Vj}),qj(this,lB,{writable:!0,value:void 0}),qj(this,hB,{writable:!0,value:void 0}),qj(this,dB,{writable:!0,value:void 0}),qj(this,fB,{writable:!0,value:void 0}),qj(this,pB,{writable:!0,value:void 0}),$j(this,yB,jB).call(this,t),$j(this,vB,MB).call(this,t),$j(this,vB,MB).call(this,Zj)}render(t,e){I(this,lB).dataFunction||"function"==typeof t?$j(this,SB,YB).call(this,"function"==typeof t?t:I(this,lB).dataFunction,e):$j(this,PB,HB).call(this,t,e)}clearNetwork(){I(this,IB).nodes.clear(),I(this,IB).edges.clear()}registerOnEvent(t,e){I(this,cB).register(t,e)}reinit(t,e){$j(this,yB,jB).call(this,t),this.render(void 0,e)}reload(t){this.clearNetwork(),this.render(void 0,t)}stabilize(){I(this,uB).stopSimulation(),$j(this,vB,MB).call(this,"Calling stopSimulation")}renderWithCypher(t,e){this.clearNetwork(),C(this,fB,t),this.render(void 0,e)}renderWithFunction(t,e){this.clearNetwork(),this.render(t,e)}updateWithCypher(t,e){this.render(t,e)}updateWithFunction(t,e){this.render(t,e)}}function MB(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"log";("log"!==e||I(this,lB).consoleDebug)&&console[e](t)}function jB(t){let e,n;if(t.nonFlat&&t.defaultLabelConfig){if(e=t.defaultLabelConfig,e[Qj])throw new Error("non flat config can't use NEOVIS_ADVANCED_CONFIG, read the doc to see how the config should look");if(n=t.defaultRelationshipsConfig,n[Qj])throw new Error("non flat config can't use NEOVIS_ADVANCED_CONFIG, read the doc to see how the config should look")}else e=t.labels?.[Kj],n=t.relationships?.[Kj];if(e)for(const n of u()(t.labels))t=t.nonFlat?{...t,labels:{...t.labels,[n]:Wj()(e,t.labels?.[n])}}:{...t,labels:{...t.labels,[n]:{...Wj()(e,t.labels?.[n]),[Qj]:Wj()(e[Qj]??{},(t.labels?.[n])[Qj]??{})}}};if(n)for(const e of u()(t.relationships))t=t.nonFlat?{...t,relationships:{...t.relationships,[e]:Wj()(n,t.relationships?.[e])}}:{...t,relationships:{...t.relationships,[e]:{...Wj()(n,t.relationships?.[e]),[Qj]:Wj()(n[Qj]??{},(t.relationships?.[e])[Qj]??{})}}};C(this,lB,t),t.dataFunction||(C(this,hB,t.neo4j instanceof M.ZP.driver?t.neo4j:M.ZP.driver(t.neo4j?.serverUrl??Zj.neo4j.neo4jUri,M.ZP.auth.basic(t.neo4j?.serverUser??Zj.neo4j.neo4jUser,t.neo4j?.serverPassword??Zj.neo4j.neo4jPassword),Wj()(Zj.neo4j.driverConfig,t.neo4j?.driverConfig??{}))),C(this,dB,t.serverDatabase),C(this,fB,t.initialCypher??Zj.neo4j.initialQuery)),C(this,pB,document.getElementById(t.containerId)),I(this,lB).groupAsLabel=t.groupAsLabel??Zj.neo4j.groupAsLabel}async function BB(t,e){const n=I(this,hB).session(I(this,dB)&&{database:I(this,dB)}),r=[];try{const i=await n.readTransaction((n=>n.run(t,{id:e})));for(const t of i.records)S()(t).call(t,(t=>{r.push(t)}))}finally{await n.close()}if(0!==r.length)return 1===r.length?r.pop():r}function LB(t,e){if("function"==typeof t)return t(e);throw new Error("Function type property field must be a function")}function FB(t,e){if(t&&"object"==typeof t)for(const n of u()(t)){const r=t[n];r&&"object"==typeof r?(e[n]||(e[n]={}),$j(this,wB,FB).call(this,r,e[n])):e[n]=r}}function zB(t,e,n){if(t&&"object"==typeof t)for(const r of u()(t)){const i=t[r];if("object"==typeof i)e[r]||(e[r]={}),$j(this,_B,zB).call(this,i,e[r],n);else{const i=t[r];e[r]=sB(i,n)}}}function*ZB(t,e,n){if(t&&"object"==typeof t)for(const r of u()(t)){const i=t[r];if(i&&"object"==typeof i)e[r]||(e[r]={}),yield*$j(this,xB,ZB).call(this,i,e[r],n);else{const t=$j(this,bB,BB).call(this,i,n);yield N().resolve(t).then((t=>{e[r]=t}))}}}function*UB(t,e,n){if(t&&"object"==typeof t)for(const r of u()(t)){const i=t[r];if(i&&"object"==typeof i)e[r]||(e[r]={}),yield*$j(this,EB,UB).call(this,i,e[r],n);else{const t=$j(this,mB,LB).call(this,i,n);yield N().resolve(t).then((t=>{e[r]=t}))}}}async function VB(t,e,n,r){if(!t)return;let i,o,g,s;if(I(this,lB).nonFlat){if(void 0!==t[Qj])throw new Error("Advanced config and non flat config should not be together");i=t.static,o=t.cypher,g=t.property,s=t.function}else{const e=t[Qj];if(g=t,void 0!==e&&"object"!=typeof e)throw new Error("Advanced config should be an object. See documentation for details.");o=e?.cypher,i=e?.static,s=e?.function}$j(this,_B,zB).call(this,g,e,n),$j(this,wB,FB).call(this,i,e),await N().all($j(this,xB,ZB).call(this,o,e,r)),await N().all($j(this,EB,UB).call(this,s,e,n))}async function GB(t){const e={},n=t.labels[0],r=I(this,lB)?.labels?.[n]??I(this,lB)?.defaultLabelConfig??I(this,lB)?.labels?.[Kj];return e.id=(0,j.isInt)(t.identity)?eB(t.identity):t.identity,e.raw=t,I(this,lB).groupAsLabel&&(e.group=n),await $j(this,OB,VB).call(this,r,e,t,t.identity),e}async function WB(t){const e=I(this,lB)?.relationships?.[t.type]??I(this,lB).defaultRelationshipsConfig??I(this,lB)?.relationships?.[Kj],n={};return n.id=(0,j.isInt)(t.identity)?eB(t.identity):t.identity,n.from=(0,j.isInt)(t.start)?eB(t.start):t.start,n.to=(0,j.isInt)(t.end)?eB(t.end):t.end,n.raw=t,await $j(this,OB,VB).call(this,e,n,t,t.identity),n}async function YB(t,e){let n=0;try{const r=[];for await(const i of await t(e))r.push($j(this,NB,KB).call(this,i)),n++;await N().all(r)}catch(t){return void I(this,cB).generateEvent(Uj.ErrorEvent,{error:t})}$j(this,RB,QB).call(this),I(this,cB).generateEvent(Uj.CompletionEvent,{recordCount:n})}function HB(t,e){let n=0;const r=t||I(this,fB),i=I(this,hB).session(I(this,dB)?{database:I(this,dB)}:void 0),o=[];i.run(r,e).subscribe({onNext:t=>{n++,o.push($j(this,NB,KB).call(this,t))},onCompleted:async()=>{await N().all(o),await i.close(),$j(this,RB,QB).call(this),I(this,cB).generateEvent(Uj.CompletionEvent,{recordCount:n})},onError:t=>{$j(this,vB,MB).call(this,t,"error"),I(this,cB).generateEvent(Uj.ErrorEvent,{error:t})}})}async function KB(t){if(!(t instanceof M.ZP.types.Record)){const e=t._fields;t=new M.ZP.types.Record(p()(t),d()(e).call(e,oB),t._fieldLookup)}$j(this,vB,MB).call(this,"CLASS NAME"),$j(this,vB,MB).call(this,t?.constructor.name),$j(this,vB,MB).call(this,t);const e=I(this,aB).length;I(this,aB).push(t);const n=d()(t).call(t,(async t=>{if($j(this,vB,MB).call(this,"Constructor:"),$j(this,vB,MB).call(this,t?.constructor.name),(0,j.isNode)(t)){let n=await $j(this,kB,GB).call(this,t);n.index=e;try{I(this,IB).nodes.update(n)}catch(t){$j(this,vB,MB).call(this,t,"error")}}else if((0,j.isRelationship)(t)){let n=await $j(this,TB,WB).call(this,t);n.id=I(this,IB).edges.length,n.index=e,I(this,IB).edges.update(n)}else if((0,j.isPath)(t)){$j(this,vB,MB).call(this,"PATH"),$j(this,vB,MB).call(this,t);let n=await $j(this,kB,GB).call(this,t.start),r=await $j(this,kB,GB).call(this,t.end);n.index=e,r.index=e,I(this,IB).nodes.update(n),I(this,IB).nodes.update(r);for(const e of t.segments)I(this,IB).nodes.update(await $j(this,kB,GB).call(this,e.start)),I(this,IB).nodes.update(await $j(this,kB,GB).call(this,e.end)),I(this,IB).edges.update(await $j(this,TB,WB).call(this,e.relationship))}else if(l()(t))for(const n of t)if($j(this,vB,MB).call(this,"Array element constructor:"),$j(this,vB,MB).call(this,n?.constructor.name),(0,j.isNode)(n)){let t=await $j(this,kB,GB).call(this,n);t.index=e,I(this,IB).nodes.update(t)}else if((0,j.isRelationship)(n)){const t=await $j(this,TB,WB).call(this,n);t.index=e,I(this,IB).edges.update(t)}}));return N().all(n)}function QB(){if(!I(this,uB)){const t=Wj()(Zj.visJs,I(this,lB).visConfig??{}),e=I(this,pB);$j(this,vB,MB).call(this,I(this,IB).nodes),$j(this,vB,MB).call(this,I(this,IB).edges),C(this,uB,new zj(e,I(this,IB),t))}$j(this,vB,MB).call(this,"completed"),D()((()=>{I(this,uB).stopSimulation()}),1e4);const t=this;I(this,uB).on("click",(function(e){if(e.nodes.length>0){const n=this.getNodeAt(e.pointer.DOM);I(t,cB).generateEvent(Uj.ClickNodeEvent,{nodeId:n,node:I(t,IB).nodes.get(n)})}else if(e.edges.length>0){const n=this.getEdgeAt(e.pointer.DOM);I(t,cB).generateEvent(Uj.ClickEdgeEvent,{edgeId:n,edge:I(t,IB).edges.get(n)})}}))}function XB(t){var e,n,r,i;return{containerId:t.container_id,initialCypher:t.initial_cypher,consoleDebug:t.console_debug,serverDatabase:t.server_database,neo4j:{serverUrl:t.server_url,serverUser:t.server_user,serverPassword:t.server_password,driverConfig:t.encrypted||t.trust?{encrypted:t.encrypted,trust:t.trust}:void 0},visConfig:t.arrows||t.hierarchical?{edges:t.arrows?{arrows:{to:{enabled:t.arrows}}}:void 0,layout:t.hierarchical?{enabled:t.hierarchical,sortMethod:t.hierarchical_sort_method}:void 0}:void 0,labels:t.labels?y()(e=_()(n=m()(t.labels)).call(n,t.labels?.[Kj]?[[Kj,t.labels[Kj]]]:[])).call(e,((t,e)=>{let[n,r]=e;return t[n]={label:"function"!=typeof r.caption?r.caption:void 0,value:r.size,group:r.community,[Qj]:{cypher:r.sizeCypher?{value:r.sizeCypher}:void 0,function:Wj()({title:t=>AB(t,r.title_properties)},"function"==typeof r.caption?{label:r.caption}:{}),static:{font:r.font,shape:r.image?"image":"dot",image:r.image}}},t}),{}):void 0,relationships:t.relationships?y()(r=_()(i=m()(t.relationships)).call(i,t.relationships[Kj]?[[Kj,t.relationships[Kj]]]:[])).call(r,((t,e)=>{let[n,r]=e;return t[n]={value:r.thickness,label:"string"==typeof r.caption?r.caption:void 0,[Qj]:{function:{title:AB}}},t}),{}):void 0}}s(DB,"NEOVIS_DEFAULT_CONFIG",Kj),s(DB,"NEOVIS_ADVANCED_CONFIG",Qj),s(DB,"objectToTitleHtml",AB),s(DB,"objectToTitleString",CB);const qB=DB})(),r})())); +//# sourceMappingURL=main.map585f932e1c46626eff2a diff --git a/src/neovis.ts b/src/neovis.ts index d52c95f..6631eba 100644 --- a/src/neovis.ts +++ b/src/neovis.ts @@ -624,11 +624,15 @@ export class NeoVis { this.#consoleLog(record?.constructor.name); this.#consoleLog(record); + const dataInfoLength = this.#dataInfo.length; + this.#dataInfo.push(record); + const dataPromises = record.map(async (v: object) => { this.#consoleLog('Constructor:'); this.#consoleLog(v?.constructor.name); if (isNode(v)) { - const node = await this.#buildNodeVisObject(v); + let node = await this.#buildNodeVisObject(v); + node['index'] = dataInfoLength; try { this.#data.nodes.update(node); } catch (e) { @@ -636,14 +640,19 @@ export class NeoVis { } } else if (isRelationship(v)) { - const edge = await this.#buildEdgeVisObject(v); + let edge = await this.#buildEdgeVisObject(v); + edge.id = this.#data.edges.length; + edge['index'] = dataInfoLength; this.#data.edges.update(edge); } else if (isPath(v)) { this.#consoleLog('PATH'); this.#consoleLog(v); - const startNode = await this.#buildNodeVisObject(v.start); - const endNode = await this.#buildNodeVisObject(v.end); + let startNode = await this.#buildNodeVisObject(v.start); + let endNode = await this.#buildNodeVisObject(v.end); + + startNode['index'] = dataInfoLength; + endNode['index'] = dataInfoLength; this.#data.nodes.update(startNode); this.#data.nodes.update(endNode); @@ -659,12 +668,13 @@ export class NeoVis { this.#consoleLog('Array element constructor:'); this.#consoleLog(obj?.constructor.name); if (isNode(obj)) { - const node = await this.#buildNodeVisObject(obj); + let node = await this.#buildNodeVisObject(obj); + node['index'] = dataInfoLength; this.#data.nodes.update(node); } else if (isRelationship(obj)) { const edge = await this.#buildEdgeVisObject(obj); - + edge['index'] = dataInfoLength; this.#data.edges.update(edge); } } From d2d181f597490a36e054c3967dbd23529363de0b Mon Sep 17 00:00:00 2001 From: darylfung96 Date: Thu, 10 Oct 2024 08:58:46 -0500 Subject: [PATCH 2/2] Update neovis.ts --- src/neovis.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/neovis.ts b/src/neovis.ts index 6631eba..ae24072 100644 --- a/src/neovis.ts +++ b/src/neovis.ts @@ -237,6 +237,7 @@ export class NeoVis { nodes: new vis.DataSet(), edges: new vis.DataSet() }; + #dataInfo: (Neo4jTypes.Record | Partial)[] = []; #network: VisNetwork.Network = null; #events = new EventController(); #config: NeovisConfig | NonFlatNeovisConfig;