Skip to content

A modern platform for visual, flexible, and extensible graph-based investigations. For cybersecurity analysts and investigators.

feat: cryptoscape

dextmorgn18e0e7e533d8
diff --git a/.env.example b/.env.example
index 20fbf4d4..75c60c11 100644
--- a/.env.example
+++ b/.env.example
@@ -120,4 +120,9 @@ DOCKER_SOCKET_LOCATION=/var/run/docker.sock
# Google Cloud Project details
GOOGLE_PROJECT_ID=GOOGLE_PROJECT_ID
-GOOGLE_PROJECT_NUMBER=GOOGLE_PROJECT_NUMBER
\ No newline at end of file
+GOOGLE_PROJECT_NUMBER=GOOGLE_PROJECT_NUMBER
+
+NEO4J_URI_BOLT=bolt://neo4j:7687
+NEO4J_URI_WEB=https://neo4j.flowsint.localhost
+NEO4J_USER=neo4j
+NEO4J_PASSWORD=password
\ No newline at end of file
diff --git a/docker-compose.override.yml b/docker-compose.override.yml
index f9852fc5..a81e669f 100644
--- a/docker-compose.override.yml
+++ b/docker-compose.override.yml
@@ -43,7 +43,7 @@ services:
- "traefik.http.services.nextjs.loadbalancer.server.port=3000"
- "traefik.http.routers.nextjs.entrypoints=websecure"
- # Flask-like application with Celery
+ # FastAPI application with Celery
api:
build:
context: flowsint-api
@@ -53,9 +53,9 @@ services:
- "5000:5000"
depends_on:
- redis
- environment:
- - REDIS_URL=redis://redis:6379/0
- - ENV=prod
+ - neo4j
+ env_file:
+ - .env
command: ["/app/entrypoint.sh", "app"]
restart: always
networks:
@@ -74,9 +74,9 @@ services:
depends_on:
- redis
- api
- environment:
- - REDIS_URL=redis://redis:6379/0
- - ENV=prod
+ - neo4j
+ env_file:
+ - .env
command: ["/app/entrypoint.sh", "celery"]
restart: always
networks:
@@ -90,10 +90,41 @@ services:
networks:
- traefik
+ neo4j:
+ image: neo4j:5
+ container_name: flowsint-neo4j
+ ports:
+ - "7474:7474" # Web UI
+ - "7687:7687" # Bolt
+ environment:
+ - NEO4J_AUTH=${NEO4J_USER}/${NEO4J_PASSWORD}
+ - NEO4J_PLUGINS=["apoc"]
+ - NEO4J_apoc_export_file_enabled=true
+ - NEO4J_apoc_import_file_enabled=true
+ - NEO4J_apoc_import_file_use__neo4j__config=true
+ volumes:
+ - neo4j_data:/data
+ - neo4j_logs:/logs
+ - neo4j_import:/var/lib/neo4j/import
+ - neo4j_plugins:/plugins
+ restart: unless-stopped
+ networks:
+ - traefik
+ labels:
+ - "traefik.enable=true"
+ - "traefik.http.routers.neo4j.rule=Host(`neo4j.flowsint.localhost`)"
+ - "traefik.http.services.neo4j.loadbalancer.server.port=7474"
+ - "traefik.http.routers.neo4j.entrypoints=websecure"
+
+
networks:
traefik:
name: traefik
driver: bridge
volumes:
- db-config:
\ No newline at end of file
+ db-config:
+ neo4j_data:
+ neo4j_logs:
+ neo4j_import:
+ neo4j_plugins:
diff --git a/flowsint-api/app/main.py b/flowsint-api/app/main.py
index 01007977..43183c83 100644
--- a/flowsint-api/app/main.py
+++ b/flowsint-api/app/main.py
@@ -1,18 +1,34 @@
+import json
from uuid import UUID
from fastapi import FastAPI, HTTPException, Depends
from pydantic import BaseModel
from app.core.db import get_db
from app.scanners.registry import ScannerRegistry
from app.core.auth import get_current_user
-from app.utils import extract_input_schema
+from app.utils import extract_input_schema, neo4j_to_cytoscape
from app.core.celery import celery_app
-# Import types
from app.types.domain import MinimalDomain
from app.types.ip import MinimalIp
from typing import List
-from app.scanners.orchestrator import TransformOrchestrator
+from app.neo4j.connector import Neo4jConnection
+from fastapi import Query
+import os
+from dotenv import load_dotenv
+from faker import Faker
+import random
+from uuid import uuid4
+from typing import List, Dict
+from decimal import Decimal
+from app.populate import generate_random_sketch
+load_dotenv()
+
+URI = os.getenv("NEO4J_URI_BOLT")
+USERNAME = os.getenv("NEO4J_USERNAME")
+PASSWORD = os.getenv("NEO4J_PASSWORD")
app = FastAPI()
+neo4j_connection = Neo4jConnection(URI, USERNAME, PASSWORD)
+
@app.get("/scanners")
async def get_scans_list():
@@ -71,10 +87,34 @@ async def launch_transform(
except Exception as e:
print(e)
raise HTTPException(status_code=404, detail="Transform not found")
- return {
- "results": results,
- }
+
+
[email protected]("/sketch/nodes")
+async def get_sketch_nodes(limit: int = Query(10, ge=1), offset: int = Query(0, ge=0)):
+ query = """
+ MATCH (a)-[r]->(b) RETURN a, r, b;
+ """
+ result = neo4j_connection.query(query, parameters={"limit": limit, "offset": offset})
+
+ if not result:
+ raise HTTPException(status_code=404, detail="No nodes found for this sketch")
+
+ return neo4j_to_cytoscape(result)
@app.get("/health")
async def health():
return {"status": "ok"}
+
+
+fake = Faker()
+
+def to_serializable(d):
+ """Convertit les valeurs Decimal en float dans les dictionnaires"""
+ return {
+ k: float(v) if isinstance(v, Decimal) else v
+ for k, v in d.items()
+ }
+
[email protected]("/investigation/generate")
+async def populate():
+ generate_random_sketch()
\ No newline at end of file
diff --git a/flowsint-api/app/neo4j/__init__.py b/flowsint-api/app/neo4j/__init__.py
new file mode 100644
index 00000000..e69de29b
diff --git a/flowsint-api/app/neo4j/connector.py b/flowsint-api/app/neo4j/connector.py
new file mode 100644
index 00000000..a678343a
--- /dev/null
+++ b/flowsint-api/app/neo4j/connector.py
@@ -0,0 +1,13 @@
+from neo4j import GraphDatabase
+
+class Neo4jConnection:
+ def __init__(self, uri: str, user: str, password: str):
+ self.__uri = uri
+ self.__user = user
+ self.__password = password
+ self.__driver = GraphDatabase.driver(self.__uri, auth=(self.__user, self.__password))
+
+ def query(self, query: str, parameters: dict = None):
+ with self.__driver.session() as session:
+ result = session.run(query, parameters)
+ return result.data()
\ No newline at end of file
diff --git a/flowsint-api/app/populate.py b/flowsint-api/app/populate.py
new file mode 100644
index 00000000..46da3d4c
--- /dev/null
+++ b/flowsint-api/app/populate.py
@@ -0,0 +1,194 @@
+from uuid import uuid4
+import random
+from faker import Faker
+from app.neo4j.connector import Neo4jConnection
+import os
+from dotenv import load_dotenv
+load_dotenv()
+
+URI = os.getenv("NEO4J_URI_BOLT")
+USERNAME = os.getenv("NEO4J_USERNAME")
+PASSWORD = os.getenv("NEO4J_PASSWORD")
+fake = Faker()
+neo4j_connection = Neo4jConnection(URI, USERNAME, PASSWORD)
+
+def generate_emails(person_id, count=1):
+ return [
+ {
+ "id": str(uuid4()),
+ "email": fake.email(),
+ "person_id": person_id,
+ "type":"email"
+
+ }
+ for _ in range(count)
+ ]
+
+def generate_phones(person_id, count=1):
+ return [
+ {
+ "id": str(uuid4()),
+ "number": fake.phone_number(),
+ "country": fake.country(),
+ "carrier": random.choice(["Orange", "Free", "SFR", "Bouygues"]),
+ "person_id": person_id,
+ "type":"socials"
+
+ }
+ for _ in range(count)
+ ]
+
+def generate_socials(person_id, count=1):
+ return [
+ {
+ "id": str(uuid4()),
+ "username": fake.user_name(),
+ "platform": random.choice(["Twitter", "LinkedIn", "Instagram"]),
+ "profile_url": f"https://{random.choice(['twitter.com', 'linkedin.com/in', 'instagram.com'])}/{fake.user_name()}",
+ "bio": fake.sentence(),
+ "followers_count": random.randint(0, 10000),
+ "following_count": random.randint(0, 5000),
+ "posts_count": random.randint(0, 1000),
+ "person_id": person_id,
+ "type":"socials"
+ }
+ for _ in range(count)
+ ]
+
+def generate_addresses(person_id, count=1):
+ return [
+ {
+ "id": str(uuid4()),
+ "address": fake.street_address(),
+ "city": fake.city(),
+ "country": fake.country(),
+ "zip": fake.postcode(),
+ "latitude": float(fake.latitude()),
+ "longitude": float(fake.longitude()),
+ "person_id": person_id,
+ "type":"address"
+
+ }
+ for _ in range(count)
+ ]
+
+def generate_websites(person_id, count=1):
+ websites = []
+ for _ in range(count):
+ domain = fake.domain_name()
+ ip = fake.ipv4_public()
+ websites.append({
+ "id": str(uuid4()),
+ "url": f"https://{domain}",
+ "domain": domain,
+ "ip": ip,
+ "person_id": person_id,
+ "type": "website"
+ })
+ return websites
+
+def generate_random_sketch():
+ organizations = []
+ persons = []
+ emails, phones, socials, addresses, websites = [], [], [], [], []
+ org_links = []
+ person_links = []
+
+ # Organizations
+ for _ in range(4):
+ org_id = str(uuid4())
+ organizations.append({
+ "id": org_id,
+ "name": fake.company(),
+ "description": fake.catch_phrase(),
+ "country": fake.country(),
+ "type": "organization"
+ })
+
+ # Individuals
+ for _ in range(10):
+ person_id = str(uuid4())
+ name = fake.name()
+ first_name, last_name = name.split()[0], name.split()[-1]
+
+ persons.append({
+ "id": person_id,
+ "first_name": first_name,
+ "last_name": last_name,
+ "full_name": name,
+ "type": "person"
+ })
+
+ emails.extend(generate_emails(person_id, random.randint(1, 2)))
+ phones.extend(generate_phones(person_id, random.randint(0, 1)))
+ socials.extend(generate_socials(person_id, random.randint(0, 1)))
+ addresses.extend(generate_addresses(person_id, random.randint(0, 1)))
+ websites.extend(generate_websites(person_id, random.randint(0, 1)))
+
+ if random.random() < 0.7:
+ org = random.choice(organizations)
+ org_links.append({
+ "person_id": person_id,
+ "org_id": org["id"]
+ })
+
+ # Person-Person relationships
+ relationship_types = ["KNOWS", "WORKS_WITH", "FRIEND_OF", "COLLEAGUE"]
+ for _ in range(10):
+ src, tgt = random.sample(persons, 2)
+ person_links.append({
+ "source_id": src["id"],
+ "target_id": tgt["id"],
+ "type": random.choice(relationship_types)
+ })
+
+ def create_entities(label: str, props: list[dict], label_fn=None):
+ if not props:
+ return
+
+ if label_fn:
+ for entity in props:
+ entity["__labels__"] = label_fn(entity).split(":") # <- correction ici
+ neo4j_connection.query(f"""
+ UNWIND $entities AS entity
+ CALL apoc.create.node(entity.__labels__, apoc.map.removeKey(entity, '__labels__')) YIELD node
+ RETURN count(node);
+ """, {"entities": props})
+ else:
+ neo4j_connection.query(f"""
+ UNWIND $entities AS entity
+ CREATE (n:{label})
+ SET n = entity;
+ """, {"entities": props})
+
+
+ def create_relationships(from_label, to_label, rel_name, from_key, to_key, data):
+ if data:
+ neo4j_connection.query(f"""
+ UNWIND $rows AS row
+ MATCH (a:{from_label} {{id: row.{from_key}}}), (b:{to_label} {{id: row.{to_key}}})
+ CALL apoc.create.relationship(a, '{rel_name}', {{}}, b) YIELD rel
+ RETURN count(rel);
+ """, {"rows": data})
+
+ create_entities("Organization", organizations, lambda o: f"Organization:{o['name']}")
+ create_entities("Person", persons, lambda p: f"Person:{p['full_name']}")
+ create_entities("Email", emails, lambda e: f"Email:{e['email']}")
+ create_entities("Phone", phones, lambda p: f"Phone:{p['number']}")
+ create_entities("Social", socials, lambda s: f"Social:{s['platform']}:{s['username']}")
+ create_entities("Address", addresses, lambda a: f"Address:{a['city']}")
+ create_entities("Website", websites, lambda w: f"Website:{w['domain']}")
+
+
+ create_relationships("Person", "Email", "HAS_EMAIL", "person_id", "id", emails)
+ create_relationships("Person", "Phone", "HAS_PHONE", "person_id", "id", phones)
+ create_relationships("Person", "Social", "HAS_SOCIAL", "person_id", "id", socials)
+ create_relationships("Person", "Address", "HAS_ADDRESS", "person_id", "id", addresses)
+ create_relationships("Person", "Website", "HAS_WEBSITE", "person_id", "id", websites)
+ create_relationships("Person", "Organization", "MEMBER_OF", "person_id", "org_id", org_links)
+
+ for rel_type in set(r["type"] for r in person_links):
+ rels = [r for r in person_links if r["type"] == rel_type]
+ create_relationships("Person", "Person", rel_type, "source_id", "target_id", rels)
+
+ return {"status": "success", "message": "Sketch created with entities and relationships."}
diff --git a/flowsint-api/app/scanners/ips/geolocation.py b/flowsint-api/app/scanners/ips/geolocation.py
index e114ac34..139a7715 100644
--- a/flowsint-api/app/scanners/ips/geolocation.py
+++ b/flowsint-api/app/scanners/ips/geolocation.py
@@ -46,7 +46,7 @@ class GeolocationScanner(Scanner):
ip_obj = MinimalIp(address=item["address"])
elif isinstance(item, MinimalIp):
ip_obj = item
- if ip_obj and is_valid_ip(ip_obj.address) != "invalid":
+ if ip_obj and is_valid_ip(ip_obj.address):
cleaned.append(ip_obj)
return cleaned
diff --git a/flowsint-api/app/scanners/ips/reverse_resolve.py b/flowsint-api/app/scanners/ips/reverse_resolve.py
index e863d060..2649dd75 100644
--- a/flowsint-api/app/scanners/ips/reverse_resolve.py
+++ b/flowsint-api/app/scanners/ips/reverse_resolve.py
@@ -52,7 +52,7 @@ class ReverseResolveScanner(Scanner):
ip_obj = MinimalIp(address=item["address"])
elif isinstance(item, MinimalIp):
ip_obj = item
- if ip_obj and is_valid_ip(ip_obj.address) != "invalid":
+ if ip_obj and is_valid_ip(ip_obj.address):
cleaned.append(ip_obj)
return cleaned
diff --git a/flowsint-api/app/utils.py b/flowsint-api/app/utils.py
index 225bcc29..f7e3fbc4 100644
--- a/flowsint-api/app/utils.py
+++ b/flowsint-api/app/utils.py
@@ -143,4 +143,46 @@ def extract_transform(transform: Dict[str, Any]) -> Dict[str, Any]:
"scanners": scanners,
"scanner_names" : [scanner["scanner_name"] for scanner in scanners]
- }
\ No newline at end of file
+ }
+
+
+def neo4j_to_cytoscape(results):
+ elements = []
+ nodes = {}
+
+ for record in results:
+ a = record["a"]
+ b = record["b"]
+ r = record["r"]
+
+ a_id = a.get("id") or a.get("name")
+ b_id = b.get("id") or b.get("name")
+
+ if a_id and a_id not in nodes:
+ nodes[a_id] = {
+ "data": {
+ "id": a_id,
+ "label": a.get("name") or a.get("username") or a_id,
+ "type": a.get("type") # <-- ajoute le type
+ }
+ }
+
+ if b_id and b_id not in nodes:
+ nodes[b_id] = {
+ "data": {
+ "id": b_id,
+ "label": b.get("name") or b.get("username") or b_id,
+ "type": b.get("type") # <-- ajoute le type
+ }
+ }
+
+ if a_id and b_id:
+ elements.append({
+ "data": {
+ "source": a_id,
+ "target": b_id,
+ "label": r[1]
+ }
+ })
+
+ return list(nodes.values()) + elements
diff --git a/flowsint-api/requirements.txt b/flowsint-api/requirements.txt
index d7c6a537..9f8b74a0 100644
--- a/flowsint-api/requirements.txt
+++ b/flowsint-api/requirements.txt
@@ -17,4 +17,5 @@ ghunt
ignorant
hibpwned
phonenumbers
-pydantic[email]
\ No newline at end of file
+pydantic[email]
+neo4j
\ No newline at end of file
diff --git a/flowsint-api/tests/scanners/ip.py b/flowsint-api/tests/scanners/ip.py
index f8b0f56c..3836527e 100644
--- a/flowsint-api/tests/scanners/ip.py
+++ b/flowsint-api/tests/scanners/ip.py
@@ -77,9 +77,9 @@ def test_schemas():
assert input_schema == [{'name': 'address', 'type': 'string'}]
assert output_schema == [
{'name': 'address', 'type': 'string'},
- {'name': 'latitude', 'type': 'number'},
- {'name': 'longitude', 'type': 'number'},
- {'name': 'country', 'type': 'string'},
- {'name': 'city', 'type': 'string'},
- {'name': 'isp', 'type': 'string'},
+ {'name': 'latitude', 'type': 'number | null'},
+ {'name': 'longitude', 'type': 'number | null'},
+ {'name': 'country', 'type': 'string | null'},
+ {'name': 'city', 'type': 'string | null'},
+ {'name': 'isp', 'type': 'string | null'},
]
diff --git a/flowsint-web/package.json b/flowsint-web/package.json
index db8c8ab9..20f1678a 100644
--- a/flowsint-web/package.json
+++ b/flowsint-web/package.json
@@ -3,7 +3,7 @@
"version": "0.0.1",
"private": true,
"scripts": {
- "dev": "next dev --turbopack",
+ "dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "eslint . --ext .ts,.tsx -c .eslintrc.json --fix"
@@ -65,12 +65,23 @@
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cmdk": "1.0.0",
+ "cytoscape": "^3.31.2",
+ "cytoscape-canvas": "^3.0.1",
+ "cytoscape-context-menus": "^4.2.1",
+ "cytoscape-css-variables": "^0.1.4",
+ "cytoscape-cxtmenu": "^3.5.0",
+ "cytoscape-elk": "^2.3.0",
+ "cytoscape-fcose": "^2.2.0",
+ "cytoscape-navigator": "^2.0.2",
"d3": "^7.9.0",
"d3-force": "^3.0.0",
"d3-quadtree": "^3.0.1",
"date-fns": "^4.1.0",
"embla-carousel-react": "^8.5.2",
"framer-motion": "^12.3.1",
+ "graphology": "^0.26.0",
+ "graphology-layout-forceatlas2": "^0.10.1",
+ "graphology-types": "^0.24.8",
"input-otp": "^1.4.2",
"intl-messageformat": "^10.5.0",
"lodash.debounce": "^4.0.8",
@@ -130,4 +141,4 @@
"@tailwindcss/oxide-linux-x64-gnu": "^4.0.1",
"lightningcss-linux-x64-gnu": "^1.29.1"
}
-}
\ No newline at end of file
+}
diff --git a/flowsint-web/public/company.svg b/flowsint-web/public/company.svg
new file mode 100644
index 00000000..442831bd
--- /dev/null
+++ b/flowsint-web/public/company.svg
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ viewBox="0 0 80 80"
+ version="1.1"
+ id="svg6"
+ sodipodi:docname="company.svg"
+ width="80px"
+ height="80px"
+ fill="white"
+ opacity="0.8"
+ stroke-width="0"
+ inkscape:version="0.92.3 (2405546, 2018-03-11)">
+ <metadata
+ id="metadata12">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs10" />
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="2560"
+ inkscape:window-height="1398"
+ id="namedview8"
+ showgrid="false"
+ inkscape:zoom="4.9166667"
+ inkscape:cx="38.816032"
+ inkscape:cy="9.2262675"
+ inkscape:window-x="3840"
+ inkscape:window-y="20"
+ inkscape:window-maximized="0"
+ inkscape:current-layer="svg6" />
+ <path
+ inkscape:connector-curvature="0"
+ d="M 67,16 H 13 a 3,3 0 0 0 -3,3 v 42 a 3,3 0 0 0 3,3 h 54 a 3,3 0 0 0 3,-3 V 19 a 3,3 0 0 0 -3,-3 z m -3,33 a 9,9 0 0 0 -9,9 H 25 A 9,9 0 0 0 16,49 V 31 a 9,9 0 0 0 9,-9 h 30 a 9,9 0 0 0 9,9 z"
+ id="path2"
+ style="stroke-width:0" />
+ <path
+ inkscape:connector-curvature="0"
+ d="m 40,28 c -6.618,0 -12,5.382 -12,12 0,6.618 5.382,12 12,12 6.618,0 12,-5.382 12,-12 0,-6.618 -5.382,-12 -12,-12 z m 0,18 c -3.309,0 -6,-2.691 -6,-6 0,-3.309 2.691,-6 6,-6 3.309,0 6,2.691 6,6 0,3.309 -2.691,6 -6,6 z"
+ id="path4"
+ style="stroke-width:0" />
+</svg>
diff --git a/flowsint-web/public/person.svg b/flowsint-web/public/person.svg
new file mode 100644
index 00000000..2e5ccf15
--- /dev/null
+++ b/flowsint-web/public/person.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-user-icon lucide-user"><path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>
\ No newline at end of file
diff --git a/flowsint-web/src/app/api/transforms/route.ts b/flowsint-web/src/app/api/transforms/route.ts
new file mode 100644
index 00000000..4389b787
--- /dev/null
+++ b/flowsint-web/src/app/api/transforms/route.ts
@@ -0,0 +1,32 @@
+import { createClient } from "@/lib/supabase/server"
+import { NextRequest, NextResponse } from "next/server"
+
+export async function GET(request: NextRequest) {
+ try {
+ const supabase = await createClient()
+ let type = request.nextUrl.searchParams.get("type")
+ const {
+ data: { user },
+ error: userError,
+ } = await supabase.auth.getUser();
+ if (!user || userError) {
+ return NextResponse.json({ error: "Unauthorized" }, { status: 401 })
+ }
+ if (!type) {
+ return NextResponse.json({ error: "Missing param 'type'" }, { status: 400 })
+ }
+ const { data: transforms, error } = await supabase.from("transforms")
+ .select("id, name, description, category, created_at, last_updated_at")
+ .order("last_updated_at", { ascending: false })
+ .eq("category", type)
+ if (error) {
+ console.log(error)
+ return NextResponse.json({ error: error.message }, { status: 500 })
+ }
+ return NextResponse.json(transforms)
+ } catch (error) {
+ console.log(error)
+ return NextResponse.json({ error: "Internal Server Error" }, { status: 500 })
+ }
+}
+
diff --git a/flowsint-web/src/app/dashboard/investigations/test/actions.tsx b/flowsint-web/src/app/dashboard/investigations/test/actions.tsx
new file mode 100644
index 00000000..cd4316ec
--- /dev/null
+++ b/flowsint-web/src/app/dashboard/investigations/test/actions.tsx
@@ -0,0 +1,226 @@
+"use client"
+
+import type React from "react"
+import { useState } from "react"
+import { useParams } from "next/navigation"
+import { supabase } from "@/lib/supabase/client"
+import { Button } from "@/components/ui/button"
+import { ArrowLeft, ArrowRight } from 'lucide-react'
+import { toast } from "sonner"
+import { cn } from "@/lib/utils"
+import { Dialog, DialogContent, DialogDescription, DialogTitle } from "@/components/ui/dialog"
+import { actionItems, type ActionItem } from "@/lib/action-items"
+import { Card, CardContent } from "@/components/ui/card"
+import { AnimatePresence, motion } from "framer-motion"
+import { DynamicForm } from "@/components/sketches/dynamic-form"
+import { Badge } from "@/components/ui/badge"
+
+interface ActionDialogProps {
+ addNodes?: (node: any) => void
+ setCurrentNode?: (node: any) => void
+ openDialog: boolean
+ setOpenDialog: (state: boolean) => void
+}
+
+export default function ActionDialog({ addNodes, setCurrentNode, setOpenDialog, openDialog }: ActionDialogProps) {
+ const { sketch_id } = useParams()
+ const [openAddNodeModal, setOpenNodeModal] = useState(false)
+ const [currentNodeType, setCurrentNodeType] = useState<any | null>(null)
+ const [error, setError] = useState<string | null>(null)
+ const [loading, setLoading] = useState(false)
+ const [currentParent, setCurrentParent] = useState<ActionItem | null>(null)
+ const [navigationHistory, setNavigationHistory] = useState<ActionItem[]>([])
+
+ const handleOpenAddNodeModal = (key: string) => {
+ const selectedItem = actionItems.find(item => item.type === key) ||
+ actionItems
+ .filter(item => item.children)
+ .flatMap(item => item.children || [])
+ .find(item => item.type === key)
+
+ if (!selectedItem) {
+ toast.error("Invalid node type selected.")
+ return
+ }
+ setCurrentNodeType(selectedItem)
+ setError(null)
+ setOpenDialog(false)
+ setOpenNodeModal(true)
+ }
+
+ const handleAddNode = async (data: any) => {
+ try {
+ setLoading(true)
+ if (!currentNodeType || !sketch_id) {
+ toast.error("Invalid node type or sketch ID.")
+ setLoading(false)
+ return
+ }
+
+ const dataToInsert = { ...data, sketch_id }
+
+ const { data: nodeData, error: insertError } = await supabase
+ .from(currentNodeType.table)
+ .insert(dataToInsert)
+ .select("*")
+ .single()
+
+ if (insertError) {
+ toast.error("Could not insert new node." + insertError.message)
+ setLoading(false)
+ return
+ }
+
+ if (!nodeData) {
+ toast.error("Could not insert new node.")
+ setLoading(false)
+ return
+ }
+ const newNode = {
+ id: nodeData.id,
+ type: "custom",
+ data: {
+ ...nodeData,
+ label: data[currentNodeType.fields[0].name],
+ type: currentNodeType.type,
+ },
+ position: { x: 0, y: 0 },
+ }
+ if (addNodes) {
+ addNodes(newNode)
+ }
+ if (setCurrentNode) {
+ setCurrentNode(newNode)
+ }
+ setOpenNodeModal(false)
+ setError(null)
+ toast.success(`${currentNodeType.label} successfully created.`)
+ } catch (error) {
+ toast.error("Error submitting form.")
+ setOpenDialog(false)
+ } finally {
+ setLoading(false)
+ setOpenDialog(false)
+ }
+ }
+
+ const navigateToSubItems = (item: ActionItem) => {
+ setNavigationHistory([...navigationHistory, item])
+ setCurrentParent(item)
+ }
+
+ const navigateBack = () => {
+ const newHistory = [...navigationHistory]
+ newHistory.pop()
+ setNavigationHistory(newHistory)
+ setCurrentParent(newHistory.length > 0 ? newHistory[newHistory.length - 1] : null)
+ }
+
+ const renderActionCards = () => {
+ const items = currentParent ? currentParent.children || [] : actionItems
+
+ return (
+ <AnimatePresence mode="wait">
+ <motion.div
+ key={currentParent?.id || "root"}
+ initial={{ opacity: 0, x: 20 }}
+ animate={{ opacity: 1, x: 0 }}
+ exit={{ opacity: 0, x: -20 }}
+ transition={{ duration: 0.2 }}
+ className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-3 p-1 pb-2"
+ >
+ {items.map((item) => (
+ <ActionCard
+ key={item.id}
+ item={item}
+ onSelect={item.children ? () => navigateToSubItems(item) : () => handleOpenAddNodeModal(item.type)}
+ />
+ ))}
+ </motion.div>
+ </AnimatePresence>
+ )
+ }
+
+ return (
+ <>
+ <Dialog open={openDialog} onOpenChange={setOpenDialog}>
+ <DialogContent className="sm:max-w-[700px] h-[80vh] overflow-hidden flex flex-col">
+ <DialogTitle className="flex items-center">
+ {currentParent && (
+ <Button variant="ghost" size="icon" className="mr-2" onClick={navigateBack}>
+ <ArrowLeft className="h-4 w-4" />
+ </Button>
+ )}
+ {currentParent ? currentParent.label : "Select an action"}
+ </DialogTitle>
+ <DialogDescription>
+ {currentParent
+ ? `Select a type of ${currentParent.label.toLowerCase()} to add`
+ : "Choose an item to add"}
+ </DialogDescription>
+
+ <div className="overflow-y-auto overflow-x-hidden pr-1 -mr-1 flex-grow">{renderActionCards()}</div>
+ </DialogContent>
+ </Dialog>
+ <Dialog open={openAddNodeModal} onOpenChange={setOpenNodeModal}>
+ <DialogContent>
+ <DialogTitle>
+ {currentNodeType && (
+ <>Add {currentNodeType.label.toLowerCase()}</>
+ )}
+ </DialogTitle>
+ <DialogDescription>Feel the required data</DialogDescription>
+ {currentNodeType && (
+ <DynamicForm
+ type={currentNodeType.type}
+ isForm={true}
+ loading={loading}
+ onSubmit={handleAddNode}
+ />
+ )}
+ </DialogContent >
+ </Dialog>
+ </>
+ )
+}
+
+interface ActionCardProps {
+ item: ActionItem
+ onSelect: () => void
+}
+
+function ActionCard({ item, onSelect }: ActionCardProps) {
+ const Icon = item.icon
+
+ return (
+ <Card
+ className={cn(
+ "cursor-pointer transition-all bg-card hover:border-primary border border-transparent hover:shadow-md",
+ item.disabled && "opacity-50 cursor-not-allowed",
+ "h-full",
+ )}
+ onClick={item.disabled ? undefined : onSelect}
+ >
+ <CardContent className="p-4 relative flex flex-col items-center text-center h-full">
+ <div
+ className="w-8 h-8 rounded-full flex items-center justify-center mb-3 mt-2"
+ style={{ backgroundColor: item.color ? `${item.color}20` : "var(--primary-20)" }}
+ >
+ <Icon style={{ color: item.color }} className={cn("h-6 w-6 opacity-60", item.color ? "" : "text-primary")} />
+ </div>
+ <div className="font-medium text-sm">{item.label}</div>
+ {item.disabled && (
+ <Badge variant="outline" className="mt-2 absolute top-2 left-2">
+ bientôt
+ </Badge>
+ )}
+ {item.children && (
+ <div className="absolute top-3 right-4 text-xs text-muted-foreground mt-1">
+ <ArrowRight className="h-4 w-4" />
+ </div>
+ )}
+ {item.children && <div className="text-xs text-muted-foreground mt-1">{item.children.length} options</div>}
+ </CardContent>
+ </Card>
+ )
+}
diff --git a/flowsint-web/src/app/dashboard/investigations/test/client.tsx b/flowsint-web/src/app/dashboard/investigations/test/client.tsx
new file mode 100644
index 00000000..7ea8d532
--- /dev/null
+++ b/flowsint-web/src/app/dashboard/investigations/test/client.tsx
@@ -0,0 +1,71 @@
+"use client"
+
+import React, { useState } from 'react'
+import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from '@/components/ui/resizable'
+import { useFlowStore } from '@/store/flow-store'
+import { shallow } from 'zustand/shallow'
+import ActionDialog from './actions'
+import { Toolbar } from './toolbar'
+import { LeftPanel } from './left-panel'
+import { GraphPanel } from './graph-panel'
+import { RightPanel } from './right-panel'
+
+const Client = ({ data }: { data: any }) => {
+ const [open, setOpen] = useState(false)
+ const [isLeftPanelCollapsed, setIsLeftPanelCollapsed] = useState(false)
+ const [isRightPanelCollapsed, setIsRightPanelCollapsed] = useState(false)
+ const [activeTab, setActiveTab] = useState("graph1")
+
+ const stateSelector = (state: { currentNode: any; setCurrentNode: any }) => ({
+ currentNode: state.currentNode,
+ setCurrentNode: state.setCurrentNode,
+ })
+
+ const {
+ currentNode,
+ setCurrentNode
+ } = useFlowStore(stateSelector, shallow)
+
+ return (
+ <>
+ <Toolbar />
+ {/* Main Content */}
+ <div className="grow w-screen relative">
+ <ResizablePanelGroup autoSaveId="persistence" direction="horizontal" className="w-full h-full relative overflow-hidden">
+ {/* Left Panel - Entity Palette */}
+ <LeftPanel
+ isCollapsed={isLeftPanelCollapsed}
+ setIsCollapsed={setIsLeftPanelCollapsed}
+ />
+
+ <ResizableHandle withHandle />
+
+ {/* Center Panel with Tabs and Graph */}
+ <ResizablePanel defaultSize={65}>
+ <GraphPanel
+ activeTab={activeTab}
+ setActiveTab={setActiveTab}
+ currentNode={currentNode}
+ setCurrentNode={setCurrentNode}
+ setOpenDialog={setOpen}
+ data={data}
+ />
+ </ResizablePanel>
+
+ <ResizableHandle withHandle />
+
+ {/* Right Panel */}
+ <RightPanel
+ isCollapsed={isRightPanelCollapsed}
+ setIsCollapsed={setIsRightPanelCollapsed}
+ currentNode={currentNode}
+ />
+ </ResizablePanelGroup>
+
+ <ActionDialog setCurrentNode={setCurrentNode} setOpenDialog={setOpen} openDialog={open} />
+ </div>
+ </>
+ )
+}
+
+export default Client
\ No newline at end of file
diff --git a/flowsint-web/src/app/dashboard/investigations/test/console-panel.tsx b/flowsint-web/src/app/dashboard/investigations/test/console-panel.tsx
new file mode 100644
index 00000000..25432aa6
--- /dev/null
+++ b/flowsint-web/src/app/dashboard/investigations/test/console-panel.tsx
@@ -0,0 +1,60 @@
+import { Button } from '@/components/ui/button'
+import { ScrollArea } from '@/components/ui/scroll-area'
+import { ChevronDown, Database, FileText, Grid, List } from 'lucide-react'
+
+export function ConsolePanel() {
+ // Sample log entries for the console panel
+ const logEntries = [
+ { type: "info", timestamp: "14:32:15", message: 'Loading graph "Investigation 1"' },
+ { type: "info", timestamp: "14:32:16", message: "Graph loaded successfully" },
+ { type: "action", timestamp: "14:33:05", message: "Running transform: Email to Domain" },
+ { type: "info", timestamp: "14:33:07", message: "Transform completed: 1 entity added" },
+ { type: "warning", timestamp: "14:33:10", message: "Rate limit approaching for API: hunter.io" },
+ { type: "error", timestamp: "14:34:22", message: "Transform failed: API key invalid" },
+ { type: "info", timestamp: "14:35:01", message: "Entity added: IP Address 192.168.1.1" },
+ ]
+
+ return (
+ <div className="flex h-full flex-col border-t">
+ <div className="flex h-8 items-center justify-between border-b px-4 bg-card">
+ <h2 className="font-medium text-sm">Console</h2>
+ <div className="flex items-center gap-1">
+ <Button variant="ghost" size="icon" className="h-6 w-6">
+ <Grid className="h-4 w-4" />
+ </Button>
+ <Button variant="ghost" size="icon" className="h-6 w-6">
+ <List className="h-4 w-4" />
+ </Button>
+ <Button variant="ghost" size="icon" className="h-6 w-6">
+ <FileText className="h-4 w-4" />
+ </Button>
+ <Button variant="ghost" size="icon" className="h-6 w-6">
+ <Database className="h-4 w-4" />
+ </Button>
+ </div>
+ </div>
+ <ScrollArea className="flex-1">
+ <div className="p-2 font-mono text-xs">
+ {logEntries.map((entry, index) => (
+ <div key={index} className="mb-1 flex">
+ <span className="mr-2 text-muted-foreground">[{entry.timestamp}]</span>
+ <span
+ className={
+ entry.type === "error"
+ ? "text-destructive"
+ : entry.type === "warning"
+ ? "text-amber-500"
+ : entry.type === "action"
+ ? "text-primary"
+ : "text-foreground"
+ }
+ >
+ {entry.message}
+ </span>
+ </div>
+ ))}
+ </div>
+ </ScrollArea>
+ </div>
+ )
+}
\ No newline at end of file
diff --git a/flowsint-web/src/app/dashboard/investigations/test/graph-panel.tsx b/flowsint-web/src/app/dashboard/investigations/test/graph-panel.tsx
new file mode 100644
index 00000000..0b5ea7c1
--- /dev/null
+++ b/flowsint-web/src/app/dashboard/investigations/test/graph-panel.tsx
@@ -0,0 +1,80 @@
+import { Button } from '@/components/ui/button'
+import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from '@/components/ui/resizable'
+import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'
+import { Network, Plus } from 'lucide-react'
+import Graph from './graph'
+import { ConsolePanel } from './console-panel'
+import { useState } from 'react'
+
+interface GraphPanelProps {
+ activeTab: string
+ setActiveTab: (tab: string) => void
+ currentNode: any
+ setCurrentNode: (node: any) => void
+ setOpenDialog: (open: boolean) => void
+ data: any
+}
+
+export function GraphPanel({ activeTab, setActiveTab, currentNode, setCurrentNode, setOpenDialog, data }: GraphPanelProps) {
+ const [isBottomPanelCollapsed, setIsBottomPanelCollapsed] = useState(false)
+
+ return (
+ <div className="flex flex-col h-full">
+ {/* Tabs header */}
+ <div className="border-b bg-card">
+ <div className="flex items-center px-2">
+ <Tabs value={activeTab} onValueChange={setActiveTab} className="w-full">
+ <TabsList className="bg-muted h-9">
+ <TabsTrigger value="graph1" className="text-xs">Investigation 1</TabsTrigger>
+ <TabsTrigger value="graph2" className="text-xs">OSINT Analysis</TabsTrigger>
+ <TabsTrigger value="graph3" className="text-xs">Network Map</TabsTrigger>
+ <Button variant="ghost" size="icon" className="h-7 w-7 ml-1">
+ <Plus className="h-4 w-4" />
+ </Button>
+ </TabsList>
+ </Tabs>
+ </div>
+ </div>
+
+ {/* Content area with vertical resizable panels */}
+ <div className="grow">
+ <ResizablePanelGroup direction="vertical" className="h-full">
+ <ResizablePanel defaultSize={80} className="h-full">
+ {/* Tab content */}
+ <Tabs value={activeTab} className="h-full">
+ <TabsContent value="graph1" className="h-full w-full m-0 p-0">
+ <Graph currentNode={currentNode} setOpenDialog={setOpenDialog} data={data} setCurrentNode={setCurrentNode} />
+ </TabsContent>
+ <TabsContent value="graph2" className="h-full m-0 p-0 data-[state=active]:block">
+ <div className="flex h-full items-center justify-center text-muted-foreground">
+ <Network className="h-16 w-16 opacity-20 mr-2" />
+ <span>OSINT Analysis Graph</span>
+ </div>
+ </TabsContent>
+ <TabsContent value="graph3" className="h-full m-0 p-0 data-[state=active]:block">
+ <div className="flex h-full items-center justify-center text-muted-foreground">
+ <Network className="h-16 w-16 opacity-20 mr-2" />
+ <span>Network Map Graph</span>
+ </div>
+ </TabsContent>
+ </Tabs>
+ </ResizablePanel>
+
+ <ResizableHandle withHandle />
+
+ {/* Bottom Console Panel */}
+ <ResizablePanel
+ defaultSize={20}
+ minSize={10}
+ maxSize={40}
+ collapsible={true}
+ onCollapse={() => setIsBottomPanelCollapsed(true)}
+ onExpand={() => setIsBottomPanelCollapsed(false)}
+ >
+ <ConsolePanel />
+ </ResizablePanel>
+ </ResizablePanelGroup>
+ </div>
+ </div>
+ )
+}
\ No newline at end of file
diff --git a/flowsint-web/src/app/dashboard/investigations/test/graph.tsx b/flowsint-web/src/app/dashboard/investigations/test/graph.tsx
new file mode 100644
index 00000000..61e0fe2c
--- /dev/null
+++ b/flowsint-web/src/app/dashboard/investigations/test/graph.tsx
@@ -0,0 +1,212 @@
+'use client';
+import { useEffect, useRef } from 'react';
+import cytoscape from 'cytoscape';
+// @ts-ignore
+import fcose from 'cytoscape-fcose';
+// @ts-ignore
+import cxtmenuPlugin from 'cytoscape-cxtmenu';
+cytoscape.use(cxtmenuPlugin);
+cytoscape.use(fcose)
+
+interface GraphProps {
+ data: any;
+ currentNode: any,
+ setCurrentNode: (node: { data: any }) => void;
+ setOpenDialog: (state: boolean) => void;
+}
+
+export default function Graph({ data, currentNode, setCurrentNode, setOpenDialog }: GraphProps) {
+ const cyRef = useRef<HTMLDivElement>(null);
+
+ useEffect(() => {
+ if (!cyRef.current) return;
+
+ const cy = cytoscape({
+ container: cyRef.current,
+ elements: data,
+ // @ts-ignore
+ layout: {
+ name: 'cose',
+ animate: true,
+ idealEdgeLength: () => 200,
+ nodeOverlap: 40,
+ refresh: 20,
+ fit: true,
+ padding: 30,
+ randomize: false,
+ componentSpacing: 1000,
+ nodeRepulsion: 400000,
+ edgeElasticity: 100,
+ nestingFactor: 5,
+ gravity: 80,
+ numIter: 1000,
+ initialTemp: 200,
+ coolingFactor: 0.95,
+ minTemp: 1.0
+ },
+ style: [
+ {
+ selector: 'node[type="person"]',
+ style: {
+ 'background-color': '#4CAF50',
+ "background-height": "2px",
+ "background-width": "2px",
+ 'shape': 'ellipse',
+ 'background-image': '/person.svg', // petit icône SVG de profil
+ 'background-fit': 'contain',
+ 'label': 'data(label)',
+ 'text-valign': 'bottom',
+ 'text-halign': 'center',
+ 'font-size': 8,
+ 'text-margin-y': 25,
+ 'padding': "12px",
+ 'border-width': 4,
+ 'border-color': '#4CAF50',
+ 'width': 60,
+ 'height': 60,
+ 'text-margin-x': 0, // Décalage horizontal
+ },
+ },
+ {
+ selector: 'node[type="domain"]',
+ style: {
+ 'background-color': '#2196F3',
+ 'shape': 'ellipse',
+ 'background-image': '/icons/domain.svg',
+ 'background-fit': 'cover',
+ 'label': 'data(label)',
+ 'text-valign': 'bottom',
+ 'text-halign': 'center',
+ 'color': '#333',
+ 'font-size': 12,
+ 'text-margin-y': 5,
+ 'width': 60,
+ 'height': 60,
+ 'border-width': 3,
+ 'border-color': '#2196F3',
+ },
+ },
+ {
+ selector: 'node[type="website"]',
+ style: {
+ 'background-color': '#2196F3',
+ 'shape': 'ellipse',
+ 'background-image': '/icons/domain.svg',
+ 'background-fit': 'cover',
+ 'label': 'data(label)',
+ 'text-valign': 'bottom',
+ 'text-halign': 'center',
+ 'color': '#333',
+ 'font-size': 12,
+ 'text-margin-y': 5,
+ 'width': 60,
+ 'height': 60,
+ 'border-width': 3,
+ 'border-color': '#2196F3',
+ },
+ },
+ {
+ selector: 'edge',
+ style: {
+ 'width': 1,
+ 'line-color': '#ccc',
+ 'target-arrow-color': '#ccc',
+ 'target-arrow-shape': 'triangle',
+ 'curve-style': 'bezier',
+ // 'label': 'data(label)',
+ 'font-size': 10,
+ 'text-rotation': 'autorotate',
+ 'text-margin-y': -10,
+ 'opacity': 0.5 // Réduit l'opacité des arêtes à 50%
+ },
+ },
+ {
+ selector: 'node',
+ style: {
+ 'background-color': '#666',
+ 'shape': 'ellipse',
+ 'label': 'data(label)',
+ 'color': '#fff',
+ 'font-size': 12,
+ 'text-valign': 'center',
+ 'text-halign': 'center',
+ 'width': 40,
+ 'height': 40,
+ },
+ },
+ ],
+ });
+
+ // Context menu settings
+ const defaults = {
+ menuRadius: function () { return 60; }, // the outer radius in pixels
+ selector: 'node', // elements matching this Cytoscape.js selector will trigger cxtmenus
+ commands: [
+ {
+ content: 'View',
+
+ select: function (ele: { data: () => any; }) {
+ alert(ele.data());
+ }
+ },
+ {
+ id: 'add-node',
+ tooltipText: 'add node',
+ image: { src: "add.svg", width: 12, height: 12, x: 6, y: 4 },
+ selector: 'node',
+ coreAsWell: true,
+ content: 'Add relation',
+ select: function (ele: { data: () => any; }) {
+ setOpenDialog(true)
+ }
+ }, {
+ content: 'Delete',
+ select: function (ele: { data: () => any; }) {
+ alert(ele.data());
+ }
+ }
+
+ ],
+ fillColor: 'rgba(0, 0, 0, 0.75)',
+ activeFillColor: 'rgba(1, 105, 217, 0.75)',
+ activePadding: 20,
+ indicatorSize: 24,
+ separatorWidth: 3,
+ spotlightPadding: 4,
+ adaptativeNodeSpotlightRadius: false,
+ minSpotlightRadius: 24,
+ maxSpotlightRadius: 38,
+ openMenuEvents: 'cxttapstart taphold',
+ itemColor: 'white',
+ itemTextShadowColor: 'transparent',
+ zIndex: 9999,
+ atMouse: false,
+ outsideMenuCancel: false
+ };
+
+ // @ts-ignore - To bypass TypeScript errors
+ const menu = cy.cxtmenu(defaults);
+
+
+ cy.on('tap', 'node', (evt) => {
+ const node = evt.target;
+ console.log(node.data());
+ setCurrentNode({ data: node.data() });
+ });
+
+ return () => {
+ cy.destroy();
+ // @ts-ignore - To bypass TypeScript errors
+ if (menu && typeof menu.destroy === 'function') {
+ menu.destroy();
+ }
+ // The navigator is automatically destroyed when cy is destroyed
+ };
+ }, [data, setCurrentNode]);
+
+ return (
+ <div style={{ position: 'relative', width: '100%', height: '100%' }}>
+ <div ref={cyRef} style={{ width: '100%', height: '100%' }} />
+ </div>
+ );
+}
\ No newline at end of file
diff --git a/flowsint-web/src/app/dashboard/investigations/test/left-panel.tsx b/flowsint-web/src/app/dashboard/investigations/test/left-panel.tsx
new file mode 100644
index 00000000..18e6f4c3
--- /dev/null
+++ b/flowsint-web/src/app/dashboard/investigations/test/left-panel.tsx
@@ -0,0 +1,92 @@
+import { Button } from '@/components/ui/button'
+import { ResizablePanel } from '@/components/ui/resizable'
+import { ScrollArea } from '@/components/ui/scroll-area'
+import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '@/components/ui/accordion'
+import { ChevronDown, ChevronRight, Globe, Mail, MapPin, Phone, User, Wifi } from 'lucide-react'
+
+interface LeftPanelProps {
+ isCollapsed: boolean
+ setIsCollapsed: (collapsed: boolean) => void
+}
+
+export function LeftPanel({ isCollapsed, setIsCollapsed }: LeftPanelProps) {
+ // Sample entity categories for the left panel
+ const entityCategories = [
+ {
+ name: "Infrastructure",
+ entities: [
+ { name: "Domain", icon: <Globe className="h-4 w-4" /> },
+ { name: "IP Address", icon: <Wifi className="h-4 w-4" /> },
+ { name: "Website", icon: <Globe className="h-4 w-4" /> },
+ ],
+ },
+ {
+ name: "Personal",
+ entities: [
+ { name: "Person", icon: <User className="h-4 w-4" /> },
+ { name: "Email Address", icon: <Mail className="h-4 w-4" /> },
+ { name: "Phone Number", icon: <Phone className="h-4 w-4" /> },
+ { name: "Location", icon: <MapPin className="h-4 w-4" /> },
+ ],
+ },
+ ]
+
+ return (
+ <ResizablePanel
+ defaultSize={15}
+ minSize={10}
+ maxSize={25}
+ className="h-full bg-card"
+ collapsible={true}
+ collapsedSize={4}
+ onCollapse={() => setIsCollapsed(true)}
+ onExpand={() => setIsCollapsed(false)}
+ >
+ {!isCollapsed ? (
+ <div className="flex h-full flex-col">
+ <div className="flex h-8 items-center justify-between border-b px-4 bg-card">
+ <h2 className="font-medium text-sm">Palette</h2>
+ <Button variant="ghost" size="icon" className="h-6 w-6">
+ <ChevronDown className="h-4 w-4" />
+ </Button>
+ </div>
+ <ScrollArea className="flex-1">
+ <div className="p-2">
+ <Accordion type="multiple" defaultValue={["Infrastructure", "Personal"]}>
+ {entityCategories.map((category) => (
+ <AccordionItem
+ key={category.name}
+ value={category.name}
+ className="border-b border-border"
+ >
+ <AccordionTrigger className="py-2 text-sm">{category.name}</AccordionTrigger>
+ <AccordionContent>
+ <div className="grid grid-cols-1 gap-1">
+ {category.entities.map((entity) => (
+ <div
+ key={entity.name}
+ className="flex cursor-grab items-center gap-2 rounded-md p-2 hover:bg-muted"
+ draggable="true"
+ >
+ {entity.icon}
+ <span className="text-xs">{entity.name}</span>
+ </div>
+ ))}
+ </div>
+ </AccordionContent>
+ </AccordionItem>
+ ))}
+ </Accordion>
+ </div>
+ </ScrollArea>
+ </div>
+ ) : (
+ <div className="flex h-full items-center justify-center">
+ <Button variant="ghost" size="icon" className="h-8 w-8" onClick={() => setIsCollapsed(false)}>
+ <ChevronRight className="h-4 w-4" />
+ </Button>
+ </div>
+ )}
+ </ResizablePanel>
+ )
+}
\ No newline at end of file
diff --git a/flowsint-web/src/app/dashboard/investigations/test/page.tsx b/flowsint-web/src/app/dashboard/investigations/test/page.tsx
new file mode 100644
index 00000000..941d4fc1
--- /dev/null
+++ b/flowsint-web/src/app/dashboard/investigations/test/page.tsx
@@ -0,0 +1,21 @@
+import Client from "./client"
+async function getGraphData() {
+ try {
+ const res = await fetch(`${process.env.NEXT_PUBLIC_DOCKER_FLOWSINT_API}/sketch/nodes`, {
+ cache: "no-store",
+ })
+ if (!res.ok) {
+ return { nodes: [], edges: [] }
+ }
+ return res.json()
+ } catch (error) {
+ console.error("Erreur:", error)
+ return { nodes: [], edges: [] }
+ }
+}
+export default async function Home() {
+ const initialData = await getGraphData()
+ return (
+ <Client data={initialData} />
+ )
+}
diff --git a/flowsint-web/src/app/dashboard/investigations/test/right-panel.tsx b/flowsint-web/src/app/dashboard/investigations/test/right-panel.tsx
new file mode 100644
index 00000000..6368a9b6
--- /dev/null
+++ b/flowsint-web/src/app/dashboard/investigations/test/right-panel.tsx
@@ -0,0 +1,60 @@
+import { Button } from '@/components/ui/button'
+import { ResizablePanel, ResizablePanelGroup, ResizableHandle } from '@/components/ui/resizable'
+import { ChevronDown, ChevronLeft } from 'lucide-react'
+import NodesPanel from '@/components/sketches/sketch/nodes-panel'
+import ProfilePanel from '@/components/sketches/sketch/profile-panel'
+
+interface RightPanelProps {
+ isCollapsed: boolean
+ setIsCollapsed: (collapsed: boolean) => void
+ currentNode: any
+}
+
+export function RightPanel({ isCollapsed, setIsCollapsed, currentNode }: RightPanelProps) {
+ return (
+ <ResizablePanel
+ defaultSize={20}
+ minSize={15}
+ maxSize={40}
+ className="h-full bg-card"
+ collapsible={true}
+ collapsedSize={4}
+ onCollapse={() => setIsCollapsed(true)}
+ onExpand={() => setIsCollapsed(false)}
+ >
+ {!isCollapsed ? (
+ <ResizablePanelGroup autoSaveId="conditional" direction="vertical">
+ {currentNode && (
+ <>
+ <ResizablePanel order={1} id="top" defaultSize={40}>
+ <div className="flex h-8 items-center justify-between border-b px-4 bg-card">
+ <h2 className="font-medium text-sm">Properties</h2>
+ <Button variant="ghost" size="icon" className="h-6 w-6">
+ <ChevronDown className="h-4 w-4" />
+ </Button>
+ </div>
+ <ProfilePanel data={currentNode.data} />
+ </ResizablePanel>
+ <ResizableHandle withHandle />
+ </>
+ )}
+ <ResizablePanel order={2} id="bottom" defaultSize={60}>
+ <div className="flex h-8 items-center justify-between border-b px-4 bg-card">
+ <h2 className="font-medium text-sm">Entities</h2>
+ <Button variant="ghost" size="icon" className="h-6 w-6">
+ <ChevronDown className="h-4 w-4" />
+ </Button>
+ </div>
+ <NodesPanel nodes={[]} />
+ </ResizablePanel>
+ </ResizablePanelGroup>
+ ) : (
+ <div className="flex h-full items-center justify-center">
+ <Button variant="ghost" size="icon" className="h-8 w-8" onClick={() => setIsCollapsed(false)}>
+ <ChevronLeft className="h-4 w-4" />
+ </Button>
+ </div>
+ )}
+ </ResizablePanel>
+ )
+}
\ No newline at end of file
diff --git a/flowsint-web/src/app/dashboard/investigations/test/toolbar.tsx b/flowsint-web/src/app/dashboard/investigations/test/toolbar.tsx
new file mode 100644
index 00000000..6d0b2094
--- /dev/null
+++ b/flowsint-web/src/app/dashboard/investigations/test/toolbar.tsx
@@ -0,0 +1,184 @@
+import { Button } from '@/components/ui/button'
+import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip'
+import { ArrowDownUp, Copy, Filter, Layers, LayoutGrid, Maximize, Minus, Redo, Save, Search, Settings, Share2, Trash, Undo, ZoomIn } from 'lucide-react'
+
+export function Toolbar() {
+ return (
+ <div className="flex items-center h-10 border-b px-2 bg-card">
+ <div className="flex items-center space-x-1">
+ <TooltipProvider>
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <Button variant="ghost" size="icon" className="h-8 w-8">
+ <Undo className="h-4 w-4" />
+ </Button>
+ </TooltipTrigger>
+ <TooltipContent>Undo</TooltipContent>
+ </Tooltip>
+ </TooltipProvider>
+
+ <TooltipProvider>
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <Button variant="ghost" size="icon" className="h-8 w-8">
+ <Redo className="h-4 w-4" />
+ </Button>
+ </TooltipTrigger>
+ <TooltipContent>Redo</TooltipContent>
+ </Tooltip>
+ </TooltipProvider>
+
+ <div className="h-6 w-px bg-border" />
+
+ <TooltipProvider>
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <Button variant="ghost" size="icon" className="h-8 w-8">
+ <Copy className="h-4 w-4" />
+ </Button>
+ </TooltipTrigger>
+ <TooltipContent>Copy</TooltipContent>
+ </Tooltip>
+ </TooltipProvider>
+
+ <TooltipProvider>
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <Button variant="ghost" size="icon" className="h-8 w-8">
+ <Trash className="h-4 w-4" />
+ </Button>
+ </TooltipTrigger>
+ <TooltipContent>Delete</TooltipContent>
+ </Tooltip>
+ </TooltipProvider>
+
+ <div className="h-6 w-px bg-border" />
+
+ <TooltipProvider>
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <Button variant="ghost" size="icon" className="h-8 w-8">
+ <ArrowDownUp className="h-4 w-4" />
+ </Button>
+ </TooltipTrigger>
+ <TooltipContent>Arrange</TooltipContent>
+ </Tooltip>
+ </TooltipProvider>
+
+ <TooltipProvider>
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <Button variant="ghost" size="icon" className="h-8 w-8">
+ <Filter className="h-4 w-4" />
+ </Button>
+ </TooltipTrigger>
+ <TooltipContent>Filter</TooltipContent>
+ </Tooltip>
+ </TooltipProvider>
+
+ <div className="h-6 w-px bg-border" />
+
+ <TooltipProvider>
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <Button variant="ghost" size="icon" className="h-8 w-8">
+ <ZoomIn className="h-4 w-4" />
+ </Button>
+ </TooltipTrigger>
+ <TooltipContent>Zoom In</TooltipContent>
+ </Tooltip>
+ </TooltipProvider>
+
+ <TooltipProvider>
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <Button variant="ghost" size="icon" className="h-8 w-8">
+ <Minus className="h-4 w-4" />
+ </Button>
+ </TooltipTrigger>
+ <TooltipContent>Zoom Out</TooltipContent>
+ </Tooltip>
+ </TooltipProvider>
+
+ <TooltipProvider>
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <Button variant="ghost" size="icon" className="h-8 w-8">
+ <Maximize className="h-4 w-4" />
+ </Button>
+ </TooltipTrigger>
+ <TooltipContent>Fit to View</TooltipContent>
+ </Tooltip>
+ </TooltipProvider>
+
+ <div className="h-6 w-px bg-border" />
+
+ <TooltipProvider>
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <Button variant="ghost" size="icon" className="h-8 w-8">
+ <LayoutGrid className="h-4 w-4" />
+ </Button>
+ </TooltipTrigger>
+ <TooltipContent>Layout</TooltipContent>
+ </Tooltip>
+ </TooltipProvider>
+
+ <TooltipProvider>
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <Button variant="ghost" size="icon" className="h-8 w-8">
+ <Layers className="h-4 w-4" />
+ </Button>
+ </TooltipTrigger>
+ <TooltipContent>Layers</TooltipContent>
+ </Tooltip>
+ </TooltipProvider>
+
+ <div className="ml-auto flex items-center gap-2">
+ <div className="relative w-40">
+ <Search className="absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground" />
+ <input
+ type="search"
+ placeholder="Search..."
+ className="w-full rounded-md border bg-background pl-8 h-8 text-sm"
+ />
+ </div>
+
+ <TooltipProvider>
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <Button variant="ghost" size="icon" className="h-8 w-8">
+ <Save className="h-4 w-4" />
+ </Button>
+ </TooltipTrigger>
+ <TooltipContent>Save</TooltipContent>
+ </Tooltip>
+ </TooltipProvider>
+
+ <TooltipProvider>
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <Button variant="ghost" size="icon" className="h-8 w-8">
+ <Share2 className="h-4 w-4" />
+ </Button>
+ </TooltipTrigger>
+ <TooltipContent>Share</TooltipContent>
+ </Tooltip>
+ </TooltipProvider>
+
+ <TooltipProvider>
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <Button variant="ghost" size="icon" className="h-8 w-8">
+ <Settings className="h-4 w-4" />
+ </Button>
+ </TooltipTrigger>
+ <TooltipContent>Settings</TooltipContent>
+ </Tooltip>
+ </TooltipProvider>
+ </div>
+ </div>
+ </div>
+ )
+}
\ No newline at end of file
diff --git a/flowsint-web/src/components/sketches/sketch/launch-transform.tsx b/flowsint-web/src/components/sketches/sketch/launch-transform.tsx
new file mode 100644
index 00000000..8f22e455
--- /dev/null
+++ b/flowsint-web/src/components/sketches/sketch/launch-transform.tsx
@@ -0,0 +1,127 @@
+"use client"
+
+import { useState } from "react"
+import { useLaunchSan } from "@/hooks/use-launch-scan"
+import { useTransforms } from "@/hooks/use-transforms"
+import { Button } from "@/components/ui/button"
+import { Sparkles } from "lucide-react"
+import {
+ Dialog,
+ DialogContent,
+ DialogHeader,
+ DialogTitle,
+ DialogDescription,
+ DialogFooter,
+} from "@/components/ui/dialog"
+import { Card, CardHeader, CardTitle, CardDescription } from "@/components/ui/card"
+import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group"
+import { Label } from "@/components/ui/label"
+import { useLaunchTransform } from "@/hooks/use-launch-transform"
+import { formatDistanceToNow } from "date-fns"
+
+interface Transform {
+ id: string
+ name: string
+ description: string
+ category: string
+ created_at: string
+ last_updated_at: string
+}
+
+const LaunchTransform = ({ values, type, sketch_id }: { values: string[], type: string, sketch_id: string }) => {
+ const { launchTransform } = useLaunchTransform()
+ const { data: transforms, isLoading } = useTransforms(type)
+ const [isOpen, setIsOpen] = useState(false)
+ const [selectedTransform, setSelectedTransform] = useState<Transform | null>(null)
+
+ const handleOpenModal = () => {
+ setIsOpen(true)
+ }
+
+ const handleCloseModal = () => {
+ setIsOpen(false)
+ }
+
+ const handleSelectTransform = (transform: Transform) => {
+ setSelectedTransform(transform)
+ }
+
+ const handleLaunchTransform = () => {
+ if (selectedTransform) {
+ launchTransform(values, selectedTransform.id, sketch_id)
+ handleCloseModal()
+ }
+ }
+
+ return (
+ <div>
+ <Button
+ onClick={handleOpenModal}
+ disabled={isLoading || !transforms?.length}
+ className="relative min-w-[80px] h-8 overflow-hidden truncate bg-gradient-to-r from-primary to-primary/80 hover:from-primary/90 hover:to-primary transition-all duration-300 px-6 py-2 text-white border-none font-medium rounded-full"
+ >
+ <span className="flex items-center gap-2">
+ <Sparkles className={"h-4 w-4 transition-transform duration-300"} />
+ <span>Search</span>
+ </span>
+ <span className="absolute inset-0 bg-black opacity-0 hover:opacity-10 transition-opacity duration-300" />
+ </Button>
+
+ <Dialog open={isOpen} onOpenChange={setIsOpen}>
+ <DialogContent className="sm:max-w-xl">
+ <DialogHeader>
+ <DialogTitle>Select a Transform</DialogTitle>
+ <DialogDescription>Choose a transform to launch from the list below.</DialogDescription>
+ </DialogHeader>
+
+ <div className="py-4">
+ <RadioGroup value={selectedTransform?.id} className="space-y-3">
+ {transforms?.map((transform: Transform) => (
+ <Card
+ key={transform.id}
+ className={`cursor-pointer border transition-all ${selectedTransform?.id === transform.id ? "border-primary bg-primary/5" : "hover:border-primary/50"}`}
+ onClick={() => handleSelectTransform(transform)}
+ >
+ <CardHeader className="p-4 pb-2">
+ <div className="flex items-start space-x-3">
+ <RadioGroupItem value={transform.id} id={transform.id} className="mt-1" />
+ <div className="flex-1">
+ <Label htmlFor={transform.id} className="cursor-pointer">
+ <CardTitle className="text-base">{transform.name}</CardTitle>
+ {transform.description && (
+ <CardDescription className="text-sm mt-1">
+ {transform.description || "No description available"}
+ </CardDescription>
+ )}
+ <div className="mt-2 text-xs text-muted-foreground">
+ <div>Created: {formatDistanceToNow(transform.created_at, { addSuffix: true })}</div>
+ <div>Last updated: {formatDistanceToNow(transform.last_updated_at, { addSuffix: true })}</div>
+ </div>
+ </Label>
+ </div>
+ </div>
+ </CardHeader>
+ </Card>
+ ))}
+ </RadioGroup>
+ </div>
+
+ <DialogFooter>
+ <Button variant="outline" onClick={handleCloseModal} className="mr-2">
+ Cancel
+ </Button>
+ <Button
+ onClick={handleLaunchTransform}
+ disabled={!selectedTransform}
+ className="bg-gradient-to-r from-primary to-primary/80 hover:from-primary/90 hover:to-primary"
+ >
+ Launch Transform
+ </Button>
+ </DialogFooter>
+ </DialogContent>
+ </Dialog>
+ </div>
+ )
+}
+
+export default LaunchTransform
diff --git a/flowsint-web/src/components/sketches/sketch/nodes-panel.tsx b/flowsint-web/src/components/sketches/sketch/nodes-panel.tsx
index 19f23178..3631b8cb 100644
--- a/flowsint-web/src/components/sketches/sketch/nodes-panel.tsx
+++ b/flowsint-web/src/components/sketches/sketch/nodes-panel.tsx
@@ -102,7 +102,7 @@ const NodesPanel = memo(({ nodes }: { nodes: Node[] }) => {
const matchesSearch =
//@ts-ignore
node?.data?.label?.toLowerCase().includes(searchText) ||
- node.id.toLowerCase().includes(searchText)
+ node?.id?.toLowerCase().includes(searchText)
const matchesFilter = !filters || filters.includes(node?.data?.type as string)
diff --git a/flowsint-web/src/components/sketches/sketch/nodes/node-context-menu.tsx b/flowsint-web/src/components/sketches/sketch/nodes/node-context-menu.tsx
index 2d2d97ae..f458c442 100644
--- a/flowsint-web/src/components/sketches/sketch/nodes/node-context-menu.tsx
+++ b/flowsint-web/src/components/sketches/sketch/nodes/node-context-menu.tsx
@@ -18,11 +18,7 @@ import { useReactFlow } from "@xyflow/react"
import { useConfirm } from "@/components/use-confirm-dialog"
import { toast } from "sonner"
import { useFlowStore } from "@/store/flow-store"
-import { Dialog, DialogClose, DialogContent, DialogDescription, DialogTitle } from "@/components/ui/dialog"
-import { Input } from "@/components/ui/input"
-import { Button } from "@/components/ui/button"
-import { Alert, AlertTitle, AlertDescription } from "@/components/ui/alert"
-import { AlertCircle } from "lucide-react"
+import { Dialog, DialogContent, DialogDescription, DialogTitle } from "@/components/ui/dialog"
import { NodeNotesEditor } from "./node-notes-editor"
import { nodesTypes } from "@/lib/utils"
import { actionItems, type ActionItem } from "@/lib/action-items"
@@ -49,30 +45,6 @@ const NodeContextMenu = memo(({ x, y, onClose }: NodeContextMenuProps) => {
const [_, setIndividualId] = useQueryState("individual_id")
const { launchScan } = useLaunchSan()
- const handleDuplicateNode = async () => {
- if (!currentNode) return
- await supabase
- .from("individuals")
- .select("*")
- .eq("id", currentNode.id)
- .single()
- .then(async ({ data, error }) => {
- if (error) throw error
- const { data: node, error: insertError } = await supabase
- .from("individuals")
- .insert({ full_name: data.full_name })
- .select("*")
- .single()
- if (insertError) toast.error(insertError.details)
- addNodes({
- id: node.id,
- type: "custom",
- data: node,
- position: { x: 0, y: -100 },
- })
- })
- }
-
const _handleDeleteNode = async (type: string) => {
try {
if (!currentNode) return
@@ -108,7 +80,7 @@ const NodeContextMenu = memo(({ x, y, onClose }: NodeContextMenuProps) => {
setError(null)
setOpenNodeModal(true)
}
-
+
const handleAddNode = async (data: any) => {
try {
setLoading(true)
@@ -213,7 +185,6 @@ const NodeContextMenu = memo(({ x, y, onClose }: NodeContextMenuProps) => {
() => setIndividualId(currentNode?.id as string),
[currentNode?.id, setIndividualId],
)
- const handleDuplicateClick = useCallback(() => handleDuplicateNode(), [])
const handleDeleteClick = useCallback(
() => handleDeleteNode(currentNode?.type as string),
[currentNode?.type, handleDeleteNode],
@@ -277,7 +248,6 @@ const NodeContextMenu = memo(({ x, y, onClose }: NodeContextMenuProps) => {
<DropdownMenuSubContent className="grid grid-cols-1 md:grid-cols-2 gap-2">{actionItems.map((item) => renderMenuItem(item))}</DropdownMenuSubContent>
</DropdownMenuSub>)}
<DropdownMenuItem onClick={handleEditClick}>View and edit</DropdownMenuItem>
- <DropdownMenuItem onClick={handleDuplicateClick}>Duplicate</DropdownMenuItem>
<DropdownMenuSeparator />
<DropdownMenuItem onClick={handleNoteClick}>
New note
diff --git a/flowsint-web/src/components/sketches/sketch/profile-panel.tsx b/flowsint-web/src/components/sketches/sketch/profile-panel.tsx
index d8ffad3d..61796360 100644
--- a/flowsint-web/src/components/sketches/sketch/profile-panel.tsx
+++ b/flowsint-web/src/components/sketches/sketch/profile-panel.tsx
@@ -12,19 +12,17 @@ import {
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu"
import Link from "next/link"
-import { useLaunchSan } from "@/hooks/use-launch-scan"
-import { scans } from "@/lib/utils"
+import LaunchTransform from "./launch-transform"
+
export default function ProfilePanel({ data }: { data: any }) {
const { sketch_id, investigation_id } = useParams()
- const { launchScan } = useLaunchSan()
- const scanner = scans.find((scan) => scan.name === data?.type)
return (
<div className=" overflow-y-auto overflow-x-hidden h-full">
<div className="flex items-center sticky bg-card top-0 border-b justify-between px-4 py-2 gap-2 z-50">
<h1 className="text-md font-semibold truncate">{data?.label}</h1>
<div className="flex items-center gap-2">
{data?.type === "organization" &&
- <Link href={`/dashboard/investigations/${investigation_id}/organigrams/${data.id}`}>
+ <Link href={`/dashboard/investigations/${investigation_id}/organigrams/${data?.id}`}>
<Button
className="relative min-w-[80px] h-8 overflow-hidden truncate bg-gradient-to-r from-primary to-primary/80 hover:from-primary/90 hover:to-primary transition-all duration-300 px-6 py-2 text-white border-none font-medium rounded-full"
>
@@ -35,18 +33,7 @@ export default function ProfilePanel({ data }: { data: any }) {
<span className="absolute inset-0 bg-black opacity-0 hover:opacity-10 transition-opacity duration-300" />
</Button>
</Link>}
- {scanner &&
- <Button
- onClick={() => launchScan(scanner.name, [data?.[scanner?.key]], sketch_id as string)}
- disabled={!data?.[scanner?.key]}
- className="relative min-w-[80px] h-8 overflow-hidden truncate bg-gradient-to-r from-primary to-primary/80 hover:from-primary/90 hover:to-primary transition-all duration-300 px-6 py-2 text-white border-none font-medium rounded-full"
- >
- <span className="flex items-center gap-2">
- <Sparkles className={'h-4 w-4 transition-transform duration-300'} />
- <span>Search</span>
- </span>
- <span className="absolute inset-0 bg-black opacity-0 hover:opacity-10 transition-opacity duration-300" />
- </Button>}
+ {/* <LaunchTransform values={data.label} sketch_id={sketch_id as string} type={data?.type} /> */}
<DropdownMenu>
<DropdownMenuTrigger asChild><Button variant={"ghost"} size={"icon"}><MoreHorizontalIcon /></Button></DropdownMenuTrigger>
<DropdownMenuContent>
diff --git a/flowsint-web/src/components/transforms/editor.tsx b/flowsint-web/src/components/transforms/editor.tsx
index 2cc12e31..52bba806 100644
--- a/flowsint-web/src/components/transforms/editor.tsx
+++ b/flowsint-web/src/components/transforms/editor.tsx
@@ -271,7 +271,7 @@ const FlowEditor = memo(
toast.error("Save the transform first.")
return
}
- launchTransform([data.domain], transform_id as string)
+ launchTransform([data.domain], transform_id as string, null)
}, [])
const handleDeleteTransform = useCallback(async () => {
diff --git a/flowsint-web/src/hooks/use-launch-transform.ts b/flowsint-web/src/hooks/use-launch-transform.ts
index d2dfae8e..849e9db6 100644
--- a/flowsint-web/src/hooks/use-launch-transform.ts
+++ b/flowsint-web/src/hooks/use-launch-transform.ts
@@ -4,7 +4,7 @@ import { useConfirm } from "@/components/use-confirm-dialog"
import { performTransform } from "@/lib/actions/transform"
export function useLaunchTransform(askUser: boolean = false) {
const { confirm } = useConfirm()
- const launchTransform = async (values: string[], transform_id: string) => {
+ const launchTransform = async (values: string[], transform_id: string, sketch_id: string | null) => {
if (askUser) {
const confirmed = await confirm({
title: `${transform_id} scan`,
@@ -12,7 +12,7 @@ export function useLaunchTransform(askUser: boolean = false) {
})
if (!confirmed) return
}
- toast.promise(performTransform(values, transform_id), {
+ toast.promise(performTransform(values, transform_id, sketch_id), {
loading: "Loading...",
success: () => `Scan on "${values.join(",")}" has been launched.`,
error: (error: any) => `An error occurred: ${JSON.stringify(error)}`,
diff --git a/flowsint-web/src/hooks/use-transforms.ts b/flowsint-web/src/hooks/use-transforms.ts
new file mode 100644
index 00000000..3c702263
--- /dev/null
+++ b/flowsint-web/src/hooks/use-transforms.ts
@@ -0,0 +1,17 @@
+"use client"
+
+import { useQuery } from "@tanstack/react-query"
+import { toast } from "sonner"
+
+export function useTransforms(type: string) {
+ return useQuery({
+ queryKey: ["transforms", type],
+ queryFn: async () => {
+ const response = await fetch(`/api/transforms?type=${encodeURIComponent(type)}`)
+ if (!response.ok) {
+ toast.error("Failed to fetch transforms")
+ }
+ return response.json()
+ },
+ })
+}
diff --git a/flowsint-web/src/lib/action-items.ts b/flowsint-web/src/lib/action-items.ts
index 7cba362f..bf41cbd5 100644
--- a/flowsint-web/src/lib/action-items.ts
+++ b/flowsint-web/src/lib/action-items.ts
@@ -166,7 +166,7 @@ export const actionItems: ActionItem[] = [
size: "h-5 w-5",
},
{
- id: 25,
+ id: 259,
type: "domain",
table: "domains",
key: "domain",
diff --git a/flowsint-web/styles/globals.css b/flowsint-web/styles/globals.css
index eed6cf70..8927d0d7 100644
--- a/flowsint-web/styles/globals.css
+++ b/flowsint-web/styles/globals.css
@@ -204,6 +204,7 @@
--shadow-xl: var(--shadow-xl);
--shadow-2xl: var(--shadow-2xl);
}
+
:root {
--background: oklch(0.96 0 0);
--foreground: oklch(0.32 0 0);
@@ -249,9 +250,9 @@
--shadow-lg: 0px 2px 0px 0px hsl(0 0% 20% / 0.15), 0px 4px 6px -1px hsl(0 0% 20% / 0.15);
--shadow-xl: 0px 2px 0px 0px hsl(0 0% 20% / 0.15), 0px 8px 10px -1px hsl(0 0% 20% / 0.15);
--shadow-2xl: 0px 2px 0px 0px hsl(0 0% 20% / 0.38);
- }
-
- .dark {
+}
+
+.dark {
--background: oklch(0.22 0 0);
--foreground: oklch(0.89 0 0);
--card: oklch(0.24 0 0);
@@ -296,9 +297,9 @@
--shadow-lg: 0px 2px 0px 0px hsl(0 0% 20% / 0.15), 0px 4px 6px -1px hsl(0 0% 20% / 0.15);
--shadow-xl: 0px 2px 0px 0px hsl(0 0% 20% / 0.15), 0px 8px 10px -1px hsl(0 0% 20% / 0.15);
--shadow-2xl: 0px 2px 0px 0px hsl(0 0% 20% / 0.38);
- }
-
- @theme inline {
+}
+
+@theme inline {
--color-background: var(--background);
--color-foreground: var(--foreground);
--color-card: var(--card);
@@ -331,16 +332,16 @@
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
--color-sidebar-border: var(--sidebar-border);
--color-sidebar-ring: var(--sidebar-ring);
-
+
--font-sans: var(--font-sans);
--font-mono: var(--font-mono);
--font-serif: var(--font-serif);
-
+
--radius-sm: calc(var(--radius) - 4px);
--radius-md: calc(var(--radius) - 2px);
--radius-lg: var(--radius);
--radius-xl: calc(var(--radius) + 4px);
-
+
--shadow-2xs: var(--shadow-2xs);
--shadow-xs: var(--shadow-xs);
--shadow-sm: var(--shadow-sm);
@@ -349,4 +350,46 @@
--shadow-lg: var(--shadow-lg);
--shadow-xl: var(--shadow-xl);
--shadow-2xl: var(--shadow-2xl);
- }
\ No newline at end of file
+}
+.cytoscape-navigator{
+ position: relative;
+ background: var(--card);
+ width: 100%;
+ height: 100%;
+ bottom: 0;
+ right: 0;
+ overflow: hidden;
+}
+
+.cytoscape-navigator > img{
+ max-width: 100%;
+ max-height: 100%;
+}
+
+.cytoscape-navigator > canvas{
+ position: absolute;
+ top: 0;
+ left: 0;
+ z-index: 101;
+}
+
+.cytoscape-navigatorView{
+ position: absolute;
+ top: 0;
+ left: 0;
+ cursor: move;
+ background: #B7E1ED;
+ -moz-opacity: 0.50;
+ opacity: 0.50;
+ -ms-filter:"progid:DXImageTransform.Microsoft.Alpha"(Opacity=50);
+ z-index: 102;
+}
+
+.cytoscape-navigatorOverlay{
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ z-index: 103;
+}
\ No newline at end of file
diff --git a/flowsint-web/tsconfig.json b/flowsint-web/tsconfig.json
index 8db84a97..9c30ae13 100644
--- a/flowsint-web/tsconfig.json
+++ b/flowsint-web/tsconfig.json
@@ -23,6 +23,6 @@
"@/*": ["./src/*"]
}
},
- "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "../../ReconOps/src/lib/utils.ts", "src/components/sketches/collide.js", "src/lib/utils/flow.js", "src/app/dashboard/investigations/[investigation_id]/sketch/[sketch_id]/table/page.tss"],
+ "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "../../ReconOps/src/lib/utils.ts", "src/components/sketches/collide.js", "src/lib/utils/flow.js", "src/app/dashboard/investigations/[investigation_id]/sketch/[sketch_id]/table/page.tss", "src/app/dashboard/investigations/[investigation_id]/graph/client.tsw"],
"exclude": ["node_modules"]
}
diff --git a/flowsint-web/yarn.lock b/flowsint-web/yarn.lock
index 8a85cae6..36766d98 100644
--- a/flowsint-web/yarn.lock
+++ b/flowsint-web/yarn.lock
@@ -2728,6 +2728,13 @@ core-js-pure@^3.30.2:
resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.40.0.tgz#d9a019e9160f9b042eeb6abb92242680089d486e"
integrity sha512-AtDzVIgRrmRKQai62yuSIN5vNiQjcJakJb4fbhVw3ehxx7Lohphvw9SGNWKhLFqSxC4ilD0g/L1huAYFQU3Q6A==
+cose-base@^2.2.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/cose-base/-/cose-base-2.2.0.tgz#1c395c35b6e10bb83f9769ca8b817d614add5c01"
+ integrity sha512-AzlgcsCbUMymkADOJtQm3wO9S3ltPfYOFD5033keQn9NJzIbtnZj+UdBJe7DYml/8TdbtHJW3j58SOnKhWY/5g==
+ dependencies:
+ layout-base "^2.0.0"
+
crelt@^1.0.0:
version "1.0.6"
resolved "https://registry.yarnpkg.com/crelt/-/crelt-1.0.6.tgz#7cc898ea74e190fb6ef9dae57f8f81cf7302df72"
@@ -2747,6 +2754,50 @@ csstype@^3.0.2:
resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.3.tgz#d80ff294d114fb0e6ac500fbf85b60137d7eff81"
integrity sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==
+cytoscape-canvas@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/cytoscape-canvas/-/cytoscape-canvas-3.0.1.tgz#7d963be51e6e5f3f2482b05d22562c8ee941d125"
+ integrity sha512-R1nCLnJHGTR5fWEpNQQBPyoigdnfhnk1lOHegzmzz1Kg6yxzVf0hfdRAMa0wPAhtC4kkgyoViiIfZ/zyCqMhEQ==
+
+cytoscape-context-menus@^4.2.1:
+ version "4.2.1"
+ resolved "https://registry.yarnpkg.com/cytoscape-context-menus/-/cytoscape-context-menus-4.2.1.tgz#c19e3ed595cb219f063fae4dd570cbb49ce64a5a"
+ integrity sha512-h0dXq/DGIQUegC+mncawzFT+zV52I5dxME3fDLqO6cd5pYfx9U+u2YZjn29z8YfRjvayBtsxpD6JUvgiH1ZdaQ==
+
+cytoscape-css-variables@^0.1.4:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/cytoscape-css-variables/-/cytoscape-css-variables-0.1.4.tgz#3b3ca301204603e71a013adc6a1ab11e6e7e30a5"
+ integrity sha512-zkwf0XpC+7VT19z15Iwv5ZW8Rt+nBJwzxdkPgFPZF4n34YALCmPlncfzS9z+3mxxxV388xCiXHi1QdoqVFrKoQ==
+
+cytoscape-cxtmenu@^3.5.0:
+ version "3.5.0"
+ resolved "https://registry.yarnpkg.com/cytoscape-cxtmenu/-/cytoscape-cxtmenu-3.5.0.tgz#c1a79e9e63eddfd0a60a287025a36414c897ecf6"
+ integrity sha512-CoqgKAxvQhmHO5fEgJdBqqR2VjwK1dNkxehc2i0MUMqY0araA13z3oP/9KkprHp9Td++KlVBz6JnncNAD76T0Q==
+
+cytoscape-elk@^2.3.0:
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/cytoscape-elk/-/cytoscape-elk-2.3.0.tgz#3f107d914f39119a9680f03593d7e56a1823124f"
+ integrity sha512-1h2ZmPOy5HD2+mrfF3P2ICxfnDyPCWg/xLVs7fIjTOzdQu51ydrMtm6Sb7KnhFwLBzhGIVYI2Gbns0njggBarQ==
+ dependencies:
+ elkjs "^0.9.3"
+
+cytoscape-fcose@^2.2.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/cytoscape-fcose/-/cytoscape-fcose-2.2.0.tgz#e4d6f6490df4fab58ae9cea9e5c3ab8d7472f471"
+ integrity sha512-ki1/VuRIHFCzxWNrsshHYPs6L7TvLu3DL+TyIGEsRcvVERmxokbf5Gdk7mFxZnTdiGtnA4cfSmjZJMviqSuZrQ==
+ dependencies:
+ cose-base "^2.2.0"
+
+cytoscape-navigator@^2.0.2:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/cytoscape-navigator/-/cytoscape-navigator-2.0.2.tgz#4f839797ff05d921be3f22b26c5f237c730f0996"
+ integrity sha512-TZFBLFWEMW858UOt4rzusOjtDj7YT5vNx2uCwpUuicUYbaWCHHcUROBZWO+hiuSPWpVhvGLFlOq3NBcAVYOAgw==
+
+cytoscape@^3.31.2:
+ version "3.31.2"
+ resolved "https://registry.yarnpkg.com/cytoscape/-/cytoscape-3.31.2.tgz#94d5b86d142599a2d6e750f6b2f3102518c7d48e"
+ integrity sha512-/eOXg2uGdMdpGlEes5Sf6zE+jUG+05f3htFNQIxLxduOH/SsaUZiPBfAwP1btVIVzsnhiNOdi+hvDRLYfMZjGw==
+
"d3-array@1 - 3", "d3-array@2 - 3", "[email protected] - 3", "[email protected] - 3", d3-array@3, d3-array@^3.1.6, d3-array@^3.2.0:
version "3.2.4"
resolved "https://registry.yarnpkg.com/d3-array/-/d3-array-3.2.4.tgz#15fec33b237f97ac5d7c986dc77da273a8ed0bb5"
@@ -3264,6 +3315,11 @@ electron-to-chromium@^1.5.73:
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.93.tgz#6fae820ac8bb772a841aa67fce5389e6c6da7ba2"
integrity sha512-M+29jTcfNNoR9NV7la4SwUqzWAxEwnc7ThA5e1m6LRSotmpfpCpLcIfgtSCVL+MllNLgAyM/5ru86iMRemPzDQ==
+elkjs@^0.9.3:
+ version "0.9.3"
+ resolved "https://registry.yarnpkg.com/elkjs/-/elkjs-0.9.3.tgz#16711f8ceb09f1b12b99e971b138a8384a529161"
+ integrity sha512-f/ZeWvW/BCXbhGEf1Ujp29EASo/lk1FDnETgNKwJrsVvGZhUWCZyg3xLJjAsxfOmt8KjswHmI5EwCQcPMpOYhQ==
+
embla-carousel-react@^8.5.2:
version "8.5.2"
resolved "https://registry.yarnpkg.com/embla-carousel-react/-/embla-carousel-react-8.5.2.tgz#f79f6c36690596fe2aceec994372ab84bfbfd9cc"
@@ -4012,11 +4068,30 @@ graphemer@^1.4.0:
resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6"
integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==
-graphology-utils@^2.5.2:
+graphology-layout-forceatlas2@^0.10.1:
+ version "0.10.1"
+ resolved "https://registry.yarnpkg.com/graphology-layout-forceatlas2/-/graphology-layout-forceatlas2-0.10.1.tgz#741842135609d82d12db5a5fdf74672062c28205"
+ integrity sha512-ogzBeF1FvWzjkikrIFwxhlZXvD2+wlY54lqhsrWprcdPjopM2J9HoMweUmIgwaTvY4bUYVimpSsOdvDv1gPRFQ==
+ dependencies:
+ graphology-utils "^2.1.0"
+
+graphology-types@^0.24.8:
+ version "0.24.8"
+ resolved "https://registry.yarnpkg.com/graphology-types/-/graphology-types-0.24.8.tgz#29e42d1fbd61d6504760cb3135e91d7beb4e604b"
+ integrity sha512-hDRKYXa8TsoZHjgEaysSRyPdT6uB78Ci8WnjgbStlQysz7xR52PInxNsmnB7IBOM1BhikxkNyCVEFgmPKnpx3Q==
+
+graphology-utils@^2.1.0, graphology-utils@^2.5.2:
version "2.5.2"
resolved "https://registry.yarnpkg.com/graphology-utils/-/graphology-utils-2.5.2.tgz#4d30d6e567d27c01f105e1494af816742e8d2440"
integrity sha512-ckHg8MXrXJkOARk56ZaSCM1g1Wihe2d6iTmz1enGOz4W/l831MBCKSayeFQfowgF8wd+PQ4rlch/56Vs/VZLDQ==
+graphology@^0.26.0:
+ version "0.26.0"
+ resolved "https://registry.yarnpkg.com/graphology/-/graphology-0.26.0.tgz#7f866a831feaa364af750f141a7bf40489533336"
+ integrity sha512-8SSImzgUUYC89Z042s+0r/vMibY7GX/Emz4LDO5e7jYXhuoWfHISPFJYjpRLUSJGq6UQ6xlenvX1p/hJdfXuXg==
+ dependencies:
+ events "^3.3.0"
+
has-bigints@^1.0.2:
version "1.1.0"
resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.1.0.tgz#28607e965ac967e03cd2a2c70a2636a1edad49fe"
@@ -4546,6 +4621,11 @@ language-tags@^1.0.9:
dependencies:
language-subtag-registry "^0.3.20"
+layout-base@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/layout-base/-/layout-base-2.0.1.tgz#d0337913586c90f9c2c075292069f5c2da5dd285"
+ integrity sha512-dp3s92+uNI1hWIpPGH3jK2kxE2lMjdXdr+DH8ynZHpd6PUlH6x6cbuXnoMmiNumznqaNO31xu9e79F0uuZ0JFg==
+
levn@^0.4.1:
version "0.4.1"
resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade"
diff --git a/node_modules/.bin/mkdirp b/node_modules/.bin/mkdirp
new file mode 120000
index 00000000..0fd51939
--- /dev/null
+++ b/node_modules/.bin/mkdirp
@@ -0,0 +1 @@
+../mkdirp/dist/cjs/src/bin.js
\ No newline at end of file
diff --git a/node_modules/.bin/supabase b/node_modules/.bin/supabase
new file mode 120000
index 00000000..6f888436
--- /dev/null
+++ b/node_modules/.bin/supabase
@@ -0,0 +1 @@
+../supabase/bin/supabase
\ No newline at end of file
diff --git a/node_modules/.yarn-integrity b/node_modules/.yarn-integrity
new file mode 100644
index 00000000..7e1fcc7d
--- /dev/null
+++ b/node_modules/.yarn-integrity
@@ -0,0 +1,55 @@
+{
+ "systemParams": "darwin-x64-127",
+ "modulesFolders": [
+ "node_modules"
+ ],
+ "flags": [],
+ "linkedModules": [],
+ "topLevelPatterns": [
+ "cytoscape-fcose@^2.2.0",
+ "graphology-layout-forceatlas2@^0.10.1",
+ "supabase@^2.19.7"
+ ],
+ "lockfileEntries": {
+ "@isaacs/fs-minipass@^4.0.0": "https://registry.yarnpkg.com/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz#2d59ae3ab4b38fb4270bfa23d30f8e2e86c7fe32",
+ "agent-base@^7.1.2": "https://registry.yarnpkg.com/agent-base/-/agent-base-7.1.3.tgz#29435eb821bc4194633a5b89e5bc4703bafc25a1",
+ "bin-links@^5.0.0": "https://registry.yarnpkg.com/bin-links/-/bin-links-5.0.0.tgz#2b0605b62dd5e1ddab3b92a3c4e24221cae06cca",
+ "chownr@^3.0.0": "https://registry.yarnpkg.com/chownr/-/chownr-3.0.0.tgz#9855e64ecd240a9cc4267ce8a4aa5d24a1da15e4",
+ "cmd-shim@^7.0.0": "https://registry.yarnpkg.com/cmd-shim/-/cmd-shim-7.0.0.tgz#23bcbf69fff52172f7e7c02374e18fb215826d95",
+ "cose-base@^2.2.0": "https://registry.yarnpkg.com/cose-base/-/cose-base-2.2.0.tgz#1c395c35b6e10bb83f9769ca8b817d614add5c01",
+ "cytoscape-fcose@^2.2.0": "https://registry.yarnpkg.com/cytoscape-fcose/-/cytoscape-fcose-2.2.0.tgz#e4d6f6490df4fab58ae9cea9e5c3ab8d7472f471",
+ "data-uri-to-buffer@^4.0.0": "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz#d8feb2b2881e6a4f58c2e08acfd0e2834e26222e",
+ "debug@4": "https://registry.yarnpkg.com/debug/-/debug-4.4.0.tgz#2b3f2aea2ffeb776477460267377dc8710faba8a",
+ "fetch-blob@^3.1.2": "https://registry.yarnpkg.com/fetch-blob/-/fetch-blob-3.2.0.tgz#f09b8d4bbd45adc6f0c20b7e787e793e309dcce9",
+ "fetch-blob@^3.1.4": "https://registry.yarnpkg.com/fetch-blob/-/fetch-blob-3.2.0.tgz#f09b8d4bbd45adc6f0c20b7e787e793e309dcce9",
+ "formdata-polyfill@^4.0.10": "https://registry.yarnpkg.com/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz#24807c31c9d402e002ab3d8c720144ceb8848423",
+ "graphology-layout-forceatlas2@^0.10.1": "https://registry.yarnpkg.com/graphology-layout-forceatlas2/-/graphology-layout-forceatlas2-0.10.1.tgz#741842135609d82d12db5a5fdf74672062c28205",
+ "graphology-utils@^2.1.0": "https://registry.yarnpkg.com/graphology-utils/-/graphology-utils-2.5.2.tgz#4d30d6e567d27c01f105e1494af816742e8d2440",
+ "https-proxy-agent@^7.0.2": "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz#da8dfeac7da130b05c2ba4b59c9b6cd66611a6b9",
+ "imurmurhash@^0.1.4": "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea",
+ "layout-base@^2.0.0": "https://registry.yarnpkg.com/layout-base/-/layout-base-2.0.1.tgz#d0337913586c90f9c2c075292069f5c2da5dd285",
+ "minipass@^7.0.4": "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707",
+ "minipass@^7.1.2": "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707",
+ "minizlib@^3.0.1": "https://registry.yarnpkg.com/minizlib/-/minizlib-3.0.2.tgz#f33d638eb279f664439aa38dc5f91607468cb574",
+ "mkdirp@^3.0.1": "https://registry.yarnpkg.com/mkdirp/-/mkdirp-3.0.1.tgz#e44e4c5607fb279c168241713cc6e0fea9adcb50",
+ "ms@^2.1.3": "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2",
+ "node-domexception@^1.0.0": "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5",
+ "node-fetch@^3.3.2": "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.3.2.tgz#d1e889bacdf733b4ff3b2b243eb7a12866a0b78b",
+ "npm-normalize-package-bin@^4.0.0": "https://registry.yarnpkg.com/npm-normalize-package-bin/-/npm-normalize-package-bin-4.0.0.tgz#df79e70cd0a113b77c02d1fe243c96b8e618acb1",
+ "proc-log@^5.0.0": "https://registry.yarnpkg.com/proc-log/-/proc-log-5.0.0.tgz#e6c93cf37aef33f835c53485f314f50ea906a9d8",
+ "read-cmd-shim@^5.0.0": "https://registry.yarnpkg.com/read-cmd-shim/-/read-cmd-shim-5.0.0.tgz#6e5450492187a0749f6c80dcbef0debc1117acca",
+ "signal-exit@^4.0.1": "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04",
+ "supabase@^2.19.7": "https://registry.yarnpkg.com/supabase/-/supabase-2.22.6.tgz#44e7f215d57ede89feea62ca5cc74c9a7dd6d116",
+ "[email protected]": "https://registry.yarnpkg.com/tar/-/tar-7.4.3.tgz#88bbe9286a3fcd900e94592cda7a22b192e80571",
+ "web-streams-polyfill@^3.0.3": "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz#2073b91a2fdb1fbfbd401e7de0ac9f8214cecb4b",
+ "write-file-atomic@^6.0.0": "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-6.0.0.tgz#e9c89c8191b3ef0606bc79fb92681aa1aa16fa93",
+ "yallist@^5.0.0": "https://registry.yarnpkg.com/yallist/-/yallist-5.0.0.tgz#00e2de443639ed0d78fd87de0d27469fbcffb533"
+ },
+ "files": [],
+ "artifacts": {
+ "bin",
+ "bin/supabase"
+ ]
+ }
+}
\ No newline at end of file
diff --git a/node_modules/@isaacs/fs-minipass/LICENSE b/node_modules/@isaacs/fs-minipass/LICENSE
new file mode 100644
index 00000000..19129e31
--- /dev/null
+++ b/node_modules/@isaacs/fs-minipass/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/@isaacs/fs-minipass/README.md b/node_modules/@isaacs/fs-minipass/README.md
new file mode 100644
index 00000000..dac96e7d
--- /dev/null
+++ b/node_modules/@isaacs/fs-minipass/README.md
@@ -0,0 +1,71 @@
+# fs-minipass
+
+Filesystem streams based on [minipass](http://npm.im/minipass).
+
+4 classes are exported:
+
+- ReadStream
+- ReadStreamSync
+- WriteStream
+- WriteStreamSync
+
+When using `ReadStreamSync`, all of the data is made available
+immediately upon consuming the stream. Nothing is buffered in memory
+when the stream is constructed. If the stream is piped to a writer,
+then it will synchronously `read()` and emit data into the writer as
+fast as the writer can consume it. (That is, it will respect
+backpressure.) If you call `stream.read()` then it will read the
+entire file and return the contents.
+
+When using `WriteStreamSync`, every write is flushed to the file
+synchronously. If your writes all come in a single tick, then it'll
+write it all out in a single tick. It's as synchronous as you are.
+
+The async versions work much like their node builtin counterparts,
+with the exception of introducing significantly less Stream machinery
+overhead.
+
+## USAGE
+
+It's just streams, you pipe them or read() them or write() to them.
+
+```js
+import { ReadStream, WriteStream } from 'fs-minipass'
+// or: const { ReadStream, WriteStream } = require('fs-minipass')
+const readStream = new ReadStream('file.txt')
+const writeStream = new WriteStream('output.txt')
+writeStream.write('some file header or whatever\n')
+readStream.pipe(writeStream)
+```
+
+## ReadStream(path, options)
+
+Path string is required, but somewhat irrelevant if an open file
+descriptor is passed in as an option.
+
+Options:
+
+- `fd` Pass in a numeric file descriptor, if the file is already open.
+- `readSize` The size of reads to do, defaults to 16MB
+- `size` The size of the file, if known. Prevents zero-byte read()
+ call at the end.
+- `autoClose` Set to `false` to prevent the file descriptor from being
+ closed when the file is done being read.
+
+## WriteStream(path, options)
+
+Path string is required, but somewhat irrelevant if an open file
+descriptor is passed in as an option.
+
+Options:
+
+- `fd` Pass in a numeric file descriptor, if the file is already open.
+- `mode` The mode to create the file with. Defaults to `0o666`.
+- `start` The position in the file to start reading. If not
+ specified, then the file will start writing at position zero, and be
+ truncated by default.
+- `autoClose` Set to `false` to prevent the file descriptor from being
+ closed when the stream is ended.
+- `flags` Flags to use when opening the file. Irrelevant if `fd` is
+ passed in, since file won't be opened in that case. Defaults to
+ `'a'` if a `pos` is specified, or `'w'` otherwise.
diff --git a/node_modules/@isaacs/fs-minipass/package.json b/node_modules/@isaacs/fs-minipass/package.json
new file mode 100644
index 00000000..cc4576c4
--- /dev/null
+++ b/node_modules/@isaacs/fs-minipass/package.json
@@ -0,0 +1,72 @@
+{
+ "name": "@isaacs/fs-minipass",
+ "version": "4.0.1",
+ "main": "./dist/commonjs/index.js",
+ "scripts": {
+ "prepare": "tshy",
+ "pretest": "npm run prepare",
+ "test": "tap",
+ "preversion": "npm test",
+ "postversion": "npm publish",
+ "prepublishOnly": "git push origin --follow-tags",
+ "format": "prettier --write . --loglevel warn",
+ "typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts"
+ },
+ "keywords": [],
+ "author": "Isaac Z. Schlueter",
+ "license": "ISC",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/npm/fs-minipass.git"
+ },
+ "description": "fs read and write streams based on minipass",
+ "dependencies": {
+ "minipass": "^7.0.4"
+ },
+ "devDependencies": {
+ "@types/node": "^20.11.30",
+ "mutate-fs": "^2.1.1",
+ "prettier": "^3.2.5",
+ "tap": "^18.7.1",
+ "tshy": "^1.12.0",
+ "typedoc": "^0.25.12"
+ },
+ "files": [
+ "dist"
+ ],
+ "engines": {
+ "node": ">=18.0.0"
+ },
+ "tshy": {
+ "exports": {
+ "./package.json": "./package.json",
+ ".": "./src/index.ts"
+ }
+ },
+ "exports": {
+ "./package.json": "./package.json",
+ ".": {
+ "import": {
+ "types": "./dist/esm/index.d.ts",
+ "default": "./dist/esm/index.js"
+ },
+ "require": {
+ "types": "./dist/commonjs/index.d.ts",
+ "default": "./dist/commonjs/index.js"
+ }
+ }
+ },
+ "types": "./dist/commonjs/index.d.ts",
+ "type": "module",
+ "prettier": {
+ "semi": false,
+ "printWidth": 75,
+ "tabWidth": 2,
+ "useTabs": false,
+ "singleQuote": true,
+ "jsxSingleQuote": false,
+ "bracketSameLine": true,
+ "arrowParens": "avoid",
+ "endOfLine": "lf"
+ }
+}
diff --git a/node_modules/agent-base/LICENSE b/node_modules/agent-base/LICENSE
new file mode 100644
index 00000000..008728cb
--- /dev/null
+++ b/node_modules/agent-base/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2013 Nathan Rajlich <[email protected]>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
diff --git a/node_modules/agent-base/README.md b/node_modules/agent-base/README.md
new file mode 100644
index 00000000..b8a86b9d
--- /dev/null
+++ b/node_modules/agent-base/README.md
@@ -0,0 +1,69 @@
+agent-base
+==========
+### Turn a function into an [`http.Agent`][http.Agent] instance
+
+This module is a thin wrapper around the base `http.Agent` class.
+
+It provides an abstract class that must define a `connect()` function,
+which is responsible for creating the underlying socket that the HTTP
+client requests will use.
+
+The `connect()` function may return an arbitrary `Duplex` stream, or
+another `http.Agent` instance to delegate the request to, and may be
+asynchronous (by defining an `async` function).
+
+Instances of this agent can be used with the `http` and `https`
+modules. To differentiate, the options parameter in the `connect()`
+function includes a `secureEndpoint` property, which can be checked
+to determine what type of socket should be returned.
+
+#### Some subclasses:
+
+Here are some more interesting uses of `agent-base`.
+Send a pull request to list yours!
+
+ * [`http-proxy-agent`][http-proxy-agent]: An HTTP(s) proxy `http.Agent` implementation for HTTP endpoints
+ * [`https-proxy-agent`][https-proxy-agent]: An HTTP(s) proxy `http.Agent` implementation for HTTPS endpoints
+ * [`pac-proxy-agent`][pac-proxy-agent]: A PAC file proxy `http.Agent` implementation for HTTP and HTTPS
+ * [`socks-proxy-agent`][socks-proxy-agent]: A SOCKS proxy `http.Agent` implementation for HTTP and HTTPS
+
+Example
+-------
+
+Here's a minimal example that creates a new `net.Socket` or `tls.Socket`
+based on the `secureEndpoint` property. This agent can be used with both
+the `http` and `https` modules.
+
+```ts
+import * as net from 'net';
+import * as tls from 'tls';
+import * as http from 'http';
+import { Agent } from 'agent-base';
+
+class MyAgent extends Agent {
+ connect(req, opts) {
+ // `secureEndpoint` is true when using the "https" module
+ if (opts.secureEndpoint) {
+ return tls.connect(opts);
+ } else {
+ return net.connect(opts);
+ }
+ }
+});
+
+// Keep alive enabled means that `connect()` will only be
+// invoked when a new connection needs to be created
+const agent = new MyAgent({ keepAlive: true });
+
+// Pass the `agent` option when creating the HTTP request
+http.get('http://nodejs.org/api/', { agent }, (res) => {
+ console.log('"response" event!', res.headers);
+ res.pipe(process.stdout);
+});
+```
+
+[http-proxy-agent]: ../http-proxy-agent
+[https-proxy-agent]: ../https-proxy-agent
+[pac-proxy-agent]: ../pac-proxy-agent
+[socks-proxy-agent]: ../socks-proxy-agent
+[http.Agent]: https://nodejs.org/api/http.html#http_class_http_agent
diff --git a/node_modules/agent-base/package.json b/node_modules/agent-base/package.json
new file mode 100644
index 00000000..175ee71f
--- /dev/null
+++ b/node_modules/agent-base/package.json
@@ -0,0 +1,46 @@
+{
+ "name": "agent-base",
+ "version": "7.1.3",
+ "description": "Turn a function into an `http.Agent` instance",
+ "main": "./dist/index.js",
+ "types": "./dist/index.d.ts",
+ "files": [
+ "dist"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/TooTallNate/proxy-agents.git",
+ "directory": "packages/agent-base"
+ },
+ "keywords": [
+ "http",
+ "agent",
+ "base",
+ "barebones",
+ "https"
+ ],
+ "author": "Nathan Rajlich <[email protected]> (http://n8.io/)",
+ "license": "MIT",
+ "devDependencies": {
+ "@types/debug": "^4.1.7",
+ "@types/jest": "^29.5.1",
+ "@types/node": "^14.18.45",
+ "@types/semver": "^7.3.13",
+ "@types/ws": "^6.0.4",
+ "async-listen": "^3.0.0",
+ "jest": "^29.5.0",
+ "ts-jest": "^29.1.0",
+ "typescript": "^5.0.4",
+ "ws": "^5.2.4",
+ "tsconfig": "0.0.0"
+ },
+ "engines": {
+ "node": ">= 14"
+ },
+ "scripts": {
+ "build": "tsc",
+ "test": "jest --env node --verbose --bail",
+ "lint": "eslint . --ext .ts",
+ "pack": "node ../../scripts/pack.mjs"
+ }
+}
\ No newline at end of file
diff --git a/node_modules/bin-links/LICENSE b/node_modules/bin-links/LICENSE
new file mode 100644
index 00000000..19cec97b
--- /dev/null
+++ b/node_modules/bin-links/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) npm, Inc.
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/bin-links/README.md b/node_modules/bin-links/README.md
new file mode 100644
index 00000000..19ff1915
--- /dev/null
+++ b/node_modules/bin-links/README.md
@@ -0,0 +1,90 @@
+# bin-links [![npm version](https://img.shields.io/npm/v/bin-links.svg)](https://npm.im/bin-links) [![license](https://img.shields.io/npm/l/bin-links.svg)](https://npm.im/bin-links) [![Travis](https://img.shields.io/travis/npm/bin-links.svg)](https://travis-ci.org/npm/bin-links) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/npm/bin-links?svg=true)](https://ci.appveyor.com/project/npm/bin-links) [![Coverage Status](https://coveralls.io/repos/github/npm/bin-links/badge.svg?branch=latest)](https://coveralls.io/github/npm/bin-links?branch=latest)
+
+[`bin-links`](https://github.com/npm/bin-links) is a standalone library that links
+binaries and man pages for JavaScript packages
+
+## Install
+
+`$ npm install bin-links`
+
+## Table of Contents
+
+* [Example](#example)
+* [Features](#features)
+* [Contributing](#contributing)
+* [API](#api)
+ * [`binLinks`](#binLinks)
+ * [`binLinks.getPaths()`](#getPaths)
+ * [`binLinks.checkBins()`](#checkBins)
+
+### Example
+
+```javascript
+const binLinks = require('bin-links')
+const readPackageJson = require('read-package-json-fast')
+binLinks({
+ path: '/path/to/node_modules/some-package',
+ pkg: readPackageJson('/path/to/node_modules/some-package/package.json'),
+
+ // true if it's a global install, false for local. default: false
+ global: true,
+
+ // true if it's the top level package being installed, false otherwise
+ top: true,
+
+ // true if you'd like to recklessly overwrite files.
+ force: true,
+})
+```
+
+### Features
+
+* Links bin files listed under the `bin` property of pkg to the
+ `node_modules/.bin` directory of the installing environment. (Or
+ `${prefix}/bin` for top level global packages on unix, and `${prefix}`
+ for top level global packages on Windows.)
+* Links man files listed under the `man` property of pkg to the share/man
+ directory. (This is only done for top-level global packages on Unix
+ systems.)
+
+### Contributing
+
+The npm team enthusiastically welcomes contributions and project participation!
+There's a bunch of things you can do if you want to contribute! The [Contributor
+Guide](CONTRIBUTING.md) has all the information you need for everything from
+reporting bugs to contributing entire new features. Please don't hesitate to
+jump in if you'd like to, or even ask us questions if something isn't clear.
+
+### API
+
+#### <a name="binLinks"></a> `> binLinks({path, pkg, force, global, top})`
+
+Returns a Promise that resolves when the requisite things have been linked.
+
+#### <a name="getPaths"></a> `> binLinks.getPaths({path, pkg, global, top })`
+
+Returns an array of all the paths of links and shims that _might_ be
+created (assuming that they exist!) for the package at the specified path.
+
+Does not touch the filesystem.
+
+#### <a name="checkBins"></a> `> binLinks.checkBins({path, pkg, global, top, force })`
+
+Checks if there are any conflicting bins which will prevent the linking of
+bins for the given package. Returns a Promise that resolves with no value
+if the way is clear, and rejects if there's something in the way.
+
+Always returns successfully if `global` or `top` are false, or if `force`
+is true, or if the `pkg` object does not contain any bins to link.
+
+Note that changes to the file system _may_ still cause the `binLinks`
+method to fail even if this method succeeds. Does not check for
+conflicting `man` links.
+
+Reads from the filesystem but does not make any changes.
+
+##### Example
+
+```javascript
+binLinks({path, pkg, force, global, top}).then(() => console.log('bins linked!'))
+```
diff --git a/node_modules/bin-links/package.json b/node_modules/bin-links/package.json
new file mode 100644
index 00000000..22858d66
--- /dev/null
+++ b/node_modules/bin-links/package.json
@@ -0,0 +1,61 @@
+{
+ "name": "bin-links",
+ "version": "5.0.0",
+ "description": "JavaScript package binary linker",
+ "main": "./lib/index.js",
+ "scripts": {
+ "snap": "tap",
+ "test": "tap",
+ "lint": "npm run eslint",
+ "postlint": "template-oss-check",
+ "lintfix": "npm run eslint -- --fix",
+ "posttest": "npm run lint",
+ "template-oss-apply": "template-oss-apply --force",
+ "eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\""
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/npm/bin-links.git"
+ },
+ "keywords": [
+ "npm",
+ "link",
+ "bins"
+ ],
+ "license": "ISC",
+ "dependencies": {
+ "cmd-shim": "^7.0.0",
+ "npm-normalize-package-bin": "^4.0.0",
+ "proc-log": "^5.0.0",
+ "read-cmd-shim": "^5.0.0",
+ "write-file-atomic": "^6.0.0"
+ },
+ "devDependencies": {
+ "@npmcli/eslint-config": "^5.0.0",
+ "@npmcli/template-oss": "4.23.3",
+ "require-inject": "^1.4.4",
+ "tap": "^16.0.1"
+ },
+ "tap": {
+ "check-coverage": true,
+ "coverage-map": "map.js",
+ "nyc-arg": [
+ "--exclude",
+ "tap-snapshots/**"
+ ]
+ },
+ "files": [
+ "bin/",
+ "lib/"
+ ],
+ "engines": {
+ "node": "^18.17.0 || >=20.5.0"
+ },
+ "author": "GitHub Inc.",
+ "templateOSS": {
+ "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
+ "windowsCI": false,
+ "version": "4.23.3",
+ "publish": true
+ }
+}
diff --git a/node_modules/chownr/LICENSE.md b/node_modules/chownr/LICENSE.md
new file mode 100644
index 00000000..881248b6
--- /dev/null
+++ b/node_modules/chownr/LICENSE.md
@@ -0,0 +1,63 @@
+All packages under `src/` are licensed according to the terms in
+their respective `LICENSE` or `LICENSE.md` files.
+
+The remainder of this project is licensed under the Blue Oak
+Model License, as follows:
+
+-----
+
+# Blue Oak Model License
+
+Version 1.0.0
+
+## Purpose
+
+This license gives everyone as much permission to work with
+this software as possible, while protecting contributors
+from liability.
+
+## Acceptance
+
+In order to receive this license, you must agree to its
+rules. The rules of this license are both obligations
+under that agreement and conditions to your license.
+You must not do anything with this software that triggers
+a rule that you cannot or will not follow.
+
+## Copyright
+
+Each contributor licenses you to do everything with this
+software that would otherwise infringe that contributor's
+copyright in it.
+
+## Notices
+
+You must ensure that everyone who gets a copy of
+any part of this software from you, with or without
+changes, also gets the text of this license or a link to
+<https://blueoakcouncil.org/license/1.0.0>.
+
+## Excuse
+
+If anyone notifies you in writing that you have not
+complied with [Notices](#notices), you can keep your
+license by taking all practical steps to comply within 30
+days after the notice. If you do not do so, your license
+ends immediately.
+
+## Patent
+
+Each contributor licenses you to do everything with this
+software that would otherwise infringe any patent claims
+they can license or become able to license.
+
+## Reliability
+
+No contributor can revoke this license.
+
+## No Liability
+
+***As far as the law allows, this software comes as is,
+without any warranty or condition, and no contributor
+will be liable to anyone for any damages related to this
+software or this license, under any kind of legal claim.***
diff --git a/node_modules/chownr/README.md b/node_modules/chownr/README.md
new file mode 100644
index 00000000..70e9a54a
--- /dev/null
+++ b/node_modules/chownr/README.md
@@ -0,0 +1,3 @@
+Like `chown -R`.
+
+Takes the same arguments as `fs.chown()`
diff --git a/node_modules/chownr/package.json b/node_modules/chownr/package.json
new file mode 100644
index 00000000..09aa6b2e
--- /dev/null
+++ b/node_modules/chownr/package.json
@@ -0,0 +1,69 @@
+{
+ "author": "Isaac Z. Schlueter <[email protected]> (http://blog.izs.me/)",
+ "name": "chownr",
+ "description": "like `chown -R`",
+ "version": "3.0.0",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/chownr.git"
+ },
+ "files": [
+ "dist"
+ ],
+ "devDependencies": {
+ "@types/node": "^20.12.5",
+ "mkdirp": "^3.0.1",
+ "prettier": "^3.2.5",
+ "rimraf": "^5.0.5",
+ "tap": "^18.7.2",
+ "tshy": "^1.13.1",
+ "typedoc": "^0.25.12"
+ },
+ "scripts": {
+ "prepare": "tshy",
+ "pretest": "npm run prepare",
+ "test": "tap",
+ "preversion": "npm test",
+ "postversion": "npm publish",
+ "prepublishOnly": "git push origin --follow-tags",
+ "format": "prettier --write . --loglevel warn",
+ "typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts"
+ },
+ "license": "BlueOak-1.0.0",
+ "engines": {
+ "node": ">=18"
+ },
+ "tshy": {
+ "exports": {
+ "./package.json": "./package.json",
+ ".": "./src/index.ts"
+ }
+ },
+ "exports": {
+ "./package.json": "./package.json",
+ ".": {
+ "import": {
+ "types": "./dist/esm/index.d.ts",
+ "default": "./dist/esm/index.js"
+ },
+ "require": {
+ "types": "./dist/commonjs/index.d.ts",
+ "default": "./dist/commonjs/index.js"
+ }
+ }
+ },
+ "main": "./dist/commonjs/index.js",
+ "types": "./dist/commonjs/index.d.ts",
+ "type": "module",
+ "prettier": {
+ "semi": false,
+ "printWidth": 75,
+ "tabWidth": 2,
+ "useTabs": false,
+ "singleQuote": true,
+ "jsxSingleQuote": false,
+ "bracketSameLine": true,
+ "arrowParens": "avoid",
+ "endOfLine": "lf"
+ }
+}
diff --git a/node_modules/cmd-shim/LICENSE b/node_modules/cmd-shim/LICENSE
new file mode 100644
index 00000000..20a47625
--- /dev/null
+++ b/node_modules/cmd-shim/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) npm, Inc. and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/cmd-shim/README.md b/node_modules/cmd-shim/README.md
new file mode 100644
index 00000000..3fb282f6
--- /dev/null
+++ b/node_modules/cmd-shim/README.md
@@ -0,0 +1,34 @@
+# cmd-shim
+
+The cmd-shim used in npm to create executable scripts on Windows,
+since symlinks are not suitable for this purpose there.
+
+On Unix systems, you should use a symbolic link instead.
+
+[![Build Status](https://img.shields.io/github/actions/workflow/status/npm/cmd-shim/ci.yml?branch=main)](https://github.com/npm/cmd-shim)
+[![Dependency Status](https://img.shields.io/librariesio/github/npm/cmd-shim)](https://libraries.io/npm/cmd-shim)
+[![npm version](https://img.shields.io/npm/v/cmd-shim.svg)](https://www.npmjs.com/package/cmd-shim)
+
+## Installation
+
+```
+npm install cmd-shim
+```
+
+## API
+
+### cmdShim(from, to) -> Promise
+
+Create a cmd shim at `to` for the command line program at `from`.
+e.g.
+
+```javascript
+var cmdShim = require('cmd-shim');
+cmdShim(__dirname + '/cli.js', '/usr/bin/command-name').then(() => {
+ // shims are created!
+})
+```
+
+### cmdShim.ifExists(from, to) -> Promise
+
+The same as above, but will just continue if the file does not exist.
diff --git a/node_modules/cmd-shim/package.json b/node_modules/cmd-shim/package.json
new file mode 100644
index 00000000..5f2e85d1
--- /dev/null
+++ b/node_modules/cmd-shim/package.json
@@ -0,0 +1,48 @@
+{
+ "name": "cmd-shim",
+ "version": "7.0.0",
+ "description": "Used in npm for command line application support",
+ "scripts": {
+ "test": "tap",
+ "snap": "tap",
+ "lint": "npm run eslint",
+ "postlint": "template-oss-check",
+ "template-oss-apply": "template-oss-apply --force",
+ "lintfix": "npm run eslint -- --fix",
+ "posttest": "npm run lint",
+ "eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\""
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/npm/cmd-shim.git"
+ },
+ "license": "ISC",
+ "devDependencies": {
+ "@npmcli/eslint-config": "^5.0.0",
+ "@npmcli/template-oss": "4.23.1",
+ "tap": "^16.0.1"
+ },
+ "files": [
+ "bin/",
+ "lib/"
+ ],
+ "main": "lib/index.js",
+ "tap": {
+ "before": "test/00-setup.js",
+ "after": "test/zz-cleanup.js",
+ "check-coverage": true,
+ "nyc-arg": [
+ "--exclude",
+ "tap-snapshots/**"
+ ]
+ },
+ "engines": {
+ "node": "^18.17.0 || >=20.5.0"
+ },
+ "author": "GitHub Inc.",
+ "templateOSS": {
+ "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
+ "version": "4.23.1",
+ "publish": true
+ }
+}
diff --git a/node_modules/cose-base/.babelrc b/node_modules/cose-base/.babelrc
new file mode 100644
index 00000000..002b4aa0
--- /dev/null
+++ b/node_modules/cose-base/.babelrc
@@ -0,0 +1,3 @@
+{
+ "presets": ["env"]
+}
diff --git a/node_modules/cose-base/LICENSE b/node_modules/cose-base/LICENSE
new file mode 100644
index 00000000..0c3c5fc6
--- /dev/null
+++ b/node_modules/cose-base/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2019 - present, iVis@Bilkent.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/cose-base/README.md b/node_modules/cose-base/README.md
new file mode 100644
index 00000000..12d045fb
--- /dev/null
+++ b/node_modules/cose-base/README.md
@@ -0,0 +1,26 @@
+cose-base
+================================================================================
+
+## Description
+
+This is a core module for compound spring embedder based layout styles such as CoSE-Bilkent, fCoSE, and CiSE.
+
+## Dependencies
+
+ * layout-base ^2.0.0
+
+## Usage instructions
+
+Add `cose-base` as a dependecy to your layout extension.
+
+`require()` in the extension to reach functionality:
+
+ * `var CoSEConstants = require('cose-base').CoSEConstants`,
+ * `var CoSELayout = require('cose-base').CoSELayout`,
+ * `...`
+
+To reach functionality of `layout-base`:
+
+ * `var Integer = require('cose-base').layoutBase.Integer`,
+ * `var Layout = require('cose-base').layoutBase.Layout`,
+ * `...`
diff --git a/node_modules/cose-base/bower.json b/node_modules/cose-base/bower.json
new file mode 100644
index 00000000..0eae1f6d
--- /dev/null
+++ b/node_modules/cose-base/bower.json
@@ -0,0 +1,23 @@
+{
+ "name": "cose-base",
+ "description": "Core module for compound spring embedder based layout styles",
+ "main": "cose-base.js",
+ "dependencies": {
+ "layout-base": "^1.0.0"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/iVis-at-Bilkent/cose-base.git"
+ },
+ "ignore": [
+ "**/.*",
+ "node_modules",
+ "bower_components",
+ "test",
+ "tests"
+ ],
+ "keywords": [
+ "layout"
+ ],
+ "license": "MIT"
+}
diff --git a/node_modules/cose-base/cose-base.js b/node_modules/cose-base/cose-base.js
new file mode 100644
index 00000000..49ccc660
--- /dev/null
+++ b/node_modules/cose-base/cose-base.js
@@ -0,0 +1,3214 @@
+(function webpackUniversalModuleDefinition(root, factory) {
+ if(typeof exports === 'object' && typeof module === 'object')
+ module.exports = factory(require("layout-base"));
+ else if(typeof define === 'function' && define.amd)
+ define(["layout-base"], factory);
+ else if(typeof exports === 'object')
+ exports["coseBase"] = factory(require("layout-base"));
+ else
+ root["coseBase"] = factory(root["layoutBase"]);
+})(this, function(__WEBPACK_EXTERNAL_MODULE__551__) {
+return /******/ (() => { // webpackBootstrap
+/******/ "use strict";
+/******/ var __webpack_modules__ = ({
+
+/***/ 45:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+
+
+var coseBase = {};
+
+coseBase.layoutBase = __webpack_require__(551);
+coseBase.CoSEConstants = __webpack_require__(806);
+coseBase.CoSEEdge = __webpack_require__(767);
+coseBase.CoSEGraph = __webpack_require__(880);
+coseBase.CoSEGraphManager = __webpack_require__(578);
+coseBase.CoSELayout = __webpack_require__(765);
+coseBase.CoSENode = __webpack_require__(991);
+coseBase.ConstraintHandler = __webpack_require__(902);
+
+module.exports = coseBase;
+
+/***/ }),
+
+/***/ 806:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+
+
+var FDLayoutConstants = __webpack_require__(551).FDLayoutConstants;
+
+function CoSEConstants() {}
+
+//CoSEConstants inherits static props in FDLayoutConstants
+for (var prop in FDLayoutConstants) {
+ CoSEConstants[prop] = FDLayoutConstants[prop];
+}
+
+CoSEConstants.DEFAULT_USE_MULTI_LEVEL_SCALING = false;
+CoSEConstants.DEFAULT_RADIAL_SEPARATION = FDLayoutConstants.DEFAULT_EDGE_LENGTH;
+CoSEConstants.DEFAULT_COMPONENT_SEPERATION = 60;
+CoSEConstants.TILE = true;
+CoSEConstants.TILING_PADDING_VERTICAL = 10;
+CoSEConstants.TILING_PADDING_HORIZONTAL = 10;
+CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = true;
+CoSEConstants.ENFORCE_CONSTRAINTS = true;
+CoSEConstants.APPLY_LAYOUT = true;
+CoSEConstants.RELAX_MOVEMENT_ON_CONSTRAINTS = true;
+CoSEConstants.TREE_REDUCTION_ON_INCREMENTAL = true; // this should be set to false if there will be a constraint
+// This constant is for differentiating whether actual layout algorithm that uses cose-base wants to apply only incremental layout or
+// an incremental layout on top of a randomized layout. If it is only incremental layout, then this constant should be true.
+CoSEConstants.PURE_INCREMENTAL = CoSEConstants.DEFAULT_INCREMENTAL;
+
+module.exports = CoSEConstants;
+
+/***/ }),
+
+/***/ 767:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+
+
+var FDLayoutEdge = __webpack_require__(551).FDLayoutEdge;
+
+function CoSEEdge(source, target, vEdge) {
+ FDLayoutEdge.call(this, source, target, vEdge);
+}
+
+CoSEEdge.prototype = Object.create(FDLayoutEdge.prototype);
+for (var prop in FDLayoutEdge) {
+ CoSEEdge[prop] = FDLayoutEdge[prop];
+}
+
+module.exports = CoSEEdge;
+
+/***/ }),
+
+/***/ 880:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+
+
+var LGraph = __webpack_require__(551).LGraph;
+
+function CoSEGraph(parent, graphMgr, vGraph) {
+ LGraph.call(this, parent, graphMgr, vGraph);
+}
+
+CoSEGraph.prototype = Object.create(LGraph.prototype);
+for (var prop in LGraph) {
+ CoSEGraph[prop] = LGraph[prop];
+}
+
+module.exports = CoSEGraph;
+
+/***/ }),
+
+/***/ 578:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+
+
+var LGraphManager = __webpack_require__(551).LGraphManager;
+
+function CoSEGraphManager(layout) {
+ LGraphManager.call(this, layout);
+}
+
+CoSEGraphManager.prototype = Object.create(LGraphManager.prototype);
+for (var prop in LGraphManager) {
+ CoSEGraphManager[prop] = LGraphManager[prop];
+}
+
+module.exports = CoSEGraphManager;
+
+/***/ }),
+
+/***/ 765:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+
+
+var FDLayout = __webpack_require__(551).FDLayout;
+var CoSEGraphManager = __webpack_require__(578);
+var CoSEGraph = __webpack_require__(880);
+var CoSENode = __webpack_require__(991);
+var CoSEEdge = __webpack_require__(767);
+var CoSEConstants = __webpack_require__(806);
+var ConstraintHandler = __webpack_require__(902);
+var FDLayoutConstants = __webpack_require__(551).FDLayoutConstants;
+var LayoutConstants = __webpack_require__(551).LayoutConstants;
+var Point = __webpack_require__(551).Point;
+var PointD = __webpack_require__(551).PointD;
+var DimensionD = __webpack_require__(551).DimensionD;
+var Layout = __webpack_require__(551).Layout;
+var Integer = __webpack_require__(551).Integer;
+var IGeometry = __webpack_require__(551).IGeometry;
+var LGraph = __webpack_require__(551).LGraph;
+var Transform = __webpack_require__(551).Transform;
+var LinkedList = __webpack_require__(551).LinkedList;
+
+function CoSELayout() {
+ FDLayout.call(this);
+
+ this.toBeTiled = {}; // Memorize if a node is to be tiled or is tiled
+ this.constraints = {}; // keep layout constraints
+}
+
+CoSELayout.prototype = Object.create(FDLayout.prototype);
+
+for (var prop in FDLayout) {
+ CoSELayout[prop] = FDLayout[prop];
+}
+
+CoSELayout.prototype.newGraphManager = function () {
+ var gm = new CoSEGraphManager(this);
+ this.graphManager = gm;
+ return gm;
+};
+
+CoSELayout.prototype.newGraph = function (vGraph) {
+ return new CoSEGraph(null, this.graphManager, vGraph);
+};
+
+CoSELayout.prototype.newNode = function (vNode) {
+ return new CoSENode(this.graphManager, vNode);
+};
+
+CoSELayout.prototype.newEdge = function (vEdge) {
+ return new CoSEEdge(null, null, vEdge);
+};
+
+CoSELayout.prototype.initParameters = function () {
+ FDLayout.prototype.initParameters.call(this, arguments);
+ if (!this.isSubLayout) {
+ if (CoSEConstants.DEFAULT_EDGE_LENGTH < 10) {
+ this.idealEdgeLength = 10;
+ } else {
+ this.idealEdgeLength = CoSEConstants.DEFAULT_EDGE_LENGTH;
+ }
+
+ this.useSmartIdealEdgeLengthCalculation = CoSEConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION;
+ this.gravityConstant = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH;
+ this.compoundGravityConstant = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH;
+ this.gravityRangeFactor = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR;
+ this.compoundGravityRangeFactor = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR;
+
+ // variables for tree reduction support
+ this.prunedNodesAll = [];
+ this.growTreeIterations = 0;
+ this.afterGrowthIterations = 0;
+ this.isTreeGrowing = false;
+ this.isGrowthFinished = false;
+ }
+};
+
+// This method is used to set CoSE related parameters used by spring embedder.
+CoSELayout.prototype.initSpringEmbedder = function () {
+ FDLayout.prototype.initSpringEmbedder.call(this);
+
+ // variables for cooling
+ this.coolingCycle = 0;
+ this.maxCoolingCycle = this.maxIterations / FDLayoutConstants.CONVERGENCE_CHECK_PERIOD;
+ this.finalTemperature = 0.04;
+ this.coolingAdjuster = 1;
+};
+
+CoSELayout.prototype.layout = function () {
+ var createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED;
+ if (createBendsAsNeeded) {
+ this.createBendpoints();
+ this.graphManager.resetAllEdges();
+ }
+
+ this.level = 0;
+ return this.classicLayout();
+};
+
+CoSELayout.prototype.classicLayout = function () {
+ this.nodesWithGravity = this.calculateNodesToApplyGravitationTo();
+ this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity);
+ this.calcNoOfChildrenForAllNodes();
+ this.graphManager.calcLowestCommonAncestors();
+ this.graphManager.calcInclusionTreeDepths();
+ this.graphManager.getRoot().calcEstimatedSize();
+ this.calcIdealEdgeLengths();
+
+ if (!this.incremental) {
+ var forest = this.getFlatForest();
+
+ // The graph associated with this layout is flat and a forest
+ if (forest.length > 0) {
+ this.positionNodesRadially(forest);
+ }
+ // The graph associated with this layout is not flat or a forest
+ else {
+ // Reduce the trees when incremental mode is not enabled and graph is not a forest
+ this.reduceTrees();
+ // Update nodes that gravity will be applied
+ this.graphManager.resetAllNodesToApplyGravitation();
+ var allNodes = new Set(this.getAllNodes());
+ var intersection = this.nodesWithGravity.filter(function (x) {
+ return allNodes.has(x);
+ });
+ this.graphManager.setAllNodesToApplyGravitation(intersection);
+
+ this.positionNodesRandomly();
+ }
+ } else {
+ if (CoSEConstants.TREE_REDUCTION_ON_INCREMENTAL) {
+ // Reduce the trees in incremental mode if only this constant is set to true
+ this.reduceTrees();
+ // Update nodes that gravity will be applied
+ this.graphManager.resetAllNodesToApplyGravitation();
+ var allNodes = new Set(this.getAllNodes());
+ var intersection = this.nodesWithGravity.filter(function (x) {
+ return allNodes.has(x);
+ });
+ this.graphManager.setAllNodesToApplyGravitation(intersection);
+ }
+ }
+
+ if (Object.keys(this.constraints).length > 0) {
+ ConstraintHandler.handleConstraints(this);
+ this.initConstraintVariables();
+ }
+
+ this.initSpringEmbedder();
+ if (CoSEConstants.APPLY_LAYOUT) {
+ this.runSpringEmbedder();
+ }
+
+ return true;
+};
+
+CoSELayout.prototype.tick = function () {
+ this.totalIterations++;
+
+ if (this.totalIterations === this.maxIterations && !this.isTreeGrowing && !this.isGrowthFinished) {
+ if (this.prunedNodesAll.length > 0) {
+ this.isTreeGrowing = true;
+ } else {
+ return true;
+ }
+ }
+
+ if (this.totalIterations % FDLayoutConstants.CONVERGENCE_CHECK_PERIOD == 0 && !this.isTreeGrowing && !this.isGrowthFinished) {
+ if (this.isConverged()) {
+ if (this.prunedNodesAll.length > 0) {
+ this.isTreeGrowing = true;
+ } else {
+ return true;
+ }
+ }
+
+ this.coolingCycle++;
+
+ if (this.layoutQuality == 0) {
+ // quality - "draft"
+ this.coolingAdjuster = this.coolingCycle;
+ } else if (this.layoutQuality == 1) {
+ // quality - "default"
+ this.coolingAdjuster = this.coolingCycle / 3;
+ }
+
+ // cooling schedule is based on http://www.btluke.com/simanf1.html -> cooling schedule 3
+ this.coolingFactor = Math.max(this.initialCoolingFactor - Math.pow(this.coolingCycle, Math.log(100 * (this.initialCoolingFactor - this.finalTemperature)) / Math.log(this.maxCoolingCycle)) / 100 * this.coolingAdjuster, this.finalTemperature);
+ this.animationPeriod = Math.ceil(this.initialAnimationPeriod * Math.sqrt(this.coolingFactor));
+ }
+ // Operations while tree is growing again
+ if (this.isTreeGrowing) {
+ if (this.growTreeIterations % 10 == 0) {
+ if (this.prunedNodesAll.length > 0) {
+ this.graphManager.updateBounds();
+ this.updateGrid();
+ this.growTree(this.prunedNodesAll);
+ // Update nodes that gravity will be applied
+ this.graphManager.resetAllNodesToApplyGravitation();
+ var allNodes = new Set(this.getAllNodes());
+ var intersection = this.nodesWithGravity.filter(function (x) {
+ return allNodes.has(x);
+ });
+ this.graphManager.setAllNodesToApplyGravitation(intersection);
+
+ this.graphManager.updateBounds();
+ this.updateGrid();
+ if (CoSEConstants.PURE_INCREMENTAL) this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL / 2;else this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL;
+ } else {
+ this.isTreeGrowing = false;
+ this.isGrowthFinished = true;
+ }
+ }
+ this.growTreeIterations++;
+ }
+ // Operations after growth is finished
+ if (this.isGrowthFinished) {
+ if (this.isConverged()) {
+ return true;
+ }
+ if (this.afterGrowthIterations % 10 == 0) {
+ this.graphManager.updateBounds();
+ this.updateGrid();
+ }
+ if (CoSEConstants.PURE_INCREMENTAL) this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL / 2 * ((100 - this.afterGrowthIterations) / 100);else this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL * ((100 - this.afterGrowthIterations) / 100);
+ this.afterGrowthIterations++;
+ }
+
+ var gridUpdateAllowed = !this.isTreeGrowing && !this.isGrowthFinished;
+ var forceToNodeSurroundingUpdate = this.growTreeIterations % 10 == 1 && this.isTreeGrowing || this.afterGrowthIterations % 10 == 1 && this.isGrowthFinished;
+
+ this.totalDisplacement = 0;
+ this.graphManager.updateBounds();
+ this.calcSpringForces();
+ this.calcRepulsionForces(gridUpdateAllowed, forceToNodeSurroundingUpdate);
+ this.calcGravitationalForces();
+ this.moveNodes();
+ this.animate();
+
+ return false; // Layout is not ended yet return false
+};
+
+CoSELayout.prototype.getPositionsData = function () {
+ var allNodes = this.graphManager.getAllNodes();
+ var pData = {};
+ for (var i = 0; i < allNodes.length; i++) {
+ var rect = allNodes[i].rect;
+ var id = allNodes[i].id;
+ pData[id] = {
+ id: id,
+ x: rect.getCenterX(),
+ y: rect.getCenterY(),
+ w: rect.width,
+ h: rect.height
+ };
+ }
+
+ return pData;
+};
+
+CoSELayout.prototype.runSpringEmbedder = function () {
+ this.initialAnimationPeriod = 25;
+ this.animationPeriod = this.initialAnimationPeriod;
+ var layoutEnded = false;
+
+ // If aminate option is 'during' signal that layout is supposed to start iterating
+ if (FDLayoutConstants.ANIMATE === 'during') {
+ this.emit('layoutstarted');
+ } else {
+ // If aminate option is 'during' tick() function will be called on index.js
+ while (!layoutEnded) {
+ layoutEnded = this.tick();
+ }
+
+ this.graphManager.updateBounds();
+ }
+};
+
+// overrides moveNodes method in FDLayout
+CoSELayout.prototype.moveNodes = function () {
+ var lNodes = this.getAllNodes();
+ var node;
+
+ // calculate displacement for each node
+ for (var i = 0; i < lNodes.length; i++) {
+ node = lNodes[i];
+ node.calculateDisplacement();
+ }
+
+ if (Object.keys(this.constraints).length > 0) {
+ this.updateDisplacements();
+ }
+
+ // move each node
+ for (var i = 0; i < lNodes.length; i++) {
+ node = lNodes[i];
+ node.move();
+ }
+};
+
+// constraint related methods: initConstraintVariables and updateDisplacements
+
+// initialize constraint related variables
+CoSELayout.prototype.initConstraintVariables = function () {
+ var self = this;
+ this.idToNodeMap = new Map();
+ this.fixedNodeSet = new Set();
+
+ var allNodes = this.graphManager.getAllNodes();
+
+ // fill idToNodeMap
+ for (var i = 0; i < allNodes.length; i++) {
+ var node = allNodes[i];
+ this.idToNodeMap.set(node.id, node);
+ }
+
+ // calculate fixed node weight for given compound node
+ var calculateCompoundWeight = function calculateCompoundWeight(compoundNode) {
+ var nodes = compoundNode.getChild().getNodes();
+ var node;
+ var fixedNodeWeight = 0;
+ for (var i = 0; i < nodes.length; i++) {
+ node = nodes[i];
+ if (node.getChild() == null) {
+ if (self.fixedNodeSet.has(node.id)) {
+ fixedNodeWeight += 100;
+ }
+ } else {
+ fixedNodeWeight += calculateCompoundWeight(node);
+ }
+ }
+ return fixedNodeWeight;
+ };
+
+ if (this.constraints.fixedNodeConstraint) {
+ // fill fixedNodeSet
+ this.constraints.fixedNodeConstraint.forEach(function (nodeData) {
+ self.fixedNodeSet.add(nodeData.nodeId);
+ });
+
+ // assign fixed node weights to compounds if they contain fixed nodes
+ var allNodes = this.graphManager.getAllNodes();
+ var node;
+
+ for (var i = 0; i < allNodes.length; i++) {
+ node = allNodes[i];
+ if (node.getChild() != null) {
+ var fixedNodeWeight = calculateCompoundWeight(node);
+ if (fixedNodeWeight > 0) {
+ node.fixedNodeWeight = fixedNodeWeight;
+ }
+ }
+ }
+ }
+
+ if (this.constraints.relativePlacementConstraint) {
+ var nodeToDummyForVerticalAlignment = new Map();
+ var nodeToDummyForHorizontalAlignment = new Map();
+ this.dummyToNodeForVerticalAlignment = new Map();
+ this.dummyToNodeForHorizontalAlignment = new Map();
+ this.fixedNodesOnHorizontal = new Set();
+ this.fixedNodesOnVertical = new Set();
+
+ // fill maps and sets
+ this.fixedNodeSet.forEach(function (nodeId) {
+ self.fixedNodesOnHorizontal.add(nodeId);
+ self.fixedNodesOnVertical.add(nodeId);
+ });
+
+ if (this.constraints.alignmentConstraint) {
+ if (this.constraints.alignmentConstraint.vertical) {
+ var verticalAlignment = this.constraints.alignmentConstraint.vertical;
+ for (var i = 0; i < verticalAlignment.length; i++) {
+ this.dummyToNodeForVerticalAlignment.set("dummy" + i, []);
+ verticalAlignment[i].forEach(function (nodeId) {
+ nodeToDummyForVerticalAlignment.set(nodeId, "dummy" + i);
+ self.dummyToNodeForVerticalAlignment.get("dummy" + i).push(nodeId);
+ if (self.fixedNodeSet.has(nodeId)) {
+ self.fixedNodesOnHorizontal.add("dummy" + i);
+ }
+ });
+ }
+ }
+ if (this.constraints.alignmentConstraint.horizontal) {
+ var horizontalAlignment = this.constraints.alignmentConstraint.horizontal;
+ for (var i = 0; i < horizontalAlignment.length; i++) {
+ this.dummyToNodeForHorizontalAlignment.set("dummy" + i, []);
+ horizontalAlignment[i].forEach(function (nodeId) {
+ nodeToDummyForHorizontalAlignment.set(nodeId, "dummy" + i);
+ self.dummyToNodeForHorizontalAlignment.get("dummy" + i).push(nodeId);
+ if (self.fixedNodeSet.has(nodeId)) {
+ self.fixedNodesOnVertical.add("dummy" + i);
+ }
+ });
+ }
+ }
+ }
+
+ if (CoSEConstants.RELAX_MOVEMENT_ON_CONSTRAINTS) {
+
+ this.shuffle = function (array) {
+ var j, x, i;
+ for (i = array.length - 1; i >= 2 * array.length / 3; i--) {
+ j = Math.floor(Math.random() * (i + 1));
+ x = array[i];
+ array[i] = array[j];
+ array[j] = x;
+ }
+ return array;
+ };
+
+ this.nodesInRelativeHorizontal = [];
+ this.nodesInRelativeVertical = [];
+ this.nodeToRelativeConstraintMapHorizontal = new Map();
+ this.nodeToRelativeConstraintMapVertical = new Map();
+ this.nodeToTempPositionMapHorizontal = new Map();
+ this.nodeToTempPositionMapVertical = new Map();
+
+ // fill arrays and maps
+ this.constraints.relativePlacementConstraint.forEach(function (constraint) {
+ if (constraint.left) {
+ var nodeIdLeft = nodeToDummyForVerticalAlignment.has(constraint.left) ? nodeToDummyForVerticalAlignment.get(constraint.left) : constraint.left;
+ var nodeIdRight = nodeToDummyForVerticalAlignment.has(constraint.right) ? nodeToDummyForVerticalAlignment.get(constraint.right) : constraint.right;
+
+ if (!self.nodesInRelativeHorizontal.includes(nodeIdLeft)) {
+ self.nodesInRelativeHorizontal.push(nodeIdLeft);
+ self.nodeToRelativeConstraintMapHorizontal.set(nodeIdLeft, []);
+ if (self.dummyToNodeForVerticalAlignment.has(nodeIdLeft)) {
+ self.nodeToTempPositionMapHorizontal.set(nodeIdLeft, self.idToNodeMap.get(self.dummyToNodeForVerticalAlignment.get(nodeIdLeft)[0]).getCenterX());
+ } else {
+ self.nodeToTempPositionMapHorizontal.set(nodeIdLeft, self.idToNodeMap.get(nodeIdLeft).getCenterX());
+ }
+ }
+ if (!self.nodesInRelativeHorizontal.includes(nodeIdRight)) {
+ self.nodesInRelativeHorizontal.push(nodeIdRight);
+ self.nodeToRelativeConstraintMapHorizontal.set(nodeIdRight, []);
+ if (self.dummyToNodeForVerticalAlignment.has(nodeIdRight)) {
+ self.nodeToTempPositionMapHorizontal.set(nodeIdRight, self.idToNodeMap.get(self.dummyToNodeForVerticalAlignment.get(nodeIdRight)[0]).getCenterX());
+ } else {
+ self.nodeToTempPositionMapHorizontal.set(nodeIdRight, self.idToNodeMap.get(nodeIdRight).getCenterX());
+ }
+ }
+
+ self.nodeToRelativeConstraintMapHorizontal.get(nodeIdLeft).push({ right: nodeIdRight, gap: constraint.gap });
+ self.nodeToRelativeConstraintMapHorizontal.get(nodeIdRight).push({ left: nodeIdLeft, gap: constraint.gap });
+ } else {
+ var nodeIdTop = nodeToDummyForHorizontalAlignment.has(constraint.top) ? nodeToDummyForHorizontalAlignment.get(constraint.top) : constraint.top;
+ var nodeIdBottom = nodeToDummyForHorizontalAlignment.has(constraint.bottom) ? nodeToDummyForHorizontalAlignment.get(constraint.bottom) : constraint.bottom;
+
+ if (!self.nodesInRelativeVertical.includes(nodeIdTop)) {
+ self.nodesInRelativeVertical.push(nodeIdTop);
+ self.nodeToRelativeConstraintMapVertical.set(nodeIdTop, []);
+ if (self.dummyToNodeForHorizontalAlignment.has(nodeIdTop)) {
+ self.nodeToTempPositionMapVertical.set(nodeIdTop, self.idToNodeMap.get(self.dummyToNodeForHorizontalAlignment.get(nodeIdTop)[0]).getCenterY());
+ } else {
+ self.nodeToTempPositionMapVertical.set(nodeIdTop, self.idToNodeMap.get(nodeIdTop).getCenterY());
+ }
+ }
+ if (!self.nodesInRelativeVertical.includes(nodeIdBottom)) {
+ self.nodesInRelativeVertical.push(nodeIdBottom);
+ self.nodeToRelativeConstraintMapVertical.set(nodeIdBottom, []);
+ if (self.dummyToNodeForHorizontalAlignment.has(nodeIdBottom)) {
+ self.nodeToTempPositionMapVertical.set(nodeIdBottom, self.idToNodeMap.get(self.dummyToNodeForHorizontalAlignment.get(nodeIdBottom)[0]).getCenterY());
+ } else {
+ self.nodeToTempPositionMapVertical.set(nodeIdBottom, self.idToNodeMap.get(nodeIdBottom).getCenterY());
+ }
+ }
+ self.nodeToRelativeConstraintMapVertical.get(nodeIdTop).push({ bottom: nodeIdBottom, gap: constraint.gap });
+ self.nodeToRelativeConstraintMapVertical.get(nodeIdBottom).push({ top: nodeIdTop, gap: constraint.gap });
+ }
+ });
+ } else {
+ var subGraphOnHorizontal = new Map(); // subgraph from vertical RP constraints
+ var subGraphOnVertical = new Map(); // subgraph from vertical RP constraints
+
+ // construct subgraphs from relative placement constraints
+ this.constraints.relativePlacementConstraint.forEach(function (constraint) {
+ if (constraint.left) {
+ var left = nodeToDummyForVerticalAlignment.has(constraint.left) ? nodeToDummyForVerticalAlignment.get(constraint.left) : constraint.left;
+ var right = nodeToDummyForVerticalAlignment.has(constraint.right) ? nodeToDummyForVerticalAlignment.get(constraint.right) : constraint.right;
+ if (subGraphOnHorizontal.has(left)) {
+ subGraphOnHorizontal.get(left).push(right);
+ } else {
+ subGraphOnHorizontal.set(left, [right]);
+ }
+ if (subGraphOnHorizontal.has(right)) {
+ subGraphOnHorizontal.get(right).push(left);
+ } else {
+ subGraphOnHorizontal.set(right, [left]);
+ }
+ } else {
+ var top = nodeToDummyForHorizontalAlignment.has(constraint.top) ? nodeToDummyForHorizontalAlignment.get(constraint.top) : constraint.top;
+ var bottom = nodeToDummyForHorizontalAlignment.has(constraint.bottom) ? nodeToDummyForHorizontalAlignment.get(constraint.bottom) : constraint.bottom;
+ if (subGraphOnVertical.has(top)) {
+ subGraphOnVertical.get(top).push(bottom);
+ } else {
+ subGraphOnVertical.set(top, [bottom]);
+ }
+ if (subGraphOnVertical.has(bottom)) {
+ subGraphOnVertical.get(bottom).push(top);
+ } else {
+ subGraphOnVertical.set(bottom, [top]);
+ }
+ }
+ });
+
+ // function to construct components from a given graph
+ // also returns an array that keeps whether each component contains fixed node
+ var constructComponents = function constructComponents(graph, fixedNodes) {
+ var components = [];
+ var isFixed = [];
+ var queue = new LinkedList();
+ var visited = new Set();
+ var count = 0;
+
+ graph.forEach(function (value, key) {
+ if (!visited.has(key)) {
+ components[count] = [];
+ isFixed[count] = false;
+ var currentNode = key;
+ queue.push(currentNode);
+ visited.add(currentNode);
+ components[count].push(currentNode);
+
+ while (queue.length != 0) {
+ currentNode = queue.shift();
+ if (fixedNodes.has(currentNode)) {
+ isFixed[count] = true;
+ }
+ var neighbors = graph.get(currentNode);
+ neighbors.forEach(function (neighbor) {
+ if (!visited.has(neighbor)) {
+ queue.push(neighbor);
+ visited.add(neighbor);
+ components[count].push(neighbor);
+ }
+ });
+ }
+ count++;
+ }
+ });
+
+ return { components: components, isFixed: isFixed };
+ };
+
+ var resultOnHorizontal = constructComponents(subGraphOnHorizontal, self.fixedNodesOnHorizontal);
+ this.componentsOnHorizontal = resultOnHorizontal.components;
+ this.fixedComponentsOnHorizontal = resultOnHorizontal.isFixed;
+ var resultOnVertical = constructComponents(subGraphOnVertical, self.fixedNodesOnVertical);
+ this.componentsOnVertical = resultOnVertical.components;
+ this.fixedComponentsOnVertical = resultOnVertical.isFixed;
+ }
+ }
+};
+
+// updates node displacements based on constraints
+CoSELayout.prototype.updateDisplacements = function () {
+ var self = this;
+ if (this.constraints.fixedNodeConstraint) {
+ this.constraints.fixedNodeConstraint.forEach(function (nodeData) {
+ var fixedNode = self.idToNodeMap.get(nodeData.nodeId);
+ fixedNode.displacementX = 0;
+ fixedNode.displacementY = 0;
+ });
+ }
+
+ if (this.constraints.alignmentConstraint) {
+ if (this.constraints.alignmentConstraint.vertical) {
+ var allVerticalAlignments = this.constraints.alignmentConstraint.vertical;
+ for (var i = 0; i < allVerticalAlignments.length; i++) {
+ var totalDisplacementX = 0;
+ for (var j = 0; j < allVerticalAlignments[i].length; j++) {
+ if (this.fixedNodeSet.has(allVerticalAlignments[i][j])) {
+ totalDisplacementX = 0;
+ break;
+ }
+ totalDisplacementX += this.idToNodeMap.get(allVerticalAlignments[i][j]).displacementX;
+ }
+ var averageDisplacementX = totalDisplacementX / allVerticalAlignments[i].length;
+ for (var j = 0; j < allVerticalAlignments[i].length; j++) {
+ this.idToNodeMap.get(allVerticalAlignments[i][j]).displacementX = averageDisplacementX;
+ }
+ }
+ }
+ if (this.constraints.alignmentConstraint.horizontal) {
+ var allHorizontalAlignments = this.constraints.alignmentConstraint.horizontal;
+ for (var i = 0; i < allHorizontalAlignments.length; i++) {
+ var totalDisplacementY = 0;
+ for (var j = 0; j < allHorizontalAlignments[i].length; j++) {
+ if (this.fixedNodeSet.has(allHorizontalAlignments[i][j])) {
+ totalDisplacementY = 0;
+ break;
+ }
+ totalDisplacementY += this.idToNodeMap.get(allHorizontalAlignments[i][j]).displacementY;
+ }
+ var averageDisplacementY = totalDisplacementY / allHorizontalAlignments[i].length;
+ for (var j = 0; j < allHorizontalAlignments[i].length; j++) {
+ this.idToNodeMap.get(allHorizontalAlignments[i][j]).displacementY = averageDisplacementY;
+ }
+ }
+ }
+ }
+
+ if (this.constraints.relativePlacementConstraint) {
+
+ if (CoSEConstants.RELAX_MOVEMENT_ON_CONSTRAINTS) {
+ // shuffle array to randomize node processing order
+ if (this.totalIterations % 10 == 0) {
+ this.shuffle(this.nodesInRelativeHorizontal);
+ this.shuffle(this.nodesInRelativeVertical);
+ }
+
+ this.nodesInRelativeHorizontal.forEach(function (nodeId) {
+ if (!self.fixedNodesOnHorizontal.has(nodeId)) {
+ var displacement = 0;
+ if (self.dummyToNodeForVerticalAlignment.has(nodeId)) {
+ displacement = self.idToNodeMap.get(self.dummyToNodeForVerticalAlignment.get(nodeId)[0]).displacementX;
+ } else {
+ displacement = self.idToNodeMap.get(nodeId).displacementX;
+ }
+ self.nodeToRelativeConstraintMapHorizontal.get(nodeId).forEach(function (constraint) {
+ if (constraint.right) {
+ var diff = self.nodeToTempPositionMapHorizontal.get(constraint.right) - self.nodeToTempPositionMapHorizontal.get(nodeId) - displacement;
+ if (diff < constraint.gap) {
+ displacement -= constraint.gap - diff;
+ }
+ } else {
+ var diff = self.nodeToTempPositionMapHorizontal.get(nodeId) - self.nodeToTempPositionMapHorizontal.get(constraint.left) + displacement;
+ if (diff < constraint.gap) {
+ displacement += constraint.gap - diff;
+ }
+ }
+ });
+ self.nodeToTempPositionMapHorizontal.set(nodeId, self.nodeToTempPositionMapHorizontal.get(nodeId) + displacement);
+ if (self.dummyToNodeForVerticalAlignment.has(nodeId)) {
+ self.dummyToNodeForVerticalAlignment.get(nodeId).forEach(function (nodeId) {
+ self.idToNodeMap.get(nodeId).displacementX = displacement;
+ });
+ } else {
+ self.idToNodeMap.get(nodeId).displacementX = displacement;
+ }
+ }
+ });
+
+ this.nodesInRelativeVertical.forEach(function (nodeId) {
+ if (!self.fixedNodesOnHorizontal.has(nodeId)) {
+ var displacement = 0;
+ if (self.dummyToNodeForHorizontalAlignment.has(nodeId)) {
+ displacement = self.idToNodeMap.get(self.dummyToNodeForHorizontalAlignment.get(nodeId)[0]).displacementY;
+ } else {
+ displacement = self.idToNodeMap.get(nodeId).displacementY;
+ }
+ self.nodeToRelativeConstraintMapVertical.get(nodeId).forEach(function (constraint) {
+ if (constraint.bottom) {
+ var diff = self.nodeToTempPositionMapVertical.get(constraint.bottom) - self.nodeToTempPositionMapVertical.get(nodeId) - displacement;
+ if (diff < constraint.gap) {
+ displacement -= constraint.gap - diff;
+ }
+ } else {
+ var diff = self.nodeToTempPositionMapVertical.get(nodeId) - self.nodeToTempPositionMapVertical.get(constraint.top) + displacement;
+ if (diff < constraint.gap) {
+ displacement += constraint.gap - diff;
+ }
+ }
+ });
+ self.nodeToTempPositionMapVertical.set(nodeId, self.nodeToTempPositionMapVertical.get(nodeId) + displacement);
+ if (self.dummyToNodeForHorizontalAlignment.has(nodeId)) {
+ self.dummyToNodeForHorizontalAlignment.get(nodeId).forEach(function (nodeId) {
+ self.idToNodeMap.get(nodeId).displacementY = displacement;
+ });
+ } else {
+ self.idToNodeMap.get(nodeId).displacementY = displacement;
+ }
+ }
+ });
+ } else {
+ for (var i = 0; i < this.componentsOnHorizontal.length; i++) {
+ var component = this.componentsOnHorizontal[i];
+ if (this.fixedComponentsOnHorizontal[i]) {
+ for (var j = 0; j < component.length; j++) {
+ if (this.dummyToNodeForVerticalAlignment.has(component[j])) {
+ this.dummyToNodeForVerticalAlignment.get(component[j]).forEach(function (nodeId) {
+ self.idToNodeMap.get(nodeId).displacementX = 0;
+ });
+ } else {
+ this.idToNodeMap.get(component[j]).displacementX = 0;
+ }
+ }
+ } else {
+ var sum = 0;
+ var count = 0;
+ for (var j = 0; j < component.length; j++) {
+ if (this.dummyToNodeForVerticalAlignment.has(component[j])) {
+ var actualNodes = this.dummyToNodeForVerticalAlignment.get(component[j]);
+ sum += actualNodes.length * this.idToNodeMap.get(actualNodes[0]).displacementX;
+ count += actualNodes.length;
+ } else {
+ sum += this.idToNodeMap.get(component[j]).displacementX;
+ count++;
+ }
+ }
+ var averageDisplacement = sum / count;
+ for (var j = 0; j < component.length; j++) {
+ if (this.dummyToNodeForVerticalAlignment.has(component[j])) {
+ this.dummyToNodeForVerticalAlignment.get(component[j]).forEach(function (nodeId) {
+ self.idToNodeMap.get(nodeId).displacementX = averageDisplacement;
+ });
+ } else {
+ this.idToNodeMap.get(component[j]).displacementX = averageDisplacement;
+ }
+ }
+ }
+ }
+
+ for (var i = 0; i < this.componentsOnVertical.length; i++) {
+ var component = this.componentsOnVertical[i];
+ if (this.fixedComponentsOnVertical[i]) {
+ for (var j = 0; j < component.length; j++) {
+ if (this.dummyToNodeForHorizontalAlignment.has(component[j])) {
+ this.dummyToNodeForHorizontalAlignment.get(component[j]).forEach(function (nodeId) {
+ self.idToNodeMap.get(nodeId).displacementY = 0;
+ });
+ } else {
+ this.idToNodeMap.get(component[j]).displacementY = 0;
+ }
+ }
+ } else {
+ var sum = 0;
+ var count = 0;
+ for (var j = 0; j < component.length; j++) {
+ if (this.dummyToNodeForHorizontalAlignment.has(component[j])) {
+ var actualNodes = this.dummyToNodeForHorizontalAlignment.get(component[j]);
+ sum += actualNodes.length * this.idToNodeMap.get(actualNodes[0]).displacementY;
+ count += actualNodes.length;
+ } else {
+ sum += this.idToNodeMap.get(component[j]).displacementY;
+ count++;
+ }
+ }
+ var averageDisplacement = sum / count;
+ for (var j = 0; j < component.length; j++) {
+ if (this.dummyToNodeForHorizontalAlignment.has(component[j])) {
+ this.dummyToNodeForHorizontalAlignment.get(component[j]).forEach(function (nodeId) {
+ self.idToNodeMap.get(nodeId).displacementY = averageDisplacement;
+ });
+ } else {
+ this.idToNodeMap.get(component[j]).displacementY = averageDisplacement;
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+CoSELayout.prototype.calculateNodesToApplyGravitationTo = function () {
+ var nodeList = [];
+ var graph;
+
+ var graphs = this.graphManager.getGraphs();
+ var size = graphs.length;
+ var i;
+ for (i = 0; i < size; i++) {
+ graph = graphs[i];
+
+ graph.updateConnected();
+
+ if (!graph.isConnected) {
+ nodeList = nodeList.concat(graph.getNodes());
+ }
+ }
+
+ return nodeList;
+};
+
+CoSELayout.prototype.createBendpoints = function () {
+ var edges = [];
+ edges = edges.concat(this.graphManager.getAllEdges());
+ var visited = new Set();
+ var i;
+ for (i = 0; i < edges.length; i++) {
+ var edge = edges[i];
+
+ if (!visited.has(edge)) {
+ var source = edge.getSource();
+ var target = edge.getTarget();
+
+ if (source == target) {
+ edge.getBendpoints().push(new PointD());
+ edge.getBendpoints().push(new PointD());
+ this.createDummyNodesForBendpoints(edge);
+ visited.add(edge);
+ } else {
+ var edgeList = [];
+
+ edgeList = edgeList.concat(source.getEdgeListToNode(target));
+ edgeList = edgeList.concat(target.getEdgeListToNode(source));
+
+ if (!visited.has(edgeList[0])) {
+ if (edgeList.length > 1) {
+ var k;
+ for (k = 0; k < edgeList.length; k++) {
+ var multiEdge = edgeList[k];
+ multiEdge.getBendpoints().push(new PointD());
+ this.createDummyNodesForBendpoints(multiEdge);
+ }
+ }
+ edgeList.forEach(function (edge) {
+ visited.add(edge);
+ });
+ }
+ }
+ }
+
+ if (visited.size == edges.length) {
+ break;
+ }
+ }
+};
+
+CoSELayout.prototype.positionNodesRadially = function (forest) {
+ // We tile the trees to a grid row by row; first tree starts at (0,0)
+ var currentStartingPoint = new Point(0, 0);
+ var numberOfColumns = Math.ceil(Math.sqrt(forest.length));
+ var height = 0;
+ var currentY = 0;
+ var currentX = 0;
+ var point = new PointD(0, 0);
+
+ for (var i = 0; i < forest.length; i++) {
+ if (i % numberOfColumns == 0) {
+ // Start of a new row, make the x coordinate 0, increment the
+ // y coordinate with the max height of the previous row
+ currentX = 0;
+ currentY = height;
+
+ if (i != 0) {
+ currentY += CoSEConstants.DEFAULT_COMPONENT_SEPERATION;
+ }
+
+ height = 0;
+ }
+
+ var tree = forest[i];
+
+ // Find the center of the tree
+ var centerNode = Layout.findCenterOfTree(tree);
+
+ // Set the staring point of the next tree
+ currentStartingPoint.x = currentX;
+ currentStartingPoint.y = currentY;
+
+ // Do a radial layout starting with the center
+ point = CoSELayout.radialLayout(tree, centerNode, currentStartingPoint);
+
+ if (point.y > height) {
+ height = Math.floor(point.y);
+ }
+
+ currentX = Math.floor(point.x + CoSEConstants.DEFAULT_COMPONENT_SEPERATION);
+ }
+
+ this.transform(new PointD(LayoutConstants.WORLD_CENTER_X - point.x / 2, LayoutConstants.WORLD_CENTER_Y - point.y / 2));
+};
+
+CoSELayout.radialLayout = function (tree, centerNode, startingPoint) {
+ var radialSep = Math.max(this.maxDiagonalInTree(tree), CoSEConstants.DEFAULT_RADIAL_SEPARATION);
+ CoSELayout.branchRadialLayout(centerNode, null, 0, 359, 0, radialSep);
+ var bounds = LGraph.calculateBounds(tree);
+
+ var transform = new Transform();
+ transform.setDeviceOrgX(bounds.getMinX());
+ transform.setDeviceOrgY(bounds.getMinY());
+ transform.setWorldOrgX(startingPoint.x);
+ transform.setWorldOrgY(startingPoint.y);
+
+ for (var i = 0; i < tree.length; i++) {
+ var node = tree[i];
+ node.transform(transform);
+ }
+
+ var bottomRight = new PointD(bounds.getMaxX(), bounds.getMaxY());
+
+ return transform.inverseTransformPoint(bottomRight);
+};
+
+CoSELayout.branchRadialLayout = function (node, parentOfNode, startAngle, endAngle, distance, radialSeparation) {
+ // First, position this node by finding its angle.
+ var halfInterval = (endAngle - startAngle + 1) / 2;
+
+ if (halfInterval < 0) {
+ halfInterval += 180;
+ }
+
+ var nodeAngle = (halfInterval + startAngle) % 360;
+ var teta = nodeAngle * IGeometry.TWO_PI / 360;
+
+ // Make polar to java cordinate conversion.
+ var cos_teta = Math.cos(teta);
+ var x_ = distance * Math.cos(teta);
+ var y_ = distance * Math.sin(teta);
+
+ node.setCenter(x_, y_);
+
+ // Traverse all neighbors of this node and recursively call this
+ // function.
+ var neighborEdges = [];
+ neighborEdges = neighborEdges.concat(node.getEdges());
+ var childCount = neighborEdges.length;
+
+ if (parentOfNode != null) {
+ childCount--;
+ }
+
+ var branchCount = 0;
+
+ var incEdgesCount = neighborEdges.length;
+ var startIndex;
+
+ var edges = node.getEdgesBetween(parentOfNode);
+
+ // If there are multiple edges, prune them until there remains only one
+ // edge.
+ while (edges.length > 1) {
+ //neighborEdges.remove(edges.remove(0));
+ var temp = edges[0];
+ edges.splice(0, 1);
+ var index = neighborEdges.indexOf(temp);
+ if (index >= 0) {
+ neighborEdges.splice(index, 1);
+ }
+ incEdgesCount--;
+ childCount--;
+ }
+
+ if (parentOfNode != null) {
+ //assert edges.length == 1;
+ startIndex = (neighborEdges.indexOf(edges[0]) + 1) % incEdgesCount;
+ } else {
+ startIndex = 0;
+ }
+
+ var stepAngle = Math.abs(endAngle - startAngle) / childCount;
+
+ for (var i = startIndex; branchCount != childCount; i = ++i % incEdgesCount) {
+ var currentNeighbor = neighborEdges[i].getOtherEnd(node);
+
+ // Don't back traverse to root node in current tree.
+ if (currentNeighbor == parentOfNode) {
+ continue;
+ }
+
+ var childStartAngle = (startAngle + branchCount * stepAngle) % 360;
+ var childEndAngle = (childStartAngle + stepAngle) % 360;
+
+ CoSELayout.branchRadialLayout(currentNeighbor, node, childStartAngle, childEndAngle, distance + radialSeparation, radialSeparation);
+
+ branchCount++;
+ }
+};
+
+CoSELayout.maxDiagonalInTree = function (tree) {
+ var maxDiagonal = Integer.MIN_VALUE;
+
+ for (var i = 0; i < tree.length; i++) {
+ var node = tree[i];
+ var diagonal = node.getDiagonal();
+
+ if (diagonal > maxDiagonal) {
+ maxDiagonal = diagonal;
+ }
+ }
+
+ return maxDiagonal;
+};
+
+CoSELayout.prototype.calcRepulsionRange = function () {
+ // formula is 2 x (level + 1) x idealEdgeLength
+ return 2 * (this.level + 1) * this.idealEdgeLength;
+};
+
+// Tiling methods
+
+// Group zero degree members whose parents are not to be tiled, create dummy parents where needed and fill memberGroups by their dummp parent id's
+CoSELayout.prototype.groupZeroDegreeMembers = function () {
+ var self = this;
+ // array of [parent_id x oneDegreeNode_id]
+ var tempMemberGroups = {}; // A temporary map of parent node and its zero degree members
+ this.memberGroups = {}; // A map of dummy parent node and its zero degree members whose parents are not to be tiled
+ this.idToDummyNode = {}; // A map of id to dummy node
+
+ var zeroDegree = []; // List of zero degree nodes whose parents are not to be tiled
+ var allNodes = this.graphManager.getAllNodes();
+
+ // Fill zero degree list
+ for (var i = 0; i < allNodes.length; i++) {
+ var node = allNodes[i];
+ var parent = node.getParent();
+ // If a node has zero degree and its parent is not to be tiled if exists add that node to zeroDegres list
+ if (this.getNodeDegreeWithChildren(node) === 0 && (parent.id == undefined || !this.getToBeTiled(parent))) {
+ zeroDegree.push(node);
+ }
+ }
+
+ // Create a map of parent node and its zero degree members
+ for (var i = 0; i < zeroDegree.length; i++) {
+ var node = zeroDegree[i]; // Zero degree node itself
+ var p_id = node.getParent().id; // Parent id
+
+ if (typeof tempMemberGroups[p_id] === "undefined") tempMemberGroups[p_id] = [];
+
+ tempMemberGroups[p_id] = tempMemberGroups[p_id].concat(node); // Push node to the list belongs to its parent in tempMemberGroups
+ }
+
+ // If there are at least two nodes at a level, create a dummy compound for them
+ Object.keys(tempMemberGroups).forEach(function (p_id) {
+ if (tempMemberGroups[p_id].length > 1) {
+ var dummyCompoundId = "DummyCompound_" + p_id; // The id of dummy compound which will be created soon
+ self.memberGroups[dummyCompoundId] = tempMemberGroups[p_id]; // Add dummy compound to memberGroups
+
+ var parent = tempMemberGroups[p_id][0].getParent(); // The parent of zero degree nodes will be the parent of new dummy compound
+
+ // Create a dummy compound with calculated id
+ var dummyCompound = new CoSENode(self.graphManager);
+ dummyCompound.id = dummyCompoundId;
+ dummyCompound.paddingLeft = parent.paddingLeft || 0;
+ dummyCompound.paddingRight = parent.paddingRight || 0;
+ dummyCompound.paddingBottom = parent.paddingBottom || 0;
+ dummyCompound.paddingTop = parent.paddingTop || 0;
+
+ self.idToDummyNode[dummyCompoundId] = dummyCompound;
+
+ var dummyParentGraph = self.getGraphManager().add(self.newGraph(), dummyCompound);
+ var parentGraph = parent.getChild();
+
+ // Add dummy compound to parent the graph
+ parentGraph.add(dummyCompound);
+
+ // For each zero degree node in this level remove it from its parent graph and add it to the graph of dummy parent
+ for (var i = 0; i < tempMemberGroups[p_id].length; i++) {
+ var node = tempMemberGroups[p_id][i];
+
+ parentGraph.remove(node);
+ dummyParentGraph.add(node);
+ }
+ }
+ });
+};
+
+CoSELayout.prototype.clearCompounds = function () {
+ var childGraphMap = {};
+ var idToNode = {};
+
+ // Get compound ordering by finding the inner one first
+ this.performDFSOnCompounds();
+
+ for (var i = 0; i < this.compoundOrder.length; i++) {
+
+ idToNode[this.compoundOrder[i].id] = this.compoundOrder[i];
+ childGraphMap[this.compoundOrder[i].id] = [].concat(this.compoundOrder[i].getChild().getNodes());
+
+ // Remove children of compounds
+ this.graphManager.remove(this.compoundOrder[i].getChild());
+ this.compoundOrder[i].child = null;
+ }
+
+ this.graphManager.resetAllNodes();
+
+ // Tile the removed children
+ this.tileCompoundMembers(childGraphMap, idToNode);
+};
+
+CoSELayout.prototype.clearZeroDegreeMembers = function () {
+ var self = this;
+ var tiledZeroDegreePack = this.tiledZeroDegreePack = [];
+
+ Object.keys(this.memberGroups).forEach(function (id) {
+ var compoundNode = self.idToDummyNode[id]; // Get the dummy compound
+
+ tiledZeroDegreePack[id] = self.tileNodes(self.memberGroups[id], compoundNode.paddingLeft + compoundNode.paddingRight);
+
+ // Set the width and height of the dummy compound as calculated
+ compoundNode.rect.width = tiledZeroDegreePack[id].width;
+ compoundNode.rect.height = tiledZeroDegreePack[id].height;
+ compoundNode.setCenter(tiledZeroDegreePack[id].centerX, tiledZeroDegreePack[id].centerY);
+
+ // compound left and top margings for labels
+ // when node labels are included, these values may be set to different values below and are used in tilingPostLayout,
+ // otherwise they stay as zero
+ compoundNode.labelMarginLeft = 0;
+ compoundNode.labelMarginTop = 0;
+
+ // Update compound bounds considering its label properties and set label margins for left and top
+ if (CoSEConstants.NODE_DIMENSIONS_INCLUDE_LABELS) {
+
+ var width = compoundNode.rect.width;
+ var height = compoundNode.rect.height;
+
+ if (compoundNode.labelWidth) {
+ if (compoundNode.labelPosHorizontal == "left") {
+ compoundNode.rect.x -= compoundNode.labelWidth;
+ compoundNode.setWidth(width + compoundNode.labelWidth);
+ compoundNode.labelMarginLeft = compoundNode.labelWidth;
+ } else if (compoundNode.labelPosHorizontal == "center" && compoundNode.labelWidth > width) {
+ compoundNode.rect.x -= (compoundNode.labelWidth - width) / 2;
+ compoundNode.setWidth(compoundNode.labelWidth);
+ compoundNode.labelMarginLeft = (compoundNode.labelWidth - width) / 2;
+ } else if (compoundNode.labelPosHorizontal == "right") {
+ compoundNode.setWidth(width + compoundNode.labelWidth);
+ }
+ }
+
+ if (compoundNode.labelHeight) {
+ if (compoundNode.labelPosVertical == "top") {
+ compoundNode.rect.y -= compoundNode.labelHeight;
+ compoundNode.setHeight(height + compoundNode.labelHeight);
+ compoundNode.labelMarginTop = compoundNode.labelHeight;
+ } else if (compoundNode.labelPosVertical == "center" && compoundNode.labelHeight > height) {
+ compoundNode.rect.y -= (compoundNode.labelHeight - height) / 2;
+ compoundNode.setHeight(compoundNode.labelHeight);
+ compoundNode.labelMarginTop = (compoundNode.labelHeight - height) / 2;
+ } else if (compoundNode.labelPosVertical == "bottom") {
+ compoundNode.setHeight(height + compoundNode.labelHeight);
+ }
+ }
+ }
+ });
+};
+
+CoSELayout.prototype.repopulateCompounds = function () {
+ for (var i = this.compoundOrder.length - 1; i >= 0; i--) {
+ var lCompoundNode = this.compoundOrder[i];
+ var id = lCompoundNode.id;
+ var horizontalMargin = lCompoundNode.paddingLeft;
+ var verticalMargin = lCompoundNode.paddingTop;
+ var labelMarginLeft = lCompoundNode.labelMarginLeft;
+ var labelMarginTop = lCompoundNode.labelMarginTop;
+
+ this.adjustLocations(this.tiledMemberPack[id], lCompoundNode.rect.x, lCompoundNode.rect.y, horizontalMargin, verticalMargin, labelMarginLeft, labelMarginTop);
+ }
+};
+
+CoSELayout.prototype.repopulateZeroDegreeMembers = function () {
+ var self = this;
+ var tiledPack = this.tiledZeroDegreePack;
+
+ Object.keys(tiledPack).forEach(function (id) {
+ var compoundNode = self.idToDummyNode[id]; // Get the dummy compound by its id
+ var horizontalMargin = compoundNode.paddingLeft;
+ var verticalMargin = compoundNode.paddingTop;
+ var labelMarginLeft = compoundNode.labelMarginLeft;
+ var labelMarginTop = compoundNode.labelMarginTop;
+
+ // Adjust the positions of nodes wrt its compound
+ self.adjustLocations(tiledPack[id], compoundNode.rect.x, compoundNode.rect.y, horizontalMargin, verticalMargin, labelMarginLeft, labelMarginTop);
+ });
+};
+
+CoSELayout.prototype.getToBeTiled = function (node) {
+ var id = node.id;
+ //firstly check the previous results
+ if (this.toBeTiled[id] != null) {
+ return this.toBeTiled[id];
+ }
+
+ //only compound nodes are to be tiled
+ var childGraph = node.getChild();
+ if (childGraph == null) {
+ this.toBeTiled[id] = false;
+ return false;
+ }
+
+ var children = childGraph.getNodes(); // Get the children nodes
+
+ //a compound node is not to be tiled if all of its compound children are not to be tiled
+ for (var i = 0; i < children.length; i++) {
+ var theChild = children[i];
+
+ if (this.getNodeDegree(theChild) > 0) {
+ this.toBeTiled[id] = false;
+ return false;
+ }
+
+ //pass the children not having the compound structure
+ if (theChild.getChild() == null) {
+ this.toBeTiled[theChild.id] = false;
+ continue;
+ }
+
+ if (!this.getToBeTiled(theChild)) {
+ this.toBeTiled[id] = false;
+ return false;
+ }
+ }
+ this.toBeTiled[id] = true;
+ return true;
+};
+
+// Get degree of a node depending of its edges and independent of its children
+CoSELayout.prototype.getNodeDegree = function (node) {
+ var id = node.id;
+ var edges = node.getEdges();
+ var degree = 0;
+
+ // For the edges connected
+ for (var i = 0; i < edges.length; i++) {
+ var edge = edges[i];
+ if (edge.getSource().id !== edge.getTarget().id) {
+ degree = degree + 1;
+ }
+ }
+ return degree;
+};
+
+// Get degree of a node with its children
+CoSELayout.prototype.getNodeDegreeWithChildren = function (node) {
+ var degree = this.getNodeDegree(node);
+ if (node.getChild() == null) {
+ return degree;
+ }
+ var children = node.getChild().getNodes();
+ for (var i = 0; i < children.length; i++) {
+ var child = children[i];
+ degree += this.getNodeDegreeWithChildren(child);
+ }
+ return degree;
+};
+
+CoSELayout.prototype.performDFSOnCompounds = function () {
+ this.compoundOrder = [];
+ this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes());
+};
+
+CoSELayout.prototype.fillCompexOrderByDFS = function (children) {
+ for (var i = 0; i < children.length; i++) {
+ var child = children[i];
+ if (child.getChild() != null) {
+ this.fillCompexOrderByDFS(child.getChild().getNodes());
+ }
+ if (this.getToBeTiled(child)) {
+ this.compoundOrder.push(child);
+ }
+ }
+};
+
+/**
+* This method places each zero degree member wrt given (x,y) coordinates (top left).
+*/
+CoSELayout.prototype.adjustLocations = function (organization, x, y, compoundHorizontalMargin, compoundVerticalMargin, compoundLabelMarginLeft, compoundLabelMarginTop) {
+ x += compoundHorizontalMargin + compoundLabelMarginLeft;
+ y += compoundVerticalMargin + compoundLabelMarginTop;
+
+ var left = x;
+
+ for (var i = 0; i < organization.rows.length; i++) {
+ var row = organization.rows[i];
+ x = left;
+ var maxHeight = 0;
+
+ for (var j = 0; j < row.length; j++) {
+ var lnode = row[j];
+
+ lnode.rect.x = x; // + lnode.rect.width / 2;
+ lnode.rect.y = y; // + lnode.rect.height / 2;
+
+ x += lnode.rect.width + organization.horizontalPadding;
+
+ if (lnode.rect.height > maxHeight) maxHeight = lnode.rect.height;
+ }
+
+ y += maxHeight + organization.verticalPadding;
+ }
+};
+
+CoSELayout.prototype.tileCompoundMembers = function (childGraphMap, idToNode) {
+ var self = this;
+ this.tiledMemberPack = [];
+
+ Object.keys(childGraphMap).forEach(function (id) {
+ // Get the compound node
+ var compoundNode = idToNode[id];
+
+ self.tiledMemberPack[id] = self.tileNodes(childGraphMap[id], compoundNode.paddingLeft + compoundNode.paddingRight);
+
+ compoundNode.rect.width = self.tiledMemberPack[id].width;
+ compoundNode.rect.height = self.tiledMemberPack[id].height;
+ compoundNode.setCenter(self.tiledMemberPack[id].centerX, self.tiledMemberPack[id].centerY);
+
+ // compound left and top margings for labels
+ // when node labels are included, these values may be set to different values below and are used in tilingPostLayout,
+ // otherwise they stay as zero
+ compoundNode.labelMarginLeft = 0;
+ compoundNode.labelMarginTop = 0;
+
+ // Update compound bounds considering its label properties and set label margins for left and top
+ if (CoSEConstants.NODE_DIMENSIONS_INCLUDE_LABELS) {
+
+ var width = compoundNode.rect.width;
+ var height = compoundNode.rect.height;
+
+ if (compoundNode.labelWidth) {
+ if (compoundNode.labelPosHorizontal == "left") {
+ compoundNode.rect.x -= compoundNode.labelWidth;
+ compoundNode.setWidth(width + compoundNode.labelWidth);
+ compoundNode.labelMarginLeft = compoundNode.labelWidth;
+ } else if (compoundNode.labelPosHorizontal == "center" && compoundNode.labelWidth > width) {
+ compoundNode.rect.x -= (compoundNode.labelWidth - width) / 2;
+ compoundNode.setWidth(compoundNode.labelWidth);
+ compoundNode.labelMarginLeft = (compoundNode.labelWidth - width) / 2;
+ } else if (compoundNode.labelPosHorizontal == "right") {
+ compoundNode.setWidth(width + compoundNode.labelWidth);
+ }
+ }
+
+ if (compoundNode.labelHeight) {
+ if (compoundNode.labelPosVertical == "top") {
+ compoundNode.rect.y -= compoundNode.labelHeight;
+ compoundNode.setHeight(height + compoundNode.labelHeight);
+ compoundNode.labelMarginTop = compoundNode.labelHeight;
+ } else if (compoundNode.labelPosVertical == "center" && compoundNode.labelHeight > height) {
+ compoundNode.rect.y -= (compoundNode.labelHeight - height) / 2;
+ compoundNode.setHeight(compoundNode.labelHeight);
+ compoundNode.labelMarginTop = (compoundNode.labelHeight - height) / 2;
+ } else if (compoundNode.labelPosVertical == "bottom") {
+ compoundNode.setHeight(height + compoundNode.labelHeight);
+ }
+ }
+ }
+ });
+};
+
+CoSELayout.prototype.tileNodes = function (nodes, minWidth) {
+ var horizontalOrg = this.tileNodesByFavoringDim(nodes, minWidth, true);
+ var verticalOrg = this.tileNodesByFavoringDim(nodes, minWidth, false);
+
+ var horizontalRatio = this.getOrgRatio(horizontalOrg);
+ var verticalRatio = this.getOrgRatio(verticalOrg);
+ var bestOrg;
+
+ // the best ratio is the one that is closer to 1 since the ratios are already normalized
+ // and the best organization is the one that has the best ratio
+ if (verticalRatio < horizontalRatio) {
+ bestOrg = verticalOrg;
+ } else {
+ bestOrg = horizontalOrg;
+ }
+
+ return bestOrg;
+};
+
+// get the width/height ratio of the organization that is normalized so that it will not be less than 1
+CoSELayout.prototype.getOrgRatio = function (organization) {
+ // get dimensions and calculate the initial ratio
+ var width = organization.width;
+ var height = organization.height;
+ var ratio = width / height;
+
+ // if the initial ratio is less then 1 then inverse it
+ if (ratio < 1) {
+ ratio = 1 / ratio;
+ }
+
+ // return the normalized ratio
+ return ratio;
+};
+
+/*
+ * Calculates the ideal width for the rows. This method assumes that
+ * each node has the same sizes and calculates the ideal row width that
+ * approximates a square shaped complex accordingly. However, since nodes would
+ * have different sizes some rows would have different sizes and the resulting
+ * shape would not be an exact square.
+ */
+CoSELayout.prototype.calcIdealRowWidth = function (members, favorHorizontalDim) {
+ // To approximate a square shaped complex we need to make complex width equal to complex height.
+ // To achieve this we need to solve the following equation system for hc:
+ // (x + bx) * hc - bx = (y + by) * vc - by, hc * vc = n
+ // where x is the avarage width of the nodes, y is the avarage height of nodes
+ // bx and by are the buffer sizes in horizontal and vertical dimensions accordingly,
+ // hc and vc are the number of rows in horizontal and vertical dimensions
+ // n is number of members.
+
+ var verticalPadding = CoSEConstants.TILING_PADDING_VERTICAL;
+ var horizontalPadding = CoSEConstants.TILING_PADDING_HORIZONTAL;
+
+ // number of members
+ var membersSize = members.length;
+
+ // sum of the width of all members
+ var totalWidth = 0;
+
+ // sum of the height of all members
+ var totalHeight = 0;
+
+ var maxWidth = 0;
+
+ // traverse all members to calculate total width and total height and get the maximum members width
+ members.forEach(function (node) {
+ totalWidth += node.getWidth();
+ totalHeight += node.getHeight();
+
+ if (node.getWidth() > maxWidth) {
+ maxWidth = node.getWidth();
+ }
+ });
+
+ // average width of the members
+ var averageWidth = totalWidth / membersSize;
+
+ // average height of the members
+ var averageHeight = totalHeight / membersSize;
+
+ // solving the initial equation system for the hc yields the following second degree equation:
+ // hc^2 * (x+bx) + hc * (by - bx) - n * (y + by) = 0
+
+ // the delta value to solve the equation above for hc
+ var delta = Math.pow(verticalPadding - horizontalPadding, 2) + 4 * (averageWidth + horizontalPadding) * (averageHeight + verticalPadding) * membersSize;
+
+ // solve the equation using delta value to calculate the horizontal count
+ // that represents the number of nodes in an ideal row
+ var horizontalCountDouble = (horizontalPadding - verticalPadding + Math.sqrt(delta)) / (2 * (averageWidth + horizontalPadding));
+ // round the calculated horizontal count up or down according to the favored dimension
+ var horizontalCount;
+
+ if (favorHorizontalDim) {
+ horizontalCount = Math.ceil(horizontalCountDouble);
+ // if horizontalCount count is not a float value then both of rounding to floor and ceil
+ // will yield the same values. Instead of repeating the same calculation try going up
+ // while favoring horizontal dimension in such cases
+ if (horizontalCount == horizontalCountDouble) {
+ horizontalCount++;
+ }
+ } else {
+ horizontalCount = Math.floor(horizontalCountDouble);
+ }
+
+ // ideal width to be calculated
+ var idealWidth = horizontalCount * (averageWidth + horizontalPadding) - horizontalPadding;
+
+ // if max width is bigger than calculated ideal width reset ideal width to it
+ if (maxWidth > idealWidth) {
+ idealWidth = maxWidth;
+ }
+
+ // add the left-right margins to the ideal row width
+ idealWidth += horizontalPadding * 2;
+
+ // return the ideal row width1
+ return idealWidth;
+};
+
+CoSELayout.prototype.tileNodesByFavoringDim = function (nodes, minWidth, favorHorizontalDim) {
+ var verticalPadding = CoSEConstants.TILING_PADDING_VERTICAL;
+ var horizontalPadding = CoSEConstants.TILING_PADDING_HORIZONTAL;
+ var tilingCompareBy = CoSEConstants.TILING_COMPARE_BY;
+ var organization = {
+ rows: [],
+ rowWidth: [],
+ rowHeight: [],
+ width: 0,
+ height: minWidth, // assume minHeight equals to minWidth
+ verticalPadding: verticalPadding,
+ horizontalPadding: horizontalPadding,
+ centerX: 0,
+ centerY: 0
+ };
+
+ if (tilingCompareBy) {
+ organization.idealRowWidth = this.calcIdealRowWidth(nodes, favorHorizontalDim);
+ }
+
+ var getNodeArea = function getNodeArea(n) {
+ return n.rect.width * n.rect.height;
+ };
+
+ var areaCompareFcn = function areaCompareFcn(n1, n2) {
+ return getNodeArea(n2) - getNodeArea(n1);
+ };
+
+ // Sort the nodes in descending order of their areas
+ nodes.sort(function (n1, n2) {
+ var cmpBy = areaCompareFcn;
+ if (organization.idealRowWidth) {
+ cmpBy = tilingCompareBy;
+ return cmpBy(n1.id, n2.id);
+ }
+ return cmpBy(n1, n2);
+ });
+
+ // Create the organization -> calculate compound center
+ var sumCenterX = 0;
+ var sumCenterY = 0;
+ for (var i = 0; i < nodes.length; i++) {
+ var lNode = nodes[i];
+
+ sumCenterX += lNode.getCenterX();
+ sumCenterY += lNode.getCenterY();
+ }
+
+ organization.centerX = sumCenterX / nodes.length;
+ organization.centerY = sumCenterY / nodes.length;
+
+ // Create the organization -> tile members
+ for (var i = 0; i < nodes.length; i++) {
+ var lNode = nodes[i];
+
+ if (organization.rows.length == 0) {
+ this.insertNodeToRow(organization, lNode, 0, minWidth);
+ } else if (this.canAddHorizontal(organization, lNode.rect.width, lNode.rect.height)) {
+ var rowIndex = organization.rows.length - 1;
+ if (!organization.idealRowWidth) {
+ rowIndex = this.getShortestRowIndex(organization);
+ }
+ this.insertNodeToRow(organization, lNode, rowIndex, minWidth);
+ } else {
+ this.insertNodeToRow(organization, lNode, organization.rows.length, minWidth);
+ }
+
+ this.shiftToLastRow(organization);
+ }
+
+ return organization;
+};
+
+CoSELayout.prototype.insertNodeToRow = function (organization, node, rowIndex, minWidth) {
+ var minCompoundSize = minWidth;
+
+ // Add new row if needed
+ if (rowIndex == organization.rows.length) {
+ var secondDimension = [];
+
+ organization.rows.push(secondDimension);
+ organization.rowWidth.push(minCompoundSize);
+ organization.rowHeight.push(0);
+ }
+
+ // Update row width
+ var w = organization.rowWidth[rowIndex] + node.rect.width;
+
+ if (organization.rows[rowIndex].length > 0) {
+ w += organization.horizontalPadding;
+ }
+
+ organization.rowWidth[rowIndex] = w;
+ // Update compound width
+ if (organization.width < w) {
+ organization.width = w;
+ }
+
+ // Update height
+ var h = node.rect.height;
+ if (rowIndex > 0) h += organization.verticalPadding;
+
+ var extraHeight = 0;
+ if (h > organization.rowHeight[rowIndex]) {
+ extraHeight = organization.rowHeight[rowIndex];
+ organization.rowHeight[rowIndex] = h;
+ extraHeight = organization.rowHeight[rowIndex] - extraHeight;
+ }
+
+ organization.height += extraHeight;
+
+ // Insert node
+ organization.rows[rowIndex].push(node);
+};
+
+//Scans the rows of an organization and returns the one with the min width
+CoSELayout.prototype.getShortestRowIndex = function (organization) {
+ var r = -1;
+ var min = Number.MAX_VALUE;
+
+ for (var i = 0; i < organization.rows.length; i++) {
+ if (organization.rowWidth[i] < min) {
+ r = i;
+ min = organization.rowWidth[i];
+ }
+ }
+ return r;
+};
+
+//Scans the rows of an organization and returns the one with the max width
+CoSELayout.prototype.getLongestRowIndex = function (organization) {
+ var r = -1;
+ var max = Number.MIN_VALUE;
+
+ for (var i = 0; i < organization.rows.length; i++) {
+
+ if (organization.rowWidth[i] > max) {
+ r = i;
+ max = organization.rowWidth[i];
+ }
+ }
+
+ return r;
+};
+
+/**
+* This method checks whether adding extra width to the organization violates
+* the aspect ratio(1) or not.
+*/
+CoSELayout.prototype.canAddHorizontal = function (organization, extraWidth, extraHeight) {
+
+ // if there is an ideal row width specified use it instead of checking the aspect ratio
+ if (organization.idealRowWidth) {
+ var lastRowIndex = organization.rows.length - 1;
+ var lastRowWidth = organization.rowWidth[lastRowIndex];
+
+ // check and return if ideal row width will be exceed if the node is added to the row
+ return lastRowWidth + extraWidth + organization.horizontalPadding <= organization.idealRowWidth;
+ }
+
+ var sri = this.getShortestRowIndex(organization);
+
+ if (sri < 0) {
+ return true;
+ }
+
+ var min = organization.rowWidth[sri];
+
+ if (min + organization.horizontalPadding + extraWidth <= organization.width) return true;
+
+ var hDiff = 0;
+
+ // Adding to an existing row
+ if (organization.rowHeight[sri] < extraHeight) {
+ if (sri > 0) hDiff = extraHeight + organization.verticalPadding - organization.rowHeight[sri];
+ }
+
+ var add_to_row_ratio;
+ if (organization.width - min >= extraWidth + organization.horizontalPadding) {
+ add_to_row_ratio = (organization.height + hDiff) / (min + extraWidth + organization.horizontalPadding);
+ } else {
+ add_to_row_ratio = (organization.height + hDiff) / organization.width;
+ }
+
+ // Adding a new row for this node
+ hDiff = extraHeight + organization.verticalPadding;
+ var add_new_row_ratio;
+ if (organization.width < extraWidth) {
+ add_new_row_ratio = (organization.height + hDiff) / extraWidth;
+ } else {
+ add_new_row_ratio = (organization.height + hDiff) / organization.width;
+ }
+
+ if (add_new_row_ratio < 1) add_new_row_ratio = 1 / add_new_row_ratio;
+
+ if (add_to_row_ratio < 1) add_to_row_ratio = 1 / add_to_row_ratio;
+
+ return add_to_row_ratio < add_new_row_ratio;
+};
+
+//If moving the last node from the longest row and adding it to the last
+//row makes the bounding box smaller, do it.
+CoSELayout.prototype.shiftToLastRow = function (organization) {
+ var longest = this.getLongestRowIndex(organization);
+ var last = organization.rowWidth.length - 1;
+ var row = organization.rows[longest];
+ var node = row[row.length - 1];
+
+ var diff = node.width + organization.horizontalPadding;
+
+ // Check if there is enough space on the last row
+ if (organization.width - organization.rowWidth[last] > diff && longest != last) {
+ // Remove the last element of the longest row
+ row.splice(-1, 1);
+
+ // Push it to the last row
+ organization.rows[last].push(node);
+
+ organization.rowWidth[longest] = organization.rowWidth[longest] - diff;
+ organization.rowWidth[last] = organization.rowWidth[last] + diff;
+ organization.width = organization.rowWidth[instance.getLongestRowIndex(organization)];
+
+ // Update heights of the organization
+ var maxHeight = Number.MIN_VALUE;
+ for (var i = 0; i < row.length; i++) {
+ if (row[i].height > maxHeight) maxHeight = row[i].height;
+ }
+ if (longest > 0) maxHeight += organization.verticalPadding;
+
+ var prevTotal = organization.rowHeight[longest] + organization.rowHeight[last];
+
+ organization.rowHeight[longest] = maxHeight;
+ if (organization.rowHeight[last] < node.height + organization.verticalPadding) organization.rowHeight[last] = node.height + organization.verticalPadding;
+
+ var finalTotal = organization.rowHeight[longest] + organization.rowHeight[last];
+ organization.height += finalTotal - prevTotal;
+
+ this.shiftToLastRow(organization);
+ }
+};
+
+CoSELayout.prototype.tilingPreLayout = function () {
+ if (CoSEConstants.TILE) {
+ // Find zero degree nodes and create a compound for each level
+ this.groupZeroDegreeMembers();
+ // Tile and clear children of each compound
+ this.clearCompounds();
+ // Separately tile and clear zero degree nodes for each level
+ this.clearZeroDegreeMembers();
+ }
+};
+
+CoSELayout.prototype.tilingPostLayout = function () {
+ if (CoSEConstants.TILE) {
+ this.repopulateZeroDegreeMembers();
+ this.repopulateCompounds();
+ }
+};
+
+// -----------------------------------------------------------------------------
+// Section: Tree Reduction methods
+// -----------------------------------------------------------------------------
+// Reduce trees
+CoSELayout.prototype.reduceTrees = function () {
+ var prunedNodesAll = [];
+ var containsLeaf = true;
+ var node;
+
+ while (containsLeaf) {
+ var allNodes = this.graphManager.getAllNodes();
+ var prunedNodesInStepTemp = [];
+ containsLeaf = false;
+
+ for (var i = 0; i < allNodes.length; i++) {
+ node = allNodes[i];
+ if (node.getEdges().length == 1 && !node.getEdges()[0].isInterGraph && node.getChild() == null) {
+ if (CoSEConstants.PURE_INCREMENTAL) {
+ var otherEnd = node.getEdges()[0].getOtherEnd(node);
+ var relativePosition = new DimensionD(node.getCenterX() - otherEnd.getCenterX(), node.getCenterY() - otherEnd.getCenterY());
+ prunedNodesInStepTemp.push([node, node.getEdges()[0], node.getOwner(), relativePosition]);
+ } else {
+ prunedNodesInStepTemp.push([node, node.getEdges()[0], node.getOwner()]);
+ }
+ containsLeaf = true;
+ }
+ }
+ if (containsLeaf == true) {
+ var prunedNodesInStep = [];
+ for (var j = 0; j < prunedNodesInStepTemp.length; j++) {
+ if (prunedNodesInStepTemp[j][0].getEdges().length == 1) {
+ prunedNodesInStep.push(prunedNodesInStepTemp[j]);
+ prunedNodesInStepTemp[j][0].getOwner().remove(prunedNodesInStepTemp[j][0]);
+ }
+ }
+ prunedNodesAll.push(prunedNodesInStep);
+ this.graphManager.resetAllNodes();
+ this.graphManager.resetAllEdges();
+ }
+ }
+ this.prunedNodesAll = prunedNodesAll;
+};
+
+// Grow tree one step
+CoSELayout.prototype.growTree = function (prunedNodesAll) {
+ var lengthOfPrunedNodesInStep = prunedNodesAll.length;
+ var prunedNodesInStep = prunedNodesAll[lengthOfPrunedNodesInStep - 1];
+
+ var nodeData;
+ for (var i = 0; i < prunedNodesInStep.length; i++) {
+ nodeData = prunedNodesInStep[i];
+
+ this.findPlaceforPrunedNode(nodeData);
+
+ nodeData[2].add(nodeData[0]);
+ nodeData[2].add(nodeData[1], nodeData[1].source, nodeData[1].target);
+ }
+
+ prunedNodesAll.splice(prunedNodesAll.length - 1, 1);
+ this.graphManager.resetAllNodes();
+ this.graphManager.resetAllEdges();
+};
+
+// Find an appropriate position to replace pruned node, this method can be improved
+CoSELayout.prototype.findPlaceforPrunedNode = function (nodeData) {
+
+ var gridForPrunedNode;
+ var nodeToConnect;
+ var prunedNode = nodeData[0];
+ if (prunedNode == nodeData[1].source) {
+ nodeToConnect = nodeData[1].target;
+ } else {
+ nodeToConnect = nodeData[1].source;
+ }
+
+ if (CoSEConstants.PURE_INCREMENTAL) {
+ prunedNode.setCenter(nodeToConnect.getCenterX() + nodeData[3].getWidth(), nodeToConnect.getCenterY() + nodeData[3].getHeight());
+ } else {
+ var startGridX = nodeToConnect.startX;
+ var finishGridX = nodeToConnect.finishX;
+ var startGridY = nodeToConnect.startY;
+ var finishGridY = nodeToConnect.finishY;
+
+ var upNodeCount = 0;
+ var downNodeCount = 0;
+ var rightNodeCount = 0;
+ var leftNodeCount = 0;
+ var controlRegions = [upNodeCount, rightNodeCount, downNodeCount, leftNodeCount];
+
+ if (startGridY > 0) {
+ for (var i = startGridX; i <= finishGridX; i++) {
+ controlRegions[0] += this.grid[i][startGridY - 1].length + this.grid[i][startGridY].length - 1;
+ }
+ }
+ if (finishGridX < this.grid.length - 1) {
+ for (var i = startGridY; i <= finishGridY; i++) {
+ controlRegions[1] += this.grid[finishGridX + 1][i].length + this.grid[finishGridX][i].length - 1;
+ }
+ }
+ if (finishGridY < this.grid[0].length - 1) {
+ for (var i = startGridX; i <= finishGridX; i++) {
+ controlRegions[2] += this.grid[i][finishGridY + 1].length + this.grid[i][finishGridY].length - 1;
+ }
+ }
+ if (startGridX > 0) {
+ for (var i = startGridY; i <= finishGridY; i++) {
+ controlRegions[3] += this.grid[startGridX - 1][i].length + this.grid[startGridX][i].length - 1;
+ }
+ }
+ var min = Integer.MAX_VALUE;
+ var minCount;
+ var minIndex;
+ for (var j = 0; j < controlRegions.length; j++) {
+ if (controlRegions[j] < min) {
+ min = controlRegions[j];
+ minCount = 1;
+ minIndex = j;
+ } else if (controlRegions[j] == min) {
+ minCount++;
+ }
+ }
+
+ if (minCount == 3 && min == 0) {
+ if (controlRegions[0] == 0 && controlRegions[1] == 0 && controlRegions[2] == 0) {
+ gridForPrunedNode = 1;
+ } else if (controlRegions[0] == 0 && controlRegions[1] == 0 && controlRegions[3] == 0) {
+ gridForPrunedNode = 0;
+ } else if (controlRegions[0] == 0 && controlRegions[2] == 0 && controlRegions[3] == 0) {
+ gridForPrunedNode = 3;
+ } else if (controlRegions[1] == 0 && controlRegions[2] == 0 && controlRegions[3] == 0) {
+ gridForPrunedNode = 2;
+ }
+ } else if (minCount == 2 && min == 0) {
+ var random = Math.floor(Math.random() * 2);
+ if (controlRegions[0] == 0 && controlRegions[1] == 0) {
+ ;
+ if (random == 0) {
+ gridForPrunedNode = 0;
+ } else {
+ gridForPrunedNode = 1;
+ }
+ } else if (controlRegions[0] == 0 && controlRegions[2] == 0) {
+ if (random == 0) {
+ gridForPrunedNode = 0;
+ } else {
+ gridForPrunedNode = 2;
+ }
+ } else if (controlRegions[0] == 0 && controlRegions[3] == 0) {
+ if (random == 0) {
+ gridForPrunedNode = 0;
+ } else {
+ gridForPrunedNode = 3;
+ }
+ } else if (controlRegions[1] == 0 && controlRegions[2] == 0) {
+ if (random == 0) {
+ gridForPrunedNode = 1;
+ } else {
+ gridForPrunedNode = 2;
+ }
+ } else if (controlRegions[1] == 0 && controlRegions[3] == 0) {
+ if (random == 0) {
+ gridForPrunedNode = 1;
+ } else {
+ gridForPrunedNode = 3;
+ }
+ } else {
+ if (random == 0) {
+ gridForPrunedNode = 2;
+ } else {
+ gridForPrunedNode = 3;
+ }
+ }
+ } else if (minCount == 4 && min == 0) {
+ var random = Math.floor(Math.random() * 4);
+ gridForPrunedNode = random;
+ } else {
+ gridForPrunedNode = minIndex;
+ }
+
+ if (gridForPrunedNode == 0) {
+ prunedNode.setCenter(nodeToConnect.getCenterX(), nodeToConnect.getCenterY() - nodeToConnect.getHeight() / 2 - FDLayoutConstants.DEFAULT_EDGE_LENGTH - prunedNode.getHeight() / 2);
+ } else if (gridForPrunedNode == 1) {
+ prunedNode.setCenter(nodeToConnect.getCenterX() + nodeToConnect.getWidth() / 2 + FDLayoutConstants.DEFAULT_EDGE_LENGTH + prunedNode.getWidth() / 2, nodeToConnect.getCenterY());
+ } else if (gridForPrunedNode == 2) {
+ prunedNode.setCenter(nodeToConnect.getCenterX(), nodeToConnect.getCenterY() + nodeToConnect.getHeight() / 2 + FDLayoutConstants.DEFAULT_EDGE_LENGTH + prunedNode.getHeight() / 2);
+ } else {
+ prunedNode.setCenter(nodeToConnect.getCenterX() - nodeToConnect.getWidth() / 2 - FDLayoutConstants.DEFAULT_EDGE_LENGTH - prunedNode.getWidth() / 2, nodeToConnect.getCenterY());
+ }
+ }
+};
+
+module.exports = CoSELayout;
+
+/***/ }),
+
+/***/ 991:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+
+
+var FDLayoutNode = __webpack_require__(551).FDLayoutNode;
+var IMath = __webpack_require__(551).IMath;
+
+function CoSENode(gm, loc, size, vNode) {
+ FDLayoutNode.call(this, gm, loc, size, vNode);
+}
+
+CoSENode.prototype = Object.create(FDLayoutNode.prototype);
+for (var prop in FDLayoutNode) {
+ CoSENode[prop] = FDLayoutNode[prop];
+}
+
+CoSENode.prototype.calculateDisplacement = function () {
+ var layout = this.graphManager.getLayout();
+ // this check is for compound nodes that contain fixed nodes
+ if (this.getChild() != null && this.fixedNodeWeight) {
+ this.displacementX += layout.coolingFactor * (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.fixedNodeWeight;
+ this.displacementY += layout.coolingFactor * (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.fixedNodeWeight;
+ } else {
+ this.displacementX += layout.coolingFactor * (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.noOfChildren;
+ this.displacementY += layout.coolingFactor * (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.noOfChildren;
+ }
+
+ if (Math.abs(this.displacementX) > layout.coolingFactor * layout.maxNodeDisplacement) {
+ this.displacementX = layout.coolingFactor * layout.maxNodeDisplacement * IMath.sign(this.displacementX);
+ }
+
+ if (Math.abs(this.displacementY) > layout.coolingFactor * layout.maxNodeDisplacement) {
+ this.displacementY = layout.coolingFactor * layout.maxNodeDisplacement * IMath.sign(this.displacementY);
+ }
+
+ // non-empty compound node, propogate movement to children as well
+ if (this.child && this.child.getNodes().length > 0) {
+ this.propogateDisplacementToChildren(this.displacementX, this.displacementY);
+ }
+};
+
+CoSENode.prototype.propogateDisplacementToChildren = function (dX, dY) {
+ var nodes = this.getChild().getNodes();
+ var node;
+ for (var i = 0; i < nodes.length; i++) {
+ node = nodes[i];
+ if (node.getChild() == null) {
+ node.displacementX += dX;
+ node.displacementY += dY;
+ } else {
+ node.propogateDisplacementToChildren(dX, dY);
+ }
+ }
+};
+
+CoSENode.prototype.move = function () {
+ var layout = this.graphManager.getLayout();
+
+ // a simple node or an empty compound node, move it
+ if (this.child == null || this.child.getNodes().length == 0) {
+ this.moveBy(this.displacementX, this.displacementY);
+
+ layout.totalDisplacement += Math.abs(this.displacementX) + Math.abs(this.displacementY);
+ }
+
+ this.springForceX = 0;
+ this.springForceY = 0;
+ this.repulsionForceX = 0;
+ this.repulsionForceY = 0;
+ this.gravitationForceX = 0;
+ this.gravitationForceY = 0;
+ this.displacementX = 0;
+ this.displacementY = 0;
+};
+
+CoSENode.prototype.setPred1 = function (pred1) {
+ this.pred1 = pred1;
+};
+
+CoSENode.prototype.getPred1 = function () {
+ return pred1;
+};
+
+CoSENode.prototype.getPred2 = function () {
+ return pred2;
+};
+
+CoSENode.prototype.setNext = function (next) {
+ this.next = next;
+};
+
+CoSENode.prototype.getNext = function () {
+ return next;
+};
+
+CoSENode.prototype.setProcessed = function (processed) {
+ this.processed = processed;
+};
+
+CoSENode.prototype.isProcessed = function () {
+ return processed;
+};
+
+module.exports = CoSENode;
+
+/***/ }),
+
+/***/ 902:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+
+
+function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
+
+var CoSEConstants = __webpack_require__(806);
+var LinkedList = __webpack_require__(551).LinkedList;
+var Matrix = __webpack_require__(551).Matrix;
+var SVD = __webpack_require__(551).SVD;
+
+function ConstraintHandler() {}
+
+ConstraintHandler.handleConstraints = function (layout) {
+ // let layout = this.graphManager.getLayout();
+
+ // get constraints from layout
+ var constraints = {};
+ constraints.fixedNodeConstraint = layout.constraints.fixedNodeConstraint;
+ constraints.alignmentConstraint = layout.constraints.alignmentConstraint;
+ constraints.relativePlacementConstraint = layout.constraints.relativePlacementConstraint;
+
+ var idToNodeMap = new Map();
+ var nodeIndexes = new Map();
+ var xCoords = [];
+ var yCoords = [];
+
+ var allNodes = layout.getAllNodes();
+ var index = 0;
+ // fill index map and coordinates
+ for (var i = 0; i < allNodes.length; i++) {
+ var node = allNodes[i];
+ if (node.getChild() == null) {
+ nodeIndexes.set(node.id, index++);
+ xCoords.push(node.getCenterX());
+ yCoords.push(node.getCenterY());
+ idToNodeMap.set(node.id, node);
+ }
+ }
+
+ // if there exists relative placement constraint without gap value, set it to default
+ if (constraints.relativePlacementConstraint) {
+ constraints.relativePlacementConstraint.forEach(function (constraint) {
+ if (!constraint.gap && constraint.gap != 0) {
+ if (constraint.left) {
+ constraint.gap = CoSEConstants.DEFAULT_EDGE_LENGTH + idToNodeMap.get(constraint.left).getWidth() / 2 + idToNodeMap.get(constraint.right).getWidth() / 2;
+ } else {
+ constraint.gap = CoSEConstants.DEFAULT_EDGE_LENGTH + idToNodeMap.get(constraint.top).getHeight() / 2 + idToNodeMap.get(constraint.bottom).getHeight() / 2;
+ }
+ }
+ });
+ }
+
+ /* auxiliary functions */
+
+ // calculate difference between two position objects
+ var calculatePositionDiff = function calculatePositionDiff(pos1, pos2) {
+ return { x: pos1.x - pos2.x, y: pos1.y - pos2.y };
+ };
+
+ // calculate average position of the nodes
+ var calculateAvgPosition = function calculateAvgPosition(nodeIdSet) {
+ var xPosSum = 0;
+ var yPosSum = 0;
+ nodeIdSet.forEach(function (nodeId) {
+ xPosSum += xCoords[nodeIndexes.get(nodeId)];
+ yPosSum += yCoords[nodeIndexes.get(nodeId)];
+ });
+
+ return { x: xPosSum / nodeIdSet.size, y: yPosSum / nodeIdSet.size };
+ };
+
+ // find an appropriate positioning for the nodes in a given graph according to relative placement constraints
+ // this function also takes the fixed nodes and alignment constraints into account
+ // graph: dag to be evaluated, direction: "horizontal" or "vertical",
+ // fixedNodes: set of fixed nodes to consider during evaluation, dummyPositions: appropriate coordinates of the dummy nodes
+ var findAppropriatePositionForRelativePlacement = function findAppropriatePositionForRelativePlacement(graph, direction, fixedNodes, dummyPositions, componentSources) {
+
+ // find union of two sets
+ function setUnion(setA, setB) {
+ var union = new Set(setA);
+ var _iteratorNormalCompletion = true;
+ var _didIteratorError = false;
+ var _iteratorError = undefined;
+
+ try {
+ for (var _iterator = setB[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+ var elem = _step.value;
+
+ union.add(elem);
+ }
+ } catch (err) {
+ _didIteratorError = true;
+ _iteratorError = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion && _iterator.return) {
+ _iterator.return();
+ }
+ } finally {
+ if (_didIteratorError) {
+ throw _iteratorError;
+ }
+ }
+ }
+
+ return union;
+ }
+
+ // find indegree count for each node
+ var inDegrees = new Map();
+
+ graph.forEach(function (value, key) {
+ inDegrees.set(key, 0);
+ });
+ graph.forEach(function (value, key) {
+ value.forEach(function (adjacent) {
+ inDegrees.set(adjacent.id, inDegrees.get(adjacent.id) + 1);
+ });
+ });
+
+ var positionMap = new Map(); // keeps the position for each node
+ var pastMap = new Map(); // keeps the predecessors(past) of a node
+ var queue = new LinkedList();
+ inDegrees.forEach(function (value, key) {
+ if (value == 0) {
+ queue.push(key);
+ if (!fixedNodes) {
+ if (direction == "horizontal") {
+ positionMap.set(key, nodeIndexes.has(key) ? xCoords[nodeIndexes.get(key)] : dummyPositions.get(key));
+ } else {
+ positionMap.set(key, nodeIndexes.has(key) ? yCoords[nodeIndexes.get(key)] : dummyPositions.get(key));
+ }
+ }
+ } else {
+ positionMap.set(key, Number.NEGATIVE_INFINITY);
+ }
+ if (fixedNodes) {
+ pastMap.set(key, new Set([key]));
+ }
+ });
+
+ // align sources of each component in enforcement phase
+ if (fixedNodes) {
+ componentSources.forEach(function (component) {
+ var fixedIds = [];
+ component.forEach(function (nodeId) {
+ if (fixedNodes.has(nodeId)) {
+ fixedIds.push(nodeId);
+ }
+ });
+ if (fixedIds.length > 0) {
+ var position = 0;
+ fixedIds.forEach(function (fixedId) {
+ if (direction == "horizontal") {
+ positionMap.set(fixedId, nodeIndexes.has(fixedId) ? xCoords[nodeIndexes.get(fixedId)] : dummyPositions.get(fixedId));
+ position += positionMap.get(fixedId);
+ } else {
+ positionMap.set(fixedId, nodeIndexes.has(fixedId) ? yCoords[nodeIndexes.get(fixedId)] : dummyPositions.get(fixedId));
+ position += positionMap.get(fixedId);
+ }
+ });
+ position = position / fixedIds.length;
+ component.forEach(function (nodeId) {
+ if (!fixedNodes.has(nodeId)) {
+ positionMap.set(nodeId, position);
+ }
+ });
+ } else {
+ var _position = 0;
+ component.forEach(function (nodeId) {
+ if (direction == "horizontal") {
+ _position += nodeIndexes.has(nodeId) ? xCoords[nodeIndexes.get(nodeId)] : dummyPositions.get(nodeId);
+ } else {
+ _position += nodeIndexes.has(nodeId) ? yCoords[nodeIndexes.get(nodeId)] : dummyPositions.get(nodeId);
+ }
+ });
+ _position = _position / component.length;
+ component.forEach(function (nodeId) {
+ positionMap.set(nodeId, _position);
+ });
+ }
+ });
+ }
+
+ // calculate positions of the nodes
+
+ var _loop = function _loop() {
+ var currentNode = queue.shift();
+ var neighbors = graph.get(currentNode);
+ neighbors.forEach(function (neighbor) {
+ if (positionMap.get(neighbor.id) < positionMap.get(currentNode) + neighbor.gap) {
+ if (fixedNodes && fixedNodes.has(neighbor.id)) {
+ var fixedPosition = void 0;
+ if (direction == "horizontal") {
+ fixedPosition = nodeIndexes.has(neighbor.id) ? xCoords[nodeIndexes.get(neighbor.id)] : dummyPositions.get(neighbor.id);
+ } else {
+ fixedPosition = nodeIndexes.has(neighbor.id) ? yCoords[nodeIndexes.get(neighbor.id)] : dummyPositions.get(neighbor.id);
+ }
+ positionMap.set(neighbor.id, fixedPosition); // TODO: may do unnecessary work
+ if (fixedPosition < positionMap.get(currentNode) + neighbor.gap) {
+ var diff = positionMap.get(currentNode) + neighbor.gap - fixedPosition;
+ pastMap.get(currentNode).forEach(function (nodeId) {
+ positionMap.set(nodeId, positionMap.get(nodeId) - diff);
+ });
+ }
+ } else {
+ positionMap.set(neighbor.id, positionMap.get(currentNode) + neighbor.gap);
+ }
+ }
+ inDegrees.set(neighbor.id, inDegrees.get(neighbor.id) - 1);
+ if (inDegrees.get(neighbor.id) == 0) {
+ queue.push(neighbor.id);
+ }
+ if (fixedNodes) {
+ pastMap.set(neighbor.id, setUnion(pastMap.get(currentNode), pastMap.get(neighbor.id)));
+ }
+ });
+ };
+
+ while (queue.length != 0) {
+ _loop();
+ }
+
+ // readjust position of the nodes after enforcement
+ if (fixedNodes) {
+ // find indegree count for each node
+ var sinkNodes = new Set();
+
+ graph.forEach(function (value, key) {
+ if (value.length == 0) {
+ sinkNodes.add(key);
+ }
+ });
+
+ var _components = [];
+ pastMap.forEach(function (value, key) {
+ if (sinkNodes.has(key)) {
+ var isFixedComponent = false;
+ var _iteratorNormalCompletion2 = true;
+ var _didIteratorError2 = false;
+ var _iteratorError2 = undefined;
+
+ try {
+ for (var _iterator2 = value[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
+ var nodeId = _step2.value;
+
+ if (fixedNodes.has(nodeId)) {
+ isFixedComponent = true;
+ }
+ }
+ } catch (err) {
+ _didIteratorError2 = true;
+ _iteratorError2 = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion2 && _iterator2.return) {
+ _iterator2.return();
+ }
+ } finally {
+ if (_didIteratorError2) {
+ throw _iteratorError2;
+ }
+ }
+ }
+
+ if (!isFixedComponent) {
+ var isExist = false;
+ var existAt = void 0;
+ _components.forEach(function (component, index) {
+ if (component.has([].concat(_toConsumableArray(value))[0])) {
+ isExist = true;
+ existAt = index;
+ }
+ });
+ if (!isExist) {
+ _components.push(new Set(value));
+ } else {
+ value.forEach(function (ele) {
+ _components[existAt].add(ele);
+ });
+ }
+ }
+ }
+ });
+
+ _components.forEach(function (component, index) {
+ var minBefore = Number.POSITIVE_INFINITY;
+ var minAfter = Number.POSITIVE_INFINITY;
+ var maxBefore = Number.NEGATIVE_INFINITY;
+ var maxAfter = Number.NEGATIVE_INFINITY;
+
+ var _iteratorNormalCompletion3 = true;
+ var _didIteratorError3 = false;
+ var _iteratorError3 = undefined;
+
+ try {
+ for (var _iterator3 = component[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
+ var nodeId = _step3.value;
+
+ var posBefore = void 0;
+ if (direction == "horizontal") {
+ posBefore = nodeIndexes.has(nodeId) ? xCoords[nodeIndexes.get(nodeId)] : dummyPositions.get(nodeId);
+ } else {
+ posBefore = nodeIndexes.has(nodeId) ? yCoords[nodeIndexes.get(nodeId)] : dummyPositions.get(nodeId);
+ }
+ var posAfter = positionMap.get(nodeId);
+ if (posBefore < minBefore) {
+ minBefore = posBefore;
+ }
+ if (posBefore > maxBefore) {
+ maxBefore = posBefore;
+ }
+ if (posAfter < minAfter) {
+ minAfter = posAfter;
+ }
+ if (posAfter > maxAfter) {
+ maxAfter = posAfter;
+ }
+ }
+ } catch (err) {
+ _didIteratorError3 = true;
+ _iteratorError3 = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion3 && _iterator3.return) {
+ _iterator3.return();
+ }
+ } finally {
+ if (_didIteratorError3) {
+ throw _iteratorError3;
+ }
+ }
+ }
+
+ var diff = (minBefore + maxBefore) / 2 - (minAfter + maxAfter) / 2;
+
+ var _iteratorNormalCompletion4 = true;
+ var _didIteratorError4 = false;
+ var _iteratorError4 = undefined;
+
+ try {
+ for (var _iterator4 = component[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {
+ var _nodeId = _step4.value;
+
+ positionMap.set(_nodeId, positionMap.get(_nodeId) + diff);
+ }
+ } catch (err) {
+ _didIteratorError4 = true;
+ _iteratorError4 = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion4 && _iterator4.return) {
+ _iterator4.return();
+ }
+ } finally {
+ if (_didIteratorError4) {
+ throw _iteratorError4;
+ }
+ }
+ }
+ });
+ }
+
+ return positionMap;
+ };
+
+ // find transformation based on rel. placement constraints if there are both alignment and rel. placement constraints
+ // or if there are only rel. placement contraints where the largest component isn't sufficiently large
+ var applyReflectionForRelativePlacement = function applyReflectionForRelativePlacement(relativePlacementConstraints) {
+ // variables to count votes
+ var reflectOnY = 0,
+ notReflectOnY = 0;
+ var reflectOnX = 0,
+ notReflectOnX = 0;
+
+ relativePlacementConstraints.forEach(function (constraint) {
+ if (constraint.left) {
+ xCoords[nodeIndexes.get(constraint.left)] - xCoords[nodeIndexes.get(constraint.right)] >= 0 ? reflectOnY++ : notReflectOnY++;
+ } else {
+ yCoords[nodeIndexes.get(constraint.top)] - yCoords[nodeIndexes.get(constraint.bottom)] >= 0 ? reflectOnX++ : notReflectOnX++;
+ }
+ });
+
+ if (reflectOnY > notReflectOnY && reflectOnX > notReflectOnX) {
+ for (var _i = 0; _i < nodeIndexes.size; _i++) {
+ xCoords[_i] = -1 * xCoords[_i];
+ yCoords[_i] = -1 * yCoords[_i];
+ }
+ } else if (reflectOnY > notReflectOnY) {
+ for (var _i2 = 0; _i2 < nodeIndexes.size; _i2++) {
+ xCoords[_i2] = -1 * xCoords[_i2];
+ }
+ } else if (reflectOnX > notReflectOnX) {
+ for (var _i3 = 0; _i3 < nodeIndexes.size; _i3++) {
+ yCoords[_i3] = -1 * yCoords[_i3];
+ }
+ }
+ };
+
+ // find weakly connected components in undirected graph
+ var findComponents = function findComponents(graph) {
+ // find weakly connected components in dag
+ var components = [];
+ var queue = new LinkedList();
+ var visited = new Set();
+ var count = 0;
+
+ graph.forEach(function (value, key) {
+ if (!visited.has(key)) {
+ components[count] = [];
+ var _currentNode = key;
+ queue.push(_currentNode);
+ visited.add(_currentNode);
+ components[count].push(_currentNode);
+
+ while (queue.length != 0) {
+ _currentNode = queue.shift();
+ var neighbors = graph.get(_currentNode);
+ neighbors.forEach(function (neighbor) {
+ if (!visited.has(neighbor.id)) {
+ queue.push(neighbor.id);
+ visited.add(neighbor.id);
+ components[count].push(neighbor.id);
+ }
+ });
+ }
+ count++;
+ }
+ });
+ return components;
+ };
+
+ // return undirected version of given dag
+ var dagToUndirected = function dagToUndirected(dag) {
+ var undirected = new Map();
+
+ dag.forEach(function (value, key) {
+ undirected.set(key, []);
+ });
+
+ dag.forEach(function (value, key) {
+ value.forEach(function (adjacent) {
+ undirected.get(key).push(adjacent);
+ undirected.get(adjacent.id).push({ id: key, gap: adjacent.gap, direction: adjacent.direction });
+ });
+ });
+
+ return undirected;
+ };
+
+ // return reversed (directions inverted) version of given dag
+ var dagToReversed = function dagToReversed(dag) {
+ var reversed = new Map();
+
+ dag.forEach(function (value, key) {
+ reversed.set(key, []);
+ });
+
+ dag.forEach(function (value, key) {
+ value.forEach(function (adjacent) {
+ reversed.get(adjacent.id).push({ id: key, gap: adjacent.gap, direction: adjacent.direction });
+ });
+ });
+
+ return reversed;
+ };
+
+ /**** apply transformation to the initial draft layout to better align with constrained nodes ****/
+ // solve the Orthogonal Procrustean Problem to rotate and/or reflect initial draft layout
+ // here we follow the solution in Chapter 20.2 of Borg, I. & Groenen, P. (2005) Modern Multidimensional Scaling: Theory and Applications
+
+ /* construct source and target configurations */
+
+ var targetMatrix = []; // A - target configuration
+ var sourceMatrix = []; // B - source configuration
+ var standardTransformation = false; // false for no transformation, true for standart (Procrustes) transformation (rotation and/or reflection)
+ var reflectionType = false; // false/true for reflection check, 'reflectOnX', 'reflectOnY' or 'reflectOnBoth' for reflection type if necessary
+ var fixedNodes = new Set();
+ var dag = new Map(); // adjacency list to keep directed acyclic graph (dag) that consists of relative placement constraints
+ var dagUndirected = new Map(); // undirected version of the dag
+ var components = []; // weakly connected components
+
+ // fill fixedNodes collection to use later
+ if (constraints.fixedNodeConstraint) {
+ constraints.fixedNodeConstraint.forEach(function (nodeData) {
+ fixedNodes.add(nodeData.nodeId);
+ });
+ }
+
+ // construct dag from relative placement constraints
+ if (constraints.relativePlacementConstraint) {
+ // construct both directed and undirected version of the dag
+ constraints.relativePlacementConstraint.forEach(function (constraint) {
+ if (constraint.left) {
+ if (dag.has(constraint.left)) {
+ dag.get(constraint.left).push({ id: constraint.right, gap: constraint.gap, direction: "horizontal" });
+ } else {
+ dag.set(constraint.left, [{ id: constraint.right, gap: constraint.gap, direction: "horizontal" }]);
+ }
+ if (!dag.has(constraint.right)) {
+ dag.set(constraint.right, []);
+ }
+ } else {
+ if (dag.has(constraint.top)) {
+ dag.get(constraint.top).push({ id: constraint.bottom, gap: constraint.gap, direction: "vertical" });
+ } else {
+ dag.set(constraint.top, [{ id: constraint.bottom, gap: constraint.gap, direction: "vertical" }]);
+ }
+ if (!dag.has(constraint.bottom)) {
+ dag.set(constraint.bottom, []);
+ }
+ }
+ });
+
+ dagUndirected = dagToUndirected(dag);
+ components = findComponents(dagUndirected);
+ }
+
+ if (CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING) {
+ // first check fixed node constraint
+ if (constraints.fixedNodeConstraint && constraints.fixedNodeConstraint.length > 1) {
+ constraints.fixedNodeConstraint.forEach(function (nodeData, i) {
+ targetMatrix[i] = [nodeData.position.x, nodeData.position.y];
+ sourceMatrix[i] = [xCoords[nodeIndexes.get(nodeData.nodeId)], yCoords[nodeIndexes.get(nodeData.nodeId)]];
+ });
+ standardTransformation = true;
+ } else if (constraints.alignmentConstraint) {
+ (function () {
+ // then check alignment constraint
+ var count = 0;
+ if (constraints.alignmentConstraint.vertical) {
+ var verticalAlign = constraints.alignmentConstraint.vertical;
+
+ var _loop2 = function _loop2(_i4) {
+ var alignmentSet = new Set();
+ verticalAlign[_i4].forEach(function (nodeId) {
+ alignmentSet.add(nodeId);
+ });
+ var intersection = new Set([].concat(_toConsumableArray(alignmentSet)).filter(function (x) {
+ return fixedNodes.has(x);
+ }));
+ var xPos = void 0;
+ if (intersection.size > 0) xPos = xCoords[nodeIndexes.get(intersection.values().next().value)];else xPos = calculateAvgPosition(alignmentSet).x;
+
+ verticalAlign[_i4].forEach(function (nodeId) {
+ targetMatrix[count] = [xPos, yCoords[nodeIndexes.get(nodeId)]];
+ sourceMatrix[count] = [xCoords[nodeIndexes.get(nodeId)], yCoords[nodeIndexes.get(nodeId)]];
+ count++;
+ });
+ };
+
+ for (var _i4 = 0; _i4 < verticalAlign.length; _i4++) {
+ _loop2(_i4);
+ }
+ standardTransformation = true;
+ }
+ if (constraints.alignmentConstraint.horizontal) {
+ var horizontalAlign = constraints.alignmentConstraint.horizontal;
+
+ var _loop3 = function _loop3(_i5) {
+ var alignmentSet = new Set();
+ horizontalAlign[_i5].forEach(function (nodeId) {
+ alignmentSet.add(nodeId);
+ });
+ var intersection = new Set([].concat(_toConsumableArray(alignmentSet)).filter(function (x) {
+ return fixedNodes.has(x);
+ }));
+ var yPos = void 0;
+ if (intersection.size > 0) yPos = xCoords[nodeIndexes.get(intersection.values().next().value)];else yPos = calculateAvgPosition(alignmentSet).y;
+
+ horizontalAlign[_i5].forEach(function (nodeId) {
+ targetMatrix[count] = [xCoords[nodeIndexes.get(nodeId)], yPos];
+ sourceMatrix[count] = [xCoords[nodeIndexes.get(nodeId)], yCoords[nodeIndexes.get(nodeId)]];
+ count++;
+ });
+ };
+
+ for (var _i5 = 0; _i5 < horizontalAlign.length; _i5++) {
+ _loop3(_i5);
+ }
+ standardTransformation = true;
+ }
+ if (constraints.relativePlacementConstraint) {
+ reflectionType = true;
+ }
+ })();
+ } else if (constraints.relativePlacementConstraint) {
+ // finally check relative placement constraint
+ // find largest component in dag
+ var largestComponentSize = 0;
+ var largestComponentIndex = 0;
+ for (var _i6 = 0; _i6 < components.length; _i6++) {
+ if (components[_i6].length > largestComponentSize) {
+ largestComponentSize = components[_i6].length;
+ largestComponentIndex = _i6;
+ }
+ }
+ // if largest component isn't dominant, then take the votes for reflection
+ if (largestComponentSize < dagUndirected.size / 2) {
+ applyReflectionForRelativePlacement(constraints.relativePlacementConstraint);
+ standardTransformation = false;
+ reflectionType = false;
+ } else {
+ // use largest component for transformation
+ // construct horizontal and vertical subgraphs in the largest component
+ var subGraphOnHorizontal = new Map();
+ var subGraphOnVertical = new Map();
+ var constraintsInlargestComponent = [];
+
+ components[largestComponentIndex].forEach(function (nodeId) {
+ dag.get(nodeId).forEach(function (adjacent) {
+ if (adjacent.direction == "horizontal") {
+ if (subGraphOnHorizontal.has(nodeId)) {
+ subGraphOnHorizontal.get(nodeId).push(adjacent);
+ } else {
+ subGraphOnHorizontal.set(nodeId, [adjacent]);
+ }
+ if (!subGraphOnHorizontal.has(adjacent.id)) {
+ subGraphOnHorizontal.set(adjacent.id, []);
+ }
+ constraintsInlargestComponent.push({ left: nodeId, right: adjacent.id });
+ } else {
+ if (subGraphOnVertical.has(nodeId)) {
+ subGraphOnVertical.get(nodeId).push(adjacent);
+ } else {
+ subGraphOnVertical.set(nodeId, [adjacent]);
+ }
+ if (!subGraphOnVertical.has(adjacent.id)) {
+ subGraphOnVertical.set(adjacent.id, []);
+ }
+ constraintsInlargestComponent.push({ top: nodeId, bottom: adjacent.id });
+ }
+ });
+ });
+
+ applyReflectionForRelativePlacement(constraintsInlargestComponent);
+ reflectionType = false;
+
+ // calculate appropriate positioning for subgraphs
+ var positionMapHorizontal = findAppropriatePositionForRelativePlacement(subGraphOnHorizontal, "horizontal");
+ var positionMapVertical = findAppropriatePositionForRelativePlacement(subGraphOnVertical, "vertical");
+
+ // construct source and target configuration
+ components[largestComponentIndex].forEach(function (nodeId, i) {
+ sourceMatrix[i] = [xCoords[nodeIndexes.get(nodeId)], yCoords[nodeIndexes.get(nodeId)]];
+ targetMatrix[i] = [];
+ if (positionMapHorizontal.has(nodeId)) {
+ targetMatrix[i][0] = positionMapHorizontal.get(nodeId);
+ } else {
+ targetMatrix[i][0] = xCoords[nodeIndexes.get(nodeId)];
+ }
+ if (positionMapVertical.has(nodeId)) {
+ targetMatrix[i][1] = positionMapVertical.get(nodeId);
+ } else {
+ targetMatrix[i][1] = yCoords[nodeIndexes.get(nodeId)];
+ }
+ });
+
+ standardTransformation = true;
+ }
+ }
+
+ // if transformation is required, then calculate and apply transformation matrix
+ if (standardTransformation) {
+ /* calculate transformation matrix */
+ var transformationMatrix = void 0;
+ var targetMatrixTranspose = Matrix.transpose(targetMatrix); // A'
+ var sourceMatrixTranspose = Matrix.transpose(sourceMatrix); // B'
+
+ // centralize transpose matrices
+ for (var _i7 = 0; _i7 < targetMatrixTranspose.length; _i7++) {
+ targetMatrixTranspose[_i7] = Matrix.multGamma(targetMatrixTranspose[_i7]);
+ sourceMatrixTranspose[_i7] = Matrix.multGamma(sourceMatrixTranspose[_i7]);
+ }
+
+ // do actual calculation for transformation matrix
+ var tempMatrix = Matrix.multMat(targetMatrixTranspose, Matrix.transpose(sourceMatrixTranspose)); // tempMatrix = A'B
+ var SVDResult = SVD.svd(tempMatrix); // SVD(A'B) = USV', svd function returns U, S and V
+ transformationMatrix = Matrix.multMat(SVDResult.V, Matrix.transpose(SVDResult.U)); // transformationMatrix = T = VU'
+
+ /* apply found transformation matrix to obtain final draft layout */
+ for (var _i8 = 0; _i8 < nodeIndexes.size; _i8++) {
+ var temp1 = [xCoords[_i8], yCoords[_i8]];
+ var temp2 = [transformationMatrix[0][0], transformationMatrix[1][0]];
+ var temp3 = [transformationMatrix[0][1], transformationMatrix[1][1]];
+ xCoords[_i8] = Matrix.dotProduct(temp1, temp2);
+ yCoords[_i8] = Matrix.dotProduct(temp1, temp3);
+ }
+
+ // applied only both alignment and rel. placement constraints exist
+ if (reflectionType) {
+ applyReflectionForRelativePlacement(constraints.relativePlacementConstraint);
+ }
+ }
+ }
+
+ if (CoSEConstants.ENFORCE_CONSTRAINTS) {
+ /**** enforce constraints on the transformed draft layout ****/
+
+ /* first enforce fixed node constraint */
+
+ if (constraints.fixedNodeConstraint && constraints.fixedNodeConstraint.length > 0) {
+ var translationAmount = { x: 0, y: 0 };
+ constraints.fixedNodeConstraint.forEach(function (nodeData, i) {
+ var posInTheory = { x: xCoords[nodeIndexes.get(nodeData.nodeId)], y: yCoords[nodeIndexes.get(nodeData.nodeId)] };
+ var posDesired = nodeData.position;
+ var posDiff = calculatePositionDiff(posDesired, posInTheory);
+ translationAmount.x += posDiff.x;
+ translationAmount.y += posDiff.y;
+ });
+ translationAmount.x /= constraints.fixedNodeConstraint.length;
+ translationAmount.y /= constraints.fixedNodeConstraint.length;
+
+ xCoords.forEach(function (value, i) {
+ xCoords[i] += translationAmount.x;
+ });
+
+ yCoords.forEach(function (value, i) {
+ yCoords[i] += translationAmount.y;
+ });
+
+ constraints.fixedNodeConstraint.forEach(function (nodeData) {
+ xCoords[nodeIndexes.get(nodeData.nodeId)] = nodeData.position.x;
+ yCoords[nodeIndexes.get(nodeData.nodeId)] = nodeData.position.y;
+ });
+ }
+
+ /* then enforce alignment constraint */
+
+ if (constraints.alignmentConstraint) {
+ if (constraints.alignmentConstraint.vertical) {
+ var xAlign = constraints.alignmentConstraint.vertical;
+
+ var _loop4 = function _loop4(_i9) {
+ var alignmentSet = new Set();
+ xAlign[_i9].forEach(function (nodeId) {
+ alignmentSet.add(nodeId);
+ });
+ var intersection = new Set([].concat(_toConsumableArray(alignmentSet)).filter(function (x) {
+ return fixedNodes.has(x);
+ }));
+ var xPos = void 0;
+ if (intersection.size > 0) xPos = xCoords[nodeIndexes.get(intersection.values().next().value)];else xPos = calculateAvgPosition(alignmentSet).x;
+
+ alignmentSet.forEach(function (nodeId) {
+ if (!fixedNodes.has(nodeId)) xCoords[nodeIndexes.get(nodeId)] = xPos;
+ });
+ };
+
+ for (var _i9 = 0; _i9 < xAlign.length; _i9++) {
+ _loop4(_i9);
+ }
+ }
+ if (constraints.alignmentConstraint.horizontal) {
+ var yAlign = constraints.alignmentConstraint.horizontal;
+
+ var _loop5 = function _loop5(_i10) {
+ var alignmentSet = new Set();
+ yAlign[_i10].forEach(function (nodeId) {
+ alignmentSet.add(nodeId);
+ });
+ var intersection = new Set([].concat(_toConsumableArray(alignmentSet)).filter(function (x) {
+ return fixedNodes.has(x);
+ }));
+ var yPos = void 0;
+ if (intersection.size > 0) yPos = yCoords[nodeIndexes.get(intersection.values().next().value)];else yPos = calculateAvgPosition(alignmentSet).y;
+
+ alignmentSet.forEach(function (nodeId) {
+ if (!fixedNodes.has(nodeId)) yCoords[nodeIndexes.get(nodeId)] = yPos;
+ });
+ };
+
+ for (var _i10 = 0; _i10 < yAlign.length; _i10++) {
+ _loop5(_i10);
+ }
+ }
+ }
+
+ /* finally enforce relative placement constraint */
+
+ if (constraints.relativePlacementConstraint) {
+ (function () {
+ var nodeToDummyForVerticalAlignment = new Map();
+ var nodeToDummyForHorizontalAlignment = new Map();
+ var dummyToNodeForVerticalAlignment = new Map();
+ var dummyToNodeForHorizontalAlignment = new Map();
+ var dummyPositionsForVerticalAlignment = new Map();
+ var dummyPositionsForHorizontalAlignment = new Map();
+ var fixedNodesOnHorizontal = new Set();
+ var fixedNodesOnVertical = new Set();
+
+ // fill maps and sets
+ fixedNodes.forEach(function (nodeId) {
+ fixedNodesOnHorizontal.add(nodeId);
+ fixedNodesOnVertical.add(nodeId);
+ });
+
+ if (constraints.alignmentConstraint) {
+ if (constraints.alignmentConstraint.vertical) {
+ var verticalAlignment = constraints.alignmentConstraint.vertical;
+
+ var _loop6 = function _loop6(_i11) {
+ dummyToNodeForVerticalAlignment.set("dummy" + _i11, []);
+ verticalAlignment[_i11].forEach(function (nodeId) {
+ nodeToDummyForVerticalAlignment.set(nodeId, "dummy" + _i11);
+ dummyToNodeForVerticalAlignment.get("dummy" + _i11).push(nodeId);
+ if (fixedNodes.has(nodeId)) {
+ fixedNodesOnHorizontal.add("dummy" + _i11);
+ }
+ });
+ dummyPositionsForVerticalAlignment.set("dummy" + _i11, xCoords[nodeIndexes.get(verticalAlignment[_i11][0])]);
+ };
+
+ for (var _i11 = 0; _i11 < verticalAlignment.length; _i11++) {
+ _loop6(_i11);
+ }
+ }
+ if (constraints.alignmentConstraint.horizontal) {
+ var horizontalAlignment = constraints.alignmentConstraint.horizontal;
+
+ var _loop7 = function _loop7(_i12) {
+ dummyToNodeForHorizontalAlignment.set("dummy" + _i12, []);
+ horizontalAlignment[_i12].forEach(function (nodeId) {
+ nodeToDummyForHorizontalAlignment.set(nodeId, "dummy" + _i12);
+ dummyToNodeForHorizontalAlignment.get("dummy" + _i12).push(nodeId);
+ if (fixedNodes.has(nodeId)) {
+ fixedNodesOnVertical.add("dummy" + _i12);
+ }
+ });
+ dummyPositionsForHorizontalAlignment.set("dummy" + _i12, yCoords[nodeIndexes.get(horizontalAlignment[_i12][0])]);
+ };
+
+ for (var _i12 = 0; _i12 < horizontalAlignment.length; _i12++) {
+ _loop7(_i12);
+ }
+ }
+ }
+
+ // construct horizontal and vertical dags (subgraphs) from overall dag
+ var dagOnHorizontal = new Map();
+ var dagOnVertical = new Map();
+
+ var _loop8 = function _loop8(nodeId) {
+ dag.get(nodeId).forEach(function (adjacent) {
+ var sourceId = void 0;
+ var targetNode = void 0;
+ if (adjacent["direction"] == "horizontal") {
+ sourceId = nodeToDummyForVerticalAlignment.get(nodeId) ? nodeToDummyForVerticalAlignment.get(nodeId) : nodeId;
+ if (nodeToDummyForVerticalAlignment.get(adjacent.id)) {
+ targetNode = { id: nodeToDummyForVerticalAlignment.get(adjacent.id), gap: adjacent.gap, direction: adjacent.direction };
+ } else {
+ targetNode = adjacent;
+ }
+ if (dagOnHorizontal.has(sourceId)) {
+ dagOnHorizontal.get(sourceId).push(targetNode);
+ } else {
+ dagOnHorizontal.set(sourceId, [targetNode]);
+ }
+ if (!dagOnHorizontal.has(targetNode.id)) {
+ dagOnHorizontal.set(targetNode.id, []);
+ }
+ } else {
+ sourceId = nodeToDummyForHorizontalAlignment.get(nodeId) ? nodeToDummyForHorizontalAlignment.get(nodeId) : nodeId;
+ if (nodeToDummyForHorizontalAlignment.get(adjacent.id)) {
+ targetNode = { id: nodeToDummyForHorizontalAlignment.get(adjacent.id), gap: adjacent.gap, direction: adjacent.direction };
+ } else {
+ targetNode = adjacent;
+ }
+ if (dagOnVertical.has(sourceId)) {
+ dagOnVertical.get(sourceId).push(targetNode);
+ } else {
+ dagOnVertical.set(sourceId, [targetNode]);
+ }
+ if (!dagOnVertical.has(targetNode.id)) {
+ dagOnVertical.set(targetNode.id, []);
+ }
+ }
+ });
+ };
+
+ var _iteratorNormalCompletion5 = true;
+ var _didIteratorError5 = false;
+ var _iteratorError5 = undefined;
+
+ try {
+ for (var _iterator5 = dag.keys()[Symbol.iterator](), _step5; !(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done); _iteratorNormalCompletion5 = true) {
+ var nodeId = _step5.value;
+
+ _loop8(nodeId);
+ }
+
+ // find source nodes of each component in horizontal and vertical dags
+ } catch (err) {
+ _didIteratorError5 = true;
+ _iteratorError5 = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion5 && _iterator5.return) {
+ _iterator5.return();
+ }
+ } finally {
+ if (_didIteratorError5) {
+ throw _iteratorError5;
+ }
+ }
+ }
+
+ var undirectedOnHorizontal = dagToUndirected(dagOnHorizontal);
+ var undirectedOnVertical = dagToUndirected(dagOnVertical);
+ var componentsOnHorizontal = findComponents(undirectedOnHorizontal);
+ var componentsOnVertical = findComponents(undirectedOnVertical);
+ var reversedDagOnHorizontal = dagToReversed(dagOnHorizontal);
+ var reversedDagOnVertical = dagToReversed(dagOnVertical);
+ var componentSourcesOnHorizontal = [];
+ var componentSourcesOnVertical = [];
+
+ componentsOnHorizontal.forEach(function (component, index) {
+ componentSourcesOnHorizontal[index] = [];
+ component.forEach(function (nodeId) {
+ if (reversedDagOnHorizontal.get(nodeId).length == 0) {
+ componentSourcesOnHorizontal[index].push(nodeId);
+ }
+ });
+ });
+
+ componentsOnVertical.forEach(function (component, index) {
+ componentSourcesOnVertical[index] = [];
+ component.forEach(function (nodeId) {
+ if (reversedDagOnVertical.get(nodeId).length == 0) {
+ componentSourcesOnVertical[index].push(nodeId);
+ }
+ });
+ });
+
+ // calculate appropriate positioning for subgraphs
+ var positionMapHorizontal = findAppropriatePositionForRelativePlacement(dagOnHorizontal, "horizontal", fixedNodesOnHorizontal, dummyPositionsForVerticalAlignment, componentSourcesOnHorizontal);
+ var positionMapVertical = findAppropriatePositionForRelativePlacement(dagOnVertical, "vertical", fixedNodesOnVertical, dummyPositionsForHorizontalAlignment, componentSourcesOnVertical);
+
+ // update positions of the nodes based on relative placement constraints
+
+ var _loop9 = function _loop9(key) {
+ if (dummyToNodeForVerticalAlignment.get(key)) {
+ dummyToNodeForVerticalAlignment.get(key).forEach(function (nodeId) {
+ xCoords[nodeIndexes.get(nodeId)] = positionMapHorizontal.get(key);
+ });
+ } else {
+ xCoords[nodeIndexes.get(key)] = positionMapHorizontal.get(key);
+ }
+ };
+
+ var _iteratorNormalCompletion6 = true;
+ var _didIteratorError6 = false;
+ var _iteratorError6 = undefined;
+
+ try {
+ for (var _iterator6 = positionMapHorizontal.keys()[Symbol.iterator](), _step6; !(_iteratorNormalCompletion6 = (_step6 = _iterator6.next()).done); _iteratorNormalCompletion6 = true) {
+ var key = _step6.value;
+
+ _loop9(key);
+ }
+ } catch (err) {
+ _didIteratorError6 = true;
+ _iteratorError6 = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion6 && _iterator6.return) {
+ _iterator6.return();
+ }
+ } finally {
+ if (_didIteratorError6) {
+ throw _iteratorError6;
+ }
+ }
+ }
+
+ var _loop10 = function _loop10(key) {
+ if (dummyToNodeForHorizontalAlignment.get(key)) {
+ dummyToNodeForHorizontalAlignment.get(key).forEach(function (nodeId) {
+ yCoords[nodeIndexes.get(nodeId)] = positionMapVertical.get(key);
+ });
+ } else {
+ yCoords[nodeIndexes.get(key)] = positionMapVertical.get(key);
+ }
+ };
+
+ var _iteratorNormalCompletion7 = true;
+ var _didIteratorError7 = false;
+ var _iteratorError7 = undefined;
+
+ try {
+ for (var _iterator7 = positionMapVertical.keys()[Symbol.iterator](), _step7; !(_iteratorNormalCompletion7 = (_step7 = _iterator7.next()).done); _iteratorNormalCompletion7 = true) {
+ var key = _step7.value;
+
+ _loop10(key);
+ }
+ } catch (err) {
+ _didIteratorError7 = true;
+ _iteratorError7 = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion7 && _iterator7.return) {
+ _iterator7.return();
+ }
+ } finally {
+ if (_didIteratorError7) {
+ throw _iteratorError7;
+ }
+ }
+ }
+ })();
+ }
+ }
+
+ // assign new coordinates to nodes after constraint handling
+ for (var _i13 = 0; _i13 < allNodes.length; _i13++) {
+ var _node = allNodes[_i13];
+ if (_node.getChild() == null) {
+ _node.setCenter(xCoords[nodeIndexes.get(_node.id)], yCoords[nodeIndexes.get(_node.id)]);
+ }
+ }
+};
+
+module.exports = ConstraintHandler;
+
+/***/ }),
+
+/***/ 551:
+/***/ ((module) => {
+
+module.exports = __WEBPACK_EXTERNAL_MODULE__551__;
+
+/***/ })
+
+/******/ });
+/************************************************************************/
+/******/ // The module cache
+/******/ var __webpack_module_cache__ = {};
+/******/
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+/******/ // Check if module is in cache
+/******/ var cachedModule = __webpack_module_cache__[moduleId];
+/******/ if (cachedModule !== undefined) {
+/******/ return cachedModule.exports;
+/******/ }
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = __webpack_module_cache__[moduleId] = {
+/******/ // no module.id needed
+/******/ // no module.loaded needed
+/******/ exports: {}
+/******/ };
+/******/
+/******/ // Execute the module function
+/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
+/******/
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+/******/
+/************************************************************************/
+/******/
+/******/ // startup
+/******/ // Load entry module and return exports
+/******/ // This entry module is referenced by other modules so it can't be inlined
+/******/ var __webpack_exports__ = __webpack_require__(45);
+/******/
+/******/ return __webpack_exports__;
+/******/ })()
+;
+});
\ No newline at end of file
diff --git a/node_modules/cose-base/index.js b/node_modules/cose-base/index.js
new file mode 100644
index 00000000..7365a7e1
--- /dev/null
+++ b/node_modules/cose-base/index.js
@@ -0,0 +1,16 @@
+'use strict';
+
+let coseBase = {};
+
+coseBase.layoutBase = require('layout-base');
+coseBase.CoSEConstants = require('./src/CoSEConstants');
+coseBase.CoSEEdge = require('./src/CoSEEdge');
+coseBase.CoSEGraph = require('./src/CoSEGraph');
+coseBase.CoSEGraphManager = require('./src/CoSEGraphManager');
+coseBase.CoSELayout = require('./src/CoSELayout');
+coseBase.CoSENode = require('./src/CoSENode');
+coseBase.ConstraintHandler = require('./src/ConstraintHandler');
+
+module.exports = coseBase;
+
+
diff --git a/node_modules/cose-base/package.json b/node_modules/cose-base/package.json
new file mode 100644
index 00000000..2c21755c
--- /dev/null
+++ b/node_modules/cose-base/package.json
@@ -0,0 +1,40 @@
+{
+ "name": "cose-base",
+ "version": "2.2.0",
+ "description": "Core module for compound spring embedder based layout styles",
+ "main": "cose-base.js",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1",
+ "build": "cross-env NODE_ENV=production webpack",
+ "build:min": "cross-env NODE_ENV=production MIN=true webpack"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/iVis-at-Bilkent/cose-base.git"
+ },
+ "author": "",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/iVis-at-Bilkent/cose-base/issues"
+ },
+ "homepage": "https://github.com/iVis-at-Bilkent/cose-base#readme",
+ "devDependencies": {
+ "babel-core": "^6.24.1",
+ "babel-loader": "^7.0.0",
+ "babel-preset-env": "^1.5.1",
+ "camelcase": "^4.1.0",
+ "cross-env": "^5.1.6",
+ "eslint": "^3.19.0",
+ "gh-pages": "^1.1.0",
+ "npm-run-all": "^4.1.2",
+ "rimraf": "^2.6.2",
+ "update": "^0.7.4",
+ "updater-license": "^1.0.0",
+ "webpack": "^5.36.1",
+ "webpack-cli": "^4.6.0",
+ "webpack-dev-server": "^3.11.2"
+ },
+ "dependencies": {
+ "layout-base": "^2.0.0"
+ }
+}
diff --git a/node_modules/cose-base/src/CoSEConstants.js b/node_modules/cose-base/src/CoSEConstants.js
new file mode 100644
index 00000000..aca390c4
--- /dev/null
+++ b/node_modules/cose-base/src/CoSEConstants.js
@@ -0,0 +1,26 @@
+var FDLayoutConstants = require('layout-base').FDLayoutConstants;
+
+function CoSEConstants() {
+}
+
+//CoSEConstants inherits static props in FDLayoutConstants
+for (var prop in FDLayoutConstants) {
+ CoSEConstants[prop] = FDLayoutConstants[prop];
+}
+
+CoSEConstants.DEFAULT_USE_MULTI_LEVEL_SCALING = false;
+CoSEConstants.DEFAULT_RADIAL_SEPARATION = FDLayoutConstants.DEFAULT_EDGE_LENGTH;
+CoSEConstants.DEFAULT_COMPONENT_SEPERATION = 60;
+CoSEConstants.TILE = true;
+CoSEConstants.TILING_PADDING_VERTICAL = 10;
+CoSEConstants.TILING_PADDING_HORIZONTAL = 10;
+CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = true;
+CoSEConstants.ENFORCE_CONSTRAINTS = true;
+CoSEConstants.APPLY_LAYOUT = true;
+CoSEConstants.RELAX_MOVEMENT_ON_CONSTRAINTS = true;
+CoSEConstants.TREE_REDUCTION_ON_INCREMENTAL = true; // this should be set to false if there will be a constraint
+// This constant is for differentiating whether actual layout algorithm that uses cose-base wants to apply only incremental layout or
+// an incremental layout on top of a randomized layout. If it is only incremental layout, then this constant should be true.
+CoSEConstants.PURE_INCREMENTAL = CoSEConstants.DEFAULT_INCREMENTAL;
+
+module.exports = CoSEConstants;
diff --git a/node_modules/cose-base/src/CoSEEdge.js b/node_modules/cose-base/src/CoSEEdge.js
new file mode 100644
index 00000000..2cb56cbe
--- /dev/null
+++ b/node_modules/cose-base/src/CoSEEdge.js
@@ -0,0 +1,12 @@
+var FDLayoutEdge = require('layout-base').FDLayoutEdge;
+
+function CoSEEdge(source, target, vEdge) {
+ FDLayoutEdge.call(this, source, target, vEdge);
+}
+
+CoSEEdge.prototype = Object.create(FDLayoutEdge.prototype);
+for (var prop in FDLayoutEdge) {
+ CoSEEdge[prop] = FDLayoutEdge[prop];
+}
+
+module.exports = CoSEEdge
diff --git a/node_modules/cose-base/src/CoSEGraph.js b/node_modules/cose-base/src/CoSEGraph.js
new file mode 100644
index 00000000..cc3f1f59
--- /dev/null
+++ b/node_modules/cose-base/src/CoSEGraph.js
@@ -0,0 +1,12 @@
+var LGraph = require('layout-base').LGraph;
+
+function CoSEGraph(parent, graphMgr, vGraph) {
+ LGraph.call(this, parent, graphMgr, vGraph);
+}
+
+CoSEGraph.prototype = Object.create(LGraph.prototype);
+for (var prop in LGraph) {
+ CoSEGraph[prop] = LGraph[prop];
+}
+
+module.exports = CoSEGraph;
diff --git a/node_modules/cose-base/src/CoSEGraphManager.js b/node_modules/cose-base/src/CoSEGraphManager.js
new file mode 100644
index 00000000..55bb9e4f
--- /dev/null
+++ b/node_modules/cose-base/src/CoSEGraphManager.js
@@ -0,0 +1,12 @@
+var LGraphManager = require('layout-base').LGraphManager;
+
+function CoSEGraphManager(layout) {
+ LGraphManager.call(this, layout);
+}
+
+CoSEGraphManager.prototype = Object.create(LGraphManager.prototype);
+for (var prop in LGraphManager) {
+ CoSEGraphManager[prop] = LGraphManager[prop];
+}
+
+module.exports = CoSEGraphManager;
diff --git a/node_modules/cose-base/src/CoSELayout.js b/node_modules/cose-base/src/CoSELayout.js
new file mode 100644
index 00000000..30490490
--- /dev/null
+++ b/node_modules/cose-base/src/CoSELayout.js
@@ -0,0 +1,2037 @@
+var FDLayout = require('layout-base').FDLayout;
+var CoSEGraphManager = require('./CoSEGraphManager');
+var CoSEGraph = require('./CoSEGraph');
+var CoSENode = require('./CoSENode');
+var CoSEEdge = require('./CoSEEdge');
+var CoSEConstants = require('./CoSEConstants');
+var ConstraintHandler = require('./ConstraintHandler');
+var FDLayoutConstants = require('layout-base').FDLayoutConstants;
+var LayoutConstants = require('layout-base').LayoutConstants;
+var Point = require('layout-base').Point;
+var PointD = require('layout-base').PointD;
+var DimensionD = require('layout-base').DimensionD;
+var Layout = require('layout-base').Layout;
+var Integer = require('layout-base').Integer;
+var IGeometry = require('layout-base').IGeometry;
+var LGraph = require('layout-base').LGraph;
+var Transform = require('layout-base').Transform;
+var LinkedList = require('layout-base').LinkedList;
+
+function CoSELayout() {
+ FDLayout.call(this);
+
+ this.toBeTiled = {}; // Memorize if a node is to be tiled or is tiled
+ this.constraints = {}; // keep layout constraints
+}
+
+CoSELayout.prototype = Object.create(FDLayout.prototype);
+
+for (var prop in FDLayout) {
+ CoSELayout[prop] = FDLayout[prop];
+}
+
+CoSELayout.prototype.newGraphManager = function () {
+ var gm = new CoSEGraphManager(this);
+ this.graphManager = gm;
+ return gm;
+};
+
+CoSELayout.prototype.newGraph = function (vGraph) {
+ return new CoSEGraph(null, this.graphManager, vGraph);
+};
+
+CoSELayout.prototype.newNode = function (vNode) {
+ return new CoSENode(this.graphManager, vNode);
+};
+
+CoSELayout.prototype.newEdge = function (vEdge) {
+ return new CoSEEdge(null, null, vEdge);
+};
+
+CoSELayout.prototype.initParameters = function () {
+ FDLayout.prototype.initParameters.call(this, arguments);
+ if (!this.isSubLayout) {
+ if (CoSEConstants.DEFAULT_EDGE_LENGTH < 10)
+ {
+ this.idealEdgeLength = 10;
+ }
+ else
+ {
+ this.idealEdgeLength = CoSEConstants.DEFAULT_EDGE_LENGTH;
+ }
+
+ this.useSmartIdealEdgeLengthCalculation =
+ CoSEConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION;
+ this.gravityConstant =
+ FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH;
+ this.compoundGravityConstant =
+ FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH;
+ this.gravityRangeFactor =
+ FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR;
+ this.compoundGravityRangeFactor =
+ FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR;
+
+ // variables for tree reduction support
+ this.prunedNodesAll = [];
+ this.growTreeIterations = 0;
+ this.afterGrowthIterations = 0;
+ this.isTreeGrowing = false;
+ this.isGrowthFinished = false;
+ }
+};
+
+// This method is used to set CoSE related parameters used by spring embedder.
+CoSELayout.prototype.initSpringEmbedder = function () {
+ FDLayout.prototype.initSpringEmbedder.call(this);
+
+ // variables for cooling
+ this.coolingCycle = 0;
+ this.maxCoolingCycle = this.maxIterations/FDLayoutConstants.CONVERGENCE_CHECK_PERIOD;
+ this.finalTemperature = 0.04;
+ this.coolingAdjuster = 1;
+};
+
+CoSELayout.prototype.layout = function () {
+ var createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED;
+ if (createBendsAsNeeded)
+ {
+ this.createBendpoints();
+ this.graphManager.resetAllEdges();
+ }
+
+ this.level = 0;
+ return this.classicLayout();
+};
+
+CoSELayout.prototype.classicLayout = function () {
+ this.nodesWithGravity = this.calculateNodesToApplyGravitationTo();
+ this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity);
+ this.calcNoOfChildrenForAllNodes();
+ this.graphManager.calcLowestCommonAncestors();
+ this.graphManager.calcInclusionTreeDepths();
+ this.graphManager.getRoot().calcEstimatedSize();
+ this.calcIdealEdgeLengths();
+
+ if (!this.incremental)
+ {
+ var forest = this.getFlatForest();
+
+ // The graph associated with this layout is flat and a forest
+ if (forest.length > 0)
+ {
+ this.positionNodesRadially(forest);
+ }
+ // The graph associated with this layout is not flat or a forest
+ else
+ {
+ // Reduce the trees when incremental mode is not enabled and graph is not a forest
+ this.reduceTrees();
+ // Update nodes that gravity will be applied
+ this.graphManager.resetAllNodesToApplyGravitation();
+ var allNodes = new Set(this.getAllNodes());
+ var intersection = this.nodesWithGravity.filter(x => allNodes.has(x));
+ this.graphManager.setAllNodesToApplyGravitation(intersection);
+
+ this.positionNodesRandomly();
+ }
+ }
+ else {
+ if(CoSEConstants.TREE_REDUCTION_ON_INCREMENTAL){
+ // Reduce the trees in incremental mode if only this constant is set to true
+ this.reduceTrees();
+ // Update nodes that gravity will be applied
+ this.graphManager.resetAllNodesToApplyGravitation();
+ var allNodes = new Set(this.getAllNodes());
+ var intersection = this.nodesWithGravity.filter(x => allNodes.has(x));
+ this.graphManager.setAllNodesToApplyGravitation(intersection);
+ }
+ }
+
+ if(Object.keys(this.constraints).length > 0){
+ ConstraintHandler.handleConstraints(this);
+ this.initConstraintVariables();
+ }
+
+ this.initSpringEmbedder();
+ if (CoSEConstants.APPLY_LAYOUT) {
+ this.runSpringEmbedder();
+ }
+
+ return true;
+};
+
+CoSELayout.prototype.tick = function() {
+ this.totalIterations++;
+
+ if (this.totalIterations === this.maxIterations && !this.isTreeGrowing && !this.isGrowthFinished) {
+ if(this.prunedNodesAll.length > 0){
+ this.isTreeGrowing = true;
+ }
+ else {
+ return true;
+ }
+ }
+
+ if (this.totalIterations % FDLayoutConstants.CONVERGENCE_CHECK_PERIOD == 0 && !this.isTreeGrowing && !this.isGrowthFinished)
+ {
+ if (this.isConverged())
+ {
+ if(this.prunedNodesAll.length > 0){
+ this.isTreeGrowing = true;
+ }
+ else {
+ return true;
+ }
+ }
+
+ this.coolingCycle++;
+
+ if(this.layoutQuality == 0) {
+ // quality - "draft"
+ this.coolingAdjuster = this.coolingCycle;
+ }
+ else if(this.layoutQuality == 1) {
+ // quality - "default"
+ this.coolingAdjuster = this.coolingCycle / 3;
+ }
+
+ // cooling schedule is based on http://www.btluke.com/simanf1.html -> cooling schedule 3
+ this.coolingFactor = Math.max(this.initialCoolingFactor - Math.pow(this.coolingCycle, Math.log(100 * (this.initialCoolingFactor - this.finalTemperature)) / Math.log(this.maxCoolingCycle))/100 * this.coolingAdjuster, this.finalTemperature);
+ this.animationPeriod = Math.ceil(this.initialAnimationPeriod * Math.sqrt(this.coolingFactor));
+ }
+ // Operations while tree is growing again
+ if(this.isTreeGrowing){
+ if(this.growTreeIterations % 10 == 0){
+ if(this.prunedNodesAll.length > 0) {
+ this.graphManager.updateBounds();
+ this.updateGrid();
+ this.growTree(this.prunedNodesAll);
+ // Update nodes that gravity will be applied
+ this.graphManager.resetAllNodesToApplyGravitation();
+ var allNodes = new Set(this.getAllNodes());
+ var intersection = this.nodesWithGravity.filter(x => allNodes.has(x));
+ this.graphManager.setAllNodesToApplyGravitation(intersection);
+
+ this.graphManager.updateBounds();
+ this.updateGrid();
+ if(CoSEConstants.PURE_INCREMENTAL)
+ this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL / 2;
+ else
+ this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL;
+ }
+ else {
+ this.isTreeGrowing = false;
+ this.isGrowthFinished = true;
+ }
+ }
+ this.growTreeIterations++;
+ }
+ // Operations after growth is finished
+ if(this.isGrowthFinished){
+ if (this.isConverged())
+ {
+ return true;
+ }
+ if(this.afterGrowthIterations % 10 == 0){
+ this.graphManager.updateBounds();
+ this.updateGrid();
+ }
+ if(CoSEConstants.PURE_INCREMENTAL)
+ this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL / 2 * ((100 - this.afterGrowthIterations) / 100);
+ else
+ this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL * ((100 - this.afterGrowthIterations) / 100);
+ this.afterGrowthIterations++;
+ }
+
+ var gridUpdateAllowed = !this.isTreeGrowing && !this.isGrowthFinished;
+ var forceToNodeSurroundingUpdate = (this.growTreeIterations % 10 == 1 && this.isTreeGrowing) || (this.afterGrowthIterations % 10 == 1 && this.isGrowthFinished);
+
+ this.totalDisplacement = 0;
+ this.graphManager.updateBounds();
+ this.calcSpringForces();
+ this.calcRepulsionForces(gridUpdateAllowed, forceToNodeSurroundingUpdate);
+ this.calcGravitationalForces();
+ this.moveNodes();
+ this.animate();
+
+ return false; // Layout is not ended yet return false
+};
+
+CoSELayout.prototype.getPositionsData = function() {
+ var allNodes = this.graphManager.getAllNodes();
+ var pData = {};
+ for (var i = 0; i < allNodes.length; i++) {
+ var rect = allNodes[i].rect;
+ var id = allNodes[i].id;
+ pData[id] = {
+ id: id,
+ x: rect.getCenterX(),
+ y: rect.getCenterY(),
+ w: rect.width,
+ h: rect.height
+ };
+ }
+
+ return pData;
+};
+
+CoSELayout.prototype.runSpringEmbedder = function () {
+ this.initialAnimationPeriod = 25;
+ this.animationPeriod = this.initialAnimationPeriod;
+ var layoutEnded = false;
+
+ // If aminate option is 'during' signal that layout is supposed to start iterating
+ if ( FDLayoutConstants.ANIMATE === 'during' ) {
+ this.emit('layoutstarted');
+ }
+ else {
+ // If aminate option is 'during' tick() function will be called on index.js
+ while (!layoutEnded) {
+ layoutEnded = this.tick();
+ }
+
+ this.graphManager.updateBounds();
+ }
+};
+
+// overrides moveNodes method in FDLayout
+CoSELayout.prototype.moveNodes = function () {
+ var lNodes = this.getAllNodes();
+ var node;
+
+ // calculate displacement for each node
+ for (var i = 0; i < lNodes.length; i++)
+ {
+ node = lNodes[i];
+ node.calculateDisplacement();
+ }
+
+ if(Object.keys(this.constraints).length > 0){
+ this.updateDisplacements();
+ }
+
+ // move each node
+ for (var i = 0; i < lNodes.length; i++)
+ {
+ node = lNodes[i];
+ node.move();
+ }
+};
+
+// constraint related methods: initConstraintVariables and updateDisplacements
+
+// initialize constraint related variables
+CoSELayout.prototype.initConstraintVariables = function () {
+ var self = this;
+ this.idToNodeMap = new Map();
+ this.fixedNodeSet = new Set();
+
+ var allNodes = this.graphManager.getAllNodes();
+
+ // fill idToNodeMap
+ for(var i = 0; i < allNodes.length; i++) {
+ var node = allNodes[i];
+ this.idToNodeMap.set(node.id, node);
+ }
+
+ // calculate fixed node weight for given compound node
+ var calculateCompoundWeight = function(compoundNode) {
+ var nodes = compoundNode.getChild().getNodes();
+ var node;
+ var fixedNodeWeight = 0;
+ for (var i = 0; i < nodes.length; i++) {
+ node = nodes[i];
+ if (node.getChild() == null) {
+ if(self.fixedNodeSet.has(node.id)) {
+ fixedNodeWeight += 100;
+ }
+ } else {
+ fixedNodeWeight += calculateCompoundWeight(node);
+ }
+ }
+ return fixedNodeWeight;
+ };
+
+ if (this.constraints.fixedNodeConstraint) {
+ // fill fixedNodeSet
+ this.constraints.fixedNodeConstraint.forEach(function (nodeData) {
+ self.fixedNodeSet.add(nodeData.nodeId);
+ });
+
+ // assign fixed node weights to compounds if they contain fixed nodes
+ var allNodes = this.graphManager.getAllNodes();
+ var node;
+
+ for (var i = 0; i < allNodes.length; i++) {
+ node = allNodes[i];
+ if (node.getChild() != null) {
+ let fixedNodeWeight = calculateCompoundWeight(node);
+ if (fixedNodeWeight > 0) {
+ node.fixedNodeWeight = fixedNodeWeight;
+ }
+ }
+ }
+ }
+
+ if(this.constraints.relativePlacementConstraint) {
+ var nodeToDummyForVerticalAlignment = new Map();
+ var nodeToDummyForHorizontalAlignment = new Map();
+ this.dummyToNodeForVerticalAlignment = new Map();
+ this.dummyToNodeForHorizontalAlignment = new Map();
+ this.fixedNodesOnHorizontal = new Set();
+ this.fixedNodesOnVertical = new Set();
+
+ // fill maps and sets
+ this.fixedNodeSet.forEach(function(nodeId){
+ self.fixedNodesOnHorizontal.add(nodeId);
+ self.fixedNodesOnVertical.add(nodeId);
+ });
+
+ if(this.constraints.alignmentConstraint) {
+ if(this.constraints.alignmentConstraint.vertical) {
+ var verticalAlignment = this.constraints.alignmentConstraint.vertical;
+ for(var i = 0; i < verticalAlignment.length; i++) {
+ this.dummyToNodeForVerticalAlignment.set("dummy" + i, []);
+ verticalAlignment[i].forEach(function(nodeId){
+ nodeToDummyForVerticalAlignment.set(nodeId, "dummy" + i);
+ self.dummyToNodeForVerticalAlignment.get("dummy" + i).push(nodeId);
+ if(self.fixedNodeSet.has(nodeId)) {
+ self.fixedNodesOnHorizontal.add("dummy" + i);
+ }
+ });
+ }
+ }
+ if(this.constraints.alignmentConstraint.horizontal){
+ var horizontalAlignment = this.constraints.alignmentConstraint.horizontal;
+ for(var i = 0; i < horizontalAlignment.length; i++){
+ this.dummyToNodeForHorizontalAlignment.set("dummy" + i, []);
+ horizontalAlignment[i].forEach(function(nodeId){
+ nodeToDummyForHorizontalAlignment.set(nodeId, "dummy" + i);
+ self.dummyToNodeForHorizontalAlignment.get("dummy" + i).push(nodeId);
+ if(self.fixedNodeSet.has(nodeId)){
+ self.fixedNodesOnVertical.add("dummy" + i);
+ }
+ });
+ }
+ }
+ }
+
+ if(CoSEConstants.RELAX_MOVEMENT_ON_CONSTRAINTS) {
+
+ this.shuffle = function (array) {
+ var j, x, i;
+ for (i = array.length - 1; i >= (2 * array.length / 3); i--) {
+ j = Math.floor(Math.random() * (i + 1));
+ x = array[i];
+ array[i] = array[j];
+ array[j] = x;
+ }
+ return array;
+ };
+
+ this.nodesInRelativeHorizontal = [];
+ this.nodesInRelativeVertical = [];
+ this.nodeToRelativeConstraintMapHorizontal = new Map();
+ this.nodeToRelativeConstraintMapVertical = new Map();
+ this.nodeToTempPositionMapHorizontal = new Map();
+ this.nodeToTempPositionMapVertical = new Map();
+
+ // fill arrays and maps
+ this.constraints.relativePlacementConstraint.forEach(function(constraint) {
+ if(constraint.left) {
+ let nodeIdLeft = nodeToDummyForVerticalAlignment.has(constraint.left) ? nodeToDummyForVerticalAlignment.get(constraint.left) : constraint.left;
+ let nodeIdRight = nodeToDummyForVerticalAlignment.has(constraint.right) ? nodeToDummyForVerticalAlignment.get(constraint.right) : constraint.right;
+
+ if(!self.nodesInRelativeHorizontal.includes(nodeIdLeft)) {
+ self.nodesInRelativeHorizontal.push(nodeIdLeft);
+ self.nodeToRelativeConstraintMapHorizontal.set(nodeIdLeft, []);
+ if(self.dummyToNodeForVerticalAlignment.has(nodeIdLeft)) {
+ self.nodeToTempPositionMapHorizontal.set(nodeIdLeft, self.idToNodeMap.get(self.dummyToNodeForVerticalAlignment.get(nodeIdLeft)[0]).getCenterX());
+ }
+ else {
+ self.nodeToTempPositionMapHorizontal.set(nodeIdLeft, self.idToNodeMap.get(nodeIdLeft).getCenterX());
+ }
+ }
+ if(!self.nodesInRelativeHorizontal.includes(nodeIdRight)) {
+ self.nodesInRelativeHorizontal.push(nodeIdRight);
+ self.nodeToRelativeConstraintMapHorizontal.set(nodeIdRight, []);
+ if(self.dummyToNodeForVerticalAlignment.has(nodeIdRight)) {
+ self.nodeToTempPositionMapHorizontal.set(nodeIdRight, self.idToNodeMap.get(self.dummyToNodeForVerticalAlignment.get(nodeIdRight)[0]).getCenterX());
+ }
+ else {
+ self.nodeToTempPositionMapHorizontal.set(nodeIdRight, self.idToNodeMap.get(nodeIdRight).getCenterX());
+ }
+ }
+
+ self.nodeToRelativeConstraintMapHorizontal.get(nodeIdLeft).push({right: nodeIdRight, gap: constraint.gap});
+ self.nodeToRelativeConstraintMapHorizontal.get(nodeIdRight).push({left: nodeIdLeft, gap: constraint.gap});
+ }
+ else {
+ let nodeIdTop = nodeToDummyForHorizontalAlignment.has(constraint.top) ? nodeToDummyForHorizontalAlignment.get(constraint.top) : constraint.top;
+ let nodeIdBottom = nodeToDummyForHorizontalAlignment.has(constraint.bottom) ? nodeToDummyForHorizontalAlignment.get(constraint.bottom) : constraint.bottom;
+
+ if(!self.nodesInRelativeVertical.includes(nodeIdTop)) {
+ self.nodesInRelativeVertical.push(nodeIdTop);
+ self.nodeToRelativeConstraintMapVertical.set(nodeIdTop, []);
+ if(self.dummyToNodeForHorizontalAlignment.has(nodeIdTop)) {
+ self.nodeToTempPositionMapVertical.set(nodeIdTop, self.idToNodeMap.get(self.dummyToNodeForHorizontalAlignment.get(nodeIdTop)[0]).getCenterY());
+ }
+ else {
+ self.nodeToTempPositionMapVertical.set(nodeIdTop, self.idToNodeMap.get(nodeIdTop).getCenterY());
+ }
+ }
+ if(!self.nodesInRelativeVertical.includes(nodeIdBottom)) {
+ self.nodesInRelativeVertical.push(nodeIdBottom);
+ self.nodeToRelativeConstraintMapVertical.set(nodeIdBottom, []);
+ if(self.dummyToNodeForHorizontalAlignment.has(nodeIdBottom)) {
+ self.nodeToTempPositionMapVertical.set(nodeIdBottom, self.idToNodeMap.get(self.dummyToNodeForHorizontalAlignment.get(nodeIdBottom)[0]).getCenterY());
+ }
+ else {
+ self.nodeToTempPositionMapVertical.set(nodeIdBottom, self.idToNodeMap.get(nodeIdBottom).getCenterY());
+ }
+ }
+ self.nodeToRelativeConstraintMapVertical.get(nodeIdTop).push({bottom: nodeIdBottom, gap: constraint.gap});
+ self.nodeToRelativeConstraintMapVertical.get(nodeIdBottom).push({top: nodeIdTop, gap: constraint.gap});
+ }
+ });
+ }
+ else {
+ var subGraphOnHorizontal = new Map(); // subgraph from vertical RP constraints
+ var subGraphOnVertical = new Map(); // subgraph from vertical RP constraints
+
+ // construct subgraphs from relative placement constraints
+ this.constraints.relativePlacementConstraint.forEach(function(constraint) {
+ if(constraint.left) {
+ var left = nodeToDummyForVerticalAlignment.has(constraint.left) ? nodeToDummyForVerticalAlignment.get(constraint.left) : constraint.left;
+ var right = nodeToDummyForVerticalAlignment.has(constraint.right) ? nodeToDummyForVerticalAlignment.get(constraint.right) : constraint.right;
+ if(subGraphOnHorizontal.has(left)) {
+ subGraphOnHorizontal.get(left).push(right);
+ }
+ else {
+ subGraphOnHorizontal.set(left, [right]);
+ }
+ if(subGraphOnHorizontal.has(right)) {
+ subGraphOnHorizontal.get(right).push(left);
+ }
+ else {
+ subGraphOnHorizontal.set(right, [left]);
+ }
+ }
+ else {
+ var top = nodeToDummyForHorizontalAlignment.has(constraint.top) ? nodeToDummyForHorizontalAlignment.get(constraint.top) : constraint.top;
+ var bottom = nodeToDummyForHorizontalAlignment.has(constraint.bottom) ? nodeToDummyForHorizontalAlignment.get(constraint.bottom) : constraint.bottom;
+ if(subGraphOnVertical.has(top)) {
+ subGraphOnVertical.get(top).push(bottom);
+ }
+ else {
+ subGraphOnVertical.set(top, [bottom]);
+ }
+ if(subGraphOnVertical.has(bottom)) {
+ subGraphOnVertical.get(bottom).push(top);
+ }
+ else {
+ subGraphOnVertical.set(bottom, [top]);
+ }
+ }
+ });
+
+ // function to construct components from a given graph
+ // also returns an array that keeps whether each component contains fixed node
+ var constructComponents = function(graph, fixedNodes){
+ let components = [];
+ let isFixed = [];
+ let queue = new LinkedList();
+ let visited = new Set();
+ let count = 0;
+
+ graph.forEach(function(value, key){
+ if(!visited.has(key)){
+ components[count] = [];
+ isFixed[count] = false;
+ let currentNode = key;
+ queue.push(currentNode);
+ visited.add(currentNode);
+ components[count].push(currentNode);
+
+ while(queue.length != 0){
+ currentNode = queue.shift();
+ if(fixedNodes.has(currentNode)) {
+ isFixed[count] = true;
+ }
+ let neighbors = graph.get(currentNode);
+ neighbors.forEach(function(neighbor){
+ if(!visited.has(neighbor)){
+ queue.push(neighbor);
+ visited.add(neighbor);
+ components[count].push(neighbor);
+ }
+ });
+ }
+ count++;
+ }
+ });
+
+ return { components: components, isFixed: isFixed };
+ };
+
+ var resultOnHorizontal = constructComponents(subGraphOnHorizontal, self.fixedNodesOnHorizontal);
+ this.componentsOnHorizontal = resultOnHorizontal.components;
+ this.fixedComponentsOnHorizontal = resultOnHorizontal.isFixed;
+ var resultOnVertical = constructComponents(subGraphOnVertical, self.fixedNodesOnVertical);
+ this.componentsOnVertical = resultOnVertical.components;
+ this.fixedComponentsOnVertical = resultOnVertical.isFixed;
+ }
+ }
+};
+
+// updates node displacements based on constraints
+CoSELayout.prototype.updateDisplacements = function () {
+ var self = this;
+ if(this.constraints.fixedNodeConstraint){
+ this.constraints.fixedNodeConstraint.forEach(function(nodeData){
+ var fixedNode = self.idToNodeMap.get(nodeData.nodeId);
+ fixedNode.displacementX = 0;
+ fixedNode.displacementY = 0;
+ });
+ }
+
+ if(this.constraints.alignmentConstraint){
+ if(this.constraints.alignmentConstraint.vertical){
+ var allVerticalAlignments = this.constraints.alignmentConstraint.vertical;
+ for(var i = 0; i < allVerticalAlignments.length; i++){
+ var totalDisplacementX = 0;
+ for(var j = 0; j < allVerticalAlignments[i].length; j++){
+ if(this.fixedNodeSet.has(allVerticalAlignments[i][j])){
+ totalDisplacementX = 0;
+ break;
+ }
+ totalDisplacementX += this.idToNodeMap.get(allVerticalAlignments[i][j]).displacementX;
+ }
+ var averageDisplacementX = totalDisplacementX / allVerticalAlignments[i].length;
+ for(var j = 0; j < allVerticalAlignments[i].length; j++){
+ this.idToNodeMap.get(allVerticalAlignments[i][j]).displacementX = averageDisplacementX;
+ }
+ }
+ }
+ if(this.constraints.alignmentConstraint.horizontal){
+ var allHorizontalAlignments = this.constraints.alignmentConstraint.horizontal;
+ for(var i = 0; i < allHorizontalAlignments.length; i++){
+ var totalDisplacementY = 0;
+ for(var j = 0; j < allHorizontalAlignments[i].length; j++){
+ if(this.fixedNodeSet.has(allHorizontalAlignments[i][j])){
+ totalDisplacementY = 0;
+ break;
+ }
+ totalDisplacementY += this.idToNodeMap.get(allHorizontalAlignments[i][j]).displacementY;
+ }
+ var averageDisplacementY = totalDisplacementY / allHorizontalAlignments[i].length;
+ for(var j = 0; j < allHorizontalAlignments[i].length; j++){
+ this.idToNodeMap.get(allHorizontalAlignments[i][j]).displacementY = averageDisplacementY;
+ }
+ }
+ }
+ }
+
+ if(this.constraints.relativePlacementConstraint){
+
+ if(CoSEConstants.RELAX_MOVEMENT_ON_CONSTRAINTS) {
+ // shuffle array to randomize node processing order
+ if (this.totalIterations % 10 == 0) {
+ this.shuffle(this.nodesInRelativeHorizontal);
+ this.shuffle(this.nodesInRelativeVertical);
+ }
+
+ this.nodesInRelativeHorizontal.forEach(function(nodeId) {
+ if(!self.fixedNodesOnHorizontal.has(nodeId)) {
+ var displacement = 0;
+ if(self.dummyToNodeForVerticalAlignment.has(nodeId)) {
+ displacement = self.idToNodeMap.get(self.dummyToNodeForVerticalAlignment.get(nodeId)[0]).displacementX;
+ }
+ else {
+ displacement = self.idToNodeMap.get(nodeId).displacementX;
+ }
+ self.nodeToRelativeConstraintMapHorizontal.get(nodeId).forEach(function(constraint) {
+ if(constraint.right) {
+ var diff = (self.nodeToTempPositionMapHorizontal.get(constraint.right) - self.nodeToTempPositionMapHorizontal.get(nodeId)) - displacement;
+ if(diff < constraint.gap) {
+ displacement -= constraint.gap - diff;
+ }
+ }
+ else {
+ var diff = (self.nodeToTempPositionMapHorizontal.get(nodeId) - self.nodeToTempPositionMapHorizontal.get(constraint.left)) + displacement;
+ if(diff < constraint.gap) {
+ displacement += constraint.gap - diff;
+ }
+ }
+ });
+ self.nodeToTempPositionMapHorizontal.set(nodeId, self.nodeToTempPositionMapHorizontal.get(nodeId) + displacement);
+ if(self.dummyToNodeForVerticalAlignment.has(nodeId)) {
+ self.dummyToNodeForVerticalAlignment.get(nodeId).forEach(function(nodeId){
+ self.idToNodeMap.get(nodeId).displacementX = displacement;
+ });
+ }
+ else {
+ self.idToNodeMap.get(nodeId).displacementX = displacement;
+ }
+ }
+ });
+
+ this.nodesInRelativeVertical.forEach(function(nodeId) {
+ if(!self.fixedNodesOnHorizontal.has(nodeId)) {
+ var displacement = 0;
+ if(self.dummyToNodeForHorizontalAlignment.has(nodeId)) {
+ displacement = self.idToNodeMap.get(self.dummyToNodeForHorizontalAlignment.get(nodeId)[0]).displacementY;
+ }
+ else {
+ displacement = self.idToNodeMap.get(nodeId).displacementY;
+ }
+ self.nodeToRelativeConstraintMapVertical.get(nodeId).forEach(function(constraint) {
+ if(constraint.bottom) {
+ var diff = (self.nodeToTempPositionMapVertical.get(constraint.bottom) - self.nodeToTempPositionMapVertical.get(nodeId)) - displacement;
+ if(diff < constraint.gap) {
+ displacement -= constraint.gap - diff;
+ }
+ }
+ else {
+ var diff = (self.nodeToTempPositionMapVertical.get(nodeId) - self.nodeToTempPositionMapVertical.get(constraint.top)) + displacement;
+ if(diff < constraint.gap) {
+ displacement += constraint.gap - diff;
+ }
+ }
+ });
+ self.nodeToTempPositionMapVertical.set(nodeId, self.nodeToTempPositionMapVertical.get(nodeId) + displacement);
+ if(self.dummyToNodeForHorizontalAlignment.has(nodeId)) {
+ self.dummyToNodeForHorizontalAlignment.get(nodeId).forEach(function(nodeId){
+ self.idToNodeMap.get(nodeId).displacementY = displacement;
+ });
+ }
+ else {
+ self.idToNodeMap.get(nodeId).displacementY = displacement;
+ }
+ }
+ });
+ }
+ else {
+ for(var i = 0; i < this.componentsOnHorizontal.length; i++) {
+ var component = this.componentsOnHorizontal[i];
+ if(this.fixedComponentsOnHorizontal[i]) {
+ for(var j = 0; j < component.length; j++){
+ if(this.dummyToNodeForVerticalAlignment.has(component[j])) {
+ this.dummyToNodeForVerticalAlignment.get(component[j]).forEach(function(nodeId){
+ self.idToNodeMap.get(nodeId).displacementX = 0;
+ });
+ }
+ else {
+ this.idToNodeMap.get(component[j]).displacementX = 0;
+ }
+ }
+ }
+ else {
+ var sum = 0;
+ var count = 0;
+ for(var j = 0; j < component.length; j++){
+ if(this.dummyToNodeForVerticalAlignment.has(component[j])) {
+ var actualNodes = this.dummyToNodeForVerticalAlignment.get(component[j]);
+ sum += actualNodes.length * this.idToNodeMap.get(actualNodes[0]).displacementX;
+ count += actualNodes.length;
+ }
+ else {
+ sum += this.idToNodeMap.get(component[j]).displacementX;
+ count++;
+ }
+ }
+ var averageDisplacement = sum / count;
+ for(var j = 0; j < component.length; j++){
+ if(this.dummyToNodeForVerticalAlignment.has(component[j])) {
+ this.dummyToNodeForVerticalAlignment.get(component[j]).forEach(function(nodeId){
+ self.idToNodeMap.get(nodeId).displacementX = averageDisplacement;
+ });
+ }
+ else {
+ this.idToNodeMap.get(component[j]).displacementX = averageDisplacement;
+ }
+ }
+ }
+ }
+
+ for(var i = 0; i < this.componentsOnVertical.length; i++) {
+ var component = this.componentsOnVertical[i];
+ if(this.fixedComponentsOnVertical[i]) {
+ for(var j = 0; j < component.length; j++){
+ if(this.dummyToNodeForHorizontalAlignment.has(component[j])) {
+ this.dummyToNodeForHorizontalAlignment.get(component[j]).forEach(function(nodeId){
+ self.idToNodeMap.get(nodeId).displacementY = 0;
+ });
+ }
+ else {
+ this.idToNodeMap.get(component[j]).displacementY = 0;
+ }
+ }
+ }
+ else {
+ var sum = 0;
+ var count = 0;
+ for(var j = 0; j < component.length; j++){
+ if(this.dummyToNodeForHorizontalAlignment.has(component[j])) {
+ var actualNodes = this.dummyToNodeForHorizontalAlignment.get(component[j]);
+ sum += actualNodes.length * this.idToNodeMap.get(actualNodes[0]).displacementY;
+ count += actualNodes.length;
+ }
+ else {
+ sum += this.idToNodeMap.get(component[j]).displacementY;
+ count++;
+ }
+ }
+ var averageDisplacement = sum / count;
+ for(var j = 0; j < component.length; j++){
+ if(this.dummyToNodeForHorizontalAlignment.has(component[j])) {
+ this.dummyToNodeForHorizontalAlignment.get(component[j]).forEach(function(nodeId){
+ self.idToNodeMap.get(nodeId).displacementY = averageDisplacement;
+ });
+ }
+ else {
+ this.idToNodeMap.get(component[j]).displacementY = averageDisplacement;
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+CoSELayout.prototype.calculateNodesToApplyGravitationTo = function () {
+ var nodeList = [];
+ var graph;
+
+ var graphs = this.graphManager.getGraphs();
+ var size = graphs.length;
+ var i;
+ for (i = 0; i < size; i++)
+ {
+ graph = graphs[i];
+
+ graph.updateConnected();
+
+ if (!graph.isConnected)
+ {
+ nodeList = nodeList.concat(graph.getNodes());
+ }
+ }
+
+ return nodeList;
+};
+
+CoSELayout.prototype.createBendpoints = function () {
+ var edges = [];
+ edges = edges.concat(this.graphManager.getAllEdges());
+ var visited = new Set();
+ var i;
+ for (i = 0; i < edges.length; i++)
+ {
+ var edge = edges[i];
+
+ if (!visited.has(edge))
+ {
+ var source = edge.getSource();
+ var target = edge.getTarget();
+
+ if (source == target)
+ {
+ edge.getBendpoints().push(new PointD());
+ edge.getBendpoints().push(new PointD());
+ this.createDummyNodesForBendpoints(edge);
+ visited.add(edge);
+ }
+ else
+ {
+ var edgeList = [];
+
+ edgeList = edgeList.concat(source.getEdgeListToNode(target));
+ edgeList = edgeList.concat(target.getEdgeListToNode(source));
+
+ if (!visited.has(edgeList[0]))
+ {
+ if (edgeList.length > 1)
+ {
+ var k;
+ for (k = 0; k < edgeList.length; k++)
+ {
+ var multiEdge = edgeList[k];
+ multiEdge.getBendpoints().push(new PointD());
+ this.createDummyNodesForBendpoints(multiEdge);
+ }
+ }
+ edgeList.forEach(function(edge){
+ visited.add(edge);
+ });
+ }
+ }
+ }
+
+ if (visited.size == edges.length)
+ {
+ break;
+ }
+ }
+};
+
+CoSELayout.prototype.positionNodesRadially = function (forest) {
+ // We tile the trees to a grid row by row; first tree starts at (0,0)
+ var currentStartingPoint = new Point(0, 0);
+ var numberOfColumns = Math.ceil(Math.sqrt(forest.length));
+ var height = 0;
+ var currentY = 0;
+ var currentX = 0;
+ var point = new PointD(0, 0);
+
+ for (var i = 0; i < forest.length; i++)
+ {
+ if (i % numberOfColumns == 0)
+ {
+ // Start of a new row, make the x coordinate 0, increment the
+ // y coordinate with the max height of the previous row
+ currentX = 0;
+ currentY = height;
+
+ if (i != 0)
+ {
+ currentY += CoSEConstants.DEFAULT_COMPONENT_SEPERATION;
+ }
+
+ height = 0;
+ }
+
+ var tree = forest[i];
+
+ // Find the center of the tree
+ var centerNode = Layout.findCenterOfTree(tree);
+
+ // Set the staring point of the next tree
+ currentStartingPoint.x = currentX;
+ currentStartingPoint.y = currentY;
+
+ // Do a radial layout starting with the center
+ point =
+ CoSELayout.radialLayout(tree, centerNode, currentStartingPoint);
+
+ if (point.y > height)
+ {
+ height = Math.floor(point.y);
+ }
+
+ currentX = Math.floor(point.x + CoSEConstants.DEFAULT_COMPONENT_SEPERATION);
+ }
+
+ this.transform(
+ new PointD(LayoutConstants.WORLD_CENTER_X - point.x / 2,
+ LayoutConstants.WORLD_CENTER_Y - point.y / 2));
+};
+
+CoSELayout.radialLayout = function (tree, centerNode, startingPoint) {
+ var radialSep = Math.max(this.maxDiagonalInTree(tree),
+ CoSEConstants.DEFAULT_RADIAL_SEPARATION);
+ CoSELayout.branchRadialLayout(centerNode, null, 0, 359, 0, radialSep);
+ var bounds = LGraph.calculateBounds(tree);
+
+ var transform = new Transform();
+ transform.setDeviceOrgX(bounds.getMinX());
+ transform.setDeviceOrgY(bounds.getMinY());
+ transform.setWorldOrgX(startingPoint.x);
+ transform.setWorldOrgY(startingPoint.y);
+
+ for (var i = 0; i < tree.length; i++)
+ {
+ var node = tree[i];
+ node.transform(transform);
+ }
+
+ var bottomRight =
+ new PointD(bounds.getMaxX(), bounds.getMaxY());
+
+ return transform.inverseTransformPoint(bottomRight);
+};
+
+CoSELayout.branchRadialLayout = function (node, parentOfNode, startAngle, endAngle, distance, radialSeparation) {
+ // First, position this node by finding its angle.
+ var halfInterval = ((endAngle - startAngle) + 1) / 2;
+
+ if (halfInterval < 0)
+ {
+ halfInterval += 180;
+ }
+
+ var nodeAngle = (halfInterval + startAngle) % 360;
+ var teta = (nodeAngle * IGeometry.TWO_PI) / 360;
+
+ // Make polar to java cordinate conversion.
+ var cos_teta = Math.cos(teta);
+ var x_ = distance * Math.cos(teta);
+ var y_ = distance * Math.sin(teta);
+
+ node.setCenter(x_, y_);
+
+ // Traverse all neighbors of this node and recursively call this
+ // function.
+ var neighborEdges = [];
+ neighborEdges = neighborEdges.concat(node.getEdges());
+ var childCount = neighborEdges.length;
+
+ if (parentOfNode != null)
+ {
+ childCount--;
+ }
+
+ var branchCount = 0;
+
+ var incEdgesCount = neighborEdges.length;
+ var startIndex;
+
+ var edges = node.getEdgesBetween(parentOfNode);
+
+ // If there are multiple edges, prune them until there remains only one
+ // edge.
+ while (edges.length > 1)
+ {
+ //neighborEdges.remove(edges.remove(0));
+ var temp = edges[0];
+ edges.splice(0, 1);
+ var index = neighborEdges.indexOf(temp);
+ if (index >= 0) {
+ neighborEdges.splice(index, 1);
+ }
+ incEdgesCount--;
+ childCount--;
+ }
+
+ if (parentOfNode != null)
+ {
+ //assert edges.length == 1;
+ startIndex = (neighborEdges.indexOf(edges[0]) + 1) % incEdgesCount;
+ }
+ else
+ {
+ startIndex = 0;
+ }
+
+ var stepAngle = Math.abs(endAngle - startAngle) / childCount;
+
+ for (var i = startIndex;
+ branchCount != childCount;
+ i = (++i) % incEdgesCount)
+ {
+ var currentNeighbor =
+ neighborEdges[i].getOtherEnd(node);
+
+ // Don't back traverse to root node in current tree.
+ if (currentNeighbor == parentOfNode)
+ {
+ continue;
+ }
+
+ var childStartAngle =
+ (startAngle + branchCount * stepAngle) % 360;
+ var childEndAngle = (childStartAngle + stepAngle) % 360;
+
+ CoSELayout.branchRadialLayout(currentNeighbor,
+ node,
+ childStartAngle, childEndAngle,
+ distance + radialSeparation, radialSeparation);
+
+ branchCount++;
+ }
+};
+
+CoSELayout.maxDiagonalInTree = function (tree) {
+ var maxDiagonal = Integer.MIN_VALUE;
+
+ for (var i = 0; i < tree.length; i++)
+ {
+ var node = tree[i];
+ var diagonal = node.getDiagonal();
+
+ if (diagonal > maxDiagonal)
+ {
+ maxDiagonal = diagonal;
+ }
+ }
+
+ return maxDiagonal;
+};
+
+CoSELayout.prototype.calcRepulsionRange = function () {
+ // formula is 2 x (level + 1) x idealEdgeLength
+ return (2 * (this.level + 1) * this.idealEdgeLength);
+};
+
+// Tiling methods
+
+// Group zero degree members whose parents are not to be tiled, create dummy parents where needed and fill memberGroups by their dummp parent id's
+CoSELayout.prototype.groupZeroDegreeMembers = function () {
+ var self = this;
+ // array of [parent_id x oneDegreeNode_id]
+ var tempMemberGroups = {}; // A temporary map of parent node and its zero degree members
+ this.memberGroups = {}; // A map of dummy parent node and its zero degree members whose parents are not to be tiled
+ this.idToDummyNode = {}; // A map of id to dummy node
+
+ var zeroDegree = []; // List of zero degree nodes whose parents are not to be tiled
+ var allNodes = this.graphManager.getAllNodes();
+
+ // Fill zero degree list
+ for (var i = 0; i < allNodes.length; i++) {
+ var node = allNodes[i];
+ var parent = node.getParent();
+ // If a node has zero degree and its parent is not to be tiled if exists add that node to zeroDegres list
+ if (this.getNodeDegreeWithChildren(node) === 0 && ( parent.id == undefined || !this.getToBeTiled(parent) ) ) {
+ zeroDegree.push(node);
+ }
+ }
+
+ // Create a map of parent node and its zero degree members
+ for (var i = 0; i < zeroDegree.length; i++)
+ {
+ var node = zeroDegree[i]; // Zero degree node itself
+ var p_id = node.getParent().id; // Parent id
+
+ if (typeof tempMemberGroups[p_id] === "undefined")
+ tempMemberGroups[p_id] = [];
+
+ tempMemberGroups[p_id] = tempMemberGroups[p_id].concat(node); // Push node to the list belongs to its parent in tempMemberGroups
+ }
+
+ // If there are at least two nodes at a level, create a dummy compound for them
+ Object.keys(tempMemberGroups).forEach(function(p_id) {
+ if (tempMemberGroups[p_id].length > 1) {
+ var dummyCompoundId = "DummyCompound_" + p_id; // The id of dummy compound which will be created soon
+ self.memberGroups[dummyCompoundId] = tempMemberGroups[p_id]; // Add dummy compound to memberGroups
+
+ var parent = tempMemberGroups[p_id][0].getParent(); // The parent of zero degree nodes will be the parent of new dummy compound
+
+ // Create a dummy compound with calculated id
+ var dummyCompound = new CoSENode(self.graphManager);
+ dummyCompound.id = dummyCompoundId;
+ dummyCompound.paddingLeft = parent.paddingLeft || 0;
+ dummyCompound.paddingRight = parent.paddingRight || 0;
+ dummyCompound.paddingBottom = parent.paddingBottom || 0;
+ dummyCompound.paddingTop = parent.paddingTop || 0;
+
+ self.idToDummyNode[dummyCompoundId] = dummyCompound;
+
+ var dummyParentGraph = self.getGraphManager().add(self.newGraph(), dummyCompound);
+ var parentGraph = parent.getChild();
+
+ // Add dummy compound to parent the graph
+ parentGraph.add(dummyCompound);
+
+ // For each zero degree node in this level remove it from its parent graph and add it to the graph of dummy parent
+ for (var i = 0; i < tempMemberGroups[p_id].length; i++) {
+ var node = tempMemberGroups[p_id][i];
+
+ parentGraph.remove(node);
+ dummyParentGraph.add(node);
+ }
+ }
+ });
+};
+
+CoSELayout.prototype.clearCompounds = function () {
+ var childGraphMap = {};
+ var idToNode = {};
+
+ // Get compound ordering by finding the inner one first
+ this.performDFSOnCompounds();
+
+ for (var i = 0; i < this.compoundOrder.length; i++) {
+
+ idToNode[this.compoundOrder[i].id] = this.compoundOrder[i];
+ childGraphMap[this.compoundOrder[i].id] = [].concat(this.compoundOrder[i].getChild().getNodes());
+
+ // Remove children of compounds
+ this.graphManager.remove(this.compoundOrder[i].getChild());
+ this.compoundOrder[i].child = null;
+ }
+
+ this.graphManager.resetAllNodes();
+
+ // Tile the removed children
+ this.tileCompoundMembers(childGraphMap, idToNode);
+};
+
+CoSELayout.prototype.clearZeroDegreeMembers = function () {
+ var self = this;
+ var tiledZeroDegreePack = this.tiledZeroDegreePack = [];
+
+ Object.keys(this.memberGroups).forEach(function(id) {
+ var compoundNode = self.idToDummyNode[id]; // Get the dummy compound
+
+ tiledZeroDegreePack[id] = self.tileNodes(self.memberGroups[id], compoundNode.paddingLeft + compoundNode.paddingRight);
+
+ // Set the width and height of the dummy compound as calculated
+ compoundNode.rect.width = tiledZeroDegreePack[id].width;
+ compoundNode.rect.height = tiledZeroDegreePack[id].height;
+ compoundNode.setCenter(tiledZeroDegreePack[id].centerX, tiledZeroDegreePack[id].centerY);
+
+ // compound left and top margings for labels
+ // when node labels are included, these values may be set to different values below and are used in tilingPostLayout,
+ // otherwise they stay as zero
+ compoundNode.labelMarginLeft = 0;
+ compoundNode.labelMarginTop = 0;
+
+ // Update compound bounds considering its label properties and set label margins for left and top
+ if(CoSEConstants.NODE_DIMENSIONS_INCLUDE_LABELS){
+
+ var width = compoundNode.rect.width;
+ var height = compoundNode.rect.height;
+
+ if(compoundNode.labelWidth){
+ if(compoundNode.labelPosHorizontal == "left"){
+ compoundNode.rect.x -= (compoundNode.labelWidth);
+ compoundNode.setWidth(width + compoundNode.labelWidth);
+ compoundNode.labelMarginLeft = compoundNode.labelWidth;
+ }
+ else if(compoundNode.labelPosHorizontal == "center" && compoundNode.labelWidth > width){
+ compoundNode.rect.x -= (compoundNode.labelWidth - width) / 2;
+ compoundNode.setWidth(compoundNode.labelWidth);
+ compoundNode.labelMarginLeft = (compoundNode.labelWidth - width) / 2;
+ }
+ else if(compoundNode.labelPosHorizontal == "right"){
+ compoundNode.setWidth(width + compoundNode.labelWidth);
+ }
+ }
+
+ if(compoundNode.labelHeight){
+ if(compoundNode.labelPosVertical == "top"){
+ compoundNode.rect.y -= (compoundNode.labelHeight);
+ compoundNode.setHeight(height + compoundNode.labelHeight);
+ compoundNode.labelMarginTop = compoundNode.labelHeight;
+ }
+ else if(compoundNode.labelPosVertical == "center" && compoundNode.labelHeight > height){
+ compoundNode.rect.y -= (compoundNode.labelHeight - height) / 2;
+ compoundNode.setHeight(compoundNode.labelHeight);
+ compoundNode.labelMarginTop = (compoundNode.labelHeight - height) / 2;
+ }
+ else if(compoundNode.labelPosVertical == "bottom"){
+ compoundNode.setHeight(height + compoundNode.labelHeight);
+ }
+ }
+ }
+ });
+};
+
+CoSELayout.prototype.repopulateCompounds = function () {
+ for (var i = this.compoundOrder.length - 1; i >= 0; i--) {
+ var lCompoundNode = this.compoundOrder[i];
+ var id = lCompoundNode.id;
+ var horizontalMargin = lCompoundNode.paddingLeft;
+ var verticalMargin = lCompoundNode.paddingTop;
+ var labelMarginLeft = lCompoundNode.labelMarginLeft;
+ var labelMarginTop = lCompoundNode.labelMarginTop;
+
+ this.adjustLocations(this.tiledMemberPack[id], lCompoundNode.rect.x, lCompoundNode.rect.y, horizontalMargin, verticalMargin, labelMarginLeft, labelMarginTop);
+ }
+};
+
+CoSELayout.prototype.repopulateZeroDegreeMembers = function () {
+ var self = this;
+ var tiledPack = this.tiledZeroDegreePack;
+
+ Object.keys(tiledPack).forEach(function(id) {
+ var compoundNode = self.idToDummyNode[id]; // Get the dummy compound by its id
+ var horizontalMargin = compoundNode.paddingLeft;
+ var verticalMargin = compoundNode.paddingTop;
+ var labelMarginLeft = compoundNode.labelMarginLeft;
+ var labelMarginTop = compoundNode.labelMarginTop;
+
+ // Adjust the positions of nodes wrt its compound
+ self.adjustLocations(tiledPack[id], compoundNode.rect.x, compoundNode.rect.y, horizontalMargin, verticalMargin, labelMarginLeft, labelMarginTop);
+ });
+};
+
+CoSELayout.prototype.getToBeTiled = function (node) {
+ var id = node.id;
+ //firstly check the previous results
+ if (this.toBeTiled[id] != null) {
+ return this.toBeTiled[id];
+ }
+
+ //only compound nodes are to be tiled
+ var childGraph = node.getChild();
+ if (childGraph == null) {
+ this.toBeTiled[id] = false;
+ return false;
+ }
+
+ var children = childGraph.getNodes(); // Get the children nodes
+
+ //a compound node is not to be tiled if all of its compound children are not to be tiled
+ for (var i = 0; i < children.length; i++) {
+ var theChild = children[i];
+
+ if (this.getNodeDegree(theChild) > 0) {
+ this.toBeTiled[id] = false;
+ return false;
+ }
+
+ //pass the children not having the compound structure
+ if (theChild.getChild() == null) {
+ this.toBeTiled[theChild.id] = false;
+ continue;
+ }
+
+ if (!this.getToBeTiled(theChild)) {
+ this.toBeTiled[id] = false;
+ return false;
+ }
+ }
+ this.toBeTiled[id] = true;
+ return true;
+};
+
+// Get degree of a node depending of its edges and independent of its children
+CoSELayout.prototype.getNodeDegree = function (node) {
+ var id = node.id;
+ var edges = node.getEdges();
+ var degree = 0;
+
+ // For the edges connected
+ for (var i = 0; i < edges.length; i++) {
+ var edge = edges[i];
+ if (edge.getSource().id !== edge.getTarget().id) {
+ degree = degree + 1;
+ }
+ }
+ return degree;
+};
+
+// Get degree of a node with its children
+CoSELayout.prototype.getNodeDegreeWithChildren = function (node) {
+ var degree = this.getNodeDegree(node);
+ if (node.getChild() == null) {
+ return degree;
+ }
+ var children = node.getChild().getNodes();
+ for (var i = 0; i < children.length; i++) {
+ var child = children[i];
+ degree += this.getNodeDegreeWithChildren(child);
+ }
+ return degree;
+};
+
+CoSELayout.prototype.performDFSOnCompounds = function () {
+ this.compoundOrder = [];
+ this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes());
+};
+
+CoSELayout.prototype.fillCompexOrderByDFS = function (children) {
+ for (var i = 0; i < children.length; i++) {
+ var child = children[i];
+ if (child.getChild() != null) {
+ this.fillCompexOrderByDFS(child.getChild().getNodes());
+ }
+ if (this.getToBeTiled(child)) {
+ this.compoundOrder.push(child);
+ }
+ }
+};
+
+/**
+* This method places each zero degree member wrt given (x,y) coordinates (top left).
+*/
+CoSELayout.prototype.adjustLocations = function (organization, x, y, compoundHorizontalMargin, compoundVerticalMargin, compoundLabelMarginLeft, compoundLabelMarginTop) {
+ x += compoundHorizontalMargin + compoundLabelMarginLeft;
+ y += compoundVerticalMargin + compoundLabelMarginTop;
+
+ var left = x;
+
+ for (var i = 0; i < organization.rows.length; i++) {
+ var row = organization.rows[i];
+ x = left;
+ var maxHeight = 0;
+
+ for (var j = 0; j < row.length; j++) {
+ var lnode = row[j];
+
+ lnode.rect.x = x;// + lnode.rect.width / 2;
+ lnode.rect.y = y;// + lnode.rect.height / 2;
+
+ x += lnode.rect.width + organization.horizontalPadding;
+
+ if (lnode.rect.height > maxHeight)
+ maxHeight = lnode.rect.height;
+ }
+
+ y += maxHeight + organization.verticalPadding;
+ }
+};
+
+CoSELayout.prototype.tileCompoundMembers = function (childGraphMap, idToNode) {
+ var self = this;
+ this.tiledMemberPack = [];
+
+ Object.keys(childGraphMap).forEach(function(id) {
+ // Get the compound node
+ var compoundNode = idToNode[id];
+
+ self.tiledMemberPack[id] = self.tileNodes(childGraphMap[id], compoundNode.paddingLeft + compoundNode.paddingRight);
+
+ compoundNode.rect.width = self.tiledMemberPack[id].width;
+ compoundNode.rect.height = self.tiledMemberPack[id].height;
+ compoundNode.setCenter(self.tiledMemberPack[id].centerX, self.tiledMemberPack[id].centerY);
+
+ // compound left and top margings for labels
+ // when node labels are included, these values may be set to different values below and are used in tilingPostLayout,
+ // otherwise they stay as zero
+ compoundNode.labelMarginLeft = 0;
+ compoundNode.labelMarginTop = 0;
+
+ // Update compound bounds considering its label properties and set label margins for left and top
+ if(CoSEConstants.NODE_DIMENSIONS_INCLUDE_LABELS){
+
+ var width = compoundNode.rect.width;
+ var height = compoundNode.rect.height;
+
+ if(compoundNode.labelWidth){
+ if(compoundNode.labelPosHorizontal == "left"){
+ compoundNode.rect.x -= (compoundNode.labelWidth);
+ compoundNode.setWidth(width + compoundNode.labelWidth);
+ compoundNode.labelMarginLeft = compoundNode.labelWidth;
+ }
+ else if(compoundNode.labelPosHorizontal == "center" && compoundNode.labelWidth > width){
+ compoundNode.rect.x -= (compoundNode.labelWidth - width) / 2;
+ compoundNode.setWidth(compoundNode.labelWidth);
+ compoundNode.labelMarginLeft = (compoundNode.labelWidth - width) / 2;
+ }
+ else if(compoundNode.labelPosHorizontal == "right"){
+ compoundNode.setWidth(width + compoundNode.labelWidth);
+ }
+ }
+
+ if(compoundNode.labelHeight){
+ if(compoundNode.labelPosVertical == "top"){
+ compoundNode.rect.y -= (compoundNode.labelHeight);
+ compoundNode.setHeight(height + compoundNode.labelHeight);
+ compoundNode.labelMarginTop = compoundNode.labelHeight;
+ }
+ else if(compoundNode.labelPosVertical == "center" && compoundNode.labelHeight > height){
+ compoundNode.rect.y -= (compoundNode.labelHeight - height) / 2;
+ compoundNode.setHeight(compoundNode.labelHeight);
+ compoundNode.labelMarginTop = (compoundNode.labelHeight - height) / 2;
+ }
+ else if(compoundNode.labelPosVertical == "bottom"){
+ compoundNode.setHeight(height + compoundNode.labelHeight);
+ }
+ }
+ }
+ });
+};
+
+CoSELayout.prototype.tileNodes = function (nodes, minWidth) {
+ var horizontalOrg = this.tileNodesByFavoringDim(nodes, minWidth, true);
+ var verticalOrg = this.tileNodesByFavoringDim(nodes, minWidth, false);
+
+ var horizontalRatio = this.getOrgRatio(horizontalOrg);
+ var verticalRatio = this.getOrgRatio(verticalOrg);
+ var bestOrg;
+
+ // the best ratio is the one that is closer to 1 since the ratios are already normalized
+ // and the best organization is the one that has the best ratio
+ if (verticalRatio < horizontalRatio) {
+ bestOrg = verticalOrg;
+ } else {
+ bestOrg = horizontalOrg;
+ }
+
+ return bestOrg;
+};
+
+// get the width/height ratio of the organization that is normalized so that it will not be less than 1
+CoSELayout.prototype.getOrgRatio = function (organization) {
+ // get dimensions and calculate the initial ratio
+ var width = organization.width;
+ var height = organization.height;
+ var ratio = width / height;
+
+ // if the initial ratio is less then 1 then inverse it
+ if (ratio < 1) {
+ ratio = 1 / ratio;
+ }
+
+ // return the normalized ratio
+ return ratio;
+};
+
+/*
+ * Calculates the ideal width for the rows. This method assumes that
+ * each node has the same sizes and calculates the ideal row width that
+ * approximates a square shaped complex accordingly. However, since nodes would
+ * have different sizes some rows would have different sizes and the resulting
+ * shape would not be an exact square.
+ */
+CoSELayout.prototype.calcIdealRowWidth = function (members, favorHorizontalDim) {
+ // To approximate a square shaped complex we need to make complex width equal to complex height.
+ // To achieve this we need to solve the following equation system for hc:
+ // (x + bx) * hc - bx = (y + by) * vc - by, hc * vc = n
+ // where x is the avarage width of the nodes, y is the avarage height of nodes
+ // bx and by are the buffer sizes in horizontal and vertical dimensions accordingly,
+ // hc and vc are the number of rows in horizontal and vertical dimensions
+ // n is number of members.
+
+ var verticalPadding = CoSEConstants.TILING_PADDING_VERTICAL;
+ var horizontalPadding = CoSEConstants.TILING_PADDING_HORIZONTAL;
+
+ // number of members
+ var membersSize = members.length;
+
+ // sum of the width of all members
+ var totalWidth = 0;
+
+ // sum of the height of all members
+ var totalHeight = 0;
+
+ var maxWidth = 0;
+
+ // traverse all members to calculate total width and total height and get the maximum members width
+ members.forEach(function (node) {
+ totalWidth += node.getWidth();
+ totalHeight += node.getHeight();
+
+ if (node.getWidth() > maxWidth) {
+ maxWidth = node.getWidth();
+ }
+ });
+
+ // average width of the members
+ var averageWidth = totalWidth / membersSize;
+
+ // average height of the members
+ var averageHeight = totalHeight / membersSize;
+
+ // solving the initial equation system for the hc yields the following second degree equation:
+ // hc^2 * (x+bx) + hc * (by - bx) - n * (y + by) = 0
+
+ // the delta value to solve the equation above for hc
+ var delta = Math.pow(verticalPadding - horizontalPadding, 2) + 4 * (averageWidth + horizontalPadding) * (averageHeight + verticalPadding) * membersSize;
+
+ // solve the equation using delta value to calculate the horizontal count
+ // that represents the number of nodes in an ideal row
+ var horizontalCountDouble = (horizontalPadding - verticalPadding + Math.sqrt(delta)) / (2 * (averageWidth + horizontalPadding));
+ // round the calculated horizontal count up or down according to the favored dimension
+ var horizontalCount;
+
+ if (favorHorizontalDim) {
+ horizontalCount = Math.ceil(horizontalCountDouble);
+ // if horizontalCount count is not a float value then both of rounding to floor and ceil
+ // will yield the same values. Instead of repeating the same calculation try going up
+ // while favoring horizontal dimension in such cases
+ if ( horizontalCount == horizontalCountDouble ) {
+ horizontalCount++;
+ }
+ } else {
+ horizontalCount = Math.floor(horizontalCountDouble);
+ }
+
+ // ideal width to be calculated
+ var idealWidth = horizontalCount * (averageWidth + horizontalPadding) - horizontalPadding;
+
+ // if max width is bigger than calculated ideal width reset ideal width to it
+ if (maxWidth > idealWidth) {
+ idealWidth = maxWidth;
+ }
+
+ // add the left-right margins to the ideal row width
+ idealWidth += horizontalPadding * 2;
+
+ // return the ideal row width1
+ return idealWidth;
+};
+
+CoSELayout.prototype.tileNodesByFavoringDim = function (nodes, minWidth, favorHorizontalDim) {
+ var verticalPadding = CoSEConstants.TILING_PADDING_VERTICAL;
+ var horizontalPadding = CoSEConstants.TILING_PADDING_HORIZONTAL;
+ var tilingCompareBy = CoSEConstants.TILING_COMPARE_BY;
+ var organization = {
+ rows: [],
+ rowWidth: [],
+ rowHeight: [],
+ width: 0,
+ height: minWidth, // assume minHeight equals to minWidth
+ verticalPadding: verticalPadding,
+ horizontalPadding: horizontalPadding,
+ centerX: 0,
+ centerY: 0
+ };
+
+ if (tilingCompareBy) {
+ organization.idealRowWidth = this.calcIdealRowWidth(nodes, favorHorizontalDim);
+ }
+
+ var getNodeArea = function( n ) {
+ return n.rect.width * n.rect.height;
+ };
+
+ var areaCompareFcn = function(n1, n2){
+ return getNodeArea( n2 ) - getNodeArea( n1 );
+ };
+
+ // Sort the nodes in descending order of their areas
+ nodes.sort(function (n1, n2) {
+ var cmpBy = areaCompareFcn;
+ if ( organization.idealRowWidth ) {
+ cmpBy = tilingCompareBy;
+ return cmpBy( n1.id, n2.id );
+ }
+ return cmpBy( n1, n2 );
+ });
+
+ // Create the organization -> calculate compound center
+ var sumCenterX = 0;
+ var sumCenterY = 0;
+ for (var i = 0; i < nodes.length; i++) {
+ var lNode = nodes[i];
+
+ sumCenterX += lNode.getCenterX();
+ sumCenterY += lNode.getCenterY();
+ }
+
+ organization.centerX = sumCenterX / nodes.length;
+ organization.centerY = sumCenterY / nodes.length;
+
+ // Create the organization -> tile members
+ for (var i = 0; i < nodes.length; i++) {
+ var lNode = nodes[i];
+
+ if (organization.rows.length == 0) {
+ this.insertNodeToRow(organization, lNode, 0, minWidth);
+ }
+ else if (this.canAddHorizontal(organization, lNode.rect.width, lNode.rect.height)) {
+ var rowIndex = organization.rows.length - 1;
+ if (!organization.idealRowWidth) {
+ rowIndex = this.getShortestRowIndex(organization);
+ }
+ this.insertNodeToRow(organization, lNode, rowIndex, minWidth);
+ }
+ else {
+ this.insertNodeToRow(organization, lNode, organization.rows.length, minWidth);
+ }
+
+ this.shiftToLastRow(organization);
+ }
+
+ return organization;
+};
+
+CoSELayout.prototype.insertNodeToRow = function (organization, node, rowIndex, minWidth) {
+ var minCompoundSize = minWidth;
+
+ // Add new row if needed
+ if (rowIndex == organization.rows.length) {
+ var secondDimension = [];
+
+ organization.rows.push(secondDimension);
+ organization.rowWidth.push(minCompoundSize);
+ organization.rowHeight.push(0);
+ }
+
+ // Update row width
+ var w = organization.rowWidth[rowIndex] + node.rect.width;
+
+ if (organization.rows[rowIndex].length > 0) {
+ w += organization.horizontalPadding;
+ }
+
+ organization.rowWidth[rowIndex] = w;
+ // Update compound width
+ if (organization.width < w) {
+ organization.width = w;
+ }
+
+ // Update height
+ var h = node.rect.height;
+ if (rowIndex > 0)
+ h += organization.verticalPadding;
+
+ var extraHeight = 0;
+ if (h > organization.rowHeight[rowIndex]) {
+ extraHeight = organization.rowHeight[rowIndex];
+ organization.rowHeight[rowIndex] = h;
+ extraHeight = organization.rowHeight[rowIndex] - extraHeight;
+ }
+
+ organization.height += extraHeight;
+
+ // Insert node
+ organization.rows[rowIndex].push(node);
+};
+
+//Scans the rows of an organization and returns the one with the min width
+CoSELayout.prototype.getShortestRowIndex = function (organization) {
+ var r = -1;
+ var min = Number.MAX_VALUE;
+
+ for (var i = 0; i < organization.rows.length; i++) {
+ if (organization.rowWidth[i] < min) {
+ r = i;
+ min = organization.rowWidth[i];
+ }
+ }
+ return r;
+};
+
+//Scans the rows of an organization and returns the one with the max width
+CoSELayout.prototype.getLongestRowIndex = function (organization) {
+ var r = -1;
+ var max = Number.MIN_VALUE;
+
+ for (var i = 0; i < organization.rows.length; i++) {
+
+ if (organization.rowWidth[i] > max) {
+ r = i;
+ max = organization.rowWidth[i];
+ }
+ }
+
+ return r;
+};
+
+/**
+* This method checks whether adding extra width to the organization violates
+* the aspect ratio(1) or not.
+*/
+CoSELayout.prototype.canAddHorizontal = function (organization, extraWidth, extraHeight) {
+
+ // if there is an ideal row width specified use it instead of checking the aspect ratio
+ if (organization.idealRowWidth) {
+ var lastRowIndex = organization.rows.length - 1;
+ var lastRowWidth = organization.rowWidth[lastRowIndex];
+
+ // check and return if ideal row width will be exceed if the node is added to the row
+ return lastRowWidth + extraWidth + organization.horizontalPadding <= organization.idealRowWidth;
+ }
+
+ var sri = this.getShortestRowIndex(organization);
+
+ if (sri < 0) {
+ return true;
+ }
+
+ var min = organization.rowWidth[sri];
+
+ if (min + organization.horizontalPadding + extraWidth <= organization.width)
+ return true;
+
+ var hDiff = 0;
+
+ // Adding to an existing row
+ if (organization.rowHeight[sri] < extraHeight) {
+ if (sri > 0)
+ hDiff = extraHeight + organization.verticalPadding - organization.rowHeight[sri];
+ }
+
+ var add_to_row_ratio;
+ if (organization.width - min >= extraWidth + organization.horizontalPadding) {
+ add_to_row_ratio = (organization.height + hDiff) / (min + extraWidth + organization.horizontalPadding);
+ } else {
+ add_to_row_ratio = (organization.height + hDiff) / organization.width;
+ }
+
+ // Adding a new row for this node
+ hDiff = extraHeight + organization.verticalPadding;
+ var add_new_row_ratio;
+ if (organization.width < extraWidth) {
+ add_new_row_ratio = (organization.height + hDiff) / extraWidth;
+ } else {
+ add_new_row_ratio = (organization.height + hDiff) / organization.width;
+ }
+
+ if (add_new_row_ratio < 1)
+ add_new_row_ratio = 1 / add_new_row_ratio;
+
+ if (add_to_row_ratio < 1)
+ add_to_row_ratio = 1 / add_to_row_ratio;
+
+ return add_to_row_ratio < add_new_row_ratio;
+};
+
+//If moving the last node from the longest row and adding it to the last
+//row makes the bounding box smaller, do it.
+CoSELayout.prototype.shiftToLastRow = function (organization) {
+ var longest = this.getLongestRowIndex(organization);
+ var last = organization.rowWidth.length - 1;
+ var row = organization.rows[longest];
+ var node = row[row.length - 1];
+
+ var diff = node.width + organization.horizontalPadding;
+
+ // Check if there is enough space on the last row
+ if (organization.width - organization.rowWidth[last] > diff && longest != last) {
+ // Remove the last element of the longest row
+ row.splice(-1, 1);
+
+ // Push it to the last row
+ organization.rows[last].push(node);
+
+ organization.rowWidth[longest] = organization.rowWidth[longest] - diff;
+ organization.rowWidth[last] = organization.rowWidth[last] + diff;
+ organization.width = organization.rowWidth[instance.getLongestRowIndex(organization)];
+
+ // Update heights of the organization
+ var maxHeight = Number.MIN_VALUE;
+ for (var i = 0; i < row.length; i++) {
+ if (row[i].height > maxHeight)
+ maxHeight = row[i].height;
+ }
+ if (longest > 0)
+ maxHeight += organization.verticalPadding;
+
+ var prevTotal = organization.rowHeight[longest] + organization.rowHeight[last];
+
+ organization.rowHeight[longest] = maxHeight;
+ if (organization.rowHeight[last] < node.height + organization.verticalPadding)
+ organization.rowHeight[last] = node.height + organization.verticalPadding;
+
+ var finalTotal = organization.rowHeight[longest] + organization.rowHeight[last];
+ organization.height += (finalTotal - prevTotal);
+
+ this.shiftToLastRow(organization);
+ }
+};
+
+CoSELayout.prototype.tilingPreLayout = function() {
+ if (CoSEConstants.TILE) {
+ // Find zero degree nodes and create a compound for each level
+ this.groupZeroDegreeMembers();
+ // Tile and clear children of each compound
+ this.clearCompounds();
+ // Separately tile and clear zero degree nodes for each level
+ this.clearZeroDegreeMembers();
+ }
+};
+
+CoSELayout.prototype.tilingPostLayout = function() {
+ if (CoSEConstants.TILE) {
+ this.repopulateZeroDegreeMembers();
+ this.repopulateCompounds();
+ }
+};
+
+// -----------------------------------------------------------------------------
+// Section: Tree Reduction methods
+// -----------------------------------------------------------------------------
+// Reduce trees
+CoSELayout.prototype.reduceTrees = function ()
+{
+ var prunedNodesAll = [];
+ var containsLeaf = true;
+ var node;
+
+ while(containsLeaf) {
+ var allNodes = this.graphManager.getAllNodes();
+ var prunedNodesInStepTemp = [];
+ containsLeaf = false;
+
+ for (var i = 0; i < allNodes.length; i++) {
+ node = allNodes[i];
+ if(node.getEdges().length == 1 && !node.getEdges()[0].isInterGraph && node.getChild() == null){
+ if(CoSEConstants.PURE_INCREMENTAL) {
+ var otherEnd = node.getEdges()[0].getOtherEnd(node);
+ var relativePosition = new DimensionD(node.getCenterX() - otherEnd.getCenterX(), node.getCenterY() - otherEnd.getCenterY());
+ prunedNodesInStepTemp.push([node, node.getEdges()[0], node.getOwner(), relativePosition]);
+ }
+ else {
+ prunedNodesInStepTemp.push([node, node.getEdges()[0], node.getOwner()]);
+ }
+ containsLeaf = true;
+ }
+ }
+ if(containsLeaf == true){
+ var prunedNodesInStep = [];
+ for(var j = 0; j < prunedNodesInStepTemp.length; j++){
+ if(prunedNodesInStepTemp[j][0].getEdges().length == 1){
+ prunedNodesInStep.push(prunedNodesInStepTemp[j]);
+ prunedNodesInStepTemp[j][0].getOwner().remove(prunedNodesInStepTemp[j][0]);
+ }
+ }
+ prunedNodesAll.push(prunedNodesInStep);
+ this.graphManager.resetAllNodes();
+ this.graphManager.resetAllEdges();
+ }
+ }
+ this.prunedNodesAll = prunedNodesAll;
+};
+
+// Grow tree one step
+CoSELayout.prototype.growTree = function(prunedNodesAll)
+{
+ var lengthOfPrunedNodesInStep = prunedNodesAll.length;
+ var prunedNodesInStep = prunedNodesAll[lengthOfPrunedNodesInStep - 1];
+
+ var nodeData;
+ for(var i = 0; i < prunedNodesInStep.length; i++){
+ nodeData = prunedNodesInStep[i];
+
+ this.findPlaceforPrunedNode(nodeData);
+
+ nodeData[2].add(nodeData[0]);
+ nodeData[2].add(nodeData[1], nodeData[1].source, nodeData[1].target);
+ }
+
+ prunedNodesAll.splice(prunedNodesAll.length-1, 1);
+ this.graphManager.resetAllNodes();
+ this.graphManager.resetAllEdges();
+};
+
+// Find an appropriate position to replace pruned node, this method can be improved
+CoSELayout.prototype.findPlaceforPrunedNode = function(nodeData){
+
+ var gridForPrunedNode;
+ var nodeToConnect;
+ var prunedNode = nodeData[0];
+ if(prunedNode == nodeData[1].source){
+ nodeToConnect = nodeData[1].target;
+ }
+ else {
+ nodeToConnect = nodeData[1].source;
+ }
+
+ if(CoSEConstants.PURE_INCREMENTAL) {
+ prunedNode.setCenter(nodeToConnect.getCenterX() + nodeData[3].getWidth(),
+ nodeToConnect.getCenterY() + nodeData[3].getHeight());
+ }
+ else {
+ var startGridX = nodeToConnect.startX;
+ var finishGridX = nodeToConnect.finishX;
+ var startGridY = nodeToConnect.startY;
+ var finishGridY = nodeToConnect.finishY;
+
+ var upNodeCount = 0;
+ var downNodeCount = 0;
+ var rightNodeCount = 0;
+ var leftNodeCount = 0;
+ var controlRegions = [upNodeCount, rightNodeCount, downNodeCount, leftNodeCount]
+
+ if(startGridY > 0){
+ for(var i = startGridX; i <= finishGridX; i++ ){
+ controlRegions[0] += (this.grid[i][startGridY - 1].length + this.grid[i][startGridY].length - 1);
+ }
+ }
+ if(finishGridX < this.grid.length - 1){
+ for(var i = startGridY; i <= finishGridY; i++ ){
+ controlRegions[1] += (this.grid[finishGridX + 1][i].length + this.grid[finishGridX][i].length - 1);
+ }
+ }
+ if(finishGridY < this.grid[0].length - 1){
+ for(var i = startGridX; i <= finishGridX; i++ ){
+ controlRegions[2] += (this.grid[i][finishGridY + 1].length + this.grid[i][finishGridY].length - 1);
+ }
+ }
+ if(startGridX > 0){
+ for(var i = startGridY; i <= finishGridY; i++ ){
+ controlRegions[3] += (this.grid[startGridX - 1][i].length + this.grid[startGridX][i].length - 1);
+ }
+ }
+ var min = Integer.MAX_VALUE;
+ var minCount;
+ var minIndex;
+ for(var j = 0; j < controlRegions.length; j++){
+ if(controlRegions[j] < min){
+ min = controlRegions[j];
+ minCount = 1;
+ minIndex = j;
+ }
+ else if(controlRegions[j] == min){
+ minCount++;
+ }
+ }
+
+ if(minCount == 3 && min == 0){
+ if(controlRegions[0] == 0 && controlRegions[1] == 0 && controlRegions[2] == 0){
+ gridForPrunedNode = 1;
+ }
+ else if(controlRegions[0] == 0 && controlRegions[1] == 0 && controlRegions[3] == 0){
+ gridForPrunedNode = 0;
+ }
+ else if(controlRegions[0] == 0 && controlRegions[2] == 0 && controlRegions[3] == 0){
+ gridForPrunedNode = 3;
+ }
+ else if(controlRegions[1] == 0 && controlRegions[2] == 0 && controlRegions[3] == 0){
+ gridForPrunedNode = 2;
+ }
+ }
+ else if(minCount == 2 && min == 0){
+ var random = Math.floor(Math.random() * 2);
+ if(controlRegions[0] == 0 && controlRegions[1] == 0){;
+ if(random == 0){
+ gridForPrunedNode = 0;
+ }
+ else{
+ gridForPrunedNode = 1;
+ }
+ }
+ else if(controlRegions[0] == 0 && controlRegions[2] == 0){
+ if(random == 0){
+ gridForPrunedNode = 0;
+ }
+ else{
+ gridForPrunedNode = 2;
+ }
+ }
+ else if(controlRegions[0] == 0 && controlRegions[3] == 0){
+ if(random == 0){
+ gridForPrunedNode = 0;
+ }
+ else{
+ gridForPrunedNode = 3;
+ }
+ }
+ else if(controlRegions[1] == 0 && controlRegions[2] == 0){
+ if(random == 0){
+ gridForPrunedNode = 1;
+ }
+ else{
+ gridForPrunedNode = 2;
+ }
+ }
+ else if(controlRegions[1] == 0 && controlRegions[3] == 0){
+ if(random == 0){
+ gridForPrunedNode = 1;
+ }
+ else{
+ gridForPrunedNode = 3;
+ }
+ }
+ else {
+ if(random == 0){
+ gridForPrunedNode = 2;
+ }
+ else{
+ gridForPrunedNode = 3;
+ }
+ }
+ }
+ else if(minCount == 4 && min == 0){
+ var random = Math.floor(Math.random() * 4);
+ gridForPrunedNode = random;
+ }
+ else {
+ gridForPrunedNode = minIndex;
+ }
+
+ if(gridForPrunedNode == 0) {
+ prunedNode.setCenter(nodeToConnect.getCenterX(),
+ nodeToConnect.getCenterY() - nodeToConnect.getHeight()/2 - FDLayoutConstants.DEFAULT_EDGE_LENGTH - prunedNode.getHeight()/2);
+ }
+ else if(gridForPrunedNode == 1) {
+ prunedNode.setCenter(nodeToConnect.getCenterX() + nodeToConnect.getWidth()/2 + FDLayoutConstants.DEFAULT_EDGE_LENGTH + prunedNode.getWidth()/2,
+ nodeToConnect.getCenterY());
+ }
+ else if(gridForPrunedNode == 2) {
+ prunedNode.setCenter(nodeToConnect.getCenterX(),
+ nodeToConnect.getCenterY() + nodeToConnect.getHeight()/2 + FDLayoutConstants.DEFAULT_EDGE_LENGTH + prunedNode.getHeight()/2);
+ }
+ else {
+ prunedNode.setCenter(nodeToConnect.getCenterX() - nodeToConnect.getWidth()/2 - FDLayoutConstants.DEFAULT_EDGE_LENGTH - prunedNode.getWidth()/2,
+ nodeToConnect.getCenterY());
+ }
+ }
+};
+
+module.exports = CoSELayout;
diff --git a/node_modules/cose-base/src/CoSENode.js b/node_modules/cose-base/src/CoSENode.js
new file mode 100644
index 00000000..52e01d15
--- /dev/null
+++ b/node_modules/cose-base/src/CoSENode.js
@@ -0,0 +1,127 @@
+var FDLayoutNode = require('layout-base').FDLayoutNode;
+var IMath = require('layout-base').IMath;
+
+function CoSENode(gm, loc, size, vNode) {
+ FDLayoutNode.call(this, gm, loc, size, vNode);
+}
+
+CoSENode.prototype = Object.create(FDLayoutNode.prototype);
+for (var prop in FDLayoutNode) {
+ CoSENode[prop] = FDLayoutNode[prop];
+}
+
+CoSENode.prototype.calculateDisplacement = function ()
+{
+ var layout = this.graphManager.getLayout();
+ // this check is for compound nodes that contain fixed nodes
+ if (this.getChild() != null && this.fixedNodeWeight) {
+ this.displacementX += layout.coolingFactor *
+ (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.fixedNodeWeight;
+ this.displacementY += layout.coolingFactor *
+ (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.fixedNodeWeight;
+ }
+ else {
+ this.displacementX += layout.coolingFactor *
+ (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.noOfChildren;
+ this.displacementY += layout.coolingFactor *
+ (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.noOfChildren;
+ }
+
+ if (Math.abs(this.displacementX) > layout.coolingFactor * layout.maxNodeDisplacement)
+ {
+ this.displacementX = layout.coolingFactor * layout.maxNodeDisplacement *
+ IMath.sign(this.displacementX);
+ }
+
+ if (Math.abs(this.displacementY) > layout.coolingFactor * layout.maxNodeDisplacement)
+ {
+ this.displacementY = layout.coolingFactor * layout.maxNodeDisplacement *
+ IMath.sign(this.displacementY);
+ }
+
+ // non-empty compound node, propogate movement to children as well
+ if(this.child && this.child.getNodes().length > 0)
+ {
+ this.propogateDisplacementToChildren(this.displacementX,
+ this.displacementY);
+ }
+
+};
+
+CoSENode.prototype.propogateDisplacementToChildren = function (dX, dY)
+{
+ var nodes = this.getChild().getNodes();
+ var node;
+ for (var i = 0; i < nodes.length; i++)
+ {
+ node = nodes[i];
+ if (node.getChild() == null)
+ {
+ node.displacementX += dX;
+ node.displacementY += dY;
+ }
+ else
+ {
+ node.propogateDisplacementToChildren(dX, dY);
+ }
+ }
+};
+
+CoSENode.prototype.move = function ()
+{
+ var layout = this.graphManager.getLayout();
+
+ // a simple node or an empty compound node, move it
+ if (this.child == null || this.child.getNodes().length == 0)
+ {
+ this.moveBy(this.displacementX, this.displacementY);
+
+ layout.totalDisplacement += Math.abs(this.displacementX) + Math.abs(this.displacementY);
+ }
+
+ this.springForceX = 0;
+ this.springForceY = 0;
+ this.repulsionForceX = 0;
+ this.repulsionForceY = 0;
+ this.gravitationForceX = 0;
+ this.gravitationForceY = 0;
+ this.displacementX = 0;
+ this.displacementY = 0;
+};
+
+CoSENode.prototype.setPred1 = function (pred1)
+{
+ this.pred1 = pred1;
+};
+
+CoSENode.prototype.getPred1 = function ()
+{
+ return pred1;
+};
+
+CoSENode.prototype.getPred2 = function ()
+{
+ return pred2;
+};
+
+CoSENode.prototype.setNext = function (next)
+{
+ this.next = next;
+};
+
+CoSENode.prototype.getNext = function ()
+{
+ return next;
+};
+
+CoSENode.prototype.setProcessed = function (processed)
+{
+ this.processed = processed;
+};
+
+CoSENode.prototype.isProcessed = function ()
+{
+ return processed;
+};
+
+module.exports = CoSENode;
diff --git a/node_modules/cose-base/src/ConstraintHandler.js b/node_modules/cose-base/src/ConstraintHandler.js
new file mode 100644
index 00000000..ee49a7e5
--- /dev/null
+++ b/node_modules/cose-base/src/ConstraintHandler.js
@@ -0,0 +1,848 @@
+var CoSEConstants = require('./CoSEConstants');
+var LinkedList = require('layout-base').LinkedList;
+var Matrix = require('layout-base').Matrix;
+var SVD = require('layout-base').SVD;
+
+function ConstraintHandler() {
+}
+
+ConstraintHandler.handleConstraints = function (layout)
+{
+// let layout = this.graphManager.getLayout();
+
+ // get constraints from layout
+ let constraints = {};
+ constraints.fixedNodeConstraint = layout.constraints.fixedNodeConstraint;
+ constraints.alignmentConstraint = layout.constraints.alignmentConstraint;
+ constraints.relativePlacementConstraint = layout.constraints.relativePlacementConstraint;
+
+ let idToNodeMap = new Map();
+ let nodeIndexes = new Map();
+ let xCoords = [];
+ let yCoords = [];
+
+ let allNodes = layout.getAllNodes();
+ let index = 0;
+ // fill index map and coordinates
+ for (let i = 0; i < allNodes.length; i++) {
+ let node = allNodes[i];
+ if (node.getChild() == null) {
+ nodeIndexes.set(node.id, index++);
+ xCoords.push(node.getCenterX());
+ yCoords.push(node.getCenterY());
+ idToNodeMap.set(node.id, node);
+ }
+ }
+
+ // if there exists relative placement constraint without gap value, set it to default
+ if (constraints.relativePlacementConstraint) {
+ constraints.relativePlacementConstraint.forEach(function(constraint) {
+ if (!constraint.gap && constraint.gap != 0) {
+ if (constraint.left) {
+ constraint.gap = CoSEConstants.DEFAULT_EDGE_LENGTH + idToNodeMap.get(constraint.left).getWidth()/2 + idToNodeMap.get(constraint.right).getWidth()/2;
+ }
+ else {
+ constraint.gap = CoSEConstants.DEFAULT_EDGE_LENGTH + idToNodeMap.get(constraint.top).getHeight()/2 + idToNodeMap.get(constraint.bottom).getHeight()/2;
+ }
+ }
+ });
+ }
+
+ /* auxiliary functions */
+
+ // calculate difference between two position objects
+ let calculatePositionDiff = function(pos1, pos2) {
+ return {x: pos1.x - pos2.x, y: pos1.y - pos2.y};
+ };
+
+ // calculate average position of the nodes
+ let calculateAvgPosition = function(nodeIdSet) {
+ let xPosSum = 0;
+ let yPosSum = 0;
+ nodeIdSet.forEach(function(nodeId) {
+ xPosSum += xCoords[nodeIndexes.get(nodeId)];
+ yPosSum += yCoords[nodeIndexes.get(nodeId)];
+ });
+
+ return {x: xPosSum / nodeIdSet.size, y: yPosSum / nodeIdSet.size};
+ };
+
+ // find an appropriate positioning for the nodes in a given graph according to relative placement constraints
+ // this function also takes the fixed nodes and alignment constraints into account
+ // graph: dag to be evaluated, direction: "horizontal" or "vertical",
+ // fixedNodes: set of fixed nodes to consider during evaluation, dummyPositions: appropriate coordinates of the dummy nodes
+ let findAppropriatePositionForRelativePlacement = function(graph, direction, fixedNodes, dummyPositions, componentSources) {
+
+ // find union of two sets
+ function setUnion(setA, setB) {
+ let union = new Set(setA);
+ for (let elem of setB) {
+ union.add(elem);
+ }
+ return union;
+ }
+
+ // find indegree count for each node
+ let inDegrees = new Map();
+
+ graph.forEach(function(value, key) {
+ inDegrees.set(key, 0);
+ });
+ graph.forEach(function(value, key) {
+ value.forEach(function(adjacent) {
+ inDegrees.set(adjacent.id, inDegrees.get(adjacent.id) + 1);
+ });
+ });
+
+ let positionMap = new Map(); // keeps the position for each node
+ let pastMap = new Map(); // keeps the predecessors(past) of a node
+ let queue = new LinkedList();
+ inDegrees.forEach(function(value, key) {
+ if (value == 0) {
+ queue.push(key);
+ if (!fixedNodes) {
+ if (direction == "horizontal") {
+ positionMap.set(key, nodeIndexes.has(key) ? xCoords[nodeIndexes.get(key)] : dummyPositions.get(key));
+ }
+ else {
+ positionMap.set(key, nodeIndexes.has(key) ? yCoords[nodeIndexes.get(key)] : dummyPositions.get(key));
+ }
+ }
+ }
+ else {
+ positionMap.set(key, Number.NEGATIVE_INFINITY);
+ }
+ if (fixedNodes) {
+ pastMap.set(key, new Set([key]));
+ }
+ });
+
+ // align sources of each component in enforcement phase
+ if (fixedNodes) {
+ componentSources.forEach(function(component) {
+ let fixedIds = [];
+ component.forEach(function(nodeId) {
+ if (fixedNodes.has(nodeId)) {
+ fixedIds.push(nodeId);
+ }
+ });
+ if (fixedIds.length > 0) {
+ let position = 0;
+ fixedIds.forEach(function(fixedId) {
+ if (direction == "horizontal") {
+ positionMap.set(fixedId, nodeIndexes.has(fixedId) ? xCoords[nodeIndexes.get(fixedId)] : dummyPositions.get(fixedId));
+ position += positionMap.get(fixedId);
+ }
+ else {
+ positionMap.set(fixedId, nodeIndexes.has(fixedId) ? yCoords[nodeIndexes.get(fixedId)] : dummyPositions.get(fixedId));
+ position += positionMap.get(fixedId);
+ }
+ });
+ position = position / fixedIds.length;
+ component.forEach(function(nodeId) {
+ if (!fixedNodes.has(nodeId)) {
+ positionMap.set(nodeId, position);
+ }
+ });
+ }
+ else {
+ let position = 0;
+ component.forEach(function(nodeId) {
+ if (direction == "horizontal") {
+ position += nodeIndexes.has(nodeId) ? xCoords[nodeIndexes.get(nodeId)] : dummyPositions.get(nodeId);
+ }
+ else {
+ position += nodeIndexes.has(nodeId) ? yCoords[nodeIndexes.get(nodeId)] : dummyPositions.get(nodeId);
+ }
+ });
+ position = position / component.length;
+ component.forEach(function(nodeId) {
+ positionMap.set(nodeId, position);
+ });
+ }
+ });
+ }
+
+ // calculate positions of the nodes
+ while (queue.length != 0) {
+ let currentNode = queue.shift();
+ let neighbors = graph.get(currentNode);
+ neighbors.forEach(function(neighbor) {
+ if (positionMap.get(neighbor.id) < (positionMap.get(currentNode) + neighbor.gap)) {
+ if (fixedNodes && fixedNodes.has(neighbor.id)) {
+ let fixedPosition;
+ if (direction == "horizontal") {
+ fixedPosition = nodeIndexes.has(neighbor.id) ? xCoords[nodeIndexes.get(neighbor.id)] : dummyPositions.get(neighbor.id);
+ }
+ else {
+ fixedPosition = nodeIndexes.has(neighbor.id) ? yCoords[nodeIndexes.get(neighbor.id)] : dummyPositions.get(neighbor.id);
+ }
+ positionMap.set(neighbor.id, fixedPosition); // TODO: may do unnecessary work
+ if (fixedPosition < (positionMap.get(currentNode) + neighbor.gap)) {
+ let diff = (positionMap.get(currentNode) + neighbor.gap) - fixedPosition;
+ pastMap.get(currentNode).forEach(function(nodeId) {
+ positionMap.set(nodeId, positionMap.get(nodeId) - diff);
+ });
+ }
+ }
+ else {
+ positionMap.set(neighbor.id, positionMap.get(currentNode) + neighbor.gap);
+ }
+ }
+ inDegrees.set(neighbor.id, inDegrees.get(neighbor.id) - 1);
+ if (inDegrees.get(neighbor.id) == 0) {
+ queue.push(neighbor.id);
+ }
+ if (fixedNodes) {
+ pastMap.set(neighbor.id, setUnion(pastMap.get(currentNode), pastMap.get(neighbor.id)));
+ }
+ });
+ }
+
+ // readjust position of the nodes after enforcement
+ if (fixedNodes) {
+ // find indegree count for each node
+ let sinkNodes = new Set();
+
+ graph.forEach(function(value, key) {
+ if (value.length == 0) {
+ sinkNodes.add(key);
+ }
+ });
+
+ let components = [];
+ pastMap.forEach(function(value, key) {
+ if (sinkNodes.has(key)) {
+ let isFixedComponent = false;
+ for (let nodeId of value) {
+ if (fixedNodes.has(nodeId)) {
+ isFixedComponent = true;
+ }
+ }
+ if (!isFixedComponent) {
+ let isExist = false;
+ let existAt;
+ components.forEach(function(component, index) {
+ if (component.has([...value][0])) {
+ isExist = true;
+ existAt = index;
+ }
+ });
+ if (!isExist) {
+ components.push(new Set(value));
+ }
+ else {
+ value.forEach(function(ele) {
+ components[existAt].add(ele);
+ });
+ }
+ }
+ }
+ });
+
+ components.forEach(function(component, index) {
+ let minBefore = Number.POSITIVE_INFINITY;
+ let minAfter = Number.POSITIVE_INFINITY;
+ let maxBefore = Number.NEGATIVE_INFINITY;
+ let maxAfter = Number.NEGATIVE_INFINITY;
+
+ for (let nodeId of component) {
+ let posBefore;
+ if (direction == "horizontal") {
+ posBefore = nodeIndexes.has(nodeId) ? xCoords[nodeIndexes.get(nodeId)] : dummyPositions.get(nodeId);
+ }
+ else {
+ posBefore = nodeIndexes.has(nodeId) ? yCoords[nodeIndexes.get(nodeId)] : dummyPositions.get(nodeId);
+ }
+ let posAfter = positionMap.get(nodeId);
+ if (posBefore < minBefore) {
+ minBefore = posBefore;
+ }
+ if (posBefore > maxBefore) {
+ maxBefore = posBefore;
+ }
+ if (posAfter < minAfter) {
+ minAfter = posAfter;
+ }
+ if (posAfter > maxAfter) {
+ maxAfter = posAfter;
+ }
+ }
+ let diff = (minBefore + maxBefore) / 2 - (minAfter + maxAfter) / 2;
+
+ for (let nodeId of component) {
+ positionMap.set(nodeId, positionMap.get(nodeId) + diff);
+ }
+ });
+ }
+
+ return positionMap;
+ };
+
+ // find transformation based on rel. placement constraints if there are both alignment and rel. placement constraints
+ // or if there are only rel. placement contraints where the largest component isn't sufficiently large
+ let applyReflectionForRelativePlacement = function (relativePlacementConstraints) {
+ // variables to count votes
+ let reflectOnY = 0, notReflectOnY = 0;
+ let reflectOnX = 0, notReflectOnX = 0;
+
+ relativePlacementConstraints.forEach(function(constraint) {
+ if (constraint.left) {
+ (xCoords[nodeIndexes.get(constraint.left)] - xCoords[nodeIndexes.get(constraint.right)] >= 0) ? reflectOnY++ : notReflectOnY++;
+ }
+ else {
+ (yCoords[nodeIndexes.get(constraint.top)] - yCoords[nodeIndexes.get(constraint.bottom)] >= 0) ? reflectOnX++ : notReflectOnX++;
+ }
+ });
+
+ if (reflectOnY > notReflectOnY && reflectOnX > notReflectOnX) {
+ for (let i = 0; i < nodeIndexes.size; i++) {
+ xCoords[i] = -1 * xCoords[i];
+ yCoords[i] = -1 * yCoords[i];
+ }
+ }
+ else if (reflectOnY > notReflectOnY) {
+ for (let i = 0; i < nodeIndexes.size; i++) {
+ xCoords[i] = -1 * xCoords[i];
+ }
+ }
+ else if (reflectOnX > notReflectOnX) {
+ for (let i = 0; i < nodeIndexes.size; i++) {
+ yCoords[i] = -1 * yCoords[i];
+ }
+ }
+ };
+
+ // find weakly connected components in undirected graph
+ let findComponents = function(graph) {
+ // find weakly connected components in dag
+ let components = [];
+ let queue = new LinkedList();
+ let visited = new Set();
+ let count = 0;
+
+ graph.forEach(function(value, key) {
+ if (!visited.has(key)) {
+ components[count] = [];
+ let currentNode = key;
+ queue.push(currentNode);
+ visited.add(currentNode);
+ components[count].push(currentNode);
+
+ while (queue.length != 0) {
+ currentNode = queue.shift();
+ let neighbors = graph.get(currentNode);
+ neighbors.forEach(function(neighbor) {
+ if (!visited.has(neighbor.id)) {
+ queue.push(neighbor.id);
+ visited.add(neighbor.id);
+ components[count].push(neighbor.id);
+ }
+ });
+ }
+ count++;
+ }
+ });
+ return components;
+ };
+
+ // return undirected version of given dag
+ let dagToUndirected = function(dag) {
+ let undirected = new Map();
+
+ dag.forEach(function(value, key) {
+ undirected.set(key, []);
+ });
+
+ dag.forEach(function(value, key) {
+ value.forEach(function(adjacent) {
+ undirected.get(key).push(adjacent);
+ undirected.get(adjacent.id).push({id: key, gap: adjacent.gap, direction: adjacent.direction});
+ });
+ });
+
+ return undirected;
+ };
+
+ // return reversed (directions inverted) version of given dag
+ let dagToReversed = function(dag) {
+ let reversed = new Map();
+
+ dag.forEach(function(value, key) {
+ reversed.set(key, []);
+ });
+
+ dag.forEach(function(value, key) {
+ value.forEach(function(adjacent) {
+ reversed.get(adjacent.id).push({id: key, gap: adjacent.gap, direction: adjacent.direction});
+ });
+ });
+
+ return reversed;
+ };
+
+ /**** apply transformation to the initial draft layout to better align with constrained nodes ****/
+ // solve the Orthogonal Procrustean Problem to rotate and/or reflect initial draft layout
+ // here we follow the solution in Chapter 20.2 of Borg, I. & Groenen, P. (2005) Modern Multidimensional Scaling: Theory and Applications
+
+ /* construct source and target configurations */
+
+ let targetMatrix = []; // A - target configuration
+ let sourceMatrix = []; // B - source configuration
+ let standardTransformation = false; // false for no transformation, true for standart (Procrustes) transformation (rotation and/or reflection)
+ let reflectionType = false; // false/true for reflection check, 'reflectOnX', 'reflectOnY' or 'reflectOnBoth' for reflection type if necessary
+ let fixedNodes = new Set();
+ let dag = new Map(); // adjacency list to keep directed acyclic graph (dag) that consists of relative placement constraints
+ let dagUndirected = new Map(); // undirected version of the dag
+ let components = []; // weakly connected components
+
+ // fill fixedNodes collection to use later
+ if (constraints.fixedNodeConstraint) {
+ constraints.fixedNodeConstraint.forEach(function(nodeData) {
+ fixedNodes.add(nodeData.nodeId);
+ });
+ }
+
+ // construct dag from relative placement constraints
+ if (constraints.relativePlacementConstraint) {
+ // construct both directed and undirected version of the dag
+ constraints.relativePlacementConstraint.forEach(function(constraint) {
+ if (constraint.left) {
+ if (dag.has(constraint.left)) {
+ dag.get(constraint.left).push({id: constraint.right, gap: constraint.gap, direction: "horizontal"});
+ }
+ else {
+ dag.set(constraint.left, [{id: constraint.right, gap: constraint.gap, direction: "horizontal"}]);
+ }
+ if (!dag.has(constraint.right)) {
+ dag.set(constraint.right, []);
+ }
+ }
+ else {
+ if (dag.has(constraint.top)) {
+ dag.get(constraint.top).push({id: constraint.bottom, gap: constraint.gap, direction: "vertical"});
+ }
+ else {
+ dag.set(constraint.top, [{id: constraint.bottom, gap: constraint.gap, direction: "vertical"}]);
+ }
+ if (!dag.has(constraint.bottom)) {
+ dag.set(constraint.bottom, []);
+ }
+ }
+ });
+
+ dagUndirected = dagToUndirected(dag);
+ components = findComponents(dagUndirected);
+ }
+
+ if (CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING) {
+ // first check fixed node constraint
+ if (constraints.fixedNodeConstraint && constraints.fixedNodeConstraint.length > 1) {
+ constraints.fixedNodeConstraint.forEach(function(nodeData, i) {
+ targetMatrix[i] = [nodeData.position.x, nodeData.position.y];
+ sourceMatrix[i] = [xCoords[nodeIndexes.get(nodeData.nodeId)], yCoords[nodeIndexes.get(nodeData.nodeId)]];
+ });
+ standardTransformation = true;
+ }
+ else if (constraints.alignmentConstraint) { // then check alignment constraint
+ let count = 0;
+ if (constraints.alignmentConstraint.vertical) {
+ let verticalAlign = constraints.alignmentConstraint.vertical;
+ for (let i = 0; i < verticalAlign.length; i++) {
+ let alignmentSet = new Set();
+ verticalAlign[i].forEach(function(nodeId) {
+ alignmentSet.add(nodeId);
+ });
+ let intersection = new Set([...alignmentSet].filter(x => fixedNodes.has(x)));
+ let xPos;
+ if (intersection.size > 0)
+ xPos = xCoords[nodeIndexes.get(intersection.values().next().value)];
+ else
+ xPos = calculateAvgPosition(alignmentSet).x;
+
+ verticalAlign[i].forEach(function(nodeId) {
+ targetMatrix[count] = [xPos, yCoords[nodeIndexes.get(nodeId)]];
+ sourceMatrix[count] = [xCoords[nodeIndexes.get(nodeId)], yCoords[nodeIndexes.get(nodeId)]];
+ count++;
+ });
+ }
+ standardTransformation = true;
+ }
+ if (constraints.alignmentConstraint.horizontal) {
+ let horizontalAlign = constraints.alignmentConstraint.horizontal;
+ for (let i = 0; i < horizontalAlign.length; i++) {
+ let alignmentSet = new Set();
+ horizontalAlign[i].forEach(function(nodeId) {
+ alignmentSet.add(nodeId);
+ });
+ let intersection = new Set([...alignmentSet].filter(x => fixedNodes.has(x)));
+ let yPos;
+ if (intersection.size > 0)
+ yPos = xCoords[nodeIndexes.get(intersection.values().next().value)];
+ else
+ yPos = calculateAvgPosition(alignmentSet).y;
+
+ horizontalAlign[i].forEach(function(nodeId) {
+ targetMatrix[count] = [xCoords[nodeIndexes.get(nodeId)], yPos];
+ sourceMatrix[count] = [xCoords[nodeIndexes.get(nodeId)], yCoords[nodeIndexes.get(nodeId)]];
+ count++;
+ });
+ }
+ standardTransformation = true;
+ }
+ if (constraints.relativePlacementConstraint) {
+ reflectionType = true;
+ }
+ }
+ else if (constraints.relativePlacementConstraint) { // finally check relative placement constraint
+ // find largest component in dag
+ let largestComponentSize = 0;
+ let largestComponentIndex = 0;
+ for (let i = 0; i < components.length; i++) {
+ if (components[i].length > largestComponentSize) {
+ largestComponentSize = components[i].length;
+ largestComponentIndex = i;
+ }
+ }
+ // if largest component isn't dominant, then take the votes for reflection
+ if (largestComponentSize < (dagUndirected.size / 2)) {
+ applyReflectionForRelativePlacement(constraints.relativePlacementConstraint);
+ standardTransformation = false;
+ reflectionType = false;
+ }
+ else { // use largest component for transformation
+ // construct horizontal and vertical subgraphs in the largest component
+ let subGraphOnHorizontal = new Map();
+ let subGraphOnVertical = new Map();
+ let constraintsInlargestComponent = [];
+
+ components[largestComponentIndex].forEach(function(nodeId) {
+ dag.get(nodeId).forEach(function(adjacent) {
+ if (adjacent.direction == "horizontal") {
+ if (subGraphOnHorizontal.has(nodeId)) {
+ subGraphOnHorizontal.get(nodeId).push(adjacent);
+ }
+ else {
+ subGraphOnHorizontal.set(nodeId, [adjacent]);
+ }
+ if (!subGraphOnHorizontal.has(adjacent.id)) {
+ subGraphOnHorizontal.set(adjacent.id, []);
+ }
+ constraintsInlargestComponent.push({left: nodeId, right: adjacent.id});
+ }
+ else {
+ if (subGraphOnVertical.has(nodeId)) {
+ subGraphOnVertical.get(nodeId).push(adjacent);
+ }
+ else {
+ subGraphOnVertical.set(nodeId, [adjacent]);
+ }
+ if (!subGraphOnVertical.has(adjacent.id)) {
+ subGraphOnVertical.set(adjacent.id, []);
+ }
+ constraintsInlargestComponent.push({top: nodeId, bottom: adjacent.id});
+ }
+ });
+ });
+
+ applyReflectionForRelativePlacement(constraintsInlargestComponent);
+ reflectionType = false;
+
+ // calculate appropriate positioning for subgraphs
+ let positionMapHorizontal = findAppropriatePositionForRelativePlacement(subGraphOnHorizontal, "horizontal");
+ let positionMapVertical = findAppropriatePositionForRelativePlacement(subGraphOnVertical, "vertical");
+
+ // construct source and target configuration
+ components[largestComponentIndex].forEach(function(nodeId, i) {
+ sourceMatrix[i] = [xCoords[nodeIndexes.get(nodeId)], yCoords[nodeIndexes.get(nodeId)]];
+ targetMatrix[i] = [];
+ if (positionMapHorizontal.has(nodeId)) {
+ targetMatrix[i][0] = positionMapHorizontal.get(nodeId);
+ }
+ else {
+ targetMatrix[i][0] = xCoords[nodeIndexes.get(nodeId)];
+ }
+ if (positionMapVertical.has(nodeId)) {
+ targetMatrix[i][1] = positionMapVertical.get(nodeId);
+ }
+ else {
+ targetMatrix[i][1] = yCoords[nodeIndexes.get(nodeId)];
+ }
+ });
+
+ standardTransformation = true;
+ }
+ }
+
+ // if transformation is required, then calculate and apply transformation matrix
+ if (standardTransformation) {
+ /* calculate transformation matrix */
+ let transformationMatrix;
+ let targetMatrixTranspose = Matrix.transpose(targetMatrix); // A'
+ let sourceMatrixTranspose = Matrix.transpose(sourceMatrix); // B'
+
+ // centralize transpose matrices
+ for (let i = 0; i < targetMatrixTranspose.length; i++) {
+ targetMatrixTranspose[i] = Matrix.multGamma(targetMatrixTranspose[i]);
+ sourceMatrixTranspose[i] = Matrix.multGamma(sourceMatrixTranspose[i]);
+ }
+
+ // do actual calculation for transformation matrix
+ let tempMatrix = Matrix.multMat(targetMatrixTranspose, Matrix.transpose(sourceMatrixTranspose)); // tempMatrix = A'B
+ let SVDResult = SVD.svd(tempMatrix); // SVD(A'B) = USV', svd function returns U, S and V
+ transformationMatrix = Matrix.multMat(SVDResult.V, Matrix.transpose(SVDResult.U)); // transformationMatrix = T = VU'
+
+ /* apply found transformation matrix to obtain final draft layout */
+ for (let i = 0; i < nodeIndexes.size; i++) {
+ let temp1 = [xCoords[i], yCoords[i]];
+ let temp2 = [transformationMatrix[0][0], transformationMatrix[1][0]];
+ let temp3 = [transformationMatrix[0][1], transformationMatrix[1][1]];
+ xCoords[i] = Matrix.dotProduct(temp1, temp2);
+ yCoords[i] = Matrix.dotProduct(temp1, temp3);
+ }
+
+ // applied only both alignment and rel. placement constraints exist
+ if (reflectionType) {
+ applyReflectionForRelativePlacement(constraints.relativePlacementConstraint);
+ }
+ }
+ }
+
+ if (CoSEConstants.ENFORCE_CONSTRAINTS) {
+ /**** enforce constraints on the transformed draft layout ****/
+
+ /* first enforce fixed node constraint */
+
+ if (constraints.fixedNodeConstraint && constraints.fixedNodeConstraint.length > 0) {
+ let translationAmount = { x: 0, y: 0 };
+ constraints.fixedNodeConstraint.forEach(function(nodeData, i) {
+ let posInTheory = {x: xCoords[nodeIndexes.get(nodeData.nodeId)], y: yCoords[nodeIndexes.get(nodeData.nodeId)]};
+ let posDesired = nodeData.position;
+ let posDiff = calculatePositionDiff(posDesired, posInTheory);
+ translationAmount.x += posDiff.x;
+ translationAmount.y += posDiff.y;
+ });
+ translationAmount.x /= constraints.fixedNodeConstraint.length;
+ translationAmount.y /= constraints.fixedNodeConstraint.length;
+
+ xCoords.forEach(function(value, i) {
+ xCoords[i] += translationAmount.x;
+ });
+
+ yCoords.forEach(function(value, i) {
+ yCoords[i] += translationAmount.y;
+ });
+
+ constraints.fixedNodeConstraint.forEach(function(nodeData) {
+ xCoords[nodeIndexes.get(nodeData.nodeId)] = nodeData.position.x;
+ yCoords[nodeIndexes.get(nodeData.nodeId)] = nodeData.position.y;
+ });
+ }
+
+ /* then enforce alignment constraint */
+
+ if (constraints.alignmentConstraint) {
+ if (constraints.alignmentConstraint.vertical) {
+ let xAlign = constraints.alignmentConstraint.vertical;
+ for (let i = 0; i < xAlign.length; i++) {
+ let alignmentSet = new Set();
+ xAlign[i].forEach(function(nodeId) {
+ alignmentSet.add(nodeId);
+ });
+ let intersection = new Set([...alignmentSet].filter(x => fixedNodes.has(x)));
+ let xPos;
+ if (intersection.size > 0)
+ xPos = xCoords[nodeIndexes.get(intersection.values().next().value)];
+ else
+ xPos = calculateAvgPosition(alignmentSet).x;
+
+ alignmentSet.forEach(function(nodeId) {
+ if (!fixedNodes.has(nodeId))
+ xCoords[nodeIndexes.get(nodeId)] = xPos;
+ });
+ }
+ }
+ if (constraints.alignmentConstraint.horizontal) {
+ let yAlign = constraints.alignmentConstraint.horizontal;
+ for (let i = 0; i < yAlign.length; i++) {
+ let alignmentSet = new Set();
+ yAlign[i].forEach(function(nodeId) {
+ alignmentSet.add(nodeId);
+ });
+ let intersection = new Set([...alignmentSet].filter(x => fixedNodes.has(x)));
+ let yPos;
+ if (intersection.size > 0)
+ yPos = yCoords[nodeIndexes.get(intersection.values().next().value)];
+ else
+ yPos = calculateAvgPosition(alignmentSet).y;
+
+ alignmentSet.forEach(function(nodeId) {
+ if (!fixedNodes.has(nodeId))
+ yCoords[nodeIndexes.get(nodeId)] = yPos;
+ });
+ }
+ }
+ }
+
+ /* finally enforce relative placement constraint */
+
+ if (constraints.relativePlacementConstraint) {
+ let nodeToDummyForVerticalAlignment = new Map();
+ let nodeToDummyForHorizontalAlignment = new Map();
+ let dummyToNodeForVerticalAlignment = new Map();
+ let dummyToNodeForHorizontalAlignment = new Map();
+ let dummyPositionsForVerticalAlignment = new Map();
+ let dummyPositionsForHorizontalAlignment = new Map();
+ let fixedNodesOnHorizontal = new Set();
+ let fixedNodesOnVertical = new Set();
+
+ // fill maps and sets
+ fixedNodes.forEach(function(nodeId) {
+ fixedNodesOnHorizontal.add(nodeId);
+ fixedNodesOnVertical.add(nodeId);
+ });
+
+ if (constraints.alignmentConstraint) {
+ if (constraints.alignmentConstraint.vertical) {
+ let verticalAlignment = constraints.alignmentConstraint.vertical;
+ for (let i = 0; i < verticalAlignment.length; i++) {
+ dummyToNodeForVerticalAlignment.set("dummy" + i, []);
+ verticalAlignment[i].forEach(function(nodeId) {
+ nodeToDummyForVerticalAlignment.set(nodeId, "dummy" + i);
+ dummyToNodeForVerticalAlignment.get("dummy" + i).push(nodeId);
+ if (fixedNodes.has(nodeId)) {
+ fixedNodesOnHorizontal.add("dummy" + i);
+ }
+ });
+ dummyPositionsForVerticalAlignment.set("dummy" + i, xCoords[nodeIndexes.get(verticalAlignment[i][0])]);
+ }
+ }
+ if (constraints.alignmentConstraint.horizontal) {
+ let horizontalAlignment = constraints.alignmentConstraint.horizontal;
+ for (let i = 0; i < horizontalAlignment.length; i++) {
+ dummyToNodeForHorizontalAlignment.set("dummy" + i, []);
+ horizontalAlignment[i].forEach(function(nodeId) {
+ nodeToDummyForHorizontalAlignment.set(nodeId, "dummy" + i);
+ dummyToNodeForHorizontalAlignment.get("dummy" + i).push(nodeId);
+ if (fixedNodes.has(nodeId)) {
+ fixedNodesOnVertical.add("dummy" + i);
+ }
+ });
+ dummyPositionsForHorizontalAlignment.set("dummy" + i, yCoords[nodeIndexes.get(horizontalAlignment[i][0])]);
+ }
+ }
+ }
+
+ // construct horizontal and vertical dags (subgraphs) from overall dag
+ let dagOnHorizontal = new Map();
+ let dagOnVertical = new Map();
+
+ for (let nodeId of dag.keys()) {
+ dag.get(nodeId).forEach(function(adjacent) {
+ let sourceId;
+ let targetNode;
+ if (adjacent["direction"] == "horizontal") {
+ sourceId = nodeToDummyForVerticalAlignment.get(nodeId) ? nodeToDummyForVerticalAlignment.get(nodeId) : nodeId;
+ if (nodeToDummyForVerticalAlignment.get(adjacent.id)) {
+ targetNode = {id: nodeToDummyForVerticalAlignment.get(adjacent.id), gap: adjacent.gap, direction: adjacent.direction};
+ }
+ else {
+ targetNode = adjacent;
+ }
+ if (dagOnHorizontal.has(sourceId)) {
+ dagOnHorizontal.get(sourceId).push(targetNode);
+ }
+ else {
+ dagOnHorizontal.set(sourceId, [targetNode]);
+ }
+ if (!dagOnHorizontal.has(targetNode.id)) {
+ dagOnHorizontal.set(targetNode.id, []);
+ }
+ }
+ else {
+ sourceId = nodeToDummyForHorizontalAlignment.get(nodeId) ? nodeToDummyForHorizontalAlignment.get(nodeId) : nodeId;
+ if (nodeToDummyForHorizontalAlignment.get(adjacent.id)) {
+ targetNode = {id: nodeToDummyForHorizontalAlignment.get(adjacent.id), gap: adjacent.gap, direction: adjacent.direction};
+ }
+ else {
+ targetNode = adjacent;
+ }
+ if (dagOnVertical.has(sourceId)) {
+ dagOnVertical.get(sourceId).push(targetNode);
+ }
+ else {
+ dagOnVertical.set(sourceId, [targetNode]);
+ }
+ if (!dagOnVertical.has(targetNode.id)) {
+ dagOnVertical.set(targetNode.id, []);
+ }
+ }
+ });
+ }
+
+ // find source nodes of each component in horizontal and vertical dags
+ let undirectedOnHorizontal = dagToUndirected(dagOnHorizontal);
+ let undirectedOnVertical = dagToUndirected(dagOnVertical);
+ let componentsOnHorizontal = findComponents(undirectedOnHorizontal);
+ let componentsOnVertical = findComponents(undirectedOnVertical);
+ let reversedDagOnHorizontal = dagToReversed(dagOnHorizontal);
+ let reversedDagOnVertical = dagToReversed(dagOnVertical);
+ let componentSourcesOnHorizontal = [];
+ let componentSourcesOnVertical = [];
+
+ componentsOnHorizontal.forEach(function(component, index) {
+ componentSourcesOnHorizontal[index] = [];
+ component.forEach(function(nodeId) {
+ if (reversedDagOnHorizontal.get(nodeId).length == 0) {
+ componentSourcesOnHorizontal[index].push(nodeId);
+ }
+ });
+ });
+
+ componentsOnVertical.forEach(function(component, index) {
+ componentSourcesOnVertical[index] = [];
+ component.forEach(function(nodeId) {
+ if (reversedDagOnVertical.get(nodeId).length == 0) {
+ componentSourcesOnVertical[index].push(nodeId);
+ }
+ });
+ });
+
+ // calculate appropriate positioning for subgraphs
+ let positionMapHorizontal = findAppropriatePositionForRelativePlacement(dagOnHorizontal, "horizontal", fixedNodesOnHorizontal, dummyPositionsForVerticalAlignment, componentSourcesOnHorizontal);
+ let positionMapVertical = findAppropriatePositionForRelativePlacement(dagOnVertical, "vertical", fixedNodesOnVertical, dummyPositionsForHorizontalAlignment, componentSourcesOnVertical);
+
+ // update positions of the nodes based on relative placement constraints
+ for (let key of positionMapHorizontal.keys()) {
+ if (dummyToNodeForVerticalAlignment.get(key)) {
+ dummyToNodeForVerticalAlignment.get(key).forEach(function(nodeId) {
+ xCoords[nodeIndexes.get(nodeId)] = positionMapHorizontal.get(key);
+ });
+ }
+ else {
+ xCoords[nodeIndexes.get(key)] = positionMapHorizontal.get(key);
+ }
+ }
+ for (let key of positionMapVertical.keys()) {
+ if (dummyToNodeForHorizontalAlignment.get(key)) {
+ dummyToNodeForHorizontalAlignment.get(key).forEach(function(nodeId) {
+ yCoords[nodeIndexes.get(nodeId)] = positionMapVertical.get(key);
+ });
+ }
+ else {
+ yCoords[nodeIndexes.get(key)] = positionMapVertical.get(key);
+ }
+ }
+ }
+ }
+
+ // assign new coordinates to nodes after constraint handling
+ for (let i = 0; i < allNodes.length; i++) {
+ let node = allNodes[i];
+ if (node.getChild() == null) {
+ node.setCenter(xCoords[nodeIndexes.get(node.id)], yCoords[nodeIndexes.get(node.id)]);
+ }
+ }
+};
+
+module.exports = ConstraintHandler;
\ No newline at end of file
diff --git a/node_modules/cose-base/webpack.config.js b/node_modules/cose-base/webpack.config.js
new file mode 100644
index 00000000..02d7c3c1
--- /dev/null
+++ b/node_modules/cose-base/webpack.config.js
@@ -0,0 +1,39 @@
+const path = require('path');
+const pkg = require('./package.json');
+const camelcase = require('camelcase');
+const process = require('process');
+const webpack = require('webpack');
+const env = process.env;
+const NODE_ENV = env.NODE_ENV;
+const MIN = env.MIN;
+const PROD = NODE_ENV === 'production';
+
+let config = {
+ devtool: PROD ? false : 'inline-source-map',
+ entry: './index.js',
+ output: {
+ path: path.join( __dirname ),
+ filename: 'cose-base.js',
+ library: camelcase( pkg.name ),
+ libraryTarget: 'umd',
+ globalObject: 'this'
+ },
+ module: {
+ rules: [
+ { test: /\.js$/, exclude: /node_modules/, use: 'babel-loader' }
+ ]
+ },
+ optimization: {
+ minimize: MIN ? true : false
+ },
+ externals: PROD ? {
+ 'layout-base': {
+ commonjs2: 'layout-base',
+ commonjs: 'layout-base',
+ amd: 'layout-base',
+ root: 'layoutBase'
+ }
+ } : {}
+};
+
+module.exports = config;
\ No newline at end of file
diff --git a/node_modules/cytoscape-fcose/.babelrc b/node_modules/cytoscape-fcose/.babelrc
new file mode 100644
index 00000000..002b4aa0
--- /dev/null
+++ b/node_modules/cytoscape-fcose/.babelrc
@@ -0,0 +1,3 @@
+{
+ "presets": ["env"]
+}
diff --git a/node_modules/cytoscape-fcose/.eslintignore b/node_modules/cytoscape-fcose/.eslintignore
new file mode 100644
index 00000000..07e4fe72
--- /dev/null
+++ b/node_modules/cytoscape-fcose/.eslintignore
@@ -0,0 +1 @@
+node_modules/**/*
diff --git a/node_modules/cytoscape-fcose/.eslintrc b/node_modules/cytoscape-fcose/.eslintrc
new file mode 100644
index 00000000..31d35e21
--- /dev/null
+++ b/node_modules/cytoscape-fcose/.eslintrc
@@ -0,0 +1,13 @@
+{
+ "env": {
+ "browser": true,
+ "commonjs": true,
+ "node": true,
+ "amd": true,
+ "es6": true
+ },
+ "extends": "eslint:recommended",
+ "rules": {
+ "semi": "error"
+ }
+}
diff --git a/node_modules/cytoscape-fcose/CITATION.cff b/node_modules/cytoscape-fcose/CITATION.cff
new file mode 100644
index 00000000..3c44350d
--- /dev/null
+++ b/node_modules/cytoscape-fcose/CITATION.cff
@@ -0,0 +1,31 @@
+cff-version: 1.2.0
+message: "If you use this software, please cite it as below."
+authors:
+- family-names: "Balci"
+ given-names: "Hasan"
+ orcid: "https://orcid.org/0000-0001-8319-7758"
+- family-names: "Dogrusoz"
+ given-names: "Ugur"
+ orcid: "https://orcid.org/0000-0002-7153-0784"
+title: "cytoscape.js-fcose"
+version: 2.1.0
+date-released: 2021-06-25
+url: "https://github.com/iVis-at-Bilkent/cytoscape.js-fcose"
+preferred-citation:
+ type: article
+ authors:
+ - family-names: "Balci"
+ given-names: "Hasan"
+ orcid: "https://orcid.org/0000-0001-8319-7758"
+ - family-names: "Dogrusoz"
+ given-names: "Ugur"
+ orcid: "https://orcid.org/0000-0002-7153-0784"
+ doi: "10.1109/TVCG.2021.3095303"
+ journal: "IEEE Transactions on Visualization and Computer Graphics"
+ title: "fCoSE: A Fast Compound Graph Layout Algorithm with Constraint Support"
+ issue: 12
+ volume: 28
+ start: 4582 # First page number
+ end: 4593 # Last page number
+ month: 12
+ year: 2022
diff --git a/node_modules/cytoscape-fcose/LICENSE b/node_modules/cytoscape-fcose/LICENSE
new file mode 100644
index 00000000..3552d1ca
--- /dev/null
+++ b/node_modules/cytoscape-fcose/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2018 - present, iVis-at-Bilkent.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the “Software”), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/cytoscape-fcose/README.md b/node_modules/cytoscape-fcose/README.md
new file mode 100644
index 00000000..7573ddeb
--- /dev/null
+++ b/node_modules/cytoscape-fcose/README.md
@@ -0,0 +1,236 @@
+cytoscape-fcose
+================================================================================
+
+
+## Description
+
+
+fCoSE (pron. "f-cosay", **f**ast **Co**mpound **S**pring **E**mbedder), is a faster version of our earlier compound spring embedder algorithm named [CoSE](https://github.com/cytoscape/cytoscape.js-cose-bilkent), implemented as a Cytoscape.js extension by [i-Vis Lab](http://cs.bilkent.edu.tr/~ivis/) in Bilkent University.
+
+Here are some demos: **simple**, **compound**, and **constraints**, respectively:
+<p align="center">
+<a href="https://ivis-at-bilkent.github.io/cytoscape.js-fcose/demo/demo.html" title="Simple"><img src="https://www.cs.bilkent.edu.tr/~ivis/images/demo1.png" height=42px></a> &emsp;
+<a href="https://ivis-at-bilkent.github.io/cytoscape.js-fcose/demo/demo-compound.html" title="Compound"><img src="https://www.cs.bilkent.edu.tr/~ivis/images/demo2.png" height=42px></a> &emsp;
+<a href="https://ivis-at-bilkent.github.io/cytoscape.js-fcose/demo/demo-constraint.html" title="Constraints"><img src="https://www.cs.bilkent.edu.tr/~ivis/images/demo3.png" height=42px></a>
+</p>
+
+fCoSE layout algorithm combines the speed of spectral layout with the aesthetics of force-directed layout. fCoSE runs up to 2 times as fast as CoSE while achieving similar aesthetics.
+
+<p align="center"><img src="demo/demo.gif" width="440"></p>
+
+Furthermore, fCoSE also supports a fairly rich set of constraint types (i.e., fixed position, vertical/horizontal alignment and relative placement).
+
+<p align="center"><img src="demo/incrementalConstraints.gif" width="800"></p>
+
+You can see constraint support in action in the following videos: [fixed node](https://youtu.be/vRZVlwntzGY), [alignment](https://youtu.be/O5rddJ7DteU), [relative placement](https://youtu.be/Xcm87bT50RA), [hybrid](https://youtu.be/KRAQHmnTvUA), [real life graphs](https://youtu.be/vTPy9G2ALcI). Constraints can also be added [incrementally](https://youtu.be/DTm2WmzwP4k) on a given layout.
+
+Please cite the following when you use this layout:
+
+H. Balci and U. Dogrusoz, "[fCoSE: A Fast Compound Graph Layout Algorithm with Constraint Support](https://doi.org/10.1109/TVCG.2021.3095303)," in IEEE Transactions on Visualization and Computer Graphics, 28(12), pp. 4582-4593, 2022.
+
+U. Dogrusoz, E. Giral, A. Cetintas, A. Civril and E. Demir, "[A Layout Algorithm For Undirected Compound Graphs](http://www.sciencedirect.com/science/article/pii/S0020025508004799)", Information Sciences, 179, pp. 980-994, 2009.
+
+## Dependencies
+
+ * Cytoscape.js ^3.2.0
+ * cose-base ^2.0.0
+ * cytoscape-layout-utilities.js (optional for packing disconnected components) ^1.0.0
+
+## Documentation
+
+fCoSE supports user-defined placement constraints as well as its full support for compound graphs. These constraints may be defined for simple nodes. Supported constraint types are:
+
+* **Fixed node constraint:** The user may provide *exact* desired positions for a set of nodes called *fixed nodes*. For example, in order to position node *n1* to *(x: 100, y: 200)* and node *n2* to *(x: 200, y: -300)* as a result of the layout, ```fixedNodeConstraint``` option should be set as follows:
+
+ ```js
+ fixedNodeConstraint: [{nodeId: 'n1', position: {x: 100, y: 200}},
+ {nodeId: 'n2', position: {x: 200, y: -300}}],
+ ```
+
+* **Alignment constraint:** This constraint aims to align two or more nodes (with respect to their centers) vertically or horizontally. For example, for the vertical alignment of nodes {*n1, n2, n3*} and {*n4, n5*}, and horizontal alignment of nodes {*n2, n4*} as a result of the layout, ```alignmentConstraint``` option should be set as follows:
+ ```js
+ alignmentConstraint: {vertical: [['n1', 'n2', 'n3'], ['n4', 'n5']], horizontal: [['n2', 'n4']]},
+ ```
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;***Note:** Alignment constraints in a direction must be given in most compact form. Example: ```['n1', 'n2', 'n3']``` instead of ```['n1', 'n2'], ['n1', 'n3']```.*
+
+* **Relative placement constraint:** The user may constrain the position of a node relative to another node in either vertical or horizontal direction. For example, in order to position node *n1* to be above of node *n2* by at least 100 pixels and position node *n3* to be on the left of node *n4* by at least 75 pixels as a result of the layout, ```relativePlacementConstraint``` option should be set as follows:
+
+ ```js
+ relativePlacementConstraint: [{top: 'n1', bottom: 'n2', gap: 100},
+ {left: 'n3', right: 'n4', gap: 75}],
+ ```
+ The `gap` property is optional. If it is omitted, average `idealEdgeLength` is used as the gap value.
+
+## Usage instructions
+
+Download the library:
+ * via npm: `npm install cytoscape-fcose`,
+ * via bower: `bower install cytoscape-fcose`, or
+ * via direct download in the repository (probably from a tag).
+
+Import the library as appropriate for your project:
+
+ES import:
+
+```js
+import cytoscape from 'cytoscape';
+import fcose from 'cytoscape-fcose';
+
+cytoscape.use( fcose );
+```
+
+CommonJS require:
+
+```js
+let cytoscape = require('cytoscape');
+let fcose = require('cytoscape-fcose');
+
+cytoscape.use( fcose ); // register extension
+```
+
+AMD:
+
+```js
+require(['cytoscape', 'cytoscape-fcose'], function( cytoscape, fcose ){
+ fcose( cytoscape ); // register extension
+});
+```
+
+Plain HTML/JS has the extension registered for you automatically, because no `require()` is needed. Just add the following files:
+
+```
+<script src="https://unpkg.com/layout-base/layout-base.js"></script>
+<script src="https://unpkg.com/cose-base/cose-base.js"></script>
+<script src="https://unpkg.com/cytoscape-fcose/cytoscape-fcose.js"></script>
+```
+
+
+## API
+
+When calling the layout, e.g. `cy.layout({ name: 'fcose', ... })`, the following options are supported:
+
+```js
+var defaultOptions = {
+
+ // 'draft', 'default' or 'proof'
+ // - "draft" only applies spectral layout
+ // - "default" improves the quality with incremental layout (fast cooling rate)
+ // - "proof" improves the quality with incremental layout (slow cooling rate)
+ quality: "default",
+ // Use random node positions at beginning of layout
+ // if this is set to false, then quality option must be "proof"
+ randomize: true,
+ // Whether or not to animate the layout
+ animate: true,
+ // Duration of animation in ms, if enabled
+ animationDuration: 1000,
+ // Easing of animation, if enabled
+ animationEasing: undefined,
+ // Fit the viewport to the repositioned nodes
+ fit: true,
+ // Padding around layout
+ padding: 30,
+ // Whether to include labels in node dimensions. Valid in "proof" quality
+ nodeDimensionsIncludeLabels: false,
+ // Whether or not simple nodes (non-compound nodes) are of uniform dimensions
+ uniformNodeDimensions: false,
+ // Whether to pack disconnected components - cytoscape-layout-utilities extension should be registered and initialized
+ packComponents: true,
+ // Layout step - all, transformed, enforced, cose - for debug purpose only
+ step: "all",
+
+ /* spectral layout options */
+
+ // False for random, true for greedy sampling
+ samplingType: true,
+ // Sample size to construct distance matrix
+ sampleSize: 25,
+ // Separation amount between nodes
+ nodeSeparation: 75,
+ // Power iteration tolerance
+ piTol: 0.0000001,
+
+ /* incremental layout options */
+
+ // Node repulsion (non overlapping) multiplier
+ nodeRepulsion: node => 4500,
+ // Ideal edge (non nested) length
+ idealEdgeLength: edge => 50,
+ // Divisor to compute edge forces
+ edgeElasticity: edge => 0.45,
+ // Nesting factor (multiplier) to compute ideal edge length for nested edges
+ nestingFactor: 0.1,
+ // Maximum number of iterations to perform - this is a suggested value and might be adjusted by the algorithm as required
+ numIter: 2500,
+ // For enabling tiling
+ tile: true,
+ // The comparison function to be used while sorting nodes during tiling operation.
+ // Takes the ids of 2 nodes that will be compared as a parameter and the default tiling operation is performed when this option is not set.
+ // It works similar to ``compareFunction`` parameter of ``Array.prototype.sort()``
+ // If node1 is less then node2 by some ordering criterion ``tilingCompareBy(nodeId1, nodeId2)`` must return a negative value
+ // If node1 is greater then node2 by some ordering criterion ``tilingCompareBy(nodeId1, nodeId2)`` must return a positive value
+ // If node1 is equal to node2 by some ordering criterion ``tilingCompareBy(nodeId1, nodeId2)`` must return 0
+ tilingCompareBy: undefined,
+ // Represents the amount of the vertical space to put between the zero degree members during the tiling operation(can also be a function)
+ tilingPaddingVertical: 10,
+ // Represents the amount of the horizontal space to put between the zero degree members during the tiling operation(can also be a function)
+ tilingPaddingHorizontal: 10,
+ // Gravity force (constant)
+ gravity: 0.25,
+ // Gravity range (constant) for compounds
+ gravityRangeCompound: 1.5,
+ // Gravity force (constant) for compounds
+ gravityCompound: 1.0,
+ // Gravity range (constant)
+ gravityRange: 3.8,
+ // Initial cooling factor for incremental layout
+ initialEnergyOnIncremental: 0.3,
+
+ /* constraint options */
+
+ // Fix desired nodes to predefined positions
+ // [{nodeId: 'n1', position: {x: 100, y: 200}}, {...}]
+ fixedNodeConstraint: undefined,
+ // Align desired nodes in vertical/horizontal direction
+ // {vertical: [['n1', 'n2'], [...]], horizontal: [['n2', 'n4'], [...]]}
+ alignmentConstraint: undefined,
+ // Place two nodes relatively in vertical/horizontal direction
+ // [{top: 'n1', bottom: 'n2', gap: 100}, {left: 'n3', right: 'n4', gap: 75}, {...}]
+ relativePlacementConstraint: undefined,
+
+ /* layout event callbacks */
+ ready: () => {}, // on layoutready
+ stop: () => {} // on layoutstop
+};
+```
+To be able to use `packComponents` option, `cytoscape-layout-utilities` extension should also be registered in the application.
+Packing related [options](https://github.com/iVis-at-Bilkent/cytoscape.js-layout-utilities#default-options) should be set via `cytoscape-layout-utilities` extension.
+If they are not set, fCoSE uses default options.
+
+
+## Build targets
+
+* `npm run test` : Run Mocha tests in `./test`
+* `npm run build` : Build `./src/**` into `cytoscape-fcose.js`
+* `npm run watch` : Automatically build on changes with live reloading (N.b. you must already have an HTTP server running)
+* `npm run dev` : Automatically build on changes with live reloading with webpack dev server
+* `npm run lint` : Run eslint on the source
+
+N.b. all builds use babel, so modern ES features can be used in the `src`.
+
+
+## Publishing instructions
+
+This project is set up to automatically be published to npm and bower. To publish:
+
+1. Build the extension : `npm run build:release`
+1. Commit the build : `git commit -am "Build for release"`
+1. Bump the version number and tag: `npm version major|minor|patch`
+1. Push to origin: `git push && git push --tags`
+1. Publish to npm: `npm publish .`
+1. If publishing to bower for the first time, you'll need to run `bower register cytoscape-fcose https://github.com/iVis-at-Bilkent/cytoscape.js-fcose.git`
+1. [Make a new release](https://github.com/iVis-at-Bilkent/cytoscape.js-fcose/releases/new) for Zenodo.
+
+## Team
+
+ * [Hasan Balcı](https://github.com/hasanbalci) and [Ugur Dogrusoz](https://github.com/ugurdogrusoz) of [i-Vis at Bilkent University](http://www.cs.bilkent.edu.tr/~ivis)
diff --git a/node_modules/cytoscape-fcose/bower.json b/node_modules/cytoscape-fcose/bower.json
new file mode 100644
index 00000000..a30ea796
--- /dev/null
+++ b/node_modules/cytoscape-fcose/bower.json
@@ -0,0 +1,25 @@
+{
+ "name": "cytoscape-fcose",
+ "description": "The fCoSE layout for Cytoscape.js by Bilkent with fast compound node placement",
+ "main": "cytoscape-fcose.js",
+ "dependencies": {
+ "cytoscape": "^3.2.0",
+ "cose-base": "^1.0.0"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/iVis-at-Bilkent/cytoscape.js-fcose.git"
+ },
+ "ignore": [
+ "**/.*",
+ "node_modules",
+ "bower_components",
+ "test",
+ "tests"
+ ],
+ "keywords": [
+ "cytoscape",
+ "cytoscape-extension"
+ ],
+ "license": "MIT"
+}
diff --git a/node_modules/cytoscape-fcose/cytoscape-fcose.js b/node_modules/cytoscape-fcose/cytoscape-fcose.js
new file mode 100644
index 00000000..9ad4f6ec
--- /dev/null
+++ b/node_modules/cytoscape-fcose/cytoscape-fcose.js
@@ -0,0 +1,1549 @@
+(function webpackUniversalModuleDefinition(root, factory) {
+ if(typeof exports === 'object' && typeof module === 'object')
+ module.exports = factory(require("cose-base"));
+ else if(typeof define === 'function' && define.amd)
+ define(["cose-base"], factory);
+ else if(typeof exports === 'object')
+ exports["cytoscapeFcose"] = factory(require("cose-base"));
+ else
+ root["cytoscapeFcose"] = factory(root["coseBase"]);
+})(this, function(__WEBPACK_EXTERNAL_MODULE__140__) {
+return /******/ (() => { // webpackBootstrap
+/******/ "use strict";
+/******/ var __webpack_modules__ = ({
+
+/***/ 658:
+/***/ ((module) => {
+
+
+
+// Simple, internal Object.assign() polyfill for options objects etc.
+
+module.exports = Object.assign != null ? Object.assign.bind(Object) : function (tgt) {
+ for (var _len = arguments.length, srcs = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
+ srcs[_key - 1] = arguments[_key];
+ }
+
+ srcs.forEach(function (src) {
+ Object.keys(src).forEach(function (k) {
+ return tgt[k] = src[k];
+ });
+ });
+
+ return tgt;
+};
+
+/***/ }),
+
+/***/ 548:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+
+
+var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
+
+/*
+ * Auxiliary functions
+ */
+
+var LinkedList = __webpack_require__(140).layoutBase.LinkedList;
+
+var auxiliary = {};
+
+// get the top most nodes
+auxiliary.getTopMostNodes = function (nodes) {
+ var nodesMap = {};
+ for (var i = 0; i < nodes.length; i++) {
+ nodesMap[nodes[i].id()] = true;
+ }
+ var roots = nodes.filter(function (ele, i) {
+ if (typeof ele === "number") {
+ ele = i;
+ }
+ var parent = ele.parent()[0];
+ while (parent != null) {
+ if (nodesMap[parent.id()]) {
+ return false;
+ }
+ parent = parent.parent()[0];
+ }
+ return true;
+ });
+
+ return roots;
+};
+
+// find disconnected components and create dummy nodes that connect them
+auxiliary.connectComponents = function (cy, eles, topMostNodes, dummyNodes) {
+ var queue = new LinkedList();
+ var visited = new Set();
+ var visitedTopMostNodes = [];
+ var currentNeighbor = void 0;
+ var minDegreeNode = void 0;
+ var minDegree = void 0;
+
+ var isConnected = false;
+ var count = 1;
+ var nodesConnectedToDummy = [];
+ var components = [];
+
+ var _loop = function _loop() {
+ var cmpt = cy.collection();
+ components.push(cmpt);
+
+ var currentNode = topMostNodes[0];
+ var childrenOfCurrentNode = cy.collection();
+ childrenOfCurrentNode.merge(currentNode).merge(currentNode.descendants().intersection(eles));
+ visitedTopMostNodes.push(currentNode);
+
+ childrenOfCurrentNode.forEach(function (node) {
+ queue.push(node);
+ visited.add(node);
+ cmpt.merge(node);
+ });
+
+ var _loop2 = function _loop2() {
+ currentNode = queue.shift();
+
+ // Traverse all neighbors of this node
+ var neighborNodes = cy.collection();
+ currentNode.neighborhood().nodes().forEach(function (node) {
+ if (eles.intersection(currentNode.edgesWith(node)).length > 0) {
+ neighborNodes.merge(node);
+ }
+ });
+
+ for (var i = 0; i < neighborNodes.length; i++) {
+ var neighborNode = neighborNodes[i];
+ currentNeighbor = topMostNodes.intersection(neighborNode.union(neighborNode.ancestors()));
+ if (currentNeighbor != null && !visited.has(currentNeighbor[0])) {
+ var childrenOfNeighbor = currentNeighbor.union(currentNeighbor.descendants());
+
+ childrenOfNeighbor.forEach(function (node) {
+ queue.push(node);
+ visited.add(node);
+ cmpt.merge(node);
+ if (topMostNodes.has(node)) {
+ visitedTopMostNodes.push(node);
+ }
+ });
+ }
+ }
+ };
+
+ while (queue.length != 0) {
+ _loop2();
+ }
+
+ cmpt.forEach(function (node) {
+ eles.intersection(node.connectedEdges()).forEach(function (e) {
+ // connectedEdges() usually cached
+ if (cmpt.has(e.source()) && cmpt.has(e.target())) {
+ // has() is cheap
+ cmpt.merge(e);
+ }
+ });
+ });
+
+ if (visitedTopMostNodes.length == topMostNodes.length) {
+ isConnected = true;
+ }
+
+ if (!isConnected || isConnected && count > 1) {
+ minDegreeNode = visitedTopMostNodes[0];
+ minDegree = minDegreeNode.connectedEdges().length;
+ visitedTopMostNodes.forEach(function (node) {
+ if (node.connectedEdges().length < minDegree) {
+ minDegree = node.connectedEdges().length;
+ minDegreeNode = node;
+ }
+ });
+ nodesConnectedToDummy.push(minDegreeNode.id());
+ // TO DO: Check efficiency of this part
+ var temp = cy.collection();
+ temp.merge(visitedTopMostNodes[0]);
+ visitedTopMostNodes.forEach(function (node) {
+ temp.merge(node);
+ });
+ visitedTopMostNodes = [];
+ topMostNodes = topMostNodes.difference(temp);
+ count++;
+ }
+ };
+
+ do {
+ _loop();
+ } while (!isConnected);
+
+ if (dummyNodes) {
+ if (nodesConnectedToDummy.length > 0) {
+ dummyNodes.set('dummy' + (dummyNodes.size + 1), nodesConnectedToDummy);
+ }
+ }
+ return components;
+};
+
+// relocates componentResult to originalCenter if there is no fixedNodeConstraint
+auxiliary.relocateComponent = function (originalCenter, componentResult, options) {
+ if (!options.fixedNodeConstraint) {
+ var minXCoord = Number.POSITIVE_INFINITY;
+ var maxXCoord = Number.NEGATIVE_INFINITY;
+ var minYCoord = Number.POSITIVE_INFINITY;
+ var maxYCoord = Number.NEGATIVE_INFINITY;
+ if (options.quality == "draft") {
+ // calculate current bounding box
+ var _iteratorNormalCompletion = true;
+ var _didIteratorError = false;
+ var _iteratorError = undefined;
+
+ try {
+ for (var _iterator = componentResult.nodeIndexes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+ var _ref = _step.value;
+
+ var _ref2 = _slicedToArray(_ref, 2);
+
+ var key = _ref2[0];
+ var value = _ref2[1];
+
+ var cyNode = options.cy.getElementById(key);
+ if (cyNode) {
+ var nodeBB = cyNode.boundingBox();
+ var leftX = componentResult.xCoords[value] - nodeBB.w / 2;
+ var rightX = componentResult.xCoords[value] + nodeBB.w / 2;
+ var topY = componentResult.yCoords[value] - nodeBB.h / 2;
+ var bottomY = componentResult.yCoords[value] + nodeBB.h / 2;
+
+ if (leftX < minXCoord) minXCoord = leftX;
+ if (rightX > maxXCoord) maxXCoord = rightX;
+ if (topY < minYCoord) minYCoord = topY;
+ if (bottomY > maxYCoord) maxYCoord = bottomY;
+ }
+ }
+ // find difference between current and original center
+ } catch (err) {
+ _didIteratorError = true;
+ _iteratorError = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion && _iterator.return) {
+ _iterator.return();
+ }
+ } finally {
+ if (_didIteratorError) {
+ throw _iteratorError;
+ }
+ }
+ }
+
+ var diffOnX = originalCenter.x - (maxXCoord + minXCoord) / 2;
+ var diffOnY = originalCenter.y - (maxYCoord + minYCoord) / 2;
+ // move component to original center
+ componentResult.xCoords = componentResult.xCoords.map(function (x) {
+ return x + diffOnX;
+ });
+ componentResult.yCoords = componentResult.yCoords.map(function (y) {
+ return y + diffOnY;
+ });
+ } else {
+ // calculate current bounding box
+ Object.keys(componentResult).forEach(function (item) {
+ var node = componentResult[item];
+ var leftX = node.getRect().x;
+ var rightX = node.getRect().x + node.getRect().width;
+ var topY = node.getRect().y;
+ var bottomY = node.getRect().y + node.getRect().height;
+
+ if (leftX < minXCoord) minXCoord = leftX;
+ if (rightX > maxXCoord) maxXCoord = rightX;
+ if (topY < minYCoord) minYCoord = topY;
+ if (bottomY > maxYCoord) maxYCoord = bottomY;
+ });
+ // find difference between current and original center
+ var _diffOnX = originalCenter.x - (maxXCoord + minXCoord) / 2;
+ var _diffOnY = originalCenter.y - (maxYCoord + minYCoord) / 2;
+ // move component to original center
+ Object.keys(componentResult).forEach(function (item) {
+ var node = componentResult[item];
+ node.setCenter(node.getCenterX() + _diffOnX, node.getCenterY() + _diffOnY);
+ });
+ }
+ }
+};
+
+auxiliary.calcBoundingBox = function (parentNode, xCoords, yCoords, nodeIndexes) {
+ // calculate bounds
+ var left = Number.MAX_SAFE_INTEGER;
+ var right = Number.MIN_SAFE_INTEGER;
+ var top = Number.MAX_SAFE_INTEGER;
+ var bottom = Number.MIN_SAFE_INTEGER;
+ var nodeLeft = void 0;
+ var nodeRight = void 0;
+ var nodeTop = void 0;
+ var nodeBottom = void 0;
+
+ var nodes = parentNode.descendants().not(":parent");
+ var s = nodes.length;
+ for (var i = 0; i < s; i++) {
+ var node = nodes[i];
+
+ nodeLeft = xCoords[nodeIndexes.get(node.id())] - node.width() / 2;
+ nodeRight = xCoords[nodeIndexes.get(node.id())] + node.width() / 2;
+ nodeTop = yCoords[nodeIndexes.get(node.id())] - node.height() / 2;
+ nodeBottom = yCoords[nodeIndexes.get(node.id())] + node.height() / 2;
+
+ if (left > nodeLeft) {
+ left = nodeLeft;
+ }
+
+ if (right < nodeRight) {
+ right = nodeRight;
+ }
+
+ if (top > nodeTop) {
+ top = nodeTop;
+ }
+
+ if (bottom < nodeBottom) {
+ bottom = nodeBottom;
+ }
+ }
+
+ var boundingBox = {};
+ boundingBox.topLeftX = left;
+ boundingBox.topLeftY = top;
+ boundingBox.width = right - left;
+ boundingBox.height = bottom - top;
+ return boundingBox;
+};
+
+// This function finds and returns parent nodes whose all children are hidden
+auxiliary.calcParentsWithoutChildren = function (cy, eles) {
+ var parentsWithoutChildren = cy.collection();
+ eles.nodes(':parent').forEach(function (parent) {
+ var check = false;
+ parent.children().forEach(function (child) {
+ if (child.css('display') != 'none') {
+ check = true;
+ }
+ });
+ if (!check) {
+ parentsWithoutChildren.merge(parent);
+ }
+ });
+
+ return parentsWithoutChildren;
+};
+
+module.exports = auxiliary;
+
+/***/ }),
+
+/***/ 816:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+
+
+/**
+ The implementation of the postprocessing part that applies CoSE layout over the spectral layout
+*/
+
+var aux = __webpack_require__(548);
+var CoSELayout = __webpack_require__(140).CoSELayout;
+var CoSENode = __webpack_require__(140).CoSENode;
+var PointD = __webpack_require__(140).layoutBase.PointD;
+var DimensionD = __webpack_require__(140).layoutBase.DimensionD;
+var LayoutConstants = __webpack_require__(140).layoutBase.LayoutConstants;
+var FDLayoutConstants = __webpack_require__(140).layoutBase.FDLayoutConstants;
+var CoSEConstants = __webpack_require__(140).CoSEConstants;
+
+// main function that cose layout is processed
+var coseLayout = function coseLayout(options, spectralResult) {
+
+ var cy = options.cy;
+ var eles = options.eles;
+ var nodes = eles.nodes();
+ var edges = eles.edges();
+
+ var nodeIndexes = void 0;
+ var xCoords = void 0;
+ var yCoords = void 0;
+ var idToLNode = {};
+
+ if (options.randomize) {
+ nodeIndexes = spectralResult["nodeIndexes"];
+ xCoords = spectralResult["xCoords"];
+ yCoords = spectralResult["yCoords"];
+ }
+
+ var isFn = function isFn(fn) {
+ return typeof fn === 'function';
+ };
+
+ var optFn = function optFn(opt, ele) {
+ if (isFn(opt)) {
+ return opt(ele);
+ } else {
+ return opt;
+ }
+ };
+
+ /**** Postprocessing functions ****/
+
+ var parentsWithoutChildren = aux.calcParentsWithoutChildren(cy, eles);
+
+ // transfer cytoscape nodes to cose nodes
+ var processChildrenList = function processChildrenList(parent, children, layout, options) {
+ var size = children.length;
+ for (var i = 0; i < size; i++) {
+ var theChild = children[i];
+ var children_of_children = null;
+ if (theChild.intersection(parentsWithoutChildren).length == 0) {
+ children_of_children = theChild.children();
+ }
+ var theNode = void 0;
+
+ var dimensions = theChild.layoutDimensions({
+ nodeDimensionsIncludeLabels: options.nodeDimensionsIncludeLabels
+ });
+
+ if (theChild.outerWidth() != null && theChild.outerHeight() != null) {
+ if (options.randomize) {
+ if (!theChild.isParent()) {
+ theNode = parent.add(new CoSENode(layout.graphManager, new PointD(xCoords[nodeIndexes.get(theChild.id())] - dimensions.w / 2, yCoords[nodeIndexes.get(theChild.id())] - dimensions.h / 2), new DimensionD(parseFloat(dimensions.w), parseFloat(dimensions.h))));
+ } else {
+ var parentInfo = aux.calcBoundingBox(theChild, xCoords, yCoords, nodeIndexes);
+ if (theChild.intersection(parentsWithoutChildren).length == 0) {
+ theNode = parent.add(new CoSENode(layout.graphManager, new PointD(parentInfo.topLeftX, parentInfo.topLeftY), new DimensionD(parentInfo.width, parentInfo.height)));
+ } else {
+ // for the parentsWithoutChildren
+ theNode = parent.add(new CoSENode(layout.graphManager, new PointD(parentInfo.topLeftX, parentInfo.topLeftY), new DimensionD(parseFloat(dimensions.w), parseFloat(dimensions.h))));
+ }
+ }
+ } else {
+ theNode = parent.add(new CoSENode(layout.graphManager, new PointD(theChild.position('x') - dimensions.w / 2, theChild.position('y') - dimensions.h / 2), new DimensionD(parseFloat(dimensions.w), parseFloat(dimensions.h))));
+ }
+ } else {
+ theNode = parent.add(new CoSENode(this.graphManager));
+ }
+ // Attach id to the layout node and repulsion value
+ theNode.id = theChild.data("id");
+ theNode.nodeRepulsion = optFn(options.nodeRepulsion, theChild);
+ // Attach the paddings of cy node to layout node
+ theNode.paddingLeft = parseInt(theChild.css('padding'));
+ theNode.paddingTop = parseInt(theChild.css('padding'));
+ theNode.paddingRight = parseInt(theChild.css('padding'));
+ theNode.paddingBottom = parseInt(theChild.css('padding'));
+
+ //Attach the label properties to both compound and simple nodes if labels will be included in node dimensions
+ //These properties will be used while updating bounds of compounds during iterations or tiling
+ //and will be used for simple nodes while transferring final positions to cytoscape
+ if (options.nodeDimensionsIncludeLabels) {
+ theNode.labelWidth = theChild.boundingBox({ includeLabels: true, includeNodes: false, includeOverlays: false }).w;
+ theNode.labelHeight = theChild.boundingBox({ includeLabels: true, includeNodes: false, includeOverlays: false }).h;
+ theNode.labelPosVertical = theChild.css("text-valign");
+ theNode.labelPosHorizontal = theChild.css("text-halign");
+ }
+
+ // Map the layout node
+ idToLNode[theChild.data("id")] = theNode;
+
+ if (isNaN(theNode.rect.x)) {
+ theNode.rect.x = 0;
+ }
+
+ if (isNaN(theNode.rect.y)) {
+ theNode.rect.y = 0;
+ }
+
+ if (children_of_children != null && children_of_children.length > 0) {
+ var theNewGraph = void 0;
+ theNewGraph = layout.getGraphManager().add(layout.newGraph(), theNode);
+ processChildrenList(theNewGraph, children_of_children, layout, options);
+ }
+ }
+ };
+
+ // transfer cytoscape edges to cose edges
+ var processEdges = function processEdges(layout, gm, edges) {
+ var idealLengthTotal = 0;
+ var edgeCount = 0;
+ for (var i = 0; i < edges.length; i++) {
+ var edge = edges[i];
+ var sourceNode = idToLNode[edge.data("source")];
+ var targetNode = idToLNode[edge.data("target")];
+ if (sourceNode && targetNode && sourceNode !== targetNode && sourceNode.getEdgesBetween(targetNode).length == 0) {
+ var e1 = gm.add(layout.newEdge(), sourceNode, targetNode);
+ e1.id = edge.id();
+ e1.idealLength = optFn(options.idealEdgeLength, edge);
+ e1.edgeElasticity = optFn(options.edgeElasticity, edge);
+ idealLengthTotal += e1.idealLength;
+ edgeCount++;
+ }
+ }
+ // we need to update the ideal edge length constant with the avg. ideal length value after processing edges
+ // in case there is no edge, use other options
+ if (options.idealEdgeLength != null) {
+ if (edgeCount > 0) CoSEConstants.DEFAULT_EDGE_LENGTH = FDLayoutConstants.DEFAULT_EDGE_LENGTH = idealLengthTotal / edgeCount;else if (!isFn(options.idealEdgeLength)) // in case there is no edge, but option gives a value to use
+ CoSEConstants.DEFAULT_EDGE_LENGTH = FDLayoutConstants.DEFAULT_EDGE_LENGTH = options.idealEdgeLength;else // in case there is no edge and we cannot get a value from option (because it's a function)
+ CoSEConstants.DEFAULT_EDGE_LENGTH = FDLayoutConstants.DEFAULT_EDGE_LENGTH = 50;
+ // we need to update these constant values based on the ideal edge length constant
+ CoSEConstants.MIN_REPULSION_DIST = FDLayoutConstants.MIN_REPULSION_DIST = FDLayoutConstants.DEFAULT_EDGE_LENGTH / 10.0;
+ CoSEConstants.DEFAULT_RADIAL_SEPARATION = FDLayoutConstants.DEFAULT_EDGE_LENGTH;
+ }
+ };
+
+ // transfer cytoscape constraints to cose layout
+ var processConstraints = function processConstraints(layout, options) {
+ // get nodes to be fixed
+ if (options.fixedNodeConstraint) {
+ layout.constraints["fixedNodeConstraint"] = options.fixedNodeConstraint;
+ }
+ // get nodes to be aligned
+ if (options.alignmentConstraint) {
+ layout.constraints["alignmentConstraint"] = options.alignmentConstraint;
+ }
+ // get nodes to be relatively placed
+ if (options.relativePlacementConstraint) {
+ layout.constraints["relativePlacementConstraint"] = options.relativePlacementConstraint;
+ }
+ };
+
+ /**** Apply postprocessing ****/
+ if (options.nestingFactor != null) CoSEConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = options.nestingFactor;
+ if (options.gravity != null) CoSEConstants.DEFAULT_GRAVITY_STRENGTH = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH = options.gravity;
+ if (options.numIter != null) CoSEConstants.MAX_ITERATIONS = FDLayoutConstants.MAX_ITERATIONS = options.numIter;
+ if (options.gravityRange != null) CoSEConstants.DEFAULT_GRAVITY_RANGE_FACTOR = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR = options.gravityRange;
+ if (options.gravityCompound != null) CoSEConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = options.gravityCompound;
+ if (options.gravityRangeCompound != null) CoSEConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = options.gravityRangeCompound;
+ if (options.initialEnergyOnIncremental != null) CoSEConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = options.initialEnergyOnIncremental;
+
+ if (options.tilingCompareBy != null) CoSEConstants.TILING_COMPARE_BY = options.tilingCompareBy;
+
+ if (options.quality == 'proof') LayoutConstants.QUALITY = 2;else LayoutConstants.QUALITY = 0;
+
+ CoSEConstants.NODE_DIMENSIONS_INCLUDE_LABELS = FDLayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = options.nodeDimensionsIncludeLabels;
+ CoSEConstants.DEFAULT_INCREMENTAL = FDLayoutConstants.DEFAULT_INCREMENTAL = LayoutConstants.DEFAULT_INCREMENTAL = !options.randomize;
+ CoSEConstants.ANIMATE = FDLayoutConstants.ANIMATE = LayoutConstants.ANIMATE = options.animate;
+ CoSEConstants.TILE = options.tile;
+ CoSEConstants.TILING_PADDING_VERTICAL = typeof options.tilingPaddingVertical === 'function' ? options.tilingPaddingVertical.call() : options.tilingPaddingVertical;
+ CoSEConstants.TILING_PADDING_HORIZONTAL = typeof options.tilingPaddingHorizontal === 'function' ? options.tilingPaddingHorizontal.call() : options.tilingPaddingHorizontal;
+
+ CoSEConstants.DEFAULT_INCREMENTAL = FDLayoutConstants.DEFAULT_INCREMENTAL = LayoutConstants.DEFAULT_INCREMENTAL = true;
+ CoSEConstants.PURE_INCREMENTAL = !options.randomize;
+ LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES = options.uniformNodeDimensions;
+
+ // This part is for debug/demo purpose
+ if (options.step == "transformed") {
+ CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = true;
+ CoSEConstants.ENFORCE_CONSTRAINTS = false;
+ CoSEConstants.APPLY_LAYOUT = false;
+ }
+ if (options.step == "enforced") {
+ CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = false;
+ CoSEConstants.ENFORCE_CONSTRAINTS = true;
+ CoSEConstants.APPLY_LAYOUT = false;
+ }
+ if (options.step == "cose") {
+ CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = false;
+ CoSEConstants.ENFORCE_CONSTRAINTS = false;
+ CoSEConstants.APPLY_LAYOUT = true;
+ }
+ if (options.step == "all") {
+ if (options.randomize) CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = true;else CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = false;
+ CoSEConstants.ENFORCE_CONSTRAINTS = true;
+ CoSEConstants.APPLY_LAYOUT = true;
+ }
+
+ if (options.fixedNodeConstraint || options.alignmentConstraint || options.relativePlacementConstraint) {
+ CoSEConstants.TREE_REDUCTION_ON_INCREMENTAL = false;
+ } else {
+ CoSEConstants.TREE_REDUCTION_ON_INCREMENTAL = true;
+ }
+
+ var coseLayout = new CoSELayout();
+ var gm = coseLayout.newGraphManager();
+
+ processChildrenList(gm.addRoot(), aux.getTopMostNodes(nodes), coseLayout, options);
+ processEdges(coseLayout, gm, edges);
+ processConstraints(coseLayout, options);
+
+ coseLayout.runLayout();
+
+ return idToLNode;
+};
+
+module.exports = { coseLayout: coseLayout };
+
+/***/ }),
+
+/***/ 212:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+/**
+ The implementation of the fcose layout algorithm
+*/
+
+var assign = __webpack_require__(658);
+var aux = __webpack_require__(548);
+
+var _require = __webpack_require__(657),
+ spectralLayout = _require.spectralLayout;
+
+var _require2 = __webpack_require__(816),
+ coseLayout = _require2.coseLayout;
+
+var defaults = Object.freeze({
+
+ // 'draft', 'default' or 'proof'
+ // - 'draft' only applies spectral layout
+ // - 'default' improves the quality with subsequent CoSE layout (fast cooling rate)
+ // - 'proof' improves the quality with subsequent CoSE layout (slow cooling rate)
+ quality: "default",
+ // Use random node positions at beginning of layout
+ // if this is set to false, then quality option must be "proof"
+ randomize: true,
+ // Whether or not to animate the layout
+ animate: true,
+ // Duration of animation in ms, if enabled
+ animationDuration: 1000,
+ // Easing of animation, if enabled
+ animationEasing: undefined,
+ // Fit the viewport to the repositioned nodes
+ fit: true,
+ // Padding around layout
+ padding: 30,
+ // Whether to include labels in node dimensions. Valid in "proof" quality
+ nodeDimensionsIncludeLabels: false,
+ // Whether or not simple nodes (non-compound nodes) are of uniform dimensions
+ uniformNodeDimensions: false,
+ // Whether to pack disconnected components - valid only if randomize: true
+ packComponents: true,
+ // Layout step - all, transformed, enforced, cose - for debug purpose only
+ step: "all",
+
+ /* spectral layout options */
+
+ // False for random, true for greedy
+ samplingType: true,
+ // Sample size to construct distance matrix
+ sampleSize: 25,
+ // Separation amount between nodes
+ nodeSeparation: 75,
+ // Power iteration tolerance
+ piTol: 0.0000001,
+
+ /* CoSE layout options */
+
+ // Node repulsion (non overlapping) multiplier
+ nodeRepulsion: function nodeRepulsion(node) {
+ return 4500;
+ },
+ // Ideal edge (non nested) length
+ idealEdgeLength: function idealEdgeLength(edge) {
+ return 50;
+ },
+ // Divisor to compute edge forces
+ edgeElasticity: function edgeElasticity(edge) {
+ return 0.45;
+ },
+ // Nesting factor (multiplier) to compute ideal edge length for nested edges
+ nestingFactor: 0.1,
+ // Gravity force (constant)
+ gravity: 0.25,
+ // Maximum number of iterations to perform
+ numIter: 2500,
+ // For enabling tiling
+ tile: true,
+ // The function that specifies the criteria for comparing nodes while sorting them during tiling operation.
+ // Takes the node id as a parameter and the default tiling operation is perfomed when this option is not set.
+ tilingCompareBy: undefined,
+ // Represents the amount of the vertical space to put between the zero degree members during the tiling operation(can also be a function)
+ tilingPaddingVertical: 10,
+ // Represents the amount of the horizontal space to put between the zero degree members during the tiling operation(can also be a function)
+ tilingPaddingHorizontal: 10,
+ // Gravity range (constant) for compounds
+ gravityRangeCompound: 1.5,
+ // Gravity force (constant) for compounds
+ gravityCompound: 1.0,
+ // Gravity range (constant)
+ gravityRange: 3.8,
+ // Initial cooling factor for incremental layout
+ initialEnergyOnIncremental: 0.3,
+
+ /* constraint options */
+
+ // Fix required nodes to predefined positions
+ // [{nodeId: 'n1', position: {x: 100, y: 200}, {...}]
+ fixedNodeConstraint: undefined,
+ // Align required nodes in vertical/horizontal direction
+ // {vertical: [['n1', 'n2')], ['n3', 'n4']], horizontal: ['n2', 'n4']}
+ alignmentConstraint: undefined,
+ // Place two nodes relatively in vertical/horizontal direction
+ // [{top: 'n1', bottom: 'n2', gap: 100}, {left: 'n3', right: 'n4', gap: 75}]
+ relativePlacementConstraint: undefined,
+
+ /* layout event callbacks */
+ ready: function ready() {}, // on layoutready
+ stop: function stop() {} // on layoutstop
+});
+
+var Layout = function () {
+ function Layout(options) {
+ _classCallCheck(this, Layout);
+
+ this.options = assign({}, defaults, options);
+ }
+
+ _createClass(Layout, [{
+ key: 'run',
+ value: function run() {
+ var layout = this;
+ var options = this.options;
+ var cy = options.cy;
+ var eles = options.eles;
+
+ var spectralResult = [];
+ var xCoords = void 0;
+ var yCoords = void 0;
+ var coseResult = [];
+ var components = void 0;
+ var componentCenters = [];
+
+ // basic validity check for constraint inputs
+ if (options.fixedNodeConstraint && (!Array.isArray(options.fixedNodeConstraint) || options.fixedNodeConstraint.length == 0)) {
+ options.fixedNodeConstraint = undefined;
+ }
+
+ if (options.alignmentConstraint) {
+ if (options.alignmentConstraint.vertical && (!Array.isArray(options.alignmentConstraint.vertical) || options.alignmentConstraint.vertical.length == 0)) {
+ options.alignmentConstraint.vertical = undefined;
+ }
+ if (options.alignmentConstraint.horizontal && (!Array.isArray(options.alignmentConstraint.horizontal) || options.alignmentConstraint.horizontal.length == 0)) {
+ options.alignmentConstraint.horizontal = undefined;
+ }
+ }
+
+ if (options.relativePlacementConstraint && (!Array.isArray(options.relativePlacementConstraint) || options.relativePlacementConstraint.length == 0)) {
+ options.relativePlacementConstraint = undefined;
+ }
+
+ // if any constraint exists, set some options
+ var constraintExist = options.fixedNodeConstraint || options.alignmentConstraint || options.relativePlacementConstraint;
+ if (constraintExist) {
+ // constraints work with these options
+ options.tile = false;
+ options.packComponents = false;
+ }
+
+ // decide component packing is enabled or not
+ var layUtil = void 0;
+ var packingEnabled = false;
+ if (cy.layoutUtilities && options.packComponents) {
+ layUtil = cy.layoutUtilities("get");
+ if (!layUtil) layUtil = cy.layoutUtilities();
+ packingEnabled = true;
+ }
+
+ if (eles.nodes().length > 0) {
+ // if packing is not enabled, perform layout on the whole graph
+ if (!packingEnabled) {
+ // store component center
+ var boundingBox = options.eles.boundingBox();
+ componentCenters.push({ x: boundingBox.x1 + boundingBox.w / 2, y: boundingBox.y1 + boundingBox.h / 2 });
+ // apply spectral layout
+ if (options.randomize) {
+ var result = spectralLayout(options);
+ spectralResult.push(result);
+ }
+ // apply cose layout as postprocessing
+ if (options.quality == "default" || options.quality == "proof") {
+ coseResult.push(coseLayout(options, spectralResult[0]));
+ aux.relocateComponent(componentCenters[0], coseResult[0], options); // relocate center to original position
+ } else {
+ aux.relocateComponent(componentCenters[0], spectralResult[0], options); // relocate center to original position
+ }
+ } else {
+ // packing is enabled
+ var topMostNodes = aux.getTopMostNodes(options.eles.nodes());
+ components = aux.connectComponents(cy, options.eles, topMostNodes);
+ // store component centers
+ components.forEach(function (component) {
+ var boundingBox = component.boundingBox();
+ componentCenters.push({ x: boundingBox.x1 + boundingBox.w / 2, y: boundingBox.y1 + boundingBox.h / 2 });
+ });
+
+ //send each component to spectral layout if randomized
+ if (options.randomize) {
+ components.forEach(function (component) {
+ options.eles = component;
+ spectralResult.push(spectralLayout(options));
+ });
+ }
+
+ if (options.quality == "default" || options.quality == "proof") {
+ var toBeTiledNodes = cy.collection();
+ if (options.tile) {
+ // behave nodes to be tiled as one component
+ var nodeIndexes = new Map();
+ var _xCoords = [];
+ var _yCoords = [];
+ var count = 0;
+ var tempSpectralResult = { nodeIndexes: nodeIndexes, xCoords: _xCoords, yCoords: _yCoords };
+ var indexesToBeDeleted = [];
+ components.forEach(function (component, index) {
+ if (component.edges().length == 0) {
+ component.nodes().forEach(function (node, i) {
+ toBeTiledNodes.merge(component.nodes()[i]);
+ if (!node.isParent()) {
+ tempSpectralResult.nodeIndexes.set(component.nodes()[i].id(), count++);
+ tempSpectralResult.xCoords.push(component.nodes()[0].position().x);
+ tempSpectralResult.yCoords.push(component.nodes()[0].position().y);
+ }
+ });
+ indexesToBeDeleted.push(index);
+ }
+ });
+ if (toBeTiledNodes.length > 1) {
+ var _boundingBox = toBeTiledNodes.boundingBox();
+ componentCenters.push({ x: _boundingBox.x1 + _boundingBox.w / 2, y: _boundingBox.y1 + _boundingBox.h / 2 });
+ components.push(toBeTiledNodes);
+ spectralResult.push(tempSpectralResult);
+ for (var i = indexesToBeDeleted.length - 1; i >= 0; i--) {
+ components.splice(indexesToBeDeleted[i], 1);
+ spectralResult.splice(indexesToBeDeleted[i], 1);
+ componentCenters.splice(indexesToBeDeleted[i], 1);
+ };
+ }
+ }
+ components.forEach(function (component, index) {
+ // send each component to cose layout
+ options.eles = component;
+ coseResult.push(coseLayout(options, spectralResult[index]));
+ aux.relocateComponent(componentCenters[index], coseResult[index], options); // relocate center to original position
+ });
+ } else {
+ components.forEach(function (component, index) {
+ aux.relocateComponent(componentCenters[index], spectralResult[index], options); // relocate center to original position
+ });
+ }
+
+ // packing
+ var componentsEvaluated = new Set();
+ if (components.length > 1) {
+ var subgraphs = [];
+ var hiddenEles = eles.filter(function (ele) {
+ return ele.css('display') == 'none';
+ });
+ components.forEach(function (component, index) {
+ var nodeIndexes = void 0;
+ if (options.quality == "draft") {
+ nodeIndexes = spectralResult[index].nodeIndexes;
+ }
+
+ if (component.nodes().not(hiddenEles).length > 0) {
+ var subgraph = {};
+ subgraph.edges = [];
+ subgraph.nodes = [];
+ var nodeIndex = void 0;
+ component.nodes().not(hiddenEles).forEach(function (node) {
+ if (options.quality == "draft") {
+ if (!node.isParent()) {
+ nodeIndex = nodeIndexes.get(node.id());
+ subgraph.nodes.push({ x: spectralResult[index].xCoords[nodeIndex] - node.boundingbox().w / 2, y: spectralResult[index].yCoords[nodeIndex] - node.boundingbox().h / 2, width: node.boundingbox().w, height: node.boundingbox().h });
+ } else {
+ var parentInfo = aux.calcBoundingBox(node, spectralResult[index].xCoords, spectralResult[index].yCoords, nodeIndexes);
+ subgraph.nodes.push({ x: parentInfo.topLeftX, y: parentInfo.topLeftY, width: parentInfo.width, height: parentInfo.height });
+ }
+ } else {
+ if (coseResult[index][node.id()]) {
+ subgraph.nodes.push({ x: coseResult[index][node.id()].getLeft(), y: coseResult[index][node.id()].getTop(), width: coseResult[index][node.id()].getWidth(), height: coseResult[index][node.id()].getHeight() });
+ }
+ }
+ });
+ component.edges().forEach(function (edge) {
+ var source = edge.source();
+ var target = edge.target();
+ if (source.css("display") != "none" && target.css("display") != "none") {
+ if (options.quality == "draft") {
+ var sourceNodeIndex = nodeIndexes.get(source.id());
+ var targetNodeIndex = nodeIndexes.get(target.id());
+ var sourceCenter = [];
+ var targetCenter = [];
+ if (source.isParent()) {
+ var parentInfo = aux.calcBoundingBox(source, spectralResult[index].xCoords, spectralResult[index].yCoords, nodeIndexes);
+ sourceCenter.push(parentInfo.topLeftX + parentInfo.width / 2);
+ sourceCenter.push(parentInfo.topLeftY + parentInfo.height / 2);
+ } else {
+ sourceCenter.push(spectralResult[index].xCoords[sourceNodeIndex]);
+ sourceCenter.push(spectralResult[index].yCoords[sourceNodeIndex]);
+ }
+ if (target.isParent()) {
+ var _parentInfo = aux.calcBoundingBox(target, spectralResult[index].xCoords, spectralResult[index].yCoords, nodeIndexes);
+ targetCenter.push(_parentInfo.topLeftX + _parentInfo.width / 2);
+ targetCenter.push(_parentInfo.topLeftY + _parentInfo.height / 2);
+ } else {
+ targetCenter.push(spectralResult[index].xCoords[targetNodeIndex]);
+ targetCenter.push(spectralResult[index].yCoords[targetNodeIndex]);
+ }
+ subgraph.edges.push({ startX: sourceCenter[0], startY: sourceCenter[1], endX: targetCenter[0], endY: targetCenter[1] });
+ } else {
+ if (coseResult[index][source.id()] && coseResult[index][target.id()]) {
+ subgraph.edges.push({ startX: coseResult[index][source.id()].getCenterX(), startY: coseResult[index][source.id()].getCenterY(), endX: coseResult[index][target.id()].getCenterX(), endY: coseResult[index][target.id()].getCenterY() });
+ }
+ }
+ }
+ });
+ if (subgraph.nodes.length > 0) {
+ subgraphs.push(subgraph);
+ componentsEvaluated.add(index);
+ }
+ }
+ });
+ var shiftResult = layUtil.packComponents(subgraphs, options.randomize).shifts;
+ if (options.quality == "draft") {
+ spectralResult.forEach(function (result, index) {
+ var newXCoords = result.xCoords.map(function (x) {
+ return x + shiftResult[index].dx;
+ });
+ var newYCoords = result.yCoords.map(function (y) {
+ return y + shiftResult[index].dy;
+ });
+ result.xCoords = newXCoords;
+ result.yCoords = newYCoords;
+ });
+ } else {
+ var _count = 0;
+ componentsEvaluated.forEach(function (index) {
+ Object.keys(coseResult[index]).forEach(function (item) {
+ var nodeRectangle = coseResult[index][item];
+ nodeRectangle.setCenter(nodeRectangle.getCenterX() + shiftResult[_count].dx, nodeRectangle.getCenterY() + shiftResult[_count].dy);
+ });
+ _count++;
+ });
+ }
+ }
+ }
+ }
+
+ // get each element's calculated position
+ var getPositions = function getPositions(ele, i) {
+ if (options.quality == "default" || options.quality == "proof") {
+ if (typeof ele === "number") {
+ ele = i;
+ }
+ var pos = void 0;
+ var node = void 0;
+ var theId = ele.data('id');
+ coseResult.forEach(function (result) {
+ if (theId in result) {
+ pos = { x: result[theId].getRect().getCenterX(), y: result[theId].getRect().getCenterY() };
+ node = result[theId];
+ }
+ });
+ if (options.nodeDimensionsIncludeLabels) {
+ if (node.labelWidth) {
+ if (node.labelPosHorizontal == "left") {
+ pos.x += node.labelWidth / 2;
+ } else if (node.labelPosHorizontal == "right") {
+ pos.x -= node.labelWidth / 2;
+ }
+ }
+ if (node.labelHeight) {
+ if (node.labelPosVertical == "top") {
+ pos.y += node.labelHeight / 2;
+ } else if (node.labelPosVertical == "bottom") {
+ pos.y -= node.labelHeight / 2;
+ }
+ }
+ }
+ if (pos == undefined) pos = { x: ele.position("x"), y: ele.position("y") };
+ return {
+ x: pos.x,
+ y: pos.y
+ };
+ } else {
+ var _pos = void 0;
+ spectralResult.forEach(function (result) {
+ var index = result.nodeIndexes.get(ele.id());
+ if (index != undefined) {
+ _pos = { x: result.xCoords[index], y: result.yCoords[index] };
+ }
+ });
+ if (_pos == undefined) _pos = { x: ele.position("x"), y: ele.position("y") };
+ return {
+ x: _pos.x,
+ y: _pos.y
+ };
+ }
+ };
+
+ // quality = "draft" and randomize = false are contradictive so in that case positions don't change
+ if (options.quality == "default" || options.quality == "proof" || options.randomize) {
+ // transfer calculated positions to nodes (positions of only simple nodes are evaluated, compounds are positioned automatically)
+ var parentsWithoutChildren = aux.calcParentsWithoutChildren(cy, eles);
+ var _hiddenEles = eles.filter(function (ele) {
+ return ele.css('display') == 'none';
+ });
+ options.eles = eles.not(_hiddenEles);
+
+ eles.nodes().not(":parent").not(_hiddenEles).layoutPositions(layout, options, getPositions);
+
+ if (parentsWithoutChildren.length > 0) {
+ parentsWithoutChildren.forEach(function (ele) {
+ ele.position(getPositions(ele));
+ });
+ }
+ } else {
+ console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.");
+ }
+ }
+ }]);
+
+ return Layout;
+}();
+
+module.exports = Layout;
+
+/***/ }),
+
+/***/ 657:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+
+
+/**
+ The implementation of the spectral layout that is the first part of the fcose layout algorithm
+*/
+
+var aux = __webpack_require__(548);
+var Matrix = __webpack_require__(140).layoutBase.Matrix;
+var SVD = __webpack_require__(140).layoutBase.SVD;
+
+// main function that spectral layout is processed
+var spectralLayout = function spectralLayout(options) {
+
+ var cy = options.cy;
+ var eles = options.eles;
+ var nodes = eles.nodes();
+ var parentNodes = eles.nodes(":parent");
+
+ var dummyNodes = new Map(); // map to keep dummy nodes and their neighbors
+ var nodeIndexes = new Map(); // map to keep indexes to nodes
+ var parentChildMap = new Map(); // mapping btw. compound and its representative node
+ var allNodesNeighborhood = []; // array to keep neighborhood of all nodes
+ var xCoords = [];
+ var yCoords = [];
+
+ var samplesColumn = []; // sampled vertices
+ var minDistancesColumn = [];
+ var C = []; // column sampling matrix
+ var PHI = []; // intersection of column and row sampling matrices
+ var INV = []; // inverse of PHI
+
+ var firstSample = void 0; // the first sampled node
+ var nodeSize = void 0;
+
+ var infinity = 100000000;
+ var small = 0.000000001;
+
+ var piTol = options.piTol;
+ var samplingType = options.samplingType; // false for random, true for greedy
+ var nodeSeparation = options.nodeSeparation;
+ var sampleSize = void 0;
+
+ /**** Spectral-preprocessing functions ****/
+
+ /**** Spectral layout functions ****/
+
+ // determine which columns to be sampled
+ var randomSampleCR = function randomSampleCR() {
+ var sample = 0;
+ var count = 0;
+ var flag = false;
+
+ while (count < sampleSize) {
+ sample = Math.floor(Math.random() * nodeSize);
+
+ flag = false;
+ for (var i = 0; i < count; i++) {
+ if (samplesColumn[i] == sample) {
+ flag = true;
+ break;
+ }
+ }
+
+ if (!flag) {
+ samplesColumn[count] = sample;
+ count++;
+ } else {
+ continue;
+ }
+ }
+ };
+
+ // takes the index of the node(pivot) to initiate BFS as a parameter
+ var BFS = function BFS(pivot, index, samplingMethod) {
+ var path = []; // the front of the path
+ var front = 0; // the back of the path
+ var back = 0;
+ var current = 0;
+ var temp = void 0;
+ var distance = [];
+
+ var max_dist = 0; // the furthest node to be returned
+ var max_ind = 1;
+
+ for (var i = 0; i < nodeSize; i++) {
+ distance[i] = infinity;
+ }
+
+ path[back] = pivot;
+ distance[pivot] = 0;
+
+ while (back >= front) {
+ current = path[front++];
+ var neighbors = allNodesNeighborhood[current];
+ for (var _i = 0; _i < neighbors.length; _i++) {
+ temp = nodeIndexes.get(neighbors[_i]);
+ if (distance[temp] == infinity) {
+ distance[temp] = distance[current] + 1;
+ path[++back] = temp;
+ }
+ }
+ C[current][index] = distance[current] * nodeSeparation;
+ }
+
+ if (samplingMethod) {
+ for (var _i2 = 0; _i2 < nodeSize; _i2++) {
+ if (C[_i2][index] < minDistancesColumn[_i2]) minDistancesColumn[_i2] = C[_i2][index];
+ }
+
+ for (var _i3 = 0; _i3 < nodeSize; _i3++) {
+ if (minDistancesColumn[_i3] > max_dist) {
+ max_dist = minDistancesColumn[_i3];
+ max_ind = _i3;
+ }
+ }
+ }
+ return max_ind;
+ };
+
+ // apply BFS to all nodes or selected samples
+ var allBFS = function allBFS(samplingMethod) {
+
+ var sample = void 0;
+
+ if (!samplingMethod) {
+ randomSampleCR();
+
+ // call BFS
+ for (var i = 0; i < sampleSize; i++) {
+ BFS(samplesColumn[i], i, samplingMethod, false);
+ }
+ } else {
+ sample = Math.floor(Math.random() * nodeSize);
+ firstSample = sample;
+
+ for (var _i4 = 0; _i4 < nodeSize; _i4++) {
+ minDistancesColumn[_i4] = infinity;
+ }
+
+ for (var _i5 = 0; _i5 < sampleSize; _i5++) {
+ samplesColumn[_i5] = sample;
+ sample = BFS(sample, _i5, samplingMethod);
+ }
+ }
+
+ // form the squared distances for C
+ for (var _i6 = 0; _i6 < nodeSize; _i6++) {
+ for (var j = 0; j < sampleSize; j++) {
+ C[_i6][j] *= C[_i6][j];
+ }
+ }
+
+ // form PHI
+ for (var _i7 = 0; _i7 < sampleSize; _i7++) {
+ PHI[_i7] = [];
+ }
+
+ for (var _i8 = 0; _i8 < sampleSize; _i8++) {
+ for (var _j = 0; _j < sampleSize; _j++) {
+ PHI[_i8][_j] = C[samplesColumn[_j]][_i8];
+ }
+ }
+ };
+
+ // perform the SVD algorithm and apply a regularization step
+ var sample = function sample() {
+
+ var SVDResult = SVD.svd(PHI);
+
+ var a_q = SVDResult.S;
+ var a_u = SVDResult.U;
+ var a_v = SVDResult.V;
+
+ var max_s = a_q[0] * a_q[0] * a_q[0];
+
+ var a_Sig = [];
+
+ // regularization
+ for (var i = 0; i < sampleSize; i++) {
+ a_Sig[i] = [];
+ for (var j = 0; j < sampleSize; j++) {
+ a_Sig[i][j] = 0;
+ if (i == j) {
+ a_Sig[i][j] = a_q[i] / (a_q[i] * a_q[i] + max_s / (a_q[i] * a_q[i]));
+ }
+ }
+ }
+
+ INV = Matrix.multMat(Matrix.multMat(a_v, a_Sig), Matrix.transpose(a_u));
+ };
+
+ // calculate final coordinates
+ var powerIteration = function powerIteration() {
+ // two largest eigenvalues
+ var theta1 = void 0;
+ var theta2 = void 0;
+
+ // initial guesses for eigenvectors
+ var Y1 = [];
+ var Y2 = [];
+
+ var V1 = [];
+ var V2 = [];
+
+ for (var i = 0; i < nodeSize; i++) {
+ Y1[i] = Math.random();
+ Y2[i] = Math.random();
+ }
+
+ Y1 = Matrix.normalize(Y1);
+ Y2 = Matrix.normalize(Y2);
+
+ var count = 0;
+ // to keep track of the improvement ratio in power iteration
+ var current = small;
+ var previous = small;
+
+ var temp = void 0;
+
+ while (true) {
+ count++;
+
+ for (var _i9 = 0; _i9 < nodeSize; _i9++) {
+ V1[_i9] = Y1[_i9];
+ }
+
+ Y1 = Matrix.multGamma(Matrix.multL(Matrix.multGamma(V1), C, INV));
+ theta1 = Matrix.dotProduct(V1, Y1);
+ Y1 = Matrix.normalize(Y1);
+
+ current = Matrix.dotProduct(V1, Y1);
+
+ temp = Math.abs(current / previous);
+
+ if (temp <= 1 + piTol && temp >= 1) {
+ break;
+ }
+
+ previous = current;
+ }
+
+ for (var _i10 = 0; _i10 < nodeSize; _i10++) {
+ V1[_i10] = Y1[_i10];
+ }
+
+ count = 0;
+ previous = small;
+ while (true) {
+ count++;
+
+ for (var _i11 = 0; _i11 < nodeSize; _i11++) {
+ V2[_i11] = Y2[_i11];
+ }
+
+ V2 = Matrix.minusOp(V2, Matrix.multCons(V1, Matrix.dotProduct(V1, V2)));
+ Y2 = Matrix.multGamma(Matrix.multL(Matrix.multGamma(V2), C, INV));
+ theta2 = Matrix.dotProduct(V2, Y2);
+ Y2 = Matrix.normalize(Y2);
+
+ current = Matrix.dotProduct(V2, Y2);
+
+ temp = Math.abs(current / previous);
+
+ if (temp <= 1 + piTol && temp >= 1) {
+ break;
+ }
+
+ previous = current;
+ }
+
+ for (var _i12 = 0; _i12 < nodeSize; _i12++) {
+ V2[_i12] = Y2[_i12];
+ }
+
+ // theta1 now contains dominant eigenvalue
+ // theta2 now contains the second-largest eigenvalue
+ // V1 now contains theta1's eigenvector
+ // V2 now contains theta2's eigenvector
+
+ //populate the two vectors
+ xCoords = Matrix.multCons(V1, Math.sqrt(Math.abs(theta1)));
+ yCoords = Matrix.multCons(V2, Math.sqrt(Math.abs(theta2)));
+ };
+
+ /**** Preparation for spectral layout (Preprocessing) ****/
+
+ // connect disconnected components (first top level, then inside of each compound node)
+ aux.connectComponents(cy, eles, aux.getTopMostNodes(nodes), dummyNodes);
+
+ parentNodes.forEach(function (ele) {
+ aux.connectComponents(cy, eles, aux.getTopMostNodes(ele.descendants().intersection(eles)), dummyNodes);
+ });
+
+ // assign indexes to nodes (first real, then dummy nodes)
+ var index = 0;
+ for (var i = 0; i < nodes.length; i++) {
+ if (!nodes[i].isParent()) {
+ nodeIndexes.set(nodes[i].id(), index++);
+ }
+ }
+
+ var _iteratorNormalCompletion = true;
+ var _didIteratorError = false;
+ var _iteratorError = undefined;
+
+ try {
+ for (var _iterator = dummyNodes.keys()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+ var key = _step.value;
+
+ nodeIndexes.set(key, index++);
+ }
+
+ // instantiate the neighborhood matrix
+ } catch (err) {
+ _didIteratorError = true;
+ _iteratorError = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion && _iterator.return) {
+ _iterator.return();
+ }
+ } finally {
+ if (_didIteratorError) {
+ throw _iteratorError;
+ }
+ }
+ }
+
+ for (var _i13 = 0; _i13 < nodeIndexes.size; _i13++) {
+ allNodesNeighborhood[_i13] = [];
+ }
+
+ // form a parent-child map to keep representative node of each compound node
+ parentNodes.forEach(function (ele) {
+ var children = ele.children().intersection(eles);
+
+ // let random = 0;
+ while (children.nodes(":childless").length == 0) {
+ // random = Math.floor(Math.random() * children.nodes().length); // if all children are compound then proceed randomly
+ children = children.nodes()[0].children().intersection(eles);
+ }
+ // select the representative node - we can apply different methods here
+ // random = Math.floor(Math.random() * children.nodes(":childless").length);
+ var index = 0;
+ var min = children.nodes(":childless")[0].connectedEdges().length;
+ children.nodes(":childless").forEach(function (ele2, i) {
+ if (ele2.connectedEdges().length < min) {
+ min = ele2.connectedEdges().length;
+ index = i;
+ }
+ });
+ parentChildMap.set(ele.id(), children.nodes(":childless")[index].id());
+ });
+
+ // add neighborhood relations (first real, then dummy nodes)
+ nodes.forEach(function (ele) {
+ var eleIndex = void 0;
+
+ if (ele.isParent()) eleIndex = nodeIndexes.get(parentChildMap.get(ele.id()));else eleIndex = nodeIndexes.get(ele.id());
+
+ ele.neighborhood().nodes().forEach(function (node) {
+ if (eles.intersection(ele.edgesWith(node)).length > 0) {
+ if (node.isParent()) allNodesNeighborhood[eleIndex].push(parentChildMap.get(node.id()));else allNodesNeighborhood[eleIndex].push(node.id());
+ }
+ });
+ });
+
+ var _loop = function _loop(_key) {
+ var eleIndex = nodeIndexes.get(_key);
+ var disconnectedId = void 0;
+ dummyNodes.get(_key).forEach(function (id) {
+ if (cy.getElementById(id).isParent()) disconnectedId = parentChildMap.get(id);else disconnectedId = id;
+
+ allNodesNeighborhood[eleIndex].push(disconnectedId);
+ allNodesNeighborhood[nodeIndexes.get(disconnectedId)].push(_key);
+ });
+ };
+
+ var _iteratorNormalCompletion2 = true;
+ var _didIteratorError2 = false;
+ var _iteratorError2 = undefined;
+
+ try {
+ for (var _iterator2 = dummyNodes.keys()[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
+ var _key = _step2.value;
+
+ _loop(_key);
+ }
+
+ // nodeSize now only considers the size of transformed graph
+ } catch (err) {
+ _didIteratorError2 = true;
+ _iteratorError2 = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion2 && _iterator2.return) {
+ _iterator2.return();
+ }
+ } finally {
+ if (_didIteratorError2) {
+ throw _iteratorError2;
+ }
+ }
+ }
+
+ nodeSize = nodeIndexes.size;
+
+ var spectralResult = void 0;
+
+ // If number of nodes in transformed graph is 1 or 2, either SVD or powerIteration causes problem
+ // So skip spectral and layout the graph with cose
+ if (nodeSize > 2) {
+ // if # of nodes in transformed graph is smaller than sample size,
+ // then use # of nodes as sample size
+ sampleSize = nodeSize < options.sampleSize ? nodeSize : options.sampleSize;
+
+ // instantiates the partial matrices that will be used in spectral layout
+ for (var _i14 = 0; _i14 < nodeSize; _i14++) {
+ C[_i14] = [];
+ }
+ for (var _i15 = 0; _i15 < sampleSize; _i15++) {
+ INV[_i15] = [];
+ }
+
+ /**** Apply spectral layout ****/
+
+ if (options.quality == "draft" || options.step == "all") {
+ allBFS(samplingType);
+ sample();
+ powerIteration();
+
+ spectralResult = { nodeIndexes: nodeIndexes, xCoords: xCoords, yCoords: yCoords };
+ } else {
+ nodeIndexes.forEach(function (value, key) {
+ xCoords.push(cy.getElementById(key).position("x"));
+ yCoords.push(cy.getElementById(key).position("y"));
+ });
+ spectralResult = { nodeIndexes: nodeIndexes, xCoords: xCoords, yCoords: yCoords };
+ }
+ return spectralResult;
+ } else {
+ var iterator = nodeIndexes.keys();
+ var firstNode = cy.getElementById(iterator.next().value);
+ var firstNodePos = firstNode.position();
+ var firstNodeWidth = firstNode.outerWidth();
+ xCoords.push(firstNodePos.x);
+ yCoords.push(firstNodePos.y);
+ if (nodeSize == 2) {
+ var secondNode = cy.getElementById(iterator.next().value);
+ var secondNodeWidth = secondNode.outerWidth();
+ xCoords.push(firstNodePos.x + firstNodeWidth / 2 + secondNodeWidth / 2 + options.idealEdgeLength);
+ yCoords.push(firstNodePos.y);
+ }
+
+ spectralResult = { nodeIndexes: nodeIndexes, xCoords: xCoords, yCoords: yCoords };
+ return spectralResult;
+ }
+};
+
+module.exports = { spectralLayout: spectralLayout };
+
+/***/ }),
+
+/***/ 579:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+
+
+var impl = __webpack_require__(212);
+
+// registers the extension on a cytoscape lib ref
+var register = function register(cytoscape) {
+ if (!cytoscape) {
+ return;
+ } // can't register if cytoscape unspecified
+
+ cytoscape('layout', 'fcose', impl); // register with cytoscape.js
+};
+
+if (typeof cytoscape !== 'undefined') {
+ // expose to global cytoscape (i.e. window.cytoscape)
+ register(cytoscape);
+}
+
+module.exports = register;
+
+/***/ }),
+
+/***/ 140:
+/***/ ((module) => {
+
+module.exports = __WEBPACK_EXTERNAL_MODULE__140__;
+
+/***/ })
+
+/******/ });
+/************************************************************************/
+/******/ // The module cache
+/******/ var __webpack_module_cache__ = {};
+/******/
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+/******/ // Check if module is in cache
+/******/ var cachedModule = __webpack_module_cache__[moduleId];
+/******/ if (cachedModule !== undefined) {
+/******/ return cachedModule.exports;
+/******/ }
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = __webpack_module_cache__[moduleId] = {
+/******/ // no module.id needed
+/******/ // no module.loaded needed
+/******/ exports: {}
+/******/ };
+/******/
+/******/ // Execute the module function
+/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
+/******/
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+/******/
+/************************************************************************/
+/******/
+/******/ // startup
+/******/ // Load entry module and return exports
+/******/ // This entry module is referenced by other modules so it can't be inlined
+/******/ var __webpack_exports__ = __webpack_require__(579);
+/******/
+/******/ return __webpack_exports__;
+/******/ })()
+;
+});
\ No newline at end of file
diff --git a/node_modules/cytoscape-fcose/demo/demo-compound.html b/node_modules/cytoscape-fcose/demo/demo-compound.html
new file mode 100644
index 00000000..ed6edfef
--- /dev/null
+++ b/node_modules/cytoscape-fcose/demo/demo-compound.html
@@ -0,0 +1,465 @@
+<!DOCTYPE>
+
+<html>
+
+ <head>
+ <title>cytoscape-fcose.js demo</title>
+
+ <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1">
+
+ <!-- Bootstrap, popper, jQuery and filesaver - for demo purpose only -->
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"></script>
+ <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
+ <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet">
+
+ <script src="https://unpkg.com/cytoscape/dist/cytoscape.min.js"></script>
+ <script src="https://unpkg.com/layout-base/layout-base.js"></script>
+ <script src="https://unpkg.com/cose-base/cose-base.js"></script>
+ <script src="https://unpkg.com/cytoscape-layout-utilities/cytoscape-layout-utilities.js"></script>
+
+ <!-- for testing with local version of cytoscape.js -->
+ <!--<script src="../cytoscape.js/build/cytoscape.js"></script>-->
+
+ <script src="../cytoscape-fcose.js"></script>
+
+ <style>
+ body {
+ font-family: helvetica neue, helvetica, liberation sans, arial, sans-serif;
+ font-size: 14px;
+ }
+
+ #cy {
+ position: relative;
+ width: auto;
+ height: 90%;
+ z-index: 999;
+ margin-left: 290px;
+ right: 0px;
+ }
+
+ h1 {
+ opacity: 1;
+ color: #555;
+ font-size: 15px;
+ font-weight: bold;
+ padding-top: 5px;
+ }
+
+ /* The sidepanel menu */
+ .sidepanel {
+ height: auto; /* Specify a height */
+ width: 290px; /* 0 width - change this with JavaScript */
+ position: absolute; /* Stay in place */
+ z-index: 1000; /* Stay on top */
+ float: left;
+ top: auto;
+ left: 0;
+ background-color: #b7ffff; /* Black*/
+ overflow-x: hidden; /* Disable horizontal scroll */
+ padding-top: 10px; /* Place content 10px from the top */
+ padding-bottom: 10px; /* Place content 10px from the bottom */
+ transition: 0s; /* 0.5 second transition effect to slide in the sidepanel */
+ }
+
+ table{
+ margin-left: 4px;
+ margin-right: auto;
+ table-layout: fixed;
+ }
+
+ /* The sidepanel links */
+ table td {
+ padding: 0px 8px 8px 8px;
+ text-decoration: none;
+ font-size: 13px;
+ color: #555;
+ transition: 0.3s;
+ vertical-align: middle;
+ }
+
+ /* Style the button that is used to open the sidepanel */
+ .button {
+ font-size: 15px;
+ color: #555;
+ cursor: pointer;
+ background-color: #b7ffff;
+ padding: 5px 10px;
+ border: none;
+ margin-bottom: 5px;
+ }
+
+ .textField {
+ padding-left: 5px;
+ }
+
+ .checkbox {
+ margin-left: 0px;
+ }
+
+ .button:hover {
+ background-color: #0f0;
+ }
+
+ .btn-group-sm>.btn, .btn-sm {
+ font-size: 13px;
+ background-color: #7d8991;
+ border-color: #7d8991;
+ }
+
+ .btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active, .open>.dropdown-toggle.btn-primary {
+ color: #fff;
+ background-color: #60717d;
+ border-color: #60717d; /*set the color you want here*/
+ }
+
+ .btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active, .btn-outline-primary.active, .open>.dropdown-toggle.btn-primary {
+ color: #fff;
+ background-color: #60717d;
+ border-color: #60717d; /*set the color you want here*/
+ }
+
+ .form-control-sm {
+ font-size: 13px
+ }
+
+ .custom-select-sm {
+ font-size: 13px
+ }
+
+ .custom-control-label {
+ padding-top: 2px;
+ }
+
+ .custom-control-input:checked~.custom-control-label::before {
+ color: #fff;
+ border-color: #7d8991;
+ background-color: #7d8991;
+ }
+ </style>
+
+ <script>
+ document.addEventListener('DOMContentLoaded', function(){
+
+ var cy = window.cy = cytoscape({
+ container: document.getElementById('cy'),
+
+ ready: function(){
+ let layoutUtilities = this.layoutUtilities({
+ desiredAspectRatio: this.width()/this.height()
+ });
+ this.nodes().forEach(function(node){
+ let size = Math.random()*120+30;
+ node.css("width", size);
+ node.css("height", size);
+ });
+ this.layout({name: 'fcose', animationEasing: 'ease-out'}).run();
+ },
+
+ // demo your layout
+ layout: {
+ name: 'grid'
+ },
+
+ style: [
+ {
+ selector: 'node',
+ style: {
+ 'background-color': '#2B65EC'
+ }
+ },
+
+ {
+ selector: ':parent',
+ style: {
+ 'background-opacity': 0.333,
+ 'border-color': '#2B65EC'
+ }
+ },
+
+ {
+ selector: 'edge',
+ style: {
+ 'line-color': '#2B65EC'
+ }
+ },
+
+ {
+ selector: 'node:selected',
+ style: {
+ 'background-color': '#F08080',
+ 'border-color': 'red'
+ }
+ },
+
+ {
+ selector: 'edge:selected',
+ style: {
+ 'line-color': '#F08080'
+ }
+ }
+ ],
+
+ elements: [{ group:'nodes', data:{ id: 'n0'}},
+ { group:'nodes', data:{ id: 'n1'}},
+ { group:'nodes', data:{ id: 'n2'}},
+ { group:'nodes', data:{ id: 'n3'}},
+ { group:'nodes', data:{ id: 'n4', parent: 'n37'}},
+ { group:'nodes', data:{ id: 'n5'}},
+ { group:'nodes', data:{ id: 'n6'}},
+ { group:'nodes', data:{ id: 'n7', parent: 'n37'}},
+ { group:'nodes', data:{ id: 'n8', parent: 'n37'}},
+ { group:'nodes', data:{ id: 'n9', parent: 'n37'}},
+ { group:'nodes', data:{ id: 'n10', parent: 'n38'}},
+ { group:'nodes', data:{ id: 'n12'}},
+ { group:'nodes', data:{ id: 'n13'}},
+ { group:'nodes', data:{ id: 'n14'}},
+ { group:'nodes', data:{ id: 'n15'}},
+ { group:'nodes', data:{ id: 'n16'}},
+ { group:'nodes', data:{ id: 'n17'}},
+ { group:'nodes', data:{ id: 'n18'}},
+ { group:'nodes', data:{ id: 'n19'}},
+ { group:'nodes', data:{ id: 'n20'}},
+ { group:'nodes', data:{ id: 'n21'}},
+ { group:'nodes', data:{ id: 'n22'}},
+ { group:'nodes', data:{ id: 'n23'}},
+ { group:'nodes', data:{ id: 'n24', parent: 'n39'}},
+ { group:'nodes', data:{ id: 'n25', parent: 'n39'}},
+ { group:'nodes', data:{ id: 'n26', parent: 'n42'}},
+ { group:'nodes', data:{ id: 'n27', parent: 'n42'}},
+ { group:'nodes', data:{ id: 'n28', parent: 'n42'}},
+ { group:'nodes', data:{ id: 'n29', parent: 'n40'}},
+ { group:'nodes', data:{ id: 'n31', parent: 'n41'}},
+ { group:'nodes', data:{ id: 'n32', parent: 'n41'}},
+ { group:'nodes', data:{ id: 'n33', parent: 'n41'}},
+ { group:'nodes', data:{ id: 'n34', parent: 'n41'}},
+ { group:'nodes', data:{ id: 'n35', parent: 'n41'}},
+ { group:'nodes', data:{ id: 'n36', parent: 'n41'}},
+ { group:'nodes', data:{ id: 'n37'}},
+ { group:'nodes', data:{ id: 'n38'}},
+ { group:'nodes', data:{ id: 'n39', parent: 'n43'}},
+ { group:'nodes', data:{ id: 'n40', parent: 'n42'}},
+ { group:'nodes', data:{ id: 'n41', parent: 'n42'}},
+ { group:'nodes', data:{ id: 'n42', parent: 'n43'}},
+ { group:'nodes', data:{ id: 'n43'}},
+ { group:'nodes', data:{ id: 'n44'}},
+ { group:'nodes', data:{ id: 'n45'}},
+ { group:'nodes', data:{ id: 'n46'}},
+ { group:'nodes', data:{ id: 'n47'}},
+ { group:'edges', data:{ id: 'e0', source: 'n0', target: 'n1'} },
+ { group:'edges', data:{ id: 'e1', source: 'n1', target: 'n2'} },
+ { group:'edges', data:{ id: 'e2', source: 'n2', target: 'n3'} },
+ { group:'edges', data:{ id: 'e3', source: 'n0', target: 'n3'} },
+ { group:'edges', data:{ id: 'e4', source: 'n1', target: 'n4'} },
+ { group:'edges', data:{ id: 'e5', source: 'n2', target: 'n4'} },
+ { group:'edges', data:{ id: 'e6', source: 'n4', target: 'n5'} },
+ { group:'edges', data:{ id: 'e7', source: 'n5', target: 'n6'} },
+ { group:'edges', data:{ id: 'e8', source: 'n4', target: 'n6'} },
+ { group:'edges', data:{ id: 'e9', source: 'n4', target: 'n7'} },
+ { group:'edges', data:{ id: 'e10', source: 'n7', target: 'n8'} },
+ { group:'edges', data:{ id: 'e11', source: 'n8', target: 'n9'} },
+ { group:'edges', data:{ id: 'e12', source: 'n7', target: 'n9'} },
+ { group:'edges', data:{ id: 'e13', source: 'n13', target: 'n14'} },
+ //{ group:'edges', data:{ id: 'e14', source: 'n12', target: 'n14'} },
+ { group:'edges', data:{ id: 'e15', source: 'n14', target: 'n15'} },
+ { group:'edges', data:{ id: 'e16', source: 'n14', target: 'n16'} },
+ { group:'edges', data:{ id: 'e17', source: 'n15', target: 'n17'} },
+ { group:'edges', data:{ id: 'e18', source: 'n17', target: 'n18'} },
+ { group:'edges', data:{ id: 'e19', source: 'n18', target: 'n19'} },
+ { group:'edges', data:{ id: 'e20', source: 'n17', target: 'n20'} },
+ { group:'edges', data:{ id: 'e21', source: 'n19', target: 'n20'} },
+ { group:'edges', data:{ id: 'e22', source: 'n16', target: 'n20'} },
+ { group:'edges', data:{ id: 'e23', source: 'n20', target: 'n21'} },
+ { group:'edges', data:{ id: 'e25', source: 'n23', target: 'n24'} },
+ { group:'edges', data:{ id: 'e26', source: 'n24', target: 'n25'} },
+ { group:'edges', data:{ id: 'e27', source: 'n26', target: 'n38'} },
+ { group:'edges', data:{ id: 'e29', source: 'n26', target: 'n39'} },
+ { group:'edges', data:{ id: 'e30', source: 'n26', target: 'n27'} },
+ { group:'edges', data:{ id: 'e31', source: 'n26', target: 'n28'} },
+ { group:'edges', data:{ id: 'e33', source: 'n21', target: 'n31'} },
+ { group:'edges', data:{ id: 'e35', source: 'n31', target: 'n33'} },
+ { group:'edges', data:{ id: 'e36', source: 'n31', target: 'n34'} },
+ { group:'edges', data:{ id: 'e37', source: 'n33', target: 'n34'} },
+ { group:'edges', data:{ id: 'e38', source: 'n32', target: 'n35'} },
+ { group:'edges', data:{ id: 'e39', source: 'n32', target: 'n36'} },
+ { group:'edges', data:{ id: 'e40', source: 'n16', target: 'n40'} },
+ { group:'edges', data:{ id: 'e41', source: 'n44', target: 'n45'} },
+ { group:'edges', data:{ id: 'e42', source: 'n44', target: 'n46'} },
+ { group:'edges', data:{ id: 'e43', source: 'n45', target: 'n46'} }
+ ]
+
+ });
+
+ document.getElementById("randomizeButton").addEventListener("click", function(){
+ var layout = cy.layout({
+ name: 'random',
+ animate: true,
+ animationDuration: 1000
+ });
+
+ layout.run();
+ });
+
+ document.getElementById("fcoseButton").addEventListener("click", function(){
+ let qualityItem = document.getElementById("quality");
+ var layout = cy.layout({
+ name: 'fcose',
+ quality: qualityItem.options[qualityItem.selectedIndex].value,
+ randomize: !(document.getElementById("randomize").checked),
+ animate: document.getElementById("animate").checked,
+ animationEasing: 'ease-out',
+ fit: document.getElementById("fit").checked,
+ uniformNodeDimensions: document.getElementById("uniformNodeDimensions").checked,
+ packComponents: document.getElementById("packComponents").checked,
+ tile: document.getElementById("tile").checked,
+ nodeRepulsion: parseFloat(document.getElementById("nodeRepulsion").value),
+ idealEdgeLength: parseFloat(document.getElementById("idealEdgeLength").value),
+ edgeElasticity: parseFloat(document.getElementById("edgeElasticity").value),
+ nestingFactor: parseFloat(document.getElementById("nestingFactor").value),
+ gravity: parseFloat(document.getElementById("gravity").value),
+ gravityRange: parseFloat(document.getElementById("gravityRange").value),
+ gravityCompound: parseFloat(document.getElementById("gravityCompound").value),
+ gravityRangeCompound: parseFloat(document.getElementById("gravityRangeCompound").value),
+ numIter: parseFloat(document.getElementById("numIter").value),
+ tilingPaddingVertical: parseFloat(document.getElementById("tilingPaddingVertical").value),
+ tilingPaddingHorizontal: parseFloat(document.getElementById("tilingPaddingHorizontal").value),
+ initialEnergyOnIncremental: document.getElementById("initialEnergyOnIncremental").value,
+ step:"all"
+ });
+
+ layout.run();
+ });
+
+ });
+ </script>
+ </head>
+
+ <body>
+ <h1 class="ml-2">cytoscape-fcose demo (compound)</h1>
+ <div style='width: 300px; position: absolute;'>
+ <button id="randomizeButton" class="btn btn-primary btn-sm mb-2 ml-2">Randomize</button>&nbsp &nbsp
+ <button id="fcoseButton" class="btn btn-primary btn-sm mb-2 ml-2">fCoSE</button>
+
+ <div id="mySidepanel" class="sidepanel">
+ <table>
+ <tr>
+ <td><span class="add-on layout-text" title="Quality of the layout"> Quality </span></td>
+ <td>
+ <select id="quality" class='custom-select custom-select-sm'>
+ <option value="draft">draft</option>
+ <option value="default" selected="">default</option>
+ <option value="proof">proof</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td><span class="add-on layout-text" title="Whether to enable incremental mode"> Incremental </span></td>
+ <td>
+ <div class="custom-control custom-control-inline custom-checkbox">
+ <input type="checkbox" class="custom-control-input" id="randomize" name="incremental">
+ <label class="custom-control-label" for="randomize"></label>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td><span class="add-on layout-text" title="Whether to perform animation after layout"> Animate </span></td>
+ <td>
+ <div class="custom-control custom-control-inline custom-checkbox">
+ <input type="checkbox" class="custom-control-input" id="animate" name="animate" checked>
+ <label class="custom-control-label" for="animate"></label>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td><span class="add-on layout-text" title="Whether to fit the viewport to the repositioned nodes"> Fit </span></td>
+ <td>
+ <div class="custom-control custom-control-inline custom-checkbox">
+ <input type="checkbox" class="custom-control-input" id="fit" name="fit" checked>
+ <label class="custom-control-label" for="fit"></label>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td><span class="add-on layout-text" title="Whether nodes are of uniform dimensions"> Uniform Node Dimensions </span></td>
+ <td>
+ <div class="custom-control custom-control-inline custom-checkbox">
+ <input type="checkbox" class="custom-control-input" id="uniformNodeDimensions" name="uniformNodeDimensions">
+ <label class="custom-control-label" for="uniformNodeDimensions"></label>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td><span class="add-on layout-text" title="Whether to pack components"> Pack Components to Window </span></td>
+ <td>
+ <div class="custom-control custom-control-inline custom-checkbox">
+ <input type="checkbox" class="custom-control-input" id="packComponents" name="packComponents" checked>
+ <label class="custom-control-label" for="packComponents"></label>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td><span class="add-on layout-text" title="Whether to tile disconnected nodes"> Tile Disconnected </span></td>
+ <td>
+ <div class="custom-control custom-control-inline custom-checkbox">
+ <input type="checkbox" class="custom-control-input" id="tile" name="tile" checked>
+ <label class="custom-control-label" for="tile"></label>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td><span class="add-on layout-text" title="Node repulsion (non overlapping) multiplier"> Node Repulsion </span></td>
+ <td><input id="nodeRepulsion" class="textField form-control form-control-sm" type="text" value="4500" maxlength=5 size="5"></td>
+ </tr>
+ <tr>
+ <td><span class="add-on layout-text" title="Ideal (intra-graph) edge length"> Ideal Edge Length </span></td>
+ <td><input id="idealEdgeLength" class="textField form-control form-control-sm" type="text" value="50" maxlength=5 size="5"></td>
+ </tr>
+ <tr>
+ <td><span class="add-on layout-text" title="Divisor to compute edge forces"> Edge Elasticity </span></td>
+ <td><input id="edgeElasticity" class="textField form-control form-control-sm" type="text" value="0.45" maxlength=5 size="5"></td>
+ </tr>
+ <tr>
+ <td><span class="add-on layout-text" title="Nesting factor (multiplier) to compute ideal edge length for inter-graph edges"> Nesting Factor </span></td>
+ <td><input id="nestingFactor" class="textField form-control form-control-sm" type="text" value="0.1" maxlength=5 size="5"></td>
+ </tr>
+ <tr>
+ <td><span class="add-on layout-text" title="Gravity force (constant)"> Gravity </span></td>
+ <td><input id="gravity" class="textField form-control form-control-sm" type="text" value="0.25" maxlength=5 size="5"></td>
+ </tr>
+ <tr>
+ <td><span class="add-on layout-text" title="Gravity range (constant)"> Gravity Range </span></td>
+ <td><input id="gravityRange" class="textField form-control form-control-sm" type="text" value="3.8" maxlength=5 size="5"></td>
+ </tr>
+ <tr>
+ <td><span class="add-on layout-text" title="Gravity force (constant) for compounds"> Compound Gravity </span></td>
+ <td><input id="gravityCompound" class="textField form-control form-control-sm" type="text" value="1" maxlength=5 size="5"></td>
+ </tr>
+ <tr>
+ <td><span class="add-on layout-text" title="Gravity range (constant) for compounds"> Compound Gravity Range </span></td>
+ <td><input id="gravityRangeCompound" class="textField form-control form-control-sm" type="text" value="1.5" maxlength=5 size="5"></td>
+ </tr>
+ <tr>
+ <td><span class="add-on layout-text" title="Maximum number of iterations to perform"> Number of Iterations </span></td>
+ <td><input id="numIter" class="textField form-control form-control-sm" type="text" value="2500" size="5"></td>
+ </tr>
+ <tr>
+ <td><span class="add-on layout-text" title="Amount of vertical space to put between degree zero nodes during tiling"> Tiling Vertical Padding </span></td>
+ <td><input id="tilingPaddingVertical" class="textField form-control form-control-sm" type="text" value="10" maxlength=5 size="5"></td>
+ </tr>
+ <tr>
+ <td><span class="add-on layout-text" title="Amount of horizontal space to put between degree zero nodes during tiling"> Tiling Horizontal Padding </span></td>
+ <td><input id="tilingPaddingHorizontal" class="textField form-control form-control-sm" type="text" value="10" maxlength=5 size="5"></td>
+ </tr>
+ <tr>
+ <td><span class="add-on layout-text" title="Initial cooling factor for incremental layout"> Incremental Cooling Factor </span></td>
+ <td><input id="initialEnergyOnIncremental" class="textField form-control form-control-sm" type="text" value="0.3" maxlength=5 size="5"></td>
+ </tr>
+ </table>
+
+ </div>
+ </div>
+ <div id="cy"></div>
+
+ </body>
+
+</html>
diff --git a/node_modules/cytoscape-fcose/demo/demo-constraint-control.js b/node_modules/cytoscape-fcose/demo/demo-constraint-control.js
new file mode 100644
index 00000000..aefb41a3
--- /dev/null
+++ b/node_modules/cytoscape-fcose/demo/demo-constraint-control.js
@@ -0,0 +1,1482 @@
+// define default stylesheet
+let defaultStylesheet = [
+ {
+ selector: 'node',
+ style: {
+ 'background-color': '#bdd3d4',
+ 'label': 'data(id)',
+ 'text-valign': 'center',
+ 'background-opacity': 0.7
+ }
+ },
+
+ {
+ selector: ':parent',
+ style: {
+// 'background-opacity': 0.333,
+ 'background-color': '#e8e8e8',
+ 'border-color': '#DADADA',
+// 'border-width': 3,
+ 'text-valign': 'bottom'
+ }
+ },
+
+ {
+ selector: 'edge',
+ style: {
+ 'curve-style': 'straight',
+ 'line-color': '#bdd3d4'
+ }
+ },
+
+ {
+ selector: 'node:selected',
+ style: {
+ 'background-color': '#33ff00',
+ 'border-color': '#22ee00'
+ }
+ },
+
+ {
+ selector: 'node.fixed',
+ style: {
+ 'shape': 'diamond',
+ 'background-color': '#9D9696',
+ }
+ },
+
+ {
+ selector: 'node.fixed:selected',
+ style: {
+ 'background-color': '#33ff00',
+ }
+ },
+
+ {
+ selector: 'node.alignment',
+ style: {
+ 'shape': 'round-heptagon',
+ 'background-color': '#fef2d1',
+ }
+ },
+
+ {
+ selector: 'node.alignment:selected',
+ style: {
+ 'background-color': '#33ff00',
+ }
+ },
+
+ {
+ selector: 'node.relative',
+ style: {
+ 'shape': 'rectangle',
+ 'background-color': '#fed3d1',
+ }
+ },
+
+ {
+ selector: 'node.relative:selected',
+ style: {
+ 'background-color': '#33ff00',
+ }
+ },
+
+ {
+ selector: 'edge:selected',
+ style: {
+ 'line-color': '#33ff00'
+ }
+ }
+];
+
+let cy = window.cy = cytoscape({
+ container: document.getElementById('cy'),
+ ready: function(){
+ let layoutUtilities = this.layoutUtilities({
+ desiredAspectRatio: this.width()/this.height()
+ });
+
+ this.nodes().forEach(function(node){
+ let size = Math.random()*40+30;
+ node.css("width", size);
+ node.css("height", size);
+ });
+
+ let initialLayout = this.layout({name: 'fcose', step: 'all', animationEasing: 'ease-out'});
+ initialLayout.pon('layoutstart').then(function( event ){
+ constraints.fixedNodeConstraint = JSON.parse(JSON.stringify(sample1_constraints.fixedNodeConstraint));
+ clearConstraintListTable();
+ fillConstraintListTableFromConstraints();
+ });
+ initialLayout.run();
+ },
+ layout: {name: 'preset'},
+ style: defaultStylesheet,
+ elements: {
+ nodes: [
+ {data: {id: 'n1'}},
+ {data: {id: 'n2'}},
+ {data: {id: 'n3', parent: 'n8'}},
+ {data: {id: 'n5'}},
+ {data: {id: 'n6', parent: 'n8'}},
+ {data: {id: 'n7', parent: 'n8'}},
+ {data: {id: 'n8'}},
+ {data: {id: 'f1'}, classes: ['fixed']},
+ {data: {id: 'f2'}, classes: ['fixed']},
+ {data: {id: 'f3', parent: 'n8'}, classes: ['fixed']},
+ ],
+ edges: [
+ {data: {source: 'n1', target: 'f1'}},
+ {data: {source: 'n1', target: 'n3'}},
+ {data: {source: 'f1', target: 'n2'}},
+ {data: {source: 'f1', target: 'n3'}},
+ {data: {source: 'n3', target: 'f2'}},
+ {data: {source: 'f2', target: 'n5'}},
+ {data: {source: 'n5', target: 'n8'}},
+ {data: {source: 'n6', target: 'n3'}},
+ {data: {source: 'n6', target: 'n7'}},
+ {data: {source: 'n6', target: 'f3'}}
+ ]
+ },
+ wheelSensitivity: 0.3
+});
+
+let constraints = {
+ fixedNodeConstraint: undefined,
+ alignmentConstraint: undefined,
+ relativePlacementConstraint: undefined
+};
+
+// Handle Menu ------------------------------------------
+
+// Graph file input
+document.getElementById("openFile").addEventListener("click", function () {
+ document.getElementById("inputFile").click();
+});
+
+$("body").on("change", "#inputFile", function (e, fileObject) {
+ var inputFile = this.files[0] || fileObject;
+
+ if (inputFile) {
+ var fileExtension = inputFile.name.split('.').pop();
+ var r = new FileReader();
+ r.onload = function (e) {
+ cy.remove(cy.elements());
+ var content = e.target.result;
+ if (fileExtension == "graphml" || fileExtension == "xml") {
+ cy.graphml({layoutBy: 'null'});
+ cy.graphml(content);
+// updateGraphStyle();
+ } else if (fileExtension == "json") {
+ cy.json({elements: JSON.parse(content)});
+// updateGraphStyle();
+ } else {
+ var tsv = cy.tsv();
+ tsv.importTo(content);
+ }
+ };
+ r.addEventListener('loadend', function () {
+ onLoad();
+ clearConstraintListTable();
+ constraints.fixedNodeConstraint = undefined;
+ constraints.alignmentConstraint = undefined;
+ constraints.relativePlacementConstraint = undefined;
+
+ document.getElementById("nodeList").addEventListener("change", function(){
+ document.getElementById("fixedNodeX").value = Math.round(cy.getElementById(document.getElementById("nodeList").value).position("x"));
+ document.getElementById("fixedNodeY").value = Math.round(cy.getElementById(document.getElementById("nodeList").value).position("y"));
+ });
+
+// if (inputFile.name == "samples/sample1.graphml") {
+// cy.nodes().forEach(function (node, i) {
+// let width = [30, 70, 110];
+// let size = width[i % 3];
+// node.css("width", size);
+// node.css("height", size);
+// });
+// }
+
+ });
+ r.readAsText(inputFile);
+ } else {
+ alert("Failed to load file");
+ }
+ $("#inputFile").val(null);
+});
+
+let updateGraphStyle = function () {
+ cy.nodes().forEach(function (node) {
+ node.style({
+ 'background-image': node.data('background-image'),
+ 'width': node.data('bbox').w,
+ 'height': node.data('bbox').h,
+ "border-width": node.data('border-width'),
+ "border-color": node.data('border-color'),
+ "background-color": node.data('background-color'),
+ "background-opacity": node.data('background-opacity'),
+ "background-fit": "cover",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "text-wrap": "wrap",
+ "font-size": node.data('font-size'),
+ "color": node.data('color')
+ });
+
+ if (node.data('label')) {
+ node.style({
+ 'label': node.data('label')
+ });
+ }
+ });
+
+ cy.edges().forEach(function (edge) {
+ edge.style({
+ 'width': edge.data('width'),
+ "line-color": edge.data('line-color')
+ });
+ });
+};
+
+$("body").on("change", "#inputConstraint", function (e, fileObject) {
+ var inputFile = this.files[0] || fileObject;
+
+ if (inputFile) {
+ var fileExtension = inputFile.name.split('.').pop();
+ var r = new FileReader();
+ r.onload = function (e) {
+ var content = e.target.result;
+ if (fileExtension == "json") {
+ constraints.fixedNodeConstraint = undefined;
+ constraints.alignmentConstraint = undefined;
+ constraints.relativePlacementConstraint = undefined;
+ let constraintObject = JSON.parse( content );
+ if(constraintObject.fixedNodeConstraint)
+ constraints.fixedNodeConstraint = constraintObject.fixedNodeConstraint;
+ if(constraintObject.alignmentConstraint)
+ constraints.alignmentConstraint = constraintObject.alignmentConstraint;
+ if(constraintObject.relativePlacementConstraint)
+ constraints.relativePlacementConstraint = constraintObject.relativePlacementConstraint;
+ clearConstraintListTable();
+ fillConstraintListTableFromConstraints();
+ }
+ };
+ r.addEventListener('loadend', function () {
+ });
+ r.readAsText(inputFile);
+ } else {
+ alert("Failed to load file");
+ }
+ $("#inputFile").val(null);
+});
+
+document.getElementById("exportConstraint").addEventListener("click", function(){
+ let constraintString = JSON.stringify(constraints, null, 2);
+ download('constraint.json', constraintString);
+});
+
+let download = function(filename, text) {
+ var pom = document.createElement('a');
+ pom.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text));
+ pom.setAttribute('download', filename);
+
+ if (document.createEvent) {
+ var event = document.createEvent('MouseEvents');
+ event.initEvent('click', true, true);
+ pom.dispatchEvent(event);
+ }
+ else {
+ pom.click();
+ }
+};
+
+/*
+// SVG
+document.getElementById("saveAsSVG").addEventListener("click", function(){
+ let svgContent = cy.svg({scale: 1, full: true});
+ let blob = new Blob([svgContent], {type:"image/svg+xml;charset=utf-8"});
+ saveAs(blob, "graph.svg");
+});
+
+// see http://stackoverflow.com/questions/16245767/creating-a-blob-from-a-base64-string-in-javascript
+let b64toBlob = function(b64Data, contentType, sliceSize) {
+ contentType = contentType || '';
+ sliceSize = sliceSize || 512;
+
+ var byteCharacters = atob(b64Data);
+ var byteArrays = [];
+
+ for (var offset = 0; offset < byteCharacters.length; offset += sliceSize) {
+ var slice = byteCharacters.slice(offset, offset + sliceSize);
+
+ var byteNumbers = new Array(slice.length);
+ for (var i = 0; i < slice.length; i++) {
+ byteNumbers[i] = slice.charCodeAt(i);
+ }
+
+ var byteArray = new Uint8Array(byteNumbers);
+
+ byteArrays.push(byteArray);
+ }
+
+ var blob = new Blob(byteArrays, {type: contentType});
+ return blob;
+}
+*/
+
+// Sample File Changer
+let sampleFileNames = {
+ "sample5" : unix,
+ "sample5_constraints" : unix_constraints,
+ "sample6" : chalk,
+ "sample6_constraints" : chalk_constraints,
+ "sample7" : uwsn,
+ "sample7_constraints" : uwsn_constraints,
+ "sample8" : call_graph,
+ "sample8_constraints" : callGraph_constraints,
+ "sample9" : wsn,
+ "sample9_constraints" : wsn_constraints,
+};
+
+document.getElementById("sample").addEventListener("change", function(){
+ cy.startBatch();
+ cy.elements().remove();
+ cy.style().clear();
+
+ var selectionObject = document.getElementById("sample");
+
+ var selected = selectionObject.options[selectionObject.selectedIndex].index;
+ if(selected == 0){
+ cy.add(elements1);
+ applyPostLoadOperations(selected);
+ }
+ else if(selected == 1){
+ cy.add(elements2);
+ applyPostLoadOperations(selected);
+ }
+ else if(selected == 2){
+ cy.add(elements3);
+ applyPostLoadOperations(selected);
+ }
+ else if(selected == 3){
+ cy.add(elements4);
+ applyPostLoadOperations(selected);
+ }
+ else if(selected == 4){
+ cy.add(elements5);
+ applyPostLoadOperations(selected);
+ }
+
+ function applyPostLoadOperations(selected){
+ cy.nodes().forEach(function(node){
+ let size = Math.random()*40+30;
+ node.css("width", size);
+ node.css("height", size);
+ });
+ cy.style(defaultStylesheet);
+
+ clearConstraintListTable();
+ constraints.fixedNodeConstraint = undefined;
+ constraints.alignmentConstraint = undefined;
+ constraints.relativePlacementConstraint = undefined;
+
+ if(selected == 0){
+ if(sample1_constraints.fixedNodeConstraint)
+ constraints.fixedNodeConstraint = JSON.parse(JSON.stringify(sample1_constraints.fixedNodeConstraint));
+ clearConstraintListTable();
+ fillConstraintListTableFromConstraints();
+ }
+ if(selected == 1){
+ if(sample2_constraints.alignmentConstraint)
+ constraints.alignmentConstraint = JSON.parse(JSON.stringify(sample2_constraints.alignmentConstraint));
+ clearConstraintListTable();
+ fillConstraintListTableFromConstraints();
+ }
+ if(selected == 2){
+ if(sample3_constraints.relativePlacementConstraint)
+ constraints.relativePlacementConstraint = JSON.parse(JSON.stringify(sample3_constraints.relativePlacementConstraint));
+ clearConstraintListTable();
+ fillConstraintListTableFromConstraints();
+ }
+ if(selected == 3){
+ if(sample4_constraints.fixedNodeConstraint)
+ constraints.fixedNodeConstraint = JSON.parse(JSON.stringify(sample4_constraints.fixedNodeConstraint));
+ if(sample4_constraints.alignmentConstraint)
+ constraints.alignmentConstraint = JSON.parse(JSON.stringify(sample4_constraints.alignmentConstraint));
+ if(sample4_constraints.relativePlacementConstraint)
+ constraints.relativePlacementConstraint = JSON.parse(JSON.stringify(sample4_constraints.relativePlacementConstraint));
+ clearConstraintListTable();
+ fillConstraintListTableFromConstraints();
+ }
+ }
+
+ if (sampleFileNames[selectionObject.value]) {
+ //$.getJSON("samples/" + sampleFileNames[selectionObject.value] + ".json", function(json) {
+ let json = sampleFileNames[selectionObject.value];
+ cy.json(json);
+ cy.nodes().forEach(function (node) {
+ node.style({
+ 'width': node.data('bbox').w,
+ 'height': node.data('bbox').h,
+ "border-width": node.data('border-width'),
+// "border-color": node.data('border-color'),
+ });
+
+ if (node.data('class') === 'process' || node.data('class') === 'association' || node.data('class') === "dissociation") {
+ node.style({
+ 'background-color': node.data('background-color'),
+ 'background-opacity': 0.3
+ });
+ } else {
+ node.style({
+ 'background-image': node.data('background-image'),
+// 'background-color': node.data('background-color'),
+ 'background-opacity': node.data('background-opacity'),
+ 'background-fit': 'contain',
+ 'background-position-x': '50%',
+ 'background-position-y': '50%',
+ });
+ }
+
+ if (node.data('label')) {
+ node.style({
+ 'label': node.data('label'),
+ 'text-wrap': 'wrap',
+ 'font-size': node.data('font-size'),
+ 'color': node.data('color')
+ });
+ }
+ });
+
+ constraints.fixedNodeConstraint = undefined;
+ constraints.alignmentConstraint = undefined;
+ constraints.relativePlacementConstraint = undefined;
+
+ let constraintObject = sampleFileNames[selectionObject.value + "_constraints"];
+ if(constraintObject.fixedNodeConstraint)
+ constraints.fixedNodeConstraint = JSON.parse(JSON.stringify(constraintObject.fixedNodeConstraint));
+ if(constraintObject.alignmentConstraint)
+ constraints.alignmentConstraint = JSON.parse(JSON.stringify(constraintObject.alignmentConstraint));
+ if(constraintObject.relativePlacementConstraint)
+ constraints.relativePlacementConstraint = JSON.parse(JSON.stringify(constraintObject.relativePlacementConstraint));
+ clearConstraintListTable();
+ fillConstraintListTableFromConstraints();
+ // });
+
+ }
+ cy.endBatch();
+
+ if(selected == 4){
+ cy.nodes().not(":parent").positions(function(node, i){
+ return {
+ x: elements5_positions[i].x,
+ y: elements5_positions[i].y
+ };
+ });
+ cy.layout({name: "preset", fit:true, animate:true, animationDuration: 1000, animationEasing: undefined}).run();
+ }
+ else {
+ let finalOptions = Object.assign({}, options);
+ finalOptions.step = "all";
+ cy.layout(finalOptions).run();
+ }
+// cy.layout({name: 'random', padding: 100}).run();
+ onLoad();
+
+ document.getElementById("nodeList").addEventListener("change", function(){
+ document.getElementById("fixedNodeX").value = Math.round(cy.getElementById(document.getElementById("nodeList").value).position("x"));
+ document.getElementById("fixedNodeY").value = Math.round(cy.getElementById(document.getElementById("nodeList").value).position("y"));
+ });
+});
+
+// Layout buttons
+
+let options = {
+ name: 'fcose',
+ quality: "default",
+ randomize: true,
+ animate: true,
+ animationDuration: 1000,
+ animationEasing: undefined,
+ fit: true,
+ padding: 30,
+ nestingFactor: 0.1,
+ gravityRangeCompound: 1.5,
+ gravityCompound: 1.0
+};
+
+// Randomize
+document.getElementById("randomizeButton").addEventListener("click", function () {
+ var layout = cy.layout({
+ name: 'random',
+ animate: true
+ });
+
+ layout.run();
+});
+
+// Fcose
+document.getElementById("fcoseButton").addEventListener("click", function(){
+ let finalOptions = Object.assign({}, options);
+ finalOptions.step = "all";
+ finalOptions.randomize = !(document.getElementById("incremental").checked);
+
+ if(document.getElementById("sample").value == "sample6"){
+ finalOptions.nestingFactor = 0.4;
+ finalOptions.gravityRangeCompound = 0;
+ finalOptions.gravityCompound = 3.0;
+ }
+
+ if(document.getElementById("sample").value == "sample8"){
+ finalOptions.idealEdgeLength = 70;
+ }
+
+ finalOptions.fixedNodeConstraint = constraints.fixedNodeConstraint ? constraints.fixedNodeConstraint : undefined;
+ finalOptions.alignmentConstraint = constraints.alignmentConstraint ? constraints.alignmentConstraint : undefined;
+ finalOptions.relativePlacementConstraint = constraints.relativePlacementConstraint ? constraints.relativePlacementConstraint : undefined;
+ let layout = cy.layout(finalOptions);
+ layout.one("layoutstop", function( event ){
+ document.getElementById("fixedNodeX").value = Math.round(cy.getElementById(document.getElementById("nodeList").value).position("x"));
+ document.getElementById("fixedNodeY").value = Math.round(cy.getElementById(document.getElementById("nodeList").value).position("y"));
+ });
+ cy.layoutUtilities("get").setOption("randomize", finalOptions.randomize);
+// let start = performance.now();
+ layout.run();
+// console.log((performance.now() - start) + " ms" );
+});
+
+/*
+// CoLa
+document.getElementById("colaButton").addEventListener("click", function(){
+
+ if(constraints.fixedNodeConstraint) {
+ constraints.fixedNodeConstraint.forEach(function(constraint){
+ cy.getElementById(constraint.nodeId).position({x: constraint.position.x, y: constraint.position.y});
+ cy.getElementById(constraint.nodeId).lock();
+ });
+ }
+
+ let gapInequalities = [];
+ if(constraints.relativePlacementConstraint) {
+ constraints.relativePlacementConstraint.forEach(function(constraint){
+ if(constraint.left) {
+ gapInequalities.push({"axis": "x", "left": cy.getElementById(constraint.left), "right": cy.getElementById(constraint.right), "gap": constraint.gap});
+ }
+ else {
+ gapInequalities.push({"axis": "y", "left": cy.getElementById(constraint.top), "right": cy.getElementById(constraint.bottom), "gap": constraint.gap});
+ }
+ });
+ }
+
+ let options = {
+ name: 'cola',
+ animate: false,
+ maxSimulationTime: 20000,
+ randomize: true,
+ unconstrIter: 10,
+ userConstIter: 15,
+ allConstIter: 20,
+ handleDisconnected: false,
+ edgeLength: 50,
+ alignment: constraints.alignmentConstraint ? constraints.alignmentConstraint : undefined,
+ gapInequalities: gapInequalities
+ };
+
+ let layout = cy.layout(options);
+ layout.one("layoutstop", function( event ){
+ document.getElementById("fixedNodeX").value = Math.round(cy.getElementById(document.getElementById("nodeList").value).position("x"));
+ document.getElementById("fixedNodeY").value = Math.round(cy.getElementById(document.getElementById("nodeList").value).position("y"));
+ });
+
+ let start = performance.now();
+ layout.run();
+ console.log((performance.now() - start) + " ms" );
+
+ cy.nodes().unlock();
+});
+*/
+
+// Draft
+document.getElementById("draftButton").addEventListener("click", function(){
+ let finalOptions = Object.assign({}, options);
+ finalOptions.quality = "draft";
+ finalOptions.fixedNodeConstraint = constraints.fixedNodeConstraint ? constraints.fixedNodeConstraint : undefined;
+ finalOptions.alignmentConstraint = constraints.alignmentConstraint ? constraints.alignmentConstraint : undefined;
+ finalOptions.relativePlacementConstraint = constraints.relativePlacementConstraint ? constraints.relativePlacementConstraint : undefined;
+ let layout = cy.layout(finalOptions);
+ layout.one("layoutstop", function( event ){
+ document.getElementById("fixedNodeX").value = Math.round(cy.getElementById(document.getElementById("nodeList").value).position("x"));
+ document.getElementById("fixedNodeY").value = Math.round(cy.getElementById(document.getElementById("nodeList").value).position("y"));
+ });
+ cy.layoutUtilities("get").setOption("randomize", true);
+ layout.run();
+});
+
+// Transform
+document.getElementById("transformButton").addEventListener("click", function(){
+ let finalOptions = Object.assign({}, options);
+ finalOptions.step = "transformed";
+ finalOptions.fixedNodeConstraint = constraints.fixedNodeConstraint ? constraints.fixedNodeConstraint : undefined;
+ finalOptions.alignmentConstraint = constraints.alignmentConstraint ? constraints.alignmentConstraint : undefined;
+ finalOptions.relativePlacementConstraint = constraints.relativePlacementConstraint ? constraints.relativePlacementConstraint : undefined;
+
+ let layout = cy.layout(finalOptions);
+ layout.one("layoutstop", function( event ){
+ document.getElementById("fixedNodeX").value = Math.round(cy.getElementById(document.getElementById("nodeList").value).position("x"));
+ document.getElementById("fixedNodeY").value = Math.round(cy.getElementById(document.getElementById("nodeList").value).position("y"));
+ });
+ layout.run();
+});
+
+// Enforce
+document.getElementById("enforceButton").addEventListener("click", function(){
+ let finalOptions = Object.assign({}, options);
+ finalOptions.step = "enforced";
+
+ finalOptions.fixedNodeConstraint = constraints.fixedNodeConstraint ? constraints.fixedNodeConstraint : undefined;
+ finalOptions.alignmentConstraint = constraints.alignmentConstraint ? constraints.alignmentConstraint : undefined;
+ finalOptions.relativePlacementConstraint = constraints.relativePlacementConstraint ? constraints.relativePlacementConstraint : undefined;
+
+ let layout = cy.layout(finalOptions);
+ layout.one("layoutstop", function( event ){
+ document.getElementById("fixedNodeX").value = Math.round(cy.getElementById(document.getElementById("nodeList").value).position("x"));
+ document.getElementById("fixedNodeY").value = Math.round(cy.getElementById(document.getElementById("nodeList").value).position("y"));
+ });
+ layout.run();
+});
+
+document.getElementById("coseButton").addEventListener("click", function(){
+ let finalOptions = Object.assign({}, options);
+
+ if(document.getElementById("sample").value == "sample6"){
+ finalOptions.nestingFactor = 0.4;
+ finalOptions.gravityRangeCompound = 0;
+ finalOptions.gravityCompound = 3.0;
+ }
+
+ if(document.getElementById("sample").value == "sample8"){
+ finalOptions.idealEdgeLength = 70;
+ }
+
+ finalOptions.fixedNodeConstraint = constraints.fixedNodeConstraint ? constraints.fixedNodeConstraint : undefined;
+ finalOptions.alignmentConstraint = constraints.alignmentConstraint ? constraints.alignmentConstraint : undefined;
+ finalOptions.relativePlacementConstraint = constraints.relativePlacementConstraint ? constraints.relativePlacementConstraint : undefined;
+
+ finalOptions.randomize = false;
+ finalOptions.step = "cose";
+ let layout = cy.layout(finalOptions);
+ layout.one("layoutstop", function( event ){
+ document.getElementById("fixedNodeX").value = Math.round(cy.getElementById(document.getElementById("nodeList").value).position("x"));
+ document.getElementById("fixedNodeY").value = Math.round(cy.getElementById(document.getElementById("nodeList").value).position("y"));
+ });
+ cy.layoutUtilities("get").setOption("randomize", finalOptions.randomize);
+ layout.run();
+});
+
+// Handle Constraints ----------------------------
+
+let onLoad = function(){
+ let nodeList = "<select id='nodeList' class='custom-select custom-select-sm' style='width:auto;' onchange='onSelect()'>";
+ let simpleNodes = cy.nodes().not(":parent");
+ for(let i = 0; i < simpleNodes.length; i++){
+ let node = simpleNodes[i];
+ let label = (node.data('label'))?(node.data('label')):(node.id());
+ if(label.length > 15)
+ label = label.substring(0, 12).concat("...");
+ nodeList += "<option value='" + cy.nodes().not(":parent")[i].id() + "'>" + label + "</option>";
+ }
+ let listComponentForFixed = document.getElementById("nodeListColumn");
+ listComponentForFixed.innerHTML = nodeList;
+ document.getElementById("fixedNodeX").value = Math.round(cy.nodes().not(":parent")[0].position("x"));
+ document.getElementById("fixedNodeY").value = Math.round(cy.nodes().not(":parent")[0].position("y"));
+
+ let nodeListRP1 = "<select id='nodeListRP1' class='custom-select custom-select-sm' style='width:auto;' onchange='onSelectRP1()'>";
+ for(let i = 0; i < simpleNodes.length; i++){
+ let node = simpleNodes[i];
+ let label = (node.data('label'))?(node.data('label')):(node.id());
+ if(label.length > 15)
+ label = label.substring(0, 12).concat("...");
+ nodeListRP1 += "<option value=" + cy.nodes().not(":parent")[i].id() + ">" + label + "</option>";
+ }
+
+ let nodeListRP2 = "<select id='nodeListRP2' class='custom-select custom-select-sm' style='width:auto;' onchange='onSelectRP2()'>";
+ for(let i = 0; i < simpleNodes.length; i++){
+ let node = simpleNodes[i];
+ let label = (node.data('label'))?(node.data('label')):(node.id());
+ if(label.length > 15)
+ label = label.substring(0, 12).concat("...");
+ nodeListRP2 += "<option value=" + cy.nodes().not(":parent")[i].id() + ">" + label + "</option>";
+ }
+
+ let listComponentForRP1 = document.getElementById("nodeListColumnRP1");
+ listComponentForRP1.innerHTML = nodeListRP1;
+
+ let listComponentForRP2 = document.getElementById("nodeListColumnRP2");
+ listComponentForRP2.innerHTML = nodeListRP2;
+};
+
+let onSelect = function(){
+ let id = document.getElementById("nodeList").value;
+ cy.elements().unselect();
+ cy.getElementById(id).select();
+};
+
+let onSelectRP1 = function(){
+ let id = document.getElementById("nodeListRP1").value;
+ cy.elements().unselect();
+ cy.getElementById(id).select();
+};
+
+let onSelectRP2 = function(){
+ let id = document.getElementById("nodeListRP2").value;
+ cy.elements().unselect();
+ cy.getElementById(id).select();
+};
+
+document.addEventListener('DOMContentLoaded', function(){
+ document.getElementById("nodeList").addEventListener("change", function(){
+ document.getElementById("fixedNodeX").value = Math.round(cy.getElementById(document.getElementById("nodeList").value).position("x"));
+ document.getElementById("fixedNodeY").value = Math.round(cy.getElementById(document.getElementById("nodeList").value).position("y"));
+ });
+});
+
+cy.ready( function(event){
+ onLoad();
+});
+
+document.getElementById("nodeList").addEventListener("change", function(){
+ document.getElementById("fixedNodeX").value = Math.round(cy.getElementById(document.getElementById("nodeList").value).position("x"));
+ document.getElementById("fixedNodeY").value = Math.round(cy.getElementById(document.getElementById("nodeList").value).position("y"));
+});
+
+cy.on("position", "node", function(event) {
+ if(event.target.id() == document.getElementById("nodeList").value){
+ document.getElementById("fixedNodeX").value = Math.round(cy.getElementById(document.getElementById("nodeList").value).position("x"));
+ document.getElementById("fixedNodeY").value = Math.round(cy.getElementById(document.getElementById("nodeList").value).position("y"));
+ }
+});
+
+// Adding Constraints
+let constraintListTable = document.getElementById("constraintListTable");
+
+document.getElementById("fixedNode").addEventListener("click",function(){
+ let nodeId = document.getElementById("nodeList").value;
+ let exist = false;
+ if(constraints.fixedNodeConstraint){
+ constraints.fixedNodeConstraint.forEach(function(constraintObject){
+ if(constraintObject.nodeId == nodeId){
+ exist = true;
+ }
+ });
+ }
+ if(!exist){
+ let fixedNode = {nodeId: nodeId, position: Object.assign({}, {x: parseInt(document.getElementById("fixedNodeX").value), y: parseInt(document.getElementById("fixedNodeY").value)})};
+ if(constraints.fixedNodeConstraint){
+ constraints.fixedNodeConstraint.push(fixedNode);
+ }
+ else{
+ constraints.fixedNodeConstraint = [fixedNode];
+ }
+
+ addToHistory("Fixed", [nodeId], fixedNode.position);
+ }
+});
+
+document.getElementById("verticalAlignment").addEventListener("click", function(){
+ if(cy.nodes(":selected").not(":parent").length > 0){
+ let valignArray = [];
+ cy.nodes(":selected").not(":parent").forEach(function(node){
+ valignArray.push(node.id());
+ });
+ if(constraints.alignmentConstraint){
+ if(constraints.alignmentConstraint.vertical){
+ constraints.alignmentConstraint.vertical.push(valignArray);
+ }
+ else{
+ constraints.alignmentConstraint.vertical = [valignArray];
+ }
+ }
+ else{
+ constraints.alignmentConstraint = {};
+ constraints.alignmentConstraint.vertical = [valignArray];
+ }
+ addToHistory("Alignment", valignArray, 'vertical');
+ }
+});
+
+document.getElementById("horizontalAlignment").addEventListener("click", function(){
+ if(cy.nodes(":selected").not(":parent").length > 0){
+ let halignArray = [];
+ cy.nodes(":selected").not(":parent").forEach(function(node){
+ halignArray.push(node.id());
+ });
+ if(constraints.alignmentConstraint){
+ if(constraints.alignmentConstraint.horizontal){
+ constraints.alignmentConstraint.horizontal.push(halignArray);
+ }
+ else{
+ constraints.alignmentConstraint.horizontal = [halignArray];
+ }
+ }
+ else{
+ constraints.alignmentConstraint = {};
+ constraints.alignmentConstraint.horizontal = [halignArray];
+ }
+ addToHistory("Alignment", halignArray, 'horizontal');
+ }
+});
+
+document.getElementById("relativePlacement").addEventListener("click", function(){
+ let nodeId1 = document.getElementById("nodeListRP1").value;
+ let nodeId2 = document.getElementById("nodeListRP2").value;
+ let isExist = false;
+ if(constraints.relativePlacementConstraint){
+ constraints.relativePlacementConstraint.forEach(function(constraint){
+ if(constraint["left"]){
+ if((constraint["left"] == nodeId1 && constraint["right"] == nodeId2 || constraint["left"] == nodeId2 && constraint["right"] == nodeId1) && document.getElementById("directionList").value == "left-right"){
+ isExist = true;
+ }
+ }
+ else {
+ if((constraint["top"] == nodeId1 && constraint["bottom"] == nodeId2 || constraint["top"] == nodeId2 && constraint["bottom"] == nodeId1) && document.getElementById("directionList").value == "top-bottom"){
+ isExist = true;
+ }
+ }
+ });
+ }
+ if((nodeId1 != nodeId2) && !isExist){
+ let relativePlacementConstraint;
+ if(document.getElementById("directionList").value == "left-right"){
+ relativePlacementConstraint = {left: nodeId1, right: nodeId2, gap: (document.getElementById("gap").value) ? (parseInt(document.getElementById("gap").value)) : undefined};
+ }
+ else{
+ relativePlacementConstraint = {top: nodeId1, bottom: nodeId2, gap: (document.getElementById("gap").value) ? (parseInt(document.getElementById("gap").value)) : undefined};
+ }
+ if(constraints.relativePlacementConstraint){
+ constraints.relativePlacementConstraint.push(relativePlacementConstraint);
+ }
+ else{
+ constraints.relativePlacementConstraint = [];
+ constraints.relativePlacementConstraint.push(relativePlacementConstraint);
+ }
+
+ if(document.getElementById("directionList").value == "left-right")
+ addToHistory("Relative", [nodeId1, nodeId2], 'l-r - ' + ((document.getElementById("gap").value) ? (parseInt(document.getElementById("gap").value)) : parseInt(cy.getElementById(nodeId1).width()/2 + cy.getElementById(nodeId2).width()/2 + 50)));
+ else{
+ addToHistory("Relative", [nodeId1, nodeId2], 't-b - ' + ((document.getElementById("gap").value) ? (parseInt(document.getElementById("gap").value)) : parseInt(cy.getElementById(nodeId1).height()/2 + cy.getElementById(nodeId2).height()/2 + 50)));
+ }
+ }
+});
+
+let addToHistory = function( constraintType, nodeIds, constraintInfo) {
+
+ let row = constraintListTable.insertRow();
+ let cell4 = row.insertCell(0);
+ let cell3 = row.insertCell(0);
+ let cell2 = row.insertCell(0);
+ let cell1 = row.insertCell(0);
+ cell1.innerHTML = constraintType;
+
+ if(constraintType == 'Fixed'){
+ let label = (cy.getElementById(nodeIds[0]).css('label') ? cy.getElementById(nodeIds[0]).css('label') : nodeIds);
+ if(label.length > 15)
+ label = label.substring(0, 12).concat("...");
+ cell2.innerHTML = label;
+ cell3.innerHTML = "x: "+constraintInfo.x+" y: "+constraintInfo.y;
+ }
+ else if(constraintType == 'Alignment'){
+ let nodeList = "";
+ nodeIds.forEach(function(nodeId, index){
+ let label = (cy.getElementById(nodeId).css('label') ? cy.getElementById(nodeId).css('label') : nodeId);
+ if(label.length > 15)
+ label = label.substring(0, 12).concat("...");
+ if(index == 0)
+ nodeList += label;
+ else
+ nodeList += ' - ' + label;
+ });
+ cell2.innerHTML = nodeList;
+ cell3.innerHTML = constraintInfo;
+ }
+ else{
+ let nodeList = "";
+ nodeIds.forEach(function(nodeId, index){
+ let label = (cy.getElementById(nodeId).css('label') ? cy.getElementById(nodeId).css('label') : nodeId);
+ if(label.length > 15)
+ label = label.substring(0, 12).concat("...");
+ if(index == 0)
+ nodeList += label;
+ else
+ nodeList += ' - ' + label;
+ });
+ cell2.innerHTML = nodeList;
+ cell3.innerHTML = constraintInfo;
+ }
+
+ // needed for highlighting constrained nodes
+ let instance = cy.viewUtilities({
+ highlightStyles: [
+ { node: { 'background-color': '#da14ff', 'border-color': '#980eb2'}, edge: {} }
+ ]
+ });
+
+ let rowToHighlight = $('#constraintListTable').find('tr').eq(row.rowIndex);
+
+ let collectionToHighlight = cy.collection();
+ nodeIds.forEach(function(id){
+ collectionToHighlight = collectionToHighlight.union(cy.getElementById(id));
+ });
+
+ // 'Delete' symbol
+ let button = document.createElement('button');
+ button.setAttribute('class','close');
+ button.setAttribute('aria-label', 'Close');
+ if(constraintType == 'Fixed')
+ button.onclick = function(event){
+ deleteRowElements(row, nodeIds);
+ instance.removeHighlights(collectionToHighlight.nodes());
+ };
+ else if(constraintType == 'Alignment')
+ button.onclick = function(event){
+ deleteRowElements(row, nodeIds, constraintInfo);
+ instance.removeHighlights(collectionToHighlight.nodes());
+ };
+ else
+ button.onclick = function(event){
+ deleteRowElements(row, nodeIds, constraintInfo);
+ instance.removeHighlights(collectionToHighlight.nodes());
+ };
+ let xSymbol = document.createElement('span');
+ xSymbol.setAttribute('aria-hidden', 'true');
+ xSymbol.style.color = "red";
+ xSymbol.innerHTML = '&times';
+ button.appendChild(xSymbol);
+ cell4.appendChild(button);
+
+ rowToHighlight.hover(function() {
+ instance.highlight(collectionToHighlight.nodes(), 0);
+ }, function() {
+ instance.removeHighlights(collectionToHighlight.nodes());
+ });
+};
+
+// Delete Row Elements
+let deleteRowElements = function (row, nodeIds, info) {
+ let constraintType = row.cells[0].innerHTML;
+ if (constraintType == 'Fixed') {
+ constraints.fixedNodeConstraint.forEach(function (item, index) {
+ if (item.nodeId == nodeIds[0]) {
+ constraints.fixedNodeConstraint.splice(index, 1);
+ }
+ });
+ if (constraints.fixedNodeConstraint.length == 0) {
+ constraints.fixedNodeConstraint = undefined;
+ }
+ } else if (constraintType == 'Alignment') {
+ if (info == 'vertical') {
+ constraints.alignmentConstraint.vertical.forEach(function (item, index) {
+ if (item.length == nodeIds.length) {
+ let equal = true;
+ item.forEach(function (nodeId, i) {
+ if (nodeId != nodeIds[i]) {
+ equal = false;
+ }
+ });
+ if (equal) {
+ constraints.alignmentConstraint.vertical.splice(index, 1);
+ if (constraints.alignmentConstraint.vertical.length == 0) {
+ delete constraints.alignmentConstraint.vertical;
+ if (!constraints.alignmentConstraint.horizontal) {
+ constraints.alignmentConstraint = undefined;
+ }
+ }
+ }
+ }
+ });
+ } else {
+ constraints.alignmentConstraint.horizontal.forEach(function (item, index) {
+ if (item.length == nodeIds.length) {
+ let equal = true;
+ item.forEach(function (nodeId, i) {
+ if (nodeId != nodeIds[i]) {
+ equal = false;
+ }
+ });
+ if (equal) {
+ constraints.alignmentConstraint.horizontal.splice(index, 1);
+ if (constraints.alignmentConstraint.horizontal.length == 0) {
+ delete constraints.alignmentConstraint.horizontal;
+ if (!constraints.alignmentConstraint.vertical) {
+ constraints.alignmentConstraint = undefined;
+ }
+ }
+ }
+ }
+ });
+ }
+ }
+ else{
+ constraints.relativePlacementConstraint.forEach(function(item, index){
+ if(info.substring(0,1) == 'l'){
+ if(item.left && item.left == nodeIds[0] && item.right == nodeIds[1]){
+ constraints.relativePlacementConstraint.splice(index, 1);
+ if(constraints.relativePlacementConstraint.length == 0){
+ constraints.relativePlacementConstraint = undefined;
+ }
+ }
+ }
+ else{
+ if(item.top && item.top == nodeIds[0] && item.bottom == nodeIds[1]){
+ constraints.relativePlacementConstraint.splice(index, 1);
+ if(constraints.relativePlacementConstraint.length == 0){
+ constraints.relativePlacementConstraint = undefined;
+ }
+ }
+ }
+ });
+ }
+ constraintListTable.deleteRow(row.rowIndex);
+};
+
+// Clear logs table
+let clearConstraintListTable = function() {
+ if (constraintListTable.rows.length > 1) {
+ let length = constraintListTable.rows.length;
+ for (let i = 0; i < length - 1; i++) {
+ constraintListTable.deleteRow(1);
+ }
+ }
+};
+
+let fillConstraintListTableFromConstraints = function () {
+ if(constraints.fixedNodeConstraint){
+ constraints.fixedNodeConstraint.forEach(function(constraint){
+ addToHistory("Fixed", [constraint.nodeId], constraint.position);
+ });
+ }
+ if(constraints.alignmentConstraint){
+ if(constraints.alignmentConstraint.vertical){
+ constraints.alignmentConstraint.vertical.forEach(function(item){
+ addToHistory("Alignment", item, 'vertical');
+ });
+ }
+ if(constraints.alignmentConstraint.horizontal){
+ constraints.alignmentConstraint.horizontal.forEach(function(item){
+ addToHistory("Alignment", item, 'horizontal');
+ });
+ }
+ }
+ if(constraints.relativePlacementConstraint){
+ constraints.relativePlacementConstraint.forEach(function(constraint){
+ if(constraint.left)
+ addToHistory("Relative", [constraint.left, constraint.right], 'l-r - ' + (constraint.gap ? parseInt(constraint.gap) : parseInt(cy.getElementById(constraint.left).width()/2 + cy.getElementById(constraint.right).width()/2 + 50)));
+ else
+ addToHistory("Relative", [constraint.top, constraint.bottom], 't-b - ' + (constraint.gap ? parseInt(constraint.gap) : parseInt(cy.getElementById(constraint.top).height()/2 + cy.getElementById(constraint.bottom).height()/2 + 50)));
+ });
+
+ }
+};
+
+//// Samples
+let elements1 = {
+ nodes: [
+ {data: {id: 'n1'}},
+ {data: {id: 'n2'}},
+ {data: {id: 'n3', parent: 'n8'}},
+ {data: {id: 'n5'}},
+ {data: {id: 'n6', parent: 'n8'}},
+ {data: {id: 'n7', parent: 'n8'}},
+ {data: {id: 'n8'}},
+ {data: {id: 'f1'}, classes: ['fixed']},
+ {data: {id: 'f2'}, classes: ['fixed']},
+ {data: {id: 'f3', parent: 'n8'}, classes: ['fixed']},
+ ],
+ edges: [
+ {data: {source: 'n1', target: 'f1'}},
+ {data: {source: 'n1', target: 'n3'}},
+ {data: {source: 'f1', target: 'n2'}},
+ {data: {source: 'f1', target: 'n3'}},
+ {data: {source: 'n3', target: 'f2'}},
+ {data: {source: 'f2', target: 'n5'}},
+ {data: {source: 'n5', target: 'n8'}},
+ {data: {source: 'n6', target: 'n3'}},
+ {data: {source: 'n6', target: 'n7'}},
+ {data: {source: 'n6', target: 'f3'}}
+ ]
+};
+
+let elements2 = {
+ nodes: [
+ {data: {id: 'n1', parent: 'n6'}},
+ {data: {id: 'n2', parent: 'n6'}},
+ {data: {id: 'n3'}},
+ {data: {id: 'n4'}},
+ {data: {id: 'n5', parent: 'n8'}},
+ {data: {id: 'n6'}},
+ {data: {id: 'n7'}},
+ {data: {id: 'n8'}},
+ {data: {id: 'v1', parent: 'n6'}, classes: ['alignment']},
+ {data: {id: 'v2'}, classes: ['alignment']},
+ {data: {id: 'v3', parent: 'n8'}, classes: ['alignment']},
+ {data: {id: 'v4', parent: 'n8'}, classes: ['alignment']},
+ {data: {id: 'v5', parent: 'n5'}, classes: ['alignment']},
+ {data: {id: 'h1'}, classes: ['alignment']},
+ {data: {id: 'h2'}, classes: ['alignment']},
+ {data: {id: 'h3'}, classes: ['alignment']},
+ {data: {id: 'h4', parent: 'n7'}, classes: ['alignment']},
+ {data: {id: 'h5', parent: 'n7'}, classes: ['alignment']},
+ {data: {id: 'vh1', parent: 'n6'}, classes: ['alignment']},
+ {data: {id: 'vh2', parent: 'n5'}, classes: ['alignment']}
+ ],
+ edges: [
+ {data: {source: 'v1', target: 'vh1'}},
+ {data: {source: 'v1', target: 'n1'}},
+ {data: {source: 'n1', target: 'n2'}},
+ {data: {source: 'n2', target: 'vh1'}},
+ {data: {source: 'n6', target: 'h1'}},
+ {data: {source: 'h1', target: 'h2'}},
+ {data: {source: 'n6', target: 'n3'}},
+ {data: {source: 'n3', target: 'v2'}},
+ {data: {source: 'n3', target: 'h4'}},
+ {data: {source: 'h4', target: 'h5'}},
+ {data: {source: 'h4', target: 'v3'}},
+ {data: {source: 'v3', target: 'v4'}},
+ {data: {source: 'v3', target: 'n5'}},
+ {data: {source: 'v5', target: 'vh2'}},
+ {data: {source: 'v3', target: 'n4'}},
+ {data: {source: 'h3', target: 'n8'}},
+ {data: {source: 'n4', target: 'h3'}}
+ ]
+};
+
+let elements3 = {
+ nodes: [
+ {data: {id: 'r1', parent: 'n8'}, classes: ['relative']},
+ {data: {id: 'r2', parent: 'n8'}, classes: ['relative']},
+ {data: {id: 'r3', parent: 'n8'}, classes: ['relative']},
+ {data: {id: 'r4'}, classes: ['relative']},
+ {data: {id: 'r5'}, classes: ['relative']},
+ {data: {id: 'r6', parent: 'n7'}, classes: ['relative']},
+ {data: {id: 'r7', parent: 'n10'}, classes: ['relative']},
+ {data: {id: 'r8', parent: 'n10'}, classes: ['relative']},
+ {data: {id: 'n1', parent: 'n7'}},
+ {data: {id: 'n2'}},
+ {data: {id: 'n3'}},
+ {data: {id: 'n4'}},
+ {data: {id: 'n5'}},
+ {data: {id: 'n6'}},
+ {data: {id: 'n7', parent: 'n10'}},
+ {data: {id: 'n8'}},
+ {data: {id: 'n9'}},
+ {data: {id: 'n10'}}
+ ],
+ edges: [
+ {data: {source: 'r6', target: 'n1'}},
+ {data: {source: 'r6', target: 'n3'}},
+ {data: {source: 'n1', target: 'r8'}},
+ {data: {source: 'n1', target: 'r5'}},
+ {data: {source: 'n1', target: 'r7'}},
+ {data: {source: 'n2', target: 'n3'}},
+ {data: {source: 'n2', target: 'r2'}},
+ {data: {source: 'n2', target: 'n4'}},
+ {data: {source: 'r5', target: 'n5'}},
+ {data: {source: 'r5', target: 'n6'}},
+ {data: {source: 'r2', target: 'r1'}},
+ {data: {source: 'r2', target: 'r3'}},
+ {data: {source: 'n7', target: 'n9'}},
+ {data: {source: 'n5', target: 'n6'}},
+ {data: {source: 'n5', target: 'r4'}}
+ ]
+};
+
+let elements4 = [
+ {group: 'nodes', data: {id: 'n1'}},
+ {group: 'nodes', data: {id: 'n2'}},
+ {group: 'nodes', data: {id: 'n3'}},
+ {group: 'nodes', data: {id: 'n4'}},
+ {group: 'nodes', data: {id: 'n5'}},
+ {group: 'nodes', data: {id: 'n6', parent: 'n24'}},
+ {group: 'nodes', data: {id: 'n7', parent: 'n24'}},
+ {group: 'nodes', data: {id: 'n8', parent: 'n24'}},
+ {group: 'nodes', data: {id: 'n9'}},
+ {group: 'nodes', data: {id: 'n10', parent: 'n28'}},
+ {group: 'nodes', data: {id: 'n11', parent: 'n28'}},
+ {group: 'nodes', data: {id: 'n12', parent: 'n28'}},
+ {group: 'nodes', data: {id: 'n13', parent: 'n28'}},
+ {group: 'nodes', data: {id: 'n14', parent: 'n28'}},
+ {group: 'nodes', data: {id: 'n15'}},
+ {group: 'nodes', data: {id: 'n16'}},
+ {group: 'nodes', data: {id: 'n17'}},
+ {group: 'nodes', data: {id: 'n18'}},
+ {group: 'nodes', data: {id: 'n19'}},
+ {group: 'nodes', data: {id: 'n20', parent: 'n26'}},
+ {group: 'nodes', data: {id: 'n21', parent: 'n26'}},
+ {group: 'nodes', data: {id: 'n22', parent: 'n27'}},
+ {group: 'nodes', data: {id: 'n23', parent: 'n25'}},
+ {group: 'nodes', data: {id: 'n24'}},
+ {group: 'nodes', data: {id: 'n25'}},
+ {group: 'nodes', data: {id: 'n26', parent: 'n30'}},
+ {group: 'nodes', data: {id: 'n27', parent: 'n29'}},
+ {group: 'nodes', data: {id: 'n28', parent: 'n29'}},
+ {group: 'nodes', data: {id: 'n29', parent: 'n30'}},
+ {group: 'nodes', data: {id: 'n30'}},
+ {group: 'nodes', data: {id: 'f1', parent: 'n29'}, classes: ['fixed']},
+ {group: 'nodes', data: {id: 'f2', parent: 'n28'}, classes: ['fixed']},
+ {group: 'nodes', data: {id: 'h1'}, classes: ['alignment']},
+ {group: 'nodes', data: {id: 'h2'}, classes: ['alignment']},
+ {group: 'nodes', data: {id: 'h3'}, classes: ['alignment']},
+ {group: 'nodes', data: {id: 'v1', parent: 'n24'}, classes: ['alignment']},
+ {group: 'nodes', data: {id: 'v2', parent: 'n25'}, classes: ['alignment']},
+ {group: 'nodes', data: {id: 'v3'}, classes: ['alignment']},
+ {group: 'nodes', data: {id: 'v4'}, classes: ['alignment']},
+ {group: 'nodes', data: {id: 'h4r'}, classes: ['alignment']},
+ {group: 'nodes', data: {id: 'r1', parent: 'n29'}, classes: ['relative']},
+ {group: 'nodes', data: {id: 'r2', parent: 'n29'}, classes: ['relative']},
+ {group: 'nodes', data: {id: 'r3'}, classes: ['relative']},
+ {group: 'edges', data: {id: 'e2', source: 'n2', target: 'n3'}},
+ {group: 'edges', data: {id: 'e3', source: 'n1', target: 'n2'}},
+ {group: 'edges', data: {id: 'e4', source: 'n3', target: 'v1'}},
+ {group: 'edges', data: {id: 'e5', source: 'n2', target: 'v1'}},
+ {group: 'edges', data: {id: 'e6', source: 'v1', target: 'n4'}},
+// {group: 'edges', data: {id: 'e7', source: 'n5', target: 'n6'}},
+ {group: 'edges', data: {id: 'e8', source: 'v1', target: 'n5'}},
+ {group: 'edges', data: {id: 'e9', source: 'v1', target: 'n6'}},
+ {group: 'edges', data: {id: 'e10', source: 'v1', target: 'n7'}},
+// {group: 'edges', data: {id: 'e11', source: 'n3', target: 'n9'}},
+ {group: 'edges', data: {id: 'e12', source: 'n6', target: 'n8'}},
+ {group: 'edges', data: {id: 'e13', source: 'h1', target: 'n16'}},
+ { group:'edges', data:{ id: 'e14', source: 'v2', target: 'n23'} },
+ {group: 'edges', data: {id: 'e15', source: 'n16', target: 'n15'}},
+ {group: 'edges', data: {id: 'e16', source: 'n16', target: 'h2'}},
+ {group: 'edges', data: {id: 'e17', source: 'n15', target: 'n17'}},
+ {group: 'edges', data: {id: 'e18', source: 'h3', target: 'v3'}},
+ {group: 'edges', data: {id: 'e19', source: 'v3', target: 'n18'}},
+ {group: 'edges', data: {id: 'e20', source: 'n17', target: 'n19'}},
+ {group: 'edges', data: {id: 'e21', source: 'n18', target: 'n19'}},
+ {group: 'edges', data: {id: 'e22', source: 'h2', target: 'n19'}},
+ {group: 'edges', data: {id: 'e23', source: 'n19', target: 'h3'}},
+ {group: 'edges', data: {id: 'e25', source: 'v4', target: 'n20'}},
+ {group: 'edges', data: {id: 'e26', source: 'n20', target: 'n21'}},
+ {group: 'edges', data: {id: 'e27', source: 'n25', target: 'f1'}},
+ {group: 'edges', data: {id: 'e29', source: 'f1', target: 'n26'}},
+ {group: 'edges', data: {id: 'e30', source: 'f1', target: 'r2'}},
+ {group: 'edges', data: {id: 'e31', source: 'f1', target: 'r1'}},
+ {group: 'edges', data: {id: 'e33', source: 'h3', target: 'v2'}},
+ {group: 'edges', data: {id: 'e35', source: 'f2', target: 'n11'}},
+ {group: 'edges', data: {id: 'e36', source: 'f2', target: 'n10'}},
+ {group: 'edges', data: {id: 'e37', source: 'n11', target: 'n10'}},
+ {group: 'edges', data: {id: 'e38', source: 'n12', target: 'n13'}},
+ {group: 'edges', data: {id: 'e39', source: 'n12', target: 'n14'}},
+ {group: 'edges', data: {id: 'e40', source: 'h2', target: 'n27'}},
+ {group: 'edges', data: {id: 'e41', source: 'n9', target: 'r3'}},
+ {group: 'edges', data: {id: 'e42', source: 'n9', target: 'h4r'}},
+ {group: 'edges', data: {id: 'e43', source: 'r3', target: 'h4r'}},
+ {group: 'edges', data: {id: 'e44', source: 'n11', target: 'r3'}},
+ {group: 'edges', data: {id: 'e45', source: 'n14', target: 'r3'}}
+];
+
+let elements5 = {
+ nodes: [
+ {data: {id: 'r1'}, classes: ['relative'], position:{x:318, y:150}},
+ {data: {id: 'r2'}, classes: ['relative'], position:{x:413, y:148}},
+ {data: {id: 'r3'}, classes: ['relative'], position:{x:128, y:-151}},
+ {data: {id: 'r4'}, classes: ['relative'], position:{x:132, y:-38}},
+ {data: {id: 'f1v', parent: 'n8'}, classes: ['fixed'], position:{x:-79, y:276}},
+ {data: {id: 'f2h', parent: 'n6'}, classes: ['fixed'], position:{x:96, y:82}},
+ {data: {id: 'v1', parent: 'n5'}, classes: ['alignment'], position:{x:-290, y:153}},
+ {data: {id: 'v2', parent: 'n5'}, classes: ['alignment'], position:{x:-197, y:152}},
+ {data: {id: 'v3', parent: 'n8'}, classes: ['alignment'], position:{x:-85, y:177}},
+ {data: {id: 'h1', parent: 'n7'}, classes: ['alignment'], position:{x:1, y:-9}},
+ {data: {id: 'h2', parent: 'n7'}, classes: ['alignment'], position:{x:0, y:-104}},
+ {data: {id: 'n0', parent: 'n6'}, position:{x:186, y:219}},
+ {data: {id: 'n1', parent: 'n6'}, position:{x:197, y:122}},
+ {data: {id: 'n2', parent: 'n6'}, position:{x:93, y:186}},
+ {data: {id: 'n3'}, position:{x:-267, y:20}},
+ {data: {id: 'n4'}, position:{x:-167, y:-10}},
+ {data: {id: 'n5', parent: 'n8'}},
+ {data: {id: 'n6'}},
+ {data: {id: 'n7'}},
+ {data: {id: 'n8'}}
+ ],
+ edges: [
+ {data: {source: 'n0', target: 'n1'}},
+ {data: {source: 'n0', target: 'n2'}},
+ {data: {source: 'n6', target: 'r1'}},
+ {data: {source: 'n1', target: 'f2h'}},
+ {data: {source: 'r1', target: 'r2'}},
+ {data: {source: 'n2', target: 'f2h'}},
+ {data: {source: 'n6', target: 'r4'}},
+ {data: {source: 'n3', target: 'n4'}},
+ {data: {source: 'n3', target: 'n8'}},
+ {data: {source: 'n4', target: 'v3'}},
+ {data: {source: 'r4', target: 'h1'}},
+ {data: {source: 'r4', target: 'r3'}},
+ {data: {source: 'h1', target: 'h2'}},
+ {data: {source: 'v1', target: 'v2'}},
+ {data: {source: 'v3', target: 'n5'}},
+ {data: {source: 'h1', target: 'v3'}},
+ {data: {source: 'v3', target: 'f1v'}}
+ ]
+};
+
+let elements5_positions = [
+ {x:318, y:150},
+ {x:413, y:148},
+ {x:128, y:-151},
+ {x:132, y:-38},
+ {x:-79, y:276},
+ {x:96, y:82},
+ {x:-290, y:153},
+ {x:-197, y:152},
+ {x:-85, y:177},
+ {x:1, y:-9},
+ {x:0, y:-104},
+ {x:186, y:219},
+ {x:197, y:122},
+ {x:93, y:186},
+ {x:-267, y:20},
+ {x:-167, y:-10},
+ {x:318, y:150},
+ {x:318, y:150}
+];
+
+let sample1_constraints = {
+ "fixedNodeConstraint": [
+ {
+ "nodeId": "f1",
+ "position": {
+ "x": -150,
+ "y": -100
+ }
+ },
+ {
+ "nodeId": "f2",
+ "position": {
+ "x": -50,
+ "y": -150
+ }
+ },
+ {
+ "nodeId": "f3",
+ "position": {
+ "x": 100,
+ "y": 150
+ }
+ }
+ ]
+};
+
+let sample2_constraints = {
+ "alignmentConstraint": {
+ "vertical": [
+ [
+ "v1",
+ "v2",
+ "vh1"
+ ],
+ [
+ "v3",
+ "v4",
+ "v5",
+ "vh2"
+ ]
+ ],
+ "horizontal": [
+ [
+ "h1",
+ "h2",
+ "h3"
+ ],
+ [
+ "h4",
+ "h5",
+ "vh1",
+ "vh2"
+ ]
+ ]
+ }
+};
+
+let sample3_constraints = {
+ "relativePlacementConstraint": [
+ {
+ "left": "r1",
+ "right": "r2",
+ "gap": 100
+ },
+ {
+ "top": "r1",
+ "bottom": "r2",
+ "gap": 100
+ },
+ {
+ "left": "r2",
+ "right": "r3",
+ "gap": 200
+ },
+ {
+ "top": "r4",
+ "bottom": "r5",
+ "gap": 150
+ },
+ {
+ "left": "r6",
+ "right": "r7",
+ "gap": 150
+ },
+ {
+ "top": "r8",
+ "bottom": "r7",
+ "gap": 100
+ }
+ ]
+};
+
+let sample4_constraints = {
+ "fixedNodeConstraint": [
+ {
+ "nodeId": "f1",
+ "position": {
+ "x": -100,
+ "y": 0
+ }
+ },
+ {
+ "nodeId": "f2",
+ "position": {
+ "x": 300,
+ "y": 0
+ }
+ }
+ ],
+ "alignmentConstraint": {
+ "horizontal": [
+ [
+ "h1",
+ "h2",
+ "h3",
+ "h4r"
+ ]
+ ],
+ "vertical": [
+ [
+ "v1",
+ "v2",
+ "v3",
+ "v4"
+ ]
+ ]
+ },
+ "relativePlacementConstraint": [
+ {
+ "top": "r1",
+ "bottom": "r2",
+ "gap": 150
+ },
+ {
+ "left": "r3",
+ "right": "h4r",
+ "gap": 150
+ }
+ ]
+};
\ No newline at end of file
diff --git a/node_modules/cytoscape-fcose/demo/demo-constraint.html b/node_modules/cytoscape-fcose/demo/demo-constraint.html
new file mode 100644
index 00000000..be11614f
--- /dev/null
+++ b/node_modules/cytoscape-fcose/demo/demo-constraint.html
@@ -0,0 +1,345 @@
+<!DOCTYPE>
+
+<html>
+
+ <head>
+ <title>cytoscape-fcose.js demo</title>
+
+ <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1">
+
+ <!-- Bootstrap, popper, jQuery and filesaver - for demo purpose only -->
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"></script>
+ <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
+ <script src="https://raw.githack.com/eligrey/FileSaver.js/master/dist/FileSaver.min.js"></script>
+ <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet">
+
+ <!-- Cytoscape and fcose -->
+ <script src="https://unpkg.com/cytoscape/dist/cytoscape.min.js"></script>
+ <script src="https://unpkg.com/layout-base/layout-base.js"></script>
+ <script src="https://unpkg.com/cose-base/cose-base.js"></script>
+ <script src="../cytoscape-fcose.js"></script>
+
+ <script src="demo-constraint-control.js" defer></script>
+
+ <!-- CoLa for local comparison only -->
+ <!-- <script src="https://unpkg.com/webcola/WebCola/cola.min.js"></script> -->
+ <!-- <script src="cytoscape-cola.js"></script> -->
+
+ <script src="https://unpkg.com/cytoscape-layout-utilities/cytoscape-layout-utilities.js"></script>
+ <script src="https://unpkg.com/cytoscape-view-utilities/cytoscape-view-utilities.js"></script>
+ <script src="https://unpkg.com/cytoscape-graphml/cytoscape-graphml.js"></script> <!-- graphml - for demo purpose only-->
+ <!-- <script src="https://raw.githack.com/iVis-at-Bilkent/cytoscape.js-layvo/unstable/cytoscape-layvo.js"></script> --> <!-- For quality metrics -->
+ <!-- <script src="https://raw.githack.com/kinimesi/cytoscape-svg/master/cytoscape-svg.js"></script> --> <!-- For svg export -->
+
+ <!-- We use a workaround here to be able to debug real world files in local by keeping json content as js variable. -->
+ <script type="text/javascript" src="samples/unix.js"></script>
+ <script type="text/javascript" src="samples/unix_constraints.js"></script>
+ <script type="text/javascript" src="samples/chalk.js"></script>
+ <script type="text/javascript" src="samples/chalk_constraints.js"></script>
+ <script type="text/javascript" src="samples/uwsn.js"></script>
+ <script type="text/javascript" src="samples/uwsn_constraints.js"></script>
+ <script type="text/javascript" src="samples/callGraph.js"></script>
+ <script type="text/javascript" src="samples/callGraph_constraints.js"></script>
+ <script type="text/javascript" src="samples/wsn.js"></script>
+ <script type="text/javascript" src="samples/wsn_constraints.js"></script>
+
+ <style>
+ body {
+ font-family: helvetica neue, helvetica, liberation sans, arial, sans-serif;
+ font-size: 13px;
+ }
+
+ #cy {
+ position: relative;
+ width: auto;
+ height: 95%;
+ z-index: 999;
+ margin-left: 375px;
+ right: 0px;
+ }
+
+ h1 {
+ opacity: 1;
+ color: #555;
+ font-size: 15px;
+ font-weight: bold;
+ padding-top: 5px;
+ }
+
+ hr.line {
+ margin-top: 9px;
+ margin-bottom: 9px
+ }
+
+ /* The sidepanel menu */
+ .sidepanel {
+ height: auto; /* Specify a height */
+ width: 375px; /* 0 width - change this with JavaScript */
+ position: absolute; /* Stay in place */
+ z-index: 1000; /* Stay on top */
+ float: left;
+ top: auto;
+ left: 0;
+ background-color: #d9fbff;
+ overflow-x: hidden; /* Disable horizontal scroll */
+ padding-top: 10px; /* Place content 10px from the top */
+ padding-bottom: 10px; /* Place content 10px from the bottom */
+ transition: 0s; /* 0.5 second transition effect to slide in the sidepanel */
+ }
+
+ table{
+ margin-left: 8;
+ margin-right: 10;
+ width: 360px;
+ }
+
+ /* The sidepanel links */
+ table td {
+ padding: 4px 4px 4px 0px;
+ text-decoration: none;
+ font-size: 14px;
+ color: #555;
+ transition: 0.3s;
+ text-align: left;
+ }
+
+ .layoutButton {
+ color: #555;
+ cursor: pointer;
+ background-color: #b7ffff;
+ padding: 5px 10px;
+ border: none;
+ margin-bottom: 5px;
+ }
+
+ .constraintButton {
+ cursor: pointer;
+ padding: 2px 5px;
+ background-color: #64ffee;
+ border-radius: 3px;
+ border-width: 1px;
+ }
+
+ .constraintButtonLarge {
+ cursor: pointer;
+ padding: 5px;
+ background-color: #64ffee;
+ border-radius: 3px;
+ border-width: 1px;
+ }
+
+ .btn-group-sm>.btn, .btn-sm {
+ font-size: 13px;
+ background-color: #7d8991;
+ border-color: #7d8991;
+ }
+
+ .btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active, .open>.dropdown-toggle.btn-primary {
+ color: #fff;
+ background-color: #60717d;
+ border-color: #60717d; /*set the color you want here*/
+ }
+
+ .btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active, .btn-outline-primary.active, .open>.dropdown-toggle.btn-primary {
+ color: #fff;
+ background-color: #60717d;
+ border-color: #60717d; /*set the color you want here*/
+ }
+
+ .btn-outline-primary{
+ font-size: 13px;
+ background-color: #ffffff;
+ color: #7d8991;
+ }
+
+ .form-control-sm {
+ font-size: 13px
+ }
+
+ .custom-select-sm {
+ font-size: 13px
+ }
+
+ .textField {
+ padding-left: 5px;
+ }
+
+ .checkbox {
+ margin-left: 0px;
+ }
+
+ .button:hover {
+ background-color: #0f0;
+ }
+
+ .custom-control-label {
+ padding-top: 2px;
+ }
+
+ .custom-control-input:checked~.custom-control-label::before {
+ color: #fff;
+ border-color: #7d8991;
+ background-color: #7d8991;
+ }
+
+ </style>
+ </head>
+ <body>
+ <h1 class="ml-2">cytoscape-fcose demo (constraint)</h1>
+ <div style='width: 375px; position: absolute;'>
+ <!-- File menu-->
+ <input id="inputFile" type='file' style="display: none" />
+ <input type="button" id="openFile" type="button" class="btn btn-primary btn-sm ml-2" data-toggle="tooltip" title="Load graphml file" value="Load Graph"/>&nbsp
+ <select id="sample" class="custom-select custom-select-sm ml-2" style="width:auto;">
+ <option value="sample1" selected="">sample1 - fixed</option>
+ <option value="sample2">sample2 - alignment</option>
+ <option value="sample3">sample3 - relative</option>
+ <option value="sample4">sample4 - hybrid</option>
+ <option value="sample4">sample5</option>
+ <option value="sample5">unix-family-tree</option>
+ <option value="sample6">chalk-dependency</option>
+ <option value="sample7">UW-sensor-network</option>
+ <option value="sample8">python-call-graph</option>
+ <option value="sample9">wireless-sensor-network</option>
+ </select>
+ <!-- File Menu End -->
+
+ <hr class="line">
+
+ <!-- Layout Menu-->
+ <button id="randomizeButton" class="btn btn-primary btn-sm mb-2 ml-2">Randomize</button>&nbsp
+ <button id="fcoseButton" class="btn btn-primary btn-sm mb-2">fCoSE</button>&nbsp
+ <!-- <button id="colaButton" class="btn btn-primary btn-sm mb-2">CoLa</button>&nbsp -->
+ <div class="custom-control custom-control-inline custom-checkbox">
+ <input type="checkbox" class="custom-control-input" id="incremental" name="incremental">
+ <label class="custom-control-label" for="incremental">Incremental</label>
+ </div><br>
+ <button id="draftButton" class="btn btn-outline-primary btn-sm ml-2">Draft</button>&nbsp
+ <button id="transformButton" class="btn btn-outline-primary btn-sm">Transform</button>&nbsp
+ <button id="enforceButton" class="btn btn-outline-primary btn-sm">Enforce</button>&nbsp
+ <button id="coseButton" class="btn btn-outline-primary btn-sm">CoSE</button><br>
+ <!-- Layout Menu End-->
+
+ <hr class="line">
+ <div id="mySidepanel" class="sidepanel">
+ <!-- Constraints Menu -->
+ <table id="ConstraintIOTable">
+ <tr>
+ <td style = "width: 25%"><h7 class="card-subtitle mt-1 text-muted"><b>Constraints</b></h7></td>
+ <td><button id="importConstraint" type="button" class="btn btn-primary btn-sm ml-1" onclick="document.getElementById('inputConstraint').click();" data-toggle="tooltip" title="Import constraint file">Import</button>
+ <input id="inputConstraint" type='file' style="display: none" /></td>
+ <td><button id="exportConstraint" type="button" class="btn btn-primary btn-sm" data-toggle="tooltip" title="Export constraint file">Export</button></td>
+ <td style = "width: 35%"></td>
+ </tr>
+ </table>
+
+ <hr class="line">
+
+ <!-- <button id="saveAsSVG" type="button" class="layoutButton" data-toggle="tooltip" title="Save graph as SVG file">Save as SVG</button> -->
+ <!-- Fixed Node Constraints -->
+ <form>
+ <div class="form-row">
+ <div class="form-group col-md-12 mb-2">
+ <h7 class="card-subtitle ml-2 mt-1 text-muted"><b>Fixed Node Constraint</b></h7>
+ </div>
+ </div>
+ <div class="form-row form-inline">
+ <div id="nodeListColumn" class="form-group col-md-4 ml-2 mr-3">
+ </div>
+ <div class="form-group col-md-5">
+ <label>x : </label>
+ <input type="text" class="form-control form-control-sm w-25 ml-1 mr-1" style="display:flex; flex-grow:1" id="fixedNodeX" value="">
+ <label>y : </label>
+ <input type="text" class="form-control form-control-sm w-25 ml-1 mr-1" style="display:flex; flex-grow:1" id="fixedNodeY" value="">
+ </div>
+ <div class="form-group col-md-2">
+ <input type="button" id="fixedNode" class="btn btn-primary btn-sm" value="Add"/>
+ </div>
+ </div>
+ </form>
+
+ <hr class="line">
+
+ <!-- Alignment Constraints -->
+ <form>
+ <div class="form-row">
+ <div class="form-group col-md-12 mb-2">
+ <h7 class="card-subtitle ml-2 mt-1 text-muted"><b>Alignment Constraint</b></h7>
+ </div>
+ </div>
+ <div class="form-row form-inline mb-2">
+ <div class="form-group col-md-8">
+ <h7 class="card-subtitle ml-2 mt-1 text-muted">Selected Nodes Vertically</h7>
+ </div>
+ <div class="form-group col-md-3">
+ <input type="button" id="verticalAlignment" class="btn btn-primary btn-sm" value="Add"/>
+ </div>
+ </div>
+ <div class="form-row form-inline">
+ <div class="form-group col-md-8">
+ <h7 class="card-subtitle ml-2 mt-1 text-muted">Selected Nodes Horizontally</h7>
+ </div>
+ <div class="form-group col-md-3">
+ <input type="button" id="horizontalAlignment" class="btn btn-primary btn-sm" value="Add"/>
+ </div>
+ </div>
+ <div class="form-row">
+ <div class="form-group col-md-12 mt-2 mb-0">
+ <span style="margin-left: 9px; font-size: 12px">Click on a node for selecting. Shift + click for extending selection.</span>
+ </div>
+ </div>
+ </form>
+
+ <hr class="line">
+
+ <!-- Relative Placement Constraints -->
+ <form>
+ <div class="form-row">
+ <div class="form-group col-md-12 mb-2">
+ <h7 class="card-subtitle ml-2 mt-1 text-muted"><b>Relative Placement Constraint</b></h7>
+ </div>
+ </div>
+ <div class="form-row form-inline">
+ <div id="nodeListColumnRP1" class="form-group col-md-12 ml-2 mb-2"></div>
+ </div>
+ <div class="form-row form-inline mb-2">
+ <div class="form-group col-md-4">
+ <select id="directionList" class='custom-select custom-select-sm ml-2' style='width:auto;'>
+ <option value="left-right">left-right</option>
+ <option value="top-bottom">top-bottom</option>
+ </select>
+ </div>
+ <div class="form-group col-md-4">
+ <label>Gap: </label>
+ <input type="text" class="form-control form-control-sm w-50 ml-1" id="gap" value="">
+ </div>
+ <div class="form-group col-md-2">
+ <input type="button" id="relativePlacement" class="btn btn-primary btn-sm" value="Add"/>
+ </div>
+ </div>
+ <div class="form-row form-inline mb-2">
+ <div id="nodeListColumnRP2" class="form-group col-md-12 ml-2"></div>
+ </div>
+ </form>
+
+ <hr class="line">
+
+ <table id="constraintListTable" class="table-striped">
+ <div class="form-group col-md-12 mt-1 mb-1" style="padding-left: 9px">
+ <span style="font-size: 12px">Hover a constraint row to see involved nodes.</span>
+ </div>
+ <tr>
+ <th style="font-size: 0.9em; text-align: left; width:25%">Type</th>
+ <th style="font-size: 0.9em; text-align: left; width:40%">Nodes</th>
+ <th style="font-size: 0.9em; text-align: left;">Info</th>
+ <th style="font-size: 0.9em; text-align: left;"></th>
+ </tr>
+ </table>
+ </div>
+ <!-- Constraints Menu End-->
+ </div>
+ <div id="cy"></div>
+ </body>
+
+</html>
diff --git a/node_modules/cytoscape-fcose/demo/demo.gif b/node_modules/cytoscape-fcose/demo/demo.gif
new file mode 100644
index 00000000..5edfe25b
Binary files /dev/null and b/node_modules/cytoscape-fcose/demo/demo.gif differ
diff --git a/node_modules/cytoscape-fcose/demo/demo.html b/node_modules/cytoscape-fcose/demo/demo.html
new file mode 100644
index 00000000..0ba21eb7
--- /dev/null
+++ b/node_modules/cytoscape-fcose/demo/demo.html
@@ -0,0 +1,457 @@
+<!DOCTYPE>
+
+<html>
+
+ <head>
+ <title>cytoscape-fcose.js demo</title>
+
+ <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1">
+
+ <!-- Bootstrap, popper, jQuery and filesaver - for demo purpose only -->
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"></script>
+ <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
+ <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet">
+
+ <script src="https://unpkg.com/cytoscape/dist/cytoscape.min.js"></script>
+ <script src="https://unpkg.com/layout-base/layout-base.js"></script>
+ <script src="https://unpkg.com/cose-base/cose-base.js"></script>
+ <script src="https://unpkg.com/cytoscape-layout-utilities/cytoscape-layout-utilities.js"></script>
+
+ <!-- for testing with local version of cytoscape.js -->
+ <!--<script src="../cytoscape.js/build/cytoscape.js"></script>-->
+
+ <script src="../cytoscape-fcose.js"></script>
+
+ <style>
+ body {
+ font-family: helvetica neue, helvetica, liberation sans, arial, sans-serif;
+ font-size: 14px;
+ }
+
+ #cy {
+ position: relative;
+ width: auto;
+ height: 90%;
+ z-index: 999;
+ margin-left: 290px;
+ right: 0px;
+ }
+
+ h1 {
+ opacity: 1;
+ color: #555;
+ font-size: 15px;
+ font-weight: bold;
+ padding-top: 5px;
+ }
+
+ /* The sidepanel menu */
+ .sidepanel {
+ height: auto; /* Specify a height */
+ width: 290px; /* 0 width - change this with JavaScript */
+ position: absolute; /* Stay in place */
+ z-index: 1000; /* Stay on top */
+ float: left;
+ top: auto;
+ left: 0;
+ background-color: #b7ffff; /* Black*/
+ overflow-x: hidden; /* Disable horizontal scroll */
+ padding-top: 10px; /* Place content 10px from the top */
+ padding-bottom: 10px; /* Place content 10px from the bottom */
+ transition: 0s; /* 0.5 second transition effect to slide in the sidepanel */
+ }
+
+ table{
+ margin-left: 4px;
+ margin-right: auto;
+ table-layout: fixed;
+ }
+
+ /* The sidepanel links */
+ table td {
+ padding: 0px 8px 8px 8px;
+ text-decoration: none;
+ font-size: 13px;
+ color: #555;
+ transition: 0.3s;
+ vertical-align: middle;
+ }
+
+ /* Style the button that is used to open the sidepanel */
+ .button {
+ font-size: 15px;
+ color: #555;
+ cursor: pointer;
+ background-color: #b7ffff;
+ padding: 5px 10px;
+ border: none;
+ margin-bottom: 5px;
+ }
+
+ .textField {
+ padding-left: 5px;
+ }
+
+ .checkbox {
+ margin-left: 0px;
+ }
+
+ .button:hover {
+ background-color: #0f0;
+ }
+
+ .btn-group-sm>.btn, .btn-sm {
+ font-size: 13px;
+ background-color: #7d8991;
+ border-color: #7d8991;
+ }
+
+ .btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active, .open>.dropdown-toggle.btn-primary {
+ color: #fff;
+ background-color: #60717d;
+ border-color: #60717d; /*set the color you want here*/
+ }
+
+ .btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active, .btn-outline-primary.active, .open>.dropdown-toggle.btn-primary {
+ color: #fff;
+ background-color: #60717d;
+ border-color: #60717d; /*set the color you want here*/
+ }
+
+ .form-control-sm {
+ font-size: 13px
+ }
+
+ .custom-select-sm {
+ font-size: 13px
+ }
+
+ .custom-control-label {
+ padding-top: 2px;
+ }
+
+ .custom-control-input:checked~.custom-control-label::before {
+ color: #fff;
+ border-color: #7d8991;
+ background-color: #7d8991;
+ }
+ </style>
+
+ <script>
+ document.addEventListener('DOMContentLoaded', function(){
+
+ var cy = window.cy = cytoscape({
+ container: document.getElementById('cy'),
+
+ ready: function(){
+ let layoutUtilities = this.layoutUtilities({
+ desiredAspectRatio: this.width()/this.height()
+ });
+ this.nodes().forEach(function(node){
+ let size = Math.random()*120+30;
+ node.css("width", size);
+ node.css("height", size);
+ });
+ this.layout({name: 'fcose'}).run();
+ },
+
+ style: [
+ {
+ selector: 'node',
+ style: {
+ 'background-color': '#2B65EC'
+ }
+ },
+
+ {
+ selector: 'edge',
+ style: {
+ 'width': 3,
+ 'line-color': '#2B65EC'
+ }
+ },
+
+ {
+ selector: 'node:selected',
+ style: {
+ 'background-color': '#F08080',
+ 'border-color': 'red'
+ }
+ },
+
+ {
+ selector: 'edge:selected',
+ style: {
+ 'line-color': '#F08080'
+ }
+ }
+ ],
+
+ elements: [{"data":{"id":"glyph9","position":{"x":1452.639173965406,"y":609.3619416544145},"group":"nodes"}},
+ {"data":{"id":"glyph0","position":{"x":1351.3490293961959,"y":518.9529901384763},"group":"nodes"}},
+ {"data":{"id":"glyph6","position":{"x":1358.2854747390154,"y":707.9866590968695},"group":"nodes"}},
+ {"data":{"id":"glyph8","position":{"x":1322.9939787691299,"y":614.6878118623499},"group":"nodes"}},
+ {"data":{"id":"glyph7","position":{"x":1239.4852011317887,"y":543.2369849876238},"group":"nodes"}},
+ {"data":{"id":"glyph12","position":{"x":841.6855140740067,"y":765.0152660242113},"group":"nodes"}},
+ {"data":{"id":"glyph13","position":{"x":1019.5908382748769,"y":841.6087025848726},"group":"nodes"}},
+ {"data":{"id":"glyph1","position":{"x":1231.2768042260652,"y":673.2683218469676},"group":"nodes"}},
+ {"data":{"id":"glyph2","position":{"x":1039.8995038336504,"y":730.180116446269},"group":"nodes"}},
+ {"data":{"id":"glyph15","position":{"x":569.5498472077387,"y":506.89980858075364},"group":"nodes"}},
+ {"data":{"id":"glyph3","position":{"x":903.0347368937041,"y":654.3308627056822},"group":"nodes"}},
+ {"data":{"id":"glyph17","position":{"x":1195.6310733031135,"y":820.9504141631944},"group":"nodes"}},
+ {"data":{"id":"glyph10","position":{"x":1141.2404374322139,"y":732.3190922346248},"group":"nodes"}},
+ {"data":{"id":"glyph19","position":{"x":893.1427762830865,"y":856.2695126662625},"group":"nodes"}},
+ {"data":{"id":"glyph11","position":{"x":939.3335184518824,"y":758.3699048922733},"group":"nodes"}},
+ {"data":{"id":"glyph18","position":{"x":770.4114528170364,"y":659.2220219290564},"group":"nodes"}},
+ {"data":{"id":"glyph16","position":{"x":818.0111009023315,"y":564.8072603606723},"group":"nodes"}},
+ {"data":{"id":"glyph22","position":{"x":651.1292498357636,"y":314.1387423188818},"group":"nodes"}},
+ {"data":{"id":"glyph4","position":{"x":792.0076145303351,"y":454.0225025614517},"group":"nodes"}},
+ {"data":{"id":"glyph23","position":{"x":704.0937009722281,"y":398.0421081673902},"group":"nodes"}},
+ {"data":{"id":"glyph24","position":{"x":809.2974819306742,"y":231.7141323534711},"group":"nodes"}},
+ {"data":{"id":"glyph25","position":{"x":890.826951363933,"y":299.74915938409947},"group":"nodes"}},
+ {"data":{"id":"glyph20","position":{"x":786.2625869125006,"y":331.67766378118495},"group":"nodes"}},
+ {"data":{"id":"glyph26","position":{"x":879.2981049664311,"y":389.27232563593486},"group":"nodes"}},
+ {"data":{"id":"glyph35","position":{"x":627.088268638501,"y":40.089848876876886},"group":"nodes"}},
+ {"data":{"id":"glyph36","position":{"x":329.6761506918384,"y":187.20503497360494},"group":"nodes"}},
+ {"data":{"id":"glyph37","position":{"x":155.12947729633356,"y":379.5263531900425},"group":"nodes"}},
+ {"data":{"id":"glyph38","position":{"x":70.13952165372024,"y":581.2691021233562},"group":"nodes"}},
+ {"data":{"id":"glyph21","position":{"x":713.4639263718316,"y":229.06355211274115},"group":"nodes"}},
+ {"data":{"id":"glyph42","position":{"x":523.848994074475,"y":108.47701882803744},"group":"nodes"}},
+ {"data":{"id":"glyph41","position":{"x":718.966532806447,"y":116.46683749236911},"group":"nodes"}},
+ {"data":{"id":"glyph31","position":{"x":621.3138039842713,"y":145.7168752444793},"group":"nodes"}},
+ {"data":{"id":"glyph27","position":{"x":525.2099120385327,"y":210.92542274858295},"group":"nodes"}},
+ {"data":{"id":"glyph32","position":{"x":426.3492127437995,"y":257.85665030680025},"group":"nodes"}},
+ {"data":{"id":"glyph28","position":{"x":346.30926488002945,"y":344.4562152937847},"group":"nodes"}},
+ {"data":{"id":"glyph43","position":{"x":363.54724181648487,"y":486.5705174517715},"group":"nodes"}},
+ {"data":{"id":"glyph33","position":{"x":269.87972487503066,"y":430.2423722580144},"group":"nodes"}},
+ {"data":{"id":"glyph29","position":{"x":227.86139816113416,"y":531.824141876398},"group":"nodes"}},
+ {"data":{"id":"glyph39","position":{"x":104.77693104995387,"y":691.8382969303054},"group":"nodes"}},
+ {"data":{"id":"glyph40","position":{"x":292.039416141131,"y":643.4009391289965},"group":"nodes"}},
+ {"data":{"id":"glyph34","position":{"x":193.8304385062596,"y":632.9540034207419},"group":"nodes"}},
+ {"data":{"id":"glyph30","position":{"x":205.4745704273754,"y":733.5181650652648},"group":"nodes"}},
+ {"data":{"id":"glyph14","position":{"x":695.1248473196924,"y":482.8828321494848},"group":"nodes"}},
+ {"data":{"id":"glyph5","position":{"x":721.6687687330186,"y":570.3868893775194},"group":"nodes"}},
+ {"data":{"id":"e22","source":"glyph9","target":"glyph8","group":"edges"}},
+ {"data":{"id":"e23","source":"glyph0","target":"glyph8","group":"edges"}},
+ {"data":{"id":"e24","source":"glyph8","target":"glyph1","group":"edges"}},
+ {"data":{"id":"e25","source":"glyph6","target":"glyph8","group":"edges"}},
+ {"data":{"id":"e26","source":"glyph8","target":"glyph7","group":"edges"}},
+ {"data":{"id":"e27","source":"glyph11","target":"glyph12","group":"edges"}},
+ {"data":{"id":"e28","source":"glyph13","target":"glyph11","group":"edges"}},
+ {"data":{"id":"e29","source":"glyph1","target":"glyph10","group":"edges"}},
+ {"data":{"id":"e30","source":"glyph10","target":"glyph2","group":"edges"}},
+ {"data":{"id":"e31","source":"glyph2","target":"glyph11","group":"edges"}},
+ //{"data":{"id":"e32","source":"glyph11","target":"glyph3","group":"edges"}},
+ {"data":{"id":"e33","source":"glyph14","target":"glyph4","group":"edges"}},
+ {"data":{"id":"e34","source":"glyph15","target":"glyph14","group":"edges"}},
+ {"data":{"id":"e35","source":"glyph3","target":"glyph16","group":"edges"}},
+ {"data":{"id":"e36","source":"glyph16","target":"glyph5","group":"edges"}},
+ {"data":{"id":"e37","source":"glyph16","target":"glyph4","group":"edges"}},
+ {"data":{"id":"e38","source":"glyph17","target":"glyph10","group":"edges"}},
+ {"data":{"id":"e39","source":"glyph19","target":"glyph11","group":"edges"}},
+ {"data":{"id":"e40","source":"glyph18","target":"glyph16","group":"edges"}},
+ //{"data":{"id":"e41","source":"glyph22","target":"glyph20","group":"edges"}},
+ {"data":{"id":"e42","source":"glyph4","target":"glyph20","group":"edges"}},
+ {"data":{"id":"e43","source":"glyph20","target":"glyph21","group":"edges"}},
+ {"data":{"id":"e44","source":"glyph23","target":"glyph20","group":"edges"}},
+ {"data":{"id":"e45","source":"glyph24","target":"glyph20","group":"edges"}},
+ {"data":{"id":"e46","source":"glyph20","target":"glyph25","group":"edges"}},
+ {"data":{"id":"e47","source":"glyph20","target":"glyph26","group":"edges"}},
+ {"data":{"id":"e48","source":"glyph35","target":"glyph31","group":"edges"}},
+ {"data":{"id":"e49","source":"glyph36","target":"glyph32","group":"edges"}},
+ //{"data":{"id":"e50","source":"glyph37","target":"glyph33","group":"edges"}},
+ {"data":{"id":"e51","source":"glyph38","target":"glyph34","group":"edges"}},
+ {"data":{"id":"e52","source":"glyph21","target":"glyph31","group":"edges"}},
+ {"data":{"id":"e53","source":"glyph42","target":"glyph31","group":"edges"}},
+ {"data":{"id":"e54","source":"glyph31","target":"glyph41","group":"edges"}},
+ {"data":{"id":"e55","source":"glyph31","target":"glyph27","group":"edges"}},
+ {"data":{"id":"e56","source":"glyph27","target":"glyph32","group":"edges"}},
+ {"data":{"id":"e57","source":"glyph32","target":"glyph28","group":"edges"}},
+ {"data":{"id":"e58","source":"glyph28","target":"glyph33","group":"edges"}},
+ //{"data":{"id":"e59","source":"glyph33","target":"glyph43","group":"edges"}},
+ //{"data":{"id":"e60","source":"glyph33","target":"glyph29","group":"edges"}},
+ {"data":{"id":"e61","source":"glyph29","target":"glyph34","group":"edges"}},
+ //{"data":{"id":"e62","source":"glyph39","target":"glyph34","group":"edges"}},
+ {"data":{"id":"e63","source":"glyph34","target":"glyph40","group":"edges"}},
+ {"data":{"id":"e64","source":"glyph34","target":"glyph30","group":"edges"}},
+ {"data":{"id":"e65","source":"glyph14","target":"glyph5","group":"edges"}},
+ {"data":{"id":"e66","source":"glyph33","target":"glyph35","group":"edges"}},
+ {"data":{"id":"e67","source":"glyph13","target":"glyph22","group":"edges"}},
+ {"data":{"id":"e68","source":"glyph17","target":"glyph6","group":"edges"}},
+ {"data":{"id":"e69","source":"glyph25","target":"glyph27","group":"edges"}}]
+ });
+
+ document.getElementById("randomizeButton").addEventListener("click", function(){
+ var layout = cy.layout({
+ name: 'random',
+ animate: true,
+ animationDuration: 1000
+ });
+
+ layout.run();
+ });
+
+ document.getElementById("fcoseButton").addEventListener("click", function(){
+ let qualityItem = document.getElementById("quality");
+ var layout = cy.layout({
+ name: 'fcose',
+ quality: qualityItem.options[qualityItem.selectedIndex].value,
+ randomize: !(document.getElementById("randomize").checked),
+ animate: document.getElementById("animate").checked,
+ animationEasing: 'ease-out',
+ fit: document.getElementById("fit").checked,
+ uniformNodeDimensions: document.getElementById("uniformNodeDimensions").checked,
+ packComponents: document.getElementById("packComponents").checked,
+ tile: document.getElementById("tile").checked,
+ nodeRepulsion: parseFloat(document.getElementById("nodeRepulsion").value),
+ idealEdgeLength: parseFloat(document.getElementById("idealEdgeLength").value),
+ edgeElasticity: parseFloat(document.getElementById("edgeElasticity").value),
+ nestingFactor: parseFloat(document.getElementById("nestingFactor").value),
+ gravity: parseFloat(document.getElementById("gravity").value),
+ gravityRange: parseFloat(document.getElementById("gravityRange").value),
+ gravityCompound: parseFloat(document.getElementById("gravityCompound").value),
+ gravityRangeCompound: parseFloat(document.getElementById("gravityRangeCompound").value),
+ numIter: parseFloat(document.getElementById("numIter").value),
+ tilingPaddingVertical: parseFloat(document.getElementById("tilingPaddingVertical").value),
+ tilingPaddingHorizontal: parseFloat(document.getElementById("tilingPaddingHorizontal").value),
+ initialEnergyOnIncremental: document.getElementById("initialEnergyOnIncremental").value,
+ step:"all"
+ });
+
+ layout.run();
+ });
+
+ });
+ </script>
+ </head>
+
+ <body>
+ <h1 class="ml-2">cytoscape-fcose demo</h1>
+ <div style='width: 300px; position: absolute;'>
+ <button id="randomizeButton" class="btn btn-primary btn-sm mb-2 ml-2">Randomize</button>&nbsp
+ <button id="fcoseButton" class="btn btn-primary btn-sm mb-2">fCoSE</button>&nbsp
+
+ <div id="mySidepanel" class="sidepanel">
+ <table>
+ <tr>
+ <td><span class="add-on layout-text" title="Quality of the layout"> Quality </span></td>
+ <td>
+ <select id="quality" class='custom-select custom-select-sm'>
+ <option value="draft">draft</option>
+ <option value="default" selected="">default</option>
+ <option value="proof">proof</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td><span class="add-on layout-text" title="Whether to enable incremental mode"> Incremental </span></td>
+ <td>
+ <div class="custom-control custom-control-inline custom-checkbox">
+ <input type="checkbox" class="custom-control-input" id="randomize" name="incremental">
+ <label class="custom-control-label" for="randomize"></label>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td><span class="add-on layout-text" title="Whether to perform animation after layout"> Animate </span></td>
+ <td>
+ <div class="custom-control custom-control-inline custom-checkbox">
+ <input type="checkbox" class="custom-control-input" id="animate" name="animate" checked>
+ <label class="custom-control-label" for="animate"></label>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td><span class="add-on layout-text" title="Whether to fit the viewport to the repositioned nodes"> Fit </span></td>
+ <td>
+ <div class="custom-control custom-control-inline custom-checkbox">
+ <input type="checkbox" class="custom-control-input" id="fit" name="fit" checked>
+ <label class="custom-control-label" for="fit"></label>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td><span class="add-on layout-text" title="Whether nodes are of uniform dimensions"> Uniform Node Dimensions </span></td>
+ <td>
+ <div class="custom-control custom-control-inline custom-checkbox">
+ <input type="checkbox" class="custom-control-input" id="uniformNodeDimensions" name="uniformNodeDimensions">
+ <label class="custom-control-label" for="uniformNodeDimensions"></label>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td><span class="add-on layout-text" title="Whether to pack components"> Pack Components to Window</span></td>
+ <td>
+ <div class="custom-control custom-control-inline custom-checkbox">
+ <input type="checkbox" class="custom-control-input" id="packComponents" name="packComponents" checked>
+ <label class="custom-control-label" for="packComponents"></label>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td><span class="add-on layout-text" title="Whether to tile disconnected nodes"> Tile Disconnected </span></td>
+ <td>
+ <div class="custom-control custom-control-inline custom-checkbox">
+ <input type="checkbox" class="custom-control-input" id="tile" name="tile" checked>
+ <label class="custom-control-label" for="tile"></label>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td><span class="add-on layout-text" title="Node repulsion (non overlapping) multiplier"> Node Repulsion </span></td>
+ <td><input id="nodeRepulsion" class="textField form-control form-control-sm" type="text" value="4500" maxlength=5 size="5"></td>
+ </tr>
+ <tr>
+ <td><span class="add-on layout-text" title="Ideal (intra-graph) edge length"> Ideal Edge Length </span></td>
+ <td><input id="idealEdgeLength" class="textField form-control form-control-sm" type="text" value="50" maxlength=5 size="5"></td>
+ </tr>
+ <tr>
+ <td><span class="add-on layout-text" title="Divisor to compute edge forces"> Edge Elasticity </span></td>
+ <td><input id="edgeElasticity" class="textField form-control form-control-sm" type="text" value="0.45" maxlength=5 size="5"></td>
+ </tr>
+ <tr>
+ <td><span class="add-on layout-text" title="Nesting factor (multiplier) to compute ideal edge length for inter-graph edges"> Nesting Factor </span></td>
+ <td><input id="nestingFactor" class="textField form-control form-control-sm" type="text" value="0.1" maxlength=5 size="5"></td>
+ </tr>
+ <tr>
+ <td><span class="add-on layout-text" title="Gravity force (constant)"> Gravity </span></td>
+ <td><input id="gravity" class="textField form-control form-control-sm" type="text" value="0.25" maxlength=5 size="5"></td>
+ </tr>
+ <tr>
+ <td><span class="add-on layout-text" title="Gravity range (constant)"> Gravity Range </span></td>
+ <td><input id="gravityRange" class="textField form-control form-control-sm" type="text" value="3.8" maxlength=5 size="5"></td>
+ </tr>
+ <tr>
+ <td><span class="add-on layout-text" title="Gravity force (constant) for compounds"> Compound Gravity </span></td>
+ <td><input id="gravityCompound" class="textField form-control form-control-sm" type="text" value="1" maxlength=5 size="5"></td>
+ </tr>
+ <tr>
+ <td><span class="add-on layout-text" title="Gravity range (constant) for compounds"> Compound Gravity Range </span></td>
+ <td><input id="gravityRangeCompound" class="textField form-control form-control-sm" type="text" value="1.5" maxlength=5 size="5"></td>
+ </tr>
+ <tr>
+ <td><span class="add-on layout-text" title="Maximum number of iterations to perform"> Number of Iterations </span></td>
+ <td><input id="numIter" class="textField form-control form-control-sm" type="text" value="2500" size="5"></td>
+ </tr>
+ <tr>
+ <td><span class="add-on layout-text" title="Amount of vertical space to put between degree zero nodes during tiling"> Tiling Vertical Padding </span></td>
+ <td><input id="tilingPaddingVertical" class="textField form-control form-control-sm" type="text" value="10" maxlength=5 size="5"></td>
+ </tr>
+ <tr>
+ <td><span class="add-on layout-text" title="Amount of horizontal space to put between degree zero nodes during tiling"> Tiling Horizontal Padding </span></td>
+ <td><input id="tilingPaddingHorizontal" class="textField form-control form-control-sm" type="text" value="10" maxlength=5 size="5"></td>
+ </tr>
+ <tr>
+ <td><span class="add-on layout-text" title="Initial cooling factor for incremental layout"> Incremental Cooling Factor </span></td>
+ <td><input id="initialEnergyOnIncremental" class="textField form-control form-control-sm" type="text" value="0.3" maxlength=5 size="5"></td>
+ </tr>
+ </table>
+
+ </div>
+ </div>
+ <div id="cy"></div>
+
+ </body>
+
+</html>
diff --git a/node_modules/cytoscape-fcose/demo/incrementalConstraints.gif b/node_modules/cytoscape-fcose/demo/incrementalConstraints.gif
new file mode 100644
index 00000000..dd842338
Binary files /dev/null and b/node_modules/cytoscape-fcose/demo/incrementalConstraints.gif differ
diff --git a/node_modules/cytoscape-fcose/demo/samples/callGraph.js b/node_modules/cytoscape-fcose/demo/samples/callGraph.js
new file mode 100644
index 00000000..b871f9fb
--- /dev/null
+++ b/node_modules/cytoscape-fcose/demo/samples/callGraph.js
@@ -0,0 +1,1616 @@
+call_graph = {
+ "elements": {
+ "nodes": [
+ {
+ "data": {
+ "id": "nwtN_6edbfba5-6884-4f26-868f-18bc2481616e",
+ "bbox": {
+ "x": 1048.6375489786594,
+ "y": 153.7561581259744,
+ "w": 91.52294921875,
+ "h": 50.25
+ },
+ "minWidth": 91.52294921875,
+ "minWidthBiasLeft": 0.00005,
+ "minWidthBiasRight": 0.00005,
+ "minHeight": 50.25,
+ "minHeightBiasTop": 0.00005,
+ "minHeightBiasBottom": 0.00005,
+ "originalW": 119.52294921875,
+ "originalH": 78.25,
+ "class": "compartment",
+ "label": "__main__",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 3.25,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 0.5,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 14,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 1048.6375489786594,
+ "y": 153.7561581259744
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_6e27959a-ae83-4cb0-898f-9a1e6c5cafae",
+ "bbox": {
+ "x": 1048.6375489786594,
+ "y": 153.7561581259744,
+ "w": 88.27294921875,
+ "h": 47
+ },
+ "class": "macromolecule",
+ "label": "main\ncalls: 1\ntime: 0.000000s",
+ "statesandinfos": [],
+ "parent": "nwtN_6edbfba5-6884-4f26-868f-18bc2481616e",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#9999e5",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 1048.6375489786594,
+ "y": 153.7561581259744
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_e872ccff-fb1a-4264-a66a-cbc72d1e9711",
+ "bbox": {
+ "x": 832.2602245209991,
+ "y": 267.2349457952003,
+ "w": 203.3974609375,
+ "h": 50.25
+ },
+ "minWidth": 155.5302734375,
+ "minWidthBiasLeft": 0.00005,
+ "minWidthBiasRight": 0.00005,
+ "minHeight": 50.25,
+ "minHeightBiasTop": 0.00005,
+ "minHeightBiasBottom": 0.00005,
+ "originalW": 231.3974609375,
+ "originalH": 78.25,
+ "class": "compartment",
+ "label": "communications",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 3.25,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 0.5,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 14,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 832.2602245209991,
+ "y": 267.2349457952003
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "d2f78da5-fbd3-fe91-4046-3b5aea0648f6",
+ "bbox": {
+ "x": 832.2602245209991,
+ "y": 267.2349457952003,
+ "w": 200.1474609375,
+ "h": 47
+ },
+ "class": "macromolecule",
+ "label": "communications.ServerSocket.__init__\ncalls: 1\ntime: 0.001029s",
+ "statesandinfos": [],
+ "parent": "nwtN_e872ccff-fb1a-4264-a66a-cbc72d1e9711",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#9999e5",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 832.2602245209991,
+ "y": 267.2349457952003
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "d1f240af-7520-fb1b-19f9-e5e92eab909e",
+ "bbox": {
+ "x": 461.06847268925367,
+ "y": 406.7278918574187,
+ "w": 121.4775390625,
+ "h": 50.25
+ },
+ "minWidth": 109.640625,
+ "minWidthBiasLeft": 0.00005,
+ "minWidthBiasRight": 0.00005,
+ "minHeight": 50.25,
+ "minHeightBiasTop": 0.00005,
+ "minHeightBiasBottom": 0.00005,
+ "originalW": 149.4775390625,
+ "originalH": 78.25,
+ "class": "compartment",
+ "label": "socket",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 3.25,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 0.5,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 14,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 461.06847268925367,
+ "y": 406.7278918574187
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "288a2f9b-2930-701e-c68e-400307fbffd4",
+ "bbox": {
+ "x": 461.06847268925367,
+ "y": 406.7278918574187,
+ "w": 118.2275390625,
+ "h": 47
+ },
+ "class": "macromolecule",
+ "label": "socket.socket.__init__\ncalls: 1\ntime: 0.001029s",
+ "statesandinfos": [],
+ "parent": "d1f240af-7520-fb1b-19f9-e5e92eab909e",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#9999e5",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 461.06847268925367,
+ "y": 406.7278918574187
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_6f2f14d2-4d5d-4582-8555-9ce01b4f769f",
+ "bbox": {
+ "x": 973.1536617161887,
+ "y": 562.1987962172685,
+ "w": 808.9722624959013,
+ "h": 380.90672838617974
+ },
+ "minWidth": 205.5387290927216,
+ "minWidthBiasLeft": 0.00005,
+ "minWidthBiasRight": 0.00005,
+ "minHeight": 128.27786926084235,
+ "minHeightBiasTop": 0.00005,
+ "minHeightBiasBottom": 0.00005,
+ "originalW": 836.9722624959013,
+ "originalH": 408.90672838617974,
+ "class": "compartment",
+ "label": "threading",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 3.25,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 0.5,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 14,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 973.1536617161887,
+ "y": 562.1987962172685
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_a44ad134-4c47-4cf5-b244-9d9fc0804e93",
+ "bbox": {
+ "x": 1186.3610894421433,
+ "y": 396.8704320241787,
+ "w": 149.4013671875,
+ "h": 47
+ },
+ "class": "macromolecule",
+ "label": "threading.ServerSocket.start\ncalls: 1\ntime: 0.001969s",
+ "statesandinfos": [],
+ "parent": "nwtN_6f2f14d2-4d5d-4582-8555-9ce01b4f769f",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#9999e5",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 1186.3610894421433,
+ "y": 396.8704320241787
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_ac02fa71-2428-47ad-8c3c-80bb5659a066",
+ "bbox": {
+ "x": 785.3451019915435,
+ "y": 399.3027259948305,
+ "w": 166.54052734375,
+ "h": 47
+ },
+ "class": "macromolecule",
+ "label": "threading.ServerSocket.__init__\ncalls: 1\ntime: 0.000000s",
+ "statesandinfos": [],
+ "parent": "nwtN_6f2f14d2-4d5d-4582-8555-9ce01b4f769f",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#9999e5",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 785.3451019915435,
+ "y": 399.3027259948305
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_550a66a2-1061-45cc-9f78-14570daaff94",
+ "bbox": {
+ "x": 1171.6884552852318,
+ "y": 501.00617333218474,
+ "w": 112.7275390625,
+ "h": 47
+ },
+ "class": "macromolecule",
+ "label": "threading.Event.isset\ncalls: 1\ntime: 0.000000s",
+ "statesandinfos": [],
+ "parent": "nwtN_6f2f14d2-4d5d-4582-8555-9ce01b4f769f",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#9999e5",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 1171.6884552852318,
+ "y": 501.00617333218474
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "82181180-e275-b004-243e-eb4383e1e72f",
+ "bbox": {
+ "x": 623.602833202613,
+ "y": 504.26049930822586,
+ "w": 106.62060546875,
+ "h": 47
+ },
+ "class": "macromolecule",
+ "label": "threading.newname\ncalls: 1\ntime: 0.000000s",
+ "statesandinfos": [],
+ "parent": "nwtN_6f2f14d2-4d5d-4582-8555-9ce01b4f769f",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#9999e5",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 623.602833202613,
+ "y": 504.26049930822586
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "359e920c-52a4-459e-2262-4ec90824f21e",
+ "bbox": {
+ "x": 774.4147292170284,
+ "y": 501.6751525194074,
+ "w": 124.3505859375,
+ "h": 47
+ },
+ "class": "macromolecule",
+ "label": "threading.currentthread\ncalls: 1\ntime: 0.000000s",
+ "statesandinfos": [],
+ "parent": "nwtN_6f2f14d2-4d5d-4582-8555-9ce01b4f769f",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#9999e5",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 774.4147292170284,
+ "y": 501.6751525194074
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "5a34dca5-646c-cae7-affe-ef4142c5ad73",
+ "bbox": {
+ "x": 883.8610766103469,
+ "y": 509.431192885863,
+ "w": 160.42822265625,
+ "h": 47
+ },
+ "class": "macromolecule",
+ "label": "threading.MainThread.daemon\ncalls: 1\ntime: 0.000000s",
+ "statesandinfos": [],
+ "parent": "nwtN_6f2f14d2-4d5d-4582-8555-9ce01b4f769f",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#9999e5",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 883.8610766103469,
+ "y": 509.431192885863
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "2f560d5b-bb1b-cc3f-d5b5-a69e6fab8d47",
+ "bbox": {
+ "x": 1012.9044451633454,
+ "y": 510.2832319234375,
+ "w": 104.17138671875,
+ "h": 47
+ },
+ "class": "macromolecule",
+ "label": "threading.Event.init\ncalls: 1\ntime: 0.000000s",
+ "statesandinfos": [],
+ "parent": "nwtN_6f2f14d2-4d5d-4582-8555-9ce01b4f769f",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#9999e5",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 1012.9044451633454,
+ "y": 510.2832319234375
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "d07ee031-2818-7c9c-5589-e8a161b9946c",
+ "bbox": {
+ "x": 1321.1790996047644,
+ "y": 501.0665091727607,
+ "w": 109.67138671875,
+ "h": 47
+ },
+ "class": "macromolecule",
+ "label": "threading.Event.wait\ncalls: 1\ntime: 0.001005s",
+ "statesandinfos": [],
+ "parent": "nwtN_6f2f14d2-4d5d-4582-8555-9ce01b4f769f",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#9999e5",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 1321.1790996047644,
+ "y": 501.0665091727607
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "1f64237f-dd15-2d5f-18f0-02a0d0338f44",
+ "bbox": {
+ "x": 810.9249008712393,
+ "y": 629.4880484917272,
+ "w": 146.98974609375,
+ "h": 47
+ },
+ "class": "macromolecule",
+ "label": "threading.Condition.__init__\ncalls: 1\ntime: 0.000000s",
+ "statesandinfos": [],
+ "parent": "nwtN_6f2f14d2-4d5d-4582-8555-9ce01b4f769f",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#9999e5",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 810.9249008712393,
+ "y": 629.4880484917272
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "63edffef-16cf-a216-5ace-a27a4290e3d8",
+ "bbox": {
+ "x": 976.5020676671496,
+ "y": 615.3268434368138,
+ "w": 128.01904296875,
+ "h": 47
+ },
+ "class": "macromolecule",
+ "label": "threading.Condition.wait\ncalls: 1\ntime: 0.000000s",
+ "statesandinfos": [],
+ "parent": "nwtN_6f2f14d2-4d5d-4582-8555-9ce01b4f769f",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#9999e5",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 976.5020676671496,
+ "y": 615.3268434368138
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "d6768356-8772-a49a-c2f7-c3b9802c954b",
+ "bbox": {
+ "x": 1161.3313010713127,
+ "y": 621.0949598234208,
+ "w": 150.0458984375,
+ "h": 47
+ },
+ "class": "macromolecule",
+ "label": "threading.Condition.__exit__\ncalls: 1\ntime: 0.000000s",
+ "statesandinfos": [],
+ "parent": "nwtN_6f2f14d2-4d5d-4582-8555-9ce01b4f769f",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#9999e5",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 1161.3313010713127,
+ "y": 621.0949598234208
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "05b42313-71a4-e1a9-383b-6b4be641e69d",
+ "bbox": {
+ "x": 1285.8699319437194,
+ "y": 616.4161669025763,
+ "w": 158.00048828125,
+ "h": 47
+ },
+ "class": "macromolecule",
+ "label": "threading.Condition.__enter__\ncalls: 1\ntime: 0.000000s",
+ "statesandinfos": [],
+ "parent": "nwtN_6f2f14d2-4d5d-4582-8555-9ce01b4f769f",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#9999e5",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 1285.8699319437194,
+ "y": 616.4161669025763
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "3c161178-1fca-ec7e-3fc7-425ce940fe1a",
+ "bbox": {
+ "x": 842.5152813783538,
+ "y": 727.5271604103584,
+ "w": 161.05126953125,
+ "h": 47
+ },
+ "class": "macromolecule",
+ "label": "threading.Condition._is_owned\ncalls: 1\ntime: 0.000000s",
+ "statesandinfos": [],
+ "parent": "nwtN_6f2f14d2-4d5d-4582-8555-9ce01b4f769f",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#9999e5",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 842.5152813783538,
+ "y": 727.5271604103584
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "bab5c8a0-0f39-66d4-eaca-7f9160ef25fa",
+ "bbox": {
+ "x": 981.9486849959626,
+ "y": 712.2766318896824,
+ "w": 180.005859375,
+ "h": 47
+ },
+ "class": "macromolecule",
+ "label": "threading.Condition._release_save\ncalls: 1\ntime: 0.000000s",
+ "statesandinfos": [],
+ "parent": "nwtN_6f2f14d2-4d5d-4582-8555-9ce01b4f769f",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#9999e5",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 981.9486849959626,
+ "y": 712.2766318896824
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "a0d92978-e6e9-6d87-9a06-567d139d15af",
+ "bbox": {
+ "x": 1170.401644572887,
+ "y": 717.7232492184953,
+ "w": 191.005859375,
+ "h": 47
+ },
+ "class": "macromolecule",
+ "label": "threading.Condition._acquire_restore\ncalls: 1\ntime: 0.000000s",
+ "statesandinfos": [],
+ "parent": "nwtN_6f2f14d2-4d5d-4582-8555-9ce01b4f769f",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#9999e5",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 1170.401644572887,
+ "y": 717.7232492184953
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_e8ac41f5-45d0-4855-bcc9-623f16e77889",
+ "bbox": {
+ "x": 1473.2018438500227,
+ "y": 504.2598166908556,
+ "w": 135.3349609375,
+ "h": 50.25
+ },
+ "minWidth": 91.52294921875,
+ "minWidthBiasLeft": 0.00005,
+ "minWidthBiasRight": 0.00005,
+ "minHeight": 50.25,
+ "minHeightBiasTop": 0.00005,
+ "minHeightBiasBottom": 0.00005,
+ "originalW": 163.3349609375,
+ "originalH": 78.25,
+ "class": "compartment",
+ "label": "_weakrefset",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 3.25,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 0.5,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 14,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 1473.2018438500227,
+ "y": 504.2598166908556
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "912c0f08-87fb-c746-18cb-19909a2b41c8",
+ "bbox": {
+ "x": 1473.2018438500227,
+ "y": 504.2598166908556,
+ "w": 132.0849609375,
+ "h": 47
+ },
+ "class": "macromolecule",
+ "label": "weakrefset.WeakSet.add\ncalls: 1\ntime: 0.000000s",
+ "statesandinfos": [],
+ "parent": "nwtN_e8ac41f5-45d0-4855-bcc9-623f16e77889",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#9999e5",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 1473.2018438500227,
+ "y": 504.2598166908556
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ }
+ ],
+ "edges": [
+ {
+ "data": {
+ "id": "nwtE_8b2b6e86-b5c9-4d80-99d6-fba6d10c340f",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "label": 1,
+ "source": "d2f78da5-fbd3-fe91-4046-3b5aea0648f6",
+ "target": "288a2f9b-2930-701e-c68e-400307fbffd4",
+ "portsource": "d2f78da5-fbd3-fe91-4046-3b5aea0648f6",
+ "porttarget": "288a2f9b-2930-701e-c68e-400307fbffd4"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_618ca0aa-0c62-42ea-ad5a-1c399335a913",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "label": 1,
+ "source": "nwtN_6e27959a-ae83-4cb0-898f-9a1e6c5cafae",
+ "target": "d2f78da5-fbd3-fe91-4046-3b5aea0648f6",
+ "portsource": "nwtN_6e27959a-ae83-4cb0-898f-9a1e6c5cafae",
+ "porttarget": "d2f78da5-fbd3-fe91-4046-3b5aea0648f6"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_c5861902-d6ee-4657-88e7-d57ab0de2b93",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "label": 1,
+ "source": "nwtN_a44ad134-4c47-4cf5-b244-9d9fc0804e93",
+ "target": "nwtN_550a66a2-1061-45cc-9f78-14570daaff94",
+ "portsource": "nwtN_a44ad134-4c47-4cf5-b244-9d9fc0804e93",
+ "porttarget": "nwtN_550a66a2-1061-45cc-9f78-14570daaff94"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_93cf0fe2-8c29-44f4-95af-5e687ee44c2b",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "label": 1,
+ "source": "d2f78da5-fbd3-fe91-4046-3b5aea0648f6",
+ "target": "nwtN_ac02fa71-2428-47ad-8c3c-80bb5659a066",
+ "portsource": "d2f78da5-fbd3-fe91-4046-3b5aea0648f6",
+ "porttarget": "nwtN_ac02fa71-2428-47ad-8c3c-80bb5659a066"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_cc55cbc0-61dc-41d3-bb2f-d6b55caeab9a",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "label": 1,
+ "source": "nwtN_ac02fa71-2428-47ad-8c3c-80bb5659a066",
+ "target": "82181180-e275-b004-243e-eb4383e1e72f",
+ "portsource": "nwtN_ac02fa71-2428-47ad-8c3c-80bb5659a066",
+ "porttarget": "82181180-e275-b004-243e-eb4383e1e72f"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_a3d7bd9b-7c21-49a8-a6bb-1c7a4ebd7eb7",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "label": 1,
+ "source": "nwtN_ac02fa71-2428-47ad-8c3c-80bb5659a066",
+ "target": "359e920c-52a4-459e-2262-4ec90824f21e",
+ "portsource": "nwtN_ac02fa71-2428-47ad-8c3c-80bb5659a066",
+ "porttarget": "359e920c-52a4-459e-2262-4ec90824f21e"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_15d4f487-636c-4374-99c1-ae754989862d",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "label": 1,
+ "source": "nwtN_ac02fa71-2428-47ad-8c3c-80bb5659a066",
+ "target": "5a34dca5-646c-cae7-affe-ef4142c5ad73",
+ "portsource": "nwtN_ac02fa71-2428-47ad-8c3c-80bb5659a066",
+ "porttarget": "5a34dca5-646c-cae7-affe-ef4142c5ad73"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_e4fc0a9f-6f88-4a20-8f21-00149e7ed87a",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "label": 1,
+ "source": "nwtN_ac02fa71-2428-47ad-8c3c-80bb5659a066",
+ "target": "2f560d5b-bb1b-cc3f-d5b5-a69e6fab8d47",
+ "portsource": "nwtN_ac02fa71-2428-47ad-8c3c-80bb5659a066",
+ "porttarget": "2f560d5b-bb1b-cc3f-d5b5-a69e6fab8d47"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_bf434941-04cf-4b18-9caf-577fac1c27f7",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "label": 1,
+ "source": "nwtN_ac02fa71-2428-47ad-8c3c-80bb5659a066",
+ "target": "912c0f08-87fb-c746-18cb-19909a2b41c8",
+ "portsource": "nwtN_ac02fa71-2428-47ad-8c3c-80bb5659a066",
+ "porttarget": "912c0f08-87fb-c746-18cb-19909a2b41c8"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_d2680712-4bc6-40b7-86b0-4af7052d069c",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "label": 1,
+ "source": "nwtN_a44ad134-4c47-4cf5-b244-9d9fc0804e93",
+ "target": "d07ee031-2818-7c9c-5589-e8a161b9946c",
+ "portsource": "nwtN_a44ad134-4c47-4cf5-b244-9d9fc0804e93",
+ "porttarget": "d07ee031-2818-7c9c-5589-e8a161b9946c"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_445c17cc-894b-4833-81da-9d573e6c3c25",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "label": 1,
+ "source": "2f560d5b-bb1b-cc3f-d5b5-a69e6fab8d47",
+ "target": "1f64237f-dd15-2d5f-18f0-02a0d0338f44",
+ "portsource": "2f560d5b-bb1b-cc3f-d5b5-a69e6fab8d47",
+ "porttarget": "1f64237f-dd15-2d5f-18f0-02a0d0338f44"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_1e925488-3584-4b09-b716-ba6f14379838",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "label": 1,
+ "source": "d07ee031-2818-7c9c-5589-e8a161b9946c",
+ "target": "63edffef-16cf-a216-5ace-a27a4290e3d8",
+ "portsource": "d07ee031-2818-7c9c-5589-e8a161b9946c",
+ "porttarget": "63edffef-16cf-a216-5ace-a27a4290e3d8"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_d748d6aa-f386-4ced-bac6-d2587064d47b",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "label": 1,
+ "source": "d07ee031-2818-7c9c-5589-e8a161b9946c",
+ "target": "d6768356-8772-a49a-c2f7-c3b9802c954b",
+ "portsource": "d07ee031-2818-7c9c-5589-e8a161b9946c",
+ "porttarget": "d6768356-8772-a49a-c2f7-c3b9802c954b"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_c71d9e10-11c4-4e9a-baf7-fa043282103c",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "label": 1,
+ "source": "d07ee031-2818-7c9c-5589-e8a161b9946c",
+ "target": "05b42313-71a4-e1a9-383b-6b4be641e69d",
+ "portsource": "d07ee031-2818-7c9c-5589-e8a161b9946c",
+ "porttarget": "05b42313-71a4-e1a9-383b-6b4be641e69d"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_55f140c5-f99c-4bc5-b8ef-e7c808ae8d66",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "label": 1,
+ "source": "63edffef-16cf-a216-5ace-a27a4290e3d8",
+ "target": "3c161178-1fca-ec7e-3fc7-425ce940fe1a",
+ "portsource": "63edffef-16cf-a216-5ace-a27a4290e3d8",
+ "porttarget": "3c161178-1fca-ec7e-3fc7-425ce940fe1a"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_741a21e2-6999-4d7f-8f01-bc7fecbbc41b",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "label": 1,
+ "source": "63edffef-16cf-a216-5ace-a27a4290e3d8",
+ "target": "bab5c8a0-0f39-66d4-eaca-7f9160ef25fa",
+ "portsource": "63edffef-16cf-a216-5ace-a27a4290e3d8",
+ "porttarget": "bab5c8a0-0f39-66d4-eaca-7f9160ef25fa"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_790b1a2d-2b2c-481a-967f-e696d23e6824",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "label": 1,
+ "source": "63edffef-16cf-a216-5ace-a27a4290e3d8",
+ "target": "a0d92978-e6e9-6d87-9a06-567d139d15af",
+ "portsource": "63edffef-16cf-a216-5ace-a27a4290e3d8",
+ "porttarget": "a0d92978-e6e9-6d87-9a06-567d139d15af"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_664a54ae-b07a-4c85-a503-349ca4edf006",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "label": 1,
+ "source": "nwtN_6e27959a-ae83-4cb0-898f-9a1e6c5cafae",
+ "target": "nwtN_a44ad134-4c47-4cf5-b244-9d9fc0804e93",
+ "portsource": "nwtN_6e27959a-ae83-4cb0-898f-9a1e6c5cafae",
+ "porttarget": "nwtN_a44ad134-4c47-4cf5-b244-9d9fc0804e93"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ }
+ ]
+ },
+ "style": [
+ {
+ "selector": "node",
+ "style": {
+ "shape": "rectangle",
+ "text-halign": "center",
+ "text-valign": "center",
+ "font-weight" : "normal",
+ "background-color": "#ffffff",
+ "opacity": "1",
+ "border-color": "#555555"
+ }
+ },
+ {
+ "selector": "node[class = 'simple chemical']",
+ "style": {
+ "shape": "ellipse",
+ "font-size": 14,
+ "background-color": "#fddbc7"
+ }
+ },
+ {
+ "selector": "node[class = 'macromolecule']",
+ "style": {
+ "shape": "roundrectangle",
+ "background-color": "#9999e5"
+ }
+ },
+ {
+ "selector": "node[class = 'unspecified entity']",
+ "style": {
+ "shape": "ellipse",
+ "background-color": "#f7f7f7"
+ }
+ },
+ {
+ "selector": "node[class = 'nucleic acid feature']",
+ "style": {
+ "shape": "rectangle",
+ "background-color": "#f4a582",
+ }
+ },
+ {
+ "selector": ":parent",
+ "style": {
+ "background-opacity": "0.333",
+ "text-valign": "bottom",
+ "shape": "barrel",
+ "text-margin-y": "2px",
+ "font-weight" : "normal",
+ "border-color": "#555555"
+ }
+ },
+ {
+ "selector": "node:selected",
+ "style": {
+ "background-color": "#33ff00",
+ "border-color": "#22ee00"
+ }
+ },
+ {
+ "selector": "edge",
+ "style": {
+ "curve-style": "bezier",
+ "width": "2px",
+ "line-color": "rgb(58,126,207)",
+ "opacity": "1"
+ }
+ },
+ {
+ "selector": "edge:selected",
+ "style": {
+ "line-color": "#33ff00",
+ "font-size": "13px",
+ "text-opacity": "1",
+ "text-rotation": "autorotate",
+ "color": "#33ff00",
+ "font-weight": "bold",
+ "text-background-shape": "roundrectangle",
+ "text-background-opacity": "1",
+ "text-background-padding": "2px"
+ }
+ },
+ {
+ "selector": "edge[class = 'production']",
+ "style": {
+ "target-arrow-shape": "triangle",
+ "target-arrow-color": "rgb(58,126,207)"
+ }
+ },
+ {
+ "selector": "edge:selected[class = 'production']",
+ "style": {
+ "target-arrow-shape": "triangle",
+ "target-arrow-color": "#33ff00"
+ }
+ },
+ ],
+ "zoomingEnabled": true,
+ "userZoomingEnabled": true,
+ "zoom": 0.9387299878673792,
+ "minZoom": 0.125,
+ "maxZoom": 16,
+ "panningEnabled": true,
+ "userPanningEnabled": true,
+ "pan": {
+ "x": -275.1308697557213,
+ "y": -85.14353945866765
+ },
+ "boxSelectionEnabled": true,
+ "renderer": {
+ "name": "canvas"
+ },
+ "wheelSensitivity": 0.1,
+ "motionBlur": true
+}
\ No newline at end of file
diff --git a/node_modules/cytoscape-fcose/demo/samples/callGraph_constraints.js b/node_modules/cytoscape-fcose/demo/samples/callGraph_constraints.js
new file mode 100644
index 00000000..aae3aed9
--- /dev/null
+++ b/node_modules/cytoscape-fcose/demo/samples/callGraph_constraints.js
@@ -0,0 +1,123 @@
+callGraph_constraints = {
+ "alignmentConstraint": {
+ "horizontal": [
+ [
+ "288a2f9b-2930-701e-c68e-400307fbffd4",
+ "nwtN_a44ad134-4c47-4cf5-b244-9d9fc0804e93",
+ "nwtN_ac02fa71-2428-47ad-8c3c-80bb5659a066"
+ ],
+ [
+ "nwtN_550a66a2-1061-45cc-9f78-14570daaff94",
+ "82181180-e275-b004-243e-eb4383e1e72f",
+ "359e920c-52a4-459e-2262-4ec90824f21e",
+ "5a34dca5-646c-cae7-affe-ef4142c5ad73",
+ "2f560d5b-bb1b-cc3f-d5b5-a69e6fab8d47",
+ "d07ee031-2818-7c9c-5589-e8a161b9946c",
+ "912c0f08-87fb-c746-18cb-19909a2b41c8"
+ ],
+ [
+ "1f64237f-dd15-2d5f-18f0-02a0d0338f44",
+ "63edffef-16cf-a216-5ace-a27a4290e3d8",
+ "d6768356-8772-a49a-c2f7-c3b9802c954b",
+ "05b42313-71a4-e1a9-383b-6b4be641e69d"
+ ],
+ [
+ "3c161178-1fca-ec7e-3fc7-425ce940fe1a",
+ "bab5c8a0-0f39-66d4-eaca-7f9160ef25fa",
+ "a0d92978-e6e9-6d87-9a06-567d139d15af"
+ ]
+ ]
+ },
+ "relativePlacementConstraint": [
+ {
+ "top": "nwtN_6e27959a-ae83-4cb0-898f-9a1e6c5cafae",
+ "bottom": "d2f78da5-fbd3-fe91-4046-3b5aea0648f6",
+ "gap": 98.25
+ },
+ {
+ "top": "nwtN_6e27959a-ae83-4cb0-898f-9a1e6c5cafae",
+ "bottom": "nwtN_a44ad134-4c47-4cf5-b244-9d9fc0804e93",
+ "gap": 98.25
+ },
+ {
+ "top": "d2f78da5-fbd3-fe91-4046-3b5aea0648f6",
+ "bottom": "288a2f9b-2930-701e-c68e-400307fbffd4",
+ "gap": 98.25
+ },
+ {
+ "top": "d2f78da5-fbd3-fe91-4046-3b5aea0648f6",
+ "bottom": "nwtN_ac02fa71-2428-47ad-8c3c-80bb5659a066",
+ "gap": 98.25
+ },
+ {
+ "top": "nwtN_ac02fa71-2428-47ad-8c3c-80bb5659a066",
+ "bottom": "912c0f08-87fb-c746-18cb-19909a2b41c8",
+ "gap": 98.25
+ },
+ {
+ "top": "nwtN_ac02fa71-2428-47ad-8c3c-80bb5659a066",
+ "bottom": "82181180-e275-b004-243e-eb4383e1e72f",
+ "gap": 98.25
+ },
+ {
+ "top": "nwtN_ac02fa71-2428-47ad-8c3c-80bb5659a066",
+ "bottom": "359e920c-52a4-459e-2262-4ec90824f21e",
+ "gap": 98.25
+ },
+ {
+ "top": "nwtN_ac02fa71-2428-47ad-8c3c-80bb5659a066",
+ "bottom": "5a34dca5-646c-cae7-affe-ef4142c5ad73",
+ "gap": 98.25
+ },
+ {
+ "top": "nwtN_ac02fa71-2428-47ad-8c3c-80bb5659a066",
+ "bottom": "2f560d5b-bb1b-cc3f-d5b5-a69e6fab8d47",
+ "gap": 98.25
+ },
+ {
+ "top": "nwtN_a44ad134-4c47-4cf5-b244-9d9fc0804e93",
+ "bottom": "nwtN_550a66a2-1061-45cc-9f78-14570daaff94",
+ "gap": 98.25
+ },
+ {
+ "top": "nwtN_a44ad134-4c47-4cf5-b244-9d9fc0804e93",
+ "bottom": "d07ee031-2818-7c9c-5589-e8a161b9946c",
+ "gap": 98.25
+ },
+ {
+ "top": "2f560d5b-bb1b-cc3f-d5b5-a69e6fab8d47",
+ "bottom": "1f64237f-dd15-2d5f-18f0-02a0d0338f44",
+ "gap": 98.25
+ },
+ {
+ "top": "d07ee031-2818-7c9c-5589-e8a161b9946c",
+ "bottom": "63edffef-16cf-a216-5ace-a27a4290e3d8",
+ "gap": 98.25
+ },
+ {
+ "top": "d07ee031-2818-7c9c-5589-e8a161b9946c",
+ "bottom": "d6768356-8772-a49a-c2f7-c3b9802c954b",
+ "gap": 98.25
+ },
+ {
+ "top": "d07ee031-2818-7c9c-5589-e8a161b9946c",
+ "bottom": "05b42313-71a4-e1a9-383b-6b4be641e69d",
+ "gap": 98.25
+ },
+ {
+ "top": "63edffef-16cf-a216-5ace-a27a4290e3d8",
+ "bottom": "3c161178-1fca-ec7e-3fc7-425ce940fe1a",
+ "gap": 98.25
+ },
+ {
+ "top": "63edffef-16cf-a216-5ace-a27a4290e3d8",
+ "bottom": "bab5c8a0-0f39-66d4-eaca-7f9160ef25fa",
+ "gap": 98.25
+ },
+ {
+ "top": "63edffef-16cf-a216-5ace-a27a4290e3d8",
+ "bottom": "a0d92978-e6e9-6d87-9a06-567d139d15af",
+ "gap": 98.25
+ }
+ ]
+}
\ No newline at end of file
diff --git a/node_modules/cytoscape-fcose/demo/samples/chalk.js b/node_modules/cytoscape-fcose/demo/samples/chalk.js
new file mode 100644
index 00000000..92c57044
--- /dev/null
+++ b/node_modules/cytoscape-fcose/demo/samples/chalk.js
@@ -0,0 +1,1305 @@
+chalk = {
+ "elements": {
+ "nodes": [
+ {
+ "data": {
+ "id": "nwtN_00dcd31b-2631-4af1-980b-4493dc7d43f7",
+ "bbox": {
+ "x": 506.4608860015869,
+ "y": 105.05675506591797,
+ "w": 60.3330078125,
+ "h": 28.25
+ },
+ "originalW": 88.3330078125,
+ "originalH": 56.25,
+ "class": "compartment",
+ "label": "types",
+ "statesandinfos": [],
+ "parent": "nwtN_80eb137f-5cd7-4584-9acc-87cc5698d255",
+ "language": "PD",
+ "border-width": 2.25,
+ "border-color": "#555555",
+ "background-color": "#f5f5f5",
+ "background-opacity": 0.5,
+ "background-image-opacity": "",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "bold",
+ "color": "#000000",
+ "ports": [],
+ "background-image": "",
+ "background-fit": "",
+ "background-position-x": "",
+ "background-position-y": "",
+ "background-width": "",
+ "background-height": "",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 506.4608860015869,
+ "y": 105.05675506591797
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_80eb137f-5cd7-4584-9acc-87cc5698d255",
+ "bbox": {
+ "x": 503.796484757312,
+ "y": 149.75074733690965,
+ "w": 141.2687438947998,
+ "h": 150.88798454198337
+ },
+ "originalW": 169.2687438947998,
+ "originalH": 178.88798454198337,
+ "class": "compartment",
+ "label": "chalk",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 2.25,
+ "border-color": "#555555",
+ "background-color": "#f5f5f5",
+ "background-opacity": 0.5,
+ "background-image-opacity": "",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "bold",
+ "color": "#000000",
+ "ports": [],
+ "background-image": "",
+ "background-fit": "",
+ "background-position-x": "",
+ "background-position-y": "",
+ "background-width": "",
+ "background-height": "",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 503.796484757312,
+ "y": 149.75074733690965
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_23452b85-7855-413f-a03d-26412ed87bfc",
+ "bbox": {
+ "x": 506.4608860015869,
+ "y": 105.05675506591797,
+ "w": 57.0830078125,
+ "h": 25
+ },
+ "class": "simple chemical",
+ "label": "index.d.ts",
+ "statesandinfos": [],
+ "parent": "nwtN_00dcd31b-2631-4af1-980b-4493dc7d43f7",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#c7eae5",
+ "background-opacity": 1,
+ "background-image-opacity": "",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "background-image": "",
+ "background-fit": "",
+ "background-position-x": "",
+ "background-position-y": "",
+ "background-width": "",
+ "background-height": "",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 506.4608860015869,
+ "y": 105.05675506591797
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_6ffc1fdf-602f-4395-89b5-666b383a5059",
+ "bbox": {
+ "x": 458.4355503099121,
+ "y": 211.06973960790134,
+ "w": 47.296875,
+ "h": 25
+ },
+ "class": "macromolecule",
+ "label": "index.js",
+ "statesandinfos": [],
+ "parent": "nwtN_80eb137f-5cd7-4584-9acc-87cc5698d255",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#dfc27d",
+ "background-opacity": 1,
+ "background-image-opacity": "",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "background-image": "",
+ "background-fit": "",
+ "background-position-x": "",
+ "background-position-y": "",
+ "background-width": "",
+ "background-height": "",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 458.4355503099121,
+ "y": 211.06973960790134
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_c152aeef-01df-49fc-9539-9e022e8d4c64",
+ "bbox": {
+ "x": 538.4608860015869,
+ "y": 205.05675506591797,
+ "w": 68.68994140625,
+ "h": 25
+ },
+ "class": "macromolecule",
+ "label": "templates.js",
+ "statesandinfos": [],
+ "parent": "nwtN_80eb137f-5cd7-4584-9acc-87cc5698d255",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#dfc27d",
+ "background-opacity": 1,
+ "background-image-opacity": "",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "background-image": "",
+ "background-fit": "",
+ "background-position-x": "",
+ "background-position-y": "",
+ "background-width": "",
+ "background-height": "",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 538.4608860015869,
+ "y": 205.05675506591797
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_c50c8570-f7bd-46c3-b7c2-66857746b854",
+ "bbox": {
+ "x": 457.4608860015869,
+ "y": 305.05675506591797,
+ "w": 50.546875,
+ "h": 28.25
+ },
+ "originalW": 78.546875,
+ "originalH": 56.25,
+ "class": "compartment",
+ "label": "ansi-styles",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 2.25,
+ "border-color": "#555555",
+ "background-color": "#f5f5f5",
+ "background-opacity": 0.5,
+ "background-image-opacity": "",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "bold",
+ "color": "#000000",
+ "ports": [],
+ "background-image": "",
+ "background-fit": "",
+ "background-position-x": "",
+ "background-position-y": "",
+ "background-width": "",
+ "background-height": "",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 457.4608860015869,
+ "y": 305.05675506591797
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_fa99aac7-9500-4ead-82c3-90c72e9837f3",
+ "bbox": {
+ "x": 457.4608860015869,
+ "y": 305.05675506591797,
+ "w": 47.296875,
+ "h": 25
+ },
+ "class": "macromolecule",
+ "label": "index.js",
+ "statesandinfos": [],
+ "parent": "nwtN_c50c8570-f7bd-46c3-b7c2-66857746b854",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#dfc27d",
+ "background-opacity": 1,
+ "background-image-opacity": "",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "background-image": "",
+ "background-fit": "",
+ "background-position-x": "",
+ "background-position-y": "",
+ "background-width": "",
+ "background-height": "",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 457.4608860015869,
+ "y": 305.05675506591797
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_cafd8043-b744-474c-99d0-7f33deb415ac",
+ "bbox": {
+ "x": 451.6038619242243,
+ "y": 380.17711757548415,
+ "w": 50.546875,
+ "h": 28.25
+ },
+ "originalW": 78.546875,
+ "originalH": 56.25,
+ "class": "compartment",
+ "label": "escape-string-regexp",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 2.25,
+ "border-color": "#555555",
+ "background-color": "#f5f5f5",
+ "background-opacity": 0.5,
+ "background-image-opacity": "",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "bold",
+ "color": "#000000",
+ "ports": [],
+ "background-image": "",
+ "background-fit": "",
+ "background-position-x": "",
+ "background-position-y": "",
+ "background-width": "",
+ "background-height": "",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 451.6038619242243,
+ "y": 380.17711757548415
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_6442ea6c-8a74-4948-ab60-2a2fc6b904f7",
+ "bbox": {
+ "x": 451.6038619242243,
+ "y": 380.17711757548415,
+ "w": 47.296875,
+ "h": 25
+ },
+ "class": "macromolecule",
+ "label": "index.js",
+ "statesandinfos": [],
+ "parent": "nwtN_cafd8043-b744-474c-99d0-7f33deb415ac",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#dfc27d",
+ "background-opacity": 1,
+ "background-image-opacity": "",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "background-image": "",
+ "background-fit": "",
+ "background-position-x": "",
+ "background-position-y": "",
+ "background-width": "",
+ "background-height": "",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 451.6038619242243,
+ "y": 380.17711757548415
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_e99db3a7-4249-47e7-84cf-b61676393dc8",
+ "bbox": {
+ "x": 467.6089290625593,
+ "y": 476.207520405494,
+ "w": 50.546875,
+ "h": 28.25
+ },
+ "originalW": 78.546875,
+ "originalH": 56.25,
+ "class": "compartment",
+ "label": "supports-color",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 2.25,
+ "border-color": "#555555",
+ "background-color": "#f5f5f5",
+ "background-opacity": 0.5,
+ "background-image-opacity": "",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "bold",
+ "color": "#000000",
+ "ports": [],
+ "background-image": "",
+ "background-fit": "",
+ "background-position-x": "",
+ "background-position-y": "",
+ "background-width": "",
+ "background-height": "",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 467.6089290625593,
+ "y": 476.207520405494
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_395e3fed-fcd4-427a-909a-c01a7fc94607",
+ "bbox": {
+ "x": 467.6089290625593,
+ "y": 476.207520405494,
+ "w": 47.296875,
+ "h": 25
+ },
+ "class": "macromolecule",
+ "label": "index.js",
+ "statesandinfos": [],
+ "parent": "nwtN_e99db3a7-4249-47e7-84cf-b61676393dc8",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#dfc27d",
+ "background-opacity": 1,
+ "background-image-opacity": "",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "background-image": "",
+ "background-fit": "",
+ "background-position-x": "",
+ "background-position-y": "",
+ "background-width": "",
+ "background-height": "",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 467.6089290625593,
+ "y": 476.207520405494
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_641f76bc-059e-4885-9e58-8bc08b26765d",
+ "bbox": {
+ "x": 663.6710015071626,
+ "y": 439.19580264809434,
+ "w": 50.546875,
+ "h": 28.25
+ },
+ "originalW": 78.546875,
+ "originalH": 56.25,
+ "class": "compartment",
+ "label": "has-flag",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 2.25,
+ "border-color": "#555555",
+ "background-color": "#f5f5f5",
+ "background-opacity": 0.5,
+ "background-image-opacity": "",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "bold",
+ "color": "#000000",
+ "ports": [],
+ "background-image": "",
+ "background-fit": "",
+ "background-position-x": "",
+ "background-position-y": "",
+ "background-width": "",
+ "background-height": "",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 663.6710015071626,
+ "y": 439.19580264809434
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_fc4a5aa8-171f-41bd-8ab3-5eee343c4f9f",
+ "bbox": {
+ "x": 663.6710015071626,
+ "y": 439.19580264809434,
+ "w": 47.296875,
+ "h": 25
+ },
+ "class": "macromolecule",
+ "label": "index.js",
+ "statesandinfos": [],
+ "parent": "nwtN_641f76bc-059e-4885-9e58-8bc08b26765d",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#dfc27d",
+ "background-opacity": 1,
+ "background-image-opacity": "",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "background-image": "",
+ "background-fit": "",
+ "background-position-x": "",
+ "background-position-y": "",
+ "background-width": "",
+ "background-height": "",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 663.6710015071626,
+ "y": 439.19580264809434
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_e4a59b7b-986f-40c1-8211-07ecd7bd4a85",
+ "bbox": {
+ "x": 769.0413352597577,
+ "y": 155.046620789248,
+ "w": 209.7825138067825,
+ "h": 76.26330123812932
+ },
+ "originalW": 237.7825138067825,
+ "originalH": 104.26330123812932,
+ "class": "compartment",
+ "label": "color-convert",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 2.25,
+ "border-color": "#555555",
+ "background-color": "#f5f5f5",
+ "background-opacity": 0.5,
+ "background-image-opacity": "",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "bold",
+ "color": "#000000",
+ "ports": [],
+ "background-image": "",
+ "background-fit": "",
+ "background-position-x": "",
+ "background-position-y": "",
+ "background-width": "",
+ "background-height": "",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 769.0413352597577,
+ "y": 155.046620789248
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_10cd6cfc-6d2a-48b1-82e1-29d16dadd069",
+ "bbox": {
+ "x": 689.4235158563665,
+ "y": 179.05327140831267,
+ "w": 47.296875,
+ "h": 25
+ },
+ "class": "macromolecule",
+ "label": "index.js",
+ "statesandinfos": [],
+ "parent": "nwtN_e4a59b7b-986f-40c1-8211-07ecd7bd4a85",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#dfc27d",
+ "background-opacity": 1,
+ "background-image-opacity": "",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "background-image": "",
+ "background-fit": "",
+ "background-position-x": "",
+ "background-position-y": "",
+ "background-width": "",
+ "background-height": "",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 689.4235158563665,
+ "y": 179.05327140831267
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_da2a2f8c-a185-4ffd-b577-f2c5a7680a37",
+ "bbox": {
+ "x": 832.459935913149,
+ "y": 174.05612167362608,
+ "w": 79.6953125,
+ "h": 25
+ },
+ "class": "macromolecule",
+ "label": "conversions.js",
+ "statesandinfos": [],
+ "parent": "nwtN_e4a59b7b-986f-40c1-8211-07ecd7bd4a85",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#dfc27d",
+ "background-opacity": 1,
+ "background-image-opacity": "",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "background-image": "",
+ "background-fit": "",
+ "background-position-x": "",
+ "background-position-y": "",
+ "background-width": "",
+ "background-height": "",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 832.459935913149,
+ "y": 174.05612167362608
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_ec240627-f567-42b4-a9c6-4564450e9946",
+ "bbox": {
+ "x": 761.4273162101177,
+ "y": 131.03997017018335,
+ "w": 46.072265625,
+ "h": 25
+ },
+ "class": "macromolecule",
+ "label": "route.js",
+ "statesandinfos": [],
+ "parent": "nwtN_e4a59b7b-986f-40c1-8211-07ecd7bd4a85",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#dfc27d",
+ "background-opacity": 1,
+ "background-image-opacity": "",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "background-image": "",
+ "background-fit": "",
+ "background-position-x": "",
+ "background-position-y": "",
+ "background-width": "",
+ "background-height": "",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 761.4273162101177,
+ "y": 131.03997017018335
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_bc39472b-e95f-4e5c-955e-eb6fd7fe0cdf",
+ "bbox": {
+ "x": 914.4608860015869,
+ "y": 275.05675506591797,
+ "w": 50.546875,
+ "h": 28.25
+ },
+ "originalW": 78.546875,
+ "originalH": 56.25,
+ "class": "compartment",
+ "label": "color-name",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 2.25,
+ "border-color": "#555555",
+ "background-color": "#f5f5f5",
+ "background-opacity": 0.5,
+ "background-image-opacity": "",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "bold",
+ "color": "#000000",
+ "ports": [],
+ "background-image": "",
+ "background-fit": "",
+ "background-position-x": "",
+ "background-position-y": "",
+ "background-width": "",
+ "background-height": "",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 914.4608860015869,
+ "y": 275.05675506591797
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_2f088c82-aac6-4e48-8fde-8574a3390d24",
+ "bbox": {
+ "x": 914.4608860015869,
+ "y": 275.05675506591797,
+ "w": 47.296875,
+ "h": 25
+ },
+ "class": "macromolecule",
+ "label": "index.js",
+ "statesandinfos": [],
+ "parent": "nwtN_bc39472b-e95f-4e5c-955e-eb6fd7fe0cdf",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#dfc27d",
+ "background-opacity": 1,
+ "background-image-opacity": "",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "background-image": "",
+ "background-fit": "",
+ "background-position-x": "",
+ "background-position-y": "",
+ "background-width": "",
+ "background-height": "",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 914.4608860015869,
+ "y": 275.05675506591797
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_88c73829-9d76-4b03-ab27-335fd9581531",
+ "bbox": {
+ "x": 638.6630841035143,
+ "y": 555.2325394010229,
+ "w": 30,
+ "h": 25
+ },
+ "class": "unspecified entity",
+ "label": "os",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#f5f5f5",
+ "background-opacity": 1,
+ "background-image-opacity": "",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "background-image": "",
+ "background-fit": "",
+ "background-position-x": "",
+ "background-position-y": "",
+ "background-width": "",
+ "background-height": "",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 638.6630841035143,
+ "y": 555.2325394010229
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ }
+ ],
+ "edges": [
+ {
+ "data": {
+ "id": "nwtE_d1ae8562-bb81-4d93-ac24-78b9def385a2",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_6ffc1fdf-602f-4395-89b5-666b383a5059",
+ "target": "nwtN_c152aeef-01df-49fc-9539-9e022e8d4c64",
+ "portsource": "nwtN_6ffc1fdf-602f-4395-89b5-666b383a5059",
+ "porttarget": "nwtN_c152aeef-01df-49fc-9539-9e022e8d4c64"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_925bc3d3-7dac-4ef3-b0d7-875c78be8fbe",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_6ffc1fdf-602f-4395-89b5-666b383a5059",
+ "target": "nwtN_fa99aac7-9500-4ead-82c3-90c72e9837f3",
+ "portsource": "nwtN_6ffc1fdf-602f-4395-89b5-666b383a5059",
+ "porttarget": "nwtN_fa99aac7-9500-4ead-82c3-90c72e9837f3"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_d32f598b-4b96-4403-87c4-870e99ee6bc1",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_6ffc1fdf-602f-4395-89b5-666b383a5059",
+ "target": "nwtN_6442ea6c-8a74-4948-ab60-2a2fc6b904f7",
+ "portsource": "nwtN_6ffc1fdf-602f-4395-89b5-666b383a5059",
+ "porttarget": "nwtN_6442ea6c-8a74-4948-ab60-2a2fc6b904f7"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_0f92d3d4-1849-4f4c-97f0-6504eb9831ac",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_6ffc1fdf-602f-4395-89b5-666b383a5059",
+ "target": "nwtN_395e3fed-fcd4-427a-909a-c01a7fc94607",
+ "portsource": "nwtN_6ffc1fdf-602f-4395-89b5-666b383a5059",
+ "porttarget": "nwtN_395e3fed-fcd4-427a-909a-c01a7fc94607"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_2b21b38a-8443-45ea-b067-d626a731fc32",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_fa99aac7-9500-4ead-82c3-90c72e9837f3",
+ "target": "nwtN_10cd6cfc-6d2a-48b1-82e1-29d16dadd069",
+ "portsource": "nwtN_fa99aac7-9500-4ead-82c3-90c72e9837f3",
+ "porttarget": "nwtN_10cd6cfc-6d2a-48b1-82e1-29d16dadd069"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_cc83602e-928e-4d47-b60e-9ec94b93f9bd",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_10cd6cfc-6d2a-48b1-82e1-29d16dadd069",
+ "target": "nwtN_ec240627-f567-42b4-a9c6-4564450e9946",
+ "portsource": "nwtN_10cd6cfc-6d2a-48b1-82e1-29d16dadd069",
+ "porttarget": "nwtN_ec240627-f567-42b4-a9c6-4564450e9946"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_66f2d0d1-0542-450a-b6ae-f1c8bfa19e23",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_ec240627-f567-42b4-a9c6-4564450e9946",
+ "target": "nwtN_da2a2f8c-a185-4ffd-b577-f2c5a7680a37",
+ "portsource": "nwtN_ec240627-f567-42b4-a9c6-4564450e9946",
+ "porttarget": "nwtN_da2a2f8c-a185-4ffd-b577-f2c5a7680a37"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_83bd7195-5e2f-49c8-87f1-b54d74309928",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_10cd6cfc-6d2a-48b1-82e1-29d16dadd069",
+ "target": "nwtN_da2a2f8c-a185-4ffd-b577-f2c5a7680a37",
+ "portsource": "nwtN_10cd6cfc-6d2a-48b1-82e1-29d16dadd069",
+ "porttarget": "nwtN_da2a2f8c-a185-4ffd-b577-f2c5a7680a37"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_5e327bfd-b03d-440c-8825-0f03c01c7426",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_da2a2f8c-a185-4ffd-b577-f2c5a7680a37",
+ "target": "nwtN_2f088c82-aac6-4e48-8fde-8574a3390d24",
+ "portsource": "nwtN_da2a2f8c-a185-4ffd-b577-f2c5a7680a37",
+ "porttarget": "nwtN_2f088c82-aac6-4e48-8fde-8574a3390d24"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_93128cfa-29d1-4669-8496-85227b119c1f",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_395e3fed-fcd4-427a-909a-c01a7fc94607",
+ "target": "nwtN_fc4a5aa8-171f-41bd-8ab3-5eee343c4f9f",
+ "portsource": "nwtN_395e3fed-fcd4-427a-909a-c01a7fc94607",
+ "porttarget": "nwtN_fc4a5aa8-171f-41bd-8ab3-5eee343c4f9f"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_95f18b40-fe6a-482c-9ff2-5296ad1923c0",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#a8a8a8",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_395e3fed-fcd4-427a-909a-c01a7fc94607",
+ "target": "nwtN_88c73829-9d76-4b03-ab27-335fd9581531",
+ "portsource": "nwtN_395e3fed-fcd4-427a-909a-c01a7fc94607",
+ "porttarget": "nwtN_88c73829-9d76-4b03-ab27-335fd9581531"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ }
+ ]
+ },
+ "style": [
+ {
+ "selector": "node",
+ "style": {
+ "shape": "rectangle",
+ "text-halign": "center",
+ "text-valign": "center",
+ "background-color": "#ffffff",
+ "opacity": "1",
+ "border-color": "#555555"
+ }
+ },
+ {
+ "selector": "node[class = 'simple chemical']",
+ "style": {
+ "shape": "ellipse",
+ "background-color": "#c7eae5"
+ }
+ },
+ {
+ "selector": "node[class = 'macromolecule']",
+ "style": {
+ "shape": "roundrectangle",
+ "background-color": "#dfc27d"
+ }
+ },
+ {
+ "selector": "node[class = 'unspecified entity']",
+ "style": {
+ "shape": "ellipse",
+ "background-color": "#f5f5f5"
+ }
+ },
+ {
+ "selector": ":parent",
+ "style": {
+ "background-opacity": "0.333",
+ "text-valign": "bottom",
+ "shape": "barrel",
+ "text-margin-y": "2px",
+ "font-weight" : "bold",
+ "border-color": "#555555"
+ }
+ },
+ {
+ "selector": "node:selected",
+ "style": {
+ "background-color": "#33ff00",
+ "border-color": "#22ee00"
+ }
+ },
+ {
+ "selector": "edge",
+ "style": {
+ "curve-style": "bezier",
+ "width": "2px",
+ "line-color": "rgb(58,126,207)",
+ "opacity": "1",
+ "target-arrow-shape": "triangle",
+ "target-arrow-color": "rgb(58,126,207)",
+ }
+ },
+ {
+ "selector": "edge:selected",
+ "style": {
+ "line-color": "#33ff00",
+ "font-size": "13px",
+ "text-opacity": "1",
+ "text-rotation": "autorotate",
+ "color": "#33ff00",
+ "font-weight": "bold",
+ "text-background-shape": "roundrectangle",
+ "text-background-opacity": "1",
+ "text-background-padding": "2px",
+ "target-arrow-color": "#33ff00",
+ "target-arrow-shape": "triangle",
+ }
+ }
+ ],
+ "zoomingEnabled": true,
+ "userZoomingEnabled": true,
+ "zoom": 1.7784699371350863,
+ "minZoom": 0.125,
+ "maxZoom": 16,
+ "panningEnabled": true,
+ "userPanningEnabled": true,
+ "pan": {
+ "x": -246.2736846361503,
+ "y": -69.57913264371261
+ },
+ "boxSelectionEnabled": true,
+ "renderer": {
+ "name": "canvas"
+ },
+ "wheelSensitivity": 0.1,
+ "motionBlur": true
+}
\ No newline at end of file
diff --git a/node_modules/cytoscape-fcose/demo/samples/chalk_constraints.js b/node_modules/cytoscape-fcose/demo/samples/chalk_constraints.js
new file mode 100644
index 00000000..d5ae06d9
--- /dev/null
+++ b/node_modules/cytoscape-fcose/demo/samples/chalk_constraints.js
@@ -0,0 +1,78 @@
+chalk_constraints = {
+ "alignmentConstraint": {
+ "vertical": [
+ [
+ "nwtN_c152aeef-01df-49fc-9539-9e022e8d4c64",
+ "nwtN_fa99aac7-9500-4ead-82c3-90c72e9837f3",
+ "nwtN_6442ea6c-8a74-4948-ab60-2a2fc6b904f7",
+ "nwtN_395e3fed-fcd4-427a-909a-c01a7fc94607"
+ ],
+ [
+ "nwtN_fc4a5aa8-171f-41bd-8ab3-5eee343c4f9f",
+ "nwtN_10cd6cfc-6d2a-48b1-82e1-29d16dadd069",
+ "nwtN_88c73829-9d76-4b03-ab27-335fd9581531"
+ ],
+ [
+ "nwtN_23452b85-7855-413f-a03d-26412ed87bfc",
+ "nwtN_6ffc1fdf-602f-4395-89b5-666b383a5059"
+ ]
+ ]
+ },
+ "relativePlacementConstraint": [
+ {
+ "left": "nwtN_6ffc1fdf-602f-4395-89b5-666b383a5059",
+ "right": "nwtN_c152aeef-01df-49fc-9539-9e022e8d4c64",
+ "gap": 180
+ },
+ {
+ "left": "nwtN_6ffc1fdf-602f-4395-89b5-666b383a5059",
+ "right": "nwtN_fa99aac7-9500-4ead-82c3-90c72e9837f3",
+ "gap": 180
+ },
+ {
+ "left": "nwtN_6ffc1fdf-602f-4395-89b5-666b383a5059",
+ "right": "nwtN_6442ea6c-8a74-4948-ab60-2a2fc6b904f7",
+ "gap": 180
+ },
+ {
+ "left": "nwtN_6ffc1fdf-602f-4395-89b5-666b383a5059",
+ "right": "nwtN_395e3fed-fcd4-427a-909a-c01a7fc94607",
+ "gap": 180
+ },
+ {
+ "left": "nwtN_fa99aac7-9500-4ead-82c3-90c72e9837f3",
+ "right": "nwtN_10cd6cfc-6d2a-48b1-82e1-29d16dadd069",
+ "gap": 120
+ },
+ {
+ "left": "nwtN_395e3fed-fcd4-427a-909a-c01a7fc94607",
+ "right": "nwtN_fc4a5aa8-171f-41bd-8ab3-5eee343c4f9f",
+ "gap": 120
+ },
+ {
+ "left": "nwtN_395e3fed-fcd4-427a-909a-c01a7fc94607",
+ "right": "nwtN_88c73829-9d76-4b03-ab27-335fd9581531",
+ "gap": 120
+ },
+ {
+ "left": "nwtN_10cd6cfc-6d2a-48b1-82e1-29d16dadd069",
+ "right": "nwtN_ec240627-f567-42b4-a9c6-4564450e9946",
+ "gap": 100
+ },
+ {
+ "left": "nwtN_10cd6cfc-6d2a-48b1-82e1-29d16dadd069",
+ "right": "nwtN_da2a2f8c-a185-4ffd-b577-f2c5a7680a37",
+ "gap": 120
+ },
+ {
+ "left": "nwtN_ec240627-f567-42b4-a9c6-4564450e9946",
+ "right": "nwtN_da2a2f8c-a185-4ffd-b577-f2c5a7680a37",
+ "gap": 120
+ },
+ {
+ "left": "nwtN_da2a2f8c-a185-4ffd-b577-f2c5a7680a37",
+ "right": "nwtN_2f088c82-aac6-4e48-8fde-8574a3390d24",
+ "gap": 120
+ }
+ ]
+}
\ No newline at end of file
diff --git a/node_modules/cytoscape-fcose/demo/samples/unix.js b/node_modules/cytoscape-fcose/demo/samples/unix.js
new file mode 100644
index 00000000..b2d6ca6d
--- /dev/null
+++ b/node_modules/cytoscape-fcose/demo/samples/unix.js
@@ -0,0 +1,2868 @@
+unix = {
+ "elements": {
+ "nodes": [
+ {
+ "data": {
+ "id": "nwtN_4451c335-4668-4f8d-9f71-274aa2e6ab06",
+ "bbox": {
+ "x": 745.4608860015869,
+ "y": 224.05675506591797,
+ "w": 61.9814453125,
+ "h": 25
+ },
+ "class": "unspecified entity",
+ "label": "5th Edition",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#b2dfee",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 745.4608860015869,
+ "y": 224.05675506591797
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_37220ed2-0cbe-4d1f-9cac-07dfb11d6eda",
+ "bbox": {
+ "x": 873.3539436491809,
+ "y": 263.5835504727236,
+ "w": 53.40380859375,
+ "h": 25
+ },
+ "class": "unspecified entity",
+ "label": "PWB 1.0",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#b2dfee",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 873.3539436491809,
+ "y": 263.5835504727236
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_8d99e7af-1b2f-4605-a381-ce3127b6199a",
+ "bbox": {
+ "x": 614.9885135227565,
+ "y": 265.72104900772746,
+ "w": 61.9814453125,
+ "h": 25
+ },
+ "class": "unspecified entity",
+ "label": "6th Edition",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#b2dfee",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 614.9885135227565,
+ "y": 265.72104900772746
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_020b84b2-717f-4465-b716-7520e5c9c470",
+ "bbox": {
+ "x": 480.36757192398835,
+ "y": 363.24391403339195,
+ "w": 41.79150390625,
+ "h": 25
+ },
+ "class": "unspecified entity",
+ "label": "1 BSD",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#b2dfee",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 480.36757192398835,
+ "y": 363.24391403339195
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_c1880331-8411-443e-9218-87e78c057b22",
+ "bbox": {
+ "x": 570.464197497224,
+ "y": 359.0206347096466,
+ "w": 53.419921875,
+ "h": 25
+ },
+ "class": "unspecified entity",
+ "label": "Interdata",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#b2dfee",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 570.464197497224,
+ "y": 359.0206347096466
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_3f3b6234-e449-44bb-9ba8-059d1f843c98",
+ "bbox": {
+ "x": 675.1503958677858,
+ "y": 361.09076288085635,
+ "w": 55.22998046875,
+ "h": 25
+ },
+ "class": "unspecified entity",
+ "label": "Mini Unix",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#b2dfee",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 675.1503958677858,
+ "y": 361.09076288085635
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_d7bbe746-9028-4268-a642-70544788d687",
+ "bbox": {
+ "x": 754.5642886596697,
+ "y": 359.6830031062747,
+ "w": 67.89501953125,
+ "h": 25
+ },
+ "class": "unspecified entity",
+ "label": "Wollongong",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#b2dfee",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 754.5642886596697,
+ "y": 359.6830031062747
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_5bb0a938-c7ee-42d8-85c8-17bdc1ff0ade",
+ "bbox": {
+ "x": 830.680176631967,
+ "y": 356.14976650626585,
+ "w": 30.79150390625,
+ "h": 25
+ },
+ "class": "unspecified entity",
+ "label": "LSX",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#b2dfee",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 830.680176631967,
+ "y": 356.14976650626585
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_8227939a-5dc0-433e-8c4d-987ec44a1f8f",
+ "bbox": {
+ "x": 897.0524434906262,
+ "y": 351.8849756918575,
+ "w": 53.40380859375,
+ "h": 25
+ },
+ "class": "unspecified entity",
+ "label": "PWB 1.2",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#b2dfee",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 897.0524434906262,
+ "y": 351.8849756918575
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_3f7d61be-a016-4383-9b8d-8c1db26192f2",
+ "bbox": {
+ "x": 975.1139251621452,
+ "y": 363.24391403339195,
+ "w": 52.1845703125,
+ "h": 25
+ },
+ "class": "unspecified entity",
+ "label": "USG 1.0",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#b2dfee",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 975.1139251621452,
+ "y": 363.24391403339195
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_167a075d-9d93-49d0-b5be-446efebec06c",
+ "bbox": {
+ "x": 575.2306358130835,
+ "y": 432.33043568527285,
+ "w": 61.9814453125,
+ "h": 25
+ },
+ "class": "unspecified entity",
+ "label": "7th Edition",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#b2dfee",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 575.2306358130835,
+ "y": 432.33043568527285
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_9dfde51e-a410-4e3b-a472-9061ae4fae7a",
+ "bbox": {
+ "x": 714.3514898595155,
+ "y": 437.0837204997799,
+ "w": 53.40380859375,
+ "h": 25
+ },
+ "class": "unspecified entity",
+ "label": "PWB 2.0",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#b2dfee",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 714.3514898595155,
+ "y": 437.0837204997799
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_a186f2a4-524e-4a84-95c0-66d41dbda586",
+ "bbox": {
+ "x": 830.1394421526015,
+ "y": 445.43869045232054,
+ "w": 52.1845703125,
+ "h": 25
+ },
+ "class": "unspecified entity",
+ "label": "USG 2.0",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#b2dfee",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 830.1394421526015,
+ "y": 445.43869045232054
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_26c73172-708d-45cc-8ba5-f29671089767",
+ "bbox": {
+ "x": 971.488441986689,
+ "y": 450.36938877369727,
+ "w": 59.51611328125,
+ "h": 25
+ },
+ "class": "unspecified entity",
+ "label": "CB Unix 1",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#b2dfee",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 971.488441986689,
+ "y": 450.36938877369727
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_2d9c1f24-1482-46fb-a0f4-f963ba454710",
+ "bbox": {
+ "x": 489.09801948657775,
+ "y": 530.0434239414329,
+ "w": 37.51611328125,
+ "h": 25
+ },
+ "class": "unspecified entity",
+ "label": "Xenix",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#b2dfee",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 489.09801948657775,
+ "y": 530.0434239414329
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_15fb1e74-6b08-4914-95ac-ee4ecb1b7f17",
+ "bbox": {
+ "x": 605.5402906403156,
+ "y": 534.3179790370807,
+ "w": 54.32763671875,
+ "h": 25
+ },
+ "class": "unspecified entity",
+ "label": "UniPlus+",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#b2dfee",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 605.5402906403156,
+ "y": 534.3179790370807
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_485d980b-dc42-48ca-9ada-3c1b754cc2ef",
+ "bbox": {
+ "x": 722.9845503897996,
+ "y": 534.3179790370807,
+ "w": 30,
+ "h": 25
+ },
+ "class": "unspecified entity",
+ "label": "32V",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#b2dfee",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 722.9845503897996,
+ "y": 534.3179790370807
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_2cf0c5aa-67eb-4394-85e3-dc84f4b1cd52",
+ "bbox": {
+ "x": 819.9650376071766,
+ "y": 534.3179790370807,
+ "w": 52.1845703125,
+ "h": 25
+ },
+ "class": "unspecified entity",
+ "label": "USG 3.0",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#b2dfee",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 819.9650376071766,
+ "y": 534.3179790370807
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_cc15f875-f4dd-4df8-a09e-a4f2e6c8a3f5",
+ "bbox": {
+ "x": 901.8201277356048,
+ "y": 534.3179790370807,
+ "w": 67.46533203125,
+ "h": 25
+ },
+ "class": "unspecified entity",
+ "label": "Unix/TS 1.0",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#b2dfee",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 901.8201277356048,
+ "y": 534.3179790370807
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_2b6ef682-26c7-48d7-9fd8-09fa76c7b718",
+ "bbox": {
+ "x": 978.3368424208749,
+ "y": 528.0898743533959,
+ "w": 59.51611328125,
+ "h": 25
+ },
+ "class": "unspecified entity",
+ "label": "CB Unix 2",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#b2dfee",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 978.3368424208749,
+ "y": 528.0898743533959
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_a2bfb9bd-8b13-43a5-87a5-d88b0137bd78",
+ "bbox": {
+ "x": 528.1338467145192,
+ "y": 609.9449644818243,
+ "w": 32.61767578125,
+ "h": 25
+ },
+ "class": "unspecified entity",
+ "label": "V7M",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#b2dfee",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 528.1338467145192,
+ "y": 609.9449644818243
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_d53ea35c-4609-4051-917a-8a183e5976cf",
+ "bbox": {
+ "x": 623.3348754508435,
+ "y": 607.2757767602452,
+ "w": 41.79150390625,
+ "h": 25
+ },
+ "class": "unspecified entity",
+ "label": "3 BSD",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#b2dfee",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 623.3348754508435,
+ "y": 607.2757767602452
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_db35fc70-2b89-4857-acb2-9dd545e61447",
+ "bbox": {
+ "x": 755.9045322892762,
+ "y": 607.2757767602452,
+ "w": 67.46533203125,
+ "h": 25
+ },
+ "class": "unspecified entity",
+ "label": "Unix/TS 3.0",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#b2dfee",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 755.9045322892762,
+ "y": 607.2757767602452
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_eed8fc62-a21d-4677-85f2-f1244e3abf00",
+ "bbox": {
+ "x": 891.1433768492882,
+ "y": 603.7168597981396,
+ "w": 59.51611328125,
+ "h": 25
+ },
+ "class": "unspecified entity",
+ "label": "CB Unix 3",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#b2dfee",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 891.1433768492882,
+ "y": 603.7168597981396
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_c261ca93-6060-49c1-8286-2a98900c3b9e",
+ "bbox": {
+ "x": 702.3447390464235,
+ "y": 667.8736577760533,
+ "w": 41.79150390625,
+ "h": 25
+ },
+ "class": "unspecified entity",
+ "label": "4 BSD",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#b2dfee",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 702.3447390464235,
+ "y": 667.8736577760533
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_2f175f07-154a-4873-98cc-bc4e4d6d13a1",
+ "bbox": {
+ "x": 795.6906426110786,
+ "y": 666.7490083355151,
+ "w": 61.96533203125,
+ "h": 25
+ },
+ "class": "unspecified entity",
+ "label": "Unix/TS++",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#b2dfee",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 795.6906426110786,
+ "y": 666.7490083355151
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_e55d29c7-89bc-4aa0-b599-3637e141f17f",
+ "bbox": {
+ "x": 934.0225237972543,
+ "y": 664.4997094544391,
+ "w": 79.48583984375,
+ "h": 25
+ },
+ "class": "unspecified entity",
+ "label": "PDP-11 Sys V",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#b2dfee",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 934.0225237972543,
+ "y": 664.4997094544391
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_166d8364-fd55-499e-9098-0a48db6615c1",
+ "bbox": {
+ "x": 484.16274758204827,
+ "y": 744.3498197326381,
+ "w": 41.79150390625,
+ "h": 25
+ },
+ "class": "unspecified entity",
+ "label": "2 BSD",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#b2dfee",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 484.16274758204827,
+ "y": 744.3498197326381
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_02a50d8b-3939-492a-ac5b-1f356cd514f6",
+ "bbox": {
+ "x": 606.7495366006917,
+ "y": 739.8512219704861,
+ "w": 50.96533203125,
+ "h": 25
+ },
+ "class": "unspecified entity",
+ "label": "4.1 BSD",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#b2dfee",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 606.7495366006917,
+ "y": 739.8512219704861
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_a68571c0-2669-4894-aa53-332555f625a2",
+ "bbox": {
+ "x": 795.6906426110781,
+ "y": 735.3526242083341,
+ "w": 42.40380859375,
+ "h": 25
+ },
+ "class": "unspecified entity",
+ "label": "TS 4.0",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#b2dfee",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 795.6906426110781,
+ "y": 735.3526242083341
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_205680d2-dc98-4faf-baf4-21e27e8585e4",
+ "bbox": {
+ "x": 589.8797949926216,
+ "y": 806.2055389622288,
+ "w": 50.96533203125,
+ "h": 25
+ },
+ "class": "unspecified entity",
+ "label": "2.8 BSD",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#b2dfee",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 589.8797949926216,
+ "y": 806.2055389622288
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_75318a95-e179-40fc-b6e1-e01fcd66cd8c",
+ "bbox": {
+ "x": 713.5912334518031,
+ "y": 805.0808895216909,
+ "w": 50.96533203125,
+ "h": 25
+ },
+ "class": "unspecified entity",
+ "label": "4.2 BSD",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#b2dfee",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 713.5912334518031,
+ "y": 805.0808895216909
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_bce869d1-7c58-4489-81aa-e87e9418ab70",
+ "bbox": {
+ "x": 811.4357347786103,
+ "y": 803.9562400811528,
+ "w": 61.9814453125,
+ "h": 25
+ },
+ "class": "unspecified entity",
+ "label": "8th Edition",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#b2dfee",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 811.4357347786103,
+ "y": 803.9562400811528
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_8ed84db0-02da-43c6-847c-6b33f657f52c",
+ "bbox": {
+ "x": 962.138759810704,
+ "y": 801.7069412000769,
+ "w": 65.23095703125,
+ "h": 25
+ },
+ "class": "unspecified entity",
+ "label": "System V.0",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#b2dfee",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 962.138759810704,
+ "y": 801.7069412000769
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_be8097dc-4a84-4d3f-ade9-e80221f86dd6",
+ "bbox": {
+ "x": 553.5602026296802,
+ "y": 881.6602158726629,
+ "w": 50.1328125,
+ "h": 25
+ },
+ "class": "unspecified entity",
+ "label": "Ultrix-11",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#b2dfee",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 553.5602026296802,
+ "y": 881.6602158726629
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_8489a816-b7af-452f-a722-04d06226341c",
+ "bbox": {
+ "x": 677.1635290742751,
+ "y": 881.6602158726629,
+ "w": 50.96533203125,
+ "h": 25
+ },
+ "class": "unspecified entity",
+ "label": "2.9 BSD",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#b2dfee",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 677.1635290742751,
+ "y": 881.6602158726629
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_d4bf8470-416d-4387-a563-3c9cccf55079",
+ "bbox": {
+ "x": 785.6932791231874,
+ "y": 881.6602158726629,
+ "w": 50.94921875,
+ "h": 25
+ },
+ "class": "unspecified entity",
+ "label": "Ultrix-32",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#b2dfee",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 785.6932791231874,
+ "y": 881.6602158726629
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_e48d9732-8ee0-4714-8b62-8de8238ec9c2",
+ "bbox": {
+ "x": 867.0905916598717,
+ "y": 880.1528582330947,
+ "w": 50.96533203125,
+ "h": 25
+ },
+ "class": "unspecified entity",
+ "label": "4.3 BSD",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#b2dfee",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 867.0905916598717,
+ "y": 880.1528582330947
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_103a9105-ef50-47a4-b501-840a431fcbdd",
+ "bbox": {
+ "x": 986.1718451857619,
+ "y": 877.1381429539582,
+ "w": 61.9814453125,
+ "h": 25
+ },
+ "class": "unspecified entity",
+ "label": "9th Edition",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#b2dfee",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 986.1718451857619,
+ "y": 877.1381429539582
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_6385f491-0d09-4d53-a34c-781a861e8b42",
+ "bbox": {
+ "x": 1075.1059459202875,
+ "y": 875.6307853143899,
+ "w": 65.23095703125,
+ "h": 25
+ },
+ "class": "unspecified entity",
+ "label": "System V.2",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#b2dfee",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 1075.1059459202875,
+ "y": 875.6307853143899
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_88e20782-9221-4b12-9b62-6a6c7116a70f",
+ "bbox": {
+ "x": 948.4879041965561,
+ "y": 935.925090897119,
+ "w": 65.23095703125,
+ "h": 25
+ },
+ "class": "unspecified entity",
+ "label": "System V.3",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#b2dfee",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 948.4879041965561,
+ "y": 935.925090897119
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ }
+ ],
+ "edges": [
+ {
+ "data": {
+ "id": "nwtE_d28e1f77-50d0-4dd8-83cc-9aa7753ec703",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_4451c335-4668-4f8d-9f71-274aa2e6ab06",
+ "target": "nwtN_8d99e7af-1b2f-4605-a381-ce3127b6199a",
+ "portsource": "nwtN_4451c335-4668-4f8d-9f71-274aa2e6ab06",
+ "porttarget": "nwtN_8d99e7af-1b2f-4605-a381-ce3127b6199a"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_45a21af1-4dec-41c7-ba69-dafcff42a64e",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_4451c335-4668-4f8d-9f71-274aa2e6ab06",
+ "target": "nwtN_37220ed2-0cbe-4d1f-9cac-07dfb11d6eda",
+ "portsource": "nwtN_4451c335-4668-4f8d-9f71-274aa2e6ab06",
+ "porttarget": "nwtN_37220ed2-0cbe-4d1f-9cac-07dfb11d6eda"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_f13cb629-066b-4348-a85f-17f46f76323d",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_8d99e7af-1b2f-4605-a381-ce3127b6199a",
+ "target": "nwtN_020b84b2-717f-4465-b716-7520e5c9c470",
+ "portsource": "nwtN_8d99e7af-1b2f-4605-a381-ce3127b6199a",
+ "porttarget": "nwtN_020b84b2-717f-4465-b716-7520e5c9c470"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_4cc00776-906f-4046-b334-ef8ef88c561f",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_8d99e7af-1b2f-4605-a381-ce3127b6199a",
+ "target": "nwtN_c1880331-8411-443e-9218-87e78c057b22",
+ "portsource": "nwtN_8d99e7af-1b2f-4605-a381-ce3127b6199a",
+ "porttarget": "nwtN_c1880331-8411-443e-9218-87e78c057b22"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_0d73b351-586f-44dd-b35a-f402831234ef",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_8d99e7af-1b2f-4605-a381-ce3127b6199a",
+ "target": "nwtN_3f3b6234-e449-44bb-9ba8-059d1f843c98",
+ "portsource": "nwtN_8d99e7af-1b2f-4605-a381-ce3127b6199a",
+ "porttarget": "nwtN_3f3b6234-e449-44bb-9ba8-059d1f843c98"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_f4b01e10-3d6f-484e-9af8-b2190fba1f76",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_8d99e7af-1b2f-4605-a381-ce3127b6199a",
+ "target": "nwtN_d7bbe746-9028-4268-a642-70544788d687",
+ "portsource": "nwtN_8d99e7af-1b2f-4605-a381-ce3127b6199a",
+ "porttarget": "nwtN_d7bbe746-9028-4268-a642-70544788d687"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_b6aef58e-28af-4c84-9cc0-9207baf031b6",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_8d99e7af-1b2f-4605-a381-ce3127b6199a",
+ "target": "nwtN_5bb0a938-c7ee-42d8-85c8-17bdc1ff0ade",
+ "portsource": "nwtN_8d99e7af-1b2f-4605-a381-ce3127b6199a",
+ "porttarget": "nwtN_5bb0a938-c7ee-42d8-85c8-17bdc1ff0ade"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_201fa31f-cc64-4e2c-af7d-346da494f7fc",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_37220ed2-0cbe-4d1f-9cac-07dfb11d6eda",
+ "target": "nwtN_8227939a-5dc0-433e-8c4d-987ec44a1f8f",
+ "portsource": "nwtN_37220ed2-0cbe-4d1f-9cac-07dfb11d6eda",
+ "porttarget": "nwtN_8227939a-5dc0-433e-8c4d-987ec44a1f8f"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_723aa506-a82c-4aed-835f-84fa3be00e95",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_37220ed2-0cbe-4d1f-9cac-07dfb11d6eda",
+ "target": "nwtN_3f7d61be-a016-4383-9b8d-8c1db26192f2",
+ "portsource": "nwtN_37220ed2-0cbe-4d1f-9cac-07dfb11d6eda",
+ "porttarget": "nwtN_3f7d61be-a016-4383-9b8d-8c1db26192f2"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_2194eb93-f987-4f54-af50-8f4324deecab",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_c1880331-8411-443e-9218-87e78c057b22",
+ "target": "nwtN_167a075d-9d93-49d0-b5be-446efebec06c",
+ "portsource": "nwtN_c1880331-8411-443e-9218-87e78c057b22",
+ "porttarget": "nwtN_167a075d-9d93-49d0-b5be-446efebec06c"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_3b3ed0dd-5dd6-4b90-8bdb-6096cd66bc8c",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_c1880331-8411-443e-9218-87e78c057b22",
+ "target": "nwtN_9dfde51e-a410-4e3b-a472-9061ae4fae7a",
+ "portsource": "nwtN_c1880331-8411-443e-9218-87e78c057b22",
+ "porttarget": "nwtN_9dfde51e-a410-4e3b-a472-9061ae4fae7a"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_2c364c9e-3c36-4b0f-ac5a-359bc463643d",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_8227939a-5dc0-433e-8c4d-987ec44a1f8f",
+ "target": "nwtN_9dfde51e-a410-4e3b-a472-9061ae4fae7a",
+ "portsource": "nwtN_8227939a-5dc0-433e-8c4d-987ec44a1f8f",
+ "porttarget": "nwtN_9dfde51e-a410-4e3b-a472-9061ae4fae7a"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_d2f4f0c5-7301-44ac-8a63-09488b5eed93",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_3f7d61be-a016-4383-9b8d-8c1db26192f2",
+ "target": "nwtN_a186f2a4-524e-4a84-95c0-66d41dbda586",
+ "portsource": "nwtN_3f7d61be-a016-4383-9b8d-8c1db26192f2",
+ "porttarget": "nwtN_a186f2a4-524e-4a84-95c0-66d41dbda586"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_a9a4c0b1-f8be-4215-9f5e-0eb70fe30552",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_3f7d61be-a016-4383-9b8d-8c1db26192f2",
+ "target": "nwtN_26c73172-708d-45cc-8ba5-f29671089767",
+ "portsource": "nwtN_3f7d61be-a016-4383-9b8d-8c1db26192f2",
+ "porttarget": "nwtN_26c73172-708d-45cc-8ba5-f29671089767"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_383d100e-2e81-4ecd-9f3f-6d89b49ebb5e",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_020b84b2-717f-4465-b716-7520e5c9c470",
+ "target": "nwtN_166d8364-fd55-499e-9098-0a48db6615c1",
+ "portsource": "nwtN_020b84b2-717f-4465-b716-7520e5c9c470",
+ "porttarget": "nwtN_166d8364-fd55-499e-9098-0a48db6615c1"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_417a4c87-3c4c-4edd-aed0-6d5f31454e74",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_c1880331-8411-443e-9218-87e78c057b22",
+ "target": "nwtN_db35fc70-2b89-4857-acb2-9dd545e61447",
+ "portsource": "nwtN_c1880331-8411-443e-9218-87e78c057b22",
+ "porttarget": "nwtN_db35fc70-2b89-4857-acb2-9dd545e61447"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_99ccd06d-3749-4f8d-9708-c6f68f4efeb2",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_167a075d-9d93-49d0-b5be-446efebec06c",
+ "target": "nwtN_a2bfb9bd-8b13-43a5-87a5-d88b0137bd78",
+ "portsource": "nwtN_167a075d-9d93-49d0-b5be-446efebec06c",
+ "porttarget": "nwtN_a2bfb9bd-8b13-43a5-87a5-d88b0137bd78"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_7c66928a-9c8d-47f2-9eaa-a5c9ba7c3da2",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_167a075d-9d93-49d0-b5be-446efebec06c",
+ "target": "nwtN_2d9c1f24-1482-46fb-a0f4-f963ba454710",
+ "portsource": "nwtN_167a075d-9d93-49d0-b5be-446efebec06c",
+ "porttarget": "nwtN_2d9c1f24-1482-46fb-a0f4-f963ba454710"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_46f1e73b-7bc3-4971-ac8c-62bb1941feed",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_167a075d-9d93-49d0-b5be-446efebec06c",
+ "target": "nwtN_15fb1e74-6b08-4914-95ac-ee4ecb1b7f17",
+ "portsource": "nwtN_167a075d-9d93-49d0-b5be-446efebec06c",
+ "porttarget": "nwtN_15fb1e74-6b08-4914-95ac-ee4ecb1b7f17"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_7611ab43-2d00-4a76-a079-265d6c61f492",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_167a075d-9d93-49d0-b5be-446efebec06c",
+ "target": "nwtN_485d980b-dc42-48ca-9ada-3c1b754cc2ef",
+ "portsource": "nwtN_167a075d-9d93-49d0-b5be-446efebec06c",
+ "porttarget": "nwtN_485d980b-dc42-48ca-9ada-3c1b754cc2ef"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_d2c109ec-1629-4dee-9558-36a6eb048d03",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_167a075d-9d93-49d0-b5be-446efebec06c",
+ "target": "nwtN_be8097dc-4a84-4d3f-ade9-e80221f86dd6",
+ "portsource": "nwtN_167a075d-9d93-49d0-b5be-446efebec06c",
+ "porttarget": "nwtN_be8097dc-4a84-4d3f-ade9-e80221f86dd6"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_79e002ad-b447-47db-b5d4-813b991d5b25",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_167a075d-9d93-49d0-b5be-446efebec06c",
+ "target": "nwtN_bce869d1-7c58-4489-81aa-e87e9418ab70",
+ "portsource": "nwtN_167a075d-9d93-49d0-b5be-446efebec06c",
+ "porttarget": "nwtN_bce869d1-7c58-4489-81aa-e87e9418ab70"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_2c2e8c31-e1de-4d37-bdef-bd87bae7ba3c",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_9dfde51e-a410-4e3b-a472-9061ae4fae7a",
+ "target": "nwtN_db35fc70-2b89-4857-acb2-9dd545e61447",
+ "portsource": "nwtN_9dfde51e-a410-4e3b-a472-9061ae4fae7a",
+ "porttarget": "nwtN_db35fc70-2b89-4857-acb2-9dd545e61447"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_a075ae00-35d6-45a9-a1ea-83155e04cb60",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_a186f2a4-524e-4a84-95c0-66d41dbda586",
+ "target": "nwtN_2cf0c5aa-67eb-4394-85e3-dc84f4b1cd52",
+ "portsource": "nwtN_a186f2a4-524e-4a84-95c0-66d41dbda586",
+ "porttarget": "nwtN_2cf0c5aa-67eb-4394-85e3-dc84f4b1cd52"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_7fa9dabf-6d40-403c-9b90-114047190327",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_26c73172-708d-45cc-8ba5-f29671089767",
+ "target": "nwtN_2b6ef682-26c7-48d7-9fd8-09fa76c7b718",
+ "portsource": "nwtN_26c73172-708d-45cc-8ba5-f29671089767",
+ "porttarget": "nwtN_2b6ef682-26c7-48d7-9fd8-09fa76c7b718"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_e2edca17-82fd-4b4d-84ff-e4207e6c8e3a",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_485d980b-dc42-48ca-9ada-3c1b754cc2ef",
+ "target": "nwtN_d53ea35c-4609-4051-917a-8a183e5976cf",
+ "portsource": "nwtN_485d980b-dc42-48ca-9ada-3c1b754cc2ef",
+ "porttarget": "nwtN_d53ea35c-4609-4051-917a-8a183e5976cf"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_d3627874-c499-40ea-b0e1-27412c1371f7",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_2cf0c5aa-67eb-4394-85e3-dc84f4b1cd52",
+ "target": "nwtN_db35fc70-2b89-4857-acb2-9dd545e61447",
+ "portsource": "nwtN_2cf0c5aa-67eb-4394-85e3-dc84f4b1cd52",
+ "porttarget": "nwtN_db35fc70-2b89-4857-acb2-9dd545e61447"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_4970b017-04ed-46db-9da2-2997f72bc077",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_cc15f875-f4dd-4df8-a09e-a4f2e6c8a3f5",
+ "target": "nwtN_db35fc70-2b89-4857-acb2-9dd545e61447",
+ "portsource": "nwtN_cc15f875-f4dd-4df8-a09e-a4f2e6c8a3f5",
+ "porttarget": "nwtN_db35fc70-2b89-4857-acb2-9dd545e61447"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_83dfef9b-2bb5-4dff-806c-ba14770d18ff",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_2b6ef682-26c7-48d7-9fd8-09fa76c7b718",
+ "target": "nwtN_eed8fc62-a21d-4677-85f2-f1244e3abf00",
+ "portsource": "nwtN_2b6ef682-26c7-48d7-9fd8-09fa76c7b718",
+ "porttarget": "nwtN_eed8fc62-a21d-4677-85f2-f1244e3abf00"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_dccf2dd2-7e3d-4494-a350-44e93d208aca",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_a2bfb9bd-8b13-43a5-87a5-d88b0137bd78",
+ "target": "nwtN_be8097dc-4a84-4d3f-ade9-e80221f86dd6",
+ "portsource": "nwtN_a2bfb9bd-8b13-43a5-87a5-d88b0137bd78",
+ "porttarget": "nwtN_be8097dc-4a84-4d3f-ade9-e80221f86dd6"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_e73c56ef-3c0d-4204-90bd-c655f24611d8",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_d53ea35c-4609-4051-917a-8a183e5976cf",
+ "target": "nwtN_c261ca93-6060-49c1-8286-2a98900c3b9e",
+ "portsource": "nwtN_d53ea35c-4609-4051-917a-8a183e5976cf",
+ "porttarget": "nwtN_c261ca93-6060-49c1-8286-2a98900c3b9e"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_33545b94-a307-4857-b98a-da966e4bafea",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_db35fc70-2b89-4857-acb2-9dd545e61447",
+ "target": "nwtN_a68571c0-2669-4894-aa53-332555f625a2",
+ "portsource": "nwtN_db35fc70-2b89-4857-acb2-9dd545e61447",
+ "porttarget": "nwtN_a68571c0-2669-4894-aa53-332555f625a2"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_5fc7ce04-7148-494b-9149-01369f6a6540",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_eed8fc62-a21d-4677-85f2-f1244e3abf00",
+ "target": "nwtN_a68571c0-2669-4894-aa53-332555f625a2",
+ "portsource": "nwtN_eed8fc62-a21d-4677-85f2-f1244e3abf00",
+ "porttarget": "nwtN_a68571c0-2669-4894-aa53-332555f625a2"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_c4634dd2-0836-4233-aac6-682115595ae0",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_eed8fc62-a21d-4677-85f2-f1244e3abf00",
+ "target": "nwtN_2f175f07-154a-4873-98cc-bc4e4d6d13a1",
+ "portsource": "nwtN_eed8fc62-a21d-4677-85f2-f1244e3abf00",
+ "porttarget": "nwtN_2f175f07-154a-4873-98cc-bc4e4d6d13a1"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_68a9509d-915d-4383-9130-7bc54ba793e1",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_eed8fc62-a21d-4677-85f2-f1244e3abf00",
+ "target": "nwtN_e55d29c7-89bc-4aa0-b599-3637e141f17f",
+ "portsource": "nwtN_eed8fc62-a21d-4677-85f2-f1244e3abf00",
+ "porttarget": "nwtN_e55d29c7-89bc-4aa0-b599-3637e141f17f"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_92776f19-3134-4507-9e3e-25ee1f13ed31",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_2f175f07-154a-4873-98cc-bc4e4d6d13a1",
+ "target": "nwtN_a68571c0-2669-4894-aa53-332555f625a2",
+ "portsource": "nwtN_2f175f07-154a-4873-98cc-bc4e4d6d13a1",
+ "porttarget": "nwtN_a68571c0-2669-4894-aa53-332555f625a2"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_ad40e7b6-663f-47fd-bd71-9f62a69e150f",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_c261ca93-6060-49c1-8286-2a98900c3b9e",
+ "target": "nwtN_02a50d8b-3939-492a-ac5b-1f356cd514f6",
+ "portsource": "nwtN_c261ca93-6060-49c1-8286-2a98900c3b9e",
+ "porttarget": "nwtN_02a50d8b-3939-492a-ac5b-1f356cd514f6"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_53912bce-3324-4ebc-b546-811274f6241b",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_166d8364-fd55-499e-9098-0a48db6615c1",
+ "target": "nwtN_205680d2-dc98-4faf-baf4-21e27e8585e4",
+ "portsource": "nwtN_166d8364-fd55-499e-9098-0a48db6615c1",
+ "porttarget": "nwtN_205680d2-dc98-4faf-baf4-21e27e8585e4"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_6f66b3a9-e004-44c0-a4c7-181bf848f589",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_02a50d8b-3939-492a-ac5b-1f356cd514f6",
+ "target": "nwtN_205680d2-dc98-4faf-baf4-21e27e8585e4",
+ "portsource": "nwtN_02a50d8b-3939-492a-ac5b-1f356cd514f6",
+ "porttarget": "nwtN_205680d2-dc98-4faf-baf4-21e27e8585e4"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_34095a70-144b-4a4f-a4e2-af92648e3232",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_02a50d8b-3939-492a-ac5b-1f356cd514f6",
+ "target": "nwtN_75318a95-e179-40fc-b6e1-e01fcd66cd8c",
+ "portsource": "nwtN_02a50d8b-3939-492a-ac5b-1f356cd514f6",
+ "porttarget": "nwtN_75318a95-e179-40fc-b6e1-e01fcd66cd8c"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_f3b6782d-688f-4109-b46f-02a81c999820",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_02a50d8b-3939-492a-ac5b-1f356cd514f6",
+ "target": "nwtN_bce869d1-7c58-4489-81aa-e87e9418ab70",
+ "portsource": "nwtN_02a50d8b-3939-492a-ac5b-1f356cd514f6",
+ "porttarget": "nwtN_bce869d1-7c58-4489-81aa-e87e9418ab70"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_b0eb5b9b-e0be-46a1-a449-42fb67bfb0bd",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_a68571c0-2669-4894-aa53-332555f625a2",
+ "target": "nwtN_8ed84db0-02da-43c6-847c-6b33f657f52c",
+ "portsource": "nwtN_a68571c0-2669-4894-aa53-332555f625a2",
+ "porttarget": "nwtN_8ed84db0-02da-43c6-847c-6b33f657f52c"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_94d8d0fa-0a5e-4c77-95f1-fb220cc0a2c0",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_205680d2-dc98-4faf-baf4-21e27e8585e4",
+ "target": "nwtN_be8097dc-4a84-4d3f-ade9-e80221f86dd6",
+ "portsource": "nwtN_205680d2-dc98-4faf-baf4-21e27e8585e4",
+ "porttarget": "nwtN_be8097dc-4a84-4d3f-ade9-e80221f86dd6"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_220574ce-1557-4fd7-991b-7fb957d4dc23",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_205680d2-dc98-4faf-baf4-21e27e8585e4",
+ "target": "nwtN_8489a816-b7af-452f-a722-04d06226341c",
+ "portsource": "nwtN_205680d2-dc98-4faf-baf4-21e27e8585e4",
+ "porttarget": "nwtN_8489a816-b7af-452f-a722-04d06226341c"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_ea01de09-12e1-4d7f-9199-c5d500e03156",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_75318a95-e179-40fc-b6e1-e01fcd66cd8c",
+ "target": "nwtN_d4bf8470-416d-4387-a563-3c9cccf55079",
+ "portsource": "nwtN_75318a95-e179-40fc-b6e1-e01fcd66cd8c",
+ "porttarget": "nwtN_d4bf8470-416d-4387-a563-3c9cccf55079"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_ae8ff556-7256-4524-aaa7-544077572cd4",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_75318a95-e179-40fc-b6e1-e01fcd66cd8c",
+ "target": "nwtN_e48d9732-8ee0-4714-8b62-8de8238ec9c2",
+ "portsource": "nwtN_75318a95-e179-40fc-b6e1-e01fcd66cd8c",
+ "porttarget": "nwtN_e48d9732-8ee0-4714-8b62-8de8238ec9c2"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_94b09aad-22ef-42a3-ae0e-58dde4cae4ee",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_bce869d1-7c58-4489-81aa-e87e9418ab70",
+ "target": "nwtN_103a9105-ef50-47a4-b501-840a431fcbdd",
+ "portsource": "nwtN_bce869d1-7c58-4489-81aa-e87e9418ab70",
+ "porttarget": "nwtN_103a9105-ef50-47a4-b501-840a431fcbdd"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_80ab6732-05f6-498b-8ce0-6502661e49b0",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_8ed84db0-02da-43c6-847c-6b33f657f52c",
+ "target": "nwtN_6385f491-0d09-4d53-a34c-781a861e8b42",
+ "portsource": "nwtN_8ed84db0-02da-43c6-847c-6b33f657f52c",
+ "porttarget": "nwtN_6385f491-0d09-4d53-a34c-781a861e8b42"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_1b3ef389-19ea-4bf6-b664-ec393b397649",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "cardinality": 0,
+ "source": "nwtN_6385f491-0d09-4d53-a34c-781a861e8b42",
+ "target": "nwtN_88e20782-9221-4b12-9b62-6a6c7116a70f",
+ "portsource": "nwtN_6385f491-0d09-4d53-a34c-781a861e8b42",
+ "porttarget": "nwtN_88e20782-9221-4b12-9b62-6a6c7116a70f"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ }
+ ]
+ },
+ "style": [
+ {
+ "selector": "node",
+ "style": {
+ "shape": "rectangle",
+ "text-halign": "center",
+ "text-valign": "center",
+ "background-color": "#b2dfee",
+ "opacity": "1",
+ "border-color": "#555555"
+ }
+ },
+ {
+ "selector": "node[class = 'simple chemical']",
+ "style": {
+ "shape": "ellipse"
+ }
+ },
+ {
+ "selector": "node[class = 'macromolecule']",
+ "style": {
+ "shape": "roundrectangle"
+ }
+ },
+ {
+ "selector": "node[class = 'unspecified entity']",
+ "style": {
+ "shape": "ellipse"
+ }
+ },
+ {
+ "selector": ":parent",
+ "style": {
+ "background-opacity": "0.333",
+ "text-valign": "bottom",
+ "shape": "barrel",
+ "text-margin-y": "2px",
+ "font-weight" : "bold",
+ "border-color": "#555555"
+ }
+ },
+ {
+ "selector": "node:selected",
+ "style": {
+ "background-color": "#33ff00",
+ "border-color": "#22ee00"
+ }
+ },
+ {
+ "selector": "edge",
+ "style": {
+ "curve-style": "bezier",
+ "width": "2px",
+ "line-color": "rgb(58,126,207)",
+ "opacity": "1",
+ "target-arrow-shape": "triangle",
+ "target-arrow-color": "rgb(58,126,207)"
+ }
+ },
+ {
+ "selector": "edge:selected",
+ "style": {
+ "line-color": "#33ff00",
+ "font-size": "13px",
+ "text-opacity": "1",
+ "text-rotation": "autorotate",
+ "color": "#33ff00",
+ "font-weight": "bold",
+ "text-background-shape": "roundrectangle",
+ "text-background-opacity": "1",
+ "text-background-padding": "2px",
+ "target-arrow-shape": "triangle",
+ "target-arrow-color": "#33ff00"
+ }
+ }
+ ],
+ "zoomingEnabled": true,
+ "userZoomingEnabled": true,
+ "zoom": 0.8336504719979256,
+ "minZoom": 0.125,
+ "maxZoom": 16,
+ "panningEnabled": true,
+ "userPanningEnabled": true,
+ "pan": {
+ "x": -17.245693955834554,
+ "y": -155.00970669805537
+ },
+ "boxSelectionEnabled": true,
+ "renderer": {
+ "name": "canvas"
+ },
+ "wheelSensitivity": 0.1,
+ "motionBlur": true
+}
\ No newline at end of file
diff --git a/node_modules/cytoscape-fcose/demo/samples/unix_constraints.js b/node_modules/cytoscape-fcose/demo/samples/unix_constraints.js
new file mode 100644
index 00000000..286d2da8
--- /dev/null
+++ b/node_modules/cytoscape-fcose/demo/samples/unix_constraints.js
@@ -0,0 +1,249 @@
+unix_constraints = {
+ "relativePlacementConstraint": [
+ {
+ "top": "nwtN_4451c335-4668-4f8d-9f71-274aa2e6ab06",
+ "bottom": "nwtN_8d99e7af-1b2f-4605-a381-ce3127b6199a",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_4451c335-4668-4f8d-9f71-274aa2e6ab06",
+ "bottom": "nwtN_37220ed2-0cbe-4d1f-9cac-07dfb11d6eda",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_8d99e7af-1b2f-4605-a381-ce3127b6199a",
+ "bottom": "nwtN_020b84b2-717f-4465-b716-7520e5c9c470",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_8d99e7af-1b2f-4605-a381-ce3127b6199a",
+ "bottom": "nwtN_c1880331-8411-443e-9218-87e78c057b22",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_8d99e7af-1b2f-4605-a381-ce3127b6199a",
+ "bottom": "nwtN_3f3b6234-e449-44bb-9ba8-059d1f843c98",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_8d99e7af-1b2f-4605-a381-ce3127b6199a",
+ "bottom": "nwtN_d7bbe746-9028-4268-a642-70544788d687",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_8d99e7af-1b2f-4605-a381-ce3127b6199a",
+ "bottom": "nwtN_5bb0a938-c7ee-42d8-85c8-17bdc1ff0ade",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_37220ed2-0cbe-4d1f-9cac-07dfb11d6eda",
+ "bottom": "nwtN_8227939a-5dc0-433e-8c4d-987ec44a1f8f",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_37220ed2-0cbe-4d1f-9cac-07dfb11d6eda",
+ "bottom": "nwtN_3f7d61be-a016-4383-9b8d-8c1db26192f2",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_020b84b2-717f-4465-b716-7520e5c9c470",
+ "bottom": "nwtN_166d8364-fd55-499e-9098-0a48db6615c1",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_c1880331-8411-443e-9218-87e78c057b22",
+ "bottom": "nwtN_167a075d-9d93-49d0-b5be-446efebec06c",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_c1880331-8411-443e-9218-87e78c057b22",
+ "bottom": "nwtN_db35fc70-2b89-4857-acb2-9dd545e61447",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_c1880331-8411-443e-9218-87e78c057b22",
+ "bottom": "nwtN_9dfde51e-a410-4e3b-a472-9061ae4fae7a",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_8227939a-5dc0-433e-8c4d-987ec44a1f8f",
+ "bottom": "nwtN_9dfde51e-a410-4e3b-a472-9061ae4fae7a",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_3f7d61be-a016-4383-9b8d-8c1db26192f2",
+ "bottom": "nwtN_a186f2a4-524e-4a84-95c0-66d41dbda586",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_3f7d61be-a016-4383-9b8d-8c1db26192f2",
+ "bottom": "nwtN_26c73172-708d-45cc-8ba5-f29671089767",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_167a075d-9d93-49d0-b5be-446efebec06c",
+ "bottom": "nwtN_a2bfb9bd-8b13-43a5-87a5-d88b0137bd78",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_167a075d-9d93-49d0-b5be-446efebec06c",
+ "bottom": "nwtN_2d9c1f24-1482-46fb-a0f4-f963ba454710",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_167a075d-9d93-49d0-b5be-446efebec06c",
+ "bottom": "nwtN_15fb1e74-6b08-4914-95ac-ee4ecb1b7f17",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_167a075d-9d93-49d0-b5be-446efebec06c",
+ "bottom": "nwtN_485d980b-dc42-48ca-9ada-3c1b754cc2ef",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_167a075d-9d93-49d0-b5be-446efebec06c",
+ "bottom": "nwtN_bce869d1-7c58-4489-81aa-e87e9418ab70",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_9dfde51e-a410-4e3b-a472-9061ae4fae7a",
+ "bottom": "nwtN_db35fc70-2b89-4857-acb2-9dd545e61447",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_a186f2a4-524e-4a84-95c0-66d41dbda586",
+ "bottom": "nwtN_2cf0c5aa-67eb-4394-85e3-dc84f4b1cd52",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_26c73172-708d-45cc-8ba5-f29671089767",
+ "bottom": "nwtN_2b6ef682-26c7-48d7-9fd8-09fa76c7b718",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_a2bfb9bd-8b13-43a5-87a5-d88b0137bd78",
+ "bottom": "nwtN_be8097dc-4a84-4d3f-ade9-e80221f86dd6",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_d53ea35c-4609-4051-917a-8a183e5976cf",
+ "bottom": "nwtN_c261ca93-6060-49c1-8286-2a98900c3b9e",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_db35fc70-2b89-4857-acb2-9dd545e61447",
+ "bottom": "nwtN_a68571c0-2669-4894-aa53-332555f625a2",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_eed8fc62-a21d-4677-85f2-f1244e3abf00",
+ "bottom": "nwtN_2f175f07-154a-4873-98cc-bc4e4d6d13a1",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_eed8fc62-a21d-4677-85f2-f1244e3abf00",
+ "bottom": "nwtN_a68571c0-2669-4894-aa53-332555f625a2",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_eed8fc62-a21d-4677-85f2-f1244e3abf00",
+ "bottom": "nwtN_e55d29c7-89bc-4aa0-b599-3637e141f17f",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_c261ca93-6060-49c1-8286-2a98900c3b9e",
+ "bottom": "nwtN_02a50d8b-3939-492a-ac5b-1f356cd514f6",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_2f175f07-154a-4873-98cc-bc4e4d6d13a1",
+ "bottom": "nwtN_a68571c0-2669-4894-aa53-332555f625a2",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_166d8364-fd55-499e-9098-0a48db6615c1",
+ "bottom": "nwtN_205680d2-dc98-4faf-baf4-21e27e8585e4",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_02a50d8b-3939-492a-ac5b-1f356cd514f6",
+ "bottom": "nwtN_205680d2-dc98-4faf-baf4-21e27e8585e4",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_02a50d8b-3939-492a-ac5b-1f356cd514f6",
+ "bottom": "nwtN_75318a95-e179-40fc-b6e1-e01fcd66cd8c",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_02a50d8b-3939-492a-ac5b-1f356cd514f6",
+ "bottom": "nwtN_bce869d1-7c58-4489-81aa-e87e9418ab70",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_a68571c0-2669-4894-aa53-332555f625a2",
+ "bottom": "nwtN_8ed84db0-02da-43c6-847c-6b33f657f52c",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_205680d2-dc98-4faf-baf4-21e27e8585e4",
+ "bottom": "nwtN_be8097dc-4a84-4d3f-ade9-e80221f86dd6",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_205680d2-dc98-4faf-baf4-21e27e8585e4",
+ "bottom": "nwtN_8489a816-b7af-452f-a722-04d06226341c",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_75318a95-e179-40fc-b6e1-e01fcd66cd8c",
+ "bottom": "nwtN_d4bf8470-416d-4387-a563-3c9cccf55079",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_75318a95-e179-40fc-b6e1-e01fcd66cd8c",
+ "bottom": "nwtN_e48d9732-8ee0-4714-8b62-8de8238ec9c2",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_bce869d1-7c58-4489-81aa-e87e9418ab70",
+ "bottom": "nwtN_103a9105-ef50-47a4-b501-840a431fcbdd",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_8ed84db0-02da-43c6-847c-6b33f657f52c",
+ "bottom": "nwtN_6385f491-0d09-4d53-a34c-781a861e8b42",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_6385f491-0d09-4d53-a34c-781a861e8b42",
+ "bottom": "nwtN_88e20782-9221-4b12-9b62-6a6c7116a70f",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_167a075d-9d93-49d0-b5be-446efebec06c",
+ "bottom": "nwtN_be8097dc-4a84-4d3f-ade9-e80221f86dd6",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_485d980b-dc42-48ca-9ada-3c1b754cc2ef",
+ "bottom": "nwtN_d53ea35c-4609-4051-917a-8a183e5976cf",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_2cf0c5aa-67eb-4394-85e3-dc84f4b1cd52",
+ "bottom": "nwtN_db35fc70-2b89-4857-acb2-9dd545e61447",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_cc15f875-f4dd-4df8-a09e-a4f2e6c8a3f5",
+ "bottom": "nwtN_db35fc70-2b89-4857-acb2-9dd545e61447",
+ "gap": 76.25
+ },
+ {
+ "top": "nwtN_2b6ef682-26c7-48d7-9fd8-09fa76c7b718",
+ "bottom": "nwtN_eed8fc62-a21d-4677-85f2-f1244e3abf00",
+ "gap": 76.25
+ }
+ ]
+}
diff --git a/node_modules/cytoscape-fcose/demo/samples/uwsn.js b/node_modules/cytoscape-fcose/demo/samples/uwsn.js
new file mode 100644
index 00000000..11a0f5e6
--- /dev/null
+++ b/node_modules/cytoscape-fcose/demo/samples/uwsn.js
@@ -0,0 +1,2303 @@
+uwsn = {
+ "elements": {
+ "nodes": [
+ {
+ "data": {
+ "id": "nwtN_91cff953-5f55-4626-96fa-e2f675e13e54",
+ "bbox": {
+ "x": 155.38677910343796,
+ "y": 230.06625595029607,
+ "w": 140,
+ "h": 75
+ },
+ "class": "nucleic acid feature",
+ "label": "Surface\nBuoy 1",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#f4a582",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 26,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 155.38677910343796,
+ "y": 230.06625595029607
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_b20cc3f4-dc9c-4031-ac79-df665d4c53cd",
+ "bbox": {
+ "x": 584.0229153054016,
+ "y": 223.74407633970037,
+ "w": 140,
+ "h": 75
+ },
+ "class": "nucleic acid feature",
+ "label": "Surface\nBuoy 2",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#f4a582",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 26,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 584.0229153054016,
+ "y": 223.74407633970037
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_5d6f7198-03e4-48e5-9004-919221f87e66",
+ "bbox": {
+ "x": 964.8261492755391,
+ "y": 225.00851226181948,
+ "w": 140,
+ "h": 75
+ },
+ "class": "nucleic acid feature",
+ "label": "Surface\nBuoy 3",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#f4a582",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 26,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 964.8261492755391,
+ "y": 225.00851226181948
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_7e09bf9e-a4da-4618-baba-60a2b3a0b134",
+ "bbox": {
+ "x": 149.1895292305374,
+ "y": 445.5622580973788,
+ "w": 140,
+ "h": 75
+ },
+ "class": "unspecified entity",
+ "label": "UW Sink 1",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#f7f7f7",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 26,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 149.1895292305374,
+ "y": 445.5622580973788
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "661498c7-ace9-bd34-0289-7c9931d3e1ba",
+ "bbox": {
+ "x": 586.7621909195482,
+ "y": 383.25228042246914,
+ "w": 140,
+ "h": 75
+ },
+ "class": "unspecified entity",
+ "label": "UW Sink 2",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#f7f7f7",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 26,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 586.7621909195482,
+ "y": 383.25228042246914
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "aeee80bf-8280-f4ec-c1f3-26f3a7a0651c",
+ "bbox": {
+ "x": 966.963391645274,
+ "y": 484.473671607378,
+ "w": 140,
+ "h": 75
+ },
+ "class": "unspecified entity",
+ "label": "UW Sink 3",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#f7f7f7",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 26,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 966.963391645274,
+ "y": 484.473671607378
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_9ad406e1-da86-489d-84aa-627c8f5898e6",
+ "bbox": {
+ "x": -18.820589676794867,
+ "y": 580.4283573759083,
+ "w": 172.45719865368562,
+ "h": 192.7296338070105
+ },
+ "originalW": 200.45719865368562,
+ "originalH": 220.7296338070105,
+ "class": "submap",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 2.25,
+ "border-color": "#555555",
+ "background-color": "#f7f7f7",
+ "background-opacity": 0.5,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 14,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": -18.82058967679486,
+ "y": 580.4283573759083
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_cbc5909d-c0a3-4be5-9c36-988ca48a9d30",
+ "bbox": {
+ "x": -65.92418900363768,
+ "y": 613.8182505696195,
+ "w": 75,
+ "h": 75
+ },
+ "class": "simple chemical",
+ "label": "s3",
+ "statesandinfos": [],
+ "parent": "nwtN_9ad406e1-da86-489d-84aa-627c8f5898e6",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#fddbc7",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 26,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "bold",
+ "color": "#000000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": -65.92418900363768,
+ "y": 613.8182505696195
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_4a12169f-f588-4c76-bc39-2ae07f77d7c4",
+ "bbox": {
+ "x": -30.1493034389469,
+ "y": 523.188540472403,
+ "w": 75,
+ "h": 75
+ },
+ "class": "simple chemical",
+ "label": "s2",
+ "statesandinfos": [],
+ "parent": "nwtN_9ad406e1-da86-489d-84aa-627c8f5898e6",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#fddbc7",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 26,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "bold",
+ "color": "#000000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": -30.1493034389469,
+ "y": 523.188540472403
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_be627c29-b885-460c-bf92-8f9bb7b8c8c5",
+ "bbox": {
+ "x": -8.684372100132464,
+ "y": 578.043365004929,
+ "w": 75,
+ "h": 75
+ },
+ "class": "simple chemical",
+ "label": "s1",
+ "statesandinfos": [],
+ "parent": "nwtN_9ad406e1-da86-489d-84aa-627c8f5898e6",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#fddbc7",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 26,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "bold",
+ "color": "#000000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": -8.684372100132464,
+ "y": 578.043365004929
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_48d663f4-edd0-4706-a5ca-5a87f77edf8e",
+ "bbox": {
+ "x": 28.28300965004796,
+ "y": 637.6681742794135,
+ "w": 75,
+ "h": 75
+ },
+ "class": "simple chemical",
+ "label": "s4",
+ "statesandinfos": [],
+ "parent": "nwtN_9ad406e1-da86-489d-84aa-627c8f5898e6",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#fddbc7",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 26,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "bold",
+ "color": "#000000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 28.28300965004796,
+ "y": 637.6681742794135
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_a892743e-a23c-48b7-8d64-c6e77ca26bbe",
+ "bbox": {
+ "x": 211.78152237753034,
+ "y": 586.7225735218967,
+ "w": 186.76715287956208,
+ "h": 162.91722916976835
+ },
+ "originalW": 214.76715287956208,
+ "originalH": 190.91722916976835,
+ "class": "submap",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 2.25,
+ "border-color": "#555555",
+ "background-color": "#f7f7f7",
+ "background-opacity": 0.5,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 14,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 211.78152237753034,
+ "y": 586.7225735218967
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_2ecfaa1e-8dd3-4008-ac3d-6d4207f518b4",
+ "bbox": {
+ "x": 157.5229459377493,
+ "y": 544.3889589370125,
+ "w": 75,
+ "h": 75
+ },
+ "class": "simple chemical",
+ "label": "s7",
+ "statesandinfos": [],
+ "parent": "nwtN_a892743e-a23c-48b7-8d64-c6e77ca26bbe",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#fddbc7",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 26,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "bold",
+ "color": "#000000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 157.5229459377493,
+ "y": 544.3889589370125
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_64abed47-d1b1-474c-b944-b9ad6354c086",
+ "bbox": {
+ "x": 209.99277809929575,
+ "y": 568.2388826468066,
+ "w": 75,
+ "h": 75
+ },
+ "class": "simple chemical",
+ "label": "s5",
+ "statesandinfos": [],
+ "parent": "nwtN_a892743e-a23c-48b7-8d64-c6e77ca26bbe",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#fddbc7",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 26,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "bold",
+ "color": "#000000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 209.99277809929575,
+ "y": 568.2388826468066
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_1c41d32b-42f9-4e9f-a609-91c2eebbf28a",
+ "bbox": {
+ "x": 266.0400988173114,
+ "y": 550.3514398644611,
+ "w": 75,
+ "h": 75
+ },
+ "class": "simple chemical",
+ "label": "s6",
+ "statesandinfos": [],
+ "parent": "nwtN_a892743e-a23c-48b7-8d64-c6e77ca26bbe",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#fddbc7",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 26,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "bold",
+ "color": "#000000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 266.0400988173114,
+ "y": 550.3514398644611
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_8af34100-fdea-4636-a978-fe75c7a38fb1",
+ "bbox": {
+ "x": 198.0678162443988,
+ "y": 629.0561881067808,
+ "w": 75,
+ "h": 75
+ },
+ "class": "simple chemical",
+ "label": "s8",
+ "statesandinfos": [],
+ "parent": "nwtN_a892743e-a23c-48b7-8d64-c6e77ca26bbe",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#fddbc7",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 26,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "bold",
+ "color": "#000000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 198.0678162443988,
+ "y": 629.0561881067808
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_7a108aac-2ff5-4012-abc4-1f8418ef91ae",
+ "bbox": {
+ "x": 463.24537734506043,
+ "y": 632.6006814534348,
+ "w": 178.41967958113423,
+ "h": 165.30222154074738
+ },
+ "originalW": 206.41967958113423,
+ "originalH": 193.30222154074738,
+ "class": "submap",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 2.25,
+ "border-color": "#555555",
+ "background-color": "#f7f7f7",
+ "background-opacity": 0.5,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 14,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 463.24537734506043,
+ "y": 632.6006814534348
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_0185dada-235a-4b51-bce7-e8bd3b8ee661",
+ "bbox": {
+ "x": 458.47539260310174,
+ "y": 632.00443336069,
+ "w": 75,
+ "h": 75
+ },
+ "class": "simple chemical",
+ "label": "s9",
+ "statesandinfos": [],
+ "parent": "nwtN_7a108aac-2ff5-4012-abc4-1f8418ef91ae",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#fddbc7",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 26,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "bold",
+ "color": "#000000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 458.47539260310174,
+ "y": 632.00443336069
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_78116f70-d871-4b8e-83cf-7b3a684067a7",
+ "bbox": {
+ "x": 413.1605375544933,
+ "y": 589.0745706830611,
+ "w": 75,
+ "h": 75
+ },
+ "class": "simple chemical",
+ "label": "s11",
+ "statesandinfos": [],
+ "parent": "nwtN_7a108aac-2ff5-4012-abc4-1f8418ef91ae",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#fddbc7",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 26,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "bold",
+ "color": "#000000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 413.1605375544933,
+ "y": 589.0745706830611
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_348778d0-85d5-442f-b73a-9dd9f5d9f2b3",
+ "bbox": {
+ "x": 415.5455299254728,
+ "y": 676.1267922238085,
+ "w": 75,
+ "h": 75
+ },
+ "class": "simple chemical",
+ "label": "s12",
+ "statesandinfos": [],
+ "parent": "nwtN_7a108aac-2ff5-4012-abc4-1f8418ef91ae",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#fddbc7",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 26,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "bold",
+ "color": "#000000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 415.5455299254728,
+ "y": 676.1267922238085
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_5c29f820-d40e-4c85-b7b6-c7b8a378b49d",
+ "bbox": {
+ "x": 513.3302171356275,
+ "y": 641.5444028446076,
+ "w": 75,
+ "h": 75
+ },
+ "class": "simple chemical",
+ "label": "s10",
+ "statesandinfos": [],
+ "parent": "nwtN_7a108aac-2ff5-4012-abc4-1f8418ef91ae",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#fddbc7",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 26,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "bold",
+ "color": "#000000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 513.3302171356275,
+ "y": 641.5444028446076
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_13b19118-54eb-4400-a949-ca664386ec06",
+ "bbox": {
+ "x": 680.3516228408145,
+ "y": 630.668057701942,
+ "w": 185.57465669407202,
+ "h": 140.25980164546388
+ },
+ "originalW": 213.57465669407202,
+ "originalH": 168.25980164546388,
+ "class": "submap",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 2.25,
+ "border-color": "#555555",
+ "background-color": "#f7f7f7",
+ "background-opacity": 0.5,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 14,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 680.3516228408145,
+ "y": 630.668057701942
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_c5547527-64c5-4e4d-acb8-e3f7e6b0a9a5",
+ "bbox": {
+ "x": 734.0139511878505,
+ "y": 661.6729585246738,
+ "w": 75,
+ "h": 75
+ },
+ "class": "simple chemical",
+ "label": "s15",
+ "statesandinfos": [],
+ "parent": "nwtN_13b19118-54eb-4400-a949-ca664386ec06",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#fddbc7",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 26,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "bold",
+ "color": "#000000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 734.0139511878505,
+ "y": 661.6729585246738
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_6bf42b3c-579e-4187-8299-cb314373c278",
+ "bbox": {
+ "x": 626.6892944937784,
+ "y": 627.0905691454727,
+ "w": 75,
+ "h": 75
+ },
+ "class": "simple chemical",
+ "label": "s16",
+ "statesandinfos": [],
+ "parent": "nwtN_13b19118-54eb-4400-a949-ca664386ec06",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#fddbc7",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 26,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "bold",
+ "color": "#000000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 626.6892944937784,
+ "y": 627.0905691454727
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_4d424656-f0bb-4154-9a51-1d15429c8f71",
+ "bbox": {
+ "x": 726.8589740749126,
+ "y": 599.66315687921,
+ "w": 75,
+ "h": 75
+ },
+ "class": "simple chemical",
+ "label": "s14",
+ "statesandinfos": [],
+ "parent": "nwtN_13b19118-54eb-4400-a949-ca664386ec06",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#fddbc7",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 26,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "bold",
+ "color": "#000000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 726.8589740749126,
+ "y": 599.66315687921
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtN_273f6927-f05a-425b-aa2b-92de2be06bd9",
+ "bbox": {
+ "x": 681.5441190263043,
+ "y": 631.8605538874315,
+ "w": 75,
+ "h": 75
+ },
+ "class": "simple chemical",
+ "label": "s13",
+ "statesandinfos": [],
+ "parent": "nwtN_13b19118-54eb-4400-a949-ca664386ec06",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#fddbc7",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 26,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "bold",
+ "color": "#000000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 681.5441190263043,
+ "y": 631.8605538874315
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "0fcd19b1-d058-1326-c349-64cc1fce6569",
+ "bbox": {
+ "x": 880.0889730362344,
+ "y": 655.0860634639737,
+ "w": 178.41967958113423,
+ "h": 165.30222154074738
+ },
+ "originalW": 206.41967958113423,
+ "originalH": 193.30222154074738,
+ "class": "submap",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 2.25,
+ "border-color": "#555555",
+ "background-color": "#f7f7f7",
+ "background-opacity": 0.5,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 14,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 880.0889730362344,
+ "y": 655.0860634639737
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "3aa07735-3104-5ae3-5b94-16be7319a912",
+ "bbox": {
+ "x": 930.1738128268015,
+ "y": 664.0297848551465,
+ "w": 75,
+ "h": 75
+ },
+ "class": "simple chemical",
+ "label": "s18",
+ "statesandinfos": [],
+ "parent": "0fcd19b1-d058-1326-c349-64cc1fce6569",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#fddbc7",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 26,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "bold",
+ "color": "#000000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 930.1738128268015,
+ "y": 664.0297848551465
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "212adf44-8401-5b11-c49a-b43b67369698",
+ "bbox": {
+ "x": 832.3891256166468,
+ "y": 698.6121742343474,
+ "w": 75,
+ "h": 75
+ },
+ "class": "simple chemical",
+ "label": "s20",
+ "statesandinfos": [],
+ "parent": "0fcd19b1-d058-1326-c349-64cc1fce6569",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#fddbc7",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 26,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "bold",
+ "color": "#000000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 832.3891256166468,
+ "y": 698.6121742343474
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "4f9485a2-a66f-2cf1-cc4e-126f7889fcd0",
+ "bbox": {
+ "x": 830.0041332456673,
+ "y": 611.5599526936,
+ "w": 75,
+ "h": 75
+ },
+ "class": "simple chemical",
+ "label": "s19",
+ "statesandinfos": [],
+ "parent": "0fcd19b1-d058-1326-c349-64cc1fce6569",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#fddbc7",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 26,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "bold",
+ "color": "#000000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 830.0041332456673,
+ "y": 611.5599526936
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "5c108d5c-88e4-7b97-95a8-67238c33d283",
+ "bbox": {
+ "x": 875.3189882942758,
+ "y": 654.4898153712289,
+ "w": 75,
+ "h": 75
+ },
+ "class": "simple chemical",
+ "label": "s17",
+ "statesandinfos": [],
+ "parent": "0fcd19b1-d058-1326-c349-64cc1fce6569",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#fddbc7",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 26,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "bold",
+ "color": "#000000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 875.3189882942758,
+ "y": 654.4898153712289
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "b4dac823-ff22-5ee3-02f8-825fcda40038",
+ "bbox": {
+ "x": 1150.256078598176,
+ "y": 628.0465159213652,
+ "w": 185.57465669407156,
+ "h": 140.25980164546388
+ },
+ "originalW": 213.57465669407156,
+ "originalH": 168.25980164546388,
+ "class": "submap",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 2.25,
+ "border-color": "#555555",
+ "background-color": "#f7f7f7",
+ "background-opacity": 0.5,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 14,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 1150.256078598176,
+ "y": 628.0465159213652
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "f1bf3c87-1357-3ce2-4645-8cb4ed59ac9b",
+ "bbox": {
+ "x": 1203.9184069452117,
+ "y": 659.0514167440972,
+ "w": 75,
+ "h": 75
+ },
+ "class": "simple chemical",
+ "label": "s23",
+ "statesandinfos": [],
+ "parent": "b4dac823-ff22-5ee3-02f8-825fcda40038",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#fddbc7",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 26,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "bold",
+ "color": "#000000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 1203.9184069452117,
+ "y": 659.0514167440972
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "2f96a4e1-9767-4df9-6ad7-a4010baa376b",
+ "bbox": {
+ "x": 1096.5937502511401,
+ "y": 624.4690273648961,
+ "w": 75,
+ "h": 75
+ },
+ "class": "simple chemical",
+ "label": "s24",
+ "statesandinfos": [],
+ "parent": "b4dac823-ff22-5ee3-02f8-825fcda40038",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#fddbc7",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 26,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "bold",
+ "color": "#000000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 1096.5937502511401,
+ "y": 624.4690273648961
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "cae247cf-9ad9-695c-4042-09cfd4f23475",
+ "bbox": {
+ "x": 1196.7634298322737,
+ "y": 597.0416150986333,
+ "w": 75,
+ "h": 75
+ },
+ "class": "simple chemical",
+ "label": "s22",
+ "statesandinfos": [],
+ "parent": "b4dac823-ff22-5ee3-02f8-825fcda40038",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#fddbc7",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 26,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "bold",
+ "color": "#000000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 1196.7634298322737,
+ "y": 597.0416150986333
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "3ea6020e-8918-8abf-a8e5-62427070f84f",
+ "bbox": {
+ "x": 1151.4485747836657,
+ "y": 629.2390121068548,
+ "w": 75,
+ "h": 75
+ },
+ "class": "simple chemical",
+ "label": "s21",
+ "statesandinfos": [],
+ "parent": "b4dac823-ff22-5ee3-02f8-825fcda40038",
+ "language": "PD",
+ "border-width": 1.25,
+ "border-color": "#555555",
+ "background-color": "#fddbc7",
+ "background-opacity": 1,
+ "background-image-opacity": 1,
+ "text-wrap": "wrap",
+ "font-size": 26,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "bold",
+ "color": "#000000",
+ "background-image": "",
+ "ports": [],
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 1151.4485747836657,
+ "y": 629.2390121068548
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ }
+ ],
+ "edges": [
+ {
+ "data": {
+ "id": "nwtE_506a6914-916d-4822-ad99-2417ef62f8cd",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "5c108d5c-88e4-7b97-95a8-67238c33d283",
+ "target": "aeee80bf-8280-f4ec-c1f3-26f3a7a0651c",
+ "portsource": "5c108d5c-88e4-7b97-95a8-67238c33d283",
+ "porttarget": "aeee80bf-8280-f4ec-c1f3-26f3a7a0651c"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "dc17f173-0623-8bac-2b1f-edac5f91ccef",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "cae247cf-9ad9-695c-4042-09cfd4f23475",
+ "target": "3ea6020e-8918-8abf-a8e5-62427070f84f",
+ "portsource": "cae247cf-9ad9-695c-4042-09cfd4f23475",
+ "porttarget": "3ea6020e-8918-8abf-a8e5-62427070f84f"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_fb874a56-2ff6-4ad3-862f-0cabfda9fbbe",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "nwtN_91cff953-5f55-4626-96fa-e2f675e13e54",
+ "target": "nwtN_7e09bf9e-a4da-4618-baba-60a2b3a0b134",
+ "portsource": "nwtN_91cff953-5f55-4626-96fa-e2f675e13e54",
+ "porttarget": "nwtN_7e09bf9e-a4da-4618-baba-60a2b3a0b134"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_c9636997-63c2-4bee-ae9f-d07ea6e2cb43",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "nwtN_b20cc3f4-dc9c-4031-ac79-df665d4c53cd",
+ "target": "661498c7-ace9-bd34-0289-7c9931d3e1ba",
+ "portsource": "nwtN_b20cc3f4-dc9c-4031-ac79-df665d4c53cd",
+ "porttarget": "661498c7-ace9-bd34-0289-7c9931d3e1ba"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_9d07cf77-da86-48b4-9626-9bc6f90143b5",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "nwtN_5d6f7198-03e4-48e5-9004-919221f87e66",
+ "target": "aeee80bf-8280-f4ec-c1f3-26f3a7a0651c",
+ "portsource": "nwtN_5d6f7198-03e4-48e5-9004-919221f87e66",
+ "porttarget": "aeee80bf-8280-f4ec-c1f3-26f3a7a0651c"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_800ad693-8319-44d5-b92a-2b6ec4e4e8fa",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "3ea6020e-8918-8abf-a8e5-62427070f84f",
+ "target": "aeee80bf-8280-f4ec-c1f3-26f3a7a0651c",
+ "portsource": "3ea6020e-8918-8abf-a8e5-62427070f84f",
+ "porttarget": "aeee80bf-8280-f4ec-c1f3-26f3a7a0651c"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_7c04db5c-d599-40e2-830f-bd36c28457f1",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "nwtN_5c29f820-d40e-4c85-b7b6-c7b8a378b49d",
+ "target": "nwtN_0185dada-235a-4b51-bce7-e8bd3b8ee661",
+ "portsource": "nwtN_5c29f820-d40e-4c85-b7b6-c7b8a378b49d",
+ "porttarget": "nwtN_0185dada-235a-4b51-bce7-e8bd3b8ee661"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_4aa3c2db-45bc-4058-91ea-acefd5b0e2bd",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "nwtN_348778d0-85d5-442f-b73a-9dd9f5d9f2b3",
+ "target": "nwtN_0185dada-235a-4b51-bce7-e8bd3b8ee661",
+ "portsource": "nwtN_348778d0-85d5-442f-b73a-9dd9f5d9f2b3",
+ "porttarget": "nwtN_0185dada-235a-4b51-bce7-e8bd3b8ee661"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_0abb0b43-af9c-4579-823d-47b3acefb54b",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "nwtN_78116f70-d871-4b8e-83cf-7b3a684067a7",
+ "target": "nwtN_0185dada-235a-4b51-bce7-e8bd3b8ee661",
+ "portsource": "nwtN_78116f70-d871-4b8e-83cf-7b3a684067a7",
+ "porttarget": "nwtN_0185dada-235a-4b51-bce7-e8bd3b8ee661"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_52d8b99f-3024-4c79-8f34-b74276f3a3ed",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "nwtN_4a12169f-f588-4c76-bc39-2ae07f77d7c4",
+ "target": "nwtN_be627c29-b885-460c-bf92-8f9bb7b8c8c5",
+ "portsource": "nwtN_4a12169f-f588-4c76-bc39-2ae07f77d7c4",
+ "porttarget": "nwtN_be627c29-b885-460c-bf92-8f9bb7b8c8c5"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_906e4f53-8ebe-4246-bd59-88b38a7071f0",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "nwtN_cbc5909d-c0a3-4be5-9c36-988ca48a9d30",
+ "target": "nwtN_be627c29-b885-460c-bf92-8f9bb7b8c8c5",
+ "portsource": "nwtN_cbc5909d-c0a3-4be5-9c36-988ca48a9d30",
+ "porttarget": "nwtN_be627c29-b885-460c-bf92-8f9bb7b8c8c5"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_3e77a1b5-2418-4dfc-b77d-b6280a5ea798",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "nwtN_48d663f4-edd0-4706-a5ca-5a87f77edf8e",
+ "target": "nwtN_be627c29-b885-460c-bf92-8f9bb7b8c8c5",
+ "portsource": "nwtN_48d663f4-edd0-4706-a5ca-5a87f77edf8e",
+ "porttarget": "nwtN_be627c29-b885-460c-bf92-8f9bb7b8c8c5"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_a3959383-0737-483f-a751-6bf0d2b78896",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "nwtN_2ecfaa1e-8dd3-4008-ac3d-6d4207f518b4",
+ "target": "nwtN_64abed47-d1b1-474c-b944-b9ad6354c086",
+ "portsource": "nwtN_2ecfaa1e-8dd3-4008-ac3d-6d4207f518b4",
+ "porttarget": "nwtN_64abed47-d1b1-474c-b944-b9ad6354c086"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_c7945a01-b5ed-4fc6-a3c9-f80c5ee23dda",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "nwtN_8af34100-fdea-4636-a978-fe75c7a38fb1",
+ "target": "nwtN_64abed47-d1b1-474c-b944-b9ad6354c086",
+ "portsource": "nwtN_8af34100-fdea-4636-a978-fe75c7a38fb1",
+ "porttarget": "nwtN_64abed47-d1b1-474c-b944-b9ad6354c086"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_c2945754-dd7e-4947-95cd-b66c3dd776df",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "nwtN_1c41d32b-42f9-4e9f-a609-91c2eebbf28a",
+ "target": "nwtN_64abed47-d1b1-474c-b944-b9ad6354c086",
+ "portsource": "nwtN_1c41d32b-42f9-4e9f-a609-91c2eebbf28a",
+ "porttarget": "nwtN_64abed47-d1b1-474c-b944-b9ad6354c086"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_49b115c1-d8f4-4f9f-80f2-da43dec66241",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "nwtN_c5547527-64c5-4e4d-acb8-e3f7e6b0a9a5",
+ "target": "nwtN_273f6927-f05a-425b-aa2b-92de2be06bd9",
+ "portsource": "nwtN_c5547527-64c5-4e4d-acb8-e3f7e6b0a9a5",
+ "porttarget": "nwtN_273f6927-f05a-425b-aa2b-92de2be06bd9"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_17eb1da9-aaf4-463a-896c-a1ec8f37a6f2",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "nwtN_6bf42b3c-579e-4187-8299-cb314373c278",
+ "target": "nwtN_273f6927-f05a-425b-aa2b-92de2be06bd9",
+ "portsource": "nwtN_6bf42b3c-579e-4187-8299-cb314373c278",
+ "porttarget": "nwtN_273f6927-f05a-425b-aa2b-92de2be06bd9"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_2d6fbdec-29c8-46af-9fee-090c2fb9bc75",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "nwtN_4d424656-f0bb-4154-9a51-1d15429c8f71",
+ "target": "nwtN_273f6927-f05a-425b-aa2b-92de2be06bd9",
+ "portsource": "nwtN_4d424656-f0bb-4154-9a51-1d15429c8f71",
+ "porttarget": "nwtN_273f6927-f05a-425b-aa2b-92de2be06bd9"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_8b26c6e4-8035-4465-a038-a6219ba54bee",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "nwtN_be627c29-b885-460c-bf92-8f9bb7b8c8c5",
+ "target": "nwtN_7e09bf9e-a4da-4618-baba-60a2b3a0b134",
+ "portsource": "nwtN_be627c29-b885-460c-bf92-8f9bb7b8c8c5",
+ "porttarget": "nwtN_7e09bf9e-a4da-4618-baba-60a2b3a0b134"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_a6d29cf3-24a6-4b0c-88b3-df08fda0825c",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "nwtN_64abed47-d1b1-474c-b944-b9ad6354c086",
+ "target": "nwtN_7e09bf9e-a4da-4618-baba-60a2b3a0b134",
+ "portsource": "nwtN_64abed47-d1b1-474c-b944-b9ad6354c086",
+ "porttarget": "nwtN_7e09bf9e-a4da-4618-baba-60a2b3a0b134"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_cb84a698-6aee-4c1a-a9d8-e5eb87797a59",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "nwtN_0185dada-235a-4b51-bce7-e8bd3b8ee661",
+ "target": "661498c7-ace9-bd34-0289-7c9931d3e1ba",
+ "portsource": "nwtN_0185dada-235a-4b51-bce7-e8bd3b8ee661",
+ "porttarget": "661498c7-ace9-bd34-0289-7c9931d3e1ba"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_bf55af04-2f1f-432d-8d32-60486b9c5d08",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "nwtN_273f6927-f05a-425b-aa2b-92de2be06bd9",
+ "target": "661498c7-ace9-bd34-0289-7c9931d3e1ba",
+ "portsource": "nwtN_273f6927-f05a-425b-aa2b-92de2be06bd9",
+ "porttarget": "661498c7-ace9-bd34-0289-7c9931d3e1ba"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "cae87ba6-1f44-b148-a8fa-e9b93fca71dd",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "3aa07735-3104-5ae3-5b94-16be7319a912",
+ "target": "5c108d5c-88e4-7b97-95a8-67238c33d283",
+ "portsource": "3aa07735-3104-5ae3-5b94-16be7319a912",
+ "porttarget": "5c108d5c-88e4-7b97-95a8-67238c33d283"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "cba4c2db-9aa8-2429-37b7-ef58e51ccef5",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "212adf44-8401-5b11-c49a-b43b67369698",
+ "target": "5c108d5c-88e4-7b97-95a8-67238c33d283",
+ "portsource": "212adf44-8401-5b11-c49a-b43b67369698",
+ "porttarget": "5c108d5c-88e4-7b97-95a8-67238c33d283"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "75e10cd7-b168-147e-9842-dd6859a94e61",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "4f9485a2-a66f-2cf1-cc4e-126f7889fcd0",
+ "target": "5c108d5c-88e4-7b97-95a8-67238c33d283",
+ "portsource": "4f9485a2-a66f-2cf1-cc4e-126f7889fcd0",
+ "porttarget": "5c108d5c-88e4-7b97-95a8-67238c33d283"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "20b1d70b-c88f-acaf-0ced-07374db84055",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "f1bf3c87-1357-3ce2-4645-8cb4ed59ac9b",
+ "target": "3ea6020e-8918-8abf-a8e5-62427070f84f",
+ "portsource": "f1bf3c87-1357-3ce2-4645-8cb4ed59ac9b",
+ "porttarget": "3ea6020e-8918-8abf-a8e5-62427070f84f"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "1fefa878-d380-55e4-4d18-ec760fc294f4",
+ "class": "production",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "2f96a4e1-9767-4df9-6ad7-a4010baa376b",
+ "target": "3ea6020e-8918-8abf-a8e5-62427070f84f",
+ "portsource": "2f96a4e1-9767-4df9-6ad7-a4010baa376b",
+ "porttarget": "3ea6020e-8918-8abf-a8e5-62427070f84f"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ }
+ ]
+ },
+ "style": [
+ {
+ "selector": "node",
+ "style": {
+ "shape": "rectangle",
+ "text-halign": "center",
+ "text-valign": "center",
+ "font-weight" : "normal",
+ "background-color": "#ffffff",
+ "opacity": "1",
+ "border-color": "#555555"
+ }
+ },
+ {
+ "selector": "node[class = 'simple chemical']",
+ "style": {
+ "shape": "ellipse",
+ "font-size": 14,
+ "background-color": "#fddbc7"
+ }
+ },
+ {
+ "selector": "node[class = 'macromolecule']",
+ "style": {
+ "shape": "roundrectangle"
+ }
+ },
+ {
+ "selector": "node[class = 'unspecified entity']",
+ "style": {
+ "shape": "ellipse",
+ "background-color": "#f7f7f7"
+ }
+ },
+ {
+ "selector": "node[class = 'nucleic acid feature']",
+ "style": {
+ "shape": "rectangle",
+ "background-color": "#f4a582",
+ }
+ },
+ {
+ "selector": ":parent",
+ "style": {
+ "background-opacity": "0.333",
+ "text-valign": "bottom",
+ "shape": "barrel",
+ "text-margin-y": "2px",
+ "font-weight" : "normal",
+ "border-color": "#555555"
+ }
+ },
+ {
+ "selector": "node:selected",
+ "style": {
+ "background-color": "#33ff00",
+ "border-color": "#22ee00"
+ }
+ },
+ {
+ "selector": "edge",
+ "style": {
+ "curve-style": "bezier",
+ "width": "2px",
+ "line-color": "rgb(58,126,207)",
+ "opacity": "1"
+ }
+ },
+ {
+ "selector": "edge:selected",
+ "style": {
+ "line-color": "#33ff00",
+ "font-size": "13px",
+ "text-opacity": "1",
+ "text-rotation": "autorotate",
+ "color": "#33ff00",
+ "font-weight": "bold",
+ "text-background-shape": "roundrectangle",
+ "text-background-opacity": "1",
+ "text-background-padding": "2px"
+ }
+ },
+ {
+ "selector": "edge[class = 'production']",
+ "style": {
+ "target-arrow-shape": "triangle",
+ "target-arrow-color": "rgb(58,126,207)"
+ }
+ },
+ {
+ "selector": "edge:selected[class = 'production']",
+ "style": {
+ "target-arrow-shape": "triangle",
+ "target-arrow-color": "#33ff00"
+ }
+ },
+ ],
+ "zoomingEnabled": true,
+ "userZoomingEnabled": true,
+ "zoom": 0.8925320450269244,
+ "minZoom": 0.125,
+ "maxZoom": 16,
+ "panningEnabled": true,
+ "userPanningEnabled": true,
+ "pan": {
+ "x": 128.15184671589566,
+ "y": -93.65929006599106
+ },
+ "boxSelectionEnabled": true,
+ "renderer": {
+ "name": "canvas"
+ },
+ "wheelSensitivity": 0.1,
+ "motionBlur": true
+}
\ No newline at end of file
diff --git a/node_modules/cytoscape-fcose/demo/samples/uwsn_constraints.js b/node_modules/cytoscape-fcose/demo/samples/uwsn_constraints.js
new file mode 100644
index 00000000..0231cb3f
--- /dev/null
+++ b/node_modules/cytoscape-fcose/demo/samples/uwsn_constraints.js
@@ -0,0 +1,88 @@
+uwsn_constraints = {
+ "fixedNodeConstraint": [
+ {
+ "nodeId": "nwtN_91cff953-5f55-4626-96fa-e2f675e13e54",
+ "position": {
+ "x": -650,
+ "y": -230
+ }
+ },
+ {
+ "nodeId": "nwtN_b20cc3f4-dc9c-4031-ac79-df665d4c53cd",
+ "position": {
+ "x": 0,
+ "y": -230
+ }
+ },
+ {
+ "nodeId": "nwtN_5d6f7198-03e4-48e5-9004-919221f87e66",
+ "position": {
+ "x": 650,
+ "y": -230
+ }
+ }
+ ],
+ "alignmentConstraint": {
+ "vertical": [
+ [
+ "nwtN_91cff953-5f55-4626-96fa-e2f675e13e54",
+ "nwtN_7e09bf9e-a4da-4618-baba-60a2b3a0b134"
+ ],
+ [
+ "nwtN_b20cc3f4-dc9c-4031-ac79-df665d4c53cd",
+ "661498c7-ace9-bd34-0289-7c9931d3e1ba"
+ ],
+ [
+ "nwtN_5d6f7198-03e4-48e5-9004-919221f87e66",
+ "aeee80bf-8280-f4ec-c1f3-26f3a7a0651c"
+ ]
+ ]
+ },
+ "relativePlacementConstraint": [
+ {
+ "top": "nwtN_7e09bf9e-a4da-4618-baba-60a2b3a0b134",
+ "bottom": "nwtN_be627c29-b885-460c-bf92-8f9bb7b8c8c5",
+ "gap": 100
+ },
+ {
+ "top": "nwtN_7e09bf9e-a4da-4618-baba-60a2b3a0b134",
+ "bottom": "nwtN_64abed47-d1b1-474c-b944-b9ad6354c086",
+ "gap": 100
+ },
+ {
+ "top": "661498c7-ace9-bd34-0289-7c9931d3e1ba",
+ "bottom": "nwtN_0185dada-235a-4b51-bce7-e8bd3b8ee661",
+ "gap": 100
+ },
+ {
+ "top": "661498c7-ace9-bd34-0289-7c9931d3e1ba",
+ "bottom": "nwtN_273f6927-f05a-425b-aa2b-92de2be06bd9",
+ "gap": 100
+ },
+ {
+ "top": "aeee80bf-8280-f4ec-c1f3-26f3a7a0651c",
+ "bottom": "5c108d5c-88e4-7b97-95a8-67238c33d283",
+ "gap": 100
+ },
+ {
+ "top": "aeee80bf-8280-f4ec-c1f3-26f3a7a0651c",
+ "bottom": "3ea6020e-8918-8abf-a8e5-62427070f84f",
+ "gap": 100
+ },
+ {
+ "top": "nwtN_5d6f7198-03e4-48e5-9004-919221f87e66",
+ "bottom": "aeee80bf-8280-f4ec-c1f3-26f3a7a0651c",
+ "gap": 250
+ },
+ {
+ "top": "nwtN_b20cc3f4-dc9c-4031-ac79-df665d4c53cd",
+ "bottom": "661498c7-ace9-bd34-0289-7c9931d3e1ba",
+ "gap": 250
+ },
+ {
+ "top": "nwtN_91cff953-5f55-4626-96fa-e2f675e13e54",
+ "bottom": "nwtN_7e09bf9e-a4da-4618-baba-60a2b3a0b134",
+ "gap": 250
+ }
+ ]
+}
\ No newline at end of file
diff --git a/node_modules/cytoscape-fcose/demo/samples/wsn.js b/node_modules/cytoscape-fcose/demo/samples/wsn.js
new file mode 100644
index 00000000..ca2e615c
--- /dev/null
+++ b/node_modules/cytoscape-fcose/demo/samples/wsn.js
@@ -0,0 +1,7640 @@
+wsn = {
+ "elements": {
+ "nodes": [
+ {
+ "data": {
+ "id": "86f48f58-145d-92cc-0d33-aaf639984733",
+ "bbox": {
+ "x": 918.6946839627489,
+ "y": 268.1553060642376,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "a6",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.000,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAyCAYAAABYiSsbAAAABHNCSVQICAgIfAhkiAAABA5JREFUWIXtmM9LI2cYxz9KCOlWcOpqjew2zYK1Uy00tLDMoTShFISePOptLwvpf5C7B28rCCVKDwUv8b6H4M01oBEPsXjQ6iFx3RqruA4eHAkl3x6aGYyZSWLZFgr9wsv78j7zfvLM+zzvj0mPJPEPqNevs1KpsL+/3xWgWCxi23arQXfkOI7i8bgsy7prapHjOAI0PT3dYmsBp9NpAcrn83IcR3t7e77Qzc1NSVImkxGgXC4XDC6VSk0epFIpGYbRAnWfm5ub894wGo3KcRx/8NzcnADt7e0pm80KUCaTkSTNzs5qcnJShUJBkmRZliKRiMrlsubn5wWoVCr5g6empjwP3bbjOJqZmRHglZWVFW1ubgrQ/Py8185ms/5g0zS9oN1u9/X1KQz6qQGenJz0ApdOp5varprSLRqNcnp6CoBhGF4axWIxasAPjefGxsY8m2EY3pjh4WH/PE4kElQqFWzbxrIs9vf3WVtbY2lpiXA4zB/AxMQECwsLLC4uApBMJtnZ2fHG++ZxLpfz5q1arcowDJmmKUlKJpMCVCgUVC6XFYlElEqlvHgAqlar/nPsOI5M0/Sinc/nvay4Db68vFQ6nVa5XPacuT2/LWBJXoSnpqaa+m+DbzsSjUYVj8ebcrgleACWZZHNZjFNs3X9+yiRSJDL5YhEIs2Gux4Hyc/jdvLd3d6F/gf/h8Ed0y2fzyuVSnlb5sjIiKanpwNPFldtwevr6wqFQvpwaEifPX4sQNb4uAD19/e3rLauwe7m8olh6EdQBPQr6NHAgAAtLy8Hjm07x0dHRwAc2jazQ0NYiQRfhMP89vYtANvb24Fj24KPj48JAT8D5vk57OyQqtV40bDv7u7+veCFw2ENguRTekCjo6P3nwrbtqnVanwUYH/Q00O1Wr3/VGxsbADwcYD9Awnn+vr+4EKhAMBXAfY4UJc4ODi4H9i9FH4ZYP+0UW9tbd0P7HryfYDd/UF3yroGn52dEQ4yAt816sDrbmC69PZqJCDVbqdcLBbrPt1s26ZerxNt4zHAA+Di4sLX5gteXV0FoNM5/RC4Dkg5X7B7ZRrvAI4Bknj98iXUap3BpVIJgFQH8OeNevfFCwg3h9oXfHx8DMDXHcDu4lktFuHmpjP45OSkbaq5+qZRl25uoFjsDL66uuJhF+AxoAd4DfDqVXvw0dER9Xo9cPO5q/eBc4A3b9qDi41XetIleAC4AXj+vKk/dPfBw8NDoHOquXoCfPvsGTx92my4uxRXVlb+Oo07LGe3PDKMppu8K9+9wjAMAUqCKgHAX0Cjjc8KP/mCK5WK+vr6vEuK0XiDZKO81+hPJBJBe1j7e0Umk9Hg4KBCoVDTB2Rvb6/G43H9XqkEju2R/sX/K96F/gTllaEEcp1NCgAAAABJRU5ErkJggg==",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 918.6946839627489,
+ "y": 268.1553060642376
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "67add58f-1a8c-17d9-8cfa-ff468527f6c9",
+ "bbox": {
+ "x": 910.624263262373,
+ "y": 209.60764253071486,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u1",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 910.624263262373,
+ "y": 209.60764253071486
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "7c1292d7-1feb-63b9-65a6-fb9db2547eb3",
+ "bbox": {
+ "x": 777.4499113106275,
+ "y": 242.69847222540457,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u2",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 777.4499113106275,
+ "y": 242.69847222540457
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "9bf069c9-034b-1bee-35e5-2d2addaeaf38",
+ "bbox": {
+ "x": 779.0933397934479,
+ "y": 279.18258454401627,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u3",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 779.0933397934479,
+ "y": 279.18258454401627
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "d64b38d9-db3d-4128-1ec4-ddf1e5648c72",
+ "bbox": {
+ "x": 728.8044282191453,
+ "y": 278.85389884745223,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u4",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 728.8044282191453,
+ "y": 278.85389884745223
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "7435cbfb-9e49-d44e-4357-c413a22e188a",
+ "bbox": {
+ "x": 727.4896854328889,
+ "y": 324.2125249732938,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u5",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 727.4896854328889,
+ "y": 324.2125249732938
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "f91d914e-6ab7-92cf-b16d-b9a7661e0044",
+ "bbox": {
+ "x": 648.8383670046286,
+ "y": 373.40718335288847,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "a9",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAyCAYAAABYiSsbAAAABHNCSVQICAgIfAhkiAAABA5JREFUWIXtmM9LI2cYxz9KCOlWcOpqjew2zYK1Uy00tLDMoTShFISePOptLwvpf5C7B28rCCVKDwUv8b6H4M01oBEPsXjQ6iFx3RqruA4eHAkl3x6aGYyZSWLZFgr9wsv78j7zfvLM+zzvj0mPJPEPqNevs1KpsL+/3xWgWCxi23arQXfkOI7i8bgsy7prapHjOAI0PT3dYmsBp9NpAcrn83IcR3t7e77Qzc1NSVImkxGgXC4XDC6VSk0epFIpGYbRAnWfm5ub894wGo3KcRx/8NzcnADt7e0pm80KUCaTkSTNzs5qcnJShUJBkmRZliKRiMrlsubn5wWoVCr5g6empjwP3bbjOJqZmRHglZWVFW1ubgrQ/Py8185ms/5g0zS9oN1u9/X1KQz6qQGenJz0ApdOp5varprSLRqNcnp6CoBhGF4axWIxasAPjefGxsY8m2EY3pjh4WH/PE4kElQqFWzbxrIs9vf3WVtbY2lpiXA4zB/AxMQECwsLLC4uApBMJtnZ2fHG++ZxLpfz5q1arcowDJmmKUlKJpMCVCgUVC6XFYlElEqlvHgAqlar/nPsOI5M0/Sinc/nvay4Db68vFQ6nVa5XPacuT2/LWBJXoSnpqaa+m+DbzsSjUYVj8ebcrgleACWZZHNZjFNs3X9+yiRSJDL5YhEIs2Gux4Hyc/jdvLd3d6F/gf/h8Ed0y2fzyuVSnlb5sjIiKanpwNPFldtwevr6wqFQvpwaEifPX4sQNb4uAD19/e3rLauwe7m8olh6EdQBPQr6NHAgAAtLy8Hjm07x0dHRwAc2jazQ0NYiQRfhMP89vYtANvb24Fj24KPj48JAT8D5vk57OyQqtV40bDv7u7+veCFw2ENguRTekCjo6P3nwrbtqnVanwUYH/Q00O1Wr3/VGxsbADwcYD9Awnn+vr+4EKhAMBXAfY4UJc4ODi4H9i9FH4ZYP+0UW9tbd0P7HryfYDd/UF3yroGn52dEQ4yAt816sDrbmC69PZqJCDVbqdcLBbrPt1s26ZerxNt4zHAA+Di4sLX5gteXV0FoNM5/RC4Dkg5X7B7ZRrvAI4Bknj98iXUap3BpVIJgFQH8OeNevfFCwg3h9oXfHx8DMDXHcDu4lktFuHmpjP45OSkbaq5+qZRl25uoFjsDL66uuJhF+AxoAd4DfDqVXvw0dER9Xo9cPO5q/eBc4A3b9qDi41XetIleAC4AXj+vKk/dPfBw8NDoHOquXoCfPvsGTx92my4uxRXVlb+Oo07LGe3PDKMppu8K9+9wjAMAUqCKgHAX0Cjjc8KP/mCK5WK+vr6vEuK0XiDZKO81+hPJBJBe1j7e0Umk9Hg4KBCoVDTB2Rvb6/G43H9XqkEju2R/sX/K96F/gTllaEEcp1NCgAAAABJRU5ErkJggg==",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 648.8383670046286,
+ "y": 373.40718335288847
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "3ffdee99-d217-2dc6-5b0e-1229ee1d1bd4",
+ "bbox": {
+ "x": 829.3822513677504,
+ "y": 328.15675333206264,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u6",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 829.3822513677504,
+ "y": 328.15675333206264
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "88642a3e-3f7a-60a3-9c61-425f1f3cf2d7",
+ "bbox": {
+ "x": 831.3543655471349,
+ "y": 295.94555506878385,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u7",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 831.3543655471349,
+ "y": 295.94555506878385
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "c21a716f-9ce2-4976-bdc3-320395e5ed97",
+ "bbox": {
+ "x": 826.7527657952379,
+ "y": 258.804071357044,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u8",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 826.7527657952379,
+ "y": 258.804071357044
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "1eee479d-d3a1-44d9-316e-b70bc4556169",
+ "bbox": {
+ "x": 614.0181970745487,
+ "y": 498.44324810181206,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u9",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 614.0181970745487,
+ "y": 498.44324810181206
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "96f4c006-33d1-a00e-a389-782f23c38a65",
+ "bbox": {
+ "x": 777.1212256140635,
+ "y": 374.1727508510323,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u10",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhGkqRG00RRLBaLW1tbhULhz6GlUikcDvt8vlKpdIotsixzHOfz+aLRKMdxNb1IzdB4PP7x48dkMgnDsCAIMAwjCAJB0PEYSZJEUZQkiSAIv99PEITRaOzo6Kj95rHK5fLMzMzVq1dTqVSlUlleXg4EAjzPV4/JZrPBYHBra0uW5ZWVlXv37r148UL+Vb+4v7q6GovFJiYmTCZTMpl89erV9+/fAQAsywaDwWg0qqzJ8vLys2fPOI5zu92dnZ3pdHp9fb2h+4lEIpfLDQ0NoSg6OzuL43h7e/vKysrs7Oz29rZKpert7b1y5YrVatVoNG/evLl27ZrD4QiHw7FYrL+/vz40nU6XSqXu7m4AwPv376empsxms8/nm56epmlakqTFxUUURScnJz0ez9u3bycmJhRoIpGo5vzLfUmSaJoWBMFisYiimEqlSJJkWTYcDudyOYIgNBrN3t5eMBikadpisUQiEUEQzGYzACCTydR3XxRFAIBKpZJluVKpVG86DMNqtVqWZUEQIAj6x27AMARBKpVKMai+pSiKWiwWDMN2dnbUarXD4chkMkaj8eLFiyqVKpVKZbNZnU7n9XpbWlri8fiFCxcwDItGowCAmpD6ZfetVitBEKFQCABw9+7dQCCwuro6Pj7+6NEjAABJkg8fPrx58+b29rbf779//z5Jkj9//gQAtLW1NYR6PB6LxTI/Py8IwvDw8MDAgMlk0uv1Ho8HAKDT6VwuF0EQWq328uXLbrebpulQKKTT6Xp6ehpC29ranE4ny7Jfv37V6/VjY2NutxtBELVarawPhmEajcblck1OTmq12g8fPqAo2tPTY7Va628UAECr1Xq93kKhMD8/7/V6Ozo6IAgqFovVY5qampqamkRRpGn6y5cv4+Pjly5dUrarPhQA4HA4SJKcm5sDAEiSVDP6WJVKZX9/f2hoaHBwsLm5uaa3FqrYcuvWLRRFq/NIjTAM6+zsbGtrQ5A6hDpNSlQ2wilSIrSRH3/r4+T/0P9QdUKqWolEYmVl5fPnzwCAQqHw6dMnFEU9Ho/dbj9llurx48eN+gKBwLt3716/fu33+w8PDyuVSjabjcVihUKBJMmTP9KZLJ2bm5ueno5GoxRFoSh67tw5mqZ9Pt/a2hrDML29vQ1nyg3Ecdz169chCDp//vyDBw+8Xu/MzMyTJ0+GhoYwDBsdHVVO/7pzG1q6vb1dKBRQFCUIwuVy3blzR6VSlUolHMd5ns/n8zRNkyRZNz80hG5ububzeavVajKZNjc3fT6fSqVqaWkBAKjVap7nf/786fF4MAz7bWhTU9PAwMDIyEgmk4EgiKIoDMPW19d5no/H406n8/egOzs7xWLRbrc7nc7h4WGNRiOKIsdx4XDYYDCwLBuPxyuVSt25DYM/lUqVy2WKooxGY3U7RVEmk4njuFgs9tvQo6MjjuMoilLKhWMZjUar1crzfDQa/W1osVisVCqKXdXtNputvb2d5/mdnZ1G0DprKklSpVLheR6GYYIgcByv7jWbzXa7XRCERCLxG5byPB8Oh3me1+v1er2+5hRSq9U4jsuynMvllNrrTFCGYRYXF3meVyqJ2gkwjGGYEqrpdPpkbV4fWi6X19bWeJ43GAwEQZwcgGEYSZIAgGQyyTDMmaAcx4VCIaVMpCjq5ACNRmMwGMA/Y/lMUEEQdnd3RVE0m80n3QcAEATR2toKANjb22NZ9qzQdDqtQOtaSpKkUuYlEomzui+KYi6XkySp0ZpSFNXV1aVYWi6X/xyq/OAsyyIIYjAYaoJUkV6vdzgcAIDd3d1sNsuybE3A1kIZhtnf35dlmSRJkiTrJiFlo2AYPjg4SKfTJ7m10IODA+VSZDKZGlVUx6EqiuLR0dHBwUEul2MYRkn7daD5fD4WiwEAbDabRqOpC1W4FEXBMKxYyvN8oVAolUr1oblcLhKJAACam5tPgaIoarPZVCpVJpOhaRoAIAiCsr11oMViMZlMAgDsdrtWq20ERRCkBirLMs/zgiBIklQLLZfLh4eHivunQNVqdVdXF4Ig2WxWgSqqD+U4TnkXUC6gjaAajaavrw9F0aOjo2po/TWVJEnJZhaL5ZR6GsMwh8OBIMjh4WE+nz9uV66BtVAURZWAZxhGuVieLo7jqlOqclOohR7/gjMzMxsbG3XzBcuyoVDo+fPnNE27XC4lD8AwjOO4cqOtPU66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 777.1212256140635,
+ "y": 374.1727508510323
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "a3218cf9-fd48-f0b4-4c45-99cf2e52a0e8",
+ "bbox": {
+ "x": 833.9838511196474,
+ "y": 373.1866937613401,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u11",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 833.9838511196474,
+ "y": 373.1866937613401
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "267b649b-6d09-255c-67b4-46bd2c40375e",
+ "bbox": {
+ "x": 735.3781421504267,
+ "y": 375.8161793338527,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u12",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 735.3781421504267,
+ "y": 375.8161793338527
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "a1be056e-0b97-5a8e-56e9-8c3e08e9c24b",
+ "bbox": {
+ "x": 689.3621446314569,
+ "y": 372.529322368212,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u13",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 689.3621446314569,
+ "y": 372.529322368212
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "33f80abd-028e-ad1c-068b-33d5b40d9a93",
+ "bbox": {
+ "x": 564.9534121730723,
+ "y": 455.709403187623,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "a12",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAyCAYAAABYiSsbAAAABHNCSVQICAgIfAhkiAAABA5JREFUWIXtmM9LI2cYxz9KCOlWcOpqjew2zYK1Uy00tLDMoTShFISePOptLwvpf5C7B28rCCVKDwUv8b6H4M01oBEPsXjQ6iFx3RqruA4eHAkl3x6aGYyZSWLZFgr9wsv78j7zfvLM+zzvj0mPJPEPqNevs1KpsL+/3xWgWCxi23arQXfkOI7i8bgsy7prapHjOAI0PT3dYmsBp9NpAcrn83IcR3t7e77Qzc1NSVImkxGgXC4XDC6VSk0epFIpGYbRAnWfm5ub894wGo3KcRx/8NzcnADt7e0pm80KUCaTkSTNzs5qcnJShUJBkmRZliKRiMrlsubn5wWoVCr5g6empjwP3bbjOJqZmRHglZWVFW1ubgrQ/Py8185ms/5g0zS9oN1u9/X1KQz6qQGenJz0ApdOp5varprSLRqNcnp6CoBhGF4axWIxasAPjefGxsY8m2EY3pjh4WH/PE4kElQqFWzbxrIs9vf3WVtbY2lpiXA4zB/AxMQECwsLLC4uApBMJtnZ2fHG++ZxLpfz5q1arcowDJmmKUlKJpMCVCgUVC6XFYlElEqlvHgAqlar/nPsOI5M0/Sinc/nvay4Db68vFQ6nVa5XPacuT2/LWBJXoSnpqaa+m+DbzsSjUYVj8ebcrgleACWZZHNZjFNs3X9+yiRSJDL5YhEIs2Gux4Hyc/jdvLd3d6F/gf/h8Ed0y2fzyuVSnlb5sjIiKanpwNPFldtwevr6wqFQvpwaEifPX4sQNb4uAD19/e3rLauwe7m8olh6EdQBPQr6NHAgAAtLy8Hjm07x0dHRwAc2jazQ0NYiQRfhMP89vYtANvb24Fj24KPj48JAT8D5vk57OyQqtV40bDv7u7+veCFw2ENguRTekCjo6P3nwrbtqnVanwUYH/Q00O1Wr3/VGxsbADwcYD9Awnn+vr+4EKhAMBXAfY4UJc4ODi4H9i9FH4ZYP+0UW9tbd0P7HryfYDd/UF3yroGn52dEQ4yAt816sDrbmC69PZqJCDVbqdcLBbrPt1s26ZerxNt4zHAA+Di4sLX5gteXV0FoNM5/RC4Dkg5X7B7ZRrvAI4Bknj98iXUap3BpVIJgFQH8OeNevfFCwg3h9oXfHx8DMDXHcDu4lktFuHmpjP45OSkbaq5+qZRl25uoFjsDL66uuJhF+AxoAd4DfDqVXvw0dER9Xo9cPO5q/eBc4A3b9qDi41XetIleAC4AXj+vKk/dPfBw8NDoHOquXoCfPvsGTx92my4uxRXVlb+Oo07LGe3PDKMppu8K9+9wjAMAUqCKgHAX0Cjjc8KP/mCK5WK+vr6vEuK0XiDZKO81+hPJBJBe1j7e0Umk9Hg4KBCoVDTB2Rvb6/G43H9XqkEju2R/sX/K96F/gTllaEEcp1NCgAAAABJRU5ErkJggg==",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 564.9534121730723,
+ "y": 455.709403187623
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "d036dd9f-8368-bfac-a080-87b82544be20",
+ "bbox": {
+ "x": 696.9219156524304,
+ "y": 326.8420105458064,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u14",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 696.9219156524304,
+ "y": 326.8420105458064
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "b45bf870-2439-dc1d-38f2-fc491752ff05",
+ "bbox": {
+ "x": 655.1788321887938,
+ "y": 324.8698963664219,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u15",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 655.1788321887938,
+ "y": 324.8698963664219
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "a44fe57b-d4e6-a062-6b2a-bf6f5f92c5f1",
+ "bbox": {
+ "x": 692.9776872936616,
+ "y": 277.5391560611959,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u16",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 692.9776872936616,
+ "y": 277.5391560611959
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "2b855d36-0c89-996d-9281-ea54f711cc8e",
+ "bbox": {
+ "x": 723.2269118552542,
+ "y": 156.5724887882993,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "a1",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAyCAYAAABYiSsbAAAABHNCSVQICAgIfAhkiAAABA5JREFUWIXtmM9LI2cYxz9KCOlWcOpqjew2zYK1Uy00tLDMoTShFISePOptLwvpf5C7B28rCCVKDwUv8b6H4M01oBEPsXjQ6iFx3RqruA4eHAkl3x6aGYyZSWLZFgr9wsv78j7zfvLM+zzvj0mPJPEPqNevs1KpsL+/3xWgWCxi23arQXfkOI7i8bgsy7prapHjOAI0PT3dYmsBp9NpAcrn83IcR3t7e77Qzc1NSVImkxGgXC4XDC6VSk0epFIpGYbRAnWfm5ub894wGo3KcRx/8NzcnADt7e0pm80KUCaTkSTNzs5qcnJShUJBkmRZliKRiMrlsubn5wWoVCr5g6empjwP3bbjOJqZmRHglZWVFW1ubgrQ/Py8185ms/5g0zS9oN1u9/X1KQz6qQGenJz0ApdOp5varprSLRqNcnp6CoBhGF4axWIxasAPjefGxsY8m2EY3pjh4WH/PE4kElQqFWzbxrIs9vf3WVtbY2lpiXA4zB/AxMQECwsLLC4uApBMJtnZ2fHG++ZxLpfz5q1arcowDJmmKUlKJpMCVCgUVC6XFYlElEqlvHgAqlar/nPsOI5M0/Sinc/nvay4Db68vFQ6nVa5XPacuT2/LWBJXoSnpqaa+m+DbzsSjUYVj8ebcrgleACWZZHNZjFNs3X9+yiRSJDL5YhEIs2Gux4Hyc/jdvLd3d6F/gf/h8Ed0y2fzyuVSnlb5sjIiKanpwNPFldtwevr6wqFQvpwaEifPX4sQNb4uAD19/e3rLauwe7m8olh6EdQBPQr6NHAgAAtLy8Hjm07x0dHRwAc2jazQ0NYiQRfhMP89vYtANvb24Fj24KPj48JAT8D5vk57OyQqtV40bDv7u7+veCFw2ENguRTekCjo6P3nwrbtqnVanwUYH/Q00O1Wr3/VGxsbADwcYD9Awnn+vr+4EKhAMBXAfY4UJc4ODi4H9i9FH4ZYP+0UW9tbd0P7HryfYDd/UF3yroGn52dEQ4yAt816sDrbmC69PZqJCDVbqdcLBbrPt1s26ZerxNt4zHAA+Di4sLX5gteXV0FoNM5/RC4Dkg5X7B7ZRrvAI4Bknj98iXUap3BpVIJgFQH8OeNevfFCwg3h9oXfHx8DMDXHcDu4lktFuHmpjP45OSkbaq5+qZRl25uoFjsDL66uuJhF+AxoAd4DfDqVXvw0dER9Xo9cPO5q/eBc4A3b9qDi41XetIleAC4AXj+vKk/dPfBw8NDoHOquXoCfPvsGTx92my4uxRXVlb+Oo07LGe3PDKMppu8K9+9wjAMAUqCKgHAX0Cjjc8KP/mCK5WK+vr6vEuK0XiDZKO81+hPJBJBe1j7e0Umk9Hg4KBCoVDTB2Rvb6/G43H9XqkEju2R/sX/K96F/gTllaEEcp1NCgAAAABJRU5ErkJggg==",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 723.2269118552542,
+ "y": 156.5724887882993
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "464bae1c-0c35-3b4a-3af2-371ef03a0dcb",
+ "bbox": {
+ "x": 701.8522011008915,
+ "y": 242.04110083227644,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u17",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 701.8522011008915,
+ "y": 242.04110083227644
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "9e04da58-86d5-7fc8-e79e-3883f25b5c2d",
+ "bbox": {
+ "x": 659.1230605475625,
+ "y": 239.4116152597639,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u18",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 659.1230605475625,
+ "y": 239.4116152597639
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "16102c94-c326-51c3-8636-3ae19b603483",
+ "bbox": {
+ "x": 827.5998410823756,
+ "y": 419.9455390609479,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u19",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 827.5998410823756,
+ "y": 419.9455390609479
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "e833b238-0bb7-c5d2-ebec-aa0604bcd484",
+ "bbox": {
+ "x": 772.0136740057479,
+ "y": 420.8797603563535,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u20",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 772.0136740057479,
+ "y": 420.8797603563535
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "7e30e3e1-7f31-1080-0970-22d019957584",
+ "bbox": {
+ "x": 735.3590911745005,
+ "y": 465.98770776577527,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u21",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 735.3590911745005,
+ "y": 465.98770776577527
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "11284cd9-d716-52f7-20c7-5d1750de5309",
+ "bbox": {
+ "x": 693.0719745439824,
+ "y": 417.60998582243417,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u22",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 693.0719745439824,
+ "y": 417.60998582243417
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "b386ca2b-81a7-e365-4706-f955f13db03f",
+ "bbox": {
+ "x": 830.061524140727,
+ "y": 500.0259830986339,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "a14",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAyCAYAAABYiSsbAAAABHNCSVQICAgIfAhkiAAABA5JREFUWIXtmM9LI2cYxz9KCOlWcOpqjew2zYK1Uy00tLDMoTShFISePOptLwvpf5C7B28rCCVKDwUv8b6H4M01oBEPsXjQ6iFx3RqruA4eHAkl3x6aGYyZSWLZFgr9wsv78j7zfvLM+zzvj0mPJPEPqNevs1KpsL+/3xWgWCxi23arQXfkOI7i8bgsy7prapHjOAI0PT3dYmsBp9NpAcrn83IcR3t7e77Qzc1NSVImkxGgXC4XDC6VSk0epFIpGYbRAnWfm5ub894wGo3KcRx/8NzcnADt7e0pm80KUCaTkSTNzs5qcnJShUJBkmRZliKRiMrlsubn5wWoVCr5g6empjwP3bbjOJqZmRHglZWVFW1ubgrQ/Py8185ms/5g0zS9oN1u9/X1KQz6qQGenJz0ApdOp5varprSLRqNcnp6CoBhGF4axWIxasAPjefGxsY8m2EY3pjh4WH/PE4kElQqFWzbxrIs9vf3WVtbY2lpiXA4zB/AxMQECwsLLC4uApBMJtnZ2fHG++ZxLpfz5q1arcowDJmmKUlKJpMCVCgUVC6XFYlElEqlvHgAqlar/nPsOI5M0/Sinc/nvay4Db68vFQ6nVa5XPacuT2/LWBJXoSnpqaa+m+DbzsSjUYVj8ebcrgleACWZZHNZjFNs3X9+yiRSJDL5YhEIs2Gux4Hyc/jdvLd3d6F/gf/h8Ed0y2fzyuVSnlb5sjIiKanpwNPFldtwevr6wqFQvpwaEifPX4sQNb4uAD19/e3rLauwe7m8olh6EdQBPQr6NHAgAAtLy8Hjm07x0dHRwAc2jazQ0NYiQRfhMP89vYtANvb24Fj24KPj48JAT8D5vk57OyQqtV40bDv7u7+veCFw2ENguRTekCjo6P3nwrbtqnVanwUYH/Q00O1Wr3/VGxsbADwcYD9Awnn+vr+4EKhAMBXAfY4UJc4ODi4H9i9FH4ZYP+0UW9tbd0P7HryfYDd/UF3yroGn52dEQ4yAt816sDrbmC69PZqJCDVbqdcLBbrPt1s26ZerxNt4zHAA+Di4sLX5gteXV0FoNM5/RC4Dkg5X7B7ZRrvAI4Bknj98iXUap3BpVIJgFQH8OeNevfFCwg3h9oXfHx8DMDXHcDu4lktFuHmpjP45OSkbaq5+qZRl25uoFjsDL66uuJhF+AxoAd4DfDqVXvw0dER9Xo9cPO5q/eBc4A3b9qDi41XetIleAC4AXj+vKk/dPfBw8NDoHOquXoCfPvsGTx92my4uxRXVlb+Oo07LGe3PDKMppu8K9+9wjAMAUqCKgHAX0Cjjc8KP/mCK5WK+vr6vEuK0XiDZKO81+hPJBJBe1j7e0Umk9Hg4KBCoVDTB2Rvb6/G43H9XqkEju2R/sX/K96F/gTllaEEcp1NCgAAAABJRU5ErkJggg==",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 830.061524140727,
+ "y": 500.0259830986339
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "db182fe4-ce6c-7869-72ce-7a4b11327e3a",
+ "bbox": {
+ "x": 606.6565047189728,
+ "y": 416.67576452702866,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u23",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 606.6565047189728,
+ "y": 416.67576452702866
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "97d3df31-9033-96c4-359d-08ed397b29c4",
+ "bbox": {
+ "x": 608.5249473097838,
+ "y": 367.16203587053667,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u24",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 608.5249473097838,
+ "y": 367.16203587053667
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "91966017-4d7f-7634-6823-1a405da45139",
+ "bbox": {
+ "x": 597.7814024126204,
+ "y": 327.9247414635053,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u25",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 597.7814024126204,
+ "y": 327.9247414635053
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "1998dad6-f944-21b8-11dc-05d4cebd39e6",
+ "bbox": {
+ "x": 612.2618324914058,
+ "y": 289.6216683518794,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u26",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 612.2618324914058,
+ "y": 289.6216683518794
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "45d5101e-e0a1-821c-37d6-378cbd632d55",
+ "bbox": {
+ "x": 605.2551727758645,
+ "y": 246.64748876322597,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u27",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 605.2551727758645,
+ "y": 246.64748876322597
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "97f86367-eafd-54f7-4951-8360862b846f",
+ "bbox": {
+ "x": 825.2642878438619,
+ "y": 461.9854973541959,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u28",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 825.2642878438619,
+ "y": 461.9854973541959
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "5ea74092-08ec-6937-33c9-9f6fbe9226a2",
+ "bbox": {
+ "x": 777.619001778181,
+ "y": 461.9854973541959,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u29",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 777.619001778181,
+ "y": 461.9854973541959
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "8edd562b-196b-4f7e-37bf-a9e2072917b0",
+ "bbox": {
+ "x": 918.3078371044154,
+ "y": 397.88472998291235,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u30",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhGkqRG00RRLBaLW1tbhULhz6GlUikcDvt8vlKpdIotsixzHOfz+aLRKMdxNb1IzdB4PP7x48dkMgnDsCAIMAwjCAJB0PEYSZJEUZQkiSAIv99PEITRaOzo6Kj95rHK5fLMzMzVq1dTqVSlUlleXg4EAjzPV4/JZrPBYHBra0uW5ZWVlXv37r148UL+Vb+4v7q6GovFJiYmTCZTMpl89erV9+/fAQAsywaDwWg0qqzJ8vLys2fPOI5zu92dnZ3pdHp9fb2h+4lEIpfLDQ0NoSg6OzuL43h7e/vKysrs7Oz29rZKpert7b1y5YrVatVoNG/evLl27ZrD4QiHw7FYrL+/vz40nU6XSqXu7m4AwPv376empsxms8/nm56epmlakqTFxUUURScnJz0ez9u3bycmJhRoIpGo5vzLfUmSaJoWBMFisYiimEqlSJJkWTYcDudyOYIgNBrN3t5eMBikadpisUQiEUEQzGYzACCTydR3XxRFAIBKpZJluVKpVG86DMNqtVqWZUEQIAj6x27AMARBKpVKMai+pSiKWiwWDMN2dnbUarXD4chkMkaj8eLFiyqVKpVKZbNZnU7n9XpbWlri8fiFCxcwDItGowCAmpD6ZfetVitBEKFQCABw9+7dQCCwuro6Pj7+6NEjAABJkg8fPrx58+b29rbf779//z5Jkj9//gQAtLW1NYR6PB6LxTI/Py8IwvDw8MDAgMlk0uv1Ho8HAKDT6VwuF0EQWq328uXLbrebpulQKKTT6Xp6ehpC29ranE4ny7Jfv37V6/VjY2NutxtBELVarawPhmEajcblck1OTmq12g8fPqAo2tPTY7Va628UAECr1Xq93kKhMD8/7/V6Ozo6IAgqFovVY5qampqamkRRpGn6y5cv4+Pjly5dUrarPhQA4HA4SJKcm5sDAEiSVDP6WJVKZX9/f2hoaHBwsLm5uaa3FqrYcuvWLRRFq/NIjTAM6+zsbGtrQ5A6hDpNSlQ2wilSIrSRH3/r4+T/0P9QdUKqWolEYmVl5fPnzwCAQqHw6dMnFEU9Ho/dbj9llurx48eN+gKBwLt3716/fu33+w8PDyuVSjabjcVihUKBJMmTP9KZLJ2bm5ueno5GoxRFoSh67tw5mqZ9Pt/a2hrDML29vQ1nyg3Ecdz169chCDp//vyDBw+8Xu/MzMyTJ0+GhoYwDBsdHVVO/7pzG1q6vb1dKBRQFCUIwuVy3blzR6VSlUolHMd5ns/n8zRNkyRZNz80hG5ububzeavVajKZNjc3fT6fSqVqaWkBAKjVap7nf/786fF4MAz7bWhTU9PAwMDIyEgmk4EgiKIoDMPW19d5no/H406n8/egOzs7xWLRbrc7nc7h4WGNRiOKIsdx4XDYYDCwLBuPxyuVSt25DYM/lUqVy2WKooxGY3U7RVEmk4njuFgs9tvQo6MjjuMoilLKhWMZjUar1crzfDQa/W1osVisVCqKXdXtNputvb2d5/mdnZ1G0DprKklSpVLheR6GYYIgcByv7jWbzXa7XRCERCLxG5byPB8Oh3me1+v1er2+5hRSq9U4jsuynMvllNrrTFCGYRYXF3meVyqJ2gkwjGGYEqrpdPpkbV4fWi6X19bWeJ43GAwEQZwcgGEYSZIAgGQyyTDMmaAcx4VCIaVMpCjq5ACNRmMwGMA/Y/lMUEEQdnd3RVE0m80n3QcAEATR2toKANjb22NZ9qzQdDqtQOtaSpKkUuYlEomzui+KYi6XkySp0ZpSFNXV1aVYWi6X/xyq/OAsyyIIYjAYaoJUkV6vdzgcAIDd3d1sNsuybE3A1kIZhtnf35dlmSRJkiTrJiFlo2AYPjg4SKfTJ7m10IODA+VSZDKZGlVUx6EqiuLR0dHBwUEul2MYRkn7daD5fD4WiwEAbDabRqOpC1W4FEXBMKxYyvN8oVAolUr1oblcLhKJAACam5tPgaIoarPZVCpVJpOhaRoAIAiCsr11oMViMZlMAgDsdrtWq20ERRCkBirLMs/zgiBIklQLLZfLh4eHivunQNVqdVdXF4Ig2WxWgSqqD+U4TnkXUC6gjaAajaavrw9F0aOjo2po/TWVJEnJZhaL5ZR6GsMwh8OBIMjh4WE+nz9uV66BtVAURZWAZxhGuVieLo7jqlOqclOohR7/gjMzMxsbG3XzBcuyoVDo+fPnNE27XC4lD8AwjOO4cqOtPU66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 918.3078371044154,
+ "y": 397.88472998291235
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "f3fc754e-1421-a039-0ef0-c2d989db228e",
+ "bbox": {
+ "x": 701.0128555549292,
+ "y": 461.5183867064931,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u31",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 701.0128555549292,
+ "y": 461.5183867064931
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "3a85e050-463c-f484-c100-9d39adb1a23e",
+ "bbox": {
+ "x": 656.6373440231675,
+ "y": 459.1828334679793,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u32",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 656.6373440231675,
+ "y": 459.1828334679793
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "607d3097-a2d2-ed9d-39dc-b5c8a12ea7eb",
+ "bbox": {
+ "x": 608.5249473097838,
+ "y": 457.7815015248711,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u33",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 608.5249473097838,
+ "y": 457.7815015248711
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "c54786e2-bbea-d15b-3e21-7cf32b9338ca",
+ "bbox": {
+ "x": 773.5200858791309,
+ "y": 200.08021628162345,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u34",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 773.5200858791309,
+ "y": 200.08021628162345
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "d4e4f860-ffb4-cbf6-80b7-675c821ed4d2",
+ "bbox": {
+ "x": 724.4863719898078,
+ "y": 199.08963620305127,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u35",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 724.4863719898078,
+ "y": 199.08963620305127
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "25f4cc48-4e4e-e80e-174f-fa4ba64616da",
+ "bbox": {
+ "x": 699.226579986217,
+ "y": 195.12731588876252,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u36",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 699.226579986217,
+ "y": 195.12731588876252
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "73eceeb1-0069-9139-4398-5dffeb19bddf",
+ "bbox": {
+ "x": 656.1363465683271,
+ "y": 199.58492624233736,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u37",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 656.1363465683271,
+ "y": 199.58492624233736
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "0ddcc98c-7b7c-ac2e-2207-081c5ffc9921",
+ "bbox": {
+ "x": 869.6298990612723,
+ "y": 402.68778079409213,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "a11",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAyCAYAAABYiSsbAAAABHNCSVQICAgIfAhkiAAABA5JREFUWIXtmM9LI2cYxz9KCOlWcOpqjew2zYK1Uy00tLDMoTShFISePOptLwvpf5C7B28rCCVKDwUv8b6H4M01oBEPsXjQ6iFx3RqruA4eHAkl3x6aGYyZSWLZFgr9wsv78j7zfvLM+zzvj0mPJPEPqNevs1KpsL+/3xWgWCxi23arQXfkOI7i8bgsy7prapHjOAI0PT3dYmsBp9NpAcrn83IcR3t7e77Qzc1NSVImkxGgXC4XDC6VSk0epFIpGYbRAnWfm5ub894wGo3KcRx/8NzcnADt7e0pm80KUCaTkSTNzs5qcnJShUJBkmRZliKRiMrlsubn5wWoVCr5g6empjwP3bbjOJqZmRHglZWVFW1ubgrQ/Py8185ms/5g0zS9oN1u9/X1KQz6qQGenJz0ApdOp5varprSLRqNcnp6CoBhGF4axWIxasAPjefGxsY8m2EY3pjh4WH/PE4kElQqFWzbxrIs9vf3WVtbY2lpiXA4zB/AxMQECwsLLC4uApBMJtnZ2fHG++ZxLpfz5q1arcowDJmmKUlKJpMCVCgUVC6XFYlElEqlvHgAqlar/nPsOI5M0/Sinc/nvay4Db68vFQ6nVa5XPacuT2/LWBJXoSnpqaa+m+DbzsSjUYVj8ebcrgleACWZZHNZjFNs3X9+yiRSJDL5YhEIs2Gux4Hyc/jdvLd3d6F/gf/h8Ed0y2fzyuVSnlb5sjIiKanpwNPFldtwevr6wqFQvpwaEifPX4sQNb4uAD19/e3rLauwe7m8olh6EdQBPQr6NHAgAAtLy8Hjm07x0dHRwAc2jazQ0NYiQRfhMP89vYtANvb24Fj24KPj48JAT8D5vk57OyQqtV40bDv7u7+veCFw2ENguRTekCjo6P3nwrbtqnVanwUYH/Q00O1Wr3/VGxsbADwcYD9Awnn+vr+4EKhAMBXAfY4UJc4ODi4H9i9FH4ZYP+0UW9tbd0P7HryfYDd/UF3yroGn52dEQ4yAt816sDrbmC69PZqJCDVbqdcLBbrPt1s26ZerxNt4zHAA+Di4sLX5gteXV0FoNM5/RC4Dkg5X7B7ZRrvAI4Bknj98iXUap3BpVIJgFQH8OeNevfFCwg3h9oXfHx8DMDXHcDu4lktFuHmpjP45OSkbaq5+qZRl25uoFjsDL66uuJhF+AxoAd4DfDqVXvw0dER9Xo9cPO5q/eBc4A3b9qDi41XetIleAC4AXj+vKk/dPfBw8NDoHOquXoCfPvsGTx92my4uxRXVlb+Oo07LGe3PDKMppu8K9+9wjAMAUqCKgHAX0Cjjc8KP/mCK5WK+vr6vEuK0XiDZKO81+hPJBJBe1j7e0Umk9Hg4KBCoVDTB2Rvb6/G43H9XqkEju2R/sX/K96F/gTllaEEcp1NCgAAAABJRU5ErkJggg==",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 869.6298990612723,
+ "y": 402.68778079409213
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "97a17094-822f-fc65-78f3-fc5b8aca0b23",
+ "bbox": {
+ "x": 871.8902896484761,
+ "y": 237.60001383886802,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u38",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 871.8902896484761,
+ "y": 237.60001383886802
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "8c9ccb35-a1e8-1772-cbad-6e5f46b95b8a",
+ "bbox": {
+ "x": 868.5711254822504,
+ "y": 279.42148233331346,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u39",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 868.5711254822504,
+ "y": 279.42148233331346
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "e98b25fb-7352-b78a-de16-240d09bda830",
+ "bbox": {
+ "x": 870.562623981986,
+ "y": 315.2684553285524,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u40",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 870.562623981986,
+ "y": 315.2684553285524
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "5678f1a3-0919-aecd-fb70-613a8a55c4d7",
+ "bbox": {
+ "x": 871.8902896484761,
+ "y": 359.0814223227333,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u41",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 871.8902896484761,
+ "y": 359.0814223227333
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "1ebc687b-0b6a-eb35-4ac7-9b6d57a784da",
+ "bbox": {
+ "x": 918.3259027243886,
+ "y": 342.9041536102673,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u42",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 918.3259027243886,
+ "y": 342.9041536102673
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "06fddad6-2abd-3413-6e24-a955f0763c53",
+ "bbox": {
+ "x": 871.2264568152311,
+ "y": 449.36268764407583,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u43",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 871.2264568152311,
+ "y": 449.36268764407583
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "99f5cbe5-2c57-75ff-52b8-99e2baad068b",
+ "bbox": {
+ "x": 918.1656828079734,
+ "y": 444.6994869196927,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u44",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 918.1656828079734,
+ "y": 444.6994869196927
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "30c49899-09d0-818a-a71d-fd15346f65e5",
+ "bbox": {
+ "x": 776.2983616611724,
+ "y": 501.1416486371987,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u45",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 776.2983616611724,
+ "y": 501.1416486371987
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "ed36ef56-dd89-40e1-251c-09f13686eb66",
+ "bbox": {
+ "x": 731.8215618337465,
+ "y": 499.15015013746324,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u46",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 731.8215618337465,
+ "y": 499.15015013746324
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "7078c4e8-4b4c-0563-9938-8af2c753f92c",
+ "bbox": {
+ "x": 690.000093339301,
+ "y": 496.4948188044825,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u47",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 690.000093339301,
+ "y": 496.4948188044825
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "115069e9-e7e3-51e4-da42-481b318e5f1f",
+ "bbox": {
+ "x": 646.4945146902844,
+ "y": 421.97873928869126,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u48",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 646.4945146902844,
+ "y": 421.97873928869126
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "e53126c9-70fe-ca8a-3b85-bab123a93d70",
+ "bbox": {
+ "x": 733.5146893345959,
+ "y": 417.7237632638994,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "a10",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAyCAYAAABYiSsbAAAABHNCSVQICAgIfAhkiAAABA5JREFUWIXtmM9LI2cYxz9KCOlWcOpqjew2zYK1Uy00tLDMoTShFISePOptLwvpf5C7B28rCCVKDwUv8b6H4M01oBEPsXjQ6iFx3RqruA4eHAkl3x6aGYyZSWLZFgr9wsv78j7zfvLM+zzvj0mPJPEPqNevs1KpsL+/3xWgWCxi23arQXfkOI7i8bgsy7prapHjOAI0PT3dYmsBp9NpAcrn83IcR3t7e77Qzc1NSVImkxGgXC4XDC6VSk0epFIpGYbRAnWfm5ub894wGo3KcRx/8NzcnADt7e0pm80KUCaTkSTNzs5qcnJShUJBkmRZliKRiMrlsubn5wWoVCr5g6empjwP3bbjOJqZmRHglZWVFW1ubgrQ/Py8185ms/5g0zS9oN1u9/X1KQz6qQGenJz0ApdOp5varprSLRqNcnp6CoBhGF4axWIxasAPjefGxsY8m2EY3pjh4WH/PE4kElQqFWzbxrIs9vf3WVtbY2lpiXA4zB/AxMQECwsLLC4uApBMJtnZ2fHG++ZxLpfz5q1arcowDJmmKUlKJpMCVCgUVC6XFYlElEqlvHgAqlar/nPsOI5M0/Sinc/nvay4Db68vFQ6nVa5XPacuT2/LWBJXoSnpqaa+m+DbzsSjUYVj8ebcrgleACWZZHNZjFNs3X9+yiRSJDL5YhEIs2Gux4Hyc/jdvLd3d6F/gf/h8Ed0y2fzyuVSnlb5sjIiKanpwNPFldtwevr6wqFQvpwaEifPX4sQNb4uAD19/e3rLauwe7m8olh6EdQBPQr6NHAgAAtLy8Hjm07x0dHRwAc2jazQ0NYiQRfhMP89vYtANvb24Fj24KPj48JAT8D5vk57OyQqtV40bDv7u7+veCFw2ENguRTekCjo6P3nwrbtqnVanwUYH/Q00O1Wr3/VGxsbADwcYD9Awnn+vr+4EKhAMBXAfY4UJc4ODi4H9i9FH4ZYP+0UW9tbd0P7HryfYDd/UF3yroGn52dEQ4yAt816sDrbmC69PZqJCDVbqdcLBbrPt1s26ZerxNt4zHAA+Di4sLX5gteXV0FoNM5/RC4Dkg5X7B7ZRrvAI4Bknj98iXUap3BpVIJgFQH8OeNevfFCwg3h9oXfHx8DMDXHcDu4lktFuHmpjP45OSkbaq5+qZRl25uoFjsDL66uuJhF+AxoAd4DfDqVXvw0dER9Xo9cPO5q/eBc4A3b9qDi41XetIleAC4AXj+vKk/dPfBw8NDoHOquXoCfPvsGTx92my4uxRXVlb+Oo07LGe3PDKMppu8K9+9wjAMAUqCKgHAX0Cjjc8KP/mCK5WK+vr6vEuK0XiDZKO81+hPJBJBe1j7e0Umk9Hg4KBCoVDTB2Rvb6/G43H9XqkEju2R/sX/K96F/gTllaEEcp1NCgAAAABJRU5ErkJggg==",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 733.5146893345959,
+ "y": 417.7237632638994
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "979162a0-08fc-54e2-0ba2-b54b2eb59266",
+ "bbox": {
+ "x": 569.8463505219261,
+ "y": 491.18415613852125,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u49",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 569.8463505219261,
+ "y": 491.18415613852125
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "4ca3044f-9b82-020b-e1cb-bbb45e4b0088",
+ "bbox": {
+ "x": 780.2053717408396,
+ "y": 327.5078684450557,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "a7",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAyCAYAAABYiSsbAAAABHNCSVQICAgIfAhkiAAABA5JREFUWIXtmM9LI2cYxz9KCOlWcOpqjew2zYK1Uy00tLDMoTShFISePOptLwvpf5C7B28rCCVKDwUv8b6H4M01oBEPsXjQ6iFx3RqruA4eHAkl3x6aGYyZSWLZFgr9wsv78j7zfvLM+zzvj0mPJPEPqNevs1KpsL+/3xWgWCxi23arQXfkOI7i8bgsy7prapHjOAI0PT3dYmsBp9NpAcrn83IcR3t7e77Qzc1NSVImkxGgXC4XDC6VSk0epFIpGYbRAnWfm5ub894wGo3KcRx/8NzcnADt7e0pm80KUCaTkSTNzs5qcnJShUJBkmRZliKRiMrlsubn5wWoVCr5g6empjwP3bbjOJqZmRHglZWVFW1ubgrQ/Py8185ms/5g0zS9oN1u9/X1KQz6qQGenJz0ApdOp5varprSLRqNcnp6CoBhGF4axWIxasAPjefGxsY8m2EY3pjh4WH/PE4kElQqFWzbxrIs9vf3WVtbY2lpiXA4zB/AxMQECwsLLC4uApBMJtnZ2fHG++ZxLpfz5q1arcowDJmmKUlKJpMCVCgUVC6XFYlElEqlvHgAqlar/nPsOI5M0/Sinc/nvay4Db68vFQ6nVa5XPacuT2/LWBJXoSnpqaa+m+DbzsSjUYVj8ebcrgleACWZZHNZjFNs3X9+yiRSJDL5YhEIs2Gux4Hyc/jdvLd3d6F/gf/h8Ed0y2fzyuVSnlb5sjIiKanpwNPFldtwevr6wqFQvpwaEifPX4sQNb4uAD19/e3rLauwe7m8olh6EdQBPQr6NHAgAAtLy8Hjm07x0dHRwAc2jazQ0NYiQRfhMP89vYtANvb24Fj24KPj48JAT8D5vk57OyQqtV40bDv7u7+veCFw2ENguRTekCjo6P3nwrbtqnVanwUYH/Q00O1Wr3/VGxsbADwcYD9Awnn+vr+4EKhAMBXAfY4UJc4ODi4H9i9FH4ZYP+0UW9tbd0P7HryfYDd/UF3yroGn52dEQ4yAt816sDrbmC69PZqJCDVbqdcLBbrPt1s26ZerxNt4zHAA+Di4sLX5gteXV0FoNM5/RC4Dkg5X7B7ZRrvAI4Bknj98iXUap3BpVIJgFQH8OeNevfFCwg3h9oXfHx8DMDXHcDu4lktFuHmpjP45OSkbaq5+qZRl25uoFjsDL66uuJhF+AxoAd4DfDqVXvw0dER9Xo9cPO5q/eBc4A3b9qDi41XetIleAC4AXj+vKk/dPfBw8NDoHOquXoCfPvsGTx92my4uxRXVlb+Oo07LGe3PDKMppu8K9+9wjAMAUqCKgHAX0Cjjc8KP/mCK5WK+vr6vEuK0XiDZKO81+hPJBJBe1j7e0Umk9Hg4KBCoVDTB2Rvb6/G43H9XqkEju2R/sX/K96F/gTllaEEcp1NCgAAAABJRU5ErkJggg==",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 780.2053717408396,
+ "y": 327.5078684450557
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "73cc39db-10c0-542a-7d9f-198fa3e0975e",
+ "bbox": {
+ "x": 567.8548520221906,
+ "y": 416.1710459818175,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u50",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 567.8548520221906,
+ "y": 416.1710459818175
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "7c4ed529-4da9-7eed-59fe-4590b57b2dfc",
+ "bbox": {
+ "x": 565.19952068921,
+ "y": 371.0304133211462,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u51",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhGkqRG00RRLBaLW1tbhULhz6GlUikcDvt8vlKpdIotsixzHOfz+aLRKMdxNb1IzdB4PP7x48dkMgnDsCAIMAwjCAJB0PEYSZJEUZQkiSAIv99PEITRaOzo6Kj95rHK5fLMzMzVq1dTqVSlUlleXg4EAjzPV4/JZrPBYHBra0uW5ZWVlXv37r148UL+Vb+4v7q6GovFJiYmTCZTMpl89erV9+/fAQAsywaDwWg0qqzJ8vLys2fPOI5zu92dnZ3pdHp9fb2h+4lEIpfLDQ0NoSg6OzuL43h7e/vKysrs7Oz29rZKpert7b1y5YrVatVoNG/evLl27ZrD4QiHw7FYrL+/vz40nU6XSqXu7m4AwPv376empsxms8/nm56epmlakqTFxUUURScnJz0ez9u3bycmJhRoIpGo5vzLfUmSaJoWBMFisYiimEqlSJJkWTYcDudyOYIgNBrN3t5eMBikadpisUQiEUEQzGYzACCTydR3XxRFAIBKpZJluVKpVG86DMNqtVqWZUEQIAj6x27AMARBKpVKMai+pSiKWiwWDMN2dnbUarXD4chkMkaj8eLFiyqVKpVKZbNZnU7n9XpbWlri8fiFCxcwDItGowCAmpD6ZfetVitBEKFQCABw9+7dQCCwuro6Pj7+6NEjAABJkg8fPrx58+b29rbf779//z5Jkj9//gQAtLW1NYR6PB6LxTI/Py8IwvDw8MDAgMlk0uv1Ho8HAKDT6VwuF0EQWq328uXLbrebpulQKKTT6Xp6ehpC29ranE4ny7Jfv37V6/VjY2NutxtBELVarawPhmEajcblck1OTmq12g8fPqAo2tPTY7Va628UAECr1Xq93kKhMD8/7/V6Ozo6IAgqFovVY5qampqamkRRpGn6y5cv4+Pjly5dUrarPhQA4HA4SJKcm5sDAEiSVDP6WJVKZX9/f2hoaHBwsLm5uaa3FqrYcuvWLRRFq/NIjTAM6+zsbGtrQ5A6hDpNSlQ2wilSIrSRH3/r4+T/0P9QdUKqWolEYmVl5fPnzwCAQqHw6dMnFEU9Ho/dbj9llurx48eN+gKBwLt3716/fu33+w8PDyuVSjabjcVihUKBJMmTP9KZLJ2bm5ueno5GoxRFoSh67tw5mqZ9Pt/a2hrDML29vQ1nyg3Ecdz169chCDp//vyDBw+8Xu/MzMyTJ0+GhoYwDBsdHVVO/7pzG1q6vb1dKBRQFCUIwuVy3blzR6VSlUolHMd5ns/n8zRNkyRZNz80hG5ububzeavVajKZNjc3fT6fSqVqaWkBAKjVap7nf/786fF4MAz7bWhTU9PAwMDIyEgmk4EgiKIoDMPW19d5no/H406n8/egOzs7xWLRbrc7nc7h4WGNRiOKIsdx4XDYYDCwLBuPxyuVSt25DYM/lUqVy2WKooxGY3U7RVEmk4njuFgs9tvQo6MjjuMoilLKhWMZjUar1crzfDQa/W1osVisVCqKXdXtNputvb2d5/mdnZ1G0DprKklSpVLheR6GYYIgcByv7jWbzXa7XRCERCLxG5byPB8Oh3me1+v1er2+5hRSq9U4jsuynMvllNrrTFCGYRYXF3meVyqJ2gkwjGGYEqrpdPpkbV4fWi6X19bWeJ43GAwEQZwcgGEYSZIAgGQyyTDMmaAcx4VCIaVMpCjq5ACNRmMwGMA/Y/lMUEEQdnd3RVE0m80n3QcAEATR2toKANjb22NZ9qzQdDqtQOtaSpKkUuYlEomzui+KYi6XkySp0ZpSFNXV1aVYWi6X/xyq/OAsyyIIYjAYaoJUkV6vdzgcAIDd3d1sNsuybE3A1kIZhtnf35dlmSRJkiTrJiFlo2AYPjg4SKfTJ7m10IODA+VSZDKZGlVUx6EqiuLR0dHBwUEul2MYRkn7daD5fD4WiwEAbDabRqOpC1W4FEXBMKxYyvN8oVAolUr1oblcLhKJAACam5tPgaIoarPZVCpVJpOhaRoAIAiCsr11oMViMZlMAgDsdrtWq20ERRCkBirLMs/zgiBIklQLLZfLh4eHivunQNVqdVdXF4Ig2WxWgSqqD+U4TnkXUC6gjaAajaavrw9F0aOjo2po/TWVJEnJZhaL5ZR6GsMwh8OBIMjh4WE+nz9uV66BtVAURZWAZxhGuVieLo7jqlOqclOohR7/gjMzMxsbG3XzBcuyoVDo+fPnNE27XC4lD8AwjOO4cqOtPU66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 565.19952068921,
+ "y": 371.0304133211462
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "039bc70a-1d3c-4274-f0fa-dbf75aede9b7",
+ "bbox": {
+ "x": 563.2080221894744,
+ "y": 319.91528516126857,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u52",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhGkqRG00RRLBaLW1tbhULhz6GlUikcDvt8vlKpdIotsixzHOfz+aLRKMdxNb1IzdB4PP7x48dkMgnDsCAIMAwjCAJB0PEYSZJEUZQkiSAIv99PEITRaOzo6Kj95rHK5fLMzMzVq1dTqVSlUlleXg4EAjzPV4/JZrPBYHBra0uW5ZWVlXv37r148UL+Vb+4v7q6GovFJiYmTCZTMpl89erV9+/fAQAsywaDwWg0qqzJ8vLys2fPOI5zu92dnZ3pdHp9fb2h+4lEIpfLDQ0NoSg6OzuL43h7e/vKysrs7Oz29rZKpert7b1y5YrVatVoNG/evLl27ZrD4QiHw7FYrL+/vz40nU6XSqXu7m4AwPv376empsxms8/nm56epmlakqTFxUUURScnJz0ez9u3bycmJhRoIpGo5vzLfUmSaJoWBMFisYiimEqlSJJkWTYcDudyOYIgNBrN3t5eMBikadpisUQiEUEQzGYzACCTydR3XxRFAIBKpZJluVKpVG86DMNqtVqWZUEQIAj6x27AMARBKpVKMai+pSiKWiwWDMN2dnbUarXD4chkMkaj8eLFiyqVKpVKZbNZnU7n9XpbWlri8fiFCxcwDItGowCAmpD6ZfetVitBEKFQCABw9+7dQCCwuro6Pj7+6NEjAABJkg8fPrx58+b29rbf779//z5Jkj9//gQAtLW1NYR6PB6LxTI/Py8IwvDw8MDAgMlk0uv1Ho8HAKDT6VwuF0EQWq328uXLbrebpulQKKTT6Xp6ehpC29ranE4ny7Jfv37V6/VjY2NutxtBELVarawPhmEajcblck1OTmq12g8fPqAo2tPTY7Va628UAECr1Xq93kKhMD8/7/V6Ozo6IAgqFovVY5qampqamkRRpGn6y5cv4+Pjly5dUrarPhQA4HA4SJKcm5sDAEiSVDP6WJVKZX9/f2hoaHBwsLm5uaa3FqrYcuvWLRRFq/NIjTAM6+zsbGtrQ5A6hDpNSlQ2wilSIrSRH3/r4+T/0P9QdUKqWolEYmVl5fPnzwCAQqHw6dMnFEU9Ho/dbj9llurx48eN+gKBwLt3716/fu33+w8PDyuVSjabjcVihUKBJMmTP9KZLJ2bm5ueno5GoxRFoSh67tw5mqZ9Pt/a2hrDML29vQ1nyg3Ecdz169chCDp//vyDBw+8Xu/MzMyTJ0+GhoYwDBsdHVVO/7pzG1q6vb1dKBRQFCUIwuVy3blzR6VSlUolHMd5ns/n8zRNkyRZNz80hG5ububzeavVajKZNjc3fT6fSqVqaWkBAKjVap7nf/786fF4MAz7bWhTU9PAwMDIyEgmk4EgiKIoDMPW19d5no/H406n8/egOzs7xWLRbrc7nc7h4WGNRiOKIsdx4XDYYDCwLBuPxyuVSt25DYM/lUqVy2WKooxGY3U7RVEmk4njuFgs9tvQo6MjjuMoilLKhWMZjUar1crzfDQa/W1osVisVCqKXdXtNputvb2d5/mdnZ1G0DprKklSpVLheR6GYYIgcByv7jWbzXa7XRCERCLxG5byPB8Oh3me1+v1er2+5hRSq9U4jsuynMvllNrrTFCGYRYXF3meVyqJ2gkwjGGYEqrpdPpkbV4fWi6X19bWeJ43GAwEQZwcgGEYSZIAgGQyyTDMmaAcx4VCIaVMpCjq5ACNRmMwGMA/Y/lMUEEQdnd3RVE0m80n3QcAEATR2toKANjb22NZ9qzQdDqtQOtaSpKkUuYlEomzui+KYi6XkySp0ZpSFNXV1aVYWi6X/xyq/OAsyyIIYjAYaoJUkV6vdzgcAIDd3d1sNsuybE3A1kIZhtnf35dlmSRJkiTrJiFlo2AYPjg4SKfTJ7m10IODA+VSZDKZGlVUx6EqiuLR0dHBwUEul2MYRkn7daD5fD4WiwEAbDabRqOpC1W4FEXBMKxYyvN8oVAolUr1oblcLhKJAACam5tPgaIoarPZVCpVJpOhaRoAIAiCsr11oMViMZlMAgDsdrtWq20ERRCkBirLMs/zgiBIklQLLZfLh4eHivunQNVqdVdXF4Ig2WxWgSqqD+U4TnkXUC6gjaAajaavrw9F0aOjo2po/TWVJEnJZhaL5ZR6GsMwh8OBIMjh4WE+nz9uV66BtVAURZWAZxhGuVieLo7jqlOqclOohR7/gjMzMxsbG3XzBcuyoVDo+fPnNE27XC4lD8AwjOO4cqOtPU66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 563.2080221894744,
+ "y": 319.91528516126857
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "fb9ad239-d112-d0f9-ed9e-90db5f147e54",
+ "bbox": {
+ "x": 563.8718550227195,
+ "y": 282.7406464995393,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u53",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 563.8718550227195,
+ "y": 282.7406464995393
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "3c910e69-2f8b-7beb-159c-da99ed4f6907",
+ "bbox": {
+ "x": 557.2335266902679,
+ "y": 246.89367350430035,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u54",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhGkqRG00RRLBaLW1tbhULhz6GlUikcDvt8vlKpdIotsixzHOfz+aLRKMdxNb1IzdB4PP7x48dkMgnDsCAIMAwjCAJB0PEYSZJEUZQkiSAIv99PEITRaOzo6Kj95rHK5fLMzMzVq1dTqVSlUlleXg4EAjzPV4/JZrPBYHBra0uW5ZWVlXv37r148UL+Vb+4v7q6GovFJiYmTCZTMpl89erV9+/fAQAsywaDwWg0qqzJ8vLys2fPOI5zu92dnZ3pdHp9fb2h+4lEIpfLDQ0NoSg6OzuL43h7e/vKysrs7Oz29rZKpert7b1y5YrVatVoNG/evLl27ZrD4QiHw7FYrL+/vz40nU6XSqXu7m4AwPv376empsxms8/nm56epmlakqTFxUUURScnJz0ez9u3bycmJhRoIpGo5vzLfUmSaJoWBMFisYiimEqlSJJkWTYcDudyOYIgNBrN3t5eMBikadpisUQiEUEQzGYzACCTydR3XxRFAIBKpZJluVKpVG86DMNqtVqWZUEQIAj6x27AMARBKpVKMai+pSiKWiwWDMN2dnbUarXD4chkMkaj8eLFiyqVKpVKZbNZnU7n9XpbWlri8fiFCxcwDItGowCAmpD6ZfetVitBEKFQCABw9+7dQCCwuro6Pj7+6NEjAABJkg8fPrx58+b29rbf779//z5Jkj9//gQAtLW1NYR6PB6LxTI/Py8IwvDw8MDAgMlk0uv1Ho8HAKDT6VwuF0EQWq328uXLbrebpulQKKTT6Xp6ehpC29ranE4ny7Jfv37V6/VjY2NutxtBELVarawPhmEajcblck1OTmq12g8fPqAo2tPTY7Va628UAECr1Xq93kKhMD8/7/V6Ozo6IAgqFovVY5qampqamkRRpGn6y5cv4+Pjly5dUrarPhQA4HA4SJKcm5sDAEiSVDP6WJVKZX9/f2hoaHBwsLm5uaa3FqrYcuvWLRRFq/NIjTAM6+zsbGtrQ5A6hDpNSlQ2wilSIrSRH3/r4+T/0P9QdUKqWolEYmVl5fPnzwCAQqHw6dMnFEU9Ho/dbj9llurx48eN+gKBwLt3716/fu33+w8PDyuVSjabjcVihUKBJMmTP9KZLJ2bm5ueno5GoxRFoSh67tw5mqZ9Pt/a2hrDML29vQ1nyg3Ecdz169chCDp//vyDBw+8Xu/MzMyTJ0+GhoYwDBsdHVVO/7pzG1q6vb1dKBRQFCUIwuVy3blzR6VSlUolHMd5ns/n8zRNkyRZNz80hG5ububzeavVajKZNjc3fT6fSqVqaWkBAKjVap7nf/786fF4MAz7bWhTU9PAwMDIyEgmk4EgiKIoDMPW19d5no/H406n8/egOzs7xWLRbrc7nc7h4WGNRiOKIsdx4XDYYDCwLBuPxyuVSt25DYM/lUqVy2WKooxGY3U7RVEmk4njuFgs9tvQo6MjjuMoilLKhWMZjUar1crzfDQa/W1osVisVCqKXdXtNputvb2d5/mdnZ1G0DprKklSpVLheR6GYYIgcByv7jWbzXa7XRCERCLxG5byPB8Oh3me1+v1er2+5hRSq9U4jsuynMvllNrrTFCGYRYXF3meVyqJ2gkwjGGYEqrpdPpkbV4fWi6X19bWeJ43GAwEQZwcgGEYSZIAgGQyyTDMmaAcx4VCIaVMpCjq5ACNRmMwGMA/Y/lMUEEQdnd3RVE0m80n3QcAEATR2toKANjb22NZ9qzQdDqtQOtaSpKkUuYlEomzui+KYi6XkySp0ZpSFNXV1aVYWi6X/xyq/OAsyyIIYjAYaoJUkV6vdzgcAIDd3d1sNsuybE3A1kIZhtnf35dlmSRJkiTrJiFlo2AYPjg4SKfTJ7m10IODA+VSZDKZGlVUx6EqiuLR0dHBwUEul2MYRkn7daD5fD4WiwEAbDabRqOpC1W4FEXBMKxYyvN8oVAolUr1oblcLhKJAACam5tPgaIoarPZVCpVJpOhaRoAIAiCsr11oMViMZlMAgDsdrtWq20ERRCkBirLMs/zgiBIklQLLZfLh4eHivunQNVqdVdXF4Ig2WxWgSqqD+U4TnkXUC6gjaAajaavrw9F0aOjo2po/TWVJEnJZhaL5ZR6GsMwh8OBIMjh4WE+nz9uV66BtVAURZWAZxhGuVieLo7jqlOqclOohR7/gjMzMxsbG3XzBcuyoVDo+fPnNE27XC4lD8AwjOO4cqOtPU66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 557.2335266902679,
+ "y": 246.89367350430035
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "0998ddcc-de7b-792a-5b2e-c53317128a7c",
+ "bbox": {
+ "x": 565.19952068921,
+ "y": 193.12321401144197,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u55",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhGkqRG00RRLBaLW1tbhULhz6GlUikcDvt8vlKpdIotsixzHOfz+aLRKMdxNb1IzdB4PP7x48dkMgnDsCAIMAwjCAJB0PEYSZJEUZQkiSAIv99PEITRaOzo6Kj95rHK5fLMzMzVq1dTqVSlUlleXg4EAjzPV4/JZrPBYHBra0uW5ZWVlXv37r148UL+Vb+4v7q6GovFJiYmTCZTMpl89erV9+/fAQAsywaDwWg0qqzJ8vLys2fPOI5zu92dnZ3pdHp9fb2h+4lEIpfLDQ0NoSg6OzuL43h7e/vKysrs7Oz29rZKpert7b1y5YrVatVoNG/evLl27ZrD4QiHw7FYrL+/vz40nU6XSqXu7m4AwPv376empsxms8/nm56epmlakqTFxUUURScnJz0ez9u3bycmJhRoIpGo5vzLfUmSaJoWBMFisYiimEqlSJJkWTYcDudyOYIgNBrN3t5eMBikadpisUQiEUEQzGYzACCTydR3XxRFAIBKpZJluVKpVG86DMNqtVqWZUEQIAj6x27AMARBKpVKMai+pSiKWiwWDMN2dnbUarXD4chkMkaj8eLFiyqVKpVKZbNZnU7n9XpbWlri8fiFCxcwDItGowCAmpD6ZfetVitBEKFQCABw9+7dQCCwuro6Pj7+6NEjAABJkg8fPrx58+b29rbf779//z5Jkj9//gQAtLW1NYR6PB6LxTI/Py8IwvDw8MDAgMlk0uv1Ho8HAKDT6VwuF0EQWq328uXLbrebpulQKKTT6Xp6ehpC29ranE4ny7Jfv37V6/VjY2NutxtBELVarawPhmEajcblck1OTmq12g8fPqAo2tPTY7Va628UAECr1Xq93kKhMD8/7/V6Ozo6IAgqFovVY5qampqamkRRpGn6y5cv4+Pjly5dUrarPhQA4HA4SJKcm5sDAEiSVDP6WJVKZX9/f2hoaHBwsLm5uaa3FqrYcuvWLRRFq/NIjTAM6+zsbGtrQ5A6hDpNSlQ2wilSIrSRH3/r4+T/0P9QdUKqWolEYmVl5fPnzwCAQqHw6dMnFEU9Ho/dbj9llurx48eN+gKBwLt3716/fu33+w8PDyuVSjabjcVihUKBJMmTP9KZLJ2bm5ueno5GoxRFoSh67tw5mqZ9Pt/a2hrDML29vQ1nyg3Ecdz169chCDp//vyDBw+8Xu/MzMyTJ0+GhoYwDBsdHVVO/7pzG1q6vb1dKBRQFCUIwuVy3blzR6VSlUolHMd5ns/n8zRNkyRZNz80hG5ububzeavVajKZNjc3fT6fSqVqaWkBAKjVap7nf/786fF4MAz7bWhTU9PAwMDIyEgmk4EgiKIoDMPW19d5no/H406n8/egOzs7xWLRbrc7nc7h4WGNRiOKIsdx4XDYYDCwLBuPxyuVSt25DYM/lUqVy2WKooxGY3U7RVEmk4njuFgs9tvQo6MjjuMoilLKhWMZjUar1crzfDQa/W1osVisVCqKXdXtNputvb2d5/mdnZ1G0DprKklSpVLheR6GYYIgcByv7jWbzXa7XRCERCLxG5byPB8Oh3me1+v1er2+5hRSq9U4jsuynMvllNrrTFCGYRYXF3meVyqJ2gkwjGGYEqrpdPpkbV4fWi6X19bWeJ43GAwEQZwcgGEYSZIAgGQyyTDMmaAcx4VCIaVMpCjq5ACNRmMwGMA/Y/lMUEEQdnd3RVE0m80n3QcAEATR2toKANjb22NZ9qzQdDqtQOtaSpKkUuYlEomzui+KYi6XkySp0ZpSFNXV1aVYWi6X/xyq/OAsyyIIYjAYaoJUkV6vdzgcAIDd3d1sNsuybE3A1kIZhtnf35dlmSRJkiTrJiFlo2AYPjg4SKfTJ7m10IODA+VSZDKZGlVUx6EqiuLR0dHBwUEul2MYRkn7daD5fD4WiwEAbDabRqOpC1W4FEXBMKxYyvN8oVAolUr1oblcLhKJAACam5tPgaIoarPZVCpVJpOhaRoAIAiCsr11oMViMZlMAgDsdrtWq20ERRCkBirLMs/zgiBIklQLLZfLh4eHivunQNVqdVdXF4Ig2WxWgSqqD+U4TnkXUC6gjaAajaavrw9F0aOjo2po/TWVJEnJZhaL5ZR6GsMwh8OBIMjh4WE+nz9uV66BtVAURZWAZxhGuVieLo7jqlOqclOohR7/gjMzMxsbG3XzBcuyoVDo+fPnNE27XC4lD8AwjOO4cqOtPU66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 565.19952068921,
+ "y": 193.12321401144197
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "b51264f6-8497-2eff-8d96-1264b5650804",
+ "bbox": {
+ "x": 524.8916916534773,
+ "y": 432.64343313504395,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u56",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 524.8916916534773,
+ "y": 432.64343313504395
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "bc0420e3-9b6e-4c97-74c6-61278dbc18d4",
+ "bbox": {
+ "x": 737.4715268266505,
+ "y": 237.29197362621204,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "a4",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAyCAYAAABYiSsbAAAABHNCSVQICAgIfAhkiAAABA5JREFUWIXtmM9LI2cYxz9KCOlWcOpqjew2zYK1Uy00tLDMoTShFISePOptLwvpf5C7B28rCCVKDwUv8b6H4M01oBEPsXjQ6iFx3RqruA4eHAkl3x6aGYyZSWLZFgr9wsv78j7zfvLM+zzvj0mPJPEPqNevs1KpsL+/3xWgWCxi23arQXfkOI7i8bgsy7prapHjOAI0PT3dYmsBp9NpAcrn83IcR3t7e77Qzc1NSVImkxGgXC4XDC6VSk0epFIpGYbRAnWfm5ub894wGo3KcRx/8NzcnADt7e0pm80KUCaTkSTNzs5qcnJShUJBkmRZliKRiMrlsubn5wWoVCr5g6empjwP3bbjOJqZmRHglZWVFW1ubgrQ/Py8185ms/5g0zS9oN1u9/X1KQz6qQGenJz0ApdOp5varprSLRqNcnp6CoBhGF4axWIxasAPjefGxsY8m2EY3pjh4WH/PE4kElQqFWzbxrIs9vf3WVtbY2lpiXA4zB/AxMQECwsLLC4uApBMJtnZ2fHG++ZxLpfz5q1arcowDJmmKUlKJpMCVCgUVC6XFYlElEqlvHgAqlar/nPsOI5M0/Sinc/nvay4Db68vFQ6nVa5XPacuT2/LWBJXoSnpqaa+m+DbzsSjUYVj8ebcrgleACWZZHNZjFNs3X9+yiRSJDL5YhEIs2Gux4Hyc/jdvLd3d6F/gf/h8Ed0y2fzyuVSnlb5sjIiKanpwNPFldtwevr6wqFQvpwaEifPX4sQNb4uAD19/e3rLauwe7m8olh6EdQBPQr6NHAgAAtLy8Hjm07x0dHRwAc2jazQ0NYiQRfhMP89vYtANvb24Fj24KPj48JAT8D5vk57OyQqtV40bDv7u7+veCFw2ENguRTekCjo6P3nwrbtqnVanwUYH/Q00O1Wr3/VGxsbADwcYD9Awnn+vr+4EKhAMBXAfY4UJc4ODi4H9i9FH4ZYP+0UW9tbd0P7HryfYDd/UF3yroGn52dEQ4yAt816sDrbmC69PZqJCDVbqdcLBbrPt1s26ZerxNt4zHAA+Di4sLX5gteXV0FoNM5/RC4Dkg5X7B7ZRrvAI4Bknj98iXUap3BpVIJgFQH8OeNevfFCwg3h9oXfHx8DMDXHcDu4lktFuHmpjP45OSkbaq5+qZRl25uoFjsDL66uuJhF+AxoAd4DfDqVXvw0dER9Xo9cPO5q/eBc4A3b9qDi41XetIleAC4AXj+vKk/dPfBw8NDoHOquXoCfPvsGTx92my4uxRXVlb+Oo07LGe3PDKMppu8K9+9wjAMAUqCKgHAX0Cjjc8KP/mCK5WK+vr6vEuK0XiDZKO81+hPJBJBe1j7e0Umk9Hg4KBCoVDTB2Rvb6/G43H9XqkEju2R/sX/K96F/gTllaEEcp1NCgAAAABJRU5ErkJggg==",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 737.4715268266505,
+ "y": 237.29197362621204
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "f6ded9c4-6e94-ee99-6d4e-aebba05882db",
+ "bbox": {
+ "x": 513.3252115266342,
+ "y": 268.0435236376609,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u57",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 513.3252115266342,
+ "y": 268.0435236376609
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "3b233452-0a1c-6c51-703a-b62ca9951f2b",
+ "bbox": {
+ "x": 603.1878648198002,
+ "y": 156.82736857186146,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u58",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 603.1878648198002,
+ "y": 156.82736857186146
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "8e47cd39-5258-1c70-06ab-96f28782e065",
+ "bbox": {
+ "x": 680.5943087455965,
+ "y": 151.4889931287031,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u59",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 680.5943087455965,
+ "y": 151.4889931287031
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "a97f8f48-6652-7e09-8eda-2d87eae7d20b",
+ "bbox": {
+ "x": 826.8960541470833,
+ "y": 210.3854786802411,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "a3",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAyCAYAAABYiSsbAAAABHNCSVQICAgIfAhkiAAABA5JREFUWIXtmM9LI2cYxz9KCOlWcOpqjew2zYK1Uy00tLDMoTShFISePOptLwvpf5C7B28rCCVKDwUv8b6H4M01oBEPsXjQ6iFx3RqruA4eHAkl3x6aGYyZSWLZFgr9wsv78j7zfvLM+zzvj0mPJPEPqNevs1KpsL+/3xWgWCxi23arQXfkOI7i8bgsy7prapHjOAI0PT3dYmsBp9NpAcrn83IcR3t7e77Qzc1NSVImkxGgXC4XDC6VSk0epFIpGYbRAnWfm5ub894wGo3KcRx/8NzcnADt7e0pm80KUCaTkSTNzs5qcnJShUJBkmRZliKRiMrlsubn5wWoVCr5g6empjwP3bbjOJqZmRHglZWVFW1ubgrQ/Py8185ms/5g0zS9oN1u9/X1KQz6qQGenJz0ApdOp5varprSLRqNcnp6CoBhGF4axWIxasAPjefGxsY8m2EY3pjh4WH/PE4kElQqFWzbxrIs9vf3WVtbY2lpiXA4zB/AxMQECwsLLC4uApBMJtnZ2fHG++ZxLpfz5q1arcowDJmmKUlKJpMCVCgUVC6XFYlElEqlvHgAqlar/nPsOI5M0/Sinc/nvay4Db68vFQ6nVa5XPacuT2/LWBJXoSnpqaa+m+DbzsSjUYVj8ebcrgleACWZZHNZjFNs3X9+yiRSJDL5YhEIs2Gux4Hyc/jdvLd3d6F/gf/h8Ed0y2fzyuVSnlb5sjIiKanpwNPFldtwevr6wqFQvpwaEifPX4sQNb4uAD19/e3rLauwe7m8olh6EdQBPQr6NHAgAAtLy8Hjm07x0dHRwAc2jazQ0NYiQRfhMP89vYtANvb24Fj24KPj48JAT8D5vk57OyQqtV40bDv7u7+veCFw2ENguRTekCjo6P3nwrbtqnVanwUYH/Q00O1Wr3/VGxsbADwcYD9Awnn+vr+4EKhAMBXAfY4UJc4ODi4H9i9FH4ZYP+0UW9tbd0P7HryfYDd/UF3yroGn52dEQ4yAt816sDrbmC69PZqJCDVbqdcLBbrPt1s26ZerxNt4zHAA+Di4sLX5gteXV0FoNM5/RC4Dkg5X7B7ZRrvAI4Bknj98iXUap3BpVIJgFQH8OeNevfFCwg3h9oXfHx8DMDXHcDu4lktFuHmpjP45OSkbaq5+qZRl25uoFjsDL66uuJhF+AxoAd4DfDqVXvw0dER9Xo9cPO5q/eBc4A3b9qDi41XetIleAC4AXj+vKk/dPfBw8NDoHOquXoCfPvsGTx92my4uxRXVlb+Oo07LGe3PDKMppu8K9+9wjAMAUqCKgHAX0Cjjc8KP/mCK5WK+vr6vEuK0XiDZKO81+hPJBJBe1j7e0Umk9Hg4KBCoVDTB2Rvb6/G43H9XqkEju2R/sX/K96F/gTllaEEcp1NCgAAAABJRU5ErkJggg==",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 826.8960541470833,
+ "y": 210.3854786802411
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "7b23c6ae-4256-a918-0c9b-0254d83a908b",
+ "bbox": {
+ "x": 782.0234421656056,
+ "y": 162.16574401501987,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u60",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 782.0234421656056,
+ "y": 162.16574401501987
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "3f913ee3-7737-5405-968d-312653a7c318",
+ "bbox": {
+ "x": 847.8634059645589,
+ "y": 177.29114110396856,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u61",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 847.8634059645589,
+ "y": 177.29114110396856
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "9190744c-1571-616b-e75e-1c00d977a78d",
+ "bbox": {
+ "x": 816.7228825461351,
+ "y": 548.3082344034754,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u62",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 816.7228825461351,
+ "y": 548.3082344034754
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "aed099f2-5b0a-d59c-c297-9bac5ded0736",
+ "bbox": {
+ "x": 740.2061678608651,
+ "y": 545.6390466818962,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u63",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 740.2061678608651,
+ "y": 545.6390466818962
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "d9eeb201-2c9a-5afb-82a7-bc583b0f6628",
+ "bbox": {
+ "x": 686.8224134292814,
+ "y": 548.3082344034754,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u64",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 686.8224134292814,
+ "y": 548.3082344034754
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "67ff3c4c-e646-5c50-0e37-16e9a39da28a",
+ "bbox": {
+ "x": 611.1954279845379,
+ "y": 543.8595882008434,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "u65",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,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",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 611.1954279845379,
+ "y": 543.8595882008434
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "889eedb3-8cb8-b906-8beb-904cd499c4f6",
+ "bbox": {
+ "x": 653.5865719950941,
+ "y": 498.4432481018122,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "a13",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAyCAYAAABYiSsbAAAABHNCSVQICAgIfAhkiAAABA5JREFUWIXtmM9LI2cYxz9KCOlWcOpqjew2zYK1Uy00tLDMoTShFISePOptLwvpf5C7B28rCCVKDwUv8b6H4M01oBEPsXjQ6iFx3RqruA4eHAkl3x6aGYyZSWLZFgr9wsv78j7zfvLM+zzvj0mPJPEPqNevs1KpsL+/3xWgWCxi23arQXfkOI7i8bgsy7prapHjOAI0PT3dYmsBp9NpAcrn83IcR3t7e77Qzc1NSVImkxGgXC4XDC6VSk0epFIpGYbRAnWfm5ub894wGo3KcRx/8NzcnADt7e0pm80KUCaTkSTNzs5qcnJShUJBkmRZliKRiMrlsubn5wWoVCr5g6empjwP3bbjOJqZmRHglZWVFW1ubgrQ/Py8185ms/5g0zS9oN1u9/X1KQz6qQGenJz0ApdOp5varprSLRqNcnp6CoBhGF4axWIxasAPjefGxsY8m2EY3pjh4WH/PE4kElQqFWzbxrIs9vf3WVtbY2lpiXA4zB/AxMQECwsLLC4uApBMJtnZ2fHG++ZxLpfz5q1arcowDJmmKUlKJpMCVCgUVC6XFYlElEqlvHgAqlar/nPsOI5M0/Sinc/nvay4Db68vFQ6nVa5XPacuT2/LWBJXoSnpqaa+m+DbzsSjUYVj8ebcrgleACWZZHNZjFNs3X9+yiRSJDL5YhEIs2Gux4Hyc/jdvLd3d6F/gf/h8Ed0y2fzyuVSnlb5sjIiKanpwNPFldtwevr6wqFQvpwaEifPX4sQNb4uAD19/e3rLauwe7m8olh6EdQBPQr6NHAgAAtLy8Hjm07x0dHRwAc2jazQ0NYiQRfhMP89vYtANvb24Fj24KPj48JAT8D5vk57OyQqtV40bDv7u7+veCFw2ENguRTekCjo6P3nwrbtqnVanwUYH/Q00O1Wr3/VGxsbADwcYD9Awnn+vr+4EKhAMBXAfY4UJc4ODi4H9i9FH4ZYP+0UW9tbd0P7HryfYDd/UF3yroGn52dEQ4yAt816sDrbmC69PZqJCDVbqdcLBbrPt1s26ZerxNt4zHAA+Di4sLX5gteXV0FoNM5/RC4Dkg5X7B7ZRrvAI4Bknj98iXUap3BpVIJgFQH8OeNevfFCwg3h9oXfHx8DMDXHcDu4lktFuHmpjP45OSkbaq5+qZRl25uoFjsDL66uuJhF+AxoAd4DfDqVXvw0dER9Xo9cPO5q/eBc4A3b9qDi41XetIleAC4AXj+vKk/dPfBw8NDoHOquXoCfPvsGTx92my4uxRXVlb+Oo07LGe3PDKMppu8K9+9wjAMAUqCKgHAX0Cjjc8KP/mCK5WK+vr6vEuK0XiDZKO81+hPJBJBe1j7e0Umk9Hg4KBCoVDTB2Rvb6/G43H9XqkEju2R/sX/K96F/gTllaEEcp1NCgAAAABJRU5ErkJggg==",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 653.5865719950941,
+ "y": 498.4432481018122
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "bd77a77c-4627-ad77-1c5a-2c390ba21959",
+ "bbox": {
+ "x": 515.097259773185,
+ "y": 349.6661584005612,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "a8",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAyCAYAAABYiSsbAAAABHNCSVQICAgIfAhkiAAABA5JREFUWIXtmM9LI2cYxz9KCOlWcOpqjew2zYK1Uy00tLDMoTShFISePOptLwvpf5C7B28rCCVKDwUv8b6H4M01oBEPsXjQ6iFx3RqruA4eHAkl3x6aGYyZSWLZFgr9wsv78j7zfvLM+zzvj0mPJPEPqNevs1KpsL+/3xWgWCxi23arQXfkOI7i8bgsy7prapHjOAI0PT3dYmsBp9NpAcrn83IcR3t7e77Qzc1NSVImkxGgXC4XDC6VSk0epFIpGYbRAnWfm5ub894wGo3KcRx/8NzcnADt7e0pm80KUCaTkSTNzs5qcnJShUJBkmRZliKRiMrlsubn5wWoVCr5g6empjwP3bbjOJqZmRHglZWVFW1ubgrQ/Py8185ms/5g0zS9oN1u9/X1KQz6qQGenJz0ApdOp5varprSLRqNcnp6CoBhGF4axWIxasAPjefGxsY8m2EY3pjh4WH/PE4kElQqFWzbxrIs9vf3WVtbY2lpiXA4zB/AxMQECwsLLC4uApBMJtnZ2fHG++ZxLpfz5q1arcowDJmmKUlKJpMCVCgUVC6XFYlElEqlvHgAqlar/nPsOI5M0/Sinc/nvay4Db68vFQ6nVa5XPacuT2/LWBJXoSnpqaa+m+DbzsSjUYVj8ebcrgleACWZZHNZjFNs3X9+yiRSJDL5YhEIs2Gux4Hyc/jdvLd3d6F/gf/h8Ed0y2fzyuVSnlb5sjIiKanpwNPFldtwevr6wqFQvpwaEifPX4sQNb4uAD19/e3rLauwe7m8olh6EdQBPQr6NHAgAAtLy8Hjm07x0dHRwAc2jazQ0NYiQRfhMP89vYtANvb24Fj24KPj48JAT8D5vk57OyQqtV40bDv7u7+veCFw2ENguRTekCjo6P3nwrbtqnVanwUYH/Q00O1Wr3/VGxsbADwcYD9Awnn+vr+4EKhAMBXAfY4UJc4ODi4H9i9FH4ZYP+0UW9tbd0P7HryfYDd/UF3yroGn52dEQ4yAt816sDrbmC69PZqJCDVbqdcLBbrPt1s26ZerxNt4zHAA+Di4sLX5gteXV0FoNM5/RC4Dkg5X7B7ZRrvAI4Bknj98iXUap3BpVIJgFQH8OeNevfFCwg3h9oXfHx8DMDXHcDu4lktFuHmpjP45OSkbaq5+qZRl25uoFjsDL66uuJhF+AxoAd4DfDqVXvw0dER9Xo9cPO5q/eBc4A3b9qDi41XetIleAC4AXj+vKk/dPfBw8NDoHOquXoCfPvsGTx92my4uxRXVlb+Oo07LGe3PDKMppu8K9+9wjAMAUqCKgHAX0Cjjc8KP/mCK5WK+vr6vEuK0XiDZKO81+hPJBJBe1j7e0Umk9Hg4KBCoVDTB2Rvb6/G43H9XqkEju2R/sX/K96F/gTllaEEcp1NCgAAAABJRU5ErkJggg==",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 515.097259773185,
+ "y": 349.6661584005612
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "ffbd69bf-481f-faa8-73db-1489f3175b75",
+ "bbox": {
+ "x": 657.5434094871487,
+ "y": 283.19128853404476,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "a5",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAyCAYAAABYiSsbAAAABHNCSVQICAgIfAhkiAAABA5JREFUWIXtmM9LI2cYxz9KCOlWcOpqjew2zYK1Uy00tLDMoTShFISePOptLwvpf5C7B28rCCVKDwUv8b6H4M01oBEPsXjQ6iFx3RqruA4eHAkl3x6aGYyZSWLZFgr9wsv78j7zfvLM+zzvj0mPJPEPqNevs1KpsL+/3xWgWCxi23arQXfkOI7i8bgsy7prapHjOAI0PT3dYmsBp9NpAcrn83IcR3t7e77Qzc1NSVImkxGgXC4XDC6VSk0epFIpGYbRAnWfm5ub894wGo3KcRx/8NzcnADt7e0pm80KUCaTkSTNzs5qcnJShUJBkmRZliKRiMrlsubn5wWoVCr5g6empjwP3bbjOJqZmRHglZWVFW1ubgrQ/Py8185ms/5g0zS9oN1u9/X1KQz6qQGenJz0ApdOp5varprSLRqNcnp6CoBhGF4axWIxasAPjefGxsY8m2EY3pjh4WH/PE4kElQqFWzbxrIs9vf3WVtbY2lpiXA4zB/AxMQECwsLLC4uApBMJtnZ2fHG++ZxLpfz5q1arcowDJmmKUlKJpMCVCgUVC6XFYlElEqlvHgAqlar/nPsOI5M0/Sinc/nvay4Db68vFQ6nVa5XPacuT2/LWBJXoSnpqaa+m+DbzsSjUYVj8ebcrgleACWZZHNZjFNs3X9+yiRSJDL5YhEIs2Gux4Hyc/jdvLd3d6F/gf/h8Ed0y2fzyuVSnlb5sjIiKanpwNPFldtwevr6wqFQvpwaEifPX4sQNb4uAD19/e3rLauwe7m8olh6EdQBPQr6NHAgAAtLy8Hjm07x0dHRwAc2jazQ0NYiQRfhMP89vYtANvb24Fj24KPj48JAT8D5vk57OyQqtV40bDv7u7+veCFw2ENguRTekCjo6P3nwrbtqnVanwUYH/Q00O1Wr3/VGxsbADwcYD9Awnn+vr+4EKhAMBXAfY4UJc4ODi4H9i9FH4ZYP+0UW9tbd0P7HryfYDd/UF3yroGn52dEQ4yAt816sDrbmC69PZqJCDVbqdcLBbrPt1s26ZerxNt4zHAA+Di4sLX5gteXV0FoNM5/RC4Dkg5X7B7ZRrvAI4Bknj98iXUap3BpVIJgFQH8OeNevfFCwg3h9oXfHx8DMDXHcDu4lktFuHmpjP45OSkbaq5+qZRl25uoFjsDL66uuJhF+AxoAd4DfDqVXvw0dER9Xo9cPO5q/eBc4A3b9qDi41XetIleAC4AXj+vKk/dPfBw8NDoHOquXoCfPvsGTx92my4uxRXVlb+Oo07LGe3PDKMppu8K9+9wjAMAUqCKgHAX0Cjjc8KP/mCK5WK+vr6vEuK0XiDZKO81+hPJBJBe1j7e0Umk9Hg4KBCoVDTB2Rvb6/G43H9XqkEju2R/sX/K96F/gTllaEEcp1NCgAAAABJRU5ErkJggg==",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 657.5434094871487,
+ "y": 283.19128853404476
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "5fdc6150-63bb-18e8-1f03-33bb8d6b7529",
+ "bbox": {
+ "x": 606.1045220904394,
+ "y": 197.72359870566655,
+ "w": 20,
+ "h": 40
+ },
+ "class": "macromolecule",
+ "label": "a2",
+ "statesandinfos": [],
+ "language": "PD",
+ "border-width": 0.001,
+ "border-color": "#555555",
+ "background-color": "#ffffff",
+ "background-opacity": 1,
+ "background-image-opacity": "1 1",
+ "text-wrap": "wrap",
+ "font-size": 11,
+ "font-family": "Helvetica",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "color": "#000",
+ "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAyCAYAAABYiSsbAAAABHNCSVQICAgIfAhkiAAABA5JREFUWIXtmM9LI2cYxz9KCOlWcOpqjew2zYK1Uy00tLDMoTShFISePOptLwvpf5C7B28rCCVKDwUv8b6H4M01oBEPsXjQ6iFx3RqruA4eHAkl3x6aGYyZSWLZFgr9wsv78j7zfvLM+zzvj0mPJPEPqNevs1KpsL+/3xWgWCxi23arQXfkOI7i8bgsy7prapHjOAI0PT3dYmsBp9NpAcrn83IcR3t7e77Qzc1NSVImkxGgXC4XDC6VSk0epFIpGYbRAnWfm5ub894wGo3KcRx/8NzcnADt7e0pm80KUCaTkSTNzs5qcnJShUJBkmRZliKRiMrlsubn5wWoVCr5g6empjwP3bbjOJqZmRHglZWVFW1ubgrQ/Py8185ms/5g0zS9oN1u9/X1KQz6qQGenJz0ApdOp5varprSLRqNcnp6CoBhGF4axWIxasAPjefGxsY8m2EY3pjh4WH/PE4kElQqFWzbxrIs9vf3WVtbY2lpiXA4zB/AxMQECwsLLC4uApBMJtnZ2fHG++ZxLpfz5q1arcowDJmmKUlKJpMCVCgUVC6XFYlElEqlvHgAqlar/nPsOI5M0/Sinc/nvay4Db68vFQ6nVa5XPacuT2/LWBJXoSnpqaa+m+DbzsSjUYVj8ebcrgleACWZZHNZjFNs3X9+yiRSJDL5YhEIs2Gux4Hyc/jdvLd3d6F/gf/h8Ed0y2fzyuVSnlb5sjIiKanpwNPFldtwevr6wqFQvpwaEifPX4sQNb4uAD19/e3rLauwe7m8olh6EdQBPQr6NHAgAAtLy8Hjm07x0dHRwAc2jazQ0NYiQRfhMP89vYtANvb24Fj24KPj48JAT8D5vk57OyQqtV40bDv7u7+veCFw2ENguRTekCjo6P3nwrbtqnVanwUYH/Q00O1Wr3/VGxsbADwcYD9Awnn+vr+4EKhAMBXAfY4UJc4ODi4H9i9FH4ZYP+0UW9tbd0P7HryfYDd/UF3yroGn52dEQ4yAt816sDrbmC69PZqJCDVbqdcLBbrPt1s26ZerxNt4zHAA+Di4sLX5gteXV0FoNM5/RC4Dkg5X7B7ZRrvAI4Bknj98iXUap3BpVIJgFQH8OeNevfFCwg3h9oXfHx8DMDXHcDu4lktFuHmpjP45OSkbaq5+qZRl25uoFjsDL66uuJhF+AxoAd4DfDqVXvw0dER9Xo9cPO5q/eBc4A3b9qDi41XetIleAC4AXj+vKk/dPfBw8NDoHOquXoCfPvsGTx92my4uxRXVlb+Oo07LGe3PDKMppu8K9+9wjAMAUqCKgHAX0Cjjc8KP/mCK5WK+vr6vEuK0XiDZKO81+hPJBJBe1j7e0Umk9Hg4KBCoVDTB2Rvb6/G43H9XqkEju2R/sX/K96F/gTllaEEcp1NCgAAAABJRU5ErkJggg==",
+ "ports": [],
+ "background-fit": "none",
+ "background-position-x": "50%",
+ "background-position-y": "50%",
+ "background-width": "100%",
+ "background-height": "100%",
+ "infoboxCalculated": true,
+ "auxunitlayouts": {}
+ },
+ "position": {
+ "x": 606.1045220904394,
+ "y": 197.72359870566655
+ },
+ "group": "nodes",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ }
+ ],
+ "edges": [
+ {
+ "data": {
+ "id": "nwtE_1c1c1ca1-decb-4ebd-854c-90fe60be467c",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "0998ddcc-de7b-792a-5b2e-c53317128a7c",
+ "target": "3c910e69-2f8b-7beb-159c-da99ed4f6907",
+ "portsource": "0998ddcc-de7b-792a-5b2e-c53317128a7c",
+ "porttarget": "3c910e69-2f8b-7beb-159c-da99ed4f6907"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_96d9570f-b273-4050-a646-82af79f255d9",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "3c910e69-2f8b-7beb-159c-da99ed4f6907",
+ "target": "f6ded9c4-6e94-ee99-6d4e-aebba05882db",
+ "portsource": "3c910e69-2f8b-7beb-159c-da99ed4f6907",
+ "porttarget": "f6ded9c4-6e94-ee99-6d4e-aebba05882db"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_d65ce814-8761-42a2-a662-c254e827ea42",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "f6ded9c4-6e94-ee99-6d4e-aebba05882db",
+ "target": "fb9ad239-d112-d0f9-ed9e-90db5f147e54",
+ "portsource": "f6ded9c4-6e94-ee99-6d4e-aebba05882db",
+ "porttarget": "fb9ad239-d112-d0f9-ed9e-90db5f147e54"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_2c491a02-a8b4-4f6b-bfa3-fd05e1a2338d",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "0998ddcc-de7b-792a-5b2e-c53317128a7c",
+ "target": "5fdc6150-63bb-18e8-1f03-33bb8d6b7529",
+ "portsource": "0998ddcc-de7b-792a-5b2e-c53317128a7c",
+ "porttarget": "5fdc6150-63bb-18e8-1f03-33bb8d6b7529"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_6d445ac6-5105-493d-9632-e56b7a9d374d",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "5fdc6150-63bb-18e8-1f03-33bb8d6b7529",
+ "target": "3b233452-0a1c-6c51-703a-b62ca9951f2b",
+ "portsource": "5fdc6150-63bb-18e8-1f03-33bb8d6b7529",
+ "porttarget": "3b233452-0a1c-6c51-703a-b62ca9951f2b"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_8c77c946-7d52-4ce2-90d1-12b56ae4a0a0",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "3b233452-0a1c-6c51-703a-b62ca9951f2b",
+ "target": "73eceeb1-0069-9139-4398-5dffeb19bddf",
+ "portsource": "3b233452-0a1c-6c51-703a-b62ca9951f2b",
+ "porttarget": "73eceeb1-0069-9139-4398-5dffeb19bddf"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_b0373815-c68f-4510-a26d-92a6035a8dae",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "73eceeb1-0069-9139-4398-5dffeb19bddf",
+ "target": "8e47cd39-5258-1c70-06ab-96f28782e065",
+ "portsource": "73eceeb1-0069-9139-4398-5dffeb19bddf",
+ "porttarget": "8e47cd39-5258-1c70-06ab-96f28782e065"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_8d4eb83c-7880-41b9-b0ba-67e879a820e1",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "8e47cd39-5258-1c70-06ab-96f28782e065",
+ "target": "25f4cc48-4e4e-e80e-174f-fa4ba64616da",
+ "portsource": "8e47cd39-5258-1c70-06ab-96f28782e065",
+ "porttarget": "25f4cc48-4e4e-e80e-174f-fa4ba64616da"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_8a0abf51-ca91-4211-ab18-551c485ef634",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "25f4cc48-4e4e-e80e-174f-fa4ba64616da",
+ "target": "2b855d36-0c89-996d-9281-ea54f711cc8e",
+ "portsource": "25f4cc48-4e4e-e80e-174f-fa4ba64616da",
+ "porttarget": "2b855d36-0c89-996d-9281-ea54f711cc8e"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_4be2fe1d-18da-4e5a-bb19-9731c5fd536c",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "73eceeb1-0069-9139-4398-5dffeb19bddf",
+ "target": "25f4cc48-4e4e-e80e-174f-fa4ba64616da",
+ "portsource": "73eceeb1-0069-9139-4398-5dffeb19bddf",
+ "porttarget": "25f4cc48-4e4e-e80e-174f-fa4ba64616da"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_8da7756e-963f-4d2d-8eaf-7397cfbf354e",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "73eceeb1-0069-9139-4398-5dffeb19bddf",
+ "target": "9e04da58-86d5-7fc8-e79e-3883f25b5c2d",
+ "portsource": "73eceeb1-0069-9139-4398-5dffeb19bddf",
+ "porttarget": "9e04da58-86d5-7fc8-e79e-3883f25b5c2d"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_89863f47-0f02-40f4-b1ff-b355a4e9f1d7",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "9e04da58-86d5-7fc8-e79e-3883f25b5c2d",
+ "target": "464bae1c-0c35-3b4a-3af2-371ef03a0dcb",
+ "portsource": "9e04da58-86d5-7fc8-e79e-3883f25b5c2d",
+ "porttarget": "464bae1c-0c35-3b4a-3af2-371ef03a0dcb"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_2f53a32d-4059-423e-8396-85d542b20085",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "464bae1c-0c35-3b4a-3af2-371ef03a0dcb",
+ "target": "25f4cc48-4e4e-e80e-174f-fa4ba64616da",
+ "portsource": "464bae1c-0c35-3b4a-3af2-371ef03a0dcb",
+ "porttarget": "25f4cc48-4e4e-e80e-174f-fa4ba64616da"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_3d6bb730-cf78-48a7-b832-28eb2bce2b80",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "25f4cc48-4e4e-e80e-174f-fa4ba64616da",
+ "target": "d4e4f860-ffb4-cbf6-80b7-675c821ed4d2",
+ "portsource": "25f4cc48-4e4e-e80e-174f-fa4ba64616da",
+ "porttarget": "d4e4f860-ffb4-cbf6-80b7-675c821ed4d2"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_30435d07-810b-4899-8fc3-8f4ba0d01b3c",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "464bae1c-0c35-3b4a-3af2-371ef03a0dcb",
+ "target": "bc0420e3-9b6e-4c97-74c6-61278dbc18d4",
+ "portsource": "464bae1c-0c35-3b4a-3af2-371ef03a0dcb",
+ "porttarget": "bc0420e3-9b6e-4c97-74c6-61278dbc18d4"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_bf58b874-f1dc-4198-bc72-34105cd2b746",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "d4e4f860-ffb4-cbf6-80b7-675c821ed4d2",
+ "target": "bc0420e3-9b6e-4c97-74c6-61278dbc18d4",
+ "portsource": "d4e4f860-ffb4-cbf6-80b7-675c821ed4d2",
+ "porttarget": "bc0420e3-9b6e-4c97-74c6-61278dbc18d4"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_35a97b29-458f-4388-95e5-8bb61ed547ff",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "d4e4f860-ffb4-cbf6-80b7-675c821ed4d2",
+ "target": "c54786e2-bbea-d15b-3e21-7cf32b9338ca",
+ "portsource": "d4e4f860-ffb4-cbf6-80b7-675c821ed4d2",
+ "porttarget": "c54786e2-bbea-d15b-3e21-7cf32b9338ca"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_da45116e-91b9-473b-872f-b9004fad988b",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "2b855d36-0c89-996d-9281-ea54f711cc8e",
+ "target": "c54786e2-bbea-d15b-3e21-7cf32b9338ca",
+ "portsource": "2b855d36-0c89-996d-9281-ea54f711cc8e",
+ "porttarget": "c54786e2-bbea-d15b-3e21-7cf32b9338ca"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_3526eb14-26ce-4a67-b14f-a9fab2460e9f",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "d4e4f860-ffb4-cbf6-80b7-675c821ed4d2",
+ "target": "2b855d36-0c89-996d-9281-ea54f711cc8e",
+ "portsource": "d4e4f860-ffb4-cbf6-80b7-675c821ed4d2",
+ "porttarget": "2b855d36-0c89-996d-9281-ea54f711cc8e"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_a7e27295-8c9c-48dc-b801-35c2f89ae1de",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "c54786e2-bbea-d15b-3e21-7cf32b9338ca",
+ "target": "7b23c6ae-4256-a918-0c9b-0254d83a908b",
+ "portsource": "c54786e2-bbea-d15b-3e21-7cf32b9338ca",
+ "porttarget": "7b23c6ae-4256-a918-0c9b-0254d83a908b"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_5ddca385-5164-4157-bcdf-9f4d7ee9b877",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "7b23c6ae-4256-a918-0c9b-0254d83a908b",
+ "target": "a97f8f48-6652-7e09-8eda-2d87eae7d20b",
+ "portsource": "7b23c6ae-4256-a918-0c9b-0254d83a908b",
+ "porttarget": "a97f8f48-6652-7e09-8eda-2d87eae7d20b"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_c6cae78a-29c8-47ac-a95f-ef0db67c5f34",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "a97f8f48-6652-7e09-8eda-2d87eae7d20b",
+ "target": "3f913ee3-7737-5405-968d-312653a7c318",
+ "portsource": "a97f8f48-6652-7e09-8eda-2d87eae7d20b",
+ "porttarget": "3f913ee3-7737-5405-968d-312653a7c318"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_3a301c6b-2f56-42a1-985e-5476cf722c9f",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "a97f8f48-6652-7e09-8eda-2d87eae7d20b",
+ "target": "97a17094-822f-fc65-78f3-fc5b8aca0b23",
+ "portsource": "a97f8f48-6652-7e09-8eda-2d87eae7d20b",
+ "porttarget": "97a17094-822f-fc65-78f3-fc5b8aca0b23"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_fec71d1a-e60b-4433-87b0-f7542007c560",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "97a17094-822f-fc65-78f3-fc5b8aca0b23",
+ "target": "67add58f-1a8c-17d9-8cfa-ff468527f6c9",
+ "portsource": "97a17094-822f-fc65-78f3-fc5b8aca0b23",
+ "porttarget": "67add58f-1a8c-17d9-8cfa-ff468527f6c9"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_c52a213f-22d9-49b6-9032-c0fdd99c373a",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "97a17094-822f-fc65-78f3-fc5b8aca0b23",
+ "target": "86f48f58-145d-92cc-0d33-aaf639984733",
+ "portsource": "97a17094-822f-fc65-78f3-fc5b8aca0b23",
+ "porttarget": "86f48f58-145d-92cc-0d33-aaf639984733"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_58b3a3d1-e717-4247-b980-0a57dd715b02",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "97a17094-822f-fc65-78f3-fc5b8aca0b23",
+ "target": "8c9ccb35-a1e8-1772-cbad-6e5f46b95b8a",
+ "portsource": "97a17094-822f-fc65-78f3-fc5b8aca0b23",
+ "porttarget": "8c9ccb35-a1e8-1772-cbad-6e5f46b95b8a"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_c79340a6-bdbd-438f-8838-57735eff5329",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "8c9ccb35-a1e8-1772-cbad-6e5f46b95b8a",
+ "target": "c21a716f-9ce2-4976-bdc3-320395e5ed97",
+ "portsource": "8c9ccb35-a1e8-1772-cbad-6e5f46b95b8a",
+ "porttarget": "c21a716f-9ce2-4976-bdc3-320395e5ed97"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_8550f45c-f84b-45c8-8f8e-57ad32a1fe31",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "c21a716f-9ce2-4976-bdc3-320395e5ed97",
+ "target": "88642a3e-3f7a-60a3-9c61-425f1f3cf2d7",
+ "portsource": "c21a716f-9ce2-4976-bdc3-320395e5ed97",
+ "porttarget": "88642a3e-3f7a-60a3-9c61-425f1f3cf2d7"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_e8176741-3adc-48e4-8cf2-344b1353a5d9",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "88642a3e-3f7a-60a3-9c61-425f1f3cf2d7",
+ "target": "e98b25fb-7352-b78a-de16-240d09bda830",
+ "portsource": "88642a3e-3f7a-60a3-9c61-425f1f3cf2d7",
+ "porttarget": "e98b25fb-7352-b78a-de16-240d09bda830"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_dd78df2c-4e48-466e-a19e-baea9c58ee7e",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "e98b25fb-7352-b78a-de16-240d09bda830",
+ "target": "8c9ccb35-a1e8-1772-cbad-6e5f46b95b8a",
+ "portsource": "e98b25fb-7352-b78a-de16-240d09bda830",
+ "porttarget": "8c9ccb35-a1e8-1772-cbad-6e5f46b95b8a"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_c94b7aa8-c93c-453d-8c4d-b2212b3beafc",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "c21a716f-9ce2-4976-bdc3-320395e5ed97",
+ "target": "a97f8f48-6652-7e09-8eda-2d87eae7d20b",
+ "portsource": "c21a716f-9ce2-4976-bdc3-320395e5ed97",
+ "porttarget": "a97f8f48-6652-7e09-8eda-2d87eae7d20b"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_f7483a56-4f02-4ec3-9109-eadddc4f887b",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "88642a3e-3f7a-60a3-9c61-425f1f3cf2d7",
+ "target": "3ffdee99-d217-2dc6-5b0e-1229ee1d1bd4",
+ "portsource": "88642a3e-3f7a-60a3-9c61-425f1f3cf2d7",
+ "porttarget": "3ffdee99-d217-2dc6-5b0e-1229ee1d1bd4"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_4bbf5c50-af52-4ac2-b36a-5ef9a3192fb7",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "c21a716f-9ce2-4976-bdc3-320395e5ed97",
+ "target": "97a17094-822f-fc65-78f3-fc5b8aca0b23",
+ "portsource": "c21a716f-9ce2-4976-bdc3-320395e5ed97",
+ "porttarget": "97a17094-822f-fc65-78f3-fc5b8aca0b23"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_7ec7f0fb-f15a-4501-a802-2c9006f76f7e",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "3ffdee99-d217-2dc6-5b0e-1229ee1d1bd4",
+ "target": "a3218cf9-fd48-f0b4-4c45-99cf2e52a0e8",
+ "portsource": "3ffdee99-d217-2dc6-5b0e-1229ee1d1bd4",
+ "porttarget": "a3218cf9-fd48-f0b4-4c45-99cf2e52a0e8"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_278001ac-9e8f-4bc5-a968-9773c8b1caf1",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "5678f1a3-0919-aecd-fb70-613a8a55c4d7",
+ "target": "e98b25fb-7352-b78a-de16-240d09bda830",
+ "portsource": "5678f1a3-0919-aecd-fb70-613a8a55c4d7",
+ "porttarget": "e98b25fb-7352-b78a-de16-240d09bda830"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_3d13ccc4-4960-4e1b-a11a-3d9f517d736d",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "5678f1a3-0919-aecd-fb70-613a8a55c4d7",
+ "target": "a3218cf9-fd48-f0b4-4c45-99cf2e52a0e8",
+ "portsource": "5678f1a3-0919-aecd-fb70-613a8a55c4d7",
+ "porttarget": "a3218cf9-fd48-f0b4-4c45-99cf2e52a0e8"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_397654f0-801f-4bda-8f03-a988121e7550",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "3ffdee99-d217-2dc6-5b0e-1229ee1d1bd4",
+ "target": "5678f1a3-0919-aecd-fb70-613a8a55c4d7",
+ "portsource": "3ffdee99-d217-2dc6-5b0e-1229ee1d1bd4",
+ "porttarget": "5678f1a3-0919-aecd-fb70-613a8a55c4d7"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_c666ca08-8e52-4832-8722-c0ba56a947f3",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "5678f1a3-0919-aecd-fb70-613a8a55c4d7",
+ "target": "1ebc687b-0b6a-eb35-4ac7-9b6d57a784da",
+ "portsource": "5678f1a3-0919-aecd-fb70-613a8a55c4d7",
+ "porttarget": "1ebc687b-0b6a-eb35-4ac7-9b6d57a784da"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_e678ea21-1b85-4871-bcdd-db372711f8a1",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "1ebc687b-0b6a-eb35-4ac7-9b6d57a784da",
+ "target": "e98b25fb-7352-b78a-de16-240d09bda830",
+ "portsource": "1ebc687b-0b6a-eb35-4ac7-9b6d57a784da",
+ "porttarget": "e98b25fb-7352-b78a-de16-240d09bda830"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_6a4d0bec-0139-46e0-89ec-ae98eeed3683",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "86f48f58-145d-92cc-0d33-aaf639984733",
+ "target": "8c9ccb35-a1e8-1772-cbad-6e5f46b95b8a",
+ "portsource": "86f48f58-145d-92cc-0d33-aaf639984733",
+ "porttarget": "8c9ccb35-a1e8-1772-cbad-6e5f46b95b8a"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_c85cd9be-301b-4b00-96b0-0b74923ab35c",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "86f48f58-145d-92cc-0d33-aaf639984733",
+ "target": "1ebc687b-0b6a-eb35-4ac7-9b6d57a784da",
+ "portsource": "86f48f58-145d-92cc-0d33-aaf639984733",
+ "porttarget": "1ebc687b-0b6a-eb35-4ac7-9b6d57a784da"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_569f5cbc-6f04-45c3-8c78-84cd6692ff00",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "8edd562b-196b-4f7e-37bf-a9e2072917b0",
+ "target": "1ebc687b-0b6a-eb35-4ac7-9b6d57a784da",
+ "portsource": "8edd562b-196b-4f7e-37bf-a9e2072917b0",
+ "porttarget": "1ebc687b-0b6a-eb35-4ac7-9b6d57a784da"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_b4a8f16b-9be5-4a2f-a397-660346cd5095",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "8edd562b-196b-4f7e-37bf-a9e2072917b0",
+ "target": "0ddcc98c-7b7c-ac2e-2207-081c5ffc9921",
+ "portsource": "8edd562b-196b-4f7e-37bf-a9e2072917b0",
+ "porttarget": "0ddcc98c-7b7c-ac2e-2207-081c5ffc9921"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_163e8ac8-9a4f-4441-a596-3583fc3a77cc",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "0ddcc98c-7b7c-ac2e-2207-081c5ffc9921",
+ "target": "5678f1a3-0919-aecd-fb70-613a8a55c4d7",
+ "portsource": "0ddcc98c-7b7c-ac2e-2207-081c5ffc9921",
+ "porttarget": "5678f1a3-0919-aecd-fb70-613a8a55c4d7"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_5812454f-3b40-49eb-a9e3-cafa29ecd0be",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "4ca3044f-9b82-020b-e1cb-bbb45e4b0088",
+ "target": "3ffdee99-d217-2dc6-5b0e-1229ee1d1bd4",
+ "portsource": "4ca3044f-9b82-020b-e1cb-bbb45e4b0088",
+ "porttarget": "3ffdee99-d217-2dc6-5b0e-1229ee1d1bd4"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_c6f3a512-0f2b-4b19-8032-402945881d9b",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "4ca3044f-9b82-020b-e1cb-bbb45e4b0088",
+ "target": "88642a3e-3f7a-60a3-9c61-425f1f3cf2d7",
+ "portsource": "4ca3044f-9b82-020b-e1cb-bbb45e4b0088",
+ "porttarget": "88642a3e-3f7a-60a3-9c61-425f1f3cf2d7"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_5a673304-468c-4227-beca-a7677a68b478",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "4ca3044f-9b82-020b-e1cb-bbb45e4b0088",
+ "target": "9bf069c9-034b-1bee-35e5-2d2addaeaf38",
+ "portsource": "4ca3044f-9b82-020b-e1cb-bbb45e4b0088",
+ "porttarget": "9bf069c9-034b-1bee-35e5-2d2addaeaf38"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_7263b061-b6c0-454a-a47c-22f9cd4ddf7f",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "9bf069c9-034b-1bee-35e5-2d2addaeaf38",
+ "target": "c21a716f-9ce2-4976-bdc3-320395e5ed97",
+ "portsource": "9bf069c9-034b-1bee-35e5-2d2addaeaf38",
+ "porttarget": "c21a716f-9ce2-4976-bdc3-320395e5ed97"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_ca069b99-e61c-42c9-a1ee-33287f5ca637",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "7c1292d7-1feb-63b9-65a6-fb9db2547eb3",
+ "target": "c21a716f-9ce2-4976-bdc3-320395e5ed97",
+ "portsource": "7c1292d7-1feb-63b9-65a6-fb9db2547eb3",
+ "porttarget": "c21a716f-9ce2-4976-bdc3-320395e5ed97"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_af287463-cdbb-47c8-af68-0ebd1ea7774a",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "9bf069c9-034b-1bee-35e5-2d2addaeaf38",
+ "target": "7c1292d7-1feb-63b9-65a6-fb9db2547eb3",
+ "portsource": "9bf069c9-034b-1bee-35e5-2d2addaeaf38",
+ "porttarget": "7c1292d7-1feb-63b9-65a6-fb9db2547eb3"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_c20aa39b-d909-4e3a-ac16-0fb2d059c730",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "7c1292d7-1feb-63b9-65a6-fb9db2547eb3",
+ "target": "a97f8f48-6652-7e09-8eda-2d87eae7d20b",
+ "portsource": "7c1292d7-1feb-63b9-65a6-fb9db2547eb3",
+ "porttarget": "a97f8f48-6652-7e09-8eda-2d87eae7d20b"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_c63d2aab-281f-483b-89de-ea2a764cb437",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "7c1292d7-1feb-63b9-65a6-fb9db2547eb3",
+ "target": "c54786e2-bbea-d15b-3e21-7cf32b9338ca",
+ "portsource": "7c1292d7-1feb-63b9-65a6-fb9db2547eb3",
+ "porttarget": "c54786e2-bbea-d15b-3e21-7cf32b9338ca"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_cdb68f09-3b2b-4456-bff4-48694b6006bf",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "67add58f-1a8c-17d9-8cfa-ff468527f6c9",
+ "target": "3f913ee3-7737-5405-968d-312653a7c318",
+ "portsource": "67add58f-1a8c-17d9-8cfa-ff468527f6c9",
+ "porttarget": "3f913ee3-7737-5405-968d-312653a7c318"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_a70317b5-2004-49e9-8e42-f79016235b49",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "0ddcc98c-7b7c-ac2e-2207-081c5ffc9921",
+ "target": "a3218cf9-fd48-f0b4-4c45-99cf2e52a0e8",
+ "portsource": "0ddcc98c-7b7c-ac2e-2207-081c5ffc9921",
+ "porttarget": "a3218cf9-fd48-f0b4-4c45-99cf2e52a0e8"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_74d7b89b-8f5b-424f-af0f-095a417db95a",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "a3218cf9-fd48-f0b4-4c45-99cf2e52a0e8",
+ "target": "16102c94-c326-51c3-8636-3ae19b603483",
+ "portsource": "a3218cf9-fd48-f0b4-4c45-99cf2e52a0e8",
+ "porttarget": "16102c94-c326-51c3-8636-3ae19b603483"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_59de5fb2-3115-4cb2-aac6-a0df1f5f7099",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "16102c94-c326-51c3-8636-3ae19b603483",
+ "target": "e833b238-0bb7-c5d2-ebec-aa0604bcd484",
+ "portsource": "16102c94-c326-51c3-8636-3ae19b603483",
+ "porttarget": "e833b238-0bb7-c5d2-ebec-aa0604bcd484"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_d543d912-04d7-4f9f-9222-2b9d6c46ff16",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "e53126c9-70fe-ca8a-3b85-bab123a93d70",
+ "target": "e833b238-0bb7-c5d2-ebec-aa0604bcd484",
+ "portsource": "e53126c9-70fe-ca8a-3b85-bab123a93d70",
+ "porttarget": "e833b238-0bb7-c5d2-ebec-aa0604bcd484"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_aa30b478-2606-47e0-82c5-16a930978b86",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "e53126c9-70fe-ca8a-3b85-bab123a93d70",
+ "target": "a1be056e-0b97-5a8e-56e9-8c3e08e9c24b",
+ "portsource": "e53126c9-70fe-ca8a-3b85-bab123a93d70",
+ "porttarget": "a1be056e-0b97-5a8e-56e9-8c3e08e9c24b"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_07786f94-90f4-43e9-90e8-b5c8392b0edc",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "267b649b-6d09-255c-67b4-46bd2c40375e",
+ "target": "7435cbfb-9e49-d44e-4357-c413a22e188a",
+ "portsource": "267b649b-6d09-255c-67b4-46bd2c40375e",
+ "porttarget": "7435cbfb-9e49-d44e-4357-c413a22e188a"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_831e41d3-c942-4973-ac4a-f80514230710",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "7435cbfb-9e49-d44e-4357-c413a22e188a",
+ "target": "d036dd9f-8368-bfac-a080-87b82544be20",
+ "portsource": "7435cbfb-9e49-d44e-4357-c413a22e188a",
+ "porttarget": "d036dd9f-8368-bfac-a080-87b82544be20"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_d3adddc0-7f9e-4ffa-a6a2-499e8185517c",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "d036dd9f-8368-bfac-a080-87b82544be20",
+ "target": "a1be056e-0b97-5a8e-56e9-8c3e08e9c24b",
+ "portsource": "d036dd9f-8368-bfac-a080-87b82544be20",
+ "porttarget": "a1be056e-0b97-5a8e-56e9-8c3e08e9c24b"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_f83afce6-0c18-4b03-b8d5-eb4e52be3634",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "a1be056e-0b97-5a8e-56e9-8c3e08e9c24b",
+ "target": "267b649b-6d09-255c-67b4-46bd2c40375e",
+ "portsource": "a1be056e-0b97-5a8e-56e9-8c3e08e9c24b",
+ "porttarget": "267b649b-6d09-255c-67b4-46bd2c40375e"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_260554e5-bc2f-4e71-b1a0-5331b19fcf76",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "7435cbfb-9e49-d44e-4357-c413a22e188a",
+ "target": "4ca3044f-9b82-020b-e1cb-bbb45e4b0088",
+ "portsource": "7435cbfb-9e49-d44e-4357-c413a22e188a",
+ "porttarget": "4ca3044f-9b82-020b-e1cb-bbb45e4b0088"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_7874e5ca-6fcc-4cb5-b011-7a37bbc88099",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "4ca3044f-9b82-020b-e1cb-bbb45e4b0088",
+ "target": "96f4c006-33d1-a00e-a389-782f23c38a65",
+ "portsource": "4ca3044f-9b82-020b-e1cb-bbb45e4b0088",
+ "porttarget": "96f4c006-33d1-a00e-a389-782f23c38a65"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_1bc5bd7a-5f0d-46aa-8e52-563e3e8eb1c9",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "267b649b-6d09-255c-67b4-46bd2c40375e",
+ "target": "4ca3044f-9b82-020b-e1cb-bbb45e4b0088",
+ "portsource": "267b649b-6d09-255c-67b4-46bd2c40375e",
+ "porttarget": "4ca3044f-9b82-020b-e1cb-bbb45e4b0088"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_d0645132-bc57-4a6e-8ae2-d7b85975063d",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "96f4c006-33d1-a00e-a389-782f23c38a65",
+ "target": "267b649b-6d09-255c-67b4-46bd2c40375e",
+ "portsource": "96f4c006-33d1-a00e-a389-782f23c38a65",
+ "porttarget": "267b649b-6d09-255c-67b4-46bd2c40375e"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_062dc392-a570-4473-9b2b-052b207ec261",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "7435cbfb-9e49-d44e-4357-c413a22e188a",
+ "target": "d64b38d9-db3d-4128-1ec4-ddf1e5648c72",
+ "portsource": "7435cbfb-9e49-d44e-4357-c413a22e188a",
+ "porttarget": "d64b38d9-db3d-4128-1ec4-ddf1e5648c72"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_f48bbc29-fbcd-4de8-a35b-2b06f8af7a20",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "d64b38d9-db3d-4128-1ec4-ddf1e5648c72",
+ "target": "a44fe57b-d4e6-a062-6b2a-bf6f5f92c5f1",
+ "portsource": "d64b38d9-db3d-4128-1ec4-ddf1e5648c72",
+ "porttarget": "a44fe57b-d4e6-a062-6b2a-bf6f5f92c5f1"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_f410ba16-544f-4ec1-b371-3d14e0faee2b",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "464bae1c-0c35-3b4a-3af2-371ef03a0dcb",
+ "target": "a44fe57b-d4e6-a062-6b2a-bf6f5f92c5f1",
+ "portsource": "464bae1c-0c35-3b4a-3af2-371ef03a0dcb",
+ "porttarget": "a44fe57b-d4e6-a062-6b2a-bf6f5f92c5f1"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_82b407d2-5559-4386-8e97-44f4dbb184df",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "d64b38d9-db3d-4128-1ec4-ddf1e5648c72",
+ "target": "bc0420e3-9b6e-4c97-74c6-61278dbc18d4",
+ "portsource": "d64b38d9-db3d-4128-1ec4-ddf1e5648c72",
+ "porttarget": "bc0420e3-9b6e-4c97-74c6-61278dbc18d4"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_318fb561-4823-430e-91eb-f533134f3f1a",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "d64b38d9-db3d-4128-1ec4-ddf1e5648c72",
+ "target": "9bf069c9-034b-1bee-35e5-2d2addaeaf38",
+ "portsource": "d64b38d9-db3d-4128-1ec4-ddf1e5648c72",
+ "porttarget": "9bf069c9-034b-1bee-35e5-2d2addaeaf38"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_468b8322-a6fe-432d-aca2-ae3a921618d5",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "d64b38d9-db3d-4128-1ec4-ddf1e5648c72",
+ "target": "4ca3044f-9b82-020b-e1cb-bbb45e4b0088",
+ "portsource": "d64b38d9-db3d-4128-1ec4-ddf1e5648c72",
+ "porttarget": "4ca3044f-9b82-020b-e1cb-bbb45e4b0088"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_c0707117-f935-4c11-8d01-1bcb52e21f5d",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "bc0420e3-9b6e-4c97-74c6-61278dbc18d4",
+ "target": "7c1292d7-1feb-63b9-65a6-fb9db2547eb3",
+ "portsource": "bc0420e3-9b6e-4c97-74c6-61278dbc18d4",
+ "porttarget": "7c1292d7-1feb-63b9-65a6-fb9db2547eb3"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_31ff41b0-99eb-4e4e-9a72-a6fa5df61284",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "a44fe57b-d4e6-a062-6b2a-bf6f5f92c5f1",
+ "target": "ffbd69bf-481f-faa8-73db-1489f3175b75",
+ "portsource": "a44fe57b-d4e6-a062-6b2a-bf6f5f92c5f1",
+ "porttarget": "ffbd69bf-481f-faa8-73db-1489f3175b75"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_900bd3fc-60d1-4c1b-82b7-8f73cad5536d",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "ffbd69bf-481f-faa8-73db-1489f3175b75",
+ "target": "9e04da58-86d5-7fc8-e79e-3883f25b5c2d",
+ "portsource": "ffbd69bf-481f-faa8-73db-1489f3175b75",
+ "porttarget": "9e04da58-86d5-7fc8-e79e-3883f25b5c2d"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_a88789b7-9e4e-4c68-b863-76b180feb28e",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "ffbd69bf-481f-faa8-73db-1489f3175b75",
+ "target": "d036dd9f-8368-bfac-a080-87b82544be20",
+ "portsource": "ffbd69bf-481f-faa8-73db-1489f3175b75",
+ "porttarget": "d036dd9f-8368-bfac-a080-87b82544be20"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_a1558907-c8d7-42c2-af07-a1005a6ca545",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "a44fe57b-d4e6-a062-6b2a-bf6f5f92c5f1",
+ "target": "d036dd9f-8368-bfac-a080-87b82544be20",
+ "portsource": "a44fe57b-d4e6-a062-6b2a-bf6f5f92c5f1",
+ "porttarget": "d036dd9f-8368-bfac-a080-87b82544be20"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_ac395be3-d2fd-4521-8b51-5f4a19863afa",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "d036dd9f-8368-bfac-a080-87b82544be20",
+ "target": "b45bf870-2439-dc1d-38f2-fc491752ff05",
+ "portsource": "d036dd9f-8368-bfac-a080-87b82544be20",
+ "porttarget": "b45bf870-2439-dc1d-38f2-fc491752ff05"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_ce0a1ca9-9045-4bfe-a1a3-2bfe070b8116",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "b45bf870-2439-dc1d-38f2-fc491752ff05",
+ "target": "ffbd69bf-481f-faa8-73db-1489f3175b75",
+ "portsource": "b45bf870-2439-dc1d-38f2-fc491752ff05",
+ "porttarget": "ffbd69bf-481f-faa8-73db-1489f3175b75"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_b110eb00-eb99-4ccc-8946-820f05bcef96",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "b45bf870-2439-dc1d-38f2-fc491752ff05",
+ "target": "f91d914e-6ab7-92cf-b16d-b9a7661e0044",
+ "portsource": "b45bf870-2439-dc1d-38f2-fc491752ff05",
+ "porttarget": "f91d914e-6ab7-92cf-b16d-b9a7661e0044"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_7036a59b-4088-4edc-a28f-82a6ce94d08f",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "f91d914e-6ab7-92cf-b16d-b9a7661e0044",
+ "target": "a1be056e-0b97-5a8e-56e9-8c3e08e9c24b",
+ "portsource": "f91d914e-6ab7-92cf-b16d-b9a7661e0044",
+ "porttarget": "a1be056e-0b97-5a8e-56e9-8c3e08e9c24b"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_5a4167be-8239-4509-b96b-0c51fa5a6c8c",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "f91d914e-6ab7-92cf-b16d-b9a7661e0044",
+ "target": "115069e9-e7e3-51e4-da42-481b318e5f1f",
+ "portsource": "f91d914e-6ab7-92cf-b16d-b9a7661e0044",
+ "porttarget": "115069e9-e7e3-51e4-da42-481b318e5f1f"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_197e0fc8-374e-444e-a24f-605d72b7d145",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "115069e9-e7e3-51e4-da42-481b318e5f1f",
+ "target": "11284cd9-d716-52f7-20c7-5d1750de5309",
+ "portsource": "115069e9-e7e3-51e4-da42-481b318e5f1f",
+ "porttarget": "11284cd9-d716-52f7-20c7-5d1750de5309"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_da383a68-b3a3-4c42-b317-022669976139",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "11284cd9-d716-52f7-20c7-5d1750de5309",
+ "target": "a1be056e-0b97-5a8e-56e9-8c3e08e9c24b",
+ "portsource": "11284cd9-d716-52f7-20c7-5d1750de5309",
+ "porttarget": "a1be056e-0b97-5a8e-56e9-8c3e08e9c24b"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_b7093d0f-e49d-4f84-9d12-70959ce71588",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "11284cd9-d716-52f7-20c7-5d1750de5309",
+ "target": "e53126c9-70fe-ca8a-3b85-bab123a93d70",
+ "portsource": "11284cd9-d716-52f7-20c7-5d1750de5309",
+ "porttarget": "e53126c9-70fe-ca8a-3b85-bab123a93d70"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_6aad44bb-dc1b-4737-8334-8a853e9896a9",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "267b649b-6d09-255c-67b4-46bd2c40375e",
+ "target": "e53126c9-70fe-ca8a-3b85-bab123a93d70",
+ "portsource": "267b649b-6d09-255c-67b4-46bd2c40375e",
+ "porttarget": "e53126c9-70fe-ca8a-3b85-bab123a93d70"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_b5c6a24d-c270-4b63-82d9-f658997e671f",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "96f4c006-33d1-a00e-a389-782f23c38a65",
+ "target": "e833b238-0bb7-c5d2-ebec-aa0604bcd484",
+ "portsource": "96f4c006-33d1-a00e-a389-782f23c38a65",
+ "porttarget": "e833b238-0bb7-c5d2-ebec-aa0604bcd484"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_5c62e3d8-1514-4e67-ba16-6bf7dfa520e0",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "96f4c006-33d1-a00e-a389-782f23c38a65",
+ "target": "a3218cf9-fd48-f0b4-4c45-99cf2e52a0e8",
+ "portsource": "96f4c006-33d1-a00e-a389-782f23c38a65",
+ "porttarget": "a3218cf9-fd48-f0b4-4c45-99cf2e52a0e8"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_0b3510cf-51a5-45cf-8d28-2f5ffcba2edf",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "5ea74092-08ec-6937-33c9-9f6fbe9226a2",
+ "target": "16102c94-c326-51c3-8636-3ae19b603483",
+ "portsource": "5ea74092-08ec-6937-33c9-9f6fbe9226a2",
+ "porttarget": "16102c94-c326-51c3-8636-3ae19b603483"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_234d2bc5-727b-4214-a288-bca488a8ac11",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "e833b238-0bb7-c5d2-ebec-aa0604bcd484",
+ "target": "5ea74092-08ec-6937-33c9-9f6fbe9226a2",
+ "portsource": "e833b238-0bb7-c5d2-ebec-aa0604bcd484",
+ "porttarget": "5ea74092-08ec-6937-33c9-9f6fbe9226a2"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_227dea7e-9867-47d8-abb3-d5e6520daefb",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "5ea74092-08ec-6937-33c9-9f6fbe9226a2",
+ "target": "97f86367-eafd-54f7-4951-8360862b846f",
+ "portsource": "5ea74092-08ec-6937-33c9-9f6fbe9226a2",
+ "porttarget": "97f86367-eafd-54f7-4951-8360862b846f"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_a6dcf746-0421-403a-a2c2-422b46f496e8",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "97f86367-eafd-54f7-4951-8360862b846f",
+ "target": "06fddad6-2abd-3413-6e24-a955f0763c53",
+ "portsource": "97f86367-eafd-54f7-4951-8360862b846f",
+ "porttarget": "06fddad6-2abd-3413-6e24-a955f0763c53"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_74fc39e5-e3a6-4d45-aba3-47a4f3ebefdd",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "06fddad6-2abd-3413-6e24-a955f0763c53",
+ "target": "16102c94-c326-51c3-8636-3ae19b603483",
+ "portsource": "06fddad6-2abd-3413-6e24-a955f0763c53",
+ "porttarget": "16102c94-c326-51c3-8636-3ae19b603483"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_babcc71d-a57d-4eab-8a7d-00ed3ebace4d",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "06fddad6-2abd-3413-6e24-a955f0763c53",
+ "target": "0ddcc98c-7b7c-ac2e-2207-081c5ffc9921",
+ "portsource": "06fddad6-2abd-3413-6e24-a955f0763c53",
+ "porttarget": "0ddcc98c-7b7c-ac2e-2207-081c5ffc9921"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_4748dd11-8b9e-4711-ad2c-559fa08b434c",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "06fddad6-2abd-3413-6e24-a955f0763c53",
+ "target": "99f5cbe5-2c57-75ff-52b8-99e2baad068b",
+ "portsource": "06fddad6-2abd-3413-6e24-a955f0763c53",
+ "porttarget": "99f5cbe5-2c57-75ff-52b8-99e2baad068b"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_3d6abac3-210b-4911-b611-c4da62eac373",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "99f5cbe5-2c57-75ff-52b8-99e2baad068b",
+ "target": "8edd562b-196b-4f7e-37bf-a9e2072917b0",
+ "portsource": "99f5cbe5-2c57-75ff-52b8-99e2baad068b",
+ "porttarget": "8edd562b-196b-4f7e-37bf-a9e2072917b0"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_b1c1226d-07a8-430b-b51e-ff5acc6b31b9",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "06fddad6-2abd-3413-6e24-a955f0763c53",
+ "target": "b386ca2b-81a7-e365-4706-f955f13db03f",
+ "portsource": "06fddad6-2abd-3413-6e24-a955f0763c53",
+ "porttarget": "b386ca2b-81a7-e365-4706-f955f13db03f"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_64aacce4-61c0-4fb0-ae2c-98ac16b7a1ba",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "b386ca2b-81a7-e365-4706-f955f13db03f",
+ "target": "9190744c-1571-616b-e75e-1c00d977a78d",
+ "portsource": "b386ca2b-81a7-e365-4706-f955f13db03f",
+ "porttarget": "9190744c-1571-616b-e75e-1c00d977a78d"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_140f3876-d51d-49a0-8264-77916172591e",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "b386ca2b-81a7-e365-4706-f955f13db03f",
+ "target": "97f86367-eafd-54f7-4951-8360862b846f",
+ "portsource": "b386ca2b-81a7-e365-4706-f955f13db03f",
+ "porttarget": "97f86367-eafd-54f7-4951-8360862b846f"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_c24786d8-4a57-4381-91dd-33a4f6f4bc75",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "b386ca2b-81a7-e365-4706-f955f13db03f",
+ "target": "30c49899-09d0-818a-a71d-fd15346f65e5",
+ "portsource": "b386ca2b-81a7-e365-4706-f955f13db03f",
+ "porttarget": "30c49899-09d0-818a-a71d-fd15346f65e5"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_046f7232-2034-4cb4-867a-944e7f49cb33",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "30c49899-09d0-818a-a71d-fd15346f65e5",
+ "target": "5ea74092-08ec-6937-33c9-9f6fbe9226a2",
+ "portsource": "30c49899-09d0-818a-a71d-fd15346f65e5",
+ "porttarget": "5ea74092-08ec-6937-33c9-9f6fbe9226a2"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_848bd96f-a552-4328-a00b-507a4306e45a",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "30c49899-09d0-818a-a71d-fd15346f65e5",
+ "target": "9190744c-1571-616b-e75e-1c00d977a78d",
+ "portsource": "30c49899-09d0-818a-a71d-fd15346f65e5",
+ "porttarget": "9190744c-1571-616b-e75e-1c00d977a78d"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_3cf7fd91-0f93-419c-9282-53057b8e54b2",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "9190744c-1571-616b-e75e-1c00d977a78d",
+ "target": "aed099f2-5b0a-d59c-c297-9bac5ded0736",
+ "portsource": "9190744c-1571-616b-e75e-1c00d977a78d",
+ "porttarget": "aed099f2-5b0a-d59c-c297-9bac5ded0736"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_772832b9-1911-4c87-9aae-9223c893cd6b",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "aed099f2-5b0a-d59c-c297-9bac5ded0736",
+ "target": "ed36ef56-dd89-40e1-251c-09f13686eb66",
+ "portsource": "aed099f2-5b0a-d59c-c297-9bac5ded0736",
+ "porttarget": "ed36ef56-dd89-40e1-251c-09f13686eb66"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_cc0e8a61-15b5-42d9-a802-df79315915b2",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "ed36ef56-dd89-40e1-251c-09f13686eb66",
+ "target": "30c49899-09d0-818a-a71d-fd15346f65e5",
+ "portsource": "ed36ef56-dd89-40e1-251c-09f13686eb66",
+ "porttarget": "30c49899-09d0-818a-a71d-fd15346f65e5"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_b9a3e640-3adb-4dee-90b7-e55daa281fe1",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "ed36ef56-dd89-40e1-251c-09f13686eb66",
+ "target": "5ea74092-08ec-6937-33c9-9f6fbe9226a2",
+ "portsource": "ed36ef56-dd89-40e1-251c-09f13686eb66",
+ "porttarget": "5ea74092-08ec-6937-33c9-9f6fbe9226a2"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_ee5e0e03-9a31-4295-80fe-89e84be54c8d",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "e53126c9-70fe-ca8a-3b85-bab123a93d70",
+ "target": "7e30e3e1-7f31-1080-0970-22d019957584",
+ "portsource": "e53126c9-70fe-ca8a-3b85-bab123a93d70",
+ "porttarget": "7e30e3e1-7f31-1080-0970-22d019957584"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_895891e6-a989-41d8-b68f-98b569265445",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "7e30e3e1-7f31-1080-0970-22d019957584",
+ "target": "5ea74092-08ec-6937-33c9-9f6fbe9226a2",
+ "portsource": "7e30e3e1-7f31-1080-0970-22d019957584",
+ "porttarget": "5ea74092-08ec-6937-33c9-9f6fbe9226a2"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_b467800e-59de-4641-bf6a-be3961bef494",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "7e30e3e1-7f31-1080-0970-22d019957584",
+ "target": "ed36ef56-dd89-40e1-251c-09f13686eb66",
+ "portsource": "7e30e3e1-7f31-1080-0970-22d019957584",
+ "porttarget": "ed36ef56-dd89-40e1-251c-09f13686eb66"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_b7b70e38-ed91-4617-9348-e8876326415d",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "d9eeb201-2c9a-5afb-82a7-bc583b0f6628",
+ "target": "aed099f2-5b0a-d59c-c297-9bac5ded0736",
+ "portsource": "d9eeb201-2c9a-5afb-82a7-bc583b0f6628",
+ "porttarget": "aed099f2-5b0a-d59c-c297-9bac5ded0736"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_55c5a1f9-a0f3-4b6d-b503-e6b1dadfd9e1",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "d9eeb201-2c9a-5afb-82a7-bc583b0f6628",
+ "target": "889eedb3-8cb8-b906-8beb-904cd499c4f6",
+ "portsource": "d9eeb201-2c9a-5afb-82a7-bc583b0f6628",
+ "porttarget": "889eedb3-8cb8-b906-8beb-904cd499c4f6"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_7cd42c50-3ab0-4b02-b0f5-47195320cbc0",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "889eedb3-8cb8-b906-8beb-904cd499c4f6",
+ "target": "67ff3c4c-e646-5c50-0e37-16e9a39da28a",
+ "portsource": "889eedb3-8cb8-b906-8beb-904cd499c4f6",
+ "porttarget": "67ff3c4c-e646-5c50-0e37-16e9a39da28a"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_b510951f-f195-49f5-bc4b-581d44254fd2",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "67ff3c4c-e646-5c50-0e37-16e9a39da28a",
+ "target": "1eee479d-d3a1-44d9-316e-b70bc4556169",
+ "portsource": "67ff3c4c-e646-5c50-0e37-16e9a39da28a",
+ "porttarget": "1eee479d-d3a1-44d9-316e-b70bc4556169"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_6f43cab5-aa77-4014-9ca7-38f3c90022c3",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "1eee479d-d3a1-44d9-316e-b70bc4556169",
+ "target": "979162a0-08fc-54e2-0ba2-b54b2eb59266",
+ "portsource": "1eee479d-d3a1-44d9-316e-b70bc4556169",
+ "porttarget": "979162a0-08fc-54e2-0ba2-b54b2eb59266"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_9c9b7b95-2e0e-4b27-a512-8241a7248d0a",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "979162a0-08fc-54e2-0ba2-b54b2eb59266",
+ "target": "33f80abd-028e-ad1c-068b-33d5b40d9a93",
+ "portsource": "979162a0-08fc-54e2-0ba2-b54b2eb59266",
+ "porttarget": "33f80abd-028e-ad1c-068b-33d5b40d9a93"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_5791e1d8-3177-475b-81be-421244e2b109",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "33f80abd-028e-ad1c-068b-33d5b40d9a93",
+ "target": "607d3097-a2d2-ed9d-39dc-b5c8a12ea7eb",
+ "portsource": "33f80abd-028e-ad1c-068b-33d5b40d9a93",
+ "porttarget": "607d3097-a2d2-ed9d-39dc-b5c8a12ea7eb"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_3c041c55-63f9-493e-93df-a6cbf152df7a",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "607d3097-a2d2-ed9d-39dc-b5c8a12ea7eb",
+ "target": "1eee479d-d3a1-44d9-316e-b70bc4556169",
+ "portsource": "607d3097-a2d2-ed9d-39dc-b5c8a12ea7eb",
+ "porttarget": "1eee479d-d3a1-44d9-316e-b70bc4556169"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_fca7681c-7e66-4ba9-a221-bb5b5c1eb1d4",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "607d3097-a2d2-ed9d-39dc-b5c8a12ea7eb",
+ "target": "3a85e050-463c-f484-c100-9d39adb1a23e",
+ "portsource": "607d3097-a2d2-ed9d-39dc-b5c8a12ea7eb",
+ "porttarget": "3a85e050-463c-f484-c100-9d39adb1a23e"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_161660fb-270a-4504-b7af-e9b51ccb2ee7",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "3a85e050-463c-f484-c100-9d39adb1a23e",
+ "target": "f3fc754e-1421-a039-0ef0-c2d989db228e",
+ "portsource": "3a85e050-463c-f484-c100-9d39adb1a23e",
+ "porttarget": "f3fc754e-1421-a039-0ef0-c2d989db228e"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_e5c036c9-ecb1-49c4-ac47-60e35191eda0",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "f3fc754e-1421-a039-0ef0-c2d989db228e",
+ "target": "11284cd9-d716-52f7-20c7-5d1750de5309",
+ "portsource": "f3fc754e-1421-a039-0ef0-c2d989db228e",
+ "porttarget": "11284cd9-d716-52f7-20c7-5d1750de5309"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_c169a1c3-79a2-4f5c-91d2-87f193fa7fa4",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "f3fc754e-1421-a039-0ef0-c2d989db228e",
+ "target": "7078c4e8-4b4c-0563-9938-8af2c753f92c",
+ "portsource": "f3fc754e-1421-a039-0ef0-c2d989db228e",
+ "porttarget": "7078c4e8-4b4c-0563-9938-8af2c753f92c"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_e999105a-c621-46f5-a581-472950b8ec1f",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "889eedb3-8cb8-b906-8beb-904cd499c4f6",
+ "target": "7078c4e8-4b4c-0563-9938-8af2c753f92c",
+ "portsource": "889eedb3-8cb8-b906-8beb-904cd499c4f6",
+ "porttarget": "7078c4e8-4b4c-0563-9938-8af2c753f92c"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_f04db46d-e7cf-4a54-9534-085e72b3c60e",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "7078c4e8-4b4c-0563-9938-8af2c753f92c",
+ "target": "ed36ef56-dd89-40e1-251c-09f13686eb66",
+ "portsource": "7078c4e8-4b4c-0563-9938-8af2c753f92c",
+ "porttarget": "ed36ef56-dd89-40e1-251c-09f13686eb66"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_d3d7497f-a491-4f6a-8210-247cdd620d14",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "f3fc754e-1421-a039-0ef0-c2d989db228e",
+ "target": "7e30e3e1-7f31-1080-0970-22d019957584",
+ "portsource": "f3fc754e-1421-a039-0ef0-c2d989db228e",
+ "porttarget": "7e30e3e1-7f31-1080-0970-22d019957584"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_e87f1864-d675-4727-ae5c-2c03f411a895",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "115069e9-e7e3-51e4-da42-481b318e5f1f",
+ "target": "3a85e050-463c-f484-c100-9d39adb1a23e",
+ "portsource": "115069e9-e7e3-51e4-da42-481b318e5f1f",
+ "porttarget": "3a85e050-463c-f484-c100-9d39adb1a23e"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_c0293968-50cc-481a-8bc3-746d199ea0cc",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "3a85e050-463c-f484-c100-9d39adb1a23e",
+ "target": "889eedb3-8cb8-b906-8beb-904cd499c4f6",
+ "portsource": "3a85e050-463c-f484-c100-9d39adb1a23e",
+ "porttarget": "889eedb3-8cb8-b906-8beb-904cd499c4f6"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_4a31fca3-37cd-4ba4-820b-29995b074d4a",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "1eee479d-d3a1-44d9-316e-b70bc4556169",
+ "target": "889eedb3-8cb8-b906-8beb-904cd499c4f6",
+ "portsource": "1eee479d-d3a1-44d9-316e-b70bc4556169",
+ "porttarget": "889eedb3-8cb8-b906-8beb-904cd499c4f6"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_907db6cd-a798-4053-93e1-7ff0542248eb",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "889eedb3-8cb8-b906-8beb-904cd499c4f6",
+ "target": "607d3097-a2d2-ed9d-39dc-b5c8a12ea7eb",
+ "portsource": "889eedb3-8cb8-b906-8beb-904cd499c4f6",
+ "porttarget": "607d3097-a2d2-ed9d-39dc-b5c8a12ea7eb"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_be712e1f-3214-44c9-85ad-d7c6fb8388f3",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "607d3097-a2d2-ed9d-39dc-b5c8a12ea7eb",
+ "target": "db182fe4-ce6c-7869-72ce-7a4b11327e3a",
+ "portsource": "607d3097-a2d2-ed9d-39dc-b5c8a12ea7eb",
+ "porttarget": "db182fe4-ce6c-7869-72ce-7a4b11327e3a"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_824318ef-7b9d-41a5-acbe-2c606b22b933",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "db182fe4-ce6c-7869-72ce-7a4b11327e3a",
+ "target": "115069e9-e7e3-51e4-da42-481b318e5f1f",
+ "portsource": "db182fe4-ce6c-7869-72ce-7a4b11327e3a",
+ "porttarget": "115069e9-e7e3-51e4-da42-481b318e5f1f"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_8bdc25c9-1298-4f43-bf00-0eefa7248efb",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "f91d914e-6ab7-92cf-b16d-b9a7661e0044",
+ "target": "db182fe4-ce6c-7869-72ce-7a4b11327e3a",
+ "portsource": "f91d914e-6ab7-92cf-b16d-b9a7661e0044",
+ "porttarget": "db182fe4-ce6c-7869-72ce-7a4b11327e3a"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_42f52cd8-e4da-4678-9177-31f68e58e475",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "97d3df31-9033-96c4-359d-08ed397b29c4",
+ "target": "f91d914e-6ab7-92cf-b16d-b9a7661e0044",
+ "portsource": "97d3df31-9033-96c4-359d-08ed397b29c4",
+ "porttarget": "f91d914e-6ab7-92cf-b16d-b9a7661e0044"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_a075cf09-86b4-4f2f-a74e-b43f71d63e45",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "97d3df31-9033-96c4-359d-08ed397b29c4",
+ "target": "db182fe4-ce6c-7869-72ce-7a4b11327e3a",
+ "portsource": "97d3df31-9033-96c4-359d-08ed397b29c4",
+ "porttarget": "db182fe4-ce6c-7869-72ce-7a4b11327e3a"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_d8916a24-67a2-47c1-826d-c2b1c5420891",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "97d3df31-9033-96c4-359d-08ed397b29c4",
+ "target": "91966017-4d7f-7634-6823-1a405da45139",
+ "portsource": "97d3df31-9033-96c4-359d-08ed397b29c4",
+ "porttarget": "91966017-4d7f-7634-6823-1a405da45139"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_da3e69d1-815a-43af-b58c-29b6c553a2cc",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "91966017-4d7f-7634-6823-1a405da45139",
+ "target": "b45bf870-2439-dc1d-38f2-fc491752ff05",
+ "portsource": "91966017-4d7f-7634-6823-1a405da45139",
+ "porttarget": "b45bf870-2439-dc1d-38f2-fc491752ff05"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_293d250e-a942-4989-8b0e-e2ca124d7ada",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "91966017-4d7f-7634-6823-1a405da45139",
+ "target": "1998dad6-f944-21b8-11dc-05d4cebd39e6",
+ "portsource": "91966017-4d7f-7634-6823-1a405da45139",
+ "porttarget": "1998dad6-f944-21b8-11dc-05d4cebd39e6"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_9907d7b9-5c4d-4f76-81b0-1046a894669f",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "1998dad6-f944-21b8-11dc-05d4cebd39e6",
+ "target": "ffbd69bf-481f-faa8-73db-1489f3175b75",
+ "portsource": "1998dad6-f944-21b8-11dc-05d4cebd39e6",
+ "porttarget": "ffbd69bf-481f-faa8-73db-1489f3175b75"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_15a2f86b-c8be-42c1-b386-1a4a5a5b66d3",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "1998dad6-f944-21b8-11dc-05d4cebd39e6",
+ "target": "b45bf870-2439-dc1d-38f2-fc491752ff05",
+ "portsource": "1998dad6-f944-21b8-11dc-05d4cebd39e6",
+ "porttarget": "b45bf870-2439-dc1d-38f2-fc491752ff05"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_0e0092c8-cd77-440f-9c5c-4dfa34cf8cf5",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "1998dad6-f944-21b8-11dc-05d4cebd39e6",
+ "target": "45d5101e-e0a1-821c-37d6-378cbd632d55",
+ "portsource": "1998dad6-f944-21b8-11dc-05d4cebd39e6",
+ "porttarget": "45d5101e-e0a1-821c-37d6-378cbd632d55"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_18097a11-63cb-4cbb-bda4-49680f5e4784",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "45d5101e-e0a1-821c-37d6-378cbd632d55",
+ "target": "9e04da58-86d5-7fc8-e79e-3883f25b5c2d",
+ "portsource": "45d5101e-e0a1-821c-37d6-378cbd632d55",
+ "porttarget": "9e04da58-86d5-7fc8-e79e-3883f25b5c2d"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_0abf1634-c437-4682-8134-a97c8eebc475",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "9e04da58-86d5-7fc8-e79e-3883f25b5c2d",
+ "target": "5fdc6150-63bb-18e8-1f03-33bb8d6b7529",
+ "portsource": "9e04da58-86d5-7fc8-e79e-3883f25b5c2d",
+ "porttarget": "5fdc6150-63bb-18e8-1f03-33bb8d6b7529"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_70230b02-a73a-409f-902e-25781ffb57b8",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "5fdc6150-63bb-18e8-1f03-33bb8d6b7529",
+ "target": "45d5101e-e0a1-821c-37d6-378cbd632d55",
+ "portsource": "5fdc6150-63bb-18e8-1f03-33bb8d6b7529",
+ "porttarget": "45d5101e-e0a1-821c-37d6-378cbd632d55"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_af0dc488-8a4b-4832-8fc1-82e1bdaaeba7",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "5fdc6150-63bb-18e8-1f03-33bb8d6b7529",
+ "target": "73eceeb1-0069-9139-4398-5dffeb19bddf",
+ "portsource": "5fdc6150-63bb-18e8-1f03-33bb8d6b7529",
+ "porttarget": "73eceeb1-0069-9139-4398-5dffeb19bddf"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_aa962f4e-be54-4257-a0f1-69bcaa641958",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "3c910e69-2f8b-7beb-159c-da99ed4f6907",
+ "target": "45d5101e-e0a1-821c-37d6-378cbd632d55",
+ "portsource": "3c910e69-2f8b-7beb-159c-da99ed4f6907",
+ "porttarget": "45d5101e-e0a1-821c-37d6-378cbd632d55"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_6586f863-5bc9-4fd6-b6b8-786959eb8d0d",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "3c910e69-2f8b-7beb-159c-da99ed4f6907",
+ "target": "fb9ad239-d112-d0f9-ed9e-90db5f147e54",
+ "portsource": "3c910e69-2f8b-7beb-159c-da99ed4f6907",
+ "porttarget": "fb9ad239-d112-d0f9-ed9e-90db5f147e54"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_c4e0504c-890b-4d69-a54e-c28b0dbc8cd4",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "039bc70a-1d3c-4274-f0fa-dbf75aede9b7",
+ "target": "91966017-4d7f-7634-6823-1a405da45139",
+ "portsource": "039bc70a-1d3c-4274-f0fa-dbf75aede9b7",
+ "porttarget": "91966017-4d7f-7634-6823-1a405da45139"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_77b1eba9-d238-4e19-ab36-4e9c08189d1e",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "039bc70a-1d3c-4274-f0fa-dbf75aede9b7",
+ "target": "fb9ad239-d112-d0f9-ed9e-90db5f147e54",
+ "portsource": "039bc70a-1d3c-4274-f0fa-dbf75aede9b7",
+ "porttarget": "fb9ad239-d112-d0f9-ed9e-90db5f147e54"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_417e01b9-9d65-4e48-8b08-40237628227e",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "039bc70a-1d3c-4274-f0fa-dbf75aede9b7",
+ "target": "bd77a77c-4627-ad77-1c5a-2c390ba21959",
+ "portsource": "039bc70a-1d3c-4274-f0fa-dbf75aede9b7",
+ "porttarget": "bd77a77c-4627-ad77-1c5a-2c390ba21959"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_15a8b27e-0ae6-46ed-8c52-ecb79c67195c",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "bd77a77c-4627-ad77-1c5a-2c390ba21959",
+ "target": "7c4ed529-4da9-7eed-59fe-4590b57b2dfc",
+ "portsource": "bd77a77c-4627-ad77-1c5a-2c390ba21959",
+ "porttarget": "7c4ed529-4da9-7eed-59fe-4590b57b2dfc"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_0ab4d935-2d6c-4ae0-b758-9dbe91d0dfdb",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "7c4ed529-4da9-7eed-59fe-4590b57b2dfc",
+ "target": "73cc39db-10c0-542a-7d9f-198fa3e0975e",
+ "portsource": "7c4ed529-4da9-7eed-59fe-4590b57b2dfc",
+ "porttarget": "73cc39db-10c0-542a-7d9f-198fa3e0975e"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_afbff892-f334-4740-95cd-3a8ff0b7b2a4",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "73cc39db-10c0-542a-7d9f-198fa3e0975e",
+ "target": "b51264f6-8497-2eff-8d96-1264b5650804",
+ "portsource": "73cc39db-10c0-542a-7d9f-198fa3e0975e",
+ "porttarget": "b51264f6-8497-2eff-8d96-1264b5650804"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_b21ae3b2-0961-47e6-a915-c135932e11fa",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "b51264f6-8497-2eff-8d96-1264b5650804",
+ "target": "33f80abd-028e-ad1c-068b-33d5b40d9a93",
+ "portsource": "b51264f6-8497-2eff-8d96-1264b5650804",
+ "porttarget": "33f80abd-028e-ad1c-068b-33d5b40d9a93"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_9532405c-b438-4875-bbb2-70a4fcc3ef05",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "73cc39db-10c0-542a-7d9f-198fa3e0975e",
+ "target": "db182fe4-ce6c-7869-72ce-7a4b11327e3a",
+ "portsource": "73cc39db-10c0-542a-7d9f-198fa3e0975e",
+ "porttarget": "db182fe4-ce6c-7869-72ce-7a4b11327e3a"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_f15382bf-899f-46f0-894b-a00ce4c30dcd",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "039bc70a-1d3c-4274-f0fa-dbf75aede9b7",
+ "target": "7c4ed529-4da9-7eed-59fe-4590b57b2dfc",
+ "portsource": "039bc70a-1d3c-4274-f0fa-dbf75aede9b7",
+ "porttarget": "7c4ed529-4da9-7eed-59fe-4590b57b2dfc"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_b6679629-6f08-49ef-b35f-c71cbf1e72b0",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "7c4ed529-4da9-7eed-59fe-4590b57b2dfc",
+ "target": "97d3df31-9033-96c4-359d-08ed397b29c4",
+ "portsource": "7c4ed529-4da9-7eed-59fe-4590b57b2dfc",
+ "porttarget": "97d3df31-9033-96c4-359d-08ed397b29c4"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ },
+ {
+ "data": {
+ "id": "nwtE_b6679629-6f08-49ef-b35f-c71cbf7b8er5",
+ "class": "consumption",
+ "bendPointPositions": [],
+ "language": "PD",
+ "line-color": "#555555",
+ "width": 1.25,
+ "background-image": "",
+ "background-color": "#ffffff",
+ "cardinality": 0,
+ "source": "3c910e69-2f8b-7beb-159c-da99ed4f6907",
+ "target": "91966017-4d7f-7634-6823-1a405da45139",
+ "portsource": "3c910e69-2f8b-7beb-159c-da99ed4f6907",
+ "porttarget": "91966017-4d7f-7634-6823-1a405da45139"
+ },
+ "position": {},
+ "group": "edges",
+ "removed": false,
+ "selected": false,
+ "selectable": true,
+ "locked": false,
+ "grabbable": true,
+ "classes": ""
+ }
+ ]
+ },
+ "style": [
+ {
+ "selector": "node",
+ "style": {
+ "shape": "rectangle",
+ "text-halign": "center",
+ "text-valign": "bottom",
+ "background-color": "#ffffff",
+ "opacity": "1",
+ "border-color": "#ffffff",
+ "border-width": "0px"
+ }
+ },
+ {
+ "selector": "node[class = 'simple chemical']",
+ "style": {
+ "shape": "ellipse",
+ "background-color": "#c7eae5"
+ }
+ },
+ {
+ "selector": "node[class = 'macromolecule']",
+ "style": {
+ "shape": "roundrectangle",
+ }
+ },
+ {
+ "selector": "node[class = 'unspecified entity']",
+ "style": {
+ "shape": "ellipse",
+ "background-color": "#f5f5f5"
+ }
+ },
+ {
+ "selector": ":parent",
+ "style": {
+ "background-opacity": "0.333",
+ "text-valign": "bottom",
+ "shape": "barrel",
+ "text-margin-y": "2px",
+ "font-weight" : "bold",
+ "border-color": "#555555"
+ }
+ },
+ {
+ "selector": "node:selected",
+ "style": {
+ "background-color": "#33ff00",
+ "border-color": "#22ee00"
+ }
+ },
+ {
+ "selector": "edge",
+ "style": {
+ "curve-style": "bezier",
+ "width": "2px",
+ "line-color": "rgb(0,0,0)",
+ "opacity": "1",
+ "target-arrow-shape": "triangle",
+ "target-arrow-color": "rgb(0,0,0)",
+ "source-arrow-shape": "triangle",
+ "source-arrow-color": "rgb(0,0,0)",
+ }
+ },
+ {
+ "selector": "edge:selected",
+ "style": {
+ "line-color": "#33ff00",
+ "font-size": "13px",
+ "text-opacity": "1",
+ "text-rotation": "autorotate",
+ "color": "#33ff00",
+ "font-weight": "bold",
+ "text-background-shape": "roundrectangle",
+ "text-background-opacity": "1",
+ "text-background-padding": "2px",
+ "target-arrow-color": "#33ff00",
+ "target-arrow-shape": "triangle",
+ }
+ }
+ ],
+ "zoomingEnabled": true,
+ "userZoomingEnabled": true,
+ "zoom": 1.4731857231207923,
+ "minZoom": 0.125,
+ "maxZoom": 16,
+ "panningEnabled": true,
+ "userPanningEnabled": true,
+ "pan": {
+ "x": -419.9201536258538,
+ "y": -186.965642339959
+ },
+ "boxSelectionEnabled": true,
+ "renderer": {
+ "name": "canvas"
+ },
+ "wheelSensitivity": 0.1,
+ "motionBlur": true
+}
\ No newline at end of file
diff --git a/node_modules/cytoscape-fcose/demo/samples/wsn_constraints.js b/node_modules/cytoscape-fcose/demo/samples/wsn_constraints.js
new file mode 100644
index 00000000..f1471301
--- /dev/null
+++ b/node_modules/cytoscape-fcose/demo/samples/wsn_constraints.js
@@ -0,0 +1,102 @@
+wsn_constraints = {
+ "fixedNodeConstraint": [
+ {
+ "nodeId": "86f48f58-145d-92cc-0d33-aaf639984733",
+ "position": {
+ "x": 399,
+ "y": 139
+ }
+ },
+ {
+ "nodeId": "f91d914e-6ab7-92cf-b16d-b9a7661e0044",
+ "position": {
+ "x": 857,
+ "y": 340
+ }
+ },
+ {
+ "nodeId": "33f80abd-028e-ad1c-068b-33d5b40d9a93",
+ "position": {
+ "x": 1068,
+ "y": 288
+ }
+ },
+ {
+ "nodeId": "2b855d36-0c89-996d-9281-ea54f711cc8e",
+ "position": {
+ "x": 520,
+ "y": 518
+ }
+ },
+ {
+ "nodeId": "0ddcc98c-7b7c-ac2e-2207-081c5ffc9921",
+ "position": {
+ "x": 533,
+ "y": -37
+ }
+ },
+ {
+ "nodeId": "e53126c9-70fe-ca8a-3b85-bab123a93d70",
+ "position": {
+ "x": 816,
+ "y": 280
+ }
+ },
+ {
+ "nodeId": "4ca3044f-9b82-020b-e1cb-bbb45e4b0088",
+ "position": {
+ "x": 630,
+ "y": 205
+ }
+ },
+ {
+ "nodeId": "bc0420e3-9b6e-4c97-74c6-61278dbc18d4",
+ "position": {
+ "x": 507,
+ "y": 407
+ }
+ },
+ {
+ "nodeId": "a97f8f48-6652-7e09-8eda-2d87eae7d20b",
+ "position": {
+ "x": 323,
+ "y": 330
+ }
+ },
+ {
+ "nodeId": "889eedb3-8cb8-b906-8beb-904cd499c4f6",
+ "position": {
+ "x": 892,
+ "y": -55
+ }
+ },
+ {
+ "nodeId": "bd77a77c-4627-ad77-1c5a-2c390ba21959",
+ "position": {
+ "x": 1114,
+ "y": 570
+ }
+ },
+ {
+ "nodeId": "ffbd69bf-481f-faa8-73db-1489f3175b75",
+ "position": {
+ "x": 666,
+ "y": 533
+ }
+ },
+ {
+ "nodeId": "5fdc6150-63bb-18e8-1f03-33bb8d6b7529",
+ "position": {
+ "x": 726,
+ "y": 670
+ }
+ },
+ {
+ "nodeId": "b386ca2b-81a7-e365-4706-f955f13db03f",
+ "position": {
+ "x": 721,
+ "y": -36
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/node_modules/cytoscape-fcose/package.json b/node_modules/cytoscape-fcose/package.json
new file mode 100644
index 00000000..70f4bcd1
--- /dev/null
+++ b/node_modules/cytoscape-fcose/package.json
@@ -0,0 +1,57 @@
+{
+ "name": "cytoscape-fcose",
+ "version": "2.2.0",
+ "description": "The fCoSE layout for Cytoscape.js by Bilkent with fast compound node placement",
+ "main": "cytoscape-fcose.js",
+ "author": {
+ "name": "iVis-at-Bilkent"
+ },
+ "scripts": {
+ "copyright": "update license",
+ "lint": "eslint src",
+ "build": "cross-env NODE_ENV=production webpack",
+ "build:min": "cross-env NODE_ENV=production MIN=true webpack",
+ "build:release": "run-s build copyright",
+ "watch": "webpack --progress --watch",
+ "dev": "webpack-dev-server --open",
+ "test": "mocha"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/iVis-at-Bilkent/cytoscape.js-fcose.git"
+ },
+ "keywords": [
+ "cytoscape",
+ "cytoscape-extension"
+ ],
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/iVis-at-Bilkent/cytoscape.js-fcose/issues"
+ },
+ "homepage": "https://github.com/iVis-at-Bilkent/cytoscape.js-fcose",
+ "devDependencies": {
+ "babel-core": "^6.24.1",
+ "babel-loader": "^7.1.4",
+ "babel-preset-env": "^1.5.1",
+ "camelcase": "^6.2.0",
+ "chai": "4.0.2",
+ "cpy-cli": "^3.1.1",
+ "cross-env": "^7.0.3",
+ "eslint": "^7.26.0",
+ "gh-pages": "^1.0.0",
+ "mocha": "8.4.0",
+ "npm-run-all": "^4.1.2",
+ "rimraf": "^3.0.2",
+ "update": "^0.7.4",
+ "updater-license": "^1.0.0",
+ "webpack": "^5.37.0",
+ "webpack-cli": "^4.7.0",
+ "webpack-dev-server": "^3.11.2"
+ },
+ "peerDependencies": {
+ "cytoscape": "^3.2.0"
+ },
+ "dependencies": {
+ "cose-base": "^2.2.0"
+ }
+}
diff --git a/node_modules/cytoscape-fcose/src/assign.js b/node_modules/cytoscape-fcose/src/assign.js
new file mode 100644
index 00000000..9d020cf8
--- /dev/null
+++ b/node_modules/cytoscape-fcose/src/assign.js
@@ -0,0 +1,9 @@
+// Simple, internal Object.assign() polyfill for options objects etc.
+
+module.exports = Object.assign != null ? Object.assign.bind( Object ) : function( tgt, ...srcs ){
+ srcs.forEach( src => {
+ Object.keys( src ).forEach( k => tgt[k] = src[k] );
+ } );
+
+ return tgt;
+};
diff --git a/node_modules/cytoscape-fcose/src/fcose/auxiliary.js b/node_modules/cytoscape-fcose/src/fcose/auxiliary.js
new file mode 100644
index 00000000..bfd49b46
--- /dev/null
+++ b/node_modules/cytoscape-fcose/src/fcose/auxiliary.js
@@ -0,0 +1,269 @@
+/*
+ * Auxiliary functions
+ */
+
+const LinkedList = require('cose-base').layoutBase.LinkedList;
+
+let auxiliary = {};
+
+// get the top most nodes
+auxiliary.getTopMostNodes = function(nodes) {
+ let nodesMap = {};
+ for (let i = 0; i < nodes.length; i++) {
+ nodesMap[nodes[i].id()] = true;
+ }
+ let roots = nodes.filter(function (ele, i) {
+ if(typeof ele === "number") {
+ ele = i;
+ }
+ let parent = ele.parent()[0];
+ while(parent != null){
+ if(nodesMap[parent.id()]){
+ return false;
+ }
+ parent = parent.parent()[0];
+ }
+ return true;
+ });
+
+ return roots;
+};
+
+// find disconnected components and create dummy nodes that connect them
+auxiliary.connectComponents = function(cy, eles, topMostNodes, dummyNodes){
+ let queue = new LinkedList();
+ let visited = new Set();
+ let visitedTopMostNodes = [];
+ let currentNeighbor;
+ let minDegreeNode;
+ let minDegree;
+
+ let isConnected = false;
+ let count = 1;
+ let nodesConnectedToDummy = [];
+ let components = [];
+
+ do{
+ let cmpt = cy.collection();
+ components.push(cmpt);
+
+ let currentNode = topMostNodes[0];
+ let childrenOfCurrentNode = cy.collection();
+ childrenOfCurrentNode.merge(currentNode).merge(currentNode.descendants().intersection(eles));
+ visitedTopMostNodes.push(currentNode);
+
+ childrenOfCurrentNode.forEach(function(node) {
+ queue.push(node);
+ visited.add(node);
+ cmpt.merge(node);
+ });
+
+ while(queue.length != 0){
+ currentNode = queue.shift();
+
+ // Traverse all neighbors of this node
+ let neighborNodes = cy.collection();
+ currentNode.neighborhood().nodes().forEach(function(node){
+ if(eles.intersection(currentNode.edgesWith(node)).length > 0){
+ neighborNodes.merge(node);
+ }
+ });
+
+ for(let i = 0; i < neighborNodes.length; i++){
+ let neighborNode = neighborNodes[i];
+ currentNeighbor = topMostNodes.intersection(neighborNode.union(neighborNode.ancestors()));
+ if(currentNeighbor != null && !visited.has(currentNeighbor[0])){
+ let childrenOfNeighbor = currentNeighbor.union(currentNeighbor.descendants());
+
+ childrenOfNeighbor.forEach(function(node){
+ queue.push(node);
+ visited.add(node);
+ cmpt.merge(node);
+ if(topMostNodes.has(node)){
+ visitedTopMostNodes.push(node);
+ }
+ });
+
+ }
+ }
+ }
+
+ cmpt.forEach(node => {
+ eles.intersection(node.connectedEdges()).forEach(e => { // connectedEdges() usually cached
+ if( cmpt.has(e.source()) && cmpt.has(e.target()) ){ // has() is cheap
+ cmpt.merge(e);
+ }
+ });
+ });
+
+ if(visitedTopMostNodes.length == topMostNodes.length){
+ isConnected = true;
+ }
+
+ if(!isConnected || (isConnected && count > 1)){
+ minDegreeNode = visitedTopMostNodes[0];
+ minDegree = minDegreeNode.connectedEdges().length;
+ visitedTopMostNodes.forEach(function(node){
+ if(node.connectedEdges().length < minDegree){
+ minDegree = node.connectedEdges().length;
+ minDegreeNode = node;
+ }
+ });
+ nodesConnectedToDummy.push(minDegreeNode.id());
+ // TO DO: Check efficiency of this part
+ let temp = cy.collection();
+ temp.merge(visitedTopMostNodes[0]);
+ visitedTopMostNodes.forEach(function(node){
+ temp.merge(node);
+ });
+ visitedTopMostNodes = [];
+ topMostNodes = topMostNodes.difference(temp);
+ count++;
+ }
+
+ }
+ while(!isConnected);
+
+ if(dummyNodes){
+ if(nodesConnectedToDummy.length > 0 ){
+ dummyNodes.set('dummy'+(dummyNodes.size+1), nodesConnectedToDummy);
+ }
+ }
+ return components;
+};
+
+// relocates componentResult to originalCenter if there is no fixedNodeConstraint
+auxiliary.relocateComponent = function(originalCenter, componentResult, options) {
+ if (!options.fixedNodeConstraint) {
+ let minXCoord = Number.POSITIVE_INFINITY;
+ let maxXCoord = Number.NEGATIVE_INFINITY;
+ let minYCoord = Number.POSITIVE_INFINITY;
+ let maxYCoord = Number.NEGATIVE_INFINITY;
+ if (options.quality == "draft") {
+ // calculate current bounding box
+ for (let [key, value] of componentResult.nodeIndexes) {
+ let cyNode = options.cy.getElementById(key);
+ if (cyNode) {
+ let nodeBB = cyNode.boundingBox();
+ let leftX = componentResult.xCoords[value] - nodeBB.w / 2;
+ let rightX = componentResult.xCoords[value] + nodeBB.w / 2;
+ let topY = componentResult.yCoords[value] - nodeBB.h / 2;
+ let bottomY = componentResult.yCoords[value] + nodeBB.h / 2;
+
+ if (leftX < minXCoord)
+ minXCoord = leftX;
+ if (rightX > maxXCoord)
+ maxXCoord = rightX;
+ if (topY < minYCoord)
+ minYCoord = topY;
+ if (bottomY > maxYCoord)
+ maxYCoord = bottomY;
+ }
+ }
+ // find difference between current and original center
+ let diffOnX = originalCenter.x - (maxXCoord + minXCoord) / 2;
+ let diffOnY = originalCenter.y - (maxYCoord + minYCoord) / 2;
+ // move component to original center
+ componentResult.xCoords = componentResult.xCoords.map(x => x + diffOnX);
+ componentResult.yCoords = componentResult.yCoords.map(y => y + diffOnY);
+ }
+ else {
+ // calculate current bounding box
+ Object.keys(componentResult).forEach(function (item) {
+ let node = componentResult[item];
+ let leftX = node.getRect().x;
+ let rightX = node.getRect().x + node.getRect().width;
+ let topY = node.getRect().y;
+ let bottomY = node.getRect().y + node.getRect().height;
+
+ if (leftX < minXCoord)
+ minXCoord = leftX;
+ if (rightX > maxXCoord)
+ maxXCoord = rightX;
+ if (topY < minYCoord)
+ minYCoord = topY;
+ if (bottomY > maxYCoord)
+ maxYCoord = bottomY;
+ });
+ // find difference between current and original center
+ let diffOnX = originalCenter.x - (maxXCoord + minXCoord) / 2;
+ let diffOnY = originalCenter.y - (maxYCoord + minYCoord) / 2;
+ // move component to original center
+ Object.keys(componentResult).forEach(function (item) {
+ let node = componentResult[item];
+ node.setCenter(node.getCenterX() + diffOnX, node.getCenterY() + diffOnY);
+ });
+ }
+ }
+};
+
+auxiliary.calcBoundingBox = function(parentNode, xCoords, yCoords, nodeIndexes){
+ // calculate bounds
+ let left = Number.MAX_SAFE_INTEGER;
+ let right = Number.MIN_SAFE_INTEGER;
+ let top = Number.MAX_SAFE_INTEGER;
+ let bottom = Number.MIN_SAFE_INTEGER;
+ let nodeLeft;
+ let nodeRight;
+ let nodeTop;
+ let nodeBottom;
+
+ let nodes = parentNode.descendants().not(":parent");
+ let s = nodes.length;
+ for (let i = 0; i < s; i++)
+ {
+ let node = nodes[i];
+
+ nodeLeft = xCoords[nodeIndexes.get(node.id())] - node.width()/2;
+ nodeRight = xCoords[nodeIndexes.get(node.id())] + node.width()/2;
+ nodeTop = yCoords[nodeIndexes.get(node.id())] - node.height()/2;
+ nodeBottom = yCoords[nodeIndexes.get(node.id())] + node.height()/2;
+
+ if (left > nodeLeft)
+ {
+ left = nodeLeft;
+ }
+
+ if (right < nodeRight)
+ {
+ right = nodeRight;
+ }
+
+ if (top > nodeTop)
+ {
+ top = nodeTop;
+ }
+
+ if (bottom < nodeBottom)
+ {
+ bottom = nodeBottom;
+ }
+ }
+
+ let boundingBox = {};
+ boundingBox.topLeftX = left;
+ boundingBox.topLeftY = top;
+ boundingBox.width = right - left;
+ boundingBox.height = bottom - top;
+ return boundingBox;
+};
+
+// This function finds and returns parent nodes whose all children are hidden
+auxiliary.calcParentsWithoutChildren = function(cy, eles){
+ let parentsWithoutChildren = cy.collection();
+ eles.nodes(':parent').forEach((parent) => {
+ let check = false;
+ parent.children().forEach((child) => {
+ if(child.css('display') != 'none') {
+ check = true;
+ }
+ });
+ if(!check) {
+ parentsWithoutChildren.merge(parent);
+ }
+ });
+
+ return parentsWithoutChildren;
+}
+
+module.exports = auxiliary;
\ No newline at end of file
diff --git a/node_modules/cytoscape-fcose/src/fcose/cose.js b/node_modules/cytoscape-fcose/src/fcose/cose.js
new file mode 100644
index 00000000..634393f3
--- /dev/null
+++ b/node_modules/cytoscape-fcose/src/fcose/cose.js
@@ -0,0 +1,261 @@
+/**
+ The implementation of the postprocessing part that applies CoSE layout over the spectral layout
+*/
+
+const aux = require('./auxiliary');
+const CoSELayout = require('cose-base').CoSELayout;
+const CoSENode = require('cose-base').CoSENode;
+const PointD = require('cose-base').layoutBase.PointD;
+const DimensionD = require('cose-base').layoutBase.DimensionD;
+const LayoutConstants = require('cose-base').layoutBase.LayoutConstants;
+const FDLayoutConstants = require('cose-base').layoutBase.FDLayoutConstants;
+const CoSEConstants = require('cose-base').CoSEConstants;
+
+// main function that cose layout is processed
+let coseLayout = function(options, spectralResult){
+
+ let cy = options.cy;
+ let eles = options.eles;
+ let nodes = eles.nodes();
+ let edges = eles.edges();
+
+ let nodeIndexes;
+ let xCoords;
+ let yCoords;
+ let idToLNode = {};
+
+ if(options.randomize){
+ nodeIndexes = spectralResult["nodeIndexes"];
+ xCoords = spectralResult["xCoords"];
+ yCoords = spectralResult["yCoords"];
+ }
+
+ const isFn = fn => typeof fn === 'function';
+
+ const optFn = ( opt, ele ) => {
+ if( isFn( opt ) ){
+ return opt( ele );
+ } else {
+ return opt;
+ }
+ };
+
+ /**** Postprocessing functions ****/
+
+ let parentsWithoutChildren = aux.calcParentsWithoutChildren(cy, eles);
+
+ // transfer cytoscape nodes to cose nodes
+ let processChildrenList = function (parent, children, layout, options) {
+ let size = children.length;
+ for (let i = 0; i < size; i++) {
+ let theChild = children[i];
+ let children_of_children = null;
+ if(theChild.intersection(parentsWithoutChildren).length == 0) {
+ children_of_children = theChild.children();
+ }
+ let theNode;
+
+ let dimensions = theChild.layoutDimensions({
+ nodeDimensionsIncludeLabels: options.nodeDimensionsIncludeLabels
+ });
+
+ if (theChild.outerWidth() != null
+ && theChild.outerHeight() != null) {
+ if(options.randomize){
+ if(!theChild.isParent()){
+ theNode = parent.add(new CoSENode(layout.graphManager,
+ new PointD(xCoords[nodeIndexes.get(theChild.id())] - dimensions.w / 2, yCoords[nodeIndexes.get(theChild.id())] - dimensions.h / 2),
+ new DimensionD(parseFloat(dimensions.w), parseFloat(dimensions.h))));
+ }
+ else{
+ let parentInfo = aux.calcBoundingBox(theChild, xCoords, yCoords, nodeIndexes);
+ if(theChild.intersection(parentsWithoutChildren).length == 0) {
+ theNode = parent.add(new CoSENode(layout.graphManager,
+ new PointD(parentInfo.topLeftX, parentInfo.topLeftY),
+ new DimensionD(parentInfo.width, parentInfo.height)));
+ }
+ else { // for the parentsWithoutChildren
+ theNode = parent.add(new CoSENode(layout.graphManager,
+ new PointD(parentInfo.topLeftX, parentInfo.topLeftY),
+ new DimensionD(parseFloat(dimensions.w), parseFloat(dimensions.h))));
+ }
+ }
+ }
+ else{
+ theNode = parent.add(new CoSENode(layout.graphManager,
+ new PointD(theChild.position('x') - dimensions.w / 2, theChild.position('y') - dimensions.h / 2),
+ new DimensionD(parseFloat(dimensions.w), parseFloat(dimensions.h))));
+ }
+ }
+ else {
+ theNode = parent.add(new CoSENode(this.graphManager));
+ }
+ // Attach id to the layout node and repulsion value
+ theNode.id = theChild.data("id");
+ theNode.nodeRepulsion = optFn( options.nodeRepulsion, theChild );
+ // Attach the paddings of cy node to layout node
+ theNode.paddingLeft = parseInt( theChild.css('padding') );
+ theNode.paddingTop = parseInt( theChild.css('padding') );
+ theNode.paddingRight = parseInt( theChild.css('padding') );
+ theNode.paddingBottom = parseInt( theChild.css('padding') );
+
+ //Attach the label properties to both compound and simple nodes if labels will be included in node dimensions
+ //These properties will be used while updating bounds of compounds during iterations or tiling
+ //and will be used for simple nodes while transferring final positions to cytoscape
+ if(options.nodeDimensionsIncludeLabels){
+ theNode.labelWidth = theChild.boundingBox({ includeLabels: true, includeNodes: false, includeOverlays: false }).w;
+ theNode.labelHeight = theChild.boundingBox({ includeLabels: true, includeNodes: false, includeOverlays: false }).h;
+ theNode.labelPosVertical = theChild.css("text-valign");
+ theNode.labelPosHorizontal = theChild.css("text-halign");
+ }
+
+ // Map the layout node
+ idToLNode[theChild.data("id")] = theNode;
+
+ if (isNaN(theNode.rect.x)) {
+ theNode.rect.x = 0;
+ }
+
+ if (isNaN(theNode.rect.y)) {
+ theNode.rect.y = 0;
+ }
+
+ if (children_of_children != null && children_of_children.length > 0) {
+ let theNewGraph;
+ theNewGraph = layout.getGraphManager().add(layout.newGraph(), theNode);
+ processChildrenList(theNewGraph, children_of_children, layout, options);
+ }
+ }
+ };
+
+ // transfer cytoscape edges to cose edges
+ let processEdges = function(layout, gm, edges){
+ let idealLengthTotal = 0;
+ let edgeCount = 0;
+ for (let i = 0; i < edges.length; i++) {
+ let edge = edges[i];
+ let sourceNode = idToLNode[edge.data("source")];
+ let targetNode = idToLNode[edge.data("target")];
+ if(sourceNode && targetNode && sourceNode !== targetNode && sourceNode.getEdgesBetween(targetNode).length == 0){
+ let e1 = gm.add(layout.newEdge(), sourceNode, targetNode);
+ e1.id = edge.id();
+ e1.idealLength = optFn( options.idealEdgeLength, edge );
+ e1.edgeElasticity = optFn( options.edgeElasticity, edge );
+ idealLengthTotal += e1.idealLength;
+ edgeCount++;
+ }
+ }
+ // we need to update the ideal edge length constant with the avg. ideal length value after processing edges
+ // in case there is no edge, use other options
+ if (options.idealEdgeLength != null){
+ if (edgeCount > 0)
+ CoSEConstants.DEFAULT_EDGE_LENGTH = FDLayoutConstants.DEFAULT_EDGE_LENGTH = idealLengthTotal / edgeCount;
+ else if(!isFn(options.idealEdgeLength)) // in case there is no edge, but option gives a value to use
+ CoSEConstants.DEFAULT_EDGE_LENGTH = FDLayoutConstants.DEFAULT_EDGE_LENGTH = options.idealEdgeLength;
+ else // in case there is no edge and we cannot get a value from option (because it's a function)
+ CoSEConstants.DEFAULT_EDGE_LENGTH = FDLayoutConstants.DEFAULT_EDGE_LENGTH = 50;
+ // we need to update these constant values based on the ideal edge length constant
+ CoSEConstants.MIN_REPULSION_DIST = FDLayoutConstants.MIN_REPULSION_DIST = FDLayoutConstants.DEFAULT_EDGE_LENGTH / 10.0;
+ CoSEConstants.DEFAULT_RADIAL_SEPARATION = FDLayoutConstants.DEFAULT_EDGE_LENGTH;
+ }
+ };
+
+ // transfer cytoscape constraints to cose layout
+ let processConstraints = function(layout, options){
+ // get nodes to be fixed
+ if(options.fixedNodeConstraint){
+ layout.constraints["fixedNodeConstraint"] = options.fixedNodeConstraint;
+ }
+ // get nodes to be aligned
+ if(options.alignmentConstraint){
+ layout.constraints["alignmentConstraint"] = options.alignmentConstraint;
+ }
+ // get nodes to be relatively placed
+ if(options.relativePlacementConstraint){
+ layout.constraints["relativePlacementConstraint"] = options.relativePlacementConstraint;
+ }
+ };
+
+ /**** Apply postprocessing ****/
+ if (options.nestingFactor != null)
+ CoSEConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = options.nestingFactor;
+ if (options.gravity != null)
+ CoSEConstants.DEFAULT_GRAVITY_STRENGTH = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH = options.gravity;
+ if (options.numIter != null)
+ CoSEConstants.MAX_ITERATIONS = FDLayoutConstants.MAX_ITERATIONS = options.numIter;
+ if (options.gravityRange != null)
+ CoSEConstants.DEFAULT_GRAVITY_RANGE_FACTOR = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR = options.gravityRange;
+ if(options.gravityCompound != null)
+ CoSEConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = options.gravityCompound;
+ if(options.gravityRangeCompound != null)
+ CoSEConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = options.gravityRangeCompound;
+ if (options.initialEnergyOnIncremental != null)
+ CoSEConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = options.initialEnergyOnIncremental;
+
+ if (options.tilingCompareBy != null)
+ CoSEConstants.TILING_COMPARE_BY = options.tilingCompareBy;
+
+ if(options.quality == 'proof')
+ LayoutConstants.QUALITY = 2;
+ else
+ LayoutConstants.QUALITY = 0;
+
+ CoSEConstants.NODE_DIMENSIONS_INCLUDE_LABELS = FDLayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = options.nodeDimensionsIncludeLabels;
+ CoSEConstants.DEFAULT_INCREMENTAL = FDLayoutConstants.DEFAULT_INCREMENTAL = LayoutConstants.DEFAULT_INCREMENTAL =
+ !(options.randomize);
+ CoSEConstants.ANIMATE = FDLayoutConstants.ANIMATE = LayoutConstants.ANIMATE = options.animate;
+ CoSEConstants.TILE = options.tile;
+ CoSEConstants.TILING_PADDING_VERTICAL =
+ typeof options.tilingPaddingVertical === 'function' ? options.tilingPaddingVertical.call() : options.tilingPaddingVertical;
+ CoSEConstants.TILING_PADDING_HORIZONTAL =
+ typeof options.tilingPaddingHorizontal === 'function' ? options.tilingPaddingHorizontal.call() : options.tilingPaddingHorizontal;
+
+ CoSEConstants.DEFAULT_INCREMENTAL = FDLayoutConstants.DEFAULT_INCREMENTAL = LayoutConstants.DEFAULT_INCREMENTAL = true;
+ CoSEConstants.PURE_INCREMENTAL = !options.randomize;
+ LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES = options.uniformNodeDimensions;
+
+ // This part is for debug/demo purpose
+ if(options.step == "transformed"){
+ CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = true;
+ CoSEConstants.ENFORCE_CONSTRAINTS = false;
+ CoSEConstants.APPLY_LAYOUT = false;
+ }
+ if(options.step == "enforced"){
+ CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = false;
+ CoSEConstants.ENFORCE_CONSTRAINTS = true;
+ CoSEConstants.APPLY_LAYOUT = false;
+ }
+ if(options.step == "cose"){
+ CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = false;
+ CoSEConstants.ENFORCE_CONSTRAINTS = false;
+ CoSEConstants.APPLY_LAYOUT = true;
+ }
+ if(options.step == "all"){
+ if(options.randomize)
+ CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = true;
+ else
+ CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = false;
+ CoSEConstants.ENFORCE_CONSTRAINTS = true;
+ CoSEConstants.APPLY_LAYOUT = true;
+ }
+
+ if(options.fixedNodeConstraint || options.alignmentConstraint || options.relativePlacementConstraint){
+ CoSEConstants.TREE_REDUCTION_ON_INCREMENTAL = false;
+ }
+ else{
+ CoSEConstants.TREE_REDUCTION_ON_INCREMENTAL = true;
+ }
+
+ let coseLayout = new CoSELayout();
+ let gm = coseLayout.newGraphManager();
+
+ processChildrenList(gm.addRoot(), aux.getTopMostNodes(nodes), coseLayout, options);
+ processEdges(coseLayout, gm, edges);
+ processConstraints(coseLayout, options);
+
+ coseLayout.runLayout();
+
+ return idToLNode;
+};
+
+module.exports = { coseLayout };
diff --git a/node_modules/cytoscape-fcose/src/fcose/index.js b/node_modules/cytoscape-fcose/src/fcose/index.js
new file mode 100644
index 00000000..1cf03498
--- /dev/null
+++ b/node_modules/cytoscape-fcose/src/fcose/index.js
@@ -0,0 +1,414 @@
+/**
+ The implementation of the fcose layout algorithm
+*/
+
+const assign = require('../assign');
+const aux = require('./auxiliary');
+const { spectralLayout } = require('./spectral');
+const { coseLayout } = require('./cose');
+
+const defaults = Object.freeze({
+
+ // 'draft', 'default' or 'proof'
+ // - 'draft' only applies spectral layout
+ // - 'default' improves the quality with subsequent CoSE layout (fast cooling rate)
+ // - 'proof' improves the quality with subsequent CoSE layout (slow cooling rate)
+ quality: "default",
+ // Use random node positions at beginning of layout
+ // if this is set to false, then quality option must be "proof"
+ randomize: true,
+ // Whether or not to animate the layout
+ animate: true,
+ // Duration of animation in ms, if enabled
+ animationDuration: 1000,
+ // Easing of animation, if enabled
+ animationEasing: undefined,
+ // Fit the viewport to the repositioned nodes
+ fit: true,
+ // Padding around layout
+ padding: 30,
+ // Whether to include labels in node dimensions. Valid in "proof" quality
+ nodeDimensionsIncludeLabels: false,
+ // Whether or not simple nodes (non-compound nodes) are of uniform dimensions
+ uniformNodeDimensions: false,
+ // Whether to pack disconnected components - valid only if randomize: true
+ packComponents: true,
+ // Layout step - all, transformed, enforced, cose - for debug purpose only
+ step: "all",
+
+ /* spectral layout options */
+
+ // False for random, true for greedy
+ samplingType: true,
+ // Sample size to construct distance matrix
+ sampleSize: 25,
+ // Separation amount between nodes
+ nodeSeparation: 75,
+ // Power iteration tolerance
+ piTol: 0.0000001,
+
+ /* CoSE layout options */
+
+ // Node repulsion (non overlapping) multiplier
+ nodeRepulsion: node => 4500,
+ // Ideal edge (non nested) length
+ idealEdgeLength: edge => 50,
+ // Divisor to compute edge forces
+ edgeElasticity: edge => 0.45,
+ // Nesting factor (multiplier) to compute ideal edge length for nested edges
+ nestingFactor: 0.1,
+ // Gravity force (constant)
+ gravity: 0.25,
+ // Maximum number of iterations to perform
+ numIter: 2500,
+ // For enabling tiling
+ tile: true,
+ // The function that specifies the criteria for comparing nodes while sorting them during tiling operation.
+ // Takes the node id as a parameter and the default tiling operation is perfomed when this option is not set.
+ tilingCompareBy: undefined,
+ // Represents the amount of the vertical space to put between the zero degree members during the tiling operation(can also be a function)
+ tilingPaddingVertical: 10,
+ // Represents the amount of the horizontal space to put between the zero degree members during the tiling operation(can also be a function)
+ tilingPaddingHorizontal: 10,
+ // Gravity range (constant) for compounds
+ gravityRangeCompound: 1.5,
+ // Gravity force (constant) for compounds
+ gravityCompound: 1.0,
+ // Gravity range (constant)
+ gravityRange: 3.8,
+ // Initial cooling factor for incremental layout
+ initialEnergyOnIncremental: 0.3,
+
+ /* constraint options */
+
+ // Fix required nodes to predefined positions
+ // [{nodeId: 'n1', position: {x: 100, y: 200}, {...}]
+ fixedNodeConstraint: undefined,
+ // Align required nodes in vertical/horizontal direction
+ // {vertical: [['n1', 'n2')], ['n3', 'n4']], horizontal: ['n2', 'n4']}
+ alignmentConstraint: undefined,
+ // Place two nodes relatively in vertical/horizontal direction
+ // [{top: 'n1', bottom: 'n2', gap: 100}, {left: 'n3', right: 'n4', gap: 75}]
+ relativePlacementConstraint: undefined,
+
+ /* layout event callbacks */
+ ready: () => {}, // on layoutready
+ stop: () => {} // on layoutstop
+});
+
+class Layout {
+ constructor( options ){
+ this.options = assign( {}, defaults, options );
+ }
+
+ run(){
+ let layout = this;
+ let options = this.options;
+ let cy = options.cy;
+ let eles = options.eles;
+
+ let spectralResult = [];
+ let xCoords;
+ let yCoords;
+ let coseResult = [];
+ let components;
+ let componentCenters = [];
+
+ // basic validity check for constraint inputs
+ if(options.fixedNodeConstraint && (!Array.isArray(options.fixedNodeConstraint) || options.fixedNodeConstraint.length == 0)){
+ options.fixedNodeConstraint = undefined;
+ }
+
+ if(options.alignmentConstraint){
+ if(options.alignmentConstraint.vertical && (!Array.isArray(options.alignmentConstraint.vertical) || options.alignmentConstraint.vertical.length == 0)){
+ options.alignmentConstraint.vertical = undefined;
+ }
+ if(options.alignmentConstraint.horizontal && (!Array.isArray(options.alignmentConstraint.horizontal) || options.alignmentConstraint.horizontal.length == 0)){
+ options.alignmentConstraint.horizontal = undefined;
+ }
+
+ }
+
+ if(options.relativePlacementConstraint && (!Array.isArray(options.relativePlacementConstraint) || options.relativePlacementConstraint.length == 0)){
+ options.relativePlacementConstraint = undefined;
+ }
+
+ // if any constraint exists, set some options
+ let constraintExist = options.fixedNodeConstraint || options.alignmentConstraint || options.relativePlacementConstraint;
+ if(constraintExist){
+ // constraints work with these options
+ options.tile = false;
+ options.packComponents = false;
+ }
+
+ // decide component packing is enabled or not
+ let layUtil;
+ let packingEnabled = false;
+ if(cy.layoutUtilities && options.packComponents){
+ layUtil = cy.layoutUtilities("get");
+ if(!layUtil)
+ layUtil = cy.layoutUtilities();
+ packingEnabled = true;
+ }
+
+ if(eles.nodes().length > 0) {
+ // if packing is not enabled, perform layout on the whole graph
+ if(!packingEnabled){
+ // store component center
+ let boundingBox = options.eles.boundingBox();
+ componentCenters.push({x: boundingBox.x1 + boundingBox.w / 2, y: boundingBox.y1 + boundingBox.h / 2});
+ // apply spectral layout
+ if(options.randomize){
+ let result = spectralLayout(options);
+ spectralResult.push(result);
+ }
+ // apply cose layout as postprocessing
+ if(options.quality == "default" || options.quality == "proof"){
+ coseResult.push(coseLayout(options, spectralResult[0]));
+ aux.relocateComponent(componentCenters[0], coseResult[0], options); // relocate center to original position
+ }
+ else{
+ aux.relocateComponent(componentCenters[0], spectralResult[0], options); // relocate center to original position
+ }
+ }
+ else{ // packing is enabled
+ let topMostNodes = aux.getTopMostNodes(options.eles.nodes());
+ components = aux.connectComponents(cy, options.eles, topMostNodes);
+ // store component centers
+ components.forEach(function(component){
+ let boundingBox = component.boundingBox();
+ componentCenters.push({x: boundingBox.x1 + boundingBox.w / 2, y: boundingBox.y1 + boundingBox.h / 2});
+ });
+
+ //send each component to spectral layout if randomized
+ if(options.randomize){
+ components.forEach(function(component){
+ options.eles = component;
+ spectralResult.push(spectralLayout(options));
+ });
+ }
+
+ if(options.quality == "default" || options.quality == "proof"){
+ let toBeTiledNodes = cy.collection();
+ if(options.tile){ // behave nodes to be tiled as one component
+ let nodeIndexes = new Map();
+ let xCoords = [];
+ let yCoords = [];
+ let count = 0;
+ let tempSpectralResult = {nodeIndexes: nodeIndexes, xCoords: xCoords, yCoords: yCoords};
+ let indexesToBeDeleted = [];
+ components.forEach(function(component, index){
+ if(component.edges().length == 0){
+ component.nodes().forEach(function(node, i){
+ toBeTiledNodes.merge(component.nodes()[i]);
+ if(!node.isParent()){
+ tempSpectralResult.nodeIndexes.set(component.nodes()[i].id(), count++);
+ tempSpectralResult.xCoords.push(component.nodes()[0].position().x);
+ tempSpectralResult.yCoords.push(component.nodes()[0].position().y);
+ }
+ });
+ indexesToBeDeleted.push(index);
+ }
+ });
+ if(toBeTiledNodes.length > 1){
+ let boundingBox = toBeTiledNodes.boundingBox();
+ componentCenters.push({x: boundingBox.x1 + boundingBox.w / 2, y: boundingBox.y1 + boundingBox.h / 2});
+ components.push(toBeTiledNodes);
+ spectralResult.push(tempSpectralResult);
+ for(let i = indexesToBeDeleted.length-1; i >= 0; i--){
+ components.splice(indexesToBeDeleted[i], 1);
+ spectralResult.splice(indexesToBeDeleted[i], 1);
+ componentCenters.splice(indexesToBeDeleted[i], 1);
+ };
+ }
+ }
+ components.forEach(function(component, index){ // send each component to cose layout
+ options.eles = component;
+ coseResult.push(coseLayout(options, spectralResult[index]));
+ aux.relocateComponent(componentCenters[index], coseResult[index], options); // relocate center to original position
+ });
+ }
+ else {
+ components.forEach(function(component, index){
+ aux.relocateComponent(componentCenters[index], spectralResult[index], options); // relocate center to original position
+ });
+ }
+
+ // packing
+ let componentsEvaluated = new Set();
+ if(components.length > 1){
+ let subgraphs = [];
+ let hiddenEles = eles.filter((ele) => {return ele.css('display') == 'none'});
+ components.forEach(function(component, index){
+ let nodeIndexes;
+ if(options.quality == "draft"){
+ nodeIndexes = spectralResult[index].nodeIndexes;
+ }
+
+ if(component.nodes().not(hiddenEles).length > 0) {
+ let subgraph = {};
+ subgraph.edges = [];
+ subgraph.nodes = [];
+ let nodeIndex;
+ component.nodes().not(hiddenEles).forEach(function (node) {
+ if(options.quality == "draft"){
+ if(!node.isParent()){
+ nodeIndex = nodeIndexes.get(node.id());
+ subgraph.nodes.push({x: spectralResult[index].xCoords[nodeIndex] - node.boundingbox().w/2, y: spectralResult[index].yCoords[nodeIndex] - node.boundingbox().h/2, width: node.boundingbox().w, height: node.boundingbox().h});
+ }
+ else{
+ let parentInfo = aux.calcBoundingBox(node, spectralResult[index].xCoords, spectralResult[index].yCoords, nodeIndexes);
+ subgraph.nodes.push({x: parentInfo.topLeftX, y: parentInfo.topLeftY, width: parentInfo.width, height: parentInfo.height});
+ }
+ }
+ else{
+ if(coseResult[index][node.id()]) {
+ subgraph.nodes.push({x: coseResult[index][node.id()].getLeft(), y: coseResult[index][node.id()].getTop(), width: coseResult[index][node.id()].getWidth(), height: coseResult[index][node.id()].getHeight()});
+ }
+ }
+ });
+ component.edges().forEach(function (edge) {
+ let source = edge.source();
+ let target = edge.target();
+ if(source.css("display") != "none" && target.css("display") != "none") {
+ if(options.quality == "draft"){
+ let sourceNodeIndex = nodeIndexes.get(source.id());
+ let targetNodeIndex = nodeIndexes.get(target.id());
+ let sourceCenter = [];
+ let targetCenter = [];
+ if(source.isParent()){
+ let parentInfo = aux.calcBoundingBox(source, spectralResult[index].xCoords, spectralResult[index].yCoords, nodeIndexes);
+ sourceCenter.push(parentInfo.topLeftX + parentInfo.width / 2);
+ sourceCenter.push(parentInfo.topLeftY + parentInfo.height / 2);
+ }
+ else{
+ sourceCenter.push(spectralResult[index].xCoords[sourceNodeIndex]);
+ sourceCenter.push(spectralResult[index].yCoords[sourceNodeIndex]);
+ }
+ if(target.isParent()){
+ let parentInfo = aux.calcBoundingBox(target, spectralResult[index].xCoords, spectralResult[index].yCoords, nodeIndexes);
+ targetCenter.push(parentInfo.topLeftX + parentInfo.width / 2);
+ targetCenter.push(parentInfo.topLeftY + parentInfo.height / 2);
+ }
+ else{
+ targetCenter.push(spectralResult[index].xCoords[targetNodeIndex]);
+ targetCenter.push(spectralResult[index].yCoords[targetNodeIndex]);
+ }
+ subgraph.edges.push({startX: sourceCenter[0], startY: sourceCenter[1], endX: targetCenter[0], endY: targetCenter[1]});
+ }
+ else{
+ if(coseResult[index][source.id()] && coseResult[index][target.id()]) {
+ subgraph.edges.push({startX: coseResult[index][source.id()].getCenterX(), startY: coseResult[index][source.id()].getCenterY(), endX: coseResult[index][target.id()].getCenterX(), endY: coseResult[index][target.id()].getCenterY()});
+ }
+ }
+ }
+ });
+ if(subgraph.nodes.length > 0) {
+ subgraphs.push(subgraph);
+ componentsEvaluated.add(index);
+ }
+ }
+ });
+ let shiftResult = layUtil.packComponents(subgraphs, options.randomize).shifts;
+ if(options.quality == "draft"){
+ spectralResult.forEach(function(result, index){
+ let newXCoords = result.xCoords.map(x => x + shiftResult[index].dx);
+ let newYCoords = result.yCoords.map(y => y + shiftResult[index].dy);
+ result.xCoords = newXCoords;
+ result.yCoords = newYCoords;
+ });
+ }
+ else{
+ let count = 0;
+ componentsEvaluated.forEach((index) => {
+ Object.keys(coseResult[index]).forEach(function (item) {
+ let nodeRectangle = coseResult[index][item];
+ nodeRectangle.setCenter(nodeRectangle.getCenterX() + shiftResult[count].dx, nodeRectangle.getCenterY() + shiftResult[count].dy);
+ });
+ count++;
+ })
+ }
+ }
+ }
+ }
+
+ // get each element's calculated position
+ let getPositions = function(ele, i ){
+ if(options.quality == "default" || options.quality == "proof") {
+ if(typeof ele === "number") {
+ ele = i;
+ }
+ let pos;
+ let node;
+ let theId = ele.data('id');
+ coseResult.forEach(function(result){
+ if (theId in result){
+ pos = {x: result[theId].getRect().getCenterX(), y: result[theId].getRect().getCenterY()};
+ node = result[theId];
+ }
+ });
+ if(options.nodeDimensionsIncludeLabels){
+ if(node.labelWidth){
+ if(node.labelPosHorizontal == "left"){
+ pos.x += node.labelWidth/2;
+ }
+ else if(node.labelPosHorizontal == "right"){
+ pos.x -= node.labelWidth/2;
+ }
+ }
+ if(node.labelHeight){
+ if(node.labelPosVertical == "top"){
+ pos.y += node.labelHeight/2;
+ }
+ else if(node.labelPosVertical == "bottom"){
+ pos.y -= node.labelHeight/2;
+ }
+ }
+ }
+ if(pos == undefined)
+ pos = {x: ele.position("x"), y: ele.position("y")};
+ return {
+ x: pos.x,
+ y: pos.y
+ };
+ }
+ else{
+ let pos;
+ spectralResult.forEach(function(result){
+ let index = result.nodeIndexes.get(ele.id());
+ if(index != undefined){
+ pos = {x: result.xCoords[index], y: result.yCoords[index]};
+ }
+ });
+ if(pos == undefined)
+ pos = {x: ele.position("x"), y: ele.position("y")};
+ return {
+ x: pos.x,
+ y: pos.y
+ };
+ }
+ };
+
+ // quality = "draft" and randomize = false are contradictive so in that case positions don't change
+ if(options.quality == "default" || options.quality == "proof" || options.randomize) {
+ // transfer calculated positions to nodes (positions of only simple nodes are evaluated, compounds are positioned automatically)
+ let parentsWithoutChildren = aux.calcParentsWithoutChildren(cy, eles);
+ let hiddenEles = eles.filter((ele) => {return ele.css('display') == 'none'});
+ options.eles = eles.not(hiddenEles);
+
+ eles.nodes().not(":parent").not(hiddenEles).layoutPositions(layout, options, getPositions);
+
+ if(parentsWithoutChildren.length > 0){
+ parentsWithoutChildren.forEach((ele) => {
+ ele.position(getPositions(ele));
+ });
+ }
+ }
+ else{
+ console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.");
+ }
+
+ }
+}
+
+module.exports = Layout;
\ No newline at end of file
diff --git a/node_modules/cytoscape-fcose/src/fcose/spectral.js b/node_modules/cytoscape-fcose/src/fcose/spectral.js
new file mode 100644
index 00000000..f95ec0b9
--- /dev/null
+++ b/node_modules/cytoscape-fcose/src/fcose/spectral.js
@@ -0,0 +1,428 @@
+/**
+ The implementation of the spectral layout that is the first part of the fcose layout algorithm
+*/
+
+const aux = require('./auxiliary');
+const Matrix = require('cose-base').layoutBase.Matrix;
+const SVD = require('cose-base').layoutBase.SVD;
+
+// main function that spectral layout is processed
+let spectralLayout = function(options){
+
+ let cy = options.cy;
+ let eles = options.eles;
+ let nodes = eles.nodes();
+ let parentNodes = eles.nodes(":parent");
+
+ let dummyNodes = new Map(); // map to keep dummy nodes and their neighbors
+ let nodeIndexes = new Map(); // map to keep indexes to nodes
+ let parentChildMap = new Map(); // mapping btw. compound and its representative node
+ let allNodesNeighborhood = []; // array to keep neighborhood of all nodes
+ let xCoords = [];
+ let yCoords = [];
+
+ let samplesColumn = []; // sampled vertices
+ let minDistancesColumn = [];
+ let C = []; // column sampling matrix
+ let PHI = []; // intersection of column and row sampling matrices
+ let INV = []; // inverse of PHI
+
+ let firstSample; // the first sampled node
+ let nodeSize;
+
+ const infinity = 100000000;
+ const small = 0.000000001;
+
+ let piTol = options.piTol;
+ let samplingType = options.samplingType; // false for random, true for greedy
+ let nodeSeparation = options.nodeSeparation;
+ let sampleSize;
+
+ /**** Spectral-preprocessing functions ****/
+
+ /**** Spectral layout functions ****/
+
+ // determine which columns to be sampled
+ let randomSampleCR = function() {
+ let sample = 0;
+ let count = 0;
+ let flag = false;
+
+ while(count < sampleSize){
+ sample = Math.floor(Math.random() * nodeSize);
+
+ flag = false;
+ for(let i = 0; i < count; i++){
+ if(samplesColumn[i] == sample){
+ flag = true;
+ break;
+ }
+ }
+
+ if(!flag){
+ samplesColumn[count] = sample;
+ count++;
+ }
+ else{
+ continue;
+ }
+ }
+ };
+
+ // takes the index of the node(pivot) to initiate BFS as a parameter
+ let BFS = function(pivot, index, samplingMethod){
+ let path = []; // the front of the path
+ let front = 0; // the back of the path
+ let back = 0;
+ let current = 0;
+ let temp;
+ let distance = [];
+
+ let max_dist = 0; // the furthest node to be returned
+ let max_ind = 1;
+
+ for(let i = 0; i < nodeSize; i++){
+ distance[i] = infinity;
+ }
+
+ path[back] = pivot;
+ distance[pivot] = 0;
+
+ while(back >= front){
+ current = path[front++];
+ let neighbors = allNodesNeighborhood[current];
+ for(let i = 0; i < neighbors.length; i++){
+ temp = nodeIndexes.get(neighbors[i]);
+ if(distance[temp] == infinity){
+ distance[temp] = distance[current] + 1;
+ path[++back] = temp;
+ }
+ }
+ C[current][index] = distance[current] * nodeSeparation;
+ }
+
+ if(samplingMethod){
+ for(let i = 0; i < nodeSize; i++){
+ if(C[i][index] < minDistancesColumn[i])
+ minDistancesColumn[i] = C[i][index];
+ }
+
+ for(let i = 0; i < nodeSize; i++){
+ if(minDistancesColumn[i] > max_dist ){
+ max_dist = minDistancesColumn[i];
+ max_ind = i;
+
+ }
+ }
+ }
+ return max_ind;
+ };
+
+ // apply BFS to all nodes or selected samples
+ let allBFS = function(samplingMethod){
+
+ let sample;
+
+ if(!samplingMethod){
+ randomSampleCR();
+
+ // call BFS
+ for(let i = 0; i < sampleSize; i++){
+ BFS(samplesColumn[i], i, samplingMethod, false);
+ }
+ }
+ else{
+ sample = Math.floor(Math.random() * nodeSize);
+ firstSample = sample;
+
+ for(let i = 0; i < nodeSize; i++){
+ minDistancesColumn[i] = infinity;
+ }
+
+ for(let i = 0; i < sampleSize; i++){
+ samplesColumn[i] = sample;
+ sample = BFS(sample, i, samplingMethod);
+ }
+
+ }
+
+ // form the squared distances for C
+ for(let i = 0; i < nodeSize; i++){
+ for(let j = 0; j < sampleSize; j++){
+ C[i][j] *= C[i][j];
+ }
+ }
+
+ // form PHI
+ for(let i = 0; i < sampleSize; i++){
+ PHI[i] = [];
+ }
+
+ for(let i = 0; i < sampleSize; i++){
+ for(let j = 0; j < sampleSize; j++){
+ PHI[i][j] = C[samplesColumn[j]][i];
+ }
+ }
+ };
+
+ // perform the SVD algorithm and apply a regularization step
+ let sample = function(){
+
+ let SVDResult = SVD.svd(PHI);
+
+ let a_q = SVDResult.S;
+ let a_u = SVDResult.U;
+ let a_v = SVDResult.V;
+
+ let max_s = a_q[0]*a_q[0]*a_q[0];
+
+ let a_Sig = [];
+
+ // regularization
+ for(let i = 0; i < sampleSize; i++){
+ a_Sig[i] = [];
+ for(let j = 0; j < sampleSize; j++){
+ a_Sig[i][j] = 0;
+ if(i == j){
+ a_Sig[i][j] = a_q[i]/(a_q[i]*a_q[i] + max_s/(a_q[i]*a_q[i]));
+ }
+ }
+ }
+
+ INV = Matrix.multMat(Matrix.multMat(a_v, a_Sig), Matrix.transpose(a_u));
+
+ };
+
+ // calculate final coordinates
+ let powerIteration = function(){
+ // two largest eigenvalues
+ let theta1;
+ let theta2;
+
+ // initial guesses for eigenvectors
+ let Y1 = [];
+ let Y2 = [];
+
+ let V1 = [];
+ let V2 = [];
+
+ for(let i = 0; i < nodeSize; i++){
+ Y1[i] = Math.random();
+ Y2[i] = Math.random();
+ }
+
+ Y1 = Matrix.normalize(Y1);
+ Y2 = Matrix.normalize(Y2);
+
+ let count = 0;
+ // to keep track of the improvement ratio in power iteration
+ let current = small;
+ let previous = small;
+
+ let temp;
+
+ while(true){
+ count++;
+
+ for(let i = 0; i < nodeSize; i++){
+ V1[i] = Y1[i];
+ }
+
+ Y1 = Matrix.multGamma(Matrix.multL(Matrix.multGamma(V1), C, INV));
+ theta1 = Matrix.dotProduct(V1, Y1);
+ Y1 = Matrix.normalize(Y1);
+
+ current = Matrix.dotProduct(V1, Y1);
+
+ temp = Math.abs(current/previous);
+
+ if(temp <= 1 + piTol && temp >= 1){
+ break;
+ }
+
+ previous = current;
+ }
+
+ for(let i = 0; i < nodeSize; i++){
+ V1[i] = Y1[i];
+ }
+
+ count = 0;
+ previous = small;
+ while(true){
+ count++;
+
+ for(let i = 0; i < nodeSize; i++){
+ V2[i] = Y2[i];
+ }
+
+ V2 = Matrix.minusOp(V2, Matrix.multCons(V1, (Matrix.dotProduct(V1, V2))));
+ Y2 = Matrix.multGamma(Matrix.multL(Matrix.multGamma(V2), C, INV));
+ theta2 = Matrix.dotProduct(V2, Y2);
+ Y2 = Matrix.normalize(Y2);
+
+ current = Matrix.dotProduct(V2, Y2);
+
+ temp = Math.abs(current/previous);
+
+ if(temp <= 1 + piTol && temp >= 1){
+ break;
+ }
+
+ previous = current;
+ }
+
+ for(let i = 0; i < nodeSize; i++){
+ V2[i] = Y2[i];
+ }
+
+ // theta1 now contains dominant eigenvalue
+ // theta2 now contains the second-largest eigenvalue
+ // V1 now contains theta1's eigenvector
+ // V2 now contains theta2's eigenvector
+
+ //populate the two vectors
+ xCoords = Matrix.multCons(V1, Math.sqrt(Math.abs(theta1)));
+ yCoords = Matrix.multCons(V2, Math.sqrt(Math.abs(theta2)));
+
+ };
+
+ /**** Preparation for spectral layout (Preprocessing) ****/
+
+ // connect disconnected components (first top level, then inside of each compound node)
+ aux.connectComponents(cy, eles, aux.getTopMostNodes(nodes), dummyNodes);
+
+ parentNodes.forEach(function( ele ){
+ aux.connectComponents(cy, eles, aux.getTopMostNodes(ele.descendants().intersection(eles)), dummyNodes);
+ });
+
+ // assign indexes to nodes (first real, then dummy nodes)
+ let index = 0;
+ for(let i = 0; i < nodes.length; i++){
+ if(!nodes[i].isParent()){
+ nodeIndexes.set(nodes[i].id(), index++);
+ }
+ }
+
+ for (let key of dummyNodes.keys()) {
+ nodeIndexes.set(key, index++);
+ }
+
+ // instantiate the neighborhood matrix
+ for(let i = 0; i < nodeIndexes.size; i++){
+ allNodesNeighborhood[i] = [];
+ }
+
+ // form a parent-child map to keep representative node of each compound node
+ parentNodes.forEach(function( ele ){
+ let children = ele.children().intersection(eles);
+
+ // let random = 0;
+ while(children.nodes(":childless").length == 0){
+ // random = Math.floor(Math.random() * children.nodes().length); // if all children are compound then proceed randomly
+ children = children.nodes()[0].children().intersection(eles);
+ }
+ // select the representative node - we can apply different methods here
+ // random = Math.floor(Math.random() * children.nodes(":childless").length);
+ let index = 0;
+ let min = children.nodes(":childless")[0].connectedEdges().length;
+ children.nodes(":childless").forEach(function(ele2, i){
+ if(ele2.connectedEdges().length < min){
+ min = ele2.connectedEdges().length;
+ index = i;
+ }
+ });
+ parentChildMap.set(ele.id(), children.nodes(":childless")[index].id());
+ });
+
+ // add neighborhood relations (first real, then dummy nodes)
+ nodes.forEach(function( ele ){
+ let eleIndex;
+
+ if(ele.isParent())
+ eleIndex = nodeIndexes.get(parentChildMap.get(ele.id()));
+ else
+ eleIndex = nodeIndexes.get(ele.id());
+
+ ele.neighborhood().nodes().forEach(function(node){
+ if(eles.intersection(ele.edgesWith(node)).length > 0){
+ if(node.isParent())
+ allNodesNeighborhood[eleIndex].push(parentChildMap.get(node.id()));
+ else
+ allNodesNeighborhood[eleIndex].push(node.id());
+ }
+ });
+ });
+
+ for (let key of dummyNodes.keys()) {
+ let eleIndex = nodeIndexes.get(key);
+ let disconnectedId;
+ dummyNodes.get(key).forEach(function(id){
+ if(cy.getElementById(id).isParent())
+ disconnectedId = parentChildMap.get(id);
+ else
+ disconnectedId = id;
+
+ allNodesNeighborhood[eleIndex].push(disconnectedId);
+ allNodesNeighborhood[nodeIndexes.get(disconnectedId)].push(key);
+ });
+ }
+
+ // nodeSize now only considers the size of transformed graph
+ nodeSize = nodeIndexes.size;
+
+ let spectralResult;
+
+ // If number of nodes in transformed graph is 1 or 2, either SVD or powerIteration causes problem
+ // So skip spectral and layout the graph with cose
+ if(nodeSize > 2) {
+ // if # of nodes in transformed graph is smaller than sample size,
+ // then use # of nodes as sample size
+ sampleSize = nodeSize < options.sampleSize ? nodeSize : options.sampleSize;
+
+ // instantiates the partial matrices that will be used in spectral layout
+ for(let i = 0; i < nodeSize; i++){
+ C[i] = [];
+ }
+ for(let i = 0; i < sampleSize; i++){
+ INV[i] = [];
+ }
+
+ /**** Apply spectral layout ****/
+
+ if(options.quality == "draft" || options.step == "all"){
+ allBFS(samplingType);
+ sample();
+ powerIteration();
+
+ spectralResult = { nodeIndexes: nodeIndexes, xCoords: xCoords, yCoords: yCoords };
+ }
+ else{
+ nodeIndexes.forEach(function(value, key){
+ xCoords.push(cy.getElementById(key).position("x"));
+ yCoords.push(cy.getElementById(key).position("y"));
+ });
+ spectralResult = { nodeIndexes: nodeIndexes, xCoords: xCoords, yCoords: yCoords };
+ }
+ return spectralResult;
+ }
+ else {
+ let iterator = nodeIndexes.keys();
+ let firstNode = cy.getElementById(iterator.next().value);
+ let firstNodePos = firstNode.position();
+ let firstNodeWidth = firstNode.outerWidth();
+ xCoords.push(firstNodePos.x);
+ yCoords.push(firstNodePos.y);
+ if(nodeSize == 2){
+ let secondNode = cy.getElementById(iterator.next().value);
+ let secondNodeWidth = secondNode.outerWidth();
+ xCoords.push(firstNodePos.x + firstNodeWidth / 2 + secondNodeWidth / 2 + options.idealEdgeLength);
+ yCoords.push(firstNodePos.y);
+ }
+
+ spectralResult = { nodeIndexes: nodeIndexes, xCoords: xCoords, yCoords: yCoords };
+ return spectralResult;
+ }
+};
+
+module.exports = { spectralLayout };
\ No newline at end of file
diff --git a/node_modules/cytoscape-fcose/src/index.js b/node_modules/cytoscape-fcose/src/index.js
new file mode 100644
index 00000000..585c435c
--- /dev/null
+++ b/node_modules/cytoscape-fcose/src/index.js
@@ -0,0 +1,14 @@
+const impl = require('./fcose');
+
+// registers the extension on a cytoscape lib ref
+let register = function( cytoscape ){
+ if( !cytoscape ){ return; } // can't register if cytoscape unspecified
+
+ cytoscape( 'layout', 'fcose', impl ); // register with cytoscape.js
+};
+
+if( typeof cytoscape !== 'undefined' ){ // expose to global cytoscape (i.e. window.cytoscape)
+ register( cytoscape );
+}
+
+module.exports = register;
diff --git a/node_modules/cytoscape-fcose/test/example.js b/node_modules/cytoscape-fcose/test/example.js
new file mode 100644
index 00000000..2b907f27
--- /dev/null
+++ b/node_modules/cytoscape-fcose/test/example.js
@@ -0,0 +1,7 @@
+const chai = require('chai');
+
+describe('This', function(){
+ it('does that', function(){
+ expect( true ).to.be.true;
+ });
+});
diff --git a/node_modules/cytoscape-fcose/webpack.config.js b/node_modules/cytoscape-fcose/webpack.config.js
new file mode 100644
index 00000000..d39d5de2
--- /dev/null
+++ b/node_modules/cytoscape-fcose/webpack.config.js
@@ -0,0 +1,39 @@
+const path = require('path');
+const pkg = require('./package.json');
+const camelcase = require('camelcase');
+const process = require('process');
+const webpack = require('webpack');
+const env = process.env;
+const NODE_ENV = env.NODE_ENV;
+const MIN = env.MIN;
+const PROD = NODE_ENV === 'production';
+
+let config = {
+ devtool: PROD ? false : 'inline-source-map',
+ entry: './src/index.js',
+ output: {
+ path: path.join( __dirname ),
+ filename: pkg.name + '.js',
+ library: camelcase( pkg.name ),
+ libraryTarget: 'umd',
+ globalObject: 'this'
+ },
+ module: {
+ rules: [
+ { test: /\.js$/, exclude: /node_modules/, use: 'babel-loader' }
+ ]
+ },
+ optimization: {
+ minimize: MIN ? true : false,
+ },
+ externals: PROD ? {
+ 'cose-base': {
+ commonjs2: 'cose-base',
+ commonjs: 'cose-base',
+ amd: 'cose-base',
+ root: 'coseBase'
+ }
+ } : {}
+};
+
+module.exports = config;
diff --git a/node_modules/data-uri-to-buffer/README.md b/node_modules/data-uri-to-buffer/README.md
new file mode 100644
index 00000000..d0f2e059
--- /dev/null
+++ b/node_modules/data-uri-to-buffer/README.md
@@ -0,0 +1,88 @@
+data-uri-to-buffer
+==================
+### Generate a Buffer instance from a [Data URI][rfc] string
+[![Build Status](https://travis-ci.org/TooTallNate/node-data-uri-to-buffer.svg?branch=master)](https://travis-ci.org/TooTallNate/node-data-uri-to-buffer)
+
+This module accepts a ["data" URI][rfc] String of data, and returns a
+node.js `Buffer` instance with the decoded data.
+
+
+Installation
+------------
+
+Install with `npm`:
+
+``` bash
+$ npm install data-uri-to-buffer
+```
+
+
+Example
+-------
+
+``` js
+import dataUriToBuffer from 'data-uri-to-buffer';
+
+// plain-text data is supported
+let uri = 'data:,Hello%2C%20World!';
+let decoded = dataUriToBuffer(uri);
+console.log(decoded.toString());
+// 'Hello, World!'
+
+// base64-encoded data is supported
+uri = 'data:text/plain;base64,SGVsbG8sIFdvcmxkIQ%3D%3D';
+decoded = dataUriToBuffer(uri);
+console.log(decoded.toString());
+// 'Hello, World!'
+```
+
+
+API
+---
+
+### dataUriToBuffer(String uri) → Buffer
+
+The `type` property on the Buffer instance gets set to the main type portion of
+the "mediatype" portion of the "data" URI, or defaults to `"text/plain"` if not
+specified.
+
+The `typeFull` property on the Buffer instance gets set to the entire
+"mediatype" portion of the "data" URI (including all parameters), or defaults
+to `"text/plain;charset=US-ASCII"` if not specified.
+
+The `charset` property on the Buffer instance gets set to the Charset portion of
+the "mediatype" portion of the "data" URI, or defaults to `"US-ASCII"` if the
+entire type is not specified, or defaults to `""` otherwise.
+
+*Note*: If the only the main type is specified but not the charset, e.g.
+`"data:text/plain,abc"`, the charset is set to the empty string. The spec only
+defaults to US-ASCII as charset if the entire type is not specified.
+
+
+License
+-------
+
+(The MIT License)
+
+Copyright (c) 2014 Nathan Rajlich &lt;[email protected]&gt;
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+[rfc]: http://tools.ietf.org/html/rfc2397
diff --git a/node_modules/data-uri-to-buffer/package.json b/node_modules/data-uri-to-buffer/package.json
new file mode 100644
index 00000000..9e427132
--- /dev/null
+++ b/node_modules/data-uri-to-buffer/package.json
@@ -0,0 +1,62 @@
+{
+ "name": "data-uri-to-buffer",
+ "version": "4.0.1",
+ "description": "Generate a Buffer instance from a Data URI string",
+ "type": "module",
+ "exports": "./dist/index.js",
+ "main": "./dist/index.js",
+ "types": "./dist/index.d.ts",
+ "files": [
+ "dist",
+ "src"
+ ],
+ "scripts": {
+ "build": "tsc",
+ "test": "jest",
+ "prepublishOnly": "npm run build"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/TooTallNate/node-data-uri-to-buffer.git"
+ },
+ "engines": {
+ "node": ">= 12"
+ },
+ "keywords": [
+ "data",
+ "uri",
+ "datauri",
+ "data-uri",
+ "buffer",
+ "convert",
+ "rfc2397",
+ "2397"
+ ],
+ "author": "Nathan Rajlich <[email protected]> (http://n8.io/)",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/TooTallNate/node-data-uri-to-buffer/issues"
+ },
+ "homepage": "https://github.com/TooTallNate/node-data-uri-to-buffer",
+ "devDependencies": {
+ "@types/jest": "^27.0.2",
+ "@types/node": "^12.20.36",
+ "jest": "^27.3.1",
+ "ts-jest": "^27.0.7",
+ "typescript": "^4.4.4"
+ },
+ "jest": {
+ "preset": "ts-jest",
+ "globals": {
+ "ts-jest": {
+ "diagnostics": false,
+ "isolatedModules": true
+ }
+ },
+ "verbose": false,
+ "testEnvironment": "node",
+ "testMatch": [
+ "<rootDir>/test/**/*.test.ts"
+ ]
+ }
+}
diff --git a/node_modules/data-uri-to-buffer/src/index.ts b/node_modules/data-uri-to-buffer/src/index.ts
new file mode 100644
index 00000000..9e5749f8
--- /dev/null
+++ b/node_modules/data-uri-to-buffer/src/index.ts
@@ -0,0 +1,68 @@
+export interface MimeBuffer extends Buffer {
+ type: string;
+ typeFull: string;
+ charset: string;
+}
+
+/**
+ * Returns a `Buffer` instance from the given data URI `uri`.
+ *
+ * @param {String} uri Data URI to turn into a Buffer instance
+ * @returns {Buffer} Buffer instance from Data URI
+ * @api public
+ */
+export function dataUriToBuffer(uri: string): MimeBuffer {
+ if (!/^data:/i.test(uri)) {
+ throw new TypeError(
+ '`uri` does not appear to be a Data URI (must begin with "data:")'
+ );
+ }
+
+ // strip newlines
+ uri = uri.replace(/\r?\n/g, '');
+
+ // split the URI up into the "metadata" and the "data" portions
+ const firstComma = uri.indexOf(',');
+ if (firstComma === -1 || firstComma <= 4) {
+ throw new TypeError('malformed data: URI');
+ }
+
+ // remove the "data:" scheme and parse the metadata
+ const meta = uri.substring(5, firstComma).split(';');
+
+ let charset = '';
+ let base64 = false;
+ const type = meta[0] || 'text/plain';
+ let typeFull = type;
+ for (let i = 1; i < meta.length; i++) {
+ if (meta[i] === 'base64') {
+ base64 = true;
+ } else if(meta[i]) {
+ typeFull += `;${ meta[i]}`;
+ if (meta[i].indexOf('charset=') === 0) {
+ charset = meta[i].substring(8);
+ }
+ }
+ }
+ // defaults to US-ASCII only if type is not provided
+ if (!meta[0] && !charset.length) {
+ typeFull += ';charset=US-ASCII';
+ charset = 'US-ASCII';
+ }
+
+ // get the encoded data portion and decode URI-encoded chars
+ const encoding = base64 ? 'base64' : 'ascii';
+ const data = unescape(uri.substring(firstComma + 1));
+ const buffer = Buffer.from(data, encoding) as MimeBuffer;
+
+ // set `.type` and `.typeFull` properties to MIME type
+ buffer.type = type;
+ buffer.typeFull = typeFull;
+
+ // set the `.charset` property
+ buffer.charset = charset;
+
+ return buffer;
+}
+
+export default dataUriToBuffer;
diff --git a/node_modules/debug/LICENSE b/node_modules/debug/LICENSE
new file mode 100644
index 00000000..1a9820e2
--- /dev/null
+++ b/node_modules/debug/LICENSE
@@ -0,0 +1,20 @@
+(The MIT License)
+
+Copyright (c) 2014-2017 TJ Holowaychuk <[email protected]>
+Copyright (c) 2018-2021 Josh Junon
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software
+and associated documentation files (the 'Software'), to deal in the Software without restriction,
+including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial
+portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
+LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
diff --git a/node_modules/debug/README.md b/node_modules/debug/README.md
new file mode 100644
index 00000000..9ebdfbf1
--- /dev/null
+++ b/node_modules/debug/README.md
@@ -0,0 +1,481 @@
+# debug
+[![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers)
+[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors)
+
+<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
+
+A tiny JavaScript debugging utility modelled after Node.js core's debugging
+technique. Works in Node.js and web browsers.
+
+## Installation
+
+```bash
+$ npm install debug
+```
+
+## Usage
+
+`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole.
+
+Example [_app.js_](./examples/node/app.js):
+
+```js
+var debug = require('debug')('http')
+ , http = require('http')
+ , name = 'My App';
+
+// fake app
+
+debug('booting %o', name);
+
+http.createServer(function(req, res){
+ debug(req.method + ' ' + req.url);
+ res.end('hello\n');
+}).listen(3000, function(){
+ debug('listening');
+});
+
+// fake worker of some kind
+
+require('./worker');
+```
+
+Example [_worker.js_](./examples/node/worker.js):
+
+```js
+var a = require('debug')('worker:a')
+ , b = require('debug')('worker:b');
+
+function work() {
+ a('doing lots of uninteresting work');
+ setTimeout(work, Math.random() * 1000);
+}
+
+work();
+
+function workb() {
+ b('doing some work');
+ setTimeout(workb, Math.random() * 2000);
+}
+
+workb();
+```
+
+The `DEBUG` environment variable is then used to enable these based on space or
+comma-delimited names.
+
+Here are some examples:
+
+<img width="647" alt="screen shot 2017-08-08 at 12 53 04 pm" src="https://user-images.githubusercontent.com/71256/29091703-a6302cdc-7c38-11e7-8304-7c0b3bc600cd.png">
+<img width="647" alt="screen shot 2017-08-08 at 12 53 38 pm" src="https://user-images.githubusercontent.com/71256/29091700-a62a6888-7c38-11e7-800b-db911291ca2b.png">
+<img width="647" alt="screen shot 2017-08-08 at 12 53 25 pm" src="https://user-images.githubusercontent.com/71256/29091701-a62ea114-7c38-11e7-826a-2692bedca740.png">
+
+#### Windows command prompt notes
+
+##### CMD
+
+On Windows the environment variable is set using the `set` command.
+
+```cmd
+set DEBUG=*,-not_this
+```
+
+Example:
+
+```cmd
+set DEBUG=* & node app.js
+```
+
+##### PowerShell (VS Code default)
+
+PowerShell uses different syntax to set environment variables.
+
+```cmd
+$env:DEBUG = "*,-not_this"
+```
+
+Example:
+
+```cmd
+$env:DEBUG='app';node app.js
+```
+
+Then, run the program to be debugged as usual.
+
+npm script example:
+```js
+ "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js",
+```
+
+## Namespace Colors
+
+Every debug instance has a color generated for it based on its namespace name.
+This helps when visually parsing the debug output to identify which debug instance
+a debug line belongs to.
+
+#### Node.js
+
+In Node.js, colors are enabled when stderr is a TTY. You also _should_ install
+the [`supports-color`](https://npmjs.org/supports-color) module alongside debug,
+otherwise debug will only use a small handful of basic colors.
+
+<img width="521" src="https://user-images.githubusercontent.com/71256/29092181-47f6a9e6-7c3a-11e7-9a14-1928d8a711cd.png">
+
+#### Web Browser
+
+Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
+option. These are WebKit web inspectors, Firefox ([since version
+31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
+and the Firebug plugin for Firefox (any version).
+
+<img width="524" src="https://user-images.githubusercontent.com/71256/29092033-b65f9f2e-7c39-11e7-8e32-f6f0d8e865c1.png">
+
+
+## Millisecond diff
+
+When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
+
+<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
+
+When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below:
+
+<img width="647" src="https://user-images.githubusercontent.com/71256/29091956-6bd78372-7c39-11e7-8c55-c948396d6edd.png">
+
+
+## Conventions
+
+If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output.
+
+## Wildcards
+
+The `*` character may be used as a wildcard. Suppose for example your library has
+debuggers named "connect:bodyParser", "connect:compress", "connect:session",
+instead of listing all three with
+`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do
+`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
+
+You can also exclude specific debuggers by prefixing them with a "-" character.
+For example, `DEBUG=*,-connect:*` would include all debuggers except those
+starting with "connect:".
+
+## Environment Variables
+
+When running through Node.js, you can set a few environment variables that will
+change the behavior of the debug logging:
+
+| Name | Purpose |
+|-----------|-------------------------------------------------|
+| `DEBUG` | Enables/disables specific debugging namespaces. |
+| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). |
+| `DEBUG_COLORS`| Whether or not to use colors in the debug output. |
+| `DEBUG_DEPTH` | Object inspection depth. |
+| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. |
+
+
+__Note:__ The environment variables beginning with `DEBUG_` end up being
+converted into an Options object that gets used with `%o`/`%O` formatters.
+See the Node.js documentation for
+[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options)
+for the complete list.
+
+## Formatters
+
+Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting.
+Below are the officially supported formatters:
+
+| Formatter | Representation |
+|-----------|----------------|
+| `%O` | Pretty-print an Object on multiple lines. |
+| `%o` | Pretty-print an Object all on a single line. |
+| `%s` | String. |
+| `%d` | Number (both integer and float). |
+| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. |
+| `%%` | Single percent sign ('%'). This does not consume an argument. |
+
+
+### Custom formatters
+
+You can add custom formatters by extending the `debug.formatters` object.
+For example, if you wanted to add support for rendering a Buffer as hex with
+`%h`, you could do something like:
+
+```js
+const createDebug = require('debug')
+createDebug.formatters.h = (v) => {
+ return v.toString('hex')
+}
+
+// …elsewhere
+const debug = createDebug('foo')
+debug('this is hex: %h', new Buffer('hello world'))
+// foo this is hex: 68656c6c6f20776f726c6421 +0ms
+```
+
+
+## Browser Support
+
+You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify),
+or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest),
+if you don't want to build it yourself.
+
+Debug's enable state is currently persisted by `localStorage`.
+Consider the situation shown below where you have `worker:a` and `worker:b`,
+and wish to debug both. You can enable this using `localStorage.debug`:
+
+```js
+localStorage.debug = 'worker:*'
+```
+
+And then refresh the page.
+
+```js
+a = debug('worker:a');
+b = debug('worker:b');
+
+setInterval(function(){
+ a('doing some work');
+}, 1000);
+
+setInterval(function(){
+ b('doing some work');
+}, 1200);
+```
+
+In Chromium-based web browsers (e.g. Brave, Chrome, and Electron), the JavaScript console will—by default—only show messages logged by `debug` if the "Verbose" log level is _enabled_.
+
+<img width="647" src="https://user-images.githubusercontent.com/7143133/152083257-29034707-c42c-4959-8add-3cee850e6fcf.png">
+
+## Output streams
+
+ By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method:
+
+Example [_stdout.js_](./examples/node/stdout.js):
+
+```js
+var debug = require('debug');
+var error = debug('app:error');
+
+// by default stderr is used
+error('goes to stderr!');
+
+var log = debug('app:log');
+// set this namespace to log via console.log
+log.log = console.log.bind(console); // don't forget to bind to console!
+log('goes to stdout');
+error('still goes to stderr!');
+
+// set all output to go via console.info
+// overrides all per-namespace log settings
+debug.log = console.info.bind(console);
+error('now goes to stdout via console.info');
+log('still goes to stdout, but via console.info now');
+```
+
+## Extend
+You can simply extend debugger
+```js
+const log = require('debug')('auth');
+
+//creates new debug instance with extended namespace
+const logSign = log.extend('sign');
+const logLogin = log.extend('login');
+
+log('hello'); // auth hello
+logSign('hello'); //auth:sign hello
+logLogin('hello'); //auth:login hello
+```
+
+## Set dynamically
+
+You can also enable debug dynamically by calling the `enable()` method :
+
+```js
+let debug = require('debug');
+
+console.log(1, debug.enabled('test'));
+
+debug.enable('test');
+console.log(2, debug.enabled('test'));
+
+debug.disable();
+console.log(3, debug.enabled('test'));
+
+```
+
+print :
+```
+1 false
+2 true
+3 false
+```
+
+Usage :
+`enable(namespaces)`
+`namespaces` can include modes separated by a colon and wildcards.
+
+Note that calling `enable()` completely overrides previously set DEBUG variable :
+
+```
+$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))'
+=> false
+```
+
+`disable()`
+
+Will disable all namespaces. The functions returns the namespaces currently
+enabled (and skipped). This can be useful if you want to disable debugging
+temporarily without knowing what was enabled to begin with.
+
+For example:
+
+```js
+let debug = require('debug');
+debug.enable('foo:*,-foo:bar');
+let namespaces = debug.disable();
+debug.enable(namespaces);
+```
+
+Note: There is no guarantee that the string will be identical to the initial
+enable string, but semantically they will be identical.
+
+## Checking whether a debug target is enabled
+
+After you've created a debug instance, you can determine whether or not it is
+enabled by checking the `enabled` property:
+
+```javascript
+const debug = require('debug')('http');
+
+if (debug.enabled) {
+ // do stuff...
+}
+```
+
+You can also manually toggle this property to force the debug instance to be
+enabled or disabled.
+
+## Usage in child processes
+
+Due to the way `debug` detects if the output is a TTY or not, colors are not shown in child processes when `stderr` is piped. A solution is to pass the `DEBUG_COLORS=1` environment variable to the child process.
+For example:
+
+```javascript
+worker = fork(WORKER_WRAP_PATH, [workerPath], {
+ stdio: [
+ /* stdin: */ 0,
+ /* stdout: */ 'pipe',
+ /* stderr: */ 'pipe',
+ 'ipc',
+ ],
+ env: Object.assign({}, process.env, {
+ DEBUG_COLORS: 1 // without this settings, colors won't be shown
+ }),
+});
+
+worker.stderr.pipe(process.stderr, { end: false });
+```
+
+
+## Authors
+
+ - TJ Holowaychuk
+ - Nathan Rajlich
+ - Andrew Rhyne
+ - Josh Junon
+
+## Backers
+
+Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)]
+
+<a href="https://opencollective.com/debug/backer/0/website" target="_blank"><img src="https://opencollective.com/debug/backer/0/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/1/website" target="_blank"><img src="https://opencollective.com/debug/backer/1/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/2/website" target="_blank"><img src="https://opencollective.com/debug/backer/2/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/3/website" target="_blank"><img src="https://opencollective.com/debug/backer/3/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/4/website" target="_blank"><img src="https://opencollective.com/debug/backer/4/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/5/website" target="_blank"><img src="https://opencollective.com/debug/backer/5/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/6/website" target="_blank"><img src="https://opencollective.com/debug/backer/6/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/7/website" target="_blank"><img src="https://opencollective.com/debug/backer/7/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/8/website" target="_blank"><img src="https://opencollective.com/debug/backer/8/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/9/website" target="_blank"><img src="https://opencollective.com/debug/backer/9/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/10/website" target="_blank"><img src="https://opencollective.com/debug/backer/10/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/11/website" target="_blank"><img src="https://opencollective.com/debug/backer/11/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/12/website" target="_blank"><img src="https://opencollective.com/debug/backer/12/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/13/website" target="_blank"><img src="https://opencollective.com/debug/backer/13/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/14/website" target="_blank"><img src="https://opencollective.com/debug/backer/14/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/15/website" target="_blank"><img src="https://opencollective.com/debug/backer/15/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/16/website" target="_blank"><img src="https://opencollective.com/debug/backer/16/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/17/website" target="_blank"><img src="https://opencollective.com/debug/backer/17/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/18/website" target="_blank"><img src="https://opencollective.com/debug/backer/18/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/19/website" target="_blank"><img src="https://opencollective.com/debug/backer/19/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/20/website" target="_blank"><img src="https://opencollective.com/debug/backer/20/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/21/website" target="_blank"><img src="https://opencollective.com/debug/backer/21/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/22/website" target="_blank"><img src="https://opencollective.com/debug/backer/22/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/23/website" target="_blank"><img src="https://opencollective.com/debug/backer/23/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/24/website" target="_blank"><img src="https://opencollective.com/debug/backer/24/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/25/website" target="_blank"><img src="https://opencollective.com/debug/backer/25/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/26/website" target="_blank"><img src="https://opencollective.com/debug/backer/26/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/27/website" target="_blank"><img src="https://opencollective.com/debug/backer/27/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/28/website" target="_blank"><img src="https://opencollective.com/debug/backer/28/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/29/website" target="_blank"><img src="https://opencollective.com/debug/backer/29/avatar.svg"></a>
+
+
+## Sponsors
+
+Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)]
+
+<a href="https://opencollective.com/debug/sponsor/0/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/0/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/1/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/1/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/2/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/2/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/3/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/3/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/4/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/4/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/5/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/5/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/6/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/6/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/7/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/7/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/8/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/8/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/9/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/9/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/10/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/10/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/11/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/11/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/12/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/12/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/13/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/13/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/14/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/14/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/15/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/15/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/16/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/16/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/17/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/17/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/18/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/18/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/19/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/19/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/20/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/20/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/21/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/21/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/22/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/22/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/23/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/23/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/24/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/24/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/25/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/25/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/26/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/26/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/27/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/27/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/28/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/28/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/29/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/29/avatar.svg"></a>
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2014-2017 TJ Holowaychuk &lt;[email protected]&gt;
+Copyright (c) 2018-2021 Josh Junon
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/debug/package.json b/node_modules/debug/package.json
new file mode 100644
index 00000000..60dfcf57
--- /dev/null
+++ b/node_modules/debug/package.json
@@ -0,0 +1,65 @@
+{
+ "name": "debug",
+ "version": "4.4.0",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/debug-js/debug.git"
+ },
+ "description": "Lightweight debugging utility for Node.js and the browser",
+ "keywords": [
+ "debug",
+ "log",
+ "debugger"
+ ],
+ "files": [
+ "src",
+ "LICENSE",
+ "README.md"
+ ],
+ "author": "Josh Junon (https://github.com/qix-)",
+ "contributors": [
+ "TJ Holowaychuk <[email protected]>",
+ "Nathan Rajlich <[email protected]> (http://n8.io)",
+ "Andrew Rhyne <[email protected]>"
+ ],
+ "license": "MIT",
+ "scripts": {
+ "lint": "xo",
+ "test": "npm run test:node && npm run test:browser && npm run lint",
+ "test:node": "istanbul cover _mocha -- test.js test.node.js",
+ "test:browser": "karma start --single-run",
+ "test:coverage": "cat ./coverage/lcov.info | coveralls"
+ },
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "devDependencies": {
+ "brfs": "^2.0.1",
+ "browserify": "^16.2.3",
+ "coveralls": "^3.0.2",
+ "istanbul": "^0.4.5",
+ "karma": "^3.1.4",
+ "karma-browserify": "^6.0.0",
+ "karma-chrome-launcher": "^2.2.0",
+ "karma-mocha": "^1.3.0",
+ "mocha": "^5.2.0",
+ "mocha-lcov-reporter": "^1.2.0",
+ "sinon": "^14.0.0",
+ "xo": "^0.23.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ },
+ "main": "./src/index.js",
+ "browser": "./src/browser.js",
+ "engines": {
+ "node": ">=6.0"
+ },
+ "xo": {
+ "rules": {
+ "import/extensions": "off"
+ }
+ }
+}
diff --git a/node_modules/debug/src/browser.js b/node_modules/debug/src/browser.js
new file mode 100644
index 00000000..df8e179e
--- /dev/null
+++ b/node_modules/debug/src/browser.js
@@ -0,0 +1,272 @@
+/* eslint-env browser */
+
+/**
+ * This is the web browser implementation of `debug()`.
+ */
+
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+exports.storage = localstorage();
+exports.destroy = (() => {
+ let warned = false;
+
+ return () => {
+ if (!warned) {
+ warned = true;
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
+ }
+ };
+})();
+
+/**
+ * Colors.
+ */
+
+exports.colors = [
+ '#0000CC',
+ '#0000FF',
+ '#0033CC',
+ '#0033FF',
+ '#0066CC',
+ '#0066FF',
+ '#0099CC',
+ '#0099FF',
+ '#00CC00',
+ '#00CC33',
+ '#00CC66',
+ '#00CC99',
+ '#00CCCC',
+ '#00CCFF',
+ '#3300CC',
+ '#3300FF',
+ '#3333CC',
+ '#3333FF',
+ '#3366CC',
+ '#3366FF',
+ '#3399CC',
+ '#3399FF',
+ '#33CC00',
+ '#33CC33',
+ '#33CC66',
+ '#33CC99',
+ '#33CCCC',
+ '#33CCFF',
+ '#6600CC',
+ '#6600FF',
+ '#6633CC',
+ '#6633FF',
+ '#66CC00',
+ '#66CC33',
+ '#9900CC',
+ '#9900FF',
+ '#9933CC',
+ '#9933FF',
+ '#99CC00',
+ '#99CC33',
+ '#CC0000',
+ '#CC0033',
+ '#CC0066',
+ '#CC0099',
+ '#CC00CC',
+ '#CC00FF',
+ '#CC3300',
+ '#CC3333',
+ '#CC3366',
+ '#CC3399',
+ '#CC33CC',
+ '#CC33FF',
+ '#CC6600',
+ '#CC6633',
+ '#CC9900',
+ '#CC9933',
+ '#CCCC00',
+ '#CCCC33',
+ '#FF0000',
+ '#FF0033',
+ '#FF0066',
+ '#FF0099',
+ '#FF00CC',
+ '#FF00FF',
+ '#FF3300',
+ '#FF3333',
+ '#FF3366',
+ '#FF3399',
+ '#FF33CC',
+ '#FF33FF',
+ '#FF6600',
+ '#FF6633',
+ '#FF9900',
+ '#FF9933',
+ '#FFCC00',
+ '#FFCC33'
+];
+
+/**
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
+ * and the Firebug extension (any Firefox version) are known
+ * to support "%c" CSS customizations.
+ *
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
+ */
+
+// eslint-disable-next-line complexity
+function useColors() {
+ // NB: In an Electron preload script, document will be defined but not fully
+ // initialized. Since we know we're in Chrome, we'll just detect this case
+ // explicitly
+ if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
+ return true;
+ }
+
+ // Internet Explorer and Edge do not support colors.
+ if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
+ return false;
+ }
+
+ let m;
+
+ // Is webkit? http://stackoverflow.com/a/16459606/376773
+ // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
+ // eslint-disable-next-line no-return-assign
+ return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
+ // Is firebug? http://stackoverflow.com/a/398120/376773
+ (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
+ // Is firefox >= v31?
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
+ (typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31) ||
+ // Double check webkit in userAgent just in case we are in a worker
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
+}
+
+/**
+ * Colorize log arguments if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs(args) {
+ args[0] = (this.useColors ? '%c' : '') +
+ this.namespace +
+ (this.useColors ? ' %c' : ' ') +
+ args[0] +
+ (this.useColors ? '%c ' : ' ') +
+ '+' + module.exports.humanize(this.diff);
+
+ if (!this.useColors) {
+ return;
+ }
+
+ const c = 'color: ' + this.color;
+ args.splice(1, 0, c, 'color: inherit');
+
+ // The final "%c" is somewhat tricky, because there could be other
+ // arguments passed either before or after the %c, so we need to
+ // figure out the correct index to insert the CSS into
+ let index = 0;
+ let lastC = 0;
+ args[0].replace(/%[a-zA-Z%]/g, match => {
+ if (match === '%%') {
+ return;
+ }
+ index++;
+ if (match === '%c') {
+ // We only are interested in the *last* %c
+ // (the user may have provided their own)
+ lastC = index;
+ }
+ });
+
+ args.splice(lastC, 0, c);
+}
+
+/**
+ * Invokes `console.debug()` when available.
+ * No-op when `console.debug` is not a "function".
+ * If `console.debug` is not available, falls back
+ * to `console.log`.
+ *
+ * @api public
+ */
+exports.log = console.debug || console.log || (() => {});
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+function save(namespaces) {
+ try {
+ if (namespaces) {
+ exports.storage.setItem('debug', namespaces);
+ } else {
+ exports.storage.removeItem('debug');
+ }
+ } catch (error) {
+ // Swallow
+ // XXX (@Qix-) should we be logging these?
+ }
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+function load() {
+ let r;
+ try {
+ r = exports.storage.getItem('debug');
+ } catch (error) {
+ // Swallow
+ // XXX (@Qix-) should we be logging these?
+ }
+
+ // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
+ if (!r && typeof process !== 'undefined' && 'env' in process) {
+ r = process.env.DEBUG;
+ }
+
+ return r;
+}
+
+/**
+ * Localstorage attempts to return the localstorage.
+ *
+ * This is necessary because safari throws
+ * when a user disables cookies/localstorage
+ * and you attempt to access it.
+ *
+ * @return {LocalStorage}
+ * @api private
+ */
+
+function localstorage() {
+ try {
+ // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
+ // The Browser also has localStorage in the global context.
+ return localStorage;
+ } catch (error) {
+ // Swallow
+ // XXX (@Qix-) should we be logging these?
+ }
+}
+
+module.exports = require('./common')(exports);
+
+const {formatters} = module.exports;
+
+/**
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
+ */
+
+formatters.j = function (v) {
+ try {
+ return JSON.stringify(v);
+ } catch (error) {
+ return '[UnexpectedJSONParseError]: ' + error.message;
+ }
+};
diff --git a/node_modules/debug/src/common.js b/node_modules/debug/src/common.js
new file mode 100644
index 00000000..528c7ecf
--- /dev/null
+++ b/node_modules/debug/src/common.js
@@ -0,0 +1,292 @@
+
+/**
+ * This is the common logic for both the Node.js and web browser
+ * implementations of `debug()`.
+ */
+
+function setup(env) {
+ createDebug.debug = createDebug;
+ createDebug.default = createDebug;
+ createDebug.coerce = coerce;
+ createDebug.disable = disable;
+ createDebug.enable = enable;
+ createDebug.enabled = enabled;
+ createDebug.humanize = require('ms');
+ createDebug.destroy = destroy;
+
+ Object.keys(env).forEach(key => {
+ createDebug[key] = env[key];
+ });
+
+ /**
+ * The currently active debug mode names, and names to skip.
+ */
+
+ createDebug.names = [];
+ createDebug.skips = [];
+
+ /**
+ * Map of special "%n" handling functions, for the debug "format" argument.
+ *
+ * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
+ */
+ createDebug.formatters = {};
+
+ /**
+ * Selects a color for a debug namespace
+ * @param {String} namespace The namespace string for the debug instance to be colored
+ * @return {Number|String} An ANSI color code for the given namespace
+ * @api private
+ */
+ function selectColor(namespace) {
+ let hash = 0;
+
+ for (let i = 0; i < namespace.length; i++) {
+ hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
+ hash |= 0; // Convert to 32bit integer
+ }
+
+ return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
+ }
+ createDebug.selectColor = selectColor;
+
+ /**
+ * Create a debugger with the given `namespace`.
+ *
+ * @param {String} namespace
+ * @return {Function}
+ * @api public
+ */
+ function createDebug(namespace) {
+ let prevTime;
+ let enableOverride = null;
+ let namespacesCache;
+ let enabledCache;
+
+ function debug(...args) {
+ // Disabled?
+ if (!debug.enabled) {
+ return;
+ }
+
+ const self = debug;
+
+ // Set `diff` timestamp
+ const curr = Number(new Date());
+ const ms = curr - (prevTime || curr);
+ self.diff = ms;
+ self.prev = prevTime;
+ self.curr = curr;
+ prevTime = curr;
+
+ args[0] = createDebug.coerce(args[0]);
+
+ if (typeof args[0] !== 'string') {
+ // Anything else let's inspect with %O
+ args.unshift('%O');
+ }
+
+ // Apply any `formatters` transformations
+ let index = 0;
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
+ // If we encounter an escaped % then don't increase the array index
+ if (match === '%%') {
+ return '%';
+ }
+ index++;
+ const formatter = createDebug.formatters[format];
+ if (typeof formatter === 'function') {
+ const val = args[index];
+ match = formatter.call(self, val);
+
+ // Now we need to remove `args[index]` since it's inlined in the `format`
+ args.splice(index, 1);
+ index--;
+ }
+ return match;
+ });
+
+ // Apply env-specific formatting (colors, etc.)
+ createDebug.formatArgs.call(self, args);
+
+ const logFn = self.log || createDebug.log;
+ logFn.apply(self, args);
+ }
+
+ debug.namespace = namespace;
+ debug.useColors = createDebug.useColors();
+ debug.color = createDebug.selectColor(namespace);
+ debug.extend = extend;
+ debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
+
+ Object.defineProperty(debug, 'enabled', {
+ enumerable: true,
+ configurable: false,
+ get: () => {
+ if (enableOverride !== null) {
+ return enableOverride;
+ }
+ if (namespacesCache !== createDebug.namespaces) {
+ namespacesCache = createDebug.namespaces;
+ enabledCache = createDebug.enabled(namespace);
+ }
+
+ return enabledCache;
+ },
+ set: v => {
+ enableOverride = v;
+ }
+ });
+
+ // Env-specific initialization logic for debug instances
+ if (typeof createDebug.init === 'function') {
+ createDebug.init(debug);
+ }
+
+ return debug;
+ }
+
+ function extend(namespace, delimiter) {
+ const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
+ newDebug.log = this.log;
+ return newDebug;
+ }
+
+ /**
+ * Enables a debug mode by namespaces. This can include modes
+ * separated by a colon and wildcards.
+ *
+ * @param {String} namespaces
+ * @api public
+ */
+ function enable(namespaces) {
+ createDebug.save(namespaces);
+ createDebug.namespaces = namespaces;
+
+ createDebug.names = [];
+ createDebug.skips = [];
+
+ const split = (typeof namespaces === 'string' ? namespaces : '')
+ .trim()
+ .replace(' ', ',')
+ .split(',')
+ .filter(Boolean);
+
+ for (const ns of split) {
+ if (ns[0] === '-') {
+ createDebug.skips.push(ns.slice(1));
+ } else {
+ createDebug.names.push(ns);
+ }
+ }
+ }
+
+ /**
+ * Checks if the given string matches a namespace template, honoring
+ * asterisks as wildcards.
+ *
+ * @param {String} search
+ * @param {String} template
+ * @return {Boolean}
+ */
+ function matchesTemplate(search, template) {
+ let searchIndex = 0;
+ let templateIndex = 0;
+ let starIndex = -1;
+ let matchIndex = 0;
+
+ while (searchIndex < search.length) {
+ if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) {
+ // Match character or proceed with wildcard
+ if (template[templateIndex] === '*') {
+ starIndex = templateIndex;
+ matchIndex = searchIndex;
+ templateIndex++; // Skip the '*'
+ } else {
+ searchIndex++;
+ templateIndex++;
+ }
+ } else if (starIndex !== -1) { // eslint-disable-line no-negated-condition
+ // Backtrack to the last '*' and try to match more characters
+ templateIndex = starIndex + 1;
+ matchIndex++;
+ searchIndex = matchIndex;
+ } else {
+ return false; // No match
+ }
+ }
+
+ // Handle trailing '*' in template
+ while (templateIndex < template.length && template[templateIndex] === '*') {
+ templateIndex++;
+ }
+
+ return templateIndex === template.length;
+ }
+
+ /**
+ * Disable debug output.
+ *
+ * @return {String} namespaces
+ * @api public
+ */
+ function disable() {
+ const namespaces = [
+ ...createDebug.names,
+ ...createDebug.skips.map(namespace => '-' + namespace)
+ ].join(',');
+ createDebug.enable('');
+ return namespaces;
+ }
+
+ /**
+ * Returns true if the given mode name is enabled, false otherwise.
+ *
+ * @param {String} name
+ * @return {Boolean}
+ * @api public
+ */
+ function enabled(name) {
+ for (const skip of createDebug.skips) {
+ if (matchesTemplate(name, skip)) {
+ return false;
+ }
+ }
+
+ for (const ns of createDebug.names) {
+ if (matchesTemplate(name, ns)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Coerce `val`.
+ *
+ * @param {Mixed} val
+ * @return {Mixed}
+ * @api private
+ */
+ function coerce(val) {
+ if (val instanceof Error) {
+ return val.stack || val.message;
+ }
+ return val;
+ }
+
+ /**
+ * XXX DO NOT USE. This is a temporary stub function.
+ * XXX It WILL be removed in the next major release.
+ */
+ function destroy() {
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
+ }
+
+ createDebug.enable(createDebug.load());
+
+ return createDebug;
+}
+
+module.exports = setup;
diff --git a/node_modules/debug/src/index.js b/node_modules/debug/src/index.js
new file mode 100644
index 00000000..bf4c57f2
--- /dev/null
+++ b/node_modules/debug/src/index.js
@@ -0,0 +1,10 @@
+/**
+ * Detect Electron renderer / nwjs process, which is node, but we should
+ * treat as a browser.
+ */
+
+if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
+ module.exports = require('./browser.js');
+} else {
+ module.exports = require('./node.js');
+}
diff --git a/node_modules/debug/src/node.js b/node_modules/debug/src/node.js
new file mode 100644
index 00000000..715560a4
--- /dev/null
+++ b/node_modules/debug/src/node.js
@@ -0,0 +1,263 @@
+/**
+ * Module dependencies.
+ */
+
+const tty = require('tty');
+const util = require('util');
+
+/**
+ * This is the Node.js implementation of `debug()`.
+ */
+
+exports.init = init;
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+exports.destroy = util.deprecate(
+ () => {},
+ 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'
+);
+
+/**
+ * Colors.
+ */
+
+exports.colors = [6, 2, 3, 4, 5, 1];
+
+try {
+ // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
+ // eslint-disable-next-line import/no-extraneous-dependencies
+ const supportsColor = require('supports-color');
+
+ if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
+ exports.colors = [
+ 20,
+ 21,
+ 26,
+ 27,
+ 32,
+ 33,
+ 38,
+ 39,
+ 40,
+ 41,
+ 42,
+ 43,
+ 44,
+ 45,
+ 56,
+ 57,
+ 62,
+ 63,
+ 68,
+ 69,
+ 74,
+ 75,
+ 76,
+ 77,
+ 78,
+ 79,
+ 80,
+ 81,
+ 92,
+ 93,
+ 98,
+ 99,
+ 112,
+ 113,
+ 128,
+ 129,
+ 134,
+ 135,
+ 148,
+ 149,
+ 160,
+ 161,
+ 162,
+ 163,
+ 164,
+ 165,
+ 166,
+ 167,
+ 168,
+ 169,
+ 170,
+ 171,
+ 172,
+ 173,
+ 178,
+ 179,
+ 184,
+ 185,
+ 196,
+ 197,
+ 198,
+ 199,
+ 200,
+ 201,
+ 202,
+ 203,
+ 204,
+ 205,
+ 206,
+ 207,
+ 208,
+ 209,
+ 214,
+ 215,
+ 220,
+ 221
+ ];
+ }
+} catch (error) {
+ // Swallow - we only care if `supports-color` is available; it doesn't have to be.
+}
+
+/**
+ * Build up the default `inspectOpts` object from the environment variables.
+ *
+ * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
+ */
+
+exports.inspectOpts = Object.keys(process.env).filter(key => {
+ return /^debug_/i.test(key);
+}).reduce((obj, key) => {
+ // Camel-case
+ const prop = key
+ .substring(6)
+ .toLowerCase()
+ .replace(/_([a-z])/g, (_, k) => {
+ return k.toUpperCase();
+ });
+
+ // Coerce string value into JS value
+ let val = process.env[key];
+ if (/^(yes|on|true|enabled)$/i.test(val)) {
+ val = true;
+ } else if (/^(no|off|false|disabled)$/i.test(val)) {
+ val = false;
+ } else if (val === 'null') {
+ val = null;
+ } else {
+ val = Number(val);
+ }
+
+ obj[prop] = val;
+ return obj;
+}, {});
+
+/**
+ * Is stdout a TTY? Colored output is enabled when `true`.
+ */
+
+function useColors() {
+ return 'colors' in exports.inspectOpts ?
+ Boolean(exports.inspectOpts.colors) :
+ tty.isatty(process.stderr.fd);
+}
+
+/**
+ * Adds ANSI color escape codes if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs(args) {
+ const {namespace: name, useColors} = this;
+
+ if (useColors) {
+ const c = this.color;
+ const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
+ const prefix = ` ${colorCode};1m${name} \u001B[0m`;
+
+ args[0] = prefix + args[0].split('\n').join('\n' + prefix);
+ args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
+ } else {
+ args[0] = getDate() + name + ' ' + args[0];
+ }
+}
+
+function getDate() {
+ if (exports.inspectOpts.hideDate) {
+ return '';
+ }
+ return new Date().toISOString() + ' ';
+}
+
+/**
+ * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.
+ */
+
+function log(...args) {
+ return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\n');
+}
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+function save(namespaces) {
+ if (namespaces) {
+ process.env.DEBUG = namespaces;
+ } else {
+ // If you set a process.env field to null or undefined, it gets cast to the
+ // string 'null' or 'undefined'. Just delete instead.
+ delete process.env.DEBUG;
+ }
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+function load() {
+ return process.env.DEBUG;
+}
+
+/**
+ * Init logic for `debug` instances.
+ *
+ * Create a new `inspectOpts` object in case `useColors` is set
+ * differently for a particular `debug` instance.
+ */
+
+function init(debug) {
+ debug.inspectOpts = {};
+
+ const keys = Object.keys(exports.inspectOpts);
+ for (let i = 0; i < keys.length; i++) {
+ debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
+ }
+}
+
+module.exports = require('./common')(exports);
+
+const {formatters} = module.exports;
+
+/**
+ * Map %o to `util.inspect()`, all on a single line.
+ */
+
+formatters.o = function (v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts)
+ .split('\n')
+ .map(str => str.trim())
+ .join(' ');
+};
+
+/**
+ * Map %O to `util.inspect()`, allowing multiple lines if needed.
+ */
+
+formatters.O = function (v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts);
+};
diff --git a/node_modules/fetch-blob/LICENSE b/node_modules/fetch-blob/LICENSE
new file mode 100644
index 00000000..0d317232
--- /dev/null
+++ b/node_modules/fetch-blob/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2019 David Frank
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/fetch-blob/README.md b/node_modules/fetch-blob/README.md
new file mode 100644
index 00000000..fb3e1985
--- /dev/null
+++ b/node_modules/fetch-blob/README.md
@@ -0,0 +1,106 @@
+# fetch-blob
+
+[![npm version][npm-image]][npm-url]
+[![build status][ci-image]][ci-url]
+[![coverage status][codecov-image]][codecov-url]
+[![install size][install-size-image]][install-size-url]
+
+A Blob implementation in Node.js, originally from [node-fetch](https://github.com/node-fetch/node-fetch).
+
+## Installation
+
+```sh
+npm install fetch-blob
+```
+
+<details>
+ <summary>Upgrading from 2x to 3x</summary>
+
+ Updating from 2 to 3 should be a breeze since there is not many changes to the blob specification.
+ The major cause of a major release is coding standards.
+ - internal WeakMaps was replaced with private fields
+ - internal Buffer.from was replaced with TextEncoder/Decoder
+ - internal buffers was replaced with Uint8Arrays
+ - CommonJS was replaced with ESM
+ - The node stream returned by calling `blob.stream()` was replaced with whatwg streams
+ - (Read "Differences from other blobs" for more info.)
+
+</details>
+
+<details>
+ <summary>Differences from other Blobs</summary>
+
+ - Unlike NodeJS `buffer.Blob` (Added in: v15.7.0) and browser native Blob this polyfilled version can't be sent via PostMessage
+ - This blob version is more arbitrary, it can be constructed with blob parts that isn't a instance of itself
+ it has to look and behave as a blob to be accepted as a blob part.
+ - The benefit of this is that you can create other types of blobs that don't contain any internal data that has to be read in other ways, such as the `BlobDataItem` created in `from.js` that wraps a file path into a blob-like item and read lazily (nodejs plans to [implement this][fs-blobs] as well)
+ - The `blob.stream()` is the most noticeable differences. It returns a WHATWG stream now. to keep it as a node stream you would have to do:
+
+ ```js
+ import {Readable} from 'stream'
+ const stream = Readable.from(blob.stream())
+ ```
+</details>
+
+## Usage
+
+```js
+// Ways to import
+// (PS it's dependency free ESM package so regular http-import from CDN works too)
+import Blob from 'fetch-blob'
+import File from 'fetch-blob/file.js'
+
+import {Blob} from 'fetch-blob'
+import {File} from 'fetch-blob/file.js'
+
+const {Blob} = await import('fetch-blob')
+
+
+// Ways to read the blob:
+const blob = new Blob(['hello, world'])
+
+await blob.text()
+await blob.arrayBuffer()
+for await (let chunk of blob.stream()) { ... }
+blob.stream().getReader().read()
+blob.stream().getReader({mode: 'byob'}).read(view)
+```
+
+### Blob part backed up by filesystem
+
+`fetch-blob/from.js` comes packed with tools to convert any filepath into either a Blob or a File
+It will not read the content into memory. It will only stat the file for last modified date and file size.
+
+```js
+// The default export is sync and use fs.stat to retrieve size & last modified as a blob
+import blobFromSync from 'fetch-blob/from.js'
+import {File, Blob, blobFrom, blobFromSync, fileFrom, fileFromSync} from 'fetch-blob/from.js'
+
+const fsFile = fileFromSync('./2-GiB-file.bin', 'application/octet-stream')
+const fsBlob = await blobFrom('./2-GiB-file.mp4')
+
+// Not a 4 GiB memory snapshot, just holds references
+// points to where data is located on the disk
+const blob = new Blob([fsFile, fsBlob, 'memory', new Uint8Array(10)])
+console.log(blob.size) // ~4 GiB
+```
+
+`blobFrom|blobFromSync|fileFrom|fileFromSync(path, [mimetype])`
+
+### Creating Blobs backed up by other async sources
+Our Blob & File class are more generic then any other polyfills in the way that it can accept any blob look-a-like item
+An example of this is that our blob implementation can be constructed with parts coming from [BlobDataItem](https://github.com/node-fetch/fetch-blob/blob/8ef89adad40d255a3bbd55cf38b88597c1cd5480/from.js#L32) (aka a filepath) or from [buffer.Blob](https://nodejs.org/api/buffer.html#buffer_new_buffer_blob_sources_options), It dose not have to implement all the methods - just enough that it can be read/understood by our Blob implementation. The minium requirements is that it has `Symbol.toStringTag`, `size`, `slice()` and either a `stream()` or a `arrayBuffer()` method. If you then wrap it in our Blob or File `new Blob([blobDataItem])` then you get all of the other methods that should be implemented in a blob or file
+
+An example of this could be to create a file or blob like item coming from a remote HTTP request. Or from a DataBase
+
+See the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob) and [tests](https://github.com/node-fetch/fetch-blob/blob/master/test.js) for more details of how to use the Blob.
+
+[npm-image]: https://flat.badgen.net/npm/v/fetch-blob
+[npm-url]: https://www.npmjs.com/package/fetch-blob
+[ci-image]: https://github.com/node-fetch/fetch-blob/workflows/CI/badge.svg
+[ci-url]: https://github.com/node-fetch/fetch-blob/actions
+[codecov-image]: https://flat.badgen.net/codecov/c/github/node-fetch/fetch-blob/master
+[codecov-url]: https://codecov.io/gh/node-fetch/fetch-blob
+[install-size-image]: https://flat.badgen.net/packagephobia/install/fetch-blob
+[install-size-url]: https://packagephobia.now.sh/result?p=fetch-blob
+[fs-blobs]: https://github.com/nodejs/node/issues/37340
diff --git a/node_modules/fetch-blob/file.d.ts b/node_modules/fetch-blob/file.d.ts
new file mode 100644
index 00000000..d4b89bcf
--- /dev/null
+++ b/node_modules/fetch-blob/file.d.ts
@@ -0,0 +1,2 @@
+/** @type {typeof globalThis.File} */ export const File: typeof globalThis.File;
+export default File;
diff --git a/node_modules/fetch-blob/file.js b/node_modules/fetch-blob/file.js
new file mode 100644
index 00000000..7b26538f
--- /dev/null
+++ b/node_modules/fetch-blob/file.js
@@ -0,0 +1,49 @@
+import Blob from './index.js'
+
+const _File = class File extends Blob {
+ #lastModified = 0
+ #name = ''
+
+ /**
+ * @param {*[]} fileBits
+ * @param {string} fileName
+ * @param {{lastModified?: number, type?: string}} options
+ */// @ts-ignore
+ constructor (fileBits, fileName, options = {}) {
+ if (arguments.length < 2) {
+ throw new TypeError(`Failed to construct 'File': 2 arguments required, but only ${arguments.length} present.`)
+ }
+ super(fileBits, options)
+
+ if (options === null) options = {}
+
+ // Simulate WebIDL type casting for NaN value in lastModified option.
+ const lastModified = options.lastModified === undefined ? Date.now() : Number(options.lastModified)
+ if (!Number.isNaN(lastModified)) {
+ this.#lastModified = lastModified
+ }
+
+ this.#name = String(fileName)
+ }
+
+ get name () {
+ return this.#name
+ }
+
+ get lastModified () {
+ return this.#lastModified
+ }
+
+ get [Symbol.toStringTag] () {
+ return 'File'
+ }
+
+ static [Symbol.hasInstance] (object) {
+ return !!object && object instanceof Blob &&
+ /^(File)$/.test(object[Symbol.toStringTag])
+ }
+}
+
+/** @type {typeof globalThis.File} */// @ts-ignore
+export const File = _File
+export default File
diff --git a/node_modules/fetch-blob/from.d.ts b/node_modules/fetch-blob/from.d.ts
new file mode 100644
index 00000000..530b99bf
--- /dev/null
+++ b/node_modules/fetch-blob/from.d.ts
@@ -0,0 +1,26 @@
+export default blobFromSync;
+/**
+ * @param {string} path filepath on the disk
+ * @param {string} [type] mimetype to use
+ */
+export function blobFromSync(path: string, type?: string): Blob;
+import File from "./file.js";
+import Blob from "./index.js";
+/**
+ * @param {string} path filepath on the disk
+ * @param {string} [type] mimetype to use
+ * @returns {Promise<Blob>}
+ */
+export function blobFrom(path: string, type?: string): Promise<Blob>;
+/**
+ * @param {string} path filepath on the disk
+ * @param {string} [type] mimetype to use
+ * @returns {Promise<File>}
+ */
+export function fileFrom(path: string, type?: string): Promise<File>;
+/**
+ * @param {string} path filepath on the disk
+ * @param {string} [type] mimetype to use
+ */
+export function fileFromSync(path: string, type?: string): File;
+export { File, Blob };
diff --git a/node_modules/fetch-blob/from.js b/node_modules/fetch-blob/from.js
new file mode 100644
index 00000000..9eaf8bfc
--- /dev/null
+++ b/node_modules/fetch-blob/from.js
@@ -0,0 +1,100 @@
+import { statSync, createReadStream, promises as fs } from 'node:fs'
+import { basename } from 'node:path'
+import DOMException from 'node-domexception'
+
+import File from './file.js'
+import Blob from './index.js'
+
+const { stat } = fs
+
+/**
+ * @param {string} path filepath on the disk
+ * @param {string} [type] mimetype to use
+ */
+const blobFromSync = (path, type) => fromBlob(statSync(path), path, type)
+
+/**
+ * @param {string} path filepath on the disk
+ * @param {string} [type] mimetype to use
+ * @returns {Promise<Blob>}
+ */
+const blobFrom = (path, type) => stat(path).then(stat => fromBlob(stat, path, type))
+
+/**
+ * @param {string} path filepath on the disk
+ * @param {string} [type] mimetype to use
+ * @returns {Promise<File>}
+ */
+const fileFrom = (path, type) => stat(path).then(stat => fromFile(stat, path, type))
+
+/**
+ * @param {string} path filepath on the disk
+ * @param {string} [type] mimetype to use
+ */
+const fileFromSync = (path, type) => fromFile(statSync(path), path, type)
+
+// @ts-ignore
+const fromBlob = (stat, path, type = '') => new Blob([new BlobDataItem({
+ path,
+ size: stat.size,
+ lastModified: stat.mtimeMs,
+ start: 0
+})], { type })
+
+// @ts-ignore
+const fromFile = (stat, path, type = '') => new File([new BlobDataItem({
+ path,
+ size: stat.size,
+ lastModified: stat.mtimeMs,
+ start: 0
+})], basename(path), { type, lastModified: stat.mtimeMs })
+
+/**
+ * This is a blob backed up by a file on the disk
+ * with minium requirement. Its wrapped around a Blob as a blobPart
+ * so you have no direct access to this.
+ *
+ * @private
+ */
+class BlobDataItem {
+ #path
+ #start
+
+ constructor (options) {
+ this.#path = options.path
+ this.#start = options.start
+ this.size = options.size
+ this.lastModified = options.lastModified
+ }
+
+ /**
+ * Slicing arguments is first validated and formatted
+ * to not be out of range by Blob.prototype.slice
+ */
+ slice (start, end) {
+ return new BlobDataItem({
+ path: this.#path,
+ lastModified: this.lastModified,
+ size: end - start,
+ start: this.#start + start
+ })
+ }
+
+ async * stream () {
+ const { mtimeMs } = await stat(this.#path)
+ if (mtimeMs > this.lastModified) {
+ throw new DOMException('The requested file could not be read, typically due to permission problems that have occurred after a reference to a file was acquired.', 'NotReadableError')
+ }
+ yield * createReadStream(this.#path, {
+ start: this.#start,
+ end: this.#start + this.size - 1
+ })
+ }
+
+ get [Symbol.toStringTag] () {
+ return 'Blob'
+ }
+}
+
+export default blobFromSync
+export { File, Blob, blobFrom, blobFromSync, fileFrom, fileFromSync }
diff --git a/node_modules/fetch-blob/index.d.ts b/node_modules/fetch-blob/index.d.ts
new file mode 100644
index 00000000..7a689577
--- /dev/null
+++ b/node_modules/fetch-blob/index.d.ts
@@ -0,0 +1,3 @@
+/** @type {typeof globalThis.Blob} */
+export const Blob: typeof globalThis.Blob;
+export default Blob;
diff --git a/node_modules/fetch-blob/index.js b/node_modules/fetch-blob/index.js
new file mode 100644
index 00000000..2542ac26
--- /dev/null
+++ b/node_modules/fetch-blob/index.js
@@ -0,0 +1,250 @@
+/*! fetch-blob. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
+
+// TODO (jimmywarting): in the feature use conditional loading with top level await (requires 14.x)
+// Node has recently added whatwg stream into core
+
+import './streams.cjs'
+
+// 64 KiB (same size chrome slice theirs blob into Uint8array's)
+const POOL_SIZE = 65536
+
+/** @param {(Blob | Uint8Array)[]} parts */
+async function * toIterator (parts, clone = true) {
+ for (const part of parts) {
+ if ('stream' in part) {
+ yield * (/** @type {AsyncIterableIterator<Uint8Array>} */ (part.stream()))
+ } else if (ArrayBuffer.isView(part)) {
+ if (clone) {
+ let position = part.byteOffset
+ const end = part.byteOffset + part.byteLength
+ while (position !== end) {
+ const size = Math.min(end - position, POOL_SIZE)
+ const chunk = part.buffer.slice(position, position + size)
+ position += chunk.byteLength
+ yield new Uint8Array(chunk)
+ }
+ } else {
+ yield part
+ }
+ /* c8 ignore next 10 */
+ } else {
+ // For blobs that have arrayBuffer but no stream method (nodes buffer.Blob)
+ let position = 0, b = (/** @type {Blob} */ (part))
+ while (position !== b.size) {
+ const chunk = b.slice(position, Math.min(b.size, position + POOL_SIZE))
+ const buffer = await chunk.arrayBuffer()
+ position += buffer.byteLength
+ yield new Uint8Array(buffer)
+ }
+ }
+ }
+}
+
+const _Blob = class Blob {
+ /** @type {Array.<(Blob|Uint8Array)>} */
+ #parts = []
+ #type = ''
+ #size = 0
+ #endings = 'transparent'
+
+ /**
+ * The Blob() constructor returns a new Blob object. The content
+ * of the blob consists of the concatenation of the values given
+ * in the parameter array.
+ *
+ * @param {*} blobParts
+ * @param {{ type?: string, endings?: string }} [options]
+ */
+ constructor (blobParts = [], options = {}) {
+ if (typeof blobParts !== 'object' || blobParts === null) {
+ throw new TypeError('Failed to construct \'Blob\': The provided value cannot be converted to a sequence.')
+ }
+
+ if (typeof blobParts[Symbol.iterator] !== 'function') {
+ throw new TypeError('Failed to construct \'Blob\': The object must have a callable @@iterator property.')
+ }
+
+ if (typeof options !== 'object' && typeof options !== 'function') {
+ throw new TypeError('Failed to construct \'Blob\': parameter 2 cannot convert to dictionary.')
+ }
+
+ if (options === null) options = {}
+
+ const encoder = new TextEncoder()
+ for (const element of blobParts) {
+ let part
+ if (ArrayBuffer.isView(element)) {
+ part = new Uint8Array(element.buffer.slice(element.byteOffset, element.byteOffset + element.byteLength))
+ } else if (element instanceof ArrayBuffer) {
+ part = new Uint8Array(element.slice(0))
+ } else if (element instanceof Blob) {
+ part = element
+ } else {
+ part = encoder.encode(`${element}`)
+ }
+
+ this.#size += ArrayBuffer.isView(part) ? part.byteLength : part.size
+ this.#parts.push(part)
+ }
+
+ this.#endings = `${options.endings === undefined ? 'transparent' : options.endings}`
+ const type = options.type === undefined ? '' : String(options.type)
+ this.#type = /^[\x20-\x7E]*$/.test(type) ? type : ''
+ }
+
+ /**
+ * The Blob interface's size property returns the
+ * size of the Blob in bytes.
+ */
+ get size () {
+ return this.#size
+ }
+
+ /**
+ * The type property of a Blob object returns the MIME type of the file.
+ */
+ get type () {
+ return this.#type
+ }
+
+ /**
+ * The text() method in the Blob interface returns a Promise
+ * that resolves with a string containing the contents of
+ * the blob, interpreted as UTF-8.
+ *
+ * @return {Promise<string>}
+ */
+ async text () {
+ // More optimized than using this.arrayBuffer()
+ // that requires twice as much ram
+ const decoder = new TextDecoder()
+ let str = ''
+ for await (const part of toIterator(this.#parts, false)) {
+ str += decoder.decode(part, { stream: true })
+ }
+ // Remaining
+ str += decoder.decode()
+ return str
+ }
+
+ /**
+ * The arrayBuffer() method in the Blob interface returns a
+ * Promise that resolves with the contents of the blob as
+ * binary data contained in an ArrayBuffer.
+ *
+ * @return {Promise<ArrayBuffer>}
+ */
+ async arrayBuffer () {
+ // Easier way... Just a unnecessary overhead
+ // const view = new Uint8Array(this.size);
+ // await this.stream().getReader({mode: 'byob'}).read(view);
+ // return view.buffer;
+
+ const data = new Uint8Array(this.size)
+ let offset = 0
+ for await (const chunk of toIterator(this.#parts, false)) {
+ data.set(chunk, offset)
+ offset += chunk.length
+ }
+
+ return data.buffer
+ }
+
+ stream () {
+ const it = toIterator(this.#parts, true)
+
+ return new globalThis.ReadableStream({
+ // @ts-ignore
+ type: 'bytes',
+ async pull (ctrl) {
+ const chunk = await it.next()
+ chunk.done ? ctrl.close() : ctrl.enqueue(chunk.value)
+ },
+
+ async cancel () {
+ await it.return()
+ }
+ })
+ }
+
+ /**
+ * The Blob interface's slice() method creates and returns a
+ * new Blob object which contains data from a subset of the
+ * blob on which it's called.
+ *
+ * @param {number} [start]
+ * @param {number} [end]
+ * @param {string} [type]
+ */
+ slice (start = 0, end = this.size, type = '') {
+ const { size } = this
+
+ let relativeStart = start < 0 ? Math.max(size + start, 0) : Math.min(start, size)
+ let relativeEnd = end < 0 ? Math.max(size + end, 0) : Math.min(end, size)
+
+ const span = Math.max(relativeEnd - relativeStart, 0)
+ const parts = this.#parts
+ const blobParts = []
+ let added = 0
+
+ for (const part of parts) {
+ // don't add the overflow to new blobParts
+ if (added >= span) {
+ break
+ }
+
+ const size = ArrayBuffer.isView(part) ? part.byteLength : part.size
+ if (relativeStart && size <= relativeStart) {
+ // Skip the beginning and change the relative
+ // start & end position as we skip the unwanted parts
+ relativeStart -= size
+ relativeEnd -= size
+ } else {
+ let chunk
+ if (ArrayBuffer.isView(part)) {
+ chunk = part.subarray(relativeStart, Math.min(size, relativeEnd))
+ added += chunk.byteLength
+ } else {
+ chunk = part.slice(relativeStart, Math.min(size, relativeEnd))
+ added += chunk.size
+ }
+ relativeEnd -= size
+ blobParts.push(chunk)
+ relativeStart = 0 // All next sequential parts should start at 0
+ }
+ }
+
+ const blob = new Blob([], { type: String(type).toLowerCase() })
+ blob.#size = span
+ blob.#parts = blobParts
+
+ return blob
+ }
+
+ get [Symbol.toStringTag] () {
+ return 'Blob'
+ }
+
+ static [Symbol.hasInstance] (object) {
+ return (
+ object &&
+ typeof object === 'object' &&
+ typeof object.constructor === 'function' &&
+ (
+ typeof object.stream === 'function' ||
+ typeof object.arrayBuffer === 'function'
+ ) &&
+ /^(Blob|File)$/.test(object[Symbol.toStringTag])
+ )
+ }
+}
+
+Object.defineProperties(_Blob.prototype, {
+ size: { enumerable: true },
+ type: { enumerable: true },
+ slice: { enumerable: true }
+})
+
+/** @type {typeof globalThis.Blob} */
+export const Blob = _Blob
+export default Blob
diff --git a/node_modules/fetch-blob/package.json b/node_modules/fetch-blob/package.json
new file mode 100644
index 00000000..9d07f397
--- /dev/null
+++ b/node_modules/fetch-blob/package.json
@@ -0,0 +1,56 @@
+{
+ "name": "fetch-blob",
+ "version": "3.2.0",
+ "description": "Blob & File implementation in Node.js, originally from node-fetch.",
+ "main": "index.js",
+ "type": "module",
+ "files": [
+ "from.js",
+ "file.js",
+ "file.d.ts",
+ "index.js",
+ "index.d.ts",
+ "from.d.ts",
+ "streams.cjs"
+ ],
+ "scripts": {
+ "test": "node --experimental-loader ./test/http-loader.js ./test/test-wpt-in-node.js",
+ "report": "c8 --reporter json --reporter text npm run test",
+ "coverage": "npm run report && codecov -f coverage/coverage-final.json",
+ "prepublishOnly": "tsc --declaration --emitDeclarationOnly --allowJs index.js from.js"
+ },
+ "repository": "https://github.com/node-fetch/fetch-blob.git",
+ "keywords": [
+ "blob",
+ "file",
+ "node-fetch"
+ ],
+ "engines": {
+ "node": "^12.20 || >= 14.13"
+ },
+ "author": "Jimmy Wärting <[email protected]> (https://jimmy.warting.se)",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/node-fetch/fetch-blob/issues"
+ },
+ "homepage": "https://github.com/node-fetch/fetch-blob#readme",
+ "devDependencies": {
+ "@types/node": "^17.0.9",
+ "c8": "^7.11.0",
+ "typescript": "^4.5.4"
+ },
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/jimmywarting"
+ },
+ {
+ "type": "paypal",
+ "url": "https://paypal.me/jimmywarting"
+ }
+ ],
+ "dependencies": {
+ "node-domexception": "^1.0.0",
+ "web-streams-polyfill": "^3.0.3"
+ }
+}
diff --git a/node_modules/fetch-blob/streams.cjs b/node_modules/fetch-blob/streams.cjs
new file mode 100644
index 00000000..f7609596
--- /dev/null
+++ b/node_modules/fetch-blob/streams.cjs
@@ -0,0 +1,51 @@
+/* c8 ignore start */
+// 64 KiB (same size chrome slice theirs blob into Uint8array's)
+const POOL_SIZE = 65536
+
+if (!globalThis.ReadableStream) {
+ // `node:stream/web` got introduced in v16.5.0 as experimental
+ // and it's preferred over the polyfilled version. So we also
+ // suppress the warning that gets emitted by NodeJS for using it.
+ try {
+ const process = require('node:process')
+ const { emitWarning } = process
+ try {
+ process.emitWarning = () => {}
+ Object.assign(globalThis, require('node:stream/web'))
+ process.emitWarning = emitWarning
+ } catch (error) {
+ process.emitWarning = emitWarning
+ throw error
+ }
+ } catch (error) {
+ // fallback to polyfill implementation
+ Object.assign(globalThis, require('web-streams-polyfill/dist/ponyfill.es2018.js'))
+ }
+}
+
+try {
+ // Don't use node: prefix for this, require+node: is not supported until node v14.14
+ // Only `import()` can use prefix in 12.20 and later
+ const { Blob } = require('buffer')
+ if (Blob && !Blob.prototype.stream) {
+ Blob.prototype.stream = function name (params) {
+ let position = 0
+ const blob = this
+
+ return new ReadableStream({
+ type: 'bytes',
+ async pull (ctrl) {
+ const chunk = blob.slice(position, Math.min(blob.size, position + POOL_SIZE))
+ const buffer = await chunk.arrayBuffer()
+ position += buffer.byteLength
+ ctrl.enqueue(new Uint8Array(buffer))
+
+ if (position === blob.size) {
+ ctrl.close()
+ }
+ }
+ })
+ }
+ }
+} catch (error) {}
+/* c8 ignore end */
diff --git a/node_modules/formdata-polyfill/FormData.js b/node_modules/formdata-polyfill/FormData.js
new file mode 100644
index 00000000..8e736605
--- /dev/null
+++ b/node_modules/formdata-polyfill/FormData.js
@@ -0,0 +1,441 @@
+/* formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
+
+/* global FormData self Blob File */
+/* eslint-disable no-inner-declarations */
+
+if (typeof Blob !== 'undefined' && (typeof FormData === 'undefined' || !FormData.prototype.keys)) {
+ const global = typeof globalThis === 'object'
+ ? globalThis
+ : typeof window === 'object'
+ ? window
+ : typeof self === 'object' ? self : this
+
+ // keep a reference to native implementation
+ const _FormData = global.FormData
+
+ // To be monkey patched
+ const _send = global.XMLHttpRequest && global.XMLHttpRequest.prototype.send
+ const _fetch = global.Request && global.fetch
+ const _sendBeacon = global.navigator && global.navigator.sendBeacon
+ // Might be a worker thread...
+ const _match = global.Element && global.Element.prototype
+
+ // Unable to patch Request/Response constructor correctly #109
+ // only way is to use ES6 class extend
+ // https://github.com/babel/babel/issues/1966
+
+ const stringTag = global.Symbol && Symbol.toStringTag
+
+ // Add missing stringTags to blob and files
+ if (stringTag) {
+ if (!Blob.prototype[stringTag]) {
+ Blob.prototype[stringTag] = 'Blob'
+ }
+
+ if ('File' in global && !File.prototype[stringTag]) {
+ File.prototype[stringTag] = 'File'
+ }
+ }
+
+ // Fix so you can construct your own File
+ try {
+ new File([], '') // eslint-disable-line
+ } catch (a) {
+ global.File = function File (b, d, c) {
+ const blob = new Blob(b, c || {})
+ const t = c && void 0 !== c.lastModified ? new Date(c.lastModified) : new Date()
+
+ Object.defineProperties(blob, {
+ name: {
+ value: d
+ },
+ lastModified: {
+ value: +t
+ },
+ toString: {
+ value () {
+ return '[object File]'
+ }
+ }
+ })
+
+ if (stringTag) {
+ Object.defineProperty(blob, stringTag, {
+ value: 'File'
+ })
+ }
+
+ return blob
+ }
+ }
+
+ function ensureArgs (args, expected) {
+ if (args.length < expected) {
+ throw new TypeError(`${expected} argument required, but only ${args.length} present.`)
+ }
+ }
+
+ /**
+ * @param {string} name
+ * @param {string | undefined} filename
+ * @returns {[string, File|string]}
+ */
+ function normalizeArgs (name, value, filename) {
+ if (value instanceof Blob) {
+ filename = filename !== undefined
+ ? String(filename + '')
+ : typeof value.name === 'string'
+ ? value.name
+ : 'blob'
+
+ if (value.name !== filename || Object.prototype.toString.call(value) === '[object Blob]') {
+ value = new File([value], filename)
+ }
+ return [String(name), value]
+ }
+ return [String(name), String(value)]
+ }
+
+ // normalize line feeds for textarea
+ // https://html.spec.whatwg.org/multipage/form-elements.html#textarea-line-break-normalisation-transformation
+ function normalizeLinefeeds (value) {
+ return value.replace(/\r?\n|\r/g, '\r\n')
+ }
+
+ /**
+ * @template T
+ * @param {ArrayLike<T>} arr
+ * @param {{ (elm: T): void; }} cb
+ */
+ function each (arr, cb) {
+ for (let i = 0; i < arr.length; i++) {
+ cb(arr[i])
+ }
+ }
+
+ const escape = str => str.replace(/\n/g, '%0A').replace(/\r/g, '%0D').replace(/"/g, '%22')
+
+ /**
+ * @implements {Iterable}
+ */
+ class FormDataPolyfill {
+ /**
+ * FormData class
+ *
+ * @param {HTMLFormElement=} form
+ */
+ constructor (form) {
+ /** @type {[string, string|File][]} */
+ this._data = []
+
+ const self = this
+ form && each(form.elements, (/** @type {HTMLInputElement} */ elm) => {
+ if (
+ !elm.name ||
+ elm.disabled ||
+ elm.type === 'submit' ||
+ elm.type === 'button' ||
+ elm.matches('form fieldset[disabled] *')
+ ) return
+
+ if (elm.type === 'file') {
+ const files = elm.files && elm.files.length
+ ? elm.files
+ : [new File([], '', { type: 'application/octet-stream' })] // #78
+
+ each(files, file => {
+ self.append(elm.name, file)
+ })
+ } else if (elm.type === 'select-multiple' || elm.type === 'select-one') {
+ each(elm.options, opt => {
+ !opt.disabled && opt.selected && self.append(elm.name, opt.value)
+ })
+ } else if (elm.type === 'checkbox' || elm.type === 'radio') {
+ if (elm.checked) self.append(elm.name, elm.value)
+ } else {
+ const value = elm.type === 'textarea' ? normalizeLinefeeds(elm.value) : elm.value
+ self.append(elm.name, value)
+ }
+ })
+ }
+
+ /**
+ * Append a field
+ *
+ * @param {string} name field name
+ * @param {string|Blob|File} value string / blob / file
+ * @param {string=} filename filename to use with blob
+ * @return {undefined}
+ */
+ append (name, value, filename) {
+ ensureArgs(arguments, 2)
+ this._data.push(normalizeArgs(name, value, filename))
+ }
+
+ /**
+ * Delete all fields values given name
+ *
+ * @param {string} name Field name
+ * @return {undefined}
+ */
+ delete (name) {
+ ensureArgs(arguments, 1)
+ const result = []
+ name = String(name)
+
+ each(this._data, entry => {
+ entry[0] !== name && result.push(entry)
+ })
+
+ this._data = result
+ }
+
+ /**
+ * Iterate over all fields as [name, value]
+ *
+ * @return {Iterator}
+ */
+ * entries () {
+ for (var i = 0; i < this._data.length; i++) {
+ yield this._data[i]
+ }
+ }
+
+ /**
+ * Iterate over all fields
+ *
+ * @param {Function} callback Executed for each item with parameters (value, name, thisArg)
+ * @param {Object=} thisArg `this` context for callback function
+ */
+ forEach (callback, thisArg) {
+ ensureArgs(arguments, 1)
+ for (const [name, value] of this) {
+ callback.call(thisArg, value, name, this)
+ }
+ }
+
+ /**
+ * Return first field value given name
+ * or null if non existent
+ *
+ * @param {string} name Field name
+ * @return {string|File|null} value Fields value
+ */
+ get (name) {
+ ensureArgs(arguments, 1)
+ const entries = this._data
+ name = String(name)
+ for (let i = 0; i < entries.length; i++) {
+ if (entries[i][0] === name) {
+ return entries[i][1]
+ }
+ }
+ return null
+ }
+
+ /**
+ * Return all fields values given name
+ *
+ * @param {string} name Fields name
+ * @return {Array} [{String|File}]
+ */
+ getAll (name) {
+ ensureArgs(arguments, 1)
+ const result = []
+ name = String(name)
+ each(this._data, data => {
+ data[0] === name && result.push(data[1])
+ })
+
+ return result
+ }
+
+ /**
+ * Check for field name existence
+ *
+ * @param {string} name Field name
+ * @return {boolean}
+ */
+ has (name) {
+ ensureArgs(arguments, 1)
+ name = String(name)
+ for (let i = 0; i < this._data.length; i++) {
+ if (this._data[i][0] === name) {
+ return true
+ }
+ }
+ return false
+ }
+
+ /**
+ * Iterate over all fields name
+ *
+ * @return {Iterator}
+ */
+ * keys () {
+ for (const [name] of this) {
+ yield name
+ }
+ }
+
+ /**
+ * Overwrite all values given name
+ *
+ * @param {string} name Filed name
+ * @param {string} value Field value
+ * @param {string=} filename Filename (optional)
+ */
+ set (name, value, filename) {
+ ensureArgs(arguments, 2)
+ name = String(name)
+ /** @type {[string, string|File][]} */
+ const result = []
+ const args = normalizeArgs(name, value, filename)
+ let replace = true
+
+ // - replace the first occurrence with same name
+ // - discards the remaining with same name
+ // - while keeping the same order items where added
+ each(this._data, data => {
+ data[0] === name
+ ? replace && (replace = !result.push(args))
+ : result.push(data)
+ })
+
+ replace && result.push(args)
+
+ this._data = result
+ }
+
+ /**
+ * Iterate over all fields
+ *
+ * @return {Iterator}
+ */
+ * values () {
+ for (const [, value] of this) {
+ yield value
+ }
+ }
+
+ /**
+ * Return a native (perhaps degraded) FormData with only a `append` method
+ * Can throw if it's not supported
+ *
+ * @return {FormData}
+ */
+ ['_asNative'] () {
+ const fd = new _FormData()
+
+ for (const [name, value] of this) {
+ fd.append(name, value)
+ }
+
+ return fd
+ }
+
+ /**
+ * [_blob description]
+ *
+ * @return {Blob} [description]
+ */
+ ['_blob'] () {
+ const boundary = '----formdata-polyfill-' + Math.random(),
+ chunks = [],
+ p = `--${boundary}\r\nContent-Disposition: form-data; name="`
+ this.forEach((value, name) => typeof value == 'string'
+ ? chunks.push(p + escape(normalizeLinefeeds(name)) + `"\r\n\r\n${normalizeLinefeeds(value)}\r\n`)
+ : chunks.push(p + escape(normalizeLinefeeds(name)) + `"; filename="${escape(value.name)}"\r\nContent-Type: ${value.type||"application/octet-stream"}\r\n\r\n`, value, `\r\n`))
+ chunks.push(`--${boundary}--`)
+ return new Blob(chunks, {
+ type: "multipart/form-data; boundary=" + boundary
+ })
+ }
+
+ /**
+ * The class itself is iterable
+ * alias for formdata.entries()
+ *
+ * @return {Iterator}
+ */
+ [Symbol.iterator] () {
+ return this.entries()
+ }
+
+ /**
+ * Create the default string description.
+ *
+ * @return {string} [object FormData]
+ */
+ toString () {
+ return '[object FormData]'
+ }
+ }
+
+ if (_match && !_match.matches) {
+ _match.matches =
+ _match.matchesSelector ||
+ _match.mozMatchesSelector ||
+ _match.msMatchesSelector ||
+ _match.oMatchesSelector ||
+ _match.webkitMatchesSelector ||
+ function (s) {
+ var matches = (this.document || this.ownerDocument).querySelectorAll(s)
+ var i = matches.length
+ while (--i >= 0 && matches.item(i) !== this) {}
+ return i > -1
+ }
+ }
+
+ if (stringTag) {
+ /**
+ * Create the default string description.
+ * It is accessed internally by the Object.prototype.toString().
+ */
+ FormDataPolyfill.prototype[stringTag] = 'FormData'
+ }
+
+ // Patch xhr's send method to call _blob transparently
+ if (_send) {
+ const setRequestHeader = global.XMLHttpRequest.prototype.setRequestHeader
+
+ global.XMLHttpRequest.prototype.setRequestHeader = function (name, value) {
+ setRequestHeader.call(this, name, value)
+ if (name.toLowerCase() === 'content-type') this._hasContentType = true
+ }
+
+ global.XMLHttpRequest.prototype.send = function (data) {
+ // need to patch send b/c old IE don't send blob's type (#44)
+ if (data instanceof FormDataPolyfill) {
+ const blob = data['_blob']()
+ if (!this._hasContentType) this.setRequestHeader('Content-Type', blob.type)
+ _send.call(this, blob)
+ } else {
+ _send.call(this, data)
+ }
+ }
+ }
+
+ // Patch fetch's function to call _blob transparently
+ if (_fetch) {
+ global.fetch = function (input, init) {
+ if (init && init.body && init.body instanceof FormDataPolyfill) {
+ init.body = init.body['_blob']()
+ }
+
+ return _fetch.call(this, input, init)
+ }
+ }
+
+ // Patch navigator.sendBeacon to use native FormData
+ if (_sendBeacon) {
+ global.navigator.sendBeacon = function (url, data) {
+ if (data instanceof FormDataPolyfill) {
+ data = data['_asNative']()
+ }
+ return _sendBeacon.call(this, url, data)
+ }
+ }
+
+ global['FormData'] = FormDataPolyfill
+}
diff --git a/node_modules/formdata-polyfill/LICENSE b/node_modules/formdata-polyfill/LICENSE
new file mode 100644
index 00000000..fd0f555a
--- /dev/null
+++ b/node_modules/formdata-polyfill/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2016 Jimmy Karl Roland Wärting
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/formdata-polyfill/README.md b/node_modules/formdata-polyfill/README.md
new file mode 100644
index 00000000..8355299a
--- /dev/null
+++ b/node_modules/formdata-polyfill/README.md
@@ -0,0 +1,145 @@
+### A `FormData` polyfill for the browser ...and a module for NodeJS (`New!`)
+
+```bash
+npm install formdata-polyfill
+```
+
+The browser polyfill will likely have done its part already, and i hope you stop supporting old browsers c",)<br>
+But NodeJS still laks a proper FormData<br>The good old form-data package is a very old and isn't spec compatible and dose some abnormal stuff to construct and read FormData instances that other http libraries are not happy about when it comes to follow the spec.
+
+### The NodeJS / ESM version
+- The modular (~2.3 KiB minified uncompressed) version of this package is independent of any browser stuff and don't patch anything
+- It's as pure/spec compatible as it possible gets the test are run by WPT.
+- It's compatible with [node-fetch](https://github.com/node-fetch/node-fetch).
+- It have higher platform dependencies as it uses classes, symbols, ESM & private fields
+- Only dependency it has is [fetch-blob](https://github.com/node-fetch/fetch-blob)
+
+```js
+// Node example
+import fetch from 'node-fetch'
+import File from 'fetch-blob/file.js'
+import { fileFromSync } from 'fetch-blob/from.js'
+import { FormData } from 'formdata-polyfill/esm.min.js'
+
+const file = fileFromSync('./README.md')
+const fd = new FormData()
+
+fd.append('file-upload', new File(['abc'], 'hello-world.txt'))
+fd.append('file-upload', file)
+
+// it's also possible to append file/blob look-a-like items
+// if you have streams coming from other destinations
+fd.append('file-upload', {
+ size: 123,
+ type: '',
+ name: 'cat-video.mp4',
+ stream() { return stream },
+ [Symbol.toStringTag]: 'File'
+})
+
+fetch('https://httpbin.org/post', { method: 'POST', body: fd })
+```
+
+----
+
+It also comes with way to convert FormData into Blobs - it's not something that every developer should have to deal with.
+It's mainly for [node-fetch](https://github.com/node-fetch/node-fetch) and other http library to ease the process of serializing a FormData into a blob and just wish to deal with Blobs instead (Both Deno and Undici adapted a version of this [formDataToBlob](https://github.com/jimmywarting/FormData/blob/5ddea9e0de2fc5e246ab1b2f9d404dee0c319c02/formdata-to-blob.js) to the core and passes all WPT tests run by the browser itself)
+```js
+import { Readable } from 'node:stream'
+import { FormData, formDataToBlob } from 'formdata-polyfill/esm.min.js'
+
+const blob = formDataToBlob(new FormData())
+fetch('https://httpbin.org/post', { method: 'POST', body: blob })
+
+// node built in http and other similar http library have to do:
+const stream = Readable.from(blob.stream())
+const req = http.request('http://httpbin.org/post', {
+ method: 'post',
+ headers: {
+ 'Content-Length': blob.size,
+ 'Content-Type': blob.type
+ }
+})
+stream.pipe(req)
+```
+
+PS: blob & file that are appended to the FormData will not be read until any of the serialized blob read-methods gets called
+...so uploading very large files is no biggie
+
+### Browser polyfill
+
+usage:
+
+```js
+import 'formdata-polyfill' // that's it
+```
+
+The browser polyfill conditionally replaces the native implementation rather than fixing the missing functions,
+since otherwise there is no way to get or delete existing values in the FormData object.
+Therefore this also patches `XMLHttpRequest.prototype.send` and `fetch` to send the `FormData` as a blob,
+and `navigator.sendBeacon` to send native `FormData`.
+
+I was unable to patch the Response/Request constructor
+so if you are constructing them with FormData then you need to call `fd._blob()` manually.
+
+```js
+new Request(url, {
+ method: 'post',
+ body: fd._blob ? fd._blob() : fd
+})
+```
+
+Dependencies
+---
+
+If you need to support IE <= 9 then I recommend you to include eligrey's [blob.js]
+(which i hope you don't - since IE is now dead)
+
+<details>
+ <summary>Updating from 2.x to 3.x</summary>
+
+Previously you had to import the polyfill and use that,
+since it didn't replace the global (existing) FormData implementation.
+But now it transparently calls `_blob()` for you when you are sending something with fetch or XHR,
+by way of monkey-patching the `XMLHttpRequest.prototype.send` and `fetch` functions.
+
+So you maybe had something like this:
+
+```javascript
+var FormData = require('formdata-polyfill')
+var fd = new FormData(form)
+xhr.send(fd._blob())
+```
+
+There is no longer anything exported from the module
+(though you of course still need to import it to install the polyfill),
+so you can now use the FormData object as normal:
+
+```javascript
+require('formdata-polyfill')
+var fd = new FormData(form)
+xhr.send(fd)
+```
+
+</details>
+
+
+
+Native Browser compatibility (as of 2021-05-08)
+---
+Based on this you can decide for yourself if you need this polyfill.
+
+[![screenshot](https://user-images.githubusercontent.com/1148376/117550329-0993aa80-b040-11eb-976c-14e31f1a3ba4.png)](https://developer.mozilla.org/en-US/docs/Web/API/FormData#Browser_compatibility)
+
+
+
+This normalizes support for the FormData API:
+
+ - `append` with filename
+ - `delete()`, `get()`, `getAll()`, `has()`, `set()`
+ - `entries()`, `keys()`, `values()`, and support for `for...of`
+ - Available in web workers (just include the polyfill)
+
+ [npm-image]: https://img.shields.io/npm/v/formdata-polyfill.svg
+ [npm-url]: https://www.npmjs.com/package/formdata-polyfill
+ [blob.js]: https://github.com/eligrey/Blob.js
diff --git a/node_modules/formdata-polyfill/esm.min.d.ts b/node_modules/formdata-polyfill/esm.min.d.ts
new file mode 100644
index 00000000..b45f42ea
--- /dev/null
+++ b/node_modules/formdata-polyfill/esm.min.d.ts
@@ -0,0 +1,5 @@
+export declare const FormData: {
+ new (): FormData;
+ prototype: FormData;
+};
+export declare function formDataToBlob(formData: FormData): Blob;
diff --git a/node_modules/formdata-polyfill/esm.min.js b/node_modules/formdata-polyfill/esm.min.js
new file mode 100644
index 00000000..745ca290
--- /dev/null
+++ b/node_modules/formdata-polyfill/esm.min.js
@@ -0,0 +1,40 @@
+/*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
+
+import C from 'fetch-blob'
+import F from 'fetch-blob/file.js'
+
+var {toStringTag:t,iterator:i,hasInstance:h}=Symbol,
+r=Math.random,
+m='append,set,get,getAll,delete,keys,values,entries,forEach,constructor'.split(','),
+f=(a,b,c)=>(a+='',/^(Blob|File)$/.test(b && b[t])?[(c=c!==void 0?c+'':b[t]=='File'?b.name:'blob',a),b.name!==c||b[t]=='blob'?new F([b],c,b):b]:[a,b+'']),
+e=(c,f)=>(f?c:c.replace(/\r?\n|\r/g,'\r\n')).replace(/\n/g,'%0A').replace(/\r/g,'%0D').replace(/"/g,'%22'),
+x=(n, a, e)=>{if(a.length<e){throw new TypeError(`Failed to execute '${n}' on 'FormData': ${e} arguments required, but only ${a.length} present.`)}}
+
+export const File = F
+
+/** @type {typeof globalThis.FormData} */
+export const FormData = class FormData {
+#d=[];
+constructor(...a){if(a.length)throw new TypeError(`Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement'.`)}
+get [t]() {return 'FormData'}
+[i](){return this.entries()}
+static [h](o) {return o&&typeof o==='object'&&o[t]==='FormData'&&!m.some(m=>typeof o[m]!='function')}
+append(...a){x('append',arguments,2);this.#d.push(f(...a))}
+delete(a){x('delete',arguments,1);a+='';this.#d=this.#d.filter(([b])=>b!==a)}
+get(a){x('get',arguments,1);a+='';for(var b=this.#d,l=b.length,c=0;c<l;c++)if(b[c][0]===a)return b[c][1];return null}
+getAll(a,b){x('getAll',arguments,1);b=[];a+='';this.#d.forEach(c=>c[0]===a&&b.push(c[1]));return b}
+has(a){x('has',arguments,1);a+='';return this.#d.some(b=>b[0]===a)}
+forEach(a,b){x('forEach',arguments,1);for(var [c,d]of this)a.call(b,d,c,this)}
+set(...a){x('set',arguments,2);var b=[],c=!0;a=f(...a);this.#d.forEach(d=>{d[0]===a[0]?c&&(c=!b.push(a)):b.push(d)});c&&b.push(a);this.#d=b}
+*entries(){yield*this.#d}
+*keys(){for(var[a]of this)yield a}
+*values(){for(var[,a]of this)yield a}}
+
+/** @param {FormData} F */
+export function formDataToBlob (F,B=C){
+var b=`${r()}${r()}`.replace(/\./g, '').slice(-28).padStart(32, '-'),c=[],p=`--${b}\r\nContent-Disposition: form-data; name="`
+F.forEach((v,n)=>typeof v=='string'
+?c.push(p+e(n)+`"\r\n\r\n${v.replace(/\r(?!\n)|(?<!\r)\n/g, '\r\n')}\r\n`)
+:c.push(p+e(n)+`"; filename="${e(v.name, 1)}"\r\nContent-Type: ${v.type||"application/octet-stream"}\r\n\r\n`, v, '\r\n'))
+c.push(`--${b}--`)
+return new B(c,{type:"multipart/form-data; boundary="+b})}
diff --git a/node_modules/formdata-polyfill/formdata-to-blob.js b/node_modules/formdata-polyfill/formdata-to-blob.js
new file mode 100644
index 00000000..5a0a5179
--- /dev/null
+++ b/node_modules/formdata-polyfill/formdata-to-blob.js
@@ -0,0 +1,39 @@
+/*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
+
+const escape = (str, filename) =>
+ (filename ? str : str.replace(/\r?\n|\r/g, '\r\n'))
+ .replace(/\n/g, '%0A')
+ .replace(/\r/g, '%0D')
+ .replace(/"/g, '%22')
+
+/**
+ * pure function to convert any formData instance to a Blob
+ * instances synchronous without reading all of the files
+ *
+ * @param {FormData|*} formData an instance of a formData Class
+ * @param {Blob|*} [BlobClass=Blob] the Blob class to use when constructing it
+ */
+export function formDataToBlob (formData, BlobClass = Blob) {
+ const boundary = ('----formdata-polyfill-' + Math.random())
+ const chunks = []
+ const prefix = `--${boundary}\r\nContent-Disposition: form-data; name="`
+
+ for (let [name, value] of formData) {
+ if (typeof value === 'string') {
+ chunks.push(prefix + escape(name) + `"\r\n\r\n${value.replace(/\r(?!\n)|(?<!\r)\n/g, '\r\n')}\r\n`)
+ } else {
+ chunks.push(
+ prefix + escape(name) + `"; filename="${escape(value.name, 1)}"\r\n` +
+ `Content-Type: ${value.type || 'application/octet-stream'}\r\n\r\n`,
+ value,
+ '\r\n'
+ )
+ }
+ }
+
+ chunks.push(`--${boundary}--`)
+
+ return new BlobClass(chunks, {
+ type: 'multipart/form-data; boundary=' + boundary
+ })
+}
diff --git a/node_modules/formdata-polyfill/formdata.min.js b/node_modules/formdata-polyfill/formdata.min.js
new file mode 100644
index 00000000..f4abd676
--- /dev/null
+++ b/node_modules/formdata-polyfill/formdata.min.js
@@ -0,0 +1,21 @@
+/*! formdata-polyfill. MIT License. Jimmy W?rting <https://jimmy.warting.se/opensource> */
+;(function(){var h;function l(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}var m="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};
+function n(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var q=n(this);function r(a,b){if(b)a:{var c=q;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&m(c,a,{configurable:!0,writable:!0,value:b})}}
+r("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c(d+(f||"")+"_"+e++,f)}function c(f,g){this.A=f;m(this,"description",{configurable:!0,writable:!0,value:g})}if(a)return a;c.prototype.toString=function(){return this.A};var d="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",e=0;return b});
+r("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=q[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&m(d.prototype,a,{configurable:!0,writable:!0,value:function(){return u(l(this))}})}return a});function u(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
+function v(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:l(a)}}var w;if("function"==typeof Object.setPrototypeOf)w=Object.setPrototypeOf;else{var y;a:{var z={a:!0},A={};try{A.__proto__=z;y=A.a;break a}catch(a){}y=!1}w=y?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var B=w;function C(){this.m=!1;this.j=null;this.v=void 0;this.h=1;this.u=this.C=0;this.l=null}
+function D(a){if(a.m)throw new TypeError("Generator is already running");a.m=!0}C.prototype.o=function(a){this.v=a};C.prototype.s=function(a){this.l={D:a,F:!0};this.h=this.C||this.u};C.prototype.return=function(a){this.l={return:a};this.h=this.u};function E(a,b){a.h=3;return{value:b}}function F(a){this.g=new C;this.G=a}F.prototype.o=function(a){D(this.g);if(this.g.j)return G(this,this.g.j.next,a,this.g.o);this.g.o(a);return H(this)};
+function I(a,b){D(a.g);var c=a.g.j;if(c)return G(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return H(a)}F.prototype.s=function(a){D(this.g);if(this.g.j)return G(this,this.g.j["throw"],a,this.g.o);this.g.s(a);return H(this)};
+function G(a,b,c,d){try{var e=b.call(a.g.j,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.m=!1,e;var f=e.value}catch(g){return a.g.j=null,a.g.s(g),H(a)}a.g.j=null;d.call(a.g,f);return H(a)}function H(a){for(;a.g.h;)try{var b=a.G(a.g);if(b)return a.g.m=!1,{value:b.value,done:!1}}catch(c){a.g.v=void 0,a.g.s(c)}a.g.m=!1;if(a.g.l){b=a.g.l;a.g.l=null;if(b.F)throw b.D;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
+function J(a){this.next=function(b){return a.o(b)};this.throw=function(b){return a.s(b)};this.return=function(b){return I(a,b)};this[Symbol.iterator]=function(){return this}}function K(a,b){b=new J(new F(b));B&&a.prototype&&B(b,a.prototype);return b}function L(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}
+r("Array.prototype.entries",function(a){return a?a:function(){return L(this,function(b,c){return[b,c]})}});
+if("undefined"!==typeof Blob&&("undefined"===typeof FormData||!FormData.prototype.keys)){var M=function(a,b){for(var c=0;c<a.length;c++)b(a[c])},N=function(a){return a.replace(/\r?\n|\r/g,"\r\n")},O=function(a,b,c){if(b instanceof Blob){c=void 0!==c?String(c+""):"string"===typeof b.name?b.name:"blob";if(b.name!==c||"[object Blob]"===Object.prototype.toString.call(b))b=new File([b],c);return[String(a),b]}return[String(a),String(b)]},P=function(a,b){if(a.length<b)throw new TypeError(b+" argument required, but only "+
+a.length+" present.");},Q="object"===typeof globalThis?globalThis:"object"===typeof window?window:"object"===typeof self?self:this,R=Q.FormData,S=Q.XMLHttpRequest&&Q.XMLHttpRequest.prototype.send,T=Q.Request&&Q.fetch,U=Q.navigator&&Q.navigator.sendBeacon,V=Q.Element&&Q.Element.prototype,W=Q.Symbol&&Symbol.toStringTag;W&&(Blob.prototype[W]||(Blob.prototype[W]="Blob"),"File"in Q&&!File.prototype[W]&&(File.prototype[W]="File"));try{new File([],"")}catch(a){Q.File=function(b,c,d){b=new Blob(b,d||{});
+Object.defineProperties(b,{name:{value:c},lastModified:{value:+(d&&void 0!==d.lastModified?new Date(d.lastModified):new Date)},toString:{value:function(){return"[object File]"}}});W&&Object.defineProperty(b,W,{value:"File"});return b}}var escape=function(a){return a.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22")},X=function(a){this.i=[];var b=this;a&&M(a.elements,function(c){if(c.name&&!c.disabled&&"submit"!==c.type&&"button"!==c.type&&!c.matches("form fieldset[disabled] *"))if("file"===
+c.type){var d=c.files&&c.files.length?c.files:[new File([],"",{type:"application/octet-stream"})];M(d,function(e){b.append(c.name,e)})}else"select-multiple"===c.type||"select-one"===c.type?M(c.options,function(e){!e.disabled&&e.selected&&b.append(c.name,e.value)}):"checkbox"===c.type||"radio"===c.type?c.checked&&b.append(c.name,c.value):(d="textarea"===c.type?N(c.value):c.value,b.append(c.name,d))})};h=X.prototype;h.append=function(a,b,c){P(arguments,2);this.i.push(O(a,b,c))};h.delete=function(a){P(arguments,
+1);var b=[];a=String(a);M(this.i,function(c){c[0]!==a&&b.push(c)});this.i=b};h.entries=function b(){var c,d=this;return K(b,function(e){1==e.h&&(c=0);if(3!=e.h)return c<d.i.length?e=E(e,d.i[c]):(e.h=0,e=void 0),e;c++;e.h=2})};h.forEach=function(b,c){P(arguments,1);for(var d=v(this),e=d.next();!e.done;e=d.next()){var f=v(e.value);e=f.next().value;f=f.next().value;b.call(c,f,e,this)}};h.get=function(b){P(arguments,1);var c=this.i;b=String(b);for(var d=0;d<c.length;d++)if(c[d][0]===b)return c[d][1];
+return null};h.getAll=function(b){P(arguments,1);var c=[];b=String(b);M(this.i,function(d){d[0]===b&&c.push(d[1])});return c};h.has=function(b){P(arguments,1);b=String(b);for(var c=0;c<this.i.length;c++)if(this.i[c][0]===b)return!0;return!1};h.keys=function c(){var d=this,e,f,g,k,p;return K(c,function(t){1==t.h&&(e=v(d),f=e.next());if(3!=t.h){if(f.done){t.h=0;return}g=f.value;k=v(g);p=k.next().value;return E(t,p)}f=e.next();t.h=2})};h.set=function(c,d,e){P(arguments,2);c=String(c);var f=[],g=O(c,
+d,e),k=!0;M(this.i,function(p){p[0]===c?k&&(k=!f.push(g)):f.push(p)});k&&f.push(g);this.i=f};h.values=function d(){var e=this,f,g,k,p,t;return K(d,function(x){1==x.h&&(f=v(e),g=f.next());if(3!=x.h){if(g.done){x.h=0;return}k=g.value;p=v(k);p.next();t=p.next().value;return E(x,t)}g=f.next();x.h=2})};X.prototype._asNative=function(){for(var d=new R,e=v(this),f=e.next();!f.done;f=e.next()){var g=v(f.value);f=g.next().value;g=g.next().value;d.append(f,g)}return d};X.prototype._blob=function(){var d="----formdata-polyfill-"+
+Math.random(),e=[],f="--"+d+'\r\nContent-Disposition: form-data; name="';this.forEach(function(g,k){return"string"==typeof g?e.push(f+escape(N(k))+('"\r\n\r\n'+N(g)+"\r\n")):e.push(f+escape(N(k))+('"; filename="'+escape(g.name)+'"\r\nContent-Type: '+(g.type||"application/octet-stream")+"\r\n\r\n"),g,"\r\n")});e.push("--"+d+"--");return new Blob(e,{type:"multipart/form-data; boundary="+d})};X.prototype[Symbol.iterator]=function(){return this.entries()};X.prototype.toString=function(){return"[object FormData]"};
+V&&!V.matches&&(V.matches=V.matchesSelector||V.mozMatchesSelector||V.msMatchesSelector||V.oMatchesSelector||V.webkitMatchesSelector||function(d){d=(this.document||this.ownerDocument).querySelectorAll(d);for(var e=d.length;0<=--e&&d.item(e)!==this;);return-1<e});W&&(X.prototype[W]="FormData");if(S){var Y=Q.XMLHttpRequest.prototype.setRequestHeader;Q.XMLHttpRequest.prototype.setRequestHeader=function(d,e){Y.call(this,d,e);"content-type"===d.toLowerCase()&&(this.B=!0)};Q.XMLHttpRequest.prototype.send=
+function(d){d instanceof X?(d=d._blob(),this.B||this.setRequestHeader("Content-Type",d.type),S.call(this,d)):S.call(this,d)}}T&&(Q.fetch=function(d,e){e&&e.body&&e.body instanceof X&&(e.body=e.body._blob());return T.call(this,d,e)});U&&(Q.navigator.sendBeacon=function(d,e){e instanceof X&&(e=e._asNative());return U.call(this,d,e)});Q.FormData=X};})();
diff --git a/node_modules/formdata-polyfill/package.json b/node_modules/formdata-polyfill/package.json
new file mode 100644
index 00000000..501a064c
--- /dev/null
+++ b/node_modules/formdata-polyfill/package.json
@@ -0,0 +1,50 @@
+{
+ "name": "formdata-polyfill",
+ "version": "4.0.10",
+ "description": "HTML5 `FormData` for Browsers and Node.",
+ "type": "module",
+ "main": "formdata.min.js",
+ "scripts": {
+ "build": "node build.js",
+ "test": "node test/test-esm.js",
+ "test-wpt": "node --experimental-loader ./test/http-loader.js ./test/test-wpt-in-node.js",
+ "test-polyfill": "php -S localhost:4445 & open http://localhost:4445/test/test-polyfill.html"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://[email protected]/jimmywarting/FormData.git"
+ },
+ "files": [
+ "esm.min.js",
+ "esm.min.d.ts",
+ "FormData.js",
+ "formdata-to-blob.js",
+ "formdata.min.js",
+ "README.md"
+ ],
+ "engines": {
+ "node": ">=12.20.0"
+ },
+ "keywords": [
+ "formdata",
+ "fetch",
+ "node-fetch",
+ "html5",
+ "browser",
+ "polyfill"
+ ],
+ "author": "Jimmy Wärting",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/jimmywarting/FormData/issues"
+ },
+ "homepage": "https://github.com/jimmywarting/FormData#readme",
+ "dependencies": {
+ "fetch-blob": "^3.1.2"
+ },
+ "devDependencies": {
+ "@types/google-closure-compiler": "^0.0.19",
+ "@types/node": "^16.7.10",
+ "google-closure-compiler": "^20210808.0.0"
+ }
+}
diff --git a/node_modules/graphology-layout-forceatlas2/LICENSE.txt b/node_modules/graphology-layout-forceatlas2/LICENSE.txt
new file mode 100644
index 00000000..158967c8
--- /dev/null
+++ b/node_modules/graphology-layout-forceatlas2/LICENSE.txt
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016-2021 Guillaume Plique (Yomguithereal)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/graphology-layout-forceatlas2/README.md b/node_modules/graphology-layout-forceatlas2/README.md
new file mode 100644
index 00000000..9e1982e0
--- /dev/null
+++ b/node_modules/graphology-layout-forceatlas2/README.md
@@ -0,0 +1,113 @@
+# Graphology ForceAtlas2
+
+JavaScript implementation of the [ForceAtlas2](https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0098679) algorithm for [graphology](https://graphology.github.io).
+
+## Reference
+
+> Jacomy M, Venturini T, Heymann S, Bastian M (2014) ForceAtlas2, a Continuous Graph Layout Algorithm for Handy Network Visualization Designed for the Gephi Software. PLoS ONE 9(6): e98679. https://doi.org/10.1371/journal.pone.0098679
+
+## Installation
+
+```
+npm install graphology-layout-forceatlas2
+```
+
+## Usage
+
+- [Pre-requisite](#pre-requisite)
+- [Settings](#settings)
+- [Synchronous layout](#synchronous-layout)
+- [Webworker](#webworker)
+- [#.inferSettings](#infersettings)
+
+### Pre-requisites
+
+Each node's starting position must be set before running ForceAtlas 2 layout. Two attributes called `x` and `y` must therefore be defined for all the graph nodes. [graphology-layout](https://github.com/graphology/graphology-layout) can be used to initialize these attributes to a [random](https://github.com/graphology/graphology-layout#random) or [circular](https://github.com/graphology/graphology-layout#circular) layout, if needed.
+
+Note also that the algorithm has an edge-case where the layout cannot be computed if all of your nodes starts with `x=0` and `y=0`.
+
+### Settings
+
+- **adjustSizes** _?boolean_ [`false`]: should the node's sizes be taken into account?
+- **barnesHutOptimize** _?boolean_ [`false`]: whether to use the Barnes-Hut approximation to compute repulsion in `O(n*log(n))` rather than default `O(n^2)`, `n` being the number of nodes.
+- **barnesHutTheta** _?number_ [`0.5`]: Barnes-Hut approximation theta parameter.
+- **edgeWeightInfluence** _?number_ [`1`]: influence of the edge's weights on the layout. To consider edge weight, don't forget to pass `weighted` as `true` when applying the [synchronous layout](#synchronous-layout) or when instantiating the [worker](#webworker).
+- **gravity** _?number_ [`1`]: strength of the layout's gravity.
+- **linLogMode** _?boolean_ [`false`]: whether to use Noack's LinLog model.
+- **outboundAttractionDistribution** _?boolean_ [`false`]
+- **scalingRatio** _?number_ [`1`]
+- **slowDown** _?number_ [`1`]
+- **strongGravityMode** _?boolean_ [`false`]
+
+### Synchronous layout
+
+```js
+import forceAtlas2 from 'graphology-layout-forceatlas2';
+
+const positions = forceAtlas2(graph, {iterations: 50});
+
+// With settings:
+const positions = forceAtlas2(graph, {
+ iterations: 50,
+ settings: {
+ gravity: 10
+ }
+});
+
+// To directly assign the positions to the nodes:
+forceAtlas2.assign(graph);
+```
+
+_Arguments_
+
+- **graph** _Graph_: target graph.
+- **options** _object_: options:
+ - **iterations** _number_: number of iterations to perform.
+ - **getEdgeWeight** _?string\|function_ [`weight`]: name of the edge weight attribute or getter function. Defaults to `weight`.
+ - **settings** _?object_: the layout's settings (see [#settings](#settings)).
+
+### Webworker
+
+If you need to run the layout's computation in a web worker, the library comes with a utility to do so:
+
+_Example_
+
+```js
+import FA2Layout from 'graphology-layout-forceatlas2/worker';
+
+// The parameters are the same as for the synchronous version, minus `iterations` of course
+const layout = new FA2Layout(graph, {
+ settings: {gravity: 1}
+});
+
+// To start the layout
+layout.start();
+
+// To stop the layout
+layout.stop();
+
+// To kill the layout and release attached memory
+layout.kill();
+
+// Assess whether the layout is currently running
+layout.isRunning();
+```
+
+**WARNING!**: if you are using [`webpack`](https://webpack.js.org/) to bundle your code, avoid the `cheap-eval`-like options for the [`devtool`](https://webpack.js.org/configuration/devtool/) setting. Some users noticed that it interacts in mysterious ways with the library's code and cause performance to drop dramatically when using the worker. Note that this should have been fixed from v0.5.0.
+
+### #.inferSettings
+
+If you don't know how to tune the layout's settings and want to infer them from your graph, you can use the `#.inferSettings` method:
+
+```js
+import forceAtlas2 from 'graphology-layout-forceatlas2';
+
+const sensibleSettings = forceAtlas2.inferSettings(graph);
+const positions = forceAtlas2(graph, {
+ iterations: 50,
+ settings: sensibleSettings
+});
+
+// Alternatively using the graph's order instead of a graph instance
+const sensibleSettings = forceAtlas2.inferSettings(500);
+```
diff --git a/node_modules/graphology-layout-forceatlas2/defaults.js b/node_modules/graphology-layout-forceatlas2/defaults.js
new file mode 100644
index 00000000..e4e22893
--- /dev/null
+++ b/node_modules/graphology-layout-forceatlas2/defaults.js
@@ -0,0 +1,16 @@
+/**
+ * Graphology ForceAtlas2 Layout Default Settings
+ * ===============================================
+ */
+module.exports = {
+ linLogMode: false,
+ outboundAttractionDistribution: false,
+ adjustSizes: false,
+ edgeWeightInfluence: 1,
+ scalingRatio: 1,
+ strongGravityMode: false,
+ gravity: 1,
+ slowDown: 1,
+ barnesHutOptimize: false,
+ barnesHutTheta: 0.5
+};
diff --git a/node_modules/graphology-layout-forceatlas2/helpers.js b/node_modules/graphology-layout-forceatlas2/helpers.js
new file mode 100644
index 00000000..768bbbc8
--- /dev/null
+++ b/node_modules/graphology-layout-forceatlas2/helpers.js
@@ -0,0 +1,261 @@
+/**
+ * Graphology ForceAtlas2 Helpers
+ * ===============================
+ *
+ * Miscellaneous helper functions.
+ */
+
+/**
+ * Constants.
+ */
+var PPN = 10;
+var PPE = 3;
+
+/**
+ * Very simple Object.assign-like function.
+ *
+ * @param {object} target - First object.
+ * @param {object} [...objects] - Objects to merge.
+ * @return {object}
+ */
+exports.assign = function (target) {
+ target = target || {};
+
+ var objects = Array.prototype.slice.call(arguments).slice(1),
+ i,
+ k,
+ l;
+
+ for (i = 0, l = objects.length; i < l; i++) {
+ if (!objects[i]) continue;
+
+ for (k in objects[i]) target[k] = objects[i][k];
+ }
+
+ return target;
+};
+
+/**
+ * Function used to validate the given settings.
+ *
+ * @param {object} settings - Settings to validate.
+ * @return {object|null}
+ */
+exports.validateSettings = function (settings) {
+ if ('linLogMode' in settings && typeof settings.linLogMode !== 'boolean')
+ return {message: 'the `linLogMode` setting should be a boolean.'};
+
+ if (
+ 'outboundAttractionDistribution' in settings &&
+ typeof settings.outboundAttractionDistribution !== 'boolean'
+ )
+ return {
+ message:
+ 'the `outboundAttractionDistribution` setting should be a boolean.'
+ };
+
+ if ('adjustSizes' in settings && typeof settings.adjustSizes !== 'boolean')
+ return {message: 'the `adjustSizes` setting should be a boolean.'};
+
+ if (
+ 'edgeWeightInfluence' in settings &&
+ typeof settings.edgeWeightInfluence !== 'number'
+ )
+ return {
+ message: 'the `edgeWeightInfluence` setting should be a number.'
+ };
+
+ if (
+ 'scalingRatio' in settings &&
+ !(typeof settings.scalingRatio === 'number' && settings.scalingRatio >= 0)
+ )
+ return {message: 'the `scalingRatio` setting should be a number >= 0.'};
+
+ if (
+ 'strongGravityMode' in settings &&
+ typeof settings.strongGravityMode !== 'boolean'
+ )
+ return {message: 'the `strongGravityMode` setting should be a boolean.'};
+
+ if (
+ 'gravity' in settings &&
+ !(typeof settings.gravity === 'number' && settings.gravity >= 0)
+ )
+ return {message: 'the `gravity` setting should be a number >= 0.'};
+
+ if (
+ 'slowDown' in settings &&
+ !(typeof settings.slowDown === 'number' || settings.slowDown >= 0)
+ )
+ return {message: 'the `slowDown` setting should be a number >= 0.'};
+
+ if (
+ 'barnesHutOptimize' in settings &&
+ typeof settings.barnesHutOptimize !== 'boolean'
+ )
+ return {message: 'the `barnesHutOptimize` setting should be a boolean.'};
+
+ if (
+ 'barnesHutTheta' in settings &&
+ !(
+ typeof settings.barnesHutTheta === 'number' &&
+ settings.barnesHutTheta >= 0
+ )
+ )
+ return {message: 'the `barnesHutTheta` setting should be a number >= 0.'};
+
+ return null;
+};
+
+/**
+ * Function generating a flat matrix for both nodes & edges of the given graph.
+ *
+ * @param {Graph} graph - Target graph.
+ * @param {function} getEdgeWeight - Edge weight getter function.
+ * @return {object} - Both matrices.
+ */
+exports.graphToByteArrays = function (graph, getEdgeWeight) {
+ var order = graph.order;
+ var size = graph.size;
+ var index = {};
+ var j;
+
+ // NOTE: float32 could lead to issues if edge array needs to index large
+ // number of nodes.
+ var NodeMatrix = new Float32Array(order * PPN);
+ var EdgeMatrix = new Float32Array(size * PPE);
+
+ // Iterate through nodes
+ j = 0;
+ graph.forEachNode(function (node, attr) {
+ // Node index
+ index[node] = j;
+
+ // Populating byte array
+ NodeMatrix[j] = attr.x;
+ NodeMatrix[j + 1] = attr.y;
+ NodeMatrix[j + 2] = 0; // dx
+ NodeMatrix[j + 3] = 0; // dy
+ NodeMatrix[j + 4] = 0; // old_dx
+ NodeMatrix[j + 5] = 0; // old_dy
+ NodeMatrix[j + 6] = 1; // mass
+ NodeMatrix[j + 7] = 1; // convergence
+ NodeMatrix[j + 8] = attr.size || 1;
+ NodeMatrix[j + 9] = attr.fixed ? 1 : 0;
+ j += PPN;
+ });
+
+ // Iterate through edges
+ j = 0;
+ graph.forEachEdge(function (edge, attr, source, target, sa, ta, u) {
+ var sj = index[source];
+ var tj = index[target];
+
+ var weight = getEdgeWeight(edge, attr, source, target, sa, ta, u);
+
+ // Incrementing mass to be a node's weighted degree
+ NodeMatrix[sj + 6] += weight;
+ NodeMatrix[tj + 6] += weight;
+
+ // Populating byte array
+ EdgeMatrix[j] = sj;
+ EdgeMatrix[j + 1] = tj;
+ EdgeMatrix[j + 2] = weight;
+ j += PPE;
+ });
+
+ return {
+ nodes: NodeMatrix,
+ edges: EdgeMatrix
+ };
+};
+
+/**
+ * Function applying the layout back to the graph.
+ *
+ * @param {Graph} graph - Target graph.
+ * @param {Float32Array} NodeMatrix - Node matrix.
+ * @param {function|null} outputReducer - A node reducer.
+ */
+exports.assignLayoutChanges = function (graph, NodeMatrix, outputReducer) {
+ var i = 0;
+
+ graph.updateEachNodeAttributes(function (node, attr) {
+ attr.x = NodeMatrix[i];
+ attr.y = NodeMatrix[i + 1];
+
+ i += PPN;
+
+ return outputReducer ? outputReducer(node, attr) : attr;
+ });
+};
+
+/**
+ * Function reading the positions (only) from the graph, to write them in the matrix.
+ *
+ * @param {Graph} graph - Target graph.
+ * @param {Float32Array} NodeMatrix - Node matrix.
+ */
+exports.readGraphPositions = function (graph, NodeMatrix) {
+ var i = 0;
+
+ graph.forEachNode(function (node, attr) {
+ NodeMatrix[i] = attr.x;
+ NodeMatrix[i + 1] = attr.y;
+
+ i += PPN;
+ });
+};
+
+/**
+ * Function collecting the layout positions.
+ *
+ * @param {Graph} graph - Target graph.
+ * @param {Float32Array} NodeMatrix - Node matrix.
+ * @param {function|null} outputReducer - A nodes reducer.
+ * @return {object} - Map to node positions.
+ */
+exports.collectLayoutChanges = function (graph, NodeMatrix, outputReducer) {
+ var nodes = graph.nodes(),
+ positions = {};
+
+ for (var i = 0, j = 0, l = NodeMatrix.length; i < l; i += PPN) {
+ if (outputReducer) {
+ var newAttr = Object.assign({}, graph.getNodeAttributes(nodes[j]));
+ newAttr.x = NodeMatrix[i];
+ newAttr.y = NodeMatrix[i + 1];
+ newAttr = outputReducer(nodes[j], newAttr);
+ positions[nodes[j]] = {
+ x: newAttr.x,
+ y: newAttr.y
+ };
+ } else {
+ positions[nodes[j]] = {
+ x: NodeMatrix[i],
+ y: NodeMatrix[i + 1]
+ };
+ }
+
+ j++;
+ }
+
+ return positions;
+};
+
+/**
+ * Function returning a web worker from the given function.
+ *
+ * @param {function} fn - Function for the worker.
+ * @return {DOMString}
+ */
+exports.createWorker = function createWorker(fn) {
+ var xURL = window.URL || window.webkitURL;
+ var code = fn.toString();
+ var objectUrl = xURL.createObjectURL(
+ new Blob(['(' + code + ').call(this);'], {type: 'text/javascript'})
+ );
+ var worker = new Worker(objectUrl);
+ xURL.revokeObjectURL(objectUrl);
+
+ return worker;
+};
diff --git a/node_modules/graphology-layout-forceatlas2/index.d.ts b/node_modules/graphology-layout-forceatlas2/index.d.ts
new file mode 100644
index 00000000..60ad79ce
--- /dev/null
+++ b/node_modules/graphology-layout-forceatlas2/index.d.ts
@@ -0,0 +1,71 @@
+import Graph, {Attributes, EdgeMapper} from 'graphology-types';
+
+type LayoutMapping = {[key: string]: {x: number; y: number}};
+
+export type ForceAtlas2Settings = {
+ linLogMode?: boolean;
+ outboundAttractionDistribution?: boolean;
+ adjustSizes?: boolean;
+ edgeWeightInfluence?: number;
+ scalingRatio?: number;
+ strongGravityMode?: boolean;
+ gravity?: number;
+ slowDown?: number;
+ barnesHutOptimize?: boolean;
+ barnesHutTheta?: number;
+};
+
+export type ForceAtlas2LayoutParameters<
+ NodeAttributes extends Attributes = Attributes,
+ EdgeAttributes extends Attributes = Attributes
+> = {
+ settings?: ForceAtlas2Settings;
+ getEdgeWeight?:
+ | keyof EdgeAttributes
+ | EdgeMapper<number, NodeAttributes, EdgeAttributes>
+ | null;
+ outputReducer?: (key: string, attributes: any) => any;
+};
+
+export interface ForceAtlas2SynchronousLayoutParameters<
+ NodeAttributes extends Attributes = Attributes,
+ EdgeAttributes extends Attributes = Attributes
+> extends ForceAtlas2LayoutParameters<NodeAttributes, EdgeAttributes> {
+ iterations: number;
+}
+
+interface IForceAtlas2Layout {
+ (graph: Graph, iterations: number): LayoutMapping;
+ <
+ NodeAttributes extends Attributes = Attributes,
+ EdgeAttributes extends Attributes = Attributes
+ >(
+ graph: Graph,
+ params: ForceAtlas2SynchronousLayoutParameters<
+ NodeAttributes,
+ EdgeAttributes
+ >
+ ): LayoutMapping;
+
+ assign(graph: Graph, iterations: number): void;
+ assign<
+ NodeAttributes extends Attributes = Attributes,
+ EdgeAttributes extends Attributes = Attributes
+ >(
+ graph: Graph,
+ params: ForceAtlas2SynchronousLayoutParameters<
+ NodeAttributes,
+ EdgeAttributes
+ >
+ ): void;
+
+ inferSettings(order: number): ForceAtlas2Settings;
+ inferSettings(graph: Graph): ForceAtlas2Settings;
+}
+
+export function inferSettings(order: number): ForceAtlas2Settings;
+export function inferSettings(graph: Graph): ForceAtlas2Settings;
+
+declare const forceAtlas2: IForceAtlas2Layout;
+
+export default forceAtlas2;
diff --git a/node_modules/graphology-layout-forceatlas2/index.js b/node_modules/graphology-layout-forceatlas2/index.js
new file mode 100644
index 00000000..c6d65893
--- /dev/null
+++ b/node_modules/graphology-layout-forceatlas2/index.js
@@ -0,0 +1,106 @@
+/**
+ * Graphology ForceAtlas2 Layout
+ * ==============================
+ *
+ * Library endpoint.
+ */
+var isGraph = require('graphology-utils/is-graph');
+var createEdgeWeightGetter =
+ require('graphology-utils/getters').createEdgeWeightGetter;
+var iterate = require('./iterate.js');
+var helpers = require('./helpers.js');
+
+var DEFAULT_SETTINGS = require('./defaults.js');
+
+/**
+ * Asbtract function used to run a certain number of iterations.
+ *
+ * @param {boolean} assign - Whether to assign positions.
+ * @param {Graph} graph - Target graph.
+ * @param {object|number} params - If number, params.iterations, else:
+ * @param {function} getWeight - Edge weight getter function.
+ * @param {number} iterations - Number of iterations.
+ * @param {function|null} outputReducer - A node reducer
+ * @param {object} [settings] - Settings.
+ * @return {object|undefined}
+ */
+function abstractSynchronousLayout(assign, graph, params) {
+ if (!isGraph(graph))
+ throw new Error(
+ 'graphology-layout-forceatlas2: the given graph is not a valid graphology instance.'
+ );
+
+ if (typeof params === 'number') params = {iterations: params};
+
+ var iterations = params.iterations;
+
+ if (typeof iterations !== 'number')
+ throw new Error(
+ 'graphology-layout-forceatlas2: invalid number of iterations.'
+ );
+
+ if (iterations <= 0)
+ throw new Error(
+ 'graphology-layout-forceatlas2: you should provide a positive number of iterations.'
+ );
+
+ var getEdgeWeight = createEdgeWeightGetter(
+ 'getEdgeWeight' in params ? params.getEdgeWeight : 'weight'
+ ).fromEntry;
+
+ var outputReducer =
+ typeof params.outputReducer === 'function' ? params.outputReducer : null;
+
+ // Validating settings
+ var settings = helpers.assign({}, DEFAULT_SETTINGS, params.settings);
+ var validationError = helpers.validateSettings(settings);
+
+ if (validationError)
+ throw new Error(
+ 'graphology-layout-forceatlas2: ' + validationError.message
+ );
+
+ // Building matrices
+ var matrices = helpers.graphToByteArrays(graph, getEdgeWeight);
+
+ var i;
+
+ // Iterating
+ for (i = 0; i < iterations; i++)
+ iterate(settings, matrices.nodes, matrices.edges);
+
+ // Applying
+ if (assign) {
+ helpers.assignLayoutChanges(graph, matrices.nodes, outputReducer);
+ return;
+ }
+
+ return helpers.collectLayoutChanges(graph, matrices.nodes);
+}
+
+/**
+ * Function returning sane layout settings for the given graph.
+ *
+ * @param {Graph|number} graph - Target graph or graph order.
+ * @return {object}
+ */
+function inferSettings(graph) {
+ var order = typeof graph === 'number' ? graph : graph.order;
+
+ return {
+ barnesHutOptimize: order > 2000,
+ strongGravityMode: true,
+ gravity: 0.05,
+ scalingRatio: 10,
+ slowDown: 1 + Math.log(order)
+ };
+}
+
+/**
+ * Exporting.
+ */
+var synchronousLayout = abstractSynchronousLayout.bind(null, false);
+synchronousLayout.assign = abstractSynchronousLayout.bind(null, true);
+synchronousLayout.inferSettings = inferSettings;
+
+module.exports = synchronousLayout;
diff --git a/node_modules/graphology-layout-forceatlas2/iterate.js b/node_modules/graphology-layout-forceatlas2/iterate.js
new file mode 100644
index 00000000..9e4fa844
--- /dev/null
+++ b/node_modules/graphology-layout-forceatlas2/iterate.js
@@ -0,0 +1,793 @@
+/* eslint no-constant-condition: 0 */
+/**
+ * Graphology ForceAtlas2 Iteration
+ * =================================
+ *
+ * Function used to perform a single iteration of the algorithm.
+ */
+
+/**
+ * Matrices properties accessors.
+ */
+var NODE_X = 0;
+var NODE_Y = 1;
+var NODE_DX = 2;
+var NODE_DY = 3;
+var NODE_OLD_DX = 4;
+var NODE_OLD_DY = 5;
+var NODE_MASS = 6;
+var NODE_CONVERGENCE = 7;
+var NODE_SIZE = 8;
+var NODE_FIXED = 9;
+
+var EDGE_SOURCE = 0;
+var EDGE_TARGET = 1;
+var EDGE_WEIGHT = 2;
+
+var REGION_NODE = 0;
+var REGION_CENTER_X = 1;
+var REGION_CENTER_Y = 2;
+var REGION_SIZE = 3;
+var REGION_NEXT_SIBLING = 4;
+var REGION_FIRST_CHILD = 5;
+var REGION_MASS = 6;
+var REGION_MASS_CENTER_X = 7;
+var REGION_MASS_CENTER_Y = 8;
+
+var SUBDIVISION_ATTEMPTS = 3;
+
+/**
+ * Constants.
+ */
+var PPN = 10;
+var PPE = 3;
+var PPR = 9;
+
+var MAX_FORCE = 10;
+
+/**
+ * Function used to perform a single interation of the algorithm.
+ *
+ * @param {object} options - Layout options.
+ * @param {Float32Array} NodeMatrix - Node data.
+ * @param {Float32Array} EdgeMatrix - Edge data.
+ * @return {object} - Some metadata.
+ */
+module.exports = function iterate(options, NodeMatrix, EdgeMatrix) {
+ // Initializing variables
+ var l, r, n, n1, n2, rn, e, w, g, s;
+
+ var order = NodeMatrix.length,
+ size = EdgeMatrix.length;
+
+ var adjustSizes = options.adjustSizes;
+
+ var thetaSquared = options.barnesHutTheta * options.barnesHutTheta;
+
+ var outboundAttCompensation, coefficient, xDist, yDist, ewc, distance, factor;
+
+ var RegionMatrix = [];
+
+ // 1) Initializing layout data
+ //-----------------------------
+
+ // Resetting positions & computing max values
+ for (n = 0; n < order; n += PPN) {
+ NodeMatrix[n + NODE_OLD_DX] = NodeMatrix[n + NODE_DX];
+ NodeMatrix[n + NODE_OLD_DY] = NodeMatrix[n + NODE_DY];
+ NodeMatrix[n + NODE_DX] = 0;
+ NodeMatrix[n + NODE_DY] = 0;
+ }
+
+ // If outbound attraction distribution, compensate
+ if (options.outboundAttractionDistribution) {
+ outboundAttCompensation = 0;
+ for (n = 0; n < order; n += PPN) {
+ outboundAttCompensation += NodeMatrix[n + NODE_MASS];
+ }
+
+ outboundAttCompensation /= order / PPN;
+ }
+
+ // 1.bis) Barnes-Hut computation
+ //------------------------------
+
+ if (options.barnesHutOptimize) {
+ // Setting up
+ var minX = Infinity,
+ maxX = -Infinity,
+ minY = Infinity,
+ maxY = -Infinity,
+ q,
+ q2,
+ subdivisionAttempts;
+
+ // Computing min and max values
+ for (n = 0; n < order; n += PPN) {
+ minX = Math.min(minX, NodeMatrix[n + NODE_X]);
+ maxX = Math.max(maxX, NodeMatrix[n + NODE_X]);
+ minY = Math.min(minY, NodeMatrix[n + NODE_Y]);
+ maxY = Math.max(maxY, NodeMatrix[n + NODE_Y]);
+ }
+
+ // squarify bounds, it's a quadtree
+ var dx = maxX - minX,
+ dy = maxY - minY;
+ if (dx > dy) {
+ minY -= (dx - dy) / 2;
+ maxY = minY + dx;
+ } else {
+ minX -= (dy - dx) / 2;
+ maxX = minX + dy;
+ }
+
+ // Build the Barnes Hut root region
+ RegionMatrix[0 + REGION_NODE] = -1;
+ RegionMatrix[0 + REGION_CENTER_X] = (minX + maxX) / 2;
+ RegionMatrix[0 + REGION_CENTER_Y] = (minY + maxY) / 2;
+ RegionMatrix[0 + REGION_SIZE] = Math.max(maxX - minX, maxY - minY);
+ RegionMatrix[0 + REGION_NEXT_SIBLING] = -1;
+ RegionMatrix[0 + REGION_FIRST_CHILD] = -1;
+ RegionMatrix[0 + REGION_MASS] = 0;
+ RegionMatrix[0 + REGION_MASS_CENTER_X] = 0;
+ RegionMatrix[0 + REGION_MASS_CENTER_Y] = 0;
+
+ // Add each node in the tree
+ l = 1;
+ for (n = 0; n < order; n += PPN) {
+ // Current region, starting with root
+ r = 0;
+ subdivisionAttempts = SUBDIVISION_ATTEMPTS;
+
+ while (true) {
+ // Are there sub-regions?
+
+ // We look at first child index
+ if (RegionMatrix[r + REGION_FIRST_CHILD] >= 0) {
+ // There are sub-regions
+
+ // We just iterate to find a "leaf" of the tree
+ // that is an empty region or a region with a single node
+ // (see next case)
+
+ // Find the quadrant of n
+ if (NodeMatrix[n + NODE_X] < RegionMatrix[r + REGION_CENTER_X]) {
+ if (NodeMatrix[n + NODE_Y] < RegionMatrix[r + REGION_CENTER_Y]) {
+ // Top Left quarter
+ q = RegionMatrix[r + REGION_FIRST_CHILD];
+ } else {
+ // Bottom Left quarter
+ q = RegionMatrix[r + REGION_FIRST_CHILD] + PPR;
+ }
+ } else {
+ if (NodeMatrix[n + NODE_Y] < RegionMatrix[r + REGION_CENTER_Y]) {
+ // Top Right quarter
+ q = RegionMatrix[r + REGION_FIRST_CHILD] + PPR * 2;
+ } else {
+ // Bottom Right quarter
+ q = RegionMatrix[r + REGION_FIRST_CHILD] + PPR * 3;
+ }
+ }
+
+ // Update center of mass and mass (we only do it for non-leave regions)
+ RegionMatrix[r + REGION_MASS_CENTER_X] =
+ (RegionMatrix[r + REGION_MASS_CENTER_X] *
+ RegionMatrix[r + REGION_MASS] +
+ NodeMatrix[n + NODE_X] * NodeMatrix[n + NODE_MASS]) /
+ (RegionMatrix[r + REGION_MASS] + NodeMatrix[n + NODE_MASS]);
+
+ RegionMatrix[r + REGION_MASS_CENTER_Y] =
+ (RegionMatrix[r + REGION_MASS_CENTER_Y] *
+ RegionMatrix[r + REGION_MASS] +
+ NodeMatrix[n + NODE_Y] * NodeMatrix[n + NODE_MASS]) /
+ (RegionMatrix[r + REGION_MASS] + NodeMatrix[n + NODE_MASS]);
+
+ RegionMatrix[r + REGION_MASS] += NodeMatrix[n + NODE_MASS];
+
+ // Iterate on the right quadrant
+ r = q;
+ continue;
+ } else {
+ // There are no sub-regions: we are in a "leaf"
+
+ // Is there a node in this leave?
+ if (RegionMatrix[r + REGION_NODE] < 0) {
+ // There is no node in region:
+ // we record node n and go on
+ RegionMatrix[r + REGION_NODE] = n;
+ break;
+ } else {
+ // There is a node in this region
+
+ // We will need to create sub-regions, stick the two
+ // nodes (the old one r[0] and the new one n) in two
+ // subregions. If they fall in the same quadrant,
+ // we will iterate.
+
+ // Create sub-regions
+ RegionMatrix[r + REGION_FIRST_CHILD] = l * PPR;
+ w = RegionMatrix[r + REGION_SIZE] / 2; // new size (half)
+
+ // NOTE: we use screen coordinates
+ // from Top Left to Bottom Right
+
+ // Top Left sub-region
+ g = RegionMatrix[r + REGION_FIRST_CHILD];
+
+ RegionMatrix[g + REGION_NODE] = -1;
+ RegionMatrix[g + REGION_CENTER_X] =
+ RegionMatrix[r + REGION_CENTER_X] - w;
+ RegionMatrix[g + REGION_CENTER_Y] =
+ RegionMatrix[r + REGION_CENTER_Y] - w;
+ RegionMatrix[g + REGION_SIZE] = w;
+ RegionMatrix[g + REGION_NEXT_SIBLING] = g + PPR;
+ RegionMatrix[g + REGION_FIRST_CHILD] = -1;
+ RegionMatrix[g + REGION_MASS] = 0;
+ RegionMatrix[g + REGION_MASS_CENTER_X] = 0;
+ RegionMatrix[g + REGION_MASS_CENTER_Y] = 0;
+
+ // Bottom Left sub-region
+ g += PPR;
+ RegionMatrix[g + REGION_NODE] = -1;
+ RegionMatrix[g + REGION_CENTER_X] =
+ RegionMatrix[r + REGION_CENTER_X] - w;
+ RegionMatrix[g + REGION_CENTER_Y] =
+ RegionMatrix[r + REGION_CENTER_Y] + w;
+ RegionMatrix[g + REGION_SIZE] = w;
+ RegionMatrix[g + REGION_NEXT_SIBLING] = g + PPR;
+ RegionMatrix[g + REGION_FIRST_CHILD] = -1;
+ RegionMatrix[g + REGION_MASS] = 0;
+ RegionMatrix[g + REGION_MASS_CENTER_X] = 0;
+ RegionMatrix[g + REGION_MASS_CENTER_Y] = 0;
+
+ // Top Right sub-region
+ g += PPR;
+ RegionMatrix[g + REGION_NODE] = -1;
+ RegionMatrix[g + REGION_CENTER_X] =
+ RegionMatrix[r + REGION_CENTER_X] + w;
+ RegionMatrix[g + REGION_CENTER_Y] =
+ RegionMatrix[r + REGION_CENTER_Y] - w;
+ RegionMatrix[g + REGION_SIZE] = w;
+ RegionMatrix[g + REGION_NEXT_SIBLING] = g + PPR;
+ RegionMatrix[g + REGION_FIRST_CHILD] = -1;
+ RegionMatrix[g + REGION_MASS] = 0;
+ RegionMatrix[g + REGION_MASS_CENTER_X] = 0;
+ RegionMatrix[g + REGION_MASS_CENTER_Y] = 0;
+
+ // Bottom Right sub-region
+ g += PPR;
+ RegionMatrix[g + REGION_NODE] = -1;
+ RegionMatrix[g + REGION_CENTER_X] =
+ RegionMatrix[r + REGION_CENTER_X] + w;
+ RegionMatrix[g + REGION_CENTER_Y] =
+ RegionMatrix[r + REGION_CENTER_Y] + w;
+ RegionMatrix[g + REGION_SIZE] = w;
+ RegionMatrix[g + REGION_NEXT_SIBLING] =
+ RegionMatrix[r + REGION_NEXT_SIBLING];
+ RegionMatrix[g + REGION_FIRST_CHILD] = -1;
+ RegionMatrix[g + REGION_MASS] = 0;
+ RegionMatrix[g + REGION_MASS_CENTER_X] = 0;
+ RegionMatrix[g + REGION_MASS_CENTER_Y] = 0;
+
+ l += 4;
+
+ // Now the goal is to find two different sub-regions
+ // for the two nodes: the one previously recorded (r[0])
+ // and the one we want to add (n)
+
+ // Find the quadrant of the old node
+ if (
+ NodeMatrix[RegionMatrix[r + REGION_NODE] + NODE_X] <
+ RegionMatrix[r + REGION_CENTER_X]
+ ) {
+ if (
+ NodeMatrix[RegionMatrix[r + REGION_NODE] + NODE_Y] <
+ RegionMatrix[r + REGION_CENTER_Y]
+ ) {
+ // Top Left quarter
+ q = RegionMatrix[r + REGION_FIRST_CHILD];
+ } else {
+ // Bottom Left quarter
+ q = RegionMatrix[r + REGION_FIRST_CHILD] + PPR;
+ }
+ } else {
+ if (
+ NodeMatrix[RegionMatrix[r + REGION_NODE] + NODE_Y] <
+ RegionMatrix[r + REGION_CENTER_Y]
+ ) {
+ // Top Right quarter
+ q = RegionMatrix[r + REGION_FIRST_CHILD] + PPR * 2;
+ } else {
+ // Bottom Right quarter
+ q = RegionMatrix[r + REGION_FIRST_CHILD] + PPR * 3;
+ }
+ }
+
+ // We remove r[0] from the region r, add its mass to r and record it in q
+ RegionMatrix[r + REGION_MASS] =
+ NodeMatrix[RegionMatrix[r + REGION_NODE] + NODE_MASS];
+ RegionMatrix[r + REGION_MASS_CENTER_X] =
+ NodeMatrix[RegionMatrix[r + REGION_NODE] + NODE_X];
+ RegionMatrix[r + REGION_MASS_CENTER_Y] =
+ NodeMatrix[RegionMatrix[r + REGION_NODE] + NODE_Y];
+
+ RegionMatrix[q + REGION_NODE] = RegionMatrix[r + REGION_NODE];
+ RegionMatrix[r + REGION_NODE] = -1;
+
+ // Find the quadrant of n
+ if (NodeMatrix[n + NODE_X] < RegionMatrix[r + REGION_CENTER_X]) {
+ if (NodeMatrix[n + NODE_Y] < RegionMatrix[r + REGION_CENTER_Y]) {
+ // Top Left quarter
+ q2 = RegionMatrix[r + REGION_FIRST_CHILD];
+ } else {
+ // Bottom Left quarter
+ q2 = RegionMatrix[r + REGION_FIRST_CHILD] + PPR;
+ }
+ } else {
+ if (NodeMatrix[n + NODE_Y] < RegionMatrix[r + REGION_CENTER_Y]) {
+ // Top Right quarter
+ q2 = RegionMatrix[r + REGION_FIRST_CHILD] + PPR * 2;
+ } else {
+ // Bottom Right quarter
+ q2 = RegionMatrix[r + REGION_FIRST_CHILD] + PPR * 3;
+ }
+ }
+
+ if (q === q2) {
+ // If both nodes are in the same quadrant,
+ // we have to try it again on this quadrant
+ if (subdivisionAttempts--) {
+ r = q;
+ continue; // while
+ } else {
+ // we are out of precision here, and we cannot subdivide anymore
+ // but we have to break the loop anyway
+ subdivisionAttempts = SUBDIVISION_ATTEMPTS;
+ break; // while
+ }
+ }
+
+ // If both quadrants are different, we record n
+ // in its quadrant
+ RegionMatrix[q2 + REGION_NODE] = n;
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ // 2) Repulsion
+ //--------------
+ // NOTES: adjustSizes = antiCollision & scalingRatio = coefficient
+
+ if (options.barnesHutOptimize) {
+ coefficient = options.scalingRatio;
+
+ // Applying repulsion through regions
+ for (n = 0; n < order; n += PPN) {
+ // Computing leaf quad nodes iteration
+
+ r = 0; // Starting with root region
+ while (true) {
+ if (RegionMatrix[r + REGION_FIRST_CHILD] >= 0) {
+ // The region has sub-regions
+
+ // We run the Barnes Hut test to see if we are at the right distance
+ distance =
+ Math.pow(
+ NodeMatrix[n + NODE_X] - RegionMatrix[r + REGION_MASS_CENTER_X],
+ 2
+ ) +
+ Math.pow(
+ NodeMatrix[n + NODE_Y] - RegionMatrix[r + REGION_MASS_CENTER_Y],
+ 2
+ );
+
+ s = RegionMatrix[r + REGION_SIZE];
+
+ if ((4 * s * s) / distance < thetaSquared) {
+ // We treat the region as a single body, and we repulse
+
+ xDist =
+ NodeMatrix[n + NODE_X] - RegionMatrix[r + REGION_MASS_CENTER_X];
+ yDist =
+ NodeMatrix[n + NODE_Y] - RegionMatrix[r + REGION_MASS_CENTER_Y];
+
+ if (adjustSizes === true) {
+ //-- Linear Anti-collision Repulsion
+ if (distance > 0) {
+ factor =
+ (coefficient *
+ NodeMatrix[n + NODE_MASS] *
+ RegionMatrix[r + REGION_MASS]) /
+ distance;
+
+ NodeMatrix[n + NODE_DX] += xDist * factor;
+ NodeMatrix[n + NODE_DY] += yDist * factor;
+ } else if (distance < 0) {
+ factor =
+ (-coefficient *
+ NodeMatrix[n + NODE_MASS] *
+ RegionMatrix[r + REGION_MASS]) /
+ Math.sqrt(distance);
+
+ NodeMatrix[n + NODE_DX] += xDist * factor;
+ NodeMatrix[n + NODE_DY] += yDist * factor;
+ }
+ } else {
+ //-- Linear Repulsion
+ if (distance > 0) {
+ factor =
+ (coefficient *
+ NodeMatrix[n + NODE_MASS] *
+ RegionMatrix[r + REGION_MASS]) /
+ distance;
+
+ NodeMatrix[n + NODE_DX] += xDist * factor;
+ NodeMatrix[n + NODE_DY] += yDist * factor;
+ }
+ }
+
+ // When this is done, we iterate. We have to look at the next sibling.
+ r = RegionMatrix[r + REGION_NEXT_SIBLING];
+ if (r < 0) break; // No next sibling: we have finished the tree
+
+ continue;
+ } else {
+ // The region is too close and we have to look at sub-regions
+ r = RegionMatrix[r + REGION_FIRST_CHILD];
+ continue;
+ }
+ } else {
+ // The region has no sub-region
+ // If there is a node r[0] and it is not n, then repulse
+ rn = RegionMatrix[r + REGION_NODE];
+
+ if (rn >= 0 && rn !== n) {
+ xDist = NodeMatrix[n + NODE_X] - NodeMatrix[rn + NODE_X];
+ yDist = NodeMatrix[n + NODE_Y] - NodeMatrix[rn + NODE_Y];
+
+ distance = xDist * xDist + yDist * yDist;
+
+ if (adjustSizes === true) {
+ //-- Linear Anti-collision Repulsion
+ if (distance > 0) {
+ factor =
+ (coefficient *
+ NodeMatrix[n + NODE_MASS] *
+ NodeMatrix[rn + NODE_MASS]) /
+ distance;
+
+ NodeMatrix[n + NODE_DX] += xDist * factor;
+ NodeMatrix[n + NODE_DY] += yDist * factor;
+ } else if (distance < 0) {
+ factor =
+ (-coefficient *
+ NodeMatrix[n + NODE_MASS] *
+ NodeMatrix[rn + NODE_MASS]) /
+ Math.sqrt(distance);
+
+ NodeMatrix[n + NODE_DX] += xDist * factor;
+ NodeMatrix[n + NODE_DY] += yDist * factor;
+ }
+ } else {
+ //-- Linear Repulsion
+ if (distance > 0) {
+ factor =
+ (coefficient *
+ NodeMatrix[n + NODE_MASS] *
+ NodeMatrix[rn + NODE_MASS]) /
+ distance;
+
+ NodeMatrix[n + NODE_DX] += xDist * factor;
+ NodeMatrix[n + NODE_DY] += yDist * factor;
+ }
+ }
+ }
+
+ // When this is done, we iterate. We have to look at the next sibling.
+ r = RegionMatrix[r + REGION_NEXT_SIBLING];
+
+ if (r < 0) break; // No next sibling: we have finished the tree
+
+ continue;
+ }
+ }
+ }
+ } else {
+ coefficient = options.scalingRatio;
+
+ // Square iteration
+ for (n1 = 0; n1 < order; n1 += PPN) {
+ for (n2 = 0; n2 < n1; n2 += PPN) {
+ // Common to both methods
+ xDist = NodeMatrix[n1 + NODE_X] - NodeMatrix[n2 + NODE_X];
+ yDist = NodeMatrix[n1 + NODE_Y] - NodeMatrix[n2 + NODE_Y];
+
+ if (adjustSizes === true) {
+ //-- Anticollision Linear Repulsion
+ distance =
+ Math.sqrt(xDist * xDist + yDist * yDist) -
+ NodeMatrix[n1 + NODE_SIZE] -
+ NodeMatrix[n2 + NODE_SIZE];
+
+ if (distance > 0) {
+ factor =
+ (coefficient *
+ NodeMatrix[n1 + NODE_MASS] *
+ NodeMatrix[n2 + NODE_MASS]) /
+ distance /
+ distance;
+
+ // Updating nodes' dx and dy
+ NodeMatrix[n1 + NODE_DX] += xDist * factor;
+ NodeMatrix[n1 + NODE_DY] += yDist * factor;
+
+ NodeMatrix[n2 + NODE_DX] -= xDist * factor;
+ NodeMatrix[n2 + NODE_DY] -= yDist * factor;
+ } else if (distance < 0) {
+ factor =
+ 100 *
+ coefficient *
+ NodeMatrix[n1 + NODE_MASS] *
+ NodeMatrix[n2 + NODE_MASS];
+
+ // Updating nodes' dx and dy
+ NodeMatrix[n1 + NODE_DX] += xDist * factor;
+ NodeMatrix[n1 + NODE_DY] += yDist * factor;
+
+ NodeMatrix[n2 + NODE_DX] -= xDist * factor;
+ NodeMatrix[n2 + NODE_DY] -= yDist * factor;
+ }
+ } else {
+ //-- Linear Repulsion
+ distance = Math.sqrt(xDist * xDist + yDist * yDist);
+
+ if (distance > 0) {
+ factor =
+ (coefficient *
+ NodeMatrix[n1 + NODE_MASS] *
+ NodeMatrix[n2 + NODE_MASS]) /
+ distance /
+ distance;
+
+ // Updating nodes' dx and dy
+ NodeMatrix[n1 + NODE_DX] += xDist * factor;
+ NodeMatrix[n1 + NODE_DY] += yDist * factor;
+
+ NodeMatrix[n2 + NODE_DX] -= xDist * factor;
+ NodeMatrix[n2 + NODE_DY] -= yDist * factor;
+ }
+ }
+ }
+ }
+ }
+
+ // 3) Gravity
+ //------------
+ g = options.gravity / options.scalingRatio;
+ coefficient = options.scalingRatio;
+ for (n = 0; n < order; n += PPN) {
+ factor = 0;
+
+ // Common to both methods
+ xDist = NodeMatrix[n + NODE_X];
+ yDist = NodeMatrix[n + NODE_Y];
+ distance = Math.sqrt(Math.pow(xDist, 2) + Math.pow(yDist, 2));
+
+ if (options.strongGravityMode) {
+ //-- Strong gravity
+ if (distance > 0) factor = coefficient * NodeMatrix[n + NODE_MASS] * g;
+ } else {
+ //-- Linear Anti-collision Repulsion n
+ if (distance > 0)
+ factor = (coefficient * NodeMatrix[n + NODE_MASS] * g) / distance;
+ }
+
+ // Updating node's dx and dy
+ NodeMatrix[n + NODE_DX] -= xDist * factor;
+ NodeMatrix[n + NODE_DY] -= yDist * factor;
+ }
+
+ // 4) Attraction
+ //---------------
+ coefficient =
+ 1 * (options.outboundAttractionDistribution ? outboundAttCompensation : 1);
+
+ // TODO: simplify distance
+ // TODO: coefficient is always used as -c --> optimize?
+ for (e = 0; e < size; e += PPE) {
+ n1 = EdgeMatrix[e + EDGE_SOURCE];
+ n2 = EdgeMatrix[e + EDGE_TARGET];
+ w = EdgeMatrix[e + EDGE_WEIGHT];
+
+ // Edge weight influence
+ ewc = Math.pow(w, options.edgeWeightInfluence);
+
+ // Common measures
+ xDist = NodeMatrix[n1 + NODE_X] - NodeMatrix[n2 + NODE_X];
+ yDist = NodeMatrix[n1 + NODE_Y] - NodeMatrix[n2 + NODE_Y];
+
+ // Applying attraction to nodes
+ if (adjustSizes === true) {
+ distance =
+ Math.sqrt(xDist * xDist + yDist * yDist) -
+ NodeMatrix[n1 + NODE_SIZE] -
+ NodeMatrix[n2 + NODE_SIZE];
+
+ if (options.linLogMode) {
+ if (options.outboundAttractionDistribution) {
+ //-- LinLog Degree Distributed Anti-collision Attraction
+ if (distance > 0) {
+ factor =
+ (-coefficient * ewc * Math.log(1 + distance)) /
+ distance /
+ NodeMatrix[n1 + NODE_MASS];
+ }
+ } else {
+ //-- LinLog Anti-collision Attraction
+ if (distance > 0) {
+ factor = (-coefficient * ewc * Math.log(1 + distance)) / distance;
+ }
+ }
+ } else {
+ if (options.outboundAttractionDistribution) {
+ //-- Linear Degree Distributed Anti-collision Attraction
+ if (distance > 0) {
+ factor = (-coefficient * ewc) / NodeMatrix[n1 + NODE_MASS];
+ }
+ } else {
+ //-- Linear Anti-collision Attraction
+ if (distance > 0) {
+ factor = -coefficient * ewc;
+ }
+ }
+ }
+ } else {
+ distance = Math.sqrt(Math.pow(xDist, 2) + Math.pow(yDist, 2));
+
+ if (options.linLogMode) {
+ if (options.outboundAttractionDistribution) {
+ //-- LinLog Degree Distributed Attraction
+ if (distance > 0) {
+ factor =
+ (-coefficient * ewc * Math.log(1 + distance)) /
+ distance /
+ NodeMatrix[n1 + NODE_MASS];
+ }
+ } else {
+ //-- LinLog Attraction
+ if (distance > 0)
+ factor = (-coefficient * ewc * Math.log(1 + distance)) / distance;
+ }
+ } else {
+ if (options.outboundAttractionDistribution) {
+ //-- Linear Attraction Mass Distributed
+ // NOTE: Distance is set to 1 to override next condition
+ distance = 1;
+ factor = (-coefficient * ewc) / NodeMatrix[n1 + NODE_MASS];
+ } else {
+ //-- Linear Attraction
+ // NOTE: Distance is set to 1 to override next condition
+ distance = 1;
+ factor = -coefficient * ewc;
+ }
+ }
+ }
+
+ // Updating nodes' dx and dy
+ // TODO: if condition or factor = 1?
+ if (distance > 0) {
+ // Updating nodes' dx and dy
+ NodeMatrix[n1 + NODE_DX] += xDist * factor;
+ NodeMatrix[n1 + NODE_DY] += yDist * factor;
+
+ NodeMatrix[n2 + NODE_DX] -= xDist * factor;
+ NodeMatrix[n2 + NODE_DY] -= yDist * factor;
+ }
+ }
+
+ // 5) Apply Forces
+ //-----------------
+ var force, swinging, traction, nodespeed, newX, newY;
+
+ // MATH: sqrt and square distances
+ if (adjustSizes === true) {
+ for (n = 0; n < order; n += PPN) {
+ if (NodeMatrix[n + NODE_FIXED] !== 1) {
+ force = Math.sqrt(
+ Math.pow(NodeMatrix[n + NODE_DX], 2) +
+ Math.pow(NodeMatrix[n + NODE_DY], 2)
+ );
+
+ if (force > MAX_FORCE) {
+ NodeMatrix[n + NODE_DX] =
+ (NodeMatrix[n + NODE_DX] * MAX_FORCE) / force;
+ NodeMatrix[n + NODE_DY] =
+ (NodeMatrix[n + NODE_DY] * MAX_FORCE) / force;
+ }
+
+ swinging =
+ NodeMatrix[n + NODE_MASS] *
+ Math.sqrt(
+ (NodeMatrix[n + NODE_OLD_DX] - NodeMatrix[n + NODE_DX]) *
+ (NodeMatrix[n + NODE_OLD_DX] - NodeMatrix[n + NODE_DX]) +
+ (NodeMatrix[n + NODE_OLD_DY] - NodeMatrix[n + NODE_DY]) *
+ (NodeMatrix[n + NODE_OLD_DY] - NodeMatrix[n + NODE_DY])
+ );
+
+ traction =
+ Math.sqrt(
+ (NodeMatrix[n + NODE_OLD_DX] + NodeMatrix[n + NODE_DX]) *
+ (NodeMatrix[n + NODE_OLD_DX] + NodeMatrix[n + NODE_DX]) +
+ (NodeMatrix[n + NODE_OLD_DY] + NodeMatrix[n + NODE_DY]) *
+ (NodeMatrix[n + NODE_OLD_DY] + NodeMatrix[n + NODE_DY])
+ ) / 2;
+
+ nodespeed = (0.1 * Math.log(1 + traction)) / (1 + Math.sqrt(swinging));
+
+ // Updating node's positon
+ newX =
+ NodeMatrix[n + NODE_X] +
+ NodeMatrix[n + NODE_DX] * (nodespeed / options.slowDown);
+ NodeMatrix[n + NODE_X] = newX;
+
+ newY =
+ NodeMatrix[n + NODE_Y] +
+ NodeMatrix[n + NODE_DY] * (nodespeed / options.slowDown);
+ NodeMatrix[n + NODE_Y] = newY;
+ }
+ }
+ } else {
+ for (n = 0; n < order; n += PPN) {
+ if (NodeMatrix[n + NODE_FIXED] !== 1) {
+ swinging =
+ NodeMatrix[n + NODE_MASS] *
+ Math.sqrt(
+ (NodeMatrix[n + NODE_OLD_DX] - NodeMatrix[n + NODE_DX]) *
+ (NodeMatrix[n + NODE_OLD_DX] - NodeMatrix[n + NODE_DX]) +
+ (NodeMatrix[n + NODE_OLD_DY] - NodeMatrix[n + NODE_DY]) *
+ (NodeMatrix[n + NODE_OLD_DY] - NodeMatrix[n + NODE_DY])
+ );
+
+ traction =
+ Math.sqrt(
+ (NodeMatrix[n + NODE_OLD_DX] + NodeMatrix[n + NODE_DX]) *
+ (NodeMatrix[n + NODE_OLD_DX] + NodeMatrix[n + NODE_DX]) +
+ (NodeMatrix[n + NODE_OLD_DY] + NodeMatrix[n + NODE_DY]) *
+ (NodeMatrix[n + NODE_OLD_DY] + NodeMatrix[n + NODE_DY])
+ ) / 2;
+
+ nodespeed =
+ (NodeMatrix[n + NODE_CONVERGENCE] * Math.log(1 + traction)) /
+ (1 + Math.sqrt(swinging));
+
+ // Updating node convergence
+ NodeMatrix[n + NODE_CONVERGENCE] = Math.min(
+ 1,
+ Math.sqrt(
+ (nodespeed *
+ (Math.pow(NodeMatrix[n + NODE_DX], 2) +
+ Math.pow(NodeMatrix[n + NODE_DY], 2))) /
+ (1 + Math.sqrt(swinging))
+ )
+ );
+
+ // Updating node's positon
+ newX =
+ NodeMatrix[n + NODE_X] +
+ NodeMatrix[n + NODE_DX] * (nodespeed / options.slowDown);
+ NodeMatrix[n + NODE_X] = newX;
+
+ newY =
+ NodeMatrix[n + NODE_Y] +
+ NodeMatrix[n + NODE_DY] * (nodespeed / options.slowDown);
+ NodeMatrix[n + NODE_Y] = newY;
+ }
+ }
+ }
+
+ // We return the information about the layout (no need to return the matrices)
+ return {};
+};
diff --git a/node_modules/graphology-layout-forceatlas2/package.json b/node_modules/graphology-layout-forceatlas2/package.json
new file mode 100644
index 00000000..28b08338
--- /dev/null
+++ b/node_modules/graphology-layout-forceatlas2/package.json
@@ -0,0 +1,47 @@
+{
+ "name": "graphology-layout-forceatlas2",
+ "version": "0.10.1",
+ "description": "ForceAtlas 2 layout algorithm for graphology.",
+ "main": "index.js",
+ "files": [
+ "*.d.ts",
+ "defaults.js",
+ "helpers.js",
+ "index.js",
+ "iterate.js",
+ "worker.js",
+ "webworker.js"
+ ],
+ "scripts": {
+ "bench": "node bench.js",
+ "clean": "rimraf webworker.js",
+ "prepublishOnly": "npm run clean && npm test && npm run template",
+ "template": "node ./scripts/template-webworker.js > webworker.js",
+ "test": "mocha test.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/graphology/graphology.git"
+ },
+ "keywords": [
+ "graph",
+ "graphology",
+ "layout",
+ "force atlas"
+ ],
+ "author": {
+ "name": "Guillaume Plique",
+ "url": "http://github.com/Yomguithereal"
+ },
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/graphology/graphology/issues"
+ },
+ "homepage": "https://github.com/graphology/graphology#readme",
+ "peerDependencies": {
+ "graphology-types": ">=0.19.0"
+ },
+ "dependencies": {
+ "graphology-utils": "^2.1.0"
+ }
+}
diff --git a/node_modules/graphology-layout-forceatlas2/webworker.js b/node_modules/graphology-layout-forceatlas2/webworker.js
new file mode 100644
index 00000000..1a683771
--- /dev/null
+++ b/node_modules/graphology-layout-forceatlas2/webworker.js
@@ -0,0 +1,830 @@
+/**
+ * Graphology ForceAtlas2 Layout Webworker
+ * ========================================
+ *
+ * Web worker able to run the layout in a separate thread.
+ */
+module.exports = function worker() {
+ var NODES, EDGES;
+
+ var moduleShim = {};
+
+ (function () {
+ /* eslint no-constant-condition: 0 */
+/**
+ * Graphology ForceAtlas2 Iteration
+ * =================================
+ *
+ * Function used to perform a single iteration of the algorithm.
+ */
+
+/**
+ * Matrices properties accessors.
+ */
+var NODE_X = 0;
+var NODE_Y = 1;
+var NODE_DX = 2;
+var NODE_DY = 3;
+var NODE_OLD_DX = 4;
+var NODE_OLD_DY = 5;
+var NODE_MASS = 6;
+var NODE_CONVERGENCE = 7;
+var NODE_SIZE = 8;
+var NODE_FIXED = 9;
+
+var EDGE_SOURCE = 0;
+var EDGE_TARGET = 1;
+var EDGE_WEIGHT = 2;
+
+var REGION_NODE = 0;
+var REGION_CENTER_X = 1;
+var REGION_CENTER_Y = 2;
+var REGION_SIZE = 3;
+var REGION_NEXT_SIBLING = 4;
+var REGION_FIRST_CHILD = 5;
+var REGION_MASS = 6;
+var REGION_MASS_CENTER_X = 7;
+var REGION_MASS_CENTER_Y = 8;
+
+var SUBDIVISION_ATTEMPTS = 3;
+
+/**
+ * Constants.
+ */
+var PPN = 10;
+var PPE = 3;
+var PPR = 9;
+
+var MAX_FORCE = 10;
+
+/**
+ * Function used to perform a single interation of the algorithm.
+ *
+ * @param {object} options - Layout options.
+ * @param {Float32Array} NodeMatrix - Node data.
+ * @param {Float32Array} EdgeMatrix - Edge data.
+ * @return {object} - Some metadata.
+ */
+moduleShim.exports = function iterate(options, NodeMatrix, EdgeMatrix) {
+ // Initializing variables
+ var l, r, n, n1, n2, rn, e, w, g, s;
+
+ var order = NodeMatrix.length,
+ size = EdgeMatrix.length;
+
+ var adjustSizes = options.adjustSizes;
+
+ var thetaSquared = options.barnesHutTheta * options.barnesHutTheta;
+
+ var outboundAttCompensation, coefficient, xDist, yDist, ewc, distance, factor;
+
+ var RegionMatrix = [];
+
+ // 1) Initializing layout data
+ //-----------------------------
+
+ // Resetting positions & computing max values
+ for (n = 0; n < order; n += PPN) {
+ NodeMatrix[n + NODE_OLD_DX] = NodeMatrix[n + NODE_DX];
+ NodeMatrix[n + NODE_OLD_DY] = NodeMatrix[n + NODE_DY];
+ NodeMatrix[n + NODE_DX] = 0;
+ NodeMatrix[n + NODE_DY] = 0;
+ }
+
+ // If outbound attraction distribution, compensate
+ if (options.outboundAttractionDistribution) {
+ outboundAttCompensation = 0;
+ for (n = 0; n < order; n += PPN) {
+ outboundAttCompensation += NodeMatrix[n + NODE_MASS];
+ }
+
+ outboundAttCompensation /= order / PPN;
+ }
+
+ // 1.bis) Barnes-Hut computation
+ //------------------------------
+
+ if (options.barnesHutOptimize) {
+ // Setting up
+ var minX = Infinity,
+ maxX = -Infinity,
+ minY = Infinity,
+ maxY = -Infinity,
+ q,
+ q2,
+ subdivisionAttempts;
+
+ // Computing min and max values
+ for (n = 0; n < order; n += PPN) {
+ minX = Math.min(minX, NodeMatrix[n + NODE_X]);
+ maxX = Math.max(maxX, NodeMatrix[n + NODE_X]);
+ minY = Math.min(minY, NodeMatrix[n + NODE_Y]);
+ maxY = Math.max(maxY, NodeMatrix[n + NODE_Y]);
+ }
+
+ // squarify bounds, it's a quadtree
+ var dx = maxX - minX,
+ dy = maxY - minY;
+ if (dx > dy) {
+ minY -= (dx - dy) / 2;
+ maxY = minY + dx;
+ } else {
+ minX -= (dy - dx) / 2;
+ maxX = minX + dy;
+ }
+
+ // Build the Barnes Hut root region
+ RegionMatrix[0 + REGION_NODE] = -1;
+ RegionMatrix[0 + REGION_CENTER_X] = (minX + maxX) / 2;
+ RegionMatrix[0 + REGION_CENTER_Y] = (minY + maxY) / 2;
+ RegionMatrix[0 + REGION_SIZE] = Math.max(maxX - minX, maxY - minY);
+ RegionMatrix[0 + REGION_NEXT_SIBLING] = -1;
+ RegionMatrix[0 + REGION_FIRST_CHILD] = -1;
+ RegionMatrix[0 + REGION_MASS] = 0;
+ RegionMatrix[0 + REGION_MASS_CENTER_X] = 0;
+ RegionMatrix[0 + REGION_MASS_CENTER_Y] = 0;
+
+ // Add each node in the tree
+ l = 1;
+ for (n = 0; n < order; n += PPN) {
+ // Current region, starting with root
+ r = 0;
+ subdivisionAttempts = SUBDIVISION_ATTEMPTS;
+
+ while (true) {
+ // Are there sub-regions?
+
+ // We look at first child index
+ if (RegionMatrix[r + REGION_FIRST_CHILD] >= 0) {
+ // There are sub-regions
+
+ // We just iterate to find a "leaf" of the tree
+ // that is an empty region or a region with a single node
+ // (see next case)
+
+ // Find the quadrant of n
+ if (NodeMatrix[n + NODE_X] < RegionMatrix[r + REGION_CENTER_X]) {
+ if (NodeMatrix[n + NODE_Y] < RegionMatrix[r + REGION_CENTER_Y]) {
+ // Top Left quarter
+ q = RegionMatrix[r + REGION_FIRST_CHILD];
+ } else {
+ // Bottom Left quarter
+ q = RegionMatrix[r + REGION_FIRST_CHILD] + PPR;
+ }
+ } else {
+ if (NodeMatrix[n + NODE_Y] < RegionMatrix[r + REGION_CENTER_Y]) {
+ // Top Right quarter
+ q = RegionMatrix[r + REGION_FIRST_CHILD] + PPR * 2;
+ } else {
+ // Bottom Right quarter
+ q = RegionMatrix[r + REGION_FIRST_CHILD] + PPR * 3;
+ }
+ }
+
+ // Update center of mass and mass (we only do it for non-leave regions)
+ RegionMatrix[r + REGION_MASS_CENTER_X] =
+ (RegionMatrix[r + REGION_MASS_CENTER_X] *
+ RegionMatrix[r + REGION_MASS] +
+ NodeMatrix[n + NODE_X] * NodeMatrix[n + NODE_MASS]) /
+ (RegionMatrix[r + REGION_MASS] + NodeMatrix[n + NODE_MASS]);
+
+ RegionMatrix[r + REGION_MASS_CENTER_Y] =
+ (RegionMatrix[r + REGION_MASS_CENTER_Y] *
+ RegionMatrix[r + REGION_MASS] +
+ NodeMatrix[n + NODE_Y] * NodeMatrix[n + NODE_MASS]) /
+ (RegionMatrix[r + REGION_MASS] + NodeMatrix[n + NODE_MASS]);
+
+ RegionMatrix[r + REGION_MASS] += NodeMatrix[n + NODE_MASS];
+
+ // Iterate on the right quadrant
+ r = q;
+ continue;
+ } else {
+ // There are no sub-regions: we are in a "leaf"
+
+ // Is there a node in this leave?
+ if (RegionMatrix[r + REGION_NODE] < 0) {
+ // There is no node in region:
+ // we record node n and go on
+ RegionMatrix[r + REGION_NODE] = n;
+ break;
+ } else {
+ // There is a node in this region
+
+ // We will need to create sub-regions, stick the two
+ // nodes (the old one r[0] and the new one n) in two
+ // subregions. If they fall in the same quadrant,
+ // we will iterate.
+
+ // Create sub-regions
+ RegionMatrix[r + REGION_FIRST_CHILD] = l * PPR;
+ w = RegionMatrix[r + REGION_SIZE] / 2; // new size (half)
+
+ // NOTE: we use screen coordinates
+ // from Top Left to Bottom Right
+
+ // Top Left sub-region
+ g = RegionMatrix[r + REGION_FIRST_CHILD];
+
+ RegionMatrix[g + REGION_NODE] = -1;
+ RegionMatrix[g + REGION_CENTER_X] =
+ RegionMatrix[r + REGION_CENTER_X] - w;
+ RegionMatrix[g + REGION_CENTER_Y] =
+ RegionMatrix[r + REGION_CENTER_Y] - w;
+ RegionMatrix[g + REGION_SIZE] = w;
+ RegionMatrix[g + REGION_NEXT_SIBLING] = g + PPR;
+ RegionMatrix[g + REGION_FIRST_CHILD] = -1;
+ RegionMatrix[g + REGION_MASS] = 0;
+ RegionMatrix[g + REGION_MASS_CENTER_X] = 0;
+ RegionMatrix[g + REGION_MASS_CENTER_Y] = 0;
+
+ // Bottom Left sub-region
+ g += PPR;
+ RegionMatrix[g + REGION_NODE] = -1;
+ RegionMatrix[g + REGION_CENTER_X] =
+ RegionMatrix[r + REGION_CENTER_X] - w;
+ RegionMatrix[g + REGION_CENTER_Y] =
+ RegionMatrix[r + REGION_CENTER_Y] + w;
+ RegionMatrix[g + REGION_SIZE] = w;
+ RegionMatrix[g + REGION_NEXT_SIBLING] = g + PPR;
+ RegionMatrix[g + REGION_FIRST_CHILD] = -1;
+ RegionMatrix[g + REGION_MASS] = 0;
+ RegionMatrix[g + REGION_MASS_CENTER_X] = 0;
+ RegionMatrix[g + REGION_MASS_CENTER_Y] = 0;
+
+ // Top Right sub-region
+ g += PPR;
+ RegionMatrix[g + REGION_NODE] = -1;
+ RegionMatrix[g + REGION_CENTER_X] =
+ RegionMatrix[r + REGION_CENTER_X] + w;
+ RegionMatrix[g + REGION_CENTER_Y] =
+ RegionMatrix[r + REGION_CENTER_Y] - w;
+ RegionMatrix[g + REGION_SIZE] = w;
+ RegionMatrix[g + REGION_NEXT_SIBLING] = g + PPR;
+ RegionMatrix[g + REGION_FIRST_CHILD] = -1;
+ RegionMatrix[g + REGION_MASS] = 0;
+ RegionMatrix[g + REGION_MASS_CENTER_X] = 0;
+ RegionMatrix[g + REGION_MASS_CENTER_Y] = 0;
+
+ // Bottom Right sub-region
+ g += PPR;
+ RegionMatrix[g + REGION_NODE] = -1;
+ RegionMatrix[g + REGION_CENTER_X] =
+ RegionMatrix[r + REGION_CENTER_X] + w;
+ RegionMatrix[g + REGION_CENTER_Y] =
+ RegionMatrix[r + REGION_CENTER_Y] + w;
+ RegionMatrix[g + REGION_SIZE] = w;
+ RegionMatrix[g + REGION_NEXT_SIBLING] =
+ RegionMatrix[r + REGION_NEXT_SIBLING];
+ RegionMatrix[g + REGION_FIRST_CHILD] = -1;
+ RegionMatrix[g + REGION_MASS] = 0;
+ RegionMatrix[g + REGION_MASS_CENTER_X] = 0;
+ RegionMatrix[g + REGION_MASS_CENTER_Y] = 0;
+
+ l += 4;
+
+ // Now the goal is to find two different sub-regions
+ // for the two nodes: the one previously recorded (r[0])
+ // and the one we want to add (n)
+
+ // Find the quadrant of the old node
+ if (
+ NodeMatrix[RegionMatrix[r + REGION_NODE] + NODE_X] <
+ RegionMatrix[r + REGION_CENTER_X]
+ ) {
+ if (
+ NodeMatrix[RegionMatrix[r + REGION_NODE] + NODE_Y] <
+ RegionMatrix[r + REGION_CENTER_Y]
+ ) {
+ // Top Left quarter
+ q = RegionMatrix[r + REGION_FIRST_CHILD];
+ } else {
+ // Bottom Left quarter
+ q = RegionMatrix[r + REGION_FIRST_CHILD] + PPR;
+ }
+ } else {
+ if (
+ NodeMatrix[RegionMatrix[r + REGION_NODE] + NODE_Y] <
+ RegionMatrix[r + REGION_CENTER_Y]
+ ) {
+ // Top Right quarter
+ q = RegionMatrix[r + REGION_FIRST_CHILD] + PPR * 2;
+ } else {
+ // Bottom Right quarter
+ q = RegionMatrix[r + REGION_FIRST_CHILD] + PPR * 3;
+ }
+ }
+
+ // We remove r[0] from the region r, add its mass to r and record it in q
+ RegionMatrix[r + REGION_MASS] =
+ NodeMatrix[RegionMatrix[r + REGION_NODE] + NODE_MASS];
+ RegionMatrix[r + REGION_MASS_CENTER_X] =
+ NodeMatrix[RegionMatrix[r + REGION_NODE] + NODE_X];
+ RegionMatrix[r + REGION_MASS_CENTER_Y] =
+ NodeMatrix[RegionMatrix[r + REGION_NODE] + NODE_Y];
+
+ RegionMatrix[q + REGION_NODE] = RegionMatrix[r + REGION_NODE];
+ RegionMatrix[r + REGION_NODE] = -1;
+
+ // Find the quadrant of n
+ if (NodeMatrix[n + NODE_X] < RegionMatrix[r + REGION_CENTER_X]) {
+ if (NodeMatrix[n + NODE_Y] < RegionMatrix[r + REGION_CENTER_Y]) {
+ // Top Left quarter
+ q2 = RegionMatrix[r + REGION_FIRST_CHILD];
+ } else {
+ // Bottom Left quarter
+ q2 = RegionMatrix[r + REGION_FIRST_CHILD] + PPR;
+ }
+ } else {
+ if (NodeMatrix[n + NODE_Y] < RegionMatrix[r + REGION_CENTER_Y]) {
+ // Top Right quarter
+ q2 = RegionMatrix[r + REGION_FIRST_CHILD] + PPR * 2;
+ } else {
+ // Bottom Right quarter
+ q2 = RegionMatrix[r + REGION_FIRST_CHILD] + PPR * 3;
+ }
+ }
+
+ if (q === q2) {
+ // If both nodes are in the same quadrant,
+ // we have to try it again on this quadrant
+ if (subdivisionAttempts--) {
+ r = q;
+ continue; // while
+ } else {
+ // we are out of precision here, and we cannot subdivide anymore
+ // but we have to break the loop anyway
+ subdivisionAttempts = SUBDIVISION_ATTEMPTS;
+ break; // while
+ }
+ }
+
+ // If both quadrants are different, we record n
+ // in its quadrant
+ RegionMatrix[q2 + REGION_NODE] = n;
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ // 2) Repulsion
+ //--------------
+ // NOTES: adjustSizes = antiCollision & scalingRatio = coefficient
+
+ if (options.barnesHutOptimize) {
+ coefficient = options.scalingRatio;
+
+ // Applying repulsion through regions
+ for (n = 0; n < order; n += PPN) {
+ // Computing leaf quad nodes iteration
+
+ r = 0; // Starting with root region
+ while (true) {
+ if (RegionMatrix[r + REGION_FIRST_CHILD] >= 0) {
+ // The region has sub-regions
+
+ // We run the Barnes Hut test to see if we are at the right distance
+ distance =
+ Math.pow(
+ NodeMatrix[n + NODE_X] - RegionMatrix[r + REGION_MASS_CENTER_X],
+ 2
+ ) +
+ Math.pow(
+ NodeMatrix[n + NODE_Y] - RegionMatrix[r + REGION_MASS_CENTER_Y],
+ 2
+ );
+
+ s = RegionMatrix[r + REGION_SIZE];
+
+ if ((4 * s * s) / distance < thetaSquared) {
+ // We treat the region as a single body, and we repulse
+
+ xDist =
+ NodeMatrix[n + NODE_X] - RegionMatrix[r + REGION_MASS_CENTER_X];
+ yDist =
+ NodeMatrix[n + NODE_Y] - RegionMatrix[r + REGION_MASS_CENTER_Y];
+
+ if (adjustSizes === true) {
+ //-- Linear Anti-collision Repulsion
+ if (distance > 0) {
+ factor =
+ (coefficient *
+ NodeMatrix[n + NODE_MASS] *
+ RegionMatrix[r + REGION_MASS]) /
+ distance;
+
+ NodeMatrix[n + NODE_DX] += xDist * factor;
+ NodeMatrix[n + NODE_DY] += yDist * factor;
+ } else if (distance < 0) {
+ factor =
+ (-coefficient *
+ NodeMatrix[n + NODE_MASS] *
+ RegionMatrix[r + REGION_MASS]) /
+ Math.sqrt(distance);
+
+ NodeMatrix[n + NODE_DX] += xDist * factor;
+ NodeMatrix[n + NODE_DY] += yDist * factor;
+ }
+ } else {
+ //-- Linear Repulsion
+ if (distance > 0) {
+ factor =
+ (coefficient *
+ NodeMatrix[n + NODE_MASS] *
+ RegionMatrix[r + REGION_MASS]) /
+ distance;
+
+ NodeMatrix[n + NODE_DX] += xDist * factor;
+ NodeMatrix[n + NODE_DY] += yDist * factor;
+ }
+ }
+
+ // When this is done, we iterate. We have to look at the next sibling.
+ r = RegionMatrix[r + REGION_NEXT_SIBLING];
+ if (r < 0) break; // No next sibling: we have finished the tree
+
+ continue;
+ } else {
+ // The region is too close and we have to look at sub-regions
+ r = RegionMatrix[r + REGION_FIRST_CHILD];
+ continue;
+ }
+ } else {
+ // The region has no sub-region
+ // If there is a node r[0] and it is not n, then repulse
+ rn = RegionMatrix[r + REGION_NODE];
+
+ if (rn >= 0 && rn !== n) {
+ xDist = NodeMatrix[n + NODE_X] - NodeMatrix[rn + NODE_X];
+ yDist = NodeMatrix[n + NODE_Y] - NodeMatrix[rn + NODE_Y];
+
+ distance = xDist * xDist + yDist * yDist;
+
+ if (adjustSizes === true) {
+ //-- Linear Anti-collision Repulsion
+ if (distance > 0) {
+ factor =
+ (coefficient *
+ NodeMatrix[n + NODE_MASS] *
+ NodeMatrix[rn + NODE_MASS]) /
+ distance;
+
+ NodeMatrix[n + NODE_DX] += xDist * factor;
+ NodeMatrix[n + NODE_DY] += yDist * factor;
+ } else if (distance < 0) {
+ factor =
+ (-coefficient *
+ NodeMatrix[n + NODE_MASS] *
+ NodeMatrix[rn + NODE_MASS]) /
+ Math.sqrt(distance);
+
+ NodeMatrix[n + NODE_DX] += xDist * factor;
+ NodeMatrix[n + NODE_DY] += yDist * factor;
+ }
+ } else {
+ //-- Linear Repulsion
+ if (distance > 0) {
+ factor =
+ (coefficient *
+ NodeMatrix[n + NODE_MASS] *
+ NodeMatrix[rn + NODE_MASS]) /
+ distance;
+
+ NodeMatrix[n + NODE_DX] += xDist * factor;
+ NodeMatrix[n + NODE_DY] += yDist * factor;
+ }
+ }
+ }
+
+ // When this is done, we iterate. We have to look at the next sibling.
+ r = RegionMatrix[r + REGION_NEXT_SIBLING];
+
+ if (r < 0) break; // No next sibling: we have finished the tree
+
+ continue;
+ }
+ }
+ }
+ } else {
+ coefficient = options.scalingRatio;
+
+ // Square iteration
+ for (n1 = 0; n1 < order; n1 += PPN) {
+ for (n2 = 0; n2 < n1; n2 += PPN) {
+ // Common to both methods
+ xDist = NodeMatrix[n1 + NODE_X] - NodeMatrix[n2 + NODE_X];
+ yDist = NodeMatrix[n1 + NODE_Y] - NodeMatrix[n2 + NODE_Y];
+
+ if (adjustSizes === true) {
+ //-- Anticollision Linear Repulsion
+ distance =
+ Math.sqrt(xDist * xDist + yDist * yDist) -
+ NodeMatrix[n1 + NODE_SIZE] -
+ NodeMatrix[n2 + NODE_SIZE];
+
+ if (distance > 0) {
+ factor =
+ (coefficient *
+ NodeMatrix[n1 + NODE_MASS] *
+ NodeMatrix[n2 + NODE_MASS]) /
+ distance /
+ distance;
+
+ // Updating nodes' dx and dy
+ NodeMatrix[n1 + NODE_DX] += xDist * factor;
+ NodeMatrix[n1 + NODE_DY] += yDist * factor;
+
+ NodeMatrix[n2 + NODE_DX] -= xDist * factor;
+ NodeMatrix[n2 + NODE_DY] -= yDist * factor;
+ } else if (distance < 0) {
+ factor =
+ 100 *
+ coefficient *
+ NodeMatrix[n1 + NODE_MASS] *
+ NodeMatrix[n2 + NODE_MASS];
+
+ // Updating nodes' dx and dy
+ NodeMatrix[n1 + NODE_DX] += xDist * factor;
+ NodeMatrix[n1 + NODE_DY] += yDist * factor;
+
+ NodeMatrix[n2 + NODE_DX] -= xDist * factor;
+ NodeMatrix[n2 + NODE_DY] -= yDist * factor;
+ }
+ } else {
+ //-- Linear Repulsion
+ distance = Math.sqrt(xDist * xDist + yDist * yDist);
+
+ if (distance > 0) {
+ factor =
+ (coefficient *
+ NodeMatrix[n1 + NODE_MASS] *
+ NodeMatrix[n2 + NODE_MASS]) /
+ distance /
+ distance;
+
+ // Updating nodes' dx and dy
+ NodeMatrix[n1 + NODE_DX] += xDist * factor;
+ NodeMatrix[n1 + NODE_DY] += yDist * factor;
+
+ NodeMatrix[n2 + NODE_DX] -= xDist * factor;
+ NodeMatrix[n2 + NODE_DY] -= yDist * factor;
+ }
+ }
+ }
+ }
+ }
+
+ // 3) Gravity
+ //------------
+ g = options.gravity / options.scalingRatio;
+ coefficient = options.scalingRatio;
+ for (n = 0; n < order; n += PPN) {
+ factor = 0;
+
+ // Common to both methods
+ xDist = NodeMatrix[n + NODE_X];
+ yDist = NodeMatrix[n + NODE_Y];
+ distance = Math.sqrt(Math.pow(xDist, 2) + Math.pow(yDist, 2));
+
+ if (options.strongGravityMode) {
+ //-- Strong gravity
+ if (distance > 0) factor = coefficient * NodeMatrix[n + NODE_MASS] * g;
+ } else {
+ //-- Linear Anti-collision Repulsion n
+ if (distance > 0)
+ factor = (coefficient * NodeMatrix[n + NODE_MASS] * g) / distance;
+ }
+
+ // Updating node's dx and dy
+ NodeMatrix[n + NODE_DX] -= xDist * factor;
+ NodeMatrix[n + NODE_DY] -= yDist * factor;
+ }
+
+ // 4) Attraction
+ //---------------
+ coefficient =
+ 1 * (options.outboundAttractionDistribution ? outboundAttCompensation : 1);
+
+ // TODO: simplify distance
+ // TODO: coefficient is always used as -c --> optimize?
+ for (e = 0; e < size; e += PPE) {
+ n1 = EdgeMatrix[e + EDGE_SOURCE];
+ n2 = EdgeMatrix[e + EDGE_TARGET];
+ w = EdgeMatrix[e + EDGE_WEIGHT];
+
+ // Edge weight influence
+ ewc = Math.pow(w, options.edgeWeightInfluence);
+
+ // Common measures
+ xDist = NodeMatrix[n1 + NODE_X] - NodeMatrix[n2 + NODE_X];
+ yDist = NodeMatrix[n1 + NODE_Y] - NodeMatrix[n2 + NODE_Y];
+
+ // Applying attraction to nodes
+ if (adjustSizes === true) {
+ distance =
+ Math.sqrt(xDist * xDist + yDist * yDist) -
+ NodeMatrix[n1 + NODE_SIZE] -
+ NodeMatrix[n2 + NODE_SIZE];
+
+ if (options.linLogMode) {
+ if (options.outboundAttractionDistribution) {
+ //-- LinLog Degree Distributed Anti-collision Attraction
+ if (distance > 0) {
+ factor =
+ (-coefficient * ewc * Math.log(1 + distance)) /
+ distance /
+ NodeMatrix[n1 + NODE_MASS];
+ }
+ } else {
+ //-- LinLog Anti-collision Attraction
+ if (distance > 0) {
+ factor = (-coefficient * ewc * Math.log(1 + distance)) / distance;
+ }
+ }
+ } else {
+ if (options.outboundAttractionDistribution) {
+ //-- Linear Degree Distributed Anti-collision Attraction
+ if (distance > 0) {
+ factor = (-coefficient * ewc) / NodeMatrix[n1 + NODE_MASS];
+ }
+ } else {
+ //-- Linear Anti-collision Attraction
+ if (distance > 0) {
+ factor = -coefficient * ewc;
+ }
+ }
+ }
+ } else {
+ distance = Math.sqrt(Math.pow(xDist, 2) + Math.pow(yDist, 2));
+
+ if (options.linLogMode) {
+ if (options.outboundAttractionDistribution) {
+ //-- LinLog Degree Distributed Attraction
+ if (distance > 0) {
+ factor =
+ (-coefficient * ewc * Math.log(1 + distance)) /
+ distance /
+ NodeMatrix[n1 + NODE_MASS];
+ }
+ } else {
+ //-- LinLog Attraction
+ if (distance > 0)
+ factor = (-coefficient * ewc * Math.log(1 + distance)) / distance;
+ }
+ } else {
+ if (options.outboundAttractionDistribution) {
+ //-- Linear Attraction Mass Distributed
+ // NOTE: Distance is set to 1 to override next condition
+ distance = 1;
+ factor = (-coefficient * ewc) / NodeMatrix[n1 + NODE_MASS];
+ } else {
+ //-- Linear Attraction
+ // NOTE: Distance is set to 1 to override next condition
+ distance = 1;
+ factor = -coefficient * ewc;
+ }
+ }
+ }
+
+ // Updating nodes' dx and dy
+ // TODO: if condition or factor = 1?
+ if (distance > 0) {
+ // Updating nodes' dx and dy
+ NodeMatrix[n1 + NODE_DX] += xDist * factor;
+ NodeMatrix[n1 + NODE_DY] += yDist * factor;
+
+ NodeMatrix[n2 + NODE_DX] -= xDist * factor;
+ NodeMatrix[n2 + NODE_DY] -= yDist * factor;
+ }
+ }
+
+ // 5) Apply Forces
+ //-----------------
+ var force, swinging, traction, nodespeed, newX, newY;
+
+ // MATH: sqrt and square distances
+ if (adjustSizes === true) {
+ for (n = 0; n < order; n += PPN) {
+ if (NodeMatrix[n + NODE_FIXED] !== 1) {
+ force = Math.sqrt(
+ Math.pow(NodeMatrix[n + NODE_DX], 2) +
+ Math.pow(NodeMatrix[n + NODE_DY], 2)
+ );
+
+ if (force > MAX_FORCE) {
+ NodeMatrix[n + NODE_DX] =
+ (NodeMatrix[n + NODE_DX] * MAX_FORCE) / force;
+ NodeMatrix[n + NODE_DY] =
+ (NodeMatrix[n + NODE_DY] * MAX_FORCE) / force;
+ }
+
+ swinging =
+ NodeMatrix[n + NODE_MASS] *
+ Math.sqrt(
+ (NodeMatrix[n + NODE_OLD_DX] - NodeMatrix[n + NODE_DX]) *
+ (NodeMatrix[n + NODE_OLD_DX] - NodeMatrix[n + NODE_DX]) +
+ (NodeMatrix[n + NODE_OLD_DY] - NodeMatrix[n + NODE_DY]) *
+ (NodeMatrix[n + NODE_OLD_DY] - NodeMatrix[n + NODE_DY])
+ );
+
+ traction =
+ Math.sqrt(
+ (NodeMatrix[n + NODE_OLD_DX] + NodeMatrix[n + NODE_DX]) *
+ (NodeMatrix[n + NODE_OLD_DX] + NodeMatrix[n + NODE_DX]) +
+ (NodeMatrix[n + NODE_OLD_DY] + NodeMatrix[n + NODE_DY]) *
+ (NodeMatrix[n + NODE_OLD_DY] + NodeMatrix[n + NODE_DY])
+ ) / 2;
+
+ nodespeed = (0.1 * Math.log(1 + traction)) / (1 + Math.sqrt(swinging));
+
+ // Updating node's positon
+ newX =
+ NodeMatrix[n + NODE_X] +
+ NodeMatrix[n + NODE_DX] * (nodespeed / options.slowDown);
+ NodeMatrix[n + NODE_X] = newX;
+
+ newY =
+ NodeMatrix[n + NODE_Y] +
+ NodeMatrix[n + NODE_DY] * (nodespeed / options.slowDown);
+ NodeMatrix[n + NODE_Y] = newY;
+ }
+ }
+ } else {
+ for (n = 0; n < order; n += PPN) {
+ if (NodeMatrix[n + NODE_FIXED] !== 1) {
+ swinging =
+ NodeMatrix[n + NODE_MASS] *
+ Math.sqrt(
+ (NodeMatrix[n + NODE_OLD_DX] - NodeMatrix[n + NODE_DX]) *
+ (NodeMatrix[n + NODE_OLD_DX] - NodeMatrix[n + NODE_DX]) +
+ (NodeMatrix[n + NODE_OLD_DY] - NodeMatrix[n + NODE_DY]) *
+ (NodeMatrix[n + NODE_OLD_DY] - NodeMatrix[n + NODE_DY])
+ );
+
+ traction =
+ Math.sqrt(
+ (NodeMatrix[n + NODE_OLD_DX] + NodeMatrix[n + NODE_DX]) *
+ (NodeMatrix[n + NODE_OLD_DX] + NodeMatrix[n + NODE_DX]) +
+ (NodeMatrix[n + NODE_OLD_DY] + NodeMatrix[n + NODE_DY]) *
+ (NodeMatrix[n + NODE_OLD_DY] + NodeMatrix[n + NODE_DY])
+ ) / 2;
+
+ nodespeed =
+ (NodeMatrix[n + NODE_CONVERGENCE] * Math.log(1 + traction)) /
+ (1 + Math.sqrt(swinging));
+
+ // Updating node convergence
+ NodeMatrix[n + NODE_CONVERGENCE] = Math.min(
+ 1,
+ Math.sqrt(
+ (nodespeed *
+ (Math.pow(NodeMatrix[n + NODE_DX], 2) +
+ Math.pow(NodeMatrix[n + NODE_DY], 2))) /
+ (1 + Math.sqrt(swinging))
+ )
+ );
+
+ // Updating node's positon
+ newX =
+ NodeMatrix[n + NODE_X] +
+ NodeMatrix[n + NODE_DX] * (nodespeed / options.slowDown);
+ NodeMatrix[n + NODE_X] = newX;
+
+ newY =
+ NodeMatrix[n + NODE_Y] +
+ NodeMatrix[n + NODE_DY] * (nodespeed / options.slowDown);
+ NodeMatrix[n + NODE_Y] = newY;
+ }
+ }
+ }
+
+ // We return the information about the layout (no need to return the matrices)
+ return {};
+};
+
+ })();
+
+ var iterate = moduleShim.exports;
+
+ self.addEventListener('message', function (event) {
+ var data = event.data;
+
+ NODES = new Float32Array(data.nodes);
+
+ if (data.edges) EDGES = new Float32Array(data.edges);
+
+ // Running the iteration
+ iterate(data.settings, NODES, EDGES);
+
+ // Sending result to supervisor
+ self.postMessage(
+ {
+ nodes: NODES.buffer
+ },
+ [NODES.buffer]
+ );
+ });
+};
+
diff --git a/node_modules/graphology-layout-forceatlas2/worker.d.ts b/node_modules/graphology-layout-forceatlas2/worker.d.ts
new file mode 100644
index 00000000..1cd4b0e4
--- /dev/null
+++ b/node_modules/graphology-layout-forceatlas2/worker.d.ts
@@ -0,0 +1,17 @@
+import Graph, {Attributes} from 'graphology-types';
+import {ForceAtlas2LayoutParameters} from './index';
+
+export default class FA2LayoutSupervisor<
+ NodeAttributes extends Attributes = Attributes,
+ EdgeAttributes extends Attributes = Attributes
+> {
+ constructor(
+ graph: Graph,
+ params?: ForceAtlas2LayoutParameters<NodeAttributes, EdgeAttributes>
+ );
+
+ isRunning(): boolean;
+ start(): void;
+ stop(): void;
+ kill(): void;
+}
diff --git a/node_modules/graphology-layout-forceatlas2/worker.js b/node_modules/graphology-layout-forceatlas2/worker.js
new file mode 100644
index 00000000..4231e4e3
--- /dev/null
+++ b/node_modules/graphology-layout-forceatlas2/worker.js
@@ -0,0 +1,206 @@
+/**
+ * Graphology ForceAtlas2 Layout Supervisor
+ * =========================================
+ *
+ * Supervisor class able to spawn a web worker to run the FA2 layout in a
+ * separate thread not to block UI with heavy synchronous computations.
+ */
+var workerFunction = require('./webworker.js');
+var isGraph = require('graphology-utils/is-graph');
+var createEdgeWeightGetter =
+ require('graphology-utils/getters').createEdgeWeightGetter;
+var helpers = require('./helpers.js');
+
+var DEFAULT_SETTINGS = require('./defaults.js');
+
+/**
+ * Class representing a FA2 layout run by a webworker.
+ *
+ * @constructor
+ * @param {Graph} graph - Target graph.
+ * @param {object|number} params - Parameters:
+ * @param {object} [settings] - Settings.
+ */
+function FA2LayoutSupervisor(graph, params) {
+ params = params || {};
+
+ // Validation
+ if (!isGraph(graph))
+ throw new Error(
+ 'graphology-layout-forceatlas2/worker: the given graph is not a valid graphology instance.'
+ );
+
+ var getEdgeWeight = createEdgeWeightGetter(
+ 'getEdgeWeight' in params ? params.getEdgeWeight : 'weight'
+ ).fromEntry;
+
+ // Validating settings
+ var settings = helpers.assign({}, DEFAULT_SETTINGS, params.settings);
+ var validationError = helpers.validateSettings(settings);
+
+ if (validationError)
+ throw new Error(
+ 'graphology-layout-forceatlas2/worker: ' + validationError.message
+ );
+
+ // Properties
+ this.worker = null;
+ this.graph = graph;
+ this.settings = settings;
+ this.getEdgeWeight = getEdgeWeight;
+ this.matrices = null;
+ this.running = false;
+ this.killed = false;
+ this.outputReducer =
+ typeof params.outputReducer === 'function' ? params.outputReducer : null;
+
+ // Binding listeners
+ this.handleMessage = this.handleMessage.bind(this);
+
+ var respawnFrame = undefined;
+ var self = this;
+
+ this.handleGraphUpdate = function () {
+ if (self.worker) self.worker.terminate();
+
+ if (respawnFrame) clearTimeout(respawnFrame);
+
+ respawnFrame = setTimeout(function () {
+ respawnFrame = undefined;
+ self.spawnWorker();
+ }, 0);
+ };
+
+ graph.on('nodeAdded', this.handleGraphUpdate);
+ graph.on('edgeAdded', this.handleGraphUpdate);
+ graph.on('nodeDropped', this.handleGraphUpdate);
+ graph.on('edgeDropped', this.handleGraphUpdate);
+
+ // Spawning worker
+ this.spawnWorker();
+}
+
+FA2LayoutSupervisor.prototype.isRunning = function () {
+ return this.running;
+};
+
+/**
+ * Internal method used to spawn the web worker.
+ */
+FA2LayoutSupervisor.prototype.spawnWorker = function () {
+ if (this.worker) this.worker.terminate();
+
+ this.worker = helpers.createWorker(workerFunction);
+ this.worker.addEventListener('message', this.handleMessage);
+
+ if (this.running) {
+ this.running = false;
+ this.start();
+ }
+};
+
+/**
+ * Internal method used to handle the worker's messages.
+ *
+ * @param {object} event - Event to handle.
+ */
+FA2LayoutSupervisor.prototype.handleMessage = function (event) {
+ if (!this.running) return;
+
+ var matrix = new Float32Array(event.data.nodes);
+
+ helpers.assignLayoutChanges(this.graph, matrix, this.outputReducer);
+ if (this.outputReducer) helpers.readGraphPositions(this.graph, matrix);
+ this.matrices.nodes = matrix;
+
+ // Looping
+ this.askForIterations();
+};
+
+/**
+ * Internal method used to ask for iterations from the worker.
+ *
+ * @param {boolean} withEdges - Should we send edges along?
+ * @return {FA2LayoutSupervisor}
+ */
+FA2LayoutSupervisor.prototype.askForIterations = function (withEdges) {
+ var matrices = this.matrices;
+
+ var payload = {
+ settings: this.settings,
+ nodes: matrices.nodes.buffer
+ };
+
+ var buffers = [matrices.nodes.buffer];
+
+ if (withEdges) {
+ payload.edges = matrices.edges.buffer;
+ buffers.push(matrices.edges.buffer);
+ }
+
+ this.worker.postMessage(payload, buffers);
+
+ return this;
+};
+
+/**
+ * Method used to start the layout.
+ *
+ * @return {FA2LayoutSupervisor}
+ */
+FA2LayoutSupervisor.prototype.start = function () {
+ if (this.killed)
+ throw new Error(
+ 'graphology-layout-forceatlas2/worker.start: layout was killed.'
+ );
+
+ if (this.running) return this;
+
+ // Building matrices
+ this.matrices = helpers.graphToByteArrays(this.graph, this.getEdgeWeight);
+
+ this.running = true;
+ this.askForIterations(true);
+
+ return this;
+};
+
+/**
+ * Method used to stop the layout.
+ *
+ * @return {FA2LayoutSupervisor}
+ */
+FA2LayoutSupervisor.prototype.stop = function () {
+ this.running = false;
+
+ return this;
+};
+
+/**
+ * Method used to kill the layout.
+ *
+ * @return {FA2LayoutSupervisor}
+ */
+FA2LayoutSupervisor.prototype.kill = function () {
+ if (this.killed) return this;
+
+ this.running = false;
+ this.killed = true;
+
+ // Clearing memory
+ this.matrices = null;
+
+ // Terminating worker
+ this.worker.terminate();
+
+ // Unbinding listeners
+ this.graph.removeListener('nodeAdded', this.handleGraphUpdate);
+ this.graph.removeListener('edgeAdded', this.handleGraphUpdate);
+ this.graph.removeListener('nodeDropped', this.handleGraphUpdate);
+ this.graph.removeListener('edgeDropped', this.handleGraphUpdate);
+};
+
+/**
+ * Exporting.
+ */
+module.exports = FA2LayoutSupervisor;
diff --git a/node_modules/graphology-utils/LICENSE.txt b/node_modules/graphology-utils/LICENSE.txt
new file mode 100644
index 00000000..df12ee58
--- /dev/null
+++ b/node_modules/graphology-utils/LICENSE.txt
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2017-2021 Guillaume Plique (Yomguithereal)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/graphology-utils/README.md b/node_modules/graphology-utils/README.md
new file mode 100644
index 00000000..59c13fd0
--- /dev/null
+++ b/node_modules/graphology-utils/README.md
@@ -0,0 +1,274 @@
+# Graphology Utils
+
+Miscellaneous utility functions to be used with [`graphology`](https://graphology.github.io).
+
+## Installation
+
+```
+npm install graphology-utils
+```
+
+## Usage
+
+_Assertions_
+
+- [#.isGraph](#isgraph)
+- [#.isGraphConstructor](#isgraphconstructor)
+
+_Introspection_
+
+- [#.inferMulti](#infermulti)
+- [#.inferType](#infertype)
+
+_Typical edge patterns_
+
+- [#.mergeClique](#mergeclique)
+- [#.mergeCycle](#mergecycle)
+- [#.mergePath](#mergepath)
+- [#.mergeStar](#mergestar)
+
+_Miscellaneous helpers_
+
+- [#.renameGraphKeys](#renamegraphkeys)
+- [#.updateGraphKeys](#updategraphkeys)
+
+### #.isGraph
+
+Function returning whether the given value is a `graphology` implementation's instance.
+
+```js
+import {isGraph} from 'graphology-utils';
+// Alternatively, if you want to only load the relevant code:
+import isGraph from 'graphology-utils/is-graph';
+
+const graph = new Graph();
+
+isGraph(graph);
+>>> true
+
+isGraph(45);
+>>> false
+
+isGraph({hello: 'world'});
+>>> false
+```
+
+_Arguments_
+
+- **value** _any_: value to test.
+
+### #.isGraphConstructor
+
+Function returning whether the given value is a `graphology` constructor.
+
+```js
+import {isGraphConstructor} from 'graphology-utils';
+// Alternatively, if you want to only load the relevant code:
+import isGraphConstructor from 'graphology-utils/is-graph-constructor';
+
+isGraphConstructor(Graph);
+>>> true
+
+isGraphConstructor(45);
+>>> false
+
+isGraphConstructor(new Graph());
+>>> false
+```
+
+_Arguments_
+
+- **value** _any_: value to test.
+
+### #.inferMulti
+
+Function returning whether the given graph is truly multi, i.e. if we can find at least one occurrence of multiple edges of the same type and direction between two nodes.
+
+```js
+import {inferMulti} from 'graphology-utils';
+// Alternatively, if you want to only load the relevant code:
+import inferMulti from 'graphology-utils/infer-multi';
+
+const graph = new MultiGraph();
+graph.addEdge(1, 2);
+
+inferMulti(graph);
+>>> false
+
+graph.addEdge(1, 2);
+
+inferMulti(graph);
+>>> true
+```
+
+### #.inferType
+
+Function returning the inferred type of the given graph. This function is useful to check whether a given mixed graph is in fact a mere `directed` or `undirected` graph based on its actual edges.
+
+```js
+import {inferType} from 'graphology-utils';
+// Alternatively, if you want to only load the relevant code:
+import inferType from 'graphology-utils/infer-type';
+
+const graph = new Graph();
+graph.addUndirectedEdge(1, 2);
+
+inferType(graph);
+>>> 'directed'
+```
+
+### #.mergeClique
+
+Function adding a clique to the given graph.
+
+```js
+import {mergeClique} from 'graphology-utils';
+// Alternatively, if you want to only load the relevant code:
+import mergeClique from 'graphology-utils/merge-clique';
+
+const graph = new Graph();
+
+mergeClique(graph, [1, 2, 3]);
+graph.edges().map(e => graph.extremities(e));
+>>> [[1, 2], [1, 3], [2, 3]]
+```
+
+### #.mergeCycle
+
+Function adding a cycle to the given graph.
+
+```js
+import {mergeCycle} from 'graphology-utils';
+// Alternatively, if you want to only load the relevant code:
+import mergeCycle from 'graphology-utils/merge-cycle';
+
+const graph = new Graph();
+
+mergeCycle(graph, [1, 2, 3, 4, 5]);
+graph.edges().map(e => graph.extremities(e));
+>>> [[1, 2], [2, 3], [3, 4], [4, 5], [5, 1]]
+```
+
+_Arguments_
+
+- **graph** _Graph_: target graph.
+- **cycle** _array_: array of nodes representing the cycle to add.
+
+### #.mergePath
+
+Function adding a path to the given graph.
+
+```js
+import {mergePath} from 'graphology-utils';
+// Alternatively, if you want to only load the relevant code:
+import mergePath from 'graphology-utils/merge-path';
+
+const graph = new Graph();
+
+mergePath(graph, [1, 2, 3, 4, 5]);
+graph.edges().map(e => graph.extremities(e));
+>>> [[1, 2], [2, 3], [3, 4], [4, 5]]
+```
+
+_Arguments_
+
+- **graph** _Graph_: target graph.
+- **path** _array_: array of nodes representing the path to add.
+
+### #.mergeStar
+
+Function adding a star to the given graph.
+
+```js
+import {mergeStar} from 'graphology-utils';
+// Alternatively, if you want to only load the relevant code:
+import mergeStar from 'graphology-utils/merge-star';
+
+const graph = new Graph();
+
+mergeStar(graph, [1, 2, 3, 4, 5]);
+graph.edges().map(e => graph.extremities(e));
+>>> [[1, 2], [1, 3], [1, 4], [1, 5]]
+```
+
+_Arguments_
+
+- **graph** _Graph_: target graph.
+- **star** _array_: array of nodes representing the star to add.
+
+### #.renameGraphKeys
+
+Function renaming the nodes & edges key of a graph using mappings and returning a new graph with renamed keys.
+
+```js
+import {renameGraphKeys} from 'graphology-utils';
+// Alternatively, if you want to only load the relevant code:
+import renameGraphKeys from 'graphology-utils/rename-graph-keys';
+
+const graph = new Graph();
+graph.addNode('Martha');
+graph.addNode('Catherine');
+graph.addNode('John');
+graph.addEdgeWithKey('M->C', 'Martha', 'Catherine');
+graph.addEdgeWithKey('C->J', 'Catherine', 'John');
+
+const renamedGraph = renameGraphKeys(
+ graph,
+ {Martha: 1, Catherine: 2, John: 3},
+ {'M->C': 'rel1', 'C->J': 'rel2'}
+);
+
+renamedGraph.nodes();
+>>> [1, 2, 3];
+
+renamedGraph.edges();
+>>> ['rel1', 'rel2'];
+```
+
+_Arguments_
+
+- **graph** _Graph_: target graph.
+- **nodeKeyMapping** _object_: A key/value map for the node key mapping.
+- **edgeKeyMapping** _?object_: A key/value map for the edge key mapping.
+
+### #.updateGraphKeys
+
+Function updating the nodes & edges key of a graph using functions and returning a new graph with updated keys.
+
+```js
+import {updateGraphKeys} from 'graphology-utils';
+// Alternatively, if you want to only load the relevant code:
+import updateGraphKeys from 'graphology-utils/update-graph-keys';
+
+const graph = new Graph();
+graph.addNode('Martha');
+graph.addNode('Catherine');
+graph.addNode('John');
+graph.addEdgeWithKey('M->C', 'Martha', 'Catherine');
+graph.addEdgeWithKey('C->J', 'Catherine', 'John');
+
+const updatedGraph = updateGraphKeys(
+ graph,
+ (key)=> {
+ if (key === 'Martha') return 1;
+ if (key === 'Catherine') return 2;
+ return 3;
+ },
+ (key) => {
+ if (key === 'M->C') return 'rel1';
+ return 'rel2';
+ }
+);
+
+updatedGraph.nodes();
+>>> [1, 2, 3];
+
+updatedGraph.edges();
+>>> ['rel1', 'rel2'];
+```
+
+_Arguments_
+
+- **graph** _Graph_: target graph.
+- **nodeKeyUdater** _function_: A function to compute a new node key from the same arguments that would be given to [`#.forEachNode`](https://graphology.github.io/iteration.html#foreachnode).
+- **edgeKeyUpdater** _function_: A function to compute a new edge key from the same arguments that would be given to [`#.forEachEdge`](https://graphology.github.io/iteration.html#foreachedge).
diff --git a/node_modules/graphology-utils/add-edge.d.ts b/node_modules/graphology-utils/add-edge.d.ts
new file mode 100644
index 00000000..4dee0114
--- /dev/null
+++ b/node_modules/graphology-utils/add-edge.d.ts
@@ -0,0 +1,37 @@
+import Graph, {Attributes, EdgeMergeResult} from 'graphology-types';
+
+export function addEdge<EdgeAttributes extends Attributes = Attributes>(
+ graph: Graph,
+ undirected: boolean,
+ key: unknown,
+ source: unknown,
+ target: unknown,
+ attributes?: EdgeAttributes
+): string;
+
+export function copyEdge<EdgeAttributes extends Attributes = Attributes>(
+ graph: Graph,
+ undirected: boolean,
+ key: unknown,
+ source: unknown,
+ target: unknown,
+ attributes?: EdgeAttributes
+): string;
+
+export function mergeEdge<EdgeAttributes extends Attributes = Attributes>(
+ graph: Graph,
+ undirected: boolean,
+ key: unknown,
+ source: unknown,
+ target: unknown,
+ attributes?: EdgeAttributes
+): EdgeMergeResult;
+
+export function updateEdge<EdgeAttributes extends Attributes = Attributes>(
+ graph: Graph,
+ undirected: boolean,
+ key: unknown,
+ source: unknown,
+ target: unknown,
+ updater?: (attributes: EdgeAttributes | {}) => EdgeAttributes
+): EdgeMergeResult;
diff --git a/node_modules/graphology-utils/add-edge.js b/node_modules/graphology-utils/add-edge.js
new file mode 100644
index 00000000..20d13ad6
--- /dev/null
+++ b/node_modules/graphology-utils/add-edge.js
@@ -0,0 +1,85 @@
+/**
+ * Graphology Edge Adders
+ * =======================
+ *
+ * Generic edge addition functions that can be used to avoid nasty repetitive
+ * conditions.
+ */
+exports.addEdge = function addEdge(
+ graph,
+ undirected,
+ key,
+ source,
+ target,
+ attributes
+) {
+ if (undirected) {
+ if (key === null || key === undefined)
+ return graph.addUndirectedEdge(source, target, attributes);
+ else return graph.addUndirectedEdgeWithKey(key, source, target, attributes);
+ } else {
+ if (key === null || key === undefined)
+ return graph.addDirectedEdge(source, target, attributes);
+ else return graph.addDirectedEdgeWithKey(key, source, target, attributes);
+ }
+};
+
+exports.copyEdge = function copyEdge(
+ graph,
+ undirected,
+ key,
+ source,
+ target,
+ attributes
+) {
+ attributes = Object.assign({}, attributes);
+
+ if (undirected) {
+ if (key === null || key === undefined)
+ return graph.addUndirectedEdge(source, target, attributes);
+ else return graph.addUndirectedEdgeWithKey(key, source, target, attributes);
+ } else {
+ if (key === null || key === undefined)
+ return graph.addDirectedEdge(source, target, attributes);
+ else return graph.addDirectedEdgeWithKey(key, source, target, attributes);
+ }
+};
+
+exports.mergeEdge = function mergeEdge(
+ graph,
+ undirected,
+ key,
+ source,
+ target,
+ attributes
+) {
+ if (undirected) {
+ if (key === null || key === undefined)
+ return graph.mergeUndirectedEdge(source, target, attributes);
+ else
+ return graph.mergeUndirectedEdgeWithKey(key, source, target, attributes);
+ } else {
+ if (key === null || key === undefined)
+ return graph.mergeDirectedEdge(source, target, attributes);
+ else return graph.mergeDirectedEdgeWithKey(key, source, target, attributes);
+ }
+};
+
+exports.updateEdge = function updateEdge(
+ graph,
+ undirected,
+ key,
+ source,
+ target,
+ updater
+) {
+ if (undirected) {
+ if (key === null || key === undefined)
+ return graph.updateUndirectedEdge(source, target, updater);
+ else return graph.updateUndirectedEdgeWithKey(key, source, target, updater);
+ } else {
+ if (key === null || key === undefined)
+ return graph.updateDirectedEdge(source, target, updater);
+ else return graph.updateDirectedEdgeWithKey(key, source, target, updater);
+ }
+};
diff --git a/node_modules/graphology-utils/add-node.d.ts b/node_modules/graphology-utils/add-node.d.ts
new file mode 100644
index 00000000..4bc89135
--- /dev/null
+++ b/node_modules/graphology-utils/add-node.d.ts
@@ -0,0 +1,7 @@
+import Graph, {Attributes} from 'graphology-types';
+
+export function copyNode<NodeAttributes extends Attributes = Attributes>(
+ graph: Graph,
+ key: unknown,
+ attributes?: NodeAttributes
+): string;
diff --git a/node_modules/graphology-utils/add-node.js b/node_modules/graphology-utils/add-node.js
new file mode 100644
index 00000000..0eb14328
--- /dev/null
+++ b/node_modules/graphology-utils/add-node.js
@@ -0,0 +1,11 @@
+/**
+ * Graphology Node Adders
+ * =======================
+ *
+ * Generic node addition functions that can be used to avoid nasty repetitive
+ * conditions.
+ */
+exports.copyNode = function (graph, key, attributes) {
+ attributes = Object.assign({}, attributes);
+ return graph.addNode(key, attributes);
+};
diff --git a/node_modules/graphology-utils/defaults.d.ts b/node_modules/graphology-utils/defaults.d.ts
new file mode 100644
index 00000000..71d0e5e1
--- /dev/null
+++ b/node_modules/graphology-utils/defaults.d.ts
@@ -0,0 +1,4 @@
+export default function resolveDefaults<T extends {[key: string]: any}>(
+ target: T | undefined | null,
+ defaults: T
+): T;
diff --git a/node_modules/graphology-utils/defaults.js b/node_modules/graphology-utils/defaults.js
new file mode 100644
index 00000000..263f1e1c
--- /dev/null
+++ b/node_modules/graphology-utils/defaults.js
@@ -0,0 +1,47 @@
+/**
+ * Graphology Defaults
+ * ====================
+ *
+ * Helper function used throughout the standard lib to resolve defaults.
+ */
+function isLeaf(o) {
+ return (
+ !o ||
+ typeof o !== 'object' ||
+ typeof o === 'function' ||
+ Array.isArray(o) ||
+ o instanceof Set ||
+ o instanceof Map ||
+ o instanceof RegExp ||
+ o instanceof Date
+ );
+}
+
+function resolveDefaults(target, defaults) {
+ target = target || {};
+
+ var output = {};
+
+ for (var k in defaults) {
+ var existing = target[k];
+ var def = defaults[k];
+
+ // Recursion
+ if (!isLeaf(def)) {
+ output[k] = resolveDefaults(existing, def);
+
+ continue;
+ }
+
+ // Leaf
+ if (existing === undefined) {
+ output[k] = def;
+ } else {
+ output[k] = existing;
+ }
+ }
+
+ return output;
+}
+
+module.exports = resolveDefaults;
diff --git a/node_modules/graphology-utils/getters.d.ts b/node_modules/graphology-utils/getters.d.ts
new file mode 100644
index 00000000..93ec8518
--- /dev/null
+++ b/node_modules/graphology-utils/getters.d.ts
@@ -0,0 +1,79 @@
+import Graph, {Attributes, NodeMapper, EdgeMapper} from 'graphology-types';
+
+export type PartialEdgeMapper<
+ T,
+ EdgeAttributes extends Attributes = Attributes
+> = (
+ edge: string,
+ attributes: EdgeAttributes,
+ source: string,
+ target: string
+) => T;
+
+export type MinimalEdgeMapper<
+ T,
+ EdgeAttributes extends Attributes = Attributes
+> = (edge: string, attributes: EdgeAttributes) => T;
+
+interface NodeValueGetter<T, NodeAttributes extends Attributes = Attributes> {
+ fromGraph(graph: Graph<NodeAttributes>, node: unknown): T;
+ fromAttributes(attributes: NodeAttributes): T;
+ fromEntry: NodeMapper<T, NodeAttributes>;
+}
+
+interface EdgeValueGetter<
+ T,
+ NodeAttributes extends Attributes = Attributes,
+ EdgeAttributes extends Attributes = Attributes
+> {
+ fromGraph(graph: Graph<NodeAttributes, EdgeAttributes>, edge: unknown): T;
+ // fromPath(
+ // graph: Graph<NodeAttributes, EdgeAttributes>,
+ // source: unknown,
+ // target: unknown
+ // ): T;
+ // fromDirectedPath(
+ // graph: Graph<NodeAttributes, EdgeAttributes>,
+ // source: unknown,
+ // target: unknown
+ // ): T;
+ // fromUndirectedPath(
+ // graph: Graph<NodeAttributes, EdgeAttributes>,
+ // source: unknown,
+ // target: unknown
+ // ): T;
+ fromAttributes(attributes: EdgeAttributes): T;
+ fromEntry: EdgeMapper<T, NodeAttributes, EdgeAttributes>;
+ fromPartialEntry: PartialEdgeMapper<T, EdgeAttributes>;
+ fromMinimalEntry: MinimalEdgeMapper<T, EdgeAttributes>;
+}
+
+export function createNodeValueGetter<
+ T,
+ NodeAttributes extends Attributes = Attributes
+>(
+ target?: string | NodeMapper<T, NodeAttributes>,
+ defaultValue?: T | ((value: unknown) => T)
+): NodeValueGetter<T, NodeAttributes>;
+
+export function createEdgeValueGetter<
+ T,
+ NodeAttributes extends Attributes = Attributes,
+ EdgeAttributes extends Attributes = Attributes
+>(
+ target?:
+ | string
+ | EdgeMapper<T, NodeAttributes, EdgeAttributes>
+ | PartialEdgeMapper<T, EdgeAttributes>,
+ defaultValue?: T | ((value: unknown) => T)
+): EdgeValueGetter<T, NodeAttributes, EdgeAttributes>;
+
+export function createEdgeWeightGetter<
+ NodeAttributes extends Attributes = Attributes,
+ EdgeAttributes extends Attributes = Attributes
+>(
+ target?:
+ | string
+ | EdgeMapper<number, NodeAttributes, EdgeAttributes>
+ | PartialEdgeMapper<number, EdgeAttributes>
+): EdgeValueGetter<number, NodeAttributes, EdgeAttributes>;
diff --git a/node_modules/graphology-utils/getters.js b/node_modules/graphology-utils/getters.js
new file mode 100644
index 00000000..cd933151
--- /dev/null
+++ b/node_modules/graphology-utils/getters.js
@@ -0,0 +1,137 @@
+/**
+ * Graphology Weight Getter
+ * =========================
+ *
+ * Function creating weight getters.
+ */
+function coerceWeight(value) {
+ // Ensuring target value is a correct number
+ if (typeof value !== 'number' || isNaN(value)) return 1;
+
+ return value;
+}
+
+function createNodeValueGetter(nameOrFunction, defaultValue) {
+ var getter = {};
+
+ var coerceToDefault = function (v) {
+ if (typeof v === 'undefined') return defaultValue;
+
+ return v;
+ };
+
+ if (typeof defaultValue === 'function') coerceToDefault = defaultValue;
+
+ var get = function (attributes) {
+ return coerceToDefault(attributes[nameOrFunction]);
+ };
+
+ var returnDefault = function () {
+ return coerceToDefault(undefined);
+ };
+
+ if (typeof nameOrFunction === 'string') {
+ getter.fromAttributes = get;
+ getter.fromGraph = function (graph, node) {
+ return get(graph.getNodeAttributes(node));
+ };
+ getter.fromEntry = function (node, attributes) {
+ return get(attributes);
+ };
+ } else if (typeof nameOrFunction === 'function') {
+ getter.fromAttributes = function () {
+ throw new Error(
+ 'graphology-utils/getters/createNodeValueGetter: irrelevant usage.'
+ );
+ };
+ getter.fromGraph = function (graph, node) {
+ return coerceToDefault(
+ nameOrFunction(node, graph.getNodeAttributes(node))
+ );
+ };
+ getter.fromEntry = function (node, attributes) {
+ return coerceToDefault(nameOrFunction(node, attributes));
+ };
+ } else {
+ getter.fromAttributes = returnDefault;
+ getter.fromGraph = returnDefault;
+ getter.fromEntry = returnDefault;
+ }
+
+ return getter;
+}
+
+function createEdgeValueGetter(nameOrFunction, defaultValue) {
+ var getter = {};
+
+ var coerceToDefault = function (v) {
+ if (typeof v === 'undefined') return defaultValue;
+
+ return v;
+ };
+
+ if (typeof defaultValue === 'function') coerceToDefault = defaultValue;
+
+ var get = function (attributes) {
+ return coerceToDefault(attributes[nameOrFunction]);
+ };
+
+ var returnDefault = function () {
+ return coerceToDefault(undefined);
+ };
+
+ if (typeof nameOrFunction === 'string') {
+ getter.fromAttributes = get;
+ getter.fromGraph = function (graph, edge) {
+ return get(graph.getEdgeAttributes(edge));
+ };
+ getter.fromEntry = function (edge, attributes) {
+ return get(attributes);
+ };
+ getter.fromPartialEntry = getter.fromEntry;
+ getter.fromMinimalEntry = getter.fromEntry;
+ } else if (typeof nameOrFunction === 'function') {
+ getter.fromAttributes = function () {
+ throw new Error(
+ 'graphology-utils/getters/createEdgeValueGetter: irrelevant usage.'
+ );
+ };
+ getter.fromGraph = function (graph, edge) {
+ // TODO: we can do better, check #310
+ var extremities = graph.extremities(edge);
+ return coerceToDefault(
+ nameOrFunction(
+ edge,
+ graph.getEdgeAttributes(edge),
+ extremities[0],
+ extremities[1],
+ graph.getNodeAttributes(extremities[0]),
+ graph.getNodeAttributes(extremities[1]),
+ graph.isUndirected(edge)
+ )
+ );
+ };
+ getter.fromEntry = function (e, a, s, t, sa, ta, u) {
+ return coerceToDefault(nameOrFunction(e, a, s, t, sa, ta, u));
+ };
+ getter.fromPartialEntry = function (e, a, s, t) {
+ return coerceToDefault(nameOrFunction(e, a, s, t));
+ };
+ getter.fromMinimalEntry = function (e, a) {
+ return coerceToDefault(nameOrFunction(e, a));
+ };
+ } else {
+ getter.fromAttributes = returnDefault;
+ getter.fromGraph = returnDefault;
+ getter.fromEntry = returnDefault;
+ getter.fromMinimalEntry = returnDefault;
+ }
+
+ return getter;
+}
+
+exports.createNodeValueGetter = createNodeValueGetter;
+exports.createEdgeValueGetter = createEdgeValueGetter;
+exports.createEdgeWeightGetter = function (name) {
+ return createEdgeValueGetter(name, coerceWeight);
+};
diff --git a/node_modules/graphology-utils/index.d.ts b/node_modules/graphology-utils/index.d.ts
new file mode 100644
index 00000000..ab390bf0
--- /dev/null
+++ b/node_modules/graphology-utils/index.d.ts
@@ -0,0 +1,10 @@
+export {default as inferMulti} from './infer-multi';
+export {default as inferType} from './infer-type';
+export {default as isGraph} from './is-graph';
+export {default as isGraphConstructor} from './is-graph-constructor';
+export {default as mergeClique} from './merge-clique';
+export {default as mergeCycle} from './merge-cycle';
+export {default as mergePath} from './merge-path';
+export {default as mergeStar} from './merge-star';
+export {default as renameGraphKeys} from './rename-graph-keys';
+export {default as updateGraphKeys} from './update-graph-keys';
diff --git a/node_modules/graphology-utils/index.js b/node_modules/graphology-utils/index.js
new file mode 100644
index 00000000..517d5ef2
--- /dev/null
+++ b/node_modules/graphology-utils/index.js
@@ -0,0 +1,16 @@
+/**
+ * Graphology Utils
+ * =================
+ *
+ * Library endpoint.
+ */
+exports.inferMulti = require('./infer-multi.js');
+exports.inferType = require('./infer-type.js');
+exports.isGraph = require('./is-graph.js');
+exports.isGraphConstructor = require('./is-graph-constructor.js');
+exports.mergeClique = require('./merge-clique.js');
+exports.mergeCycle = require('./merge-cycle.js');
+exports.mergePath = require('./merge-path.js');
+exports.mergeStar = require('./merge-star.js');
+exports.renameGraphKeys = require('./rename-graph-keys.js');
+exports.updateGraphKeys = require('./update-graph-keys.js');
diff --git a/node_modules/graphology-utils/infer-multi.d.ts b/node_modules/graphology-utils/infer-multi.d.ts
new file mode 100644
index 00000000..2552a281
--- /dev/null
+++ b/node_modules/graphology-utils/infer-multi.d.ts
@@ -0,0 +1,3 @@
+import Graph from 'graphology-types';
+
+export default function inferMulti(graph: Graph): boolean;
diff --git a/node_modules/graphology-utils/infer-multi.js b/node_modules/graphology-utils/infer-multi.js
new file mode 100644
index 00000000..02c1f039
--- /dev/null
+++ b/node_modules/graphology-utils/infer-multi.js
@@ -0,0 +1,48 @@
+/**
+ * Graphology inferMulti
+ * ======================
+ *
+ * Useful function used to "guess" if the given graph is truly multi.
+ */
+var isGraph = require('./is-graph.js');
+
+/**
+ * Returning whether the given graph is inferred as multi.
+ *
+ * @param {Graph} graph - Target graph.
+ * @return {boolean}
+ */
+module.exports = function inferMulti(graph) {
+ if (!isGraph(graph))
+ throw new Error(
+ 'graphology-utils/infer-multi: expecting a valid graphology instance.'
+ );
+
+ if (!graph.multi || graph.order === 0 || graph.size < 2) return false;
+
+ var multi = false;
+
+ // TODO: improve this with suitable methods
+ var previousSource, previousTarget, wasUndirected, tmp;
+
+ graph.forEachAssymetricAdjacencyEntry(function (s, t, sa, ta, e, ea, u) {
+ if (multi) return; // TODO: we need #.someAdjacencyEntry
+
+ if (u && s > t) {
+ tmp = t;
+ t = s;
+ s = tmp;
+ }
+
+ if (s === previousSource && t === previousTarget && u === wasUndirected) {
+ multi = true;
+ return;
+ }
+
+ previousSource = s;
+ previousTarget = t;
+ wasUndirected = u;
+ });
+
+ return multi;
+};
diff --git a/node_modules/graphology-utils/infer-type.d.ts b/node_modules/graphology-utils/infer-type.d.ts
new file mode 100644
index 00000000..87cd2eae
--- /dev/null
+++ b/node_modules/graphology-utils/infer-type.d.ts
@@ -0,0 +1,3 @@
+import Graph, {GraphType} from 'graphology-types';
+
+export default function inferType(graph: Graph): GraphType;
diff --git a/node_modules/graphology-utils/infer-type.js b/node_modules/graphology-utils/infer-type.js
new file mode 100644
index 00000000..186aeadf
--- /dev/null
+++ b/node_modules/graphology-utils/infer-type.js
@@ -0,0 +1,35 @@
+/**
+ * Graphology inferType
+ * =====================
+ *
+ * Useful function used to "guess" the real type of the given Graph using
+ * introspection.
+ */
+var isGraph = require('./is-graph.js');
+
+/**
+ * Returning the inferred type of the given graph.
+ *
+ * @param {Graph} graph - Target graph.
+ * @return {boolean}
+ */
+module.exports = function inferType(graph) {
+ if (!isGraph(graph))
+ throw new Error(
+ 'graphology-utils/infer-type: expecting a valid graphology instance.'
+ );
+
+ var declaredType = graph.type;
+
+ if (declaredType !== 'mixed') return declaredType;
+
+ if (
+ (graph.directedSize === 0 && graph.undirectedSize === 0) ||
+ (graph.directedSize > 0 && graph.undirectedSize > 0)
+ )
+ return 'mixed';
+
+ if (graph.directedSize > 0) return 'directed';
+
+ return 'undirected';
+};
diff --git a/node_modules/graphology-utils/is-graph-constructor.d.ts b/node_modules/graphology-utils/is-graph-constructor.d.ts
new file mode 100644
index 00000000..25368247
--- /dev/null
+++ b/node_modules/graphology-utils/is-graph-constructor.d.ts
@@ -0,0 +1 @@
+export default function isGraphConstructor(value: any): boolean;
diff --git a/node_modules/graphology-utils/is-graph-constructor.js b/node_modules/graphology-utils/is-graph-constructor.js
new file mode 100644
index 00000000..61335f6f
--- /dev/null
+++ b/node_modules/graphology-utils/is-graph-constructor.js
@@ -0,0 +1,23 @@
+/**
+ * Graphology isGraphConstructor
+ * ==============================
+ *
+ * Very simple function aiming at ensuring the given variable is a
+ * graphology constructor.
+ */
+
+/**
+ * Checking the value is a graphology constructor.
+ *
+ * @param {any} value - Target value.
+ * @return {boolean}
+ */
+module.exports = function isGraphConstructor(value) {
+ return (
+ value !== null &&
+ typeof value === 'function' &&
+ typeof value.prototype === 'object' &&
+ typeof value.prototype.addUndirectedEdgeWithKey === 'function' &&
+ typeof value.prototype.dropNode === 'function'
+ );
+};
diff --git a/node_modules/graphology-utils/is-graph.d.ts b/node_modules/graphology-utils/is-graph.d.ts
new file mode 100644
index 00000000..477c5937
--- /dev/null
+++ b/node_modules/graphology-utils/is-graph.d.ts
@@ -0,0 +1 @@
+export default function isGraph(value: any): boolean;
diff --git a/node_modules/graphology-utils/is-graph.js b/node_modules/graphology-utils/is-graph.js
new file mode 100644
index 00000000..002184b7
--- /dev/null
+++ b/node_modules/graphology-utils/is-graph.js
@@ -0,0 +1,23 @@
+/**
+ * Graphology isGraph
+ * ===================
+ *
+ * Very simple function aiming at ensuring the given variable is a
+ * graphology instance.
+ */
+
+/**
+ * Checking the value is a graphology instance.
+ *
+ * @param {any} value - Target value.
+ * @return {boolean}
+ */
+module.exports = function isGraph(value) {
+ return (
+ value !== null &&
+ typeof value === 'object' &&
+ typeof value.addUndirectedEdgeWithKey === 'function' &&
+ typeof value.dropNode === 'function' &&
+ typeof value.multi === 'boolean'
+ );
+};
diff --git a/node_modules/graphology-utils/merge-clique.d.ts b/node_modules/graphology-utils/merge-clique.d.ts
new file mode 100644
index 00000000..ac9bfffa
--- /dev/null
+++ b/node_modules/graphology-utils/merge-clique.d.ts
@@ -0,0 +1,3 @@
+import Graph from 'graphology-types';
+
+export default function mergeClique(graph: Graph, nodes: Array<unknown>): void;
diff --git a/node_modules/graphology-utils/merge-clique.js b/node_modules/graphology-utils/merge-clique.js
new file mode 100644
index 00000000..09a9fbc3
--- /dev/null
+++ b/node_modules/graphology-utils/merge-clique.js
@@ -0,0 +1,28 @@
+/**
+ * Graphology mergeClique
+ * =======================
+ *
+ * Function merging the given clique to the graph.
+ */
+
+/**
+ * Merging the given clique to the graph.
+ *
+ * @param {Graph} graph - Target graph.
+ * @param {array} nodes - Nodes representing the clique to merge.
+ */
+module.exports = function mergeClique(graph, nodes) {
+ if (nodes.length === 0) return;
+
+ var source, target, i, j, l;
+
+ for (i = 0, l = nodes.length; i < l; i++) {
+ source = nodes[i];
+
+ for (j = i + 1; j < l; j++) {
+ target = nodes[j];
+
+ graph.mergeEdge(source, target);
+ }
+ }
+};
diff --git a/node_modules/graphology-utils/merge-cycle.d.ts b/node_modules/graphology-utils/merge-cycle.d.ts
new file mode 100644
index 00000000..bc5858e9
--- /dev/null
+++ b/node_modules/graphology-utils/merge-cycle.d.ts
@@ -0,0 +1,3 @@
+import Graph from 'graphology-types';
+
+export default function mergeCycle(graph: Graph, nodes: Array<unknown>): void;
diff --git a/node_modules/graphology-utils/merge-cycle.js b/node_modules/graphology-utils/merge-cycle.js
new file mode 100644
index 00000000..d768043c
--- /dev/null
+++ b/node_modules/graphology-utils/merge-cycle.js
@@ -0,0 +1,31 @@
+/**
+ * Graphology mergeCycle
+ * =====================
+ *
+ * Function merging the given cycle to the graph.
+ */
+
+/**
+ * Merging the given cycle to the graph.
+ *
+ * @param {Graph} graph - Target graph.
+ * @param {array} nodes - Nodes representing the cycle to merge.
+ */
+module.exports = function mergeCycle(graph, nodes) {
+ if (nodes.length === 0) return;
+
+ var previousNode, node, i, l;
+
+ graph.mergeNode(nodes[0]);
+
+ if (nodes.length === 1) return;
+
+ for (i = 1, l = nodes.length; i < l; i++) {
+ previousNode = nodes[i - 1];
+ node = nodes[i];
+
+ graph.mergeEdge(previousNode, node);
+ }
+
+ graph.mergeEdge(node, nodes[0]);
+};
diff --git a/node_modules/graphology-utils/merge-path.d.ts b/node_modules/graphology-utils/merge-path.d.ts
new file mode 100644
index 00000000..b9478975
--- /dev/null
+++ b/node_modules/graphology-utils/merge-path.d.ts
@@ -0,0 +1,3 @@
+import Graph from 'graphology-types';
+
+export default function mergePath(graph: Graph, nodes: Array<unknown>): void;
diff --git a/node_modules/graphology-utils/merge-path.js b/node_modules/graphology-utils/merge-path.js
new file mode 100644
index 00000000..7bf77a31
--- /dev/null
+++ b/node_modules/graphology-utils/merge-path.js
@@ -0,0 +1,27 @@
+/**
+ * Graphology mergePath
+ * =====================
+ *
+ * Function merging the given path to the graph.
+ */
+
+/**
+ * Merging the given path to the graph.
+ *
+ * @param {Graph} graph - Target graph.
+ * @param {array} nodes - Nodes representing the path to merge.
+ */
+module.exports = function mergePath(graph, nodes) {
+ if (nodes.length === 0) return;
+
+ var previousNode, node, i, l;
+
+ graph.mergeNode(nodes[0]);
+
+ for (i = 1, l = nodes.length; i < l; i++) {
+ previousNode = nodes[i - 1];
+ node = nodes[i];
+
+ graph.mergeEdge(previousNode, node);
+ }
+};
diff --git a/node_modules/graphology-utils/merge-star.d.ts b/node_modules/graphology-utils/merge-star.d.ts
new file mode 100644
index 00000000..950900e9
--- /dev/null
+++ b/node_modules/graphology-utils/merge-star.d.ts
@@ -0,0 +1,3 @@
+import Graph from 'graphology-types';
+
+export default function mergeStar(graph: Graph, nodes: Array<unknown>): void;
diff --git a/node_modules/graphology-utils/merge-star.js b/node_modules/graphology-utils/merge-star.js
new file mode 100644
index 00000000..d1340cd2
--- /dev/null
+++ b/node_modules/graphology-utils/merge-star.js
@@ -0,0 +1,28 @@
+/**
+ * Graphology mergeStar
+ * =====================
+ *
+ * Function merging the given star to the graph.
+ */
+
+/**
+ * Merging the given star to the graph.
+ *
+ * @param {Graph} graph - Target graph.
+ * @param {array} nodes - Nodes to add, first one being the center of the star.
+ */
+module.exports = function mergeStar(graph, nodes) {
+ if (nodes.length === 0) return;
+
+ var node, i, l;
+
+ var center = nodes[0];
+
+ graph.mergeNode(center);
+
+ for (i = 1, l = nodes.length; i < l; i++) {
+ node = nodes[i];
+
+ graph.mergeEdge(center, node);
+ }
+};
diff --git a/node_modules/graphology-utils/package.json b/node_modules/graphology-utils/package.json
new file mode 100644
index 00000000..b928d132
--- /dev/null
+++ b/node_modules/graphology-utils/package.json
@@ -0,0 +1,56 @@
+{
+ "name": "graphology-utils",
+ "version": "2.5.2",
+ "description": "Miscellaneous utils for graphology.",
+ "main": "index.js",
+ "files": [
+ "*.d.ts",
+ "add-edge.js",
+ "add-node.js",
+ "defaults.js",
+ "getters.js",
+ "index.js",
+ "infer-type.js",
+ "infer-multi.js",
+ "is-graph.js",
+ "is-graph-constructor.js",
+ "merge-clique.js",
+ "merge-cycle.js",
+ "merge-path.js",
+ "merge-star.js",
+ "rename-graph-keys.js",
+ "update-graph-keys.js"
+ ],
+ "types": "./index.d.ts",
+ "scripts": {
+ "prepublishOnly": "npm test",
+ "test": "mocha test.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/graphology/graphology.git"
+ },
+ "keywords": [
+ "graph",
+ "graphology",
+ "utils"
+ ],
+ "contributors": [
+ {
+ "name": "Guillaume Plique",
+ "url": "http://github.com/Yomguithereal"
+ },
+ {
+ "name": "Jules Farjas",
+ "url": "http://github.com/farjasju"
+ }
+ ],
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/graphology/graphology/issues"
+ },
+ "homepage": "https://github.com/graphology/graphology#readme",
+ "peerDependencies": {
+ "graphology-types": ">=0.23.0"
+ }
+}
diff --git a/node_modules/graphology-utils/rename-graph-keys.d.ts b/node_modules/graphology-utils/rename-graph-keys.d.ts
new file mode 100644
index 00000000..c1f392cf
--- /dev/null
+++ b/node_modules/graphology-utils/rename-graph-keys.d.ts
@@ -0,0 +1,7 @@
+import Graph from 'graphology-types';
+
+export default function renameGraphKeys(
+ graph: Graph,
+ nodeKeyMapping: Record<string, unknown>,
+ edgeKeyMapping: Record<string, unknown>
+): Graph;
diff --git a/node_modules/graphology-utils/rename-graph-keys.js b/node_modules/graphology-utils/rename-graph-keys.js
new file mode 100644
index 00000000..79c43364
--- /dev/null
+++ b/node_modules/graphology-utils/rename-graph-keys.js
@@ -0,0 +1,68 @@
+/**
+ * Graphology Rename Graph Keys
+ * =============================
+ *
+ * Helpers allowing you to rename (ie. change the key) of nodes & edges .
+ */
+var copyEdge = require('./add-edge.js').copyEdge;
+
+module.exports = function renameGraphKeys(
+ graph,
+ nodeKeyMapping,
+ edgeKeyMapping
+) {
+ if (typeof nodeKeyMapping === 'undefined') nodeKeyMapping = {};
+ if (typeof edgeKeyMapping === 'undefined') edgeKeyMapping = {};
+
+ var renamed = graph.nullCopy();
+
+ // Renaming nodes
+ graph.forEachNode(function (key, attr) {
+ var renamedKey = nodeKeyMapping[key];
+
+ if (typeof renamedKey === 'undefined') renamedKey = key;
+
+ renamed.addNode(renamedKey, attr);
+ });
+
+ // Renaming edges
+ var currentSource, currentSourceRenamed;
+
+ graph.forEachAssymetricAdjacencyEntry(function (
+ source,
+ target,
+ _sa,
+ _ta,
+ key,
+ attr,
+ undirected
+ ) {
+ // Leveraging the ordered adjacency to save lookups
+ if (source !== currentSource) {
+ currentSource = source;
+ currentSourceRenamed = nodeKeyMapping[source];
+
+ if (typeof currentSourceRenamed === 'undefined')
+ currentSourceRenamed = source;
+ }
+
+ var targetRenamed = nodeKeyMapping[target];
+
+ if (typeof targetRenamed === 'undefined') targetRenamed = target;
+
+ var renamedKey = edgeKeyMapping[key];
+
+ if (typeof renamedKey === 'undefined') renamedKey = key;
+
+ copyEdge(
+ renamed,
+ undirected,
+ renamedKey,
+ currentSourceRenamed,
+ targetRenamed,
+ attr
+ );
+ });
+
+ return renamed;
+};
diff --git a/node_modules/graphology-utils/update-graph-keys.d.ts b/node_modules/graphology-utils/update-graph-keys.d.ts
new file mode 100644
index 00000000..df7f3eef
--- /dev/null
+++ b/node_modules/graphology-utils/update-graph-keys.d.ts
@@ -0,0 +1,18 @@
+import Graph, {Attributes} from 'graphology-types';
+
+export default function updateGraphKeys<
+ NodeAttributes extends Attributes = Attributes,
+ EdgeAttributes extends Attributes = Attributes
+>(
+ graph: Graph<NodeAttributes, EdgeAttributes>,
+ nodeKeyUpdater: (key: string, attributes: NodeAttributes) => unknown,
+ edgeKeyUpdater: (
+ key: string,
+ attributes: EdgeAttributes,
+ source: string,
+ target: string,
+ sourceAttributes: NodeAttributes,
+ targetAttributes: NodeAttributes,
+ undirected: boolean
+ ) => unknown
+): Graph;
diff --git a/node_modules/graphology-utils/update-graph-keys.js b/node_modules/graphology-utils/update-graph-keys.js
new file mode 100644
index 00000000..5850b092
--- /dev/null
+++ b/node_modules/graphology-utils/update-graph-keys.js
@@ -0,0 +1,69 @@
+/**
+ * Graphology Update Graph Keys
+ * =============================
+ *
+ * Helpers allowing you to update keys of nodes & edges .
+ */
+var copyEdge = require('./add-edge.js').copyEdge;
+
+module.exports = function updateGraphKeys(
+ graph,
+ nodeKeyUpdater,
+ edgeKeyUpdater
+) {
+ var renamed = graph.nullCopy();
+
+ // Renaming nodes
+ graph.forEachNode(function (key, attr) {
+ var renamedKey = nodeKeyUpdater ? nodeKeyUpdater(key, attr) : key;
+ renamed.addNode(renamedKey, attr);
+ });
+
+ // Renaming edges
+ var currentSource, currentSourceRenamed;
+
+ graph.forEachAssymetricAdjacencyEntry(function (
+ source,
+ target,
+ sourceAttr,
+ targetAttr,
+ key,
+ attr,
+ undirected
+ ) {
+ // Leveraging the ordered adjacency to save calls
+ if (source !== currentSource) {
+ currentSource = source;
+ currentSourceRenamed = nodeKeyUpdater
+ ? nodeKeyUpdater(source, sourceAttr)
+ : source;
+ }
+
+ var targetRenamed = nodeKeyUpdater
+ ? nodeKeyUpdater(target, targetAttr)
+ : target;
+
+ var renamedKey = edgeKeyUpdater
+ ? edgeKeyUpdater(
+ key,
+ attr,
+ source,
+ target,
+ sourceAttr,
+ targetAttr,
+ undirected
+ )
+ : key;
+
+ copyEdge(
+ renamed,
+ undirected,
+ renamedKey,
+ currentSourceRenamed,
+ targetRenamed,
+ attr
+ );
+ });
+
+ return renamed;
+};
diff --git a/node_modules/https-proxy-agent/LICENSE b/node_modules/https-proxy-agent/LICENSE
new file mode 100644
index 00000000..008728cb
--- /dev/null
+++ b/node_modules/https-proxy-agent/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2013 Nathan Rajlich <[email protected]>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
diff --git a/node_modules/https-proxy-agent/README.md b/node_modules/https-proxy-agent/README.md
new file mode 100644
index 00000000..ebc53cfa
--- /dev/null
+++ b/node_modules/https-proxy-agent/README.md
@@ -0,0 +1,70 @@
+https-proxy-agent
+================
+### An HTTP(s) proxy `http.Agent` implementation for HTTPS
+
+This module provides an `http.Agent` implementation that connects to a specified
+HTTP or HTTPS proxy server, and can be used with the built-in `https` module.
+
+Specifically, this `Agent` implementation connects to an intermediary "proxy"
+server and issues the [CONNECT HTTP method][CONNECT], which tells the proxy to
+open a direct TCP connection to the destination server.
+
+Since this agent implements the CONNECT HTTP method, it also works with other
+protocols that use this method when connecting over proxies (i.e. WebSockets).
+See the "Examples" section below for more.
+
+Examples
+--------
+
+#### `https` module example
+
+```ts
+import * as https from 'https';
+import { HttpsProxyAgent } from 'https-proxy-agent';
+
+const agent = new HttpsProxyAgent('http://168.63.76.32:3128');
+
+https.get('https://example.com', { agent }, (res) => {
+ console.log('"response" event!', res.headers);
+ res.pipe(process.stdout);
+});
+```
+
+#### `ws` WebSocket connection example
+
+```ts
+import WebSocket from 'ws';
+import { HttpsProxyAgent } from 'https-proxy-agent';
+
+const agent = new HttpsProxyAgent('http://168.63.76.32:3128');
+const socket = new WebSocket('ws://echo.websocket.org', { agent });
+
+socket.on('open', function () {
+ console.log('"open" event!');
+ socket.send('hello world');
+});
+
+socket.on('message', function (data, flags) {
+ console.log('"message" event! %j %j', data, flags);
+ socket.close();
+});
+```
+
+API
+---
+
+### new HttpsProxyAgent(proxy: string | URL, options?: HttpsProxyAgentOptions)
+
+The `HttpsProxyAgent` class implements an `http.Agent` subclass that connects
+to the specified "HTTP(s) proxy server" in order to proxy HTTPS and/or WebSocket
+requests. This is achieved by using the [HTTP `CONNECT` method][CONNECT].
+
+The `proxy` argument is the URL for the proxy server.
+
+The `options` argument accepts the usual `http.Agent` constructor options, and
+some additional properties:
+
+ * `headers` - Object containing additional headers to send to the proxy server
+ in the `CONNECT` request.
+
+[CONNECT]: http://en.wikipedia.org/wiki/HTTP_tunnel#HTTP_CONNECT_Tunneling
diff --git a/node_modules/https-proxy-agent/package.json b/node_modules/https-proxy-agent/package.json
new file mode 100644
index 00000000..51b7e117
--- /dev/null
+++ b/node_modules/https-proxy-agent/package.json
@@ -0,0 +1,50 @@
+{
+ "name": "https-proxy-agent",
+ "version": "7.0.6",
+ "description": "An HTTP(s) proxy `http.Agent` implementation for HTTPS",
+ "main": "./dist/index.js",
+ "types": "./dist/index.d.ts",
+ "files": [
+ "dist"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/TooTallNate/proxy-agents.git",
+ "directory": "packages/https-proxy-agent"
+ },
+ "keywords": [
+ "https",
+ "proxy",
+ "endpoint",
+ "agent"
+ ],
+ "author": "Nathan Rajlich <[email protected]> (http://n8.io/)",
+ "license": "MIT",
+ "dependencies": {
+ "agent-base": "^7.1.2",
+ "debug": "4"
+ },
+ "devDependencies": {
+ "@types/async-retry": "^1.4.5",
+ "@types/debug": "4",
+ "@types/jest": "^29.5.1",
+ "@types/node": "^14.18.45",
+ "async-listen": "^3.0.0",
+ "async-retry": "^1.3.3",
+ "jest": "^29.5.0",
+ "ts-jest": "^29.1.0",
+ "typescript": "^5.0.4",
+ "proxy": "2.2.0",
+ "tsconfig": "0.0.0"
+ },
+ "engines": {
+ "node": ">= 14"
+ },
+ "scripts": {
+ "build": "tsc",
+ "test": "jest --env node --verbose --bail test/test.ts",
+ "test-e2e": "jest --env node --verbose --bail test/e2e.test.ts",
+ "lint": "eslint --ext .ts",
+ "pack": "node ../../scripts/pack.mjs"
+ }
+}
\ No newline at end of file
diff --git a/node_modules/imurmurhash/README.md b/node_modules/imurmurhash/README.md
new file mode 100644
index 00000000..f35b20a0
--- /dev/null
+++ b/node_modules/imurmurhash/README.md
@@ -0,0 +1,122 @@
+iMurmurHash.js
+==============
+
+An incremental implementation of the MurmurHash3 (32-bit) hashing algorithm for JavaScript based on [Gary Court's implementation](https://github.com/garycourt/murmurhash-js) with [kazuyukitanimura's modifications](https://github.com/kazuyukitanimura/murmurhash-js).
+
+This version works significantly faster than the non-incremental version if you need to hash many small strings into a single hash, since string concatenation (to build the single string to pass the non-incremental version) is fairly costly. In one case tested, using the incremental version was about 50% faster than concatenating 5-10 strings and then hashing.
+
+Installation
+------------
+
+To use iMurmurHash in the browser, [download the latest version](https://raw.github.com/jensyt/imurmurhash-js/master/imurmurhash.min.js) and include it as a script on your site.
+
+```html
+<script type="text/javascript" src="/scripts/imurmurhash.min.js"></script>
+<script>
+// Your code here, access iMurmurHash using the global object MurmurHash3
+</script>
+```
+
+---
+
+To use iMurmurHash in Node.js, install the module using NPM:
+
+```bash
+npm install imurmurhash
+```
+
+Then simply include it in your scripts:
+
+```javascript
+MurmurHash3 = require('imurmurhash');
+```
+
+Quick Example
+-------------
+
+```javascript
+// Create the initial hash
+var hashState = MurmurHash3('string');
+
+// Incrementally add text
+hashState.hash('more strings');
+hashState.hash('even more strings');
+
+// All calls can be chained if desired
+hashState.hash('and').hash('some').hash('more');
+
+// Get a result
+hashState.result();
+// returns 0xe4ccfe6b
+```
+
+Functions
+---------
+
+### MurmurHash3 ([string], [seed])
+Get a hash state object, optionally initialized with the given _string_ and _seed_. _Seed_ must be a positive integer if provided. Calling this function without the `new` keyword will return a cached state object that has been reset. This is safe to use as long as the object is only used from a single thread and no other hashes are created while operating on this one. If this constraint cannot be met, you can use `new` to create a new state object. For example:
+
+```javascript
+// Use the cached object, calling the function again will return the same
+// object (but reset, so the current state would be lost)
+hashState = MurmurHash3();
+...
+
+// Create a new object that can be safely used however you wish. Calling the
+// function again will simply return a new state object, and no state loss
+// will occur, at the cost of creating more objects.
+hashState = new MurmurHash3();
+```
+
+Both methods can be mixed however you like if you have different use cases.
+
+---
+
+### MurmurHash3.prototype.hash (string)
+Incrementally add _string_ to the hash. This can be called as many times as you want for the hash state object, including after a call to `result()`. Returns `this` so calls can be chained.
+
+---
+
+### MurmurHash3.prototype.result ()
+Get the result of the hash as a 32-bit positive integer. This performs the tail and finalizer portions of the algorithm, but does not store the result in the state object. This means that it is perfectly safe to get results and then continue adding strings via `hash`.
+
+```javascript
+// Do the whole string at once
+MurmurHash3('this is a test string').result();
+// 0x70529328
+
+// Do part of the string, get a result, then the other part
+var m = MurmurHash3('this is a');
+m.result();
+// 0xbfc4f834
+m.hash(' test string').result();
+// 0x70529328 (same as above)
+```
+
+---
+
+### MurmurHash3.prototype.reset ([seed])
+Reset the state object for reuse, optionally using the given _seed_ (defaults to 0 like the constructor). Returns `this` so calls can be chained.
+
+---
+
+License (MIT)
+-------------
+Copyright (c) 2013 Gary Court, Jens Taylor
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/imurmurhash/imurmurhash.js b/node_modules/imurmurhash/imurmurhash.js
new file mode 100644
index 00000000..e63146a2
--- /dev/null
+++ b/node_modules/imurmurhash/imurmurhash.js
@@ -0,0 +1,138 @@
+/**
+ * @preserve
+ * JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013)
+ *
+ * @author <a href="mailto:[email protected]">Jens Taylor</a>
+ * @see http://github.com/homebrewing/brauhaus-diff
+ * @author <a href="mailto:[email protected]">Gary Court</a>
+ * @see http://github.com/garycourt/murmurhash-js
+ * @author <a href="mailto:[email protected]">Austin Appleby</a>
+ * @see http://sites.google.com/site/murmurhash/
+ */
+(function(){
+ var cache;
+
+ // Call this function without `new` to use the cached object (good for
+ // single-threaded environments), or with `new` to create a new object.
+ //
+ // @param {string} key A UTF-16 or ASCII string
+ // @param {number} seed An optional positive integer
+ // @return {object} A MurmurHash3 object for incremental hashing
+ function MurmurHash3(key, seed) {
+ var m = this instanceof MurmurHash3 ? this : cache;
+ m.reset(seed)
+ if (typeof key === 'string' && key.length > 0) {
+ m.hash(key);
+ }
+
+ if (m !== this) {
+ return m;
+ }
+ };
+
+ // Incrementally add a string to this hash
+ //
+ // @param {string} key A UTF-16 or ASCII string
+ // @return {object} this
+ MurmurHash3.prototype.hash = function(key) {
+ var h1, k1, i, top, len;
+
+ len = key.length;
+ this.len += len;
+
+ k1 = this.k1;
+ i = 0;
+ switch (this.rem) {
+ case 0: k1 ^= len > i ? (key.charCodeAt(i++) & 0xffff) : 0;
+ case 1: k1 ^= len > i ? (key.charCodeAt(i++) & 0xffff) << 8 : 0;
+ case 2: k1 ^= len > i ? (key.charCodeAt(i++) & 0xffff) << 16 : 0;
+ case 3:
+ k1 ^= len > i ? (key.charCodeAt(i) & 0xff) << 24 : 0;
+ k1 ^= len > i ? (key.charCodeAt(i++) & 0xff00) >> 8 : 0;
+ }
+
+ this.rem = (len + this.rem) & 3; // & 3 is same as % 4
+ len -= this.rem;
+ if (len > 0) {
+ h1 = this.h1;
+ while (1) {
+ k1 = (k1 * 0x2d51 + (k1 & 0xffff) * 0xcc9e0000) & 0xffffffff;
+ k1 = (k1 << 15) | (k1 >>> 17);
+ k1 = (k1 * 0x3593 + (k1 & 0xffff) * 0x1b870000) & 0xffffffff;
+
+ h1 ^= k1;
+ h1 = (h1 << 13) | (h1 >>> 19);
+ h1 = (h1 * 5 + 0xe6546b64) & 0xffffffff;
+
+ if (i >= len) {
+ break;
+ }
+
+ k1 = ((key.charCodeAt(i++) & 0xffff)) ^
+ ((key.charCodeAt(i++) & 0xffff) << 8) ^
+ ((key.charCodeAt(i++) & 0xffff) << 16);
+ top = key.charCodeAt(i++);
+ k1 ^= ((top & 0xff) << 24) ^
+ ((top & 0xff00) >> 8);
+ }
+
+ k1 = 0;
+ switch (this.rem) {
+ case 3: k1 ^= (key.charCodeAt(i + 2) & 0xffff) << 16;
+ case 2: k1 ^= (key.charCodeAt(i + 1) & 0xffff) << 8;
+ case 1: k1 ^= (key.charCodeAt(i) & 0xffff);
+ }
+
+ this.h1 = h1;
+ }
+
+ this.k1 = k1;
+ return this;
+ };
+
+ // Get the result of this hash
+ //
+ // @return {number} The 32-bit hash
+ MurmurHash3.prototype.result = function() {
+ var k1, h1;
+
+ k1 = this.k1;
+ h1 = this.h1;
+
+ if (k1 > 0) {
+ k1 = (k1 * 0x2d51 + (k1 & 0xffff) * 0xcc9e0000) & 0xffffffff;
+ k1 = (k1 << 15) | (k1 >>> 17);
+ k1 = (k1 * 0x3593 + (k1 & 0xffff) * 0x1b870000) & 0xffffffff;
+ h1 ^= k1;
+ }
+
+ h1 ^= this.len;
+
+ h1 ^= h1 >>> 16;
+ h1 = (h1 * 0xca6b + (h1 & 0xffff) * 0x85eb0000) & 0xffffffff;
+ h1 ^= h1 >>> 13;
+ h1 = (h1 * 0xae35 + (h1 & 0xffff) * 0xc2b20000) & 0xffffffff;
+ h1 ^= h1 >>> 16;
+
+ return h1 >>> 0;
+ };
+
+ // Reset the hash object for reuse
+ //
+ // @param {number} seed An optional positive integer
+ MurmurHash3.prototype.reset = function(seed) {
+ this.h1 = typeof seed === 'number' ? seed : 0;
+ this.rem = this.k1 = this.len = 0;
+ return this;
+ };
+
+ // A cached object to use. This can be safely used if you're in a single-
+ // threaded environment, otherwise you need to create new hashes to use.
+ cache = new MurmurHash3();
+
+ if (typeof(module) != 'undefined') {
+ module.exports = MurmurHash3;
+ } else {
+ this.MurmurHash3 = MurmurHash3;
+ }
+}());
diff --git a/node_modules/imurmurhash/imurmurhash.min.js b/node_modules/imurmurhash/imurmurhash.min.js
new file mode 100644
index 00000000..dc0ee88d
--- /dev/null
+++ b/node_modules/imurmurhash/imurmurhash.min.js
@@ -0,0 +1,12 @@
+/**
+ * @preserve
+ * JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013)
+ *
+ * @author <a href="mailto:[email protected]">Jens Taylor</a>
+ * @see http://github.com/homebrewing/brauhaus-diff
+ * @author <a href="mailto:[email protected]">Gary Court</a>
+ * @see http://github.com/garycourt/murmurhash-js
+ * @author <a href="mailto:[email protected]">Austin Appleby</a>
+ * @see http://sites.google.com/site/murmurhash/
+ */
+!function(){function t(h,r){var s=this instanceof t?this:e;return s.reset(r),"string"==typeof h&&h.length>0&&s.hash(h),s!==this?s:void 0}var e;t.prototype.hash=function(t){var e,h,r,s,i;switch(i=t.length,this.len+=i,h=this.k1,r=0,this.rem){case 0:h^=i>r?65535&t.charCodeAt(r++):0;case 1:h^=i>r?(65535&t.charCodeAt(r++))<<8:0;case 2:h^=i>r?(65535&t.charCodeAt(r++))<<16:0;case 3:h^=i>r?(255&t.charCodeAt(r))<<24:0,h^=i>r?(65280&t.charCodeAt(r++))>>8:0}if(this.rem=3&i+this.rem,i-=this.rem,i>0){for(e=this.h1;;){if(h=4294967295&11601*h+3432906752*(65535&h),h=h<<15|h>>>17,h=4294967295&13715*h+461832192*(65535&h),e^=h,e=e<<13|e>>>19,e=4294967295&5*e+3864292196,r>=i)break;h=65535&t.charCodeAt(r++)^(65535&t.charCodeAt(r++))<<8^(65535&t.charCodeAt(r++))<<16,s=t.charCodeAt(r++),h^=(255&s)<<24^(65280&s)>>8}switch(h=0,this.rem){case 3:h^=(65535&t.charCodeAt(r+2))<<16;case 2:h^=(65535&t.charCodeAt(r+1))<<8;case 1:h^=65535&t.charCodeAt(r)}this.h1=e}return this.k1=h,this},t.prototype.result=function(){var t,e;return t=this.k1,e=this.h1,t>0&&(t=4294967295&11601*t+3432906752*(65535&t),t=t<<15|t>>>17,t=4294967295&13715*t+461832192*(65535&t),e^=t),e^=this.len,e^=e>>>16,e=4294967295&51819*e+2246770688*(65535&e),e^=e>>>13,e=4294967295&44597*e+3266445312*(65535&e),e^=e>>>16,e>>>0},t.prototype.reset=function(t){return this.h1="number"==typeof t?t:0,this.rem=this.k1=this.len=0,this},e=new t,"undefined"!=typeof module?module.exports=t:this.MurmurHash3=t}();
\ No newline at end of file
diff --git a/node_modules/imurmurhash/package.json b/node_modules/imurmurhash/package.json
new file mode 100644
index 00000000..8a93edb5
--- /dev/null
+++ b/node_modules/imurmurhash/package.json
@@ -0,0 +1,40 @@
+{
+ "name": "imurmurhash",
+ "version": "0.1.4",
+ "description": "An incremental implementation of MurmurHash3",
+ "homepage": "https://github.com/jensyt/imurmurhash-js",
+ "main": "imurmurhash.js",
+ "files": [
+ "imurmurhash.js",
+ "imurmurhash.min.js",
+ "package.json",
+ "README.md"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jensyt/imurmurhash-js"
+ },
+ "bugs": {
+ "url": "https://github.com/jensyt/imurmurhash-js/issues"
+ },
+ "keywords": [
+ "murmur",
+ "murmurhash",
+ "murmurhash3",
+ "hash",
+ "incremental"
+ ],
+ "author": {
+ "name": "Jens Taylor",
+ "email": "[email protected]",
+ "url": "https://github.com/homebrewing"
+ },
+ "license": "MIT",
+ "dependencies": {
+ },
+ "devDependencies": {
+ },
+ "engines": {
+ "node": ">=0.8.19"
+ }
+}
diff --git a/node_modules/layout-base/.babelrc b/node_modules/layout-base/.babelrc
new file mode 100644
index 00000000..002b4aa0
--- /dev/null
+++ b/node_modules/layout-base/.babelrc
@@ -0,0 +1,3 @@
+{
+ "presets": ["env"]
+}
diff --git a/node_modules/layout-base/LICENSE b/node_modules/layout-base/LICENSE
new file mode 100644
index 00000000..6553af2e
--- /dev/null
+++ b/node_modules/layout-base/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2019 iVis@Bilkent
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/layout-base/README.md b/node_modules/layout-base/README.md
new file mode 100644
index 00000000..b08d3fb7
--- /dev/null
+++ b/node_modules/layout-base/README.md
@@ -0,0 +1,20 @@
+layout-base
+================================================================================
+
+## Description
+
+This repository implements a basic layout model and some utilities for Cytoscape.js layout extensions.
+
+## Usage instructions
+
+Add `layout-base` as a dependecy to your layout extension.
+
+`require()` in the extension to reach functionality:
+
+ * `var Integer = require(layout-base).Integer`,
+ * `var Layout = require(layout-base).Layout`,
+ * `...`
+
+ For a usage example, see [cose-base](https://github.com/iVis-at-Bilkent/cose-base) or [avsdf-base](https://github.com/iVis-at-Bilkent/avsdf-base).
+
+ ![](https://github.com/iVis-at-Bilkent/layout-base/blob/master/layout-schema.png)
diff --git a/node_modules/layout-base/bower.json b/node_modules/layout-base/bower.json
new file mode 100644
index 00000000..24f74de7
--- /dev/null
+++ b/node_modules/layout-base/bower.json
@@ -0,0 +1,20 @@
+{
+ "name": "layout-base",
+ "description": "Basic layout model and some utilities for Cytoscape.js layout extensions",
+ "main": "layout-base.js",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/iVis-at-Bilkent/layout-base.git"
+ },
+ "ignore": [
+ "**/.*",
+ "node_modules",
+ "bower_components",
+ "test",
+ "tests"
+ ],
+ "keywords": [
+ "layout"
+ ],
+ "license": "MIT"
+}
diff --git a/node_modules/layout-base/index.js b/node_modules/layout-base/index.js
new file mode 100644
index 00000000..690cd0b2
--- /dev/null
+++ b/node_modules/layout-base/index.js
@@ -0,0 +1,38 @@
+'use strict';
+
+let layoutBase = function(){
+ return;
+};
+
+layoutBase.FDLayout = require('./src/fd/FDLayout');
+layoutBase.FDLayoutConstants = require('./src/fd/FDLayoutConstants');
+layoutBase.FDLayoutEdge = require('./src/fd/FDLayoutEdge');
+layoutBase.FDLayoutNode = require('./src/fd/FDLayoutNode');
+layoutBase.DimensionD = require('./src/util/DimensionD');
+layoutBase.HashMap = require('./src/util/HashMap');
+layoutBase.HashSet = require('./src/util/HashSet');
+layoutBase.IGeometry = require('./src/util/IGeometry');
+layoutBase.IMath = require('./src/util/IMath');
+layoutBase.Integer = require('./src/util/Integer');
+layoutBase.Point = require('./src/util/Point');
+layoutBase.PointD = require('./src/util/PointD');
+layoutBase.RandomSeed = require('./src/util/RandomSeed');
+layoutBase.RectangleD = require('./src/util/RectangleD');
+layoutBase.Transform = require('./src/util/Transform');
+layoutBase.UniqueIDGeneretor = require('./src/util/UniqueIDGeneretor');
+layoutBase.Quicksort = require('./src/util/Quicksort');
+layoutBase.LinkedList = require('./src/util/LinkedList');
+layoutBase.LGraphObject = require('./src/LGraphObject');
+layoutBase.LGraph = require('./src/LGraph');
+layoutBase.LEdge = require('./src/LEdge');
+layoutBase.LGraphManager = require('./src/LGraphManager');
+layoutBase.LNode = require('./src/LNode');
+layoutBase.Layout = require('./src/Layout');
+layoutBase.LayoutConstants = require('./src/LayoutConstants');
+layoutBase.NeedlemanWunsch = require('./src/util/alignment/NeedlemanWunsch');
+layoutBase.Matrix = require('./src/util/Matrix');
+layoutBase.SVD = require('./src/util/SVD');
+
+module.exports = layoutBase;
+
+
diff --git a/node_modules/layout-base/layout-base.js b/node_modules/layout-base/layout-base.js
new file mode 100644
index 00000000..dc770574
--- /dev/null
+++ b/node_modules/layout-base/layout-base.js
@@ -0,0 +1,5230 @@
+(function webpackUniversalModuleDefinition(root, factory) {
+ if(typeof exports === 'object' && typeof module === 'object')
+ module.exports = factory();
+ else if(typeof define === 'function' && define.amd)
+ define([], factory);
+ else if(typeof exports === 'object')
+ exports["layoutBase"] = factory();
+ else
+ root["layoutBase"] = factory();
+})(this, function() {
+return /******/ (function(modules) { // webpackBootstrap
+/******/ // The module cache
+/******/ var installedModules = {};
+/******/
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+/******/
+/******/ // Check if module is in cache
+/******/ if(installedModules[moduleId]) {
+/******/ return installedModules[moduleId].exports;
+/******/ }
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = installedModules[moduleId] = {
+/******/ i: moduleId,
+/******/ l: false,
+/******/ exports: {}
+/******/ };
+/******/
+/******/ // Execute the module function
+/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+/******/
+/******/ // Flag the module as loaded
+/******/ module.l = true;
+/******/
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+/******/
+/******/
+/******/ // expose the modules object (__webpack_modules__)
+/******/ __webpack_require__.m = modules;
+/******/
+/******/ // expose the module cache
+/******/ __webpack_require__.c = installedModules;
+/******/
+/******/ // identity function for calling harmony imports with the correct context
+/******/ __webpack_require__.i = function(value) { return value; };
+/******/
+/******/ // define getter function for harmony exports
+/******/ __webpack_require__.d = function(exports, name, getter) {
+/******/ if(!__webpack_require__.o(exports, name)) {
+/******/ Object.defineProperty(exports, name, {
+/******/ configurable: false,
+/******/ enumerable: true,
+/******/ get: getter
+/******/ });
+/******/ }
+/******/ };
+/******/
+/******/ // getDefaultExport function for compatibility with non-harmony modules
+/******/ __webpack_require__.n = function(module) {
+/******/ var getter = module && module.__esModule ?
+/******/ function getDefault() { return module['default']; } :
+/******/ function getModuleExports() { return module; };
+/******/ __webpack_require__.d(getter, 'a', getter);
+/******/ return getter;
+/******/ };
+/******/
+/******/ // Object.prototype.hasOwnProperty.call
+/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
+/******/
+/******/ // __webpack_public_path__
+/******/ __webpack_require__.p = "";
+/******/
+/******/ // Load entry module and return exports
+/******/ return __webpack_require__(__webpack_require__.s = 28);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+function LayoutConstants() {}
+
+/**
+ * Layout Quality: 0:draft, 1:default, 2:proof
+ */
+LayoutConstants.QUALITY = 1;
+
+/**
+ * Default parameters
+ */
+LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED = false;
+LayoutConstants.DEFAULT_INCREMENTAL = false;
+LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT = true;
+LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT = false;
+LayoutConstants.DEFAULT_ANIMATION_PERIOD = 50;
+LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES = false;
+
+// -----------------------------------------------------------------------------
+// Section: General other constants
+// -----------------------------------------------------------------------------
+/*
+ * Margins of a graph to be applied on bouding rectangle of its contents. We
+ * assume margins on all four sides to be uniform.
+ */
+LayoutConstants.DEFAULT_GRAPH_MARGIN = 15;
+
+/*
+ * Whether to consider labels in node dimensions or not
+ */
+LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = false;
+
+/*
+ * Default dimension of a non-compound node.
+ */
+LayoutConstants.SIMPLE_NODE_SIZE = 40;
+
+/*
+ * Default dimension of a non-compound node.
+ */
+LayoutConstants.SIMPLE_NODE_HALF_SIZE = LayoutConstants.SIMPLE_NODE_SIZE / 2;
+
+/*
+ * Empty compound node size. When a compound node is empty, its both
+ * dimensions should be of this value.
+ */
+LayoutConstants.EMPTY_COMPOUND_NODE_SIZE = 40;
+
+/*
+ * Minimum length that an edge should take during layout
+ */
+LayoutConstants.MIN_EDGE_LENGTH = 1;
+
+/*
+ * World boundaries that layout operates on
+ */
+LayoutConstants.WORLD_BOUNDARY = 1000000;
+
+/*
+ * World boundaries that random positioning can be performed with
+ */
+LayoutConstants.INITIAL_WORLD_BOUNDARY = LayoutConstants.WORLD_BOUNDARY / 1000;
+
+/*
+ * Coordinates of the world center
+ */
+LayoutConstants.WORLD_CENTER_X = 1200;
+LayoutConstants.WORLD_CENTER_Y = 900;
+
+module.exports = LayoutConstants;
+
+/***/ }),
+/* 1 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var LGraphObject = __webpack_require__(2);
+var IGeometry = __webpack_require__(8);
+var IMath = __webpack_require__(9);
+
+function LEdge(source, target, vEdge) {
+ LGraphObject.call(this, vEdge);
+
+ this.isOverlapingSourceAndTarget = false;
+ this.vGraphObject = vEdge;
+ this.bendpoints = [];
+ this.source = source;
+ this.target = target;
+}
+
+LEdge.prototype = Object.create(LGraphObject.prototype);
+
+for (var prop in LGraphObject) {
+ LEdge[prop] = LGraphObject[prop];
+}
+
+LEdge.prototype.getSource = function () {
+ return this.source;
+};
+
+LEdge.prototype.getTarget = function () {
+ return this.target;
+};
+
+LEdge.prototype.isInterGraph = function () {
+ return this.isInterGraph;
+};
+
+LEdge.prototype.getLength = function () {
+ return this.length;
+};
+
+LEdge.prototype.isOverlapingSourceAndTarget = function () {
+ return this.isOverlapingSourceAndTarget;
+};
+
+LEdge.prototype.getBendpoints = function () {
+ return this.bendpoints;
+};
+
+LEdge.prototype.getLca = function () {
+ return this.lca;
+};
+
+LEdge.prototype.getSourceInLca = function () {
+ return this.sourceInLca;
+};
+
+LEdge.prototype.getTargetInLca = function () {
+ return this.targetInLca;
+};
+
+LEdge.prototype.getOtherEnd = function (node) {
+ if (this.source === node) {
+ return this.target;
+ } else if (this.target === node) {
+ return this.source;
+ } else {
+ throw "Node is not incident with this edge";
+ }
+};
+
+LEdge.prototype.getOtherEndInGraph = function (node, graph) {
+ var otherEnd = this.getOtherEnd(node);
+ var root = graph.getGraphManager().getRoot();
+
+ while (true) {
+ if (otherEnd.getOwner() == graph) {
+ return otherEnd;
+ }
+
+ if (otherEnd.getOwner() == root) {
+ break;
+ }
+
+ otherEnd = otherEnd.getOwner().getParent();
+ }
+
+ return null;
+};
+
+LEdge.prototype.updateLength = function () {
+ var clipPointCoordinates = new Array(4);
+
+ this.isOverlapingSourceAndTarget = IGeometry.getIntersection(this.target.getRect(), this.source.getRect(), clipPointCoordinates);
+
+ if (!this.isOverlapingSourceAndTarget) {
+ this.lengthX = clipPointCoordinates[0] - clipPointCoordinates[2];
+ this.lengthY = clipPointCoordinates[1] - clipPointCoordinates[3];
+
+ if (Math.abs(this.lengthX) < 1.0) {
+ this.lengthX = IMath.sign(this.lengthX);
+ }
+
+ if (Math.abs(this.lengthY) < 1.0) {
+ this.lengthY = IMath.sign(this.lengthY);
+ }
+
+ this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY);
+ }
+};
+
+LEdge.prototype.updateLengthSimple = function () {
+ this.lengthX = this.target.getCenterX() - this.source.getCenterX();
+ this.lengthY = this.target.getCenterY() - this.source.getCenterY();
+
+ if (Math.abs(this.lengthX) < 1.0) {
+ this.lengthX = IMath.sign(this.lengthX);
+ }
+
+ if (Math.abs(this.lengthY) < 1.0) {
+ this.lengthY = IMath.sign(this.lengthY);
+ }
+
+ this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY);
+};
+
+module.exports = LEdge;
+
+/***/ }),
+/* 2 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+function LGraphObject(vGraphObject) {
+ this.vGraphObject = vGraphObject;
+}
+
+module.exports = LGraphObject;
+
+/***/ }),
+/* 3 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var LGraphObject = __webpack_require__(2);
+var Integer = __webpack_require__(10);
+var RectangleD = __webpack_require__(13);
+var LayoutConstants = __webpack_require__(0);
+var RandomSeed = __webpack_require__(16);
+var PointD = __webpack_require__(5);
+
+function LNode(gm, loc, size, vNode) {
+ //Alternative constructor 1 : LNode(LGraphManager gm, Point loc, Dimension size, Object vNode)
+ if (size == null && vNode == null) {
+ vNode = loc;
+ }
+
+ LGraphObject.call(this, vNode);
+
+ //Alternative constructor 2 : LNode(Layout layout, Object vNode)
+ if (gm.graphManager != null) gm = gm.graphManager;
+
+ this.estimatedSize = Integer.MIN_VALUE;
+ this.inclusionTreeDepth = Integer.MAX_VALUE;
+ this.vGraphObject = vNode;
+ this.edges = [];
+ this.graphManager = gm;
+
+ if (size != null && loc != null) this.rect = new RectangleD(loc.x, loc.y, size.width, size.height);else this.rect = new RectangleD();
+}
+
+LNode.prototype = Object.create(LGraphObject.prototype);
+for (var prop in LGraphObject) {
+ LNode[prop] = LGraphObject[prop];
+}
+
+LNode.prototype.getEdges = function () {
+ return this.edges;
+};
+
+LNode.prototype.getChild = function () {
+ return this.child;
+};
+
+LNode.prototype.getOwner = function () {
+ // if (this.owner != null) {
+ // if (!(this.owner == null || this.owner.getNodes().indexOf(this) > -1)) {
+ // throw "assert failed";
+ // }
+ // }
+
+ return this.owner;
+};
+
+LNode.prototype.getWidth = function () {
+ return this.rect.width;
+};
+
+LNode.prototype.setWidth = function (width) {
+ this.rect.width = width;
+};
+
+LNode.prototype.getHeight = function () {
+ return this.rect.height;
+};
+
+LNode.prototype.setHeight = function (height) {
+ this.rect.height = height;
+};
+
+LNode.prototype.getCenterX = function () {
+ return this.rect.x + this.rect.width / 2;
+};
+
+LNode.prototype.getCenterY = function () {
+ return this.rect.y + this.rect.height / 2;
+};
+
+LNode.prototype.getCenter = function () {
+ return new PointD(this.rect.x + this.rect.width / 2, this.rect.y + this.rect.height / 2);
+};
+
+LNode.prototype.getLocation = function () {
+ return new PointD(this.rect.x, this.rect.y);
+};
+
+LNode.prototype.getRect = function () {
+ return this.rect;
+};
+
+LNode.prototype.getDiagonal = function () {
+ return Math.sqrt(this.rect.width * this.rect.width + this.rect.height * this.rect.height);
+};
+
+/**
+ * This method returns half the diagonal length of this node.
+ */
+LNode.prototype.getHalfTheDiagonal = function () {
+ return Math.sqrt(this.rect.height * this.rect.height + this.rect.width * this.rect.width) / 2;
+};
+
+LNode.prototype.setRect = function (upperLeft, dimension) {
+ this.rect.x = upperLeft.x;
+ this.rect.y = upperLeft.y;
+ this.rect.width = dimension.width;
+ this.rect.height = dimension.height;
+};
+
+LNode.prototype.setCenter = function (cx, cy) {
+ this.rect.x = cx - this.rect.width / 2;
+ this.rect.y = cy - this.rect.height / 2;
+};
+
+LNode.prototype.setLocation = function (x, y) {
+ this.rect.x = x;
+ this.rect.y = y;
+};
+
+LNode.prototype.moveBy = function (dx, dy) {
+ this.rect.x += dx;
+ this.rect.y += dy;
+};
+
+LNode.prototype.getEdgeListToNode = function (to) {
+ var edgeList = [];
+ var edge;
+ var self = this;
+
+ self.edges.forEach(function (edge) {
+
+ if (edge.target == to) {
+ if (edge.source != self) throw "Incorrect edge source!";
+
+ edgeList.push(edge);
+ }
+ });
+
+ return edgeList;
+};
+
+LNode.prototype.getEdgesBetween = function (other) {
+ var edgeList = [];
+ var edge;
+
+ var self = this;
+ self.edges.forEach(function (edge) {
+
+ if (!(edge.source == self || edge.target == self)) throw "Incorrect edge source and/or target";
+
+ if (edge.target == other || edge.source == other) {
+ edgeList.push(edge);
+ }
+ });
+
+ return edgeList;
+};
+
+LNode.prototype.getNeighborsList = function () {
+ var neighbors = new Set();
+
+ var self = this;
+ self.edges.forEach(function (edge) {
+
+ if (edge.source == self) {
+ neighbors.add(edge.target);
+ } else {
+ if (edge.target != self) {
+ throw "Incorrect incidency!";
+ }
+
+ neighbors.add(edge.source);
+ }
+ });
+
+ return neighbors;
+};
+
+LNode.prototype.withChildren = function () {
+ var withNeighborsList = new Set();
+ var childNode;
+ var children;
+
+ withNeighborsList.add(this);
+
+ if (this.child != null) {
+ var nodes = this.child.getNodes();
+ for (var i = 0; i < nodes.length; i++) {
+ childNode = nodes[i];
+ children = childNode.withChildren();
+ children.forEach(function (node) {
+ withNeighborsList.add(node);
+ });
+ }
+ }
+
+ return withNeighborsList;
+};
+
+LNode.prototype.getNoOfChildren = function () {
+ var noOfChildren = 0;
+ var childNode;
+
+ if (this.child == null) {
+ noOfChildren = 1;
+ } else {
+ var nodes = this.child.getNodes();
+ for (var i = 0; i < nodes.length; i++) {
+ childNode = nodes[i];
+
+ noOfChildren += childNode.getNoOfChildren();
+ }
+ }
+
+ if (noOfChildren == 0) {
+ noOfChildren = 1;
+ }
+ return noOfChildren;
+};
+
+LNode.prototype.getEstimatedSize = function () {
+ if (this.estimatedSize == Integer.MIN_VALUE) {
+ throw "assert failed";
+ }
+ return this.estimatedSize;
+};
+
+LNode.prototype.calcEstimatedSize = function () {
+ if (this.child == null) {
+ return this.estimatedSize = (this.rect.width + this.rect.height) / 2;
+ } else {
+ this.estimatedSize = this.child.calcEstimatedSize();
+ this.rect.width = this.estimatedSize;
+ this.rect.height = this.estimatedSize;
+
+ return this.estimatedSize;
+ }
+};
+
+LNode.prototype.scatter = function () {
+ var randomCenterX;
+ var randomCenterY;
+
+ var minX = -LayoutConstants.INITIAL_WORLD_BOUNDARY;
+ var maxX = LayoutConstants.INITIAL_WORLD_BOUNDARY;
+ randomCenterX = LayoutConstants.WORLD_CENTER_X + RandomSeed.nextDouble() * (maxX - minX) + minX;
+
+ var minY = -LayoutConstants.INITIAL_WORLD_BOUNDARY;
+ var maxY = LayoutConstants.INITIAL_WORLD_BOUNDARY;
+ randomCenterY = LayoutConstants.WORLD_CENTER_Y + RandomSeed.nextDouble() * (maxY - minY) + minY;
+
+ this.rect.x = randomCenterX;
+ this.rect.y = randomCenterY;
+};
+
+LNode.prototype.updateBounds = function () {
+ if (this.getChild() == null) {
+ throw "assert failed";
+ }
+ if (this.getChild().getNodes().length != 0) {
+ // wrap the children nodes by re-arranging the boundaries
+ var childGraph = this.getChild();
+ childGraph.updateBounds(true);
+
+ this.rect.x = childGraph.getLeft();
+ this.rect.y = childGraph.getTop();
+
+ this.setWidth(childGraph.getRight() - childGraph.getLeft());
+ this.setHeight(childGraph.getBottom() - childGraph.getTop());
+
+ // Update compound bounds considering its label properties
+ if (LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS) {
+
+ var width = childGraph.getRight() - childGraph.getLeft();
+ var height = childGraph.getBottom() - childGraph.getTop();
+
+ if (this.labelWidth) {
+ if (this.labelPosHorizontal == "left") {
+ this.rect.x -= this.labelWidth;
+ this.setWidth(width + this.labelWidth);
+ } else if (this.labelPosHorizontal == "center" && this.labelWidth > width) {
+ this.rect.x -= (this.labelWidth - width) / 2;
+ this.setWidth(this.labelWidth);
+ } else if (this.labelPosHorizontal == "right") {
+ this.setWidth(width + this.labelWidth);
+ }
+ }
+
+ if (this.labelHeight) {
+ if (this.labelPosVertical == "top") {
+ this.rect.y -= this.labelHeight;
+ this.setHeight(height + this.labelHeight);
+ } else if (this.labelPosVertical == "center" && this.labelHeight > height) {
+ this.rect.y -= (this.labelHeight - height) / 2;
+ this.setHeight(this.labelHeight);
+ } else if (this.labelPosVertical == "bottom") {
+ this.setHeight(height + this.labelHeight);
+ }
+ }
+ }
+ }
+};
+
+LNode.prototype.getInclusionTreeDepth = function () {
+ if (this.inclusionTreeDepth == Integer.MAX_VALUE) {
+ throw "assert failed";
+ }
+ return this.inclusionTreeDepth;
+};
+
+LNode.prototype.transform = function (trans) {
+ var left = this.rect.x;
+
+ if (left > LayoutConstants.WORLD_BOUNDARY) {
+ left = LayoutConstants.WORLD_BOUNDARY;
+ } else if (left < -LayoutConstants.WORLD_BOUNDARY) {
+ left = -LayoutConstants.WORLD_BOUNDARY;
+ }
+
+ var top = this.rect.y;
+
+ if (top > LayoutConstants.WORLD_BOUNDARY) {
+ top = LayoutConstants.WORLD_BOUNDARY;
+ } else if (top < -LayoutConstants.WORLD_BOUNDARY) {
+ top = -LayoutConstants.WORLD_BOUNDARY;
+ }
+
+ var leftTop = new PointD(left, top);
+ var vLeftTop = trans.inverseTransformPoint(leftTop);
+
+ this.setLocation(vLeftTop.x, vLeftTop.y);
+};
+
+LNode.prototype.getLeft = function () {
+ return this.rect.x;
+};
+
+LNode.prototype.getRight = function () {
+ return this.rect.x + this.rect.width;
+};
+
+LNode.prototype.getTop = function () {
+ return this.rect.y;
+};
+
+LNode.prototype.getBottom = function () {
+ return this.rect.y + this.rect.height;
+};
+
+LNode.prototype.getParent = function () {
+ if (this.owner == null) {
+ return null;
+ }
+
+ return this.owner.getParent();
+};
+
+module.exports = LNode;
+
+/***/ }),
+/* 4 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var LayoutConstants = __webpack_require__(0);
+
+function FDLayoutConstants() {}
+
+//FDLayoutConstants inherits static props in LayoutConstants
+for (var prop in LayoutConstants) {
+ FDLayoutConstants[prop] = LayoutConstants[prop];
+}
+
+FDLayoutConstants.MAX_ITERATIONS = 2500;
+
+FDLayoutConstants.DEFAULT_EDGE_LENGTH = 50;
+FDLayoutConstants.DEFAULT_SPRING_STRENGTH = 0.45;
+FDLayoutConstants.DEFAULT_REPULSION_STRENGTH = 4500.0;
+FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH = 0.4;
+FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = 1.0;
+FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR = 3.8;
+FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = 1.5;
+FDLayoutConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION = true;
+FDLayoutConstants.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION = true;
+FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = 0.3;
+FDLayoutConstants.COOLING_ADAPTATION_FACTOR = 0.33;
+FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT = 1000;
+FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT = 5000;
+FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL = 100.0;
+FDLayoutConstants.MAX_NODE_DISPLACEMENT = FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL * 3;
+FDLayoutConstants.MIN_REPULSION_DIST = FDLayoutConstants.DEFAULT_EDGE_LENGTH / 10.0;
+FDLayoutConstants.CONVERGENCE_CHECK_PERIOD = 100;
+FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = 0.1;
+FDLayoutConstants.MIN_EDGE_LENGTH = 1;
+FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD = 10;
+
+module.exports = FDLayoutConstants;
+
+/***/ }),
+/* 5 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+function PointD(x, y) {
+ if (x == null && y == null) {
+ this.x = 0;
+ this.y = 0;
+ } else {
+ this.x = x;
+ this.y = y;
+ }
+}
+
+PointD.prototype.getX = function () {
+ return this.x;
+};
+
+PointD.prototype.getY = function () {
+ return this.y;
+};
+
+PointD.prototype.setX = function (x) {
+ this.x = x;
+};
+
+PointD.prototype.setY = function (y) {
+ this.y = y;
+};
+
+PointD.prototype.getDifference = function (pt) {
+ return new DimensionD(this.x - pt.x, this.y - pt.y);
+};
+
+PointD.prototype.getCopy = function () {
+ return new PointD(this.x, this.y);
+};
+
+PointD.prototype.translate = function (dim) {
+ this.x += dim.width;
+ this.y += dim.height;
+ return this;
+};
+
+module.exports = PointD;
+
+/***/ }),
+/* 6 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var LGraphObject = __webpack_require__(2);
+var Integer = __webpack_require__(10);
+var LayoutConstants = __webpack_require__(0);
+var LGraphManager = __webpack_require__(7);
+var LNode = __webpack_require__(3);
+var LEdge = __webpack_require__(1);
+var RectangleD = __webpack_require__(13);
+var Point = __webpack_require__(12);
+var LinkedList = __webpack_require__(11);
+
+function LGraph(parent, obj2, vGraph) {
+ LGraphObject.call(this, vGraph);
+ this.estimatedSize = Integer.MIN_VALUE;
+ this.margin = LayoutConstants.DEFAULT_GRAPH_MARGIN;
+ this.edges = [];
+ this.nodes = [];
+ this.isConnected = false;
+ this.parent = parent;
+
+ if (obj2 != null && obj2 instanceof LGraphManager) {
+ this.graphManager = obj2;
+ } else if (obj2 != null && obj2 instanceof Layout) {
+ this.graphManager = obj2.graphManager;
+ }
+}
+
+LGraph.prototype = Object.create(LGraphObject.prototype);
+for (var prop in LGraphObject) {
+ LGraph[prop] = LGraphObject[prop];
+}
+
+LGraph.prototype.getNodes = function () {
+ return this.nodes;
+};
+
+LGraph.prototype.getEdges = function () {
+ return this.edges;
+};
+
+LGraph.prototype.getGraphManager = function () {
+ return this.graphManager;
+};
+
+LGraph.prototype.getParent = function () {
+ return this.parent;
+};
+
+LGraph.prototype.getLeft = function () {
+ return this.left;
+};
+
+LGraph.prototype.getRight = function () {
+ return this.right;
+};
+
+LGraph.prototype.getTop = function () {
+ return this.top;
+};
+
+LGraph.prototype.getBottom = function () {
+ return this.bottom;
+};
+
+LGraph.prototype.isConnected = function () {
+ return this.isConnected;
+};
+
+LGraph.prototype.add = function (obj1, sourceNode, targetNode) {
+ if (sourceNode == null && targetNode == null) {
+ var newNode = obj1;
+ if (this.graphManager == null) {
+ throw "Graph has no graph mgr!";
+ }
+ if (this.getNodes().indexOf(newNode) > -1) {
+ throw "Node already in graph!";
+ }
+ newNode.owner = this;
+ this.getNodes().push(newNode);
+
+ return newNode;
+ } else {
+ var newEdge = obj1;
+ if (!(this.getNodes().indexOf(sourceNode) > -1 && this.getNodes().indexOf(targetNode) > -1)) {
+ throw "Source or target not in graph!";
+ }
+
+ if (!(sourceNode.owner == targetNode.owner && sourceNode.owner == this)) {
+ throw "Both owners must be this graph!";
+ }
+
+ if (sourceNode.owner != targetNode.owner) {
+ return null;
+ }
+
+ // set source and target
+ newEdge.source = sourceNode;
+ newEdge.target = targetNode;
+
+ // set as intra-graph edge
+ newEdge.isInterGraph = false;
+
+ // add to graph edge list
+ this.getEdges().push(newEdge);
+
+ // add to incidency lists
+ sourceNode.edges.push(newEdge);
+
+ if (targetNode != sourceNode) {
+ targetNode.edges.push(newEdge);
+ }
+
+ return newEdge;
+ }
+};
+
+LGraph.prototype.remove = function (obj) {
+ var node = obj;
+ if (obj instanceof LNode) {
+ if (node == null) {
+ throw "Node is null!";
+ }
+ if (!(node.owner != null && node.owner == this)) {
+ throw "Owner graph is invalid!";
+ }
+ if (this.graphManager == null) {
+ throw "Owner graph manager is invalid!";
+ }
+ // remove incident edges first (make a copy to do it safely)
+ var edgesToBeRemoved = node.edges.slice();
+ var edge;
+ var s = edgesToBeRemoved.length;
+ for (var i = 0; i < s; i++) {
+ edge = edgesToBeRemoved[i];
+
+ if (edge.isInterGraph) {
+ this.graphManager.remove(edge);
+ } else {
+ edge.source.owner.remove(edge);
+ }
+ }
+
+ // now the node itself
+ var index = this.nodes.indexOf(node);
+ if (index == -1) {
+ throw "Node not in owner node list!";
+ }
+
+ this.nodes.splice(index, 1);
+ } else if (obj instanceof LEdge) {
+ var edge = obj;
+ if (edge == null) {
+ throw "Edge is null!";
+ }
+ if (!(edge.source != null && edge.target != null)) {
+ throw "Source and/or target is null!";
+ }
+ if (!(edge.source.owner != null && edge.target.owner != null && edge.source.owner == this && edge.target.owner == this)) {
+ throw "Source and/or target owner is invalid!";
+ }
+
+ var sourceIndex = edge.source.edges.indexOf(edge);
+ var targetIndex = edge.target.edges.indexOf(edge);
+ if (!(sourceIndex > -1 && targetIndex > -1)) {
+ throw "Source and/or target doesn't know this edge!";
+ }
+
+ edge.source.edges.splice(sourceIndex, 1);
+
+ if (edge.target != edge.source) {
+ edge.target.edges.splice(targetIndex, 1);
+ }
+
+ var index = edge.source.owner.getEdges().indexOf(edge);
+ if (index == -1) {
+ throw "Not in owner's edge list!";
+ }
+
+ edge.source.owner.getEdges().splice(index, 1);
+ }
+};
+
+LGraph.prototype.updateLeftTop = function () {
+ var top = Integer.MAX_VALUE;
+ var left = Integer.MAX_VALUE;
+ var nodeTop;
+ var nodeLeft;
+ var margin;
+
+ var nodes = this.getNodes();
+ var s = nodes.length;
+
+ for (var i = 0; i < s; i++) {
+ var lNode = nodes[i];
+ nodeTop = lNode.getTop();
+ nodeLeft = lNode.getLeft();
+
+ if (top > nodeTop) {
+ top = nodeTop;
+ }
+
+ if (left > nodeLeft) {
+ left = nodeLeft;
+ }
+ }
+
+ // Do we have any nodes in this graph?
+ if (top == Integer.MAX_VALUE) {
+ return null;
+ }
+
+ if (nodes[0].getParent().paddingLeft != undefined) {
+ margin = nodes[0].getParent().paddingLeft;
+ } else {
+ margin = this.margin;
+ }
+
+ this.left = left - margin;
+ this.top = top - margin;
+
+ // Apply the margins and return the result
+ return new Point(this.left, this.top);
+};
+
+LGraph.prototype.updateBounds = function (recursive) {
+ // calculate bounds
+ var left = Integer.MAX_VALUE;
+ var right = -Integer.MAX_VALUE;
+ var top = Integer.MAX_VALUE;
+ var bottom = -Integer.MAX_VALUE;
+ var nodeLeft;
+ var nodeRight;
+ var nodeTop;
+ var nodeBottom;
+ var margin;
+
+ var nodes = this.nodes;
+ var s = nodes.length;
+ for (var i = 0; i < s; i++) {
+ var lNode = nodes[i];
+
+ if (recursive && lNode.child != null) {
+ lNode.updateBounds();
+ }
+ nodeLeft = lNode.getLeft();
+ nodeRight = lNode.getRight();
+ nodeTop = lNode.getTop();
+ nodeBottom = lNode.getBottom();
+
+ if (left > nodeLeft) {
+ left = nodeLeft;
+ }
+
+ if (right < nodeRight) {
+ right = nodeRight;
+ }
+
+ if (top > nodeTop) {
+ top = nodeTop;
+ }
+
+ if (bottom < nodeBottom) {
+ bottom = nodeBottom;
+ }
+ }
+
+ var boundingRect = new RectangleD(left, top, right - left, bottom - top);
+ if (left == Integer.MAX_VALUE) {
+ this.left = this.parent.getLeft();
+ this.right = this.parent.getRight();
+ this.top = this.parent.getTop();
+ this.bottom = this.parent.getBottom();
+ }
+
+ if (nodes[0].getParent().paddingLeft != undefined) {
+ margin = nodes[0].getParent().paddingLeft;
+ } else {
+ margin = this.margin;
+ }
+
+ this.left = boundingRect.x - margin;
+ this.right = boundingRect.x + boundingRect.width + margin;
+ this.top = boundingRect.y - margin;
+ this.bottom = boundingRect.y + boundingRect.height + margin;
+};
+
+LGraph.calculateBounds = function (nodes) {
+ var left = Integer.MAX_VALUE;
+ var right = -Integer.MAX_VALUE;
+ var top = Integer.MAX_VALUE;
+ var bottom = -Integer.MAX_VALUE;
+ var nodeLeft;
+ var nodeRight;
+ var nodeTop;
+ var nodeBottom;
+
+ var s = nodes.length;
+
+ for (var i = 0; i < s; i++) {
+ var lNode = nodes[i];
+ nodeLeft = lNode.getLeft();
+ nodeRight = lNode.getRight();
+ nodeTop = lNode.getTop();
+ nodeBottom = lNode.getBottom();
+
+ if (left > nodeLeft) {
+ left = nodeLeft;
+ }
+
+ if (right < nodeRight) {
+ right = nodeRight;
+ }
+
+ if (top > nodeTop) {
+ top = nodeTop;
+ }
+
+ if (bottom < nodeBottom) {
+ bottom = nodeBottom;
+ }
+ }
+
+ var boundingRect = new RectangleD(left, top, right - left, bottom - top);
+
+ return boundingRect;
+};
+
+LGraph.prototype.getInclusionTreeDepth = function () {
+ if (this == this.graphManager.getRoot()) {
+ return 1;
+ } else {
+ return this.parent.getInclusionTreeDepth();
+ }
+};
+
+LGraph.prototype.getEstimatedSize = function () {
+ if (this.estimatedSize == Integer.MIN_VALUE) {
+ throw "assert failed";
+ }
+ return this.estimatedSize;
+};
+
+LGraph.prototype.calcEstimatedSize = function () {
+ var size = 0;
+ var nodes = this.nodes;
+ var s = nodes.length;
+
+ for (var i = 0; i < s; i++) {
+ var lNode = nodes[i];
+ size += lNode.calcEstimatedSize();
+ }
+
+ if (size == 0) {
+ this.estimatedSize = LayoutConstants.EMPTY_COMPOUND_NODE_SIZE;
+ } else {
+ this.estimatedSize = size / Math.sqrt(this.nodes.length);
+ }
+
+ return this.estimatedSize;
+};
+
+LGraph.prototype.updateConnected = function () {
+ var self = this;
+ if (this.nodes.length == 0) {
+ this.isConnected = true;
+ return;
+ }
+
+ var queue = new LinkedList();
+ var visited = new Set();
+ var currentNode = this.nodes[0];
+ var neighborEdges;
+ var currentNeighbor;
+ var childrenOfNode = currentNode.withChildren();
+ childrenOfNode.forEach(function (node) {
+ queue.push(node);
+ visited.add(node);
+ });
+
+ while (queue.length !== 0) {
+ currentNode = queue.shift();
+
+ // Traverse all neighbors of this node
+ neighborEdges = currentNode.getEdges();
+ var size = neighborEdges.length;
+ for (var i = 0; i < size; i++) {
+ var neighborEdge = neighborEdges[i];
+ currentNeighbor = neighborEdge.getOtherEndInGraph(currentNode, this);
+
+ // Add unvisited neighbors to the list to visit
+ if (currentNeighbor != null && !visited.has(currentNeighbor)) {
+ var childrenOfNeighbor = currentNeighbor.withChildren();
+
+ childrenOfNeighbor.forEach(function (node) {
+ queue.push(node);
+ visited.add(node);
+ });
+ }
+ }
+ }
+
+ this.isConnected = false;
+
+ if (visited.size >= this.nodes.length) {
+ var noOfVisitedInThisGraph = 0;
+
+ visited.forEach(function (visitedNode) {
+ if (visitedNode.owner == self) {
+ noOfVisitedInThisGraph++;
+ }
+ });
+
+ if (noOfVisitedInThisGraph == this.nodes.length) {
+ this.isConnected = true;
+ }
+ }
+};
+
+module.exports = LGraph;
+
+/***/ }),
+/* 7 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var LGraph;
+var LEdge = __webpack_require__(1);
+
+function LGraphManager(layout) {
+ LGraph = __webpack_require__(6); // It may be better to initilize this out of this function but it gives an error (Right-hand side of 'instanceof' is not callable) now.
+ this.layout = layout;
+
+ this.graphs = [];
+ this.edges = [];
+}
+
+LGraphManager.prototype.addRoot = function () {
+ var ngraph = this.layout.newGraph();
+ var nnode = this.layout.newNode(null);
+ var root = this.add(ngraph, nnode);
+ this.setRootGraph(root);
+ return this.rootGraph;
+};
+
+LGraphManager.prototype.add = function (newGraph, parentNode, newEdge, sourceNode, targetNode) {
+ //there are just 2 parameters are passed then it adds an LGraph else it adds an LEdge
+ if (newEdge == null && sourceNode == null && targetNode == null) {
+ if (newGraph == null) {
+ throw "Graph is null!";
+ }
+ if (parentNode == null) {
+ throw "Parent node is null!";
+ }
+ if (this.graphs.indexOf(newGraph) > -1) {
+ throw "Graph already in this graph mgr!";
+ }
+
+ this.graphs.push(newGraph);
+
+ if (newGraph.parent != null) {
+ throw "Already has a parent!";
+ }
+ if (parentNode.child != null) {
+ throw "Already has a child!";
+ }
+
+ newGraph.parent = parentNode;
+ parentNode.child = newGraph;
+
+ return newGraph;
+ } else {
+ //change the order of the parameters
+ targetNode = newEdge;
+ sourceNode = parentNode;
+ newEdge = newGraph;
+ var sourceGraph = sourceNode.getOwner();
+ var targetGraph = targetNode.getOwner();
+
+ if (!(sourceGraph != null && sourceGraph.getGraphManager() == this)) {
+ throw "Source not in this graph mgr!";
+ }
+ if (!(targetGraph != null && targetGraph.getGraphManager() == this)) {
+ throw "Target not in this graph mgr!";
+ }
+
+ if (sourceGraph == targetGraph) {
+ newEdge.isInterGraph = false;
+ return sourceGraph.add(newEdge, sourceNode, targetNode);
+ } else {
+ newEdge.isInterGraph = true;
+
+ // set source and target
+ newEdge.source = sourceNode;
+ newEdge.target = targetNode;
+
+ // add edge to inter-graph edge list
+ if (this.edges.indexOf(newEdge) > -1) {
+ throw "Edge already in inter-graph edge list!";
+ }
+
+ this.edges.push(newEdge);
+
+ // add edge to source and target incidency lists
+ if (!(newEdge.source != null && newEdge.target != null)) {
+ throw "Edge source and/or target is null!";
+ }
+
+ if (!(newEdge.source.edges.indexOf(newEdge) == -1 && newEdge.target.edges.indexOf(newEdge) == -1)) {
+ throw "Edge already in source and/or target incidency list!";
+ }
+
+ newEdge.source.edges.push(newEdge);
+ newEdge.target.edges.push(newEdge);
+
+ return newEdge;
+ }
+ }
+};
+
+LGraphManager.prototype.remove = function (lObj) {
+ if (lObj instanceof LGraph) {
+ var graph = lObj;
+ if (graph.getGraphManager() != this) {
+ throw "Graph not in this graph mgr";
+ }
+ if (!(graph == this.rootGraph || graph.parent != null && graph.parent.graphManager == this)) {
+ throw "Invalid parent node!";
+ }
+
+ // first the edges (make a copy to do it safely)
+ var edgesToBeRemoved = [];
+
+ edgesToBeRemoved = edgesToBeRemoved.concat(graph.getEdges());
+
+ var edge;
+ var s = edgesToBeRemoved.length;
+ for (var i = 0; i < s; i++) {
+ edge = edgesToBeRemoved[i];
+ graph.remove(edge);
+ }
+
+ // then the nodes (make a copy to do it safely)
+ var nodesToBeRemoved = [];
+
+ nodesToBeRemoved = nodesToBeRemoved.concat(graph.getNodes());
+
+ var node;
+ s = nodesToBeRemoved.length;
+ for (var i = 0; i < s; i++) {
+ node = nodesToBeRemoved[i];
+ graph.remove(node);
+ }
+
+ // check if graph is the root
+ if (graph == this.rootGraph) {
+ this.setRootGraph(null);
+ }
+
+ // now remove the graph itself
+ var index = this.graphs.indexOf(graph);
+ this.graphs.splice(index, 1);
+
+ // also reset the parent of the graph
+ graph.parent = null;
+ } else if (lObj instanceof LEdge) {
+ edge = lObj;
+ if (edge == null) {
+ throw "Edge is null!";
+ }
+ if (!edge.isInterGraph) {
+ throw "Not an inter-graph edge!";
+ }
+ if (!(edge.source != null && edge.target != null)) {
+ throw "Source and/or target is null!";
+ }
+
+ // remove edge from source and target nodes' incidency lists
+
+ if (!(edge.source.edges.indexOf(edge) != -1 && edge.target.edges.indexOf(edge) != -1)) {
+ throw "Source and/or target doesn't know this edge!";
+ }
+
+ var index = edge.source.edges.indexOf(edge);
+ edge.source.edges.splice(index, 1);
+ index = edge.target.edges.indexOf(edge);
+ edge.target.edges.splice(index, 1);
+
+ // remove edge from owner graph manager's inter-graph edge list
+
+ if (!(edge.source.owner != null && edge.source.owner.getGraphManager() != null)) {
+ throw "Edge owner graph or owner graph manager is null!";
+ }
+ if (edge.source.owner.getGraphManager().edges.indexOf(edge) == -1) {
+ throw "Not in owner graph manager's edge list!";
+ }
+
+ var index = edge.source.owner.getGraphManager().edges.indexOf(edge);
+ edge.source.owner.getGraphManager().edges.splice(index, 1);
+ }
+};
+
+LGraphManager.prototype.updateBounds = function () {
+ this.rootGraph.updateBounds(true);
+};
+
+LGraphManager.prototype.getGraphs = function () {
+ return this.graphs;
+};
+
+LGraphManager.prototype.getAllNodes = function () {
+ if (this.allNodes == null) {
+ var nodeList = [];
+ var graphs = this.getGraphs();
+ var s = graphs.length;
+ for (var i = 0; i < s; i++) {
+ nodeList = nodeList.concat(graphs[i].getNodes());
+ }
+ this.allNodes = nodeList;
+ }
+ return this.allNodes;
+};
+
+LGraphManager.prototype.resetAllNodes = function () {
+ this.allNodes = null;
+};
+
+LGraphManager.prototype.resetAllEdges = function () {
+ this.allEdges = null;
+};
+
+LGraphManager.prototype.resetAllNodesToApplyGravitation = function () {
+ this.allNodesToApplyGravitation = null;
+};
+
+LGraphManager.prototype.getAllEdges = function () {
+ if (this.allEdges == null) {
+ var edgeList = [];
+ var graphs = this.getGraphs();
+ var s = graphs.length;
+ for (var i = 0; i < graphs.length; i++) {
+ edgeList = edgeList.concat(graphs[i].getEdges());
+ }
+
+ edgeList = edgeList.concat(this.edges);
+
+ this.allEdges = edgeList;
+ }
+ return this.allEdges;
+};
+
+LGraphManager.prototype.getAllNodesToApplyGravitation = function () {
+ return this.allNodesToApplyGravitation;
+};
+
+LGraphManager.prototype.setAllNodesToApplyGravitation = function (nodeList) {
+ if (this.allNodesToApplyGravitation != null) {
+ throw "assert failed";
+ }
+
+ this.allNodesToApplyGravitation = nodeList;
+};
+
+LGraphManager.prototype.getRoot = function () {
+ return this.rootGraph;
+};
+
+LGraphManager.prototype.setRootGraph = function (graph) {
+ if (graph.getGraphManager() != this) {
+ throw "Root not in this graph mgr!";
+ }
+
+ this.rootGraph = graph;
+ // root graph must have a root node associated with it for convenience
+ if (graph.parent == null) {
+ graph.parent = this.layout.newNode("Root node");
+ }
+};
+
+LGraphManager.prototype.getLayout = function () {
+ return this.layout;
+};
+
+LGraphManager.prototype.isOneAncestorOfOther = function (firstNode, secondNode) {
+ if (!(firstNode != null && secondNode != null)) {
+ throw "assert failed";
+ }
+
+ if (firstNode == secondNode) {
+ return true;
+ }
+ // Is second node an ancestor of the first one?
+ var ownerGraph = firstNode.getOwner();
+ var parentNode;
+
+ do {
+ parentNode = ownerGraph.getParent();
+
+ if (parentNode == null) {
+ break;
+ }
+
+ if (parentNode == secondNode) {
+ return true;
+ }
+
+ ownerGraph = parentNode.getOwner();
+ if (ownerGraph == null) {
+ break;
+ }
+ } while (true);
+ // Is first node an ancestor of the second one?
+ ownerGraph = secondNode.getOwner();
+
+ do {
+ parentNode = ownerGraph.getParent();
+
+ if (parentNode == null) {
+ break;
+ }
+
+ if (parentNode == firstNode) {
+ return true;
+ }
+
+ ownerGraph = parentNode.getOwner();
+ if (ownerGraph == null) {
+ break;
+ }
+ } while (true);
+
+ return false;
+};
+
+LGraphManager.prototype.calcLowestCommonAncestors = function () {
+ var edge;
+ var sourceNode;
+ var targetNode;
+ var sourceAncestorGraph;
+ var targetAncestorGraph;
+
+ var edges = this.getAllEdges();
+ var s = edges.length;
+ for (var i = 0; i < s; i++) {
+ edge = edges[i];
+
+ sourceNode = edge.source;
+ targetNode = edge.target;
+ edge.lca = null;
+ edge.sourceInLca = sourceNode;
+ edge.targetInLca = targetNode;
+
+ if (sourceNode == targetNode) {
+ edge.lca = sourceNode.getOwner();
+ continue;
+ }
+
+ sourceAncestorGraph = sourceNode.getOwner();
+
+ while (edge.lca == null) {
+ edge.targetInLca = targetNode;
+ targetAncestorGraph = targetNode.getOwner();
+
+ while (edge.lca == null) {
+ if (targetAncestorGraph == sourceAncestorGraph) {
+ edge.lca = targetAncestorGraph;
+ break;
+ }
+
+ if (targetAncestorGraph == this.rootGraph) {
+ break;
+ }
+
+ if (edge.lca != null) {
+ throw "assert failed";
+ }
+ edge.targetInLca = targetAncestorGraph.getParent();
+ targetAncestorGraph = edge.targetInLca.getOwner();
+ }
+
+ if (sourceAncestorGraph == this.rootGraph) {
+ break;
+ }
+
+ if (edge.lca == null) {
+ edge.sourceInLca = sourceAncestorGraph.getParent();
+ sourceAncestorGraph = edge.sourceInLca.getOwner();
+ }
+ }
+
+ if (edge.lca == null) {
+ throw "assert failed";
+ }
+ }
+};
+
+LGraphManager.prototype.calcLowestCommonAncestor = function (firstNode, secondNode) {
+ if (firstNode == secondNode) {
+ return firstNode.getOwner();
+ }
+ var firstOwnerGraph = firstNode.getOwner();
+
+ do {
+ if (firstOwnerGraph == null) {
+ break;
+ }
+ var secondOwnerGraph = secondNode.getOwner();
+
+ do {
+ if (secondOwnerGraph == null) {
+ break;
+ }
+
+ if (secondOwnerGraph == firstOwnerGraph) {
+ return secondOwnerGraph;
+ }
+ secondOwnerGraph = secondOwnerGraph.getParent().getOwner();
+ } while (true);
+
+ firstOwnerGraph = firstOwnerGraph.getParent().getOwner();
+ } while (true);
+
+ return firstOwnerGraph;
+};
+
+LGraphManager.prototype.calcInclusionTreeDepths = function (graph, depth) {
+ if (graph == null && depth == null) {
+ graph = this.rootGraph;
+ depth = 1;
+ }
+ var node;
+
+ var nodes = graph.getNodes();
+ var s = nodes.length;
+ for (var i = 0; i < s; i++) {
+ node = nodes[i];
+ node.inclusionTreeDepth = depth;
+
+ if (node.child != null) {
+ this.calcInclusionTreeDepths(node.child, depth + 1);
+ }
+ }
+};
+
+LGraphManager.prototype.includesInvalidEdge = function () {
+ var edge;
+ var edgesToRemove = [];
+
+ var s = this.edges.length;
+ for (var i = 0; i < s; i++) {
+ edge = this.edges[i];
+
+ if (this.isOneAncestorOfOther(edge.source, edge.target)) {
+ edgesToRemove.push(edge);
+ }
+ }
+
+ // Remove invalid edges from graph manager
+ for (var i = 0; i < edgesToRemove.length; i++) {
+ this.remove(edgesToRemove[i]);
+ }
+
+ // Invalid edges are cleared, so return false
+ return false;
+};
+
+module.exports = LGraphManager;
+
+/***/ }),
+/* 8 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+/**
+ * This class maintains a list of static geometry related utility methods.
+ *
+ *
+ * Copyright: i-Vis Research Group, Bilkent University, 2007 - present
+ */
+
+var Point = __webpack_require__(12);
+
+function IGeometry() {}
+
+/**
+ * This method calculates *half* the amount in x and y directions of the two
+ * input rectangles needed to separate them keeping their respective
+ * positioning, and returns the result in the input array. An input
+ * separation buffer added to the amount in both directions. We assume that
+ * the two rectangles do intersect.
+ */
+IGeometry.calcSeparationAmount = function (rectA, rectB, overlapAmount, separationBuffer) {
+ if (!rectA.intersects(rectB)) {
+ throw "assert failed";
+ }
+
+ var directions = new Array(2);
+
+ this.decideDirectionsForOverlappingNodes(rectA, rectB, directions);
+
+ overlapAmount[0] = Math.min(rectA.getRight(), rectB.getRight()) - Math.max(rectA.x, rectB.x);
+ overlapAmount[1] = Math.min(rectA.getBottom(), rectB.getBottom()) - Math.max(rectA.y, rectB.y);
+
+ // update the overlapping amounts for the following cases:
+ if (rectA.getX() <= rectB.getX() && rectA.getRight() >= rectB.getRight()) {
+ /* Case x.1:
+ *
+ * rectA
+ * | |
+ * | _________ |
+ * | | | |
+ * |________|_______|______|
+ * | |
+ * | |
+ * rectB
+ */
+ overlapAmount[0] += Math.min(rectB.getX() - rectA.getX(), rectA.getRight() - rectB.getRight());
+ } else if (rectB.getX() <= rectA.getX() && rectB.getRight() >= rectA.getRight()) {
+ /* Case x.2:
+ *
+ * rectB
+ * | |
+ * | _________ |
+ * | | | |
+ * |________|_______|______|
+ * | |
+ * | |
+ * rectA
+ */
+ overlapAmount[0] += Math.min(rectA.getX() - rectB.getX(), rectB.getRight() - rectA.getRight());
+ }
+ if (rectA.getY() <= rectB.getY() && rectA.getBottom() >= rectB.getBottom()) {
+ /* Case y.1:
+ * ________ rectA
+ * |
+ * |
+ * ______|____ rectB
+ * | |
+ * | |
+ * ______|____|
+ * |
+ * |
+ * |________
+ *
+ */
+ overlapAmount[1] += Math.min(rectB.getY() - rectA.getY(), rectA.getBottom() - rectB.getBottom());
+ } else if (rectB.getY() <= rectA.getY() && rectB.getBottom() >= rectA.getBottom()) {
+ /* Case y.2:
+ * ________ rectB
+ * |
+ * |
+ * ______|____ rectA
+ * | |
+ * | |
+ * ______|____|
+ * |
+ * |
+ * |________
+ *
+ */
+ overlapAmount[1] += Math.min(rectA.getY() - rectB.getY(), rectB.getBottom() - rectA.getBottom());
+ }
+
+ // find slope of the line passes two centers
+ var slope = Math.abs((rectB.getCenterY() - rectA.getCenterY()) / (rectB.getCenterX() - rectA.getCenterX()));
+ // if centers are overlapped
+ if (rectB.getCenterY() === rectA.getCenterY() && rectB.getCenterX() === rectA.getCenterX()) {
+ // assume the slope is 1 (45 degree)
+ slope = 1.0;
+ }
+
+ var moveByY = slope * overlapAmount[0];
+ var moveByX = overlapAmount[1] / slope;
+ if (overlapAmount[0] < moveByX) {
+ moveByX = overlapAmount[0];
+ } else {
+ moveByY = overlapAmount[1];
+ }
+ // return half the amount so that if each rectangle is moved by these
+ // amounts in opposite directions, overlap will be resolved
+ overlapAmount[0] = -1 * directions[0] * (moveByX / 2 + separationBuffer);
+ overlapAmount[1] = -1 * directions[1] * (moveByY / 2 + separationBuffer);
+};
+
+/**
+ * This method decides the separation direction of overlapping nodes
+ *
+ * if directions[0] = -1, then rectA goes left
+ * if directions[0] = 1, then rectA goes right
+ * if directions[1] = -1, then rectA goes up
+ * if directions[1] = 1, then rectA goes down
+ */
+IGeometry.decideDirectionsForOverlappingNodes = function (rectA, rectB, directions) {
+ if (rectA.getCenterX() < rectB.getCenterX()) {
+ directions[0] = -1;
+ } else {
+ directions[0] = 1;
+ }
+
+ if (rectA.getCenterY() < rectB.getCenterY()) {
+ directions[1] = -1;
+ } else {
+ directions[1] = 1;
+ }
+};
+
+/**
+ * This method calculates the intersection (clipping) points of the two
+ * input rectangles with line segment defined by the centers of these two
+ * rectangles. The clipping points are saved in the input double array and
+ * whether or not the two rectangles overlap is returned.
+ */
+IGeometry.getIntersection2 = function (rectA, rectB, result) {
+ //result[0-1] will contain clipPoint of rectA, result[2-3] will contain clipPoint of rectB
+ var p1x = rectA.getCenterX();
+ var p1y = rectA.getCenterY();
+ var p2x = rectB.getCenterX();
+ var p2y = rectB.getCenterY();
+
+ //if two rectangles intersect, then clipping points are centers
+ if (rectA.intersects(rectB)) {
+ result[0] = p1x;
+ result[1] = p1y;
+ result[2] = p2x;
+ result[3] = p2y;
+ return true;
+ }
+ //variables for rectA
+ var topLeftAx = rectA.getX();
+ var topLeftAy = rectA.getY();
+ var topRightAx = rectA.getRight();
+ var bottomLeftAx = rectA.getX();
+ var bottomLeftAy = rectA.getBottom();
+ var bottomRightAx = rectA.getRight();
+ var halfWidthA = rectA.getWidthHalf();
+ var halfHeightA = rectA.getHeightHalf();
+ //variables for rectB
+ var topLeftBx = rectB.getX();
+ var topLeftBy = rectB.getY();
+ var topRightBx = rectB.getRight();
+ var bottomLeftBx = rectB.getX();
+ var bottomLeftBy = rectB.getBottom();
+ var bottomRightBx = rectB.getRight();
+ var halfWidthB = rectB.getWidthHalf();
+ var halfHeightB = rectB.getHeightHalf();
+
+ //flag whether clipping points are found
+ var clipPointAFound = false;
+ var clipPointBFound = false;
+
+ // line is vertical
+ if (p1x === p2x) {
+ if (p1y > p2y) {
+ result[0] = p1x;
+ result[1] = topLeftAy;
+ result[2] = p2x;
+ result[3] = bottomLeftBy;
+ return false;
+ } else if (p1y < p2y) {
+ result[0] = p1x;
+ result[1] = bottomLeftAy;
+ result[2] = p2x;
+ result[3] = topLeftBy;
+ return false;
+ } else {
+ //not line, return null;
+ }
+ }
+ // line is horizontal
+ else if (p1y === p2y) {
+ if (p1x > p2x) {
+ result[0] = topLeftAx;
+ result[1] = p1y;
+ result[2] = topRightBx;
+ result[3] = p2y;
+ return false;
+ } else if (p1x < p2x) {
+ result[0] = topRightAx;
+ result[1] = p1y;
+ result[2] = topLeftBx;
+ result[3] = p2y;
+ return false;
+ } else {
+ //not valid line, return null;
+ }
+ } else {
+ //slopes of rectA's and rectB's diagonals
+ var slopeA = rectA.height / rectA.width;
+ var slopeB = rectB.height / rectB.width;
+
+ //slope of line between center of rectA and center of rectB
+ var slopePrime = (p2y - p1y) / (p2x - p1x);
+ var cardinalDirectionA = void 0;
+ var cardinalDirectionB = void 0;
+ var tempPointAx = void 0;
+ var tempPointAy = void 0;
+ var tempPointBx = void 0;
+ var tempPointBy = void 0;
+
+ //determine whether clipping point is the corner of nodeA
+ if (-slopeA === slopePrime) {
+ if (p1x > p2x) {
+ result[0] = bottomLeftAx;
+ result[1] = bottomLeftAy;
+ clipPointAFound = true;
+ } else {
+ result[0] = topRightAx;
+ result[1] = topLeftAy;
+ clipPointAFound = true;
+ }
+ } else if (slopeA === slopePrime) {
+ if (p1x > p2x) {
+ result[0] = topLeftAx;
+ result[1] = topLeftAy;
+ clipPointAFound = true;
+ } else {
+ result[0] = bottomRightAx;
+ result[1] = bottomLeftAy;
+ clipPointAFound = true;
+ }
+ }
+
+ //determine whether clipping point is the corner of nodeB
+ if (-slopeB === slopePrime) {
+ if (p2x > p1x) {
+ result[2] = bottomLeftBx;
+ result[3] = bottomLeftBy;
+ clipPointBFound = true;
+ } else {
+ result[2] = topRightBx;
+ result[3] = topLeftBy;
+ clipPointBFound = true;
+ }
+ } else if (slopeB === slopePrime) {
+ if (p2x > p1x) {
+ result[2] = topLeftBx;
+ result[3] = topLeftBy;
+ clipPointBFound = true;
+ } else {
+ result[2] = bottomRightBx;
+ result[3] = bottomLeftBy;
+ clipPointBFound = true;
+ }
+ }
+
+ //if both clipping points are corners
+ if (clipPointAFound && clipPointBFound) {
+ return false;
+ }
+
+ //determine Cardinal Direction of rectangles
+ if (p1x > p2x) {
+ if (p1y > p2y) {
+ cardinalDirectionA = this.getCardinalDirection(slopeA, slopePrime, 4);
+ cardinalDirectionB = this.getCardinalDirection(slopeB, slopePrime, 2);
+ } else {
+ cardinalDirectionA = this.getCardinalDirection(-slopeA, slopePrime, 3);
+ cardinalDirectionB = this.getCardinalDirection(-slopeB, slopePrime, 1);
+ }
+ } else {
+ if (p1y > p2y) {
+ cardinalDirectionA = this.getCardinalDirection(-slopeA, slopePrime, 1);
+ cardinalDirectionB = this.getCardinalDirection(-slopeB, slopePrime, 3);
+ } else {
+ cardinalDirectionA = this.getCardinalDirection(slopeA, slopePrime, 2);
+ cardinalDirectionB = this.getCardinalDirection(slopeB, slopePrime, 4);
+ }
+ }
+ //calculate clipping Point if it is not found before
+ if (!clipPointAFound) {
+ switch (cardinalDirectionA) {
+ case 1:
+ tempPointAy = topLeftAy;
+ tempPointAx = p1x + -halfHeightA / slopePrime;
+ result[0] = tempPointAx;
+ result[1] = tempPointAy;
+ break;
+ case 2:
+ tempPointAx = bottomRightAx;
+ tempPointAy = p1y + halfWidthA * slopePrime;
+ result[0] = tempPointAx;
+ result[1] = tempPointAy;
+ break;
+ case 3:
+ tempPointAy = bottomLeftAy;
+ tempPointAx = p1x + halfHeightA / slopePrime;
+ result[0] = tempPointAx;
+ result[1] = tempPointAy;
+ break;
+ case 4:
+ tempPointAx = bottomLeftAx;
+ tempPointAy = p1y + -halfWidthA * slopePrime;
+ result[0] = tempPointAx;
+ result[1] = tempPointAy;
+ break;
+ }
+ }
+ if (!clipPointBFound) {
+ switch (cardinalDirectionB) {
+ case 1:
+ tempPointBy = topLeftBy;
+ tempPointBx = p2x + -halfHeightB / slopePrime;
+ result[2] = tempPointBx;
+ result[3] = tempPointBy;
+ break;
+ case 2:
+ tempPointBx = bottomRightBx;
+ tempPointBy = p2y + halfWidthB * slopePrime;
+ result[2] = tempPointBx;
+ result[3] = tempPointBy;
+ break;
+ case 3:
+ tempPointBy = bottomLeftBy;
+ tempPointBx = p2x + halfHeightB / slopePrime;
+ result[2] = tempPointBx;
+ result[3] = tempPointBy;
+ break;
+ case 4:
+ tempPointBx = bottomLeftBx;
+ tempPointBy = p2y + -halfWidthB * slopePrime;
+ result[2] = tempPointBx;
+ result[3] = tempPointBy;
+ break;
+ }
+ }
+ }
+ return false;
+};
+
+/**
+ * This method returns in which cardinal direction does input point stays
+ * 1: North
+ * 2: East
+ * 3: South
+ * 4: West
+ */
+IGeometry.getCardinalDirection = function (slope, slopePrime, line) {
+ if (slope > slopePrime) {
+ return line;
+ } else {
+ return 1 + line % 4;
+ }
+};
+
+/**
+ * This method calculates the intersection of the two lines defined by
+ * point pairs (s1,s2) and (f1,f2).
+ */
+IGeometry.getIntersection = function (s1, s2, f1, f2) {
+ if (f2 == null) {
+ return this.getIntersection2(s1, s2, f1);
+ }
+
+ var x1 = s1.x;
+ var y1 = s1.y;
+ var x2 = s2.x;
+ var y2 = s2.y;
+ var x3 = f1.x;
+ var y3 = f1.y;
+ var x4 = f2.x;
+ var y4 = f2.y;
+ var x = void 0,
+ y = void 0; // intersection point
+ var a1 = void 0,
+ a2 = void 0,
+ b1 = void 0,
+ b2 = void 0,
+ c1 = void 0,
+ c2 = void 0; // coefficients of line eqns.
+ var denom = void 0;
+
+ a1 = y2 - y1;
+ b1 = x1 - x2;
+ c1 = x2 * y1 - x1 * y2; // { a1*x + b1*y + c1 = 0 is line 1 }
+
+ a2 = y4 - y3;
+ b2 = x3 - x4;
+ c2 = x4 * y3 - x3 * y4; // { a2*x + b2*y + c2 = 0 is line 2 }
+
+ denom = a1 * b2 - a2 * b1;
+
+ if (denom === 0) {
+ return null;
+ }
+
+ x = (b1 * c2 - b2 * c1) / denom;
+ y = (a2 * c1 - a1 * c2) / denom;
+
+ return new Point(x, y);
+};
+
+/**
+ * This method finds and returns the angle of the vector from the + x-axis
+ * in clockwise direction (compatible w/ Java coordinate system!).
+ */
+IGeometry.angleOfVector = function (Cx, Cy, Nx, Ny) {
+ var C_angle = void 0;
+
+ if (Cx !== Nx) {
+ C_angle = Math.atan((Ny - Cy) / (Nx - Cx));
+
+ if (Nx < Cx) {
+ C_angle += Math.PI;
+ } else if (Ny < Cy) {
+ C_angle += this.TWO_PI;
+ }
+ } else if (Ny < Cy) {
+ C_angle = this.ONE_AND_HALF_PI; // 270 degrees
+ } else {
+ C_angle = this.HALF_PI; // 90 degrees
+ }
+
+ return C_angle;
+};
+
+/**
+ * This method checks whether the given two line segments (one with point
+ * p1 and p2, the other with point p3 and p4) intersect at a point other
+ * than these points.
+ */
+IGeometry.doIntersect = function (p1, p2, p3, p4) {
+ var a = p1.x;
+ var b = p1.y;
+ var c = p2.x;
+ var d = p2.y;
+ var p = p3.x;
+ var q = p3.y;
+ var r = p4.x;
+ var s = p4.y;
+ var det = (c - a) * (s - q) - (r - p) * (d - b);
+
+ if (det === 0) {
+ return false;
+ } else {
+ var lambda = ((s - q) * (r - a) + (p - r) * (s - b)) / det;
+ var gamma = ((b - d) * (r - a) + (c - a) * (s - b)) / det;
+ return 0 < lambda && lambda < 1 && 0 < gamma && gamma < 1;
+ }
+};
+
+/**
+ * This method checks and calculates the intersection of
+ * a line segment and a circle.
+ */
+IGeometry.findCircleLineIntersections = function (Ex, Ey, Lx, Ly, Cx, Cy, r) {
+
+ // E is the starting point of the ray,
+ // L is the end point of the ray,
+ // C is the center of sphere you're testing against
+ // r is the radius of that sphere
+
+ // Compute:
+ // d = L - E ( Direction vector of ray, from start to end )
+ // f = E - C ( Vector from center sphere to ray start )
+
+ // Then the intersection is found by..
+ // P = E + t * d
+ // This is a parametric equation:
+ // Px = Ex + tdx
+ // Py = Ey + tdy
+
+ // get a, b, c values
+ var a = (Lx - Ex) * (Lx - Ex) + (Ly - Ey) * (Ly - Ey);
+ var b = 2 * ((Ex - Cx) * (Lx - Ex) + (Ey - Cy) * (Ly - Ey));
+ var c = (Ex - Cx) * (Ex - Cx) + (Ey - Cy) * (Ey - Cy) - r * r;
+
+ // get discriminant
+ var disc = b * b - 4 * a * c;
+ if (disc >= 0) {
+ // insert into quadratic formula
+ var t1 = (-b + Math.sqrt(b * b - 4 * a * c)) / (2 * a);
+ var t2 = (-b - Math.sqrt(b * b - 4 * a * c)) / (2 * a);
+ var intersections = null;
+ if (t1 >= 0 && t1 <= 1) {
+ // t1 is the intersection, and it's closer than t2
+ // (since t1 uses -b - discriminant)
+ // Impale, Poke
+ return [t1];
+ }
+
+ // here t1 didn't intersect so we are either started
+ // inside the sphere or completely past it
+ if (t2 >= 0 && t2 <= 1) {
+ // ExitWound
+ return [t2];
+ }
+
+ return intersections;
+ } else return null;
+};
+
+// -----------------------------------------------------------------------------
+// Section: Class Constants
+// -----------------------------------------------------------------------------
+/**
+ * Some useful pre-calculated constants
+ */
+IGeometry.HALF_PI = 0.5 * Math.PI;
+IGeometry.ONE_AND_HALF_PI = 1.5 * Math.PI;
+IGeometry.TWO_PI = 2.0 * Math.PI;
+IGeometry.THREE_PI = 3.0 * Math.PI;
+
+module.exports = IGeometry;
+
+/***/ }),
+/* 9 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+function IMath() {}
+
+/**
+ * This method returns the sign of the input value.
+ */
+IMath.sign = function (value) {
+ if (value > 0) {
+ return 1;
+ } else if (value < 0) {
+ return -1;
+ } else {
+ return 0;
+ }
+};
+
+IMath.floor = function (value) {
+ return value < 0 ? Math.ceil(value) : Math.floor(value);
+};
+
+IMath.ceil = function (value) {
+ return value < 0 ? Math.floor(value) : Math.ceil(value);
+};
+
+module.exports = IMath;
+
+/***/ }),
+/* 10 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+function Integer() {}
+
+Integer.MAX_VALUE = 2147483647;
+Integer.MIN_VALUE = -2147483648;
+
+module.exports = Integer;
+
+/***/ }),
+/* 11 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+var nodeFrom = function nodeFrom(value) {
+ return { value: value, next: null, prev: null };
+};
+
+var add = function add(prev, node, next, list) {
+ if (prev !== null) {
+ prev.next = node;
+ } else {
+ list.head = node;
+ }
+
+ if (next !== null) {
+ next.prev = node;
+ } else {
+ list.tail = node;
+ }
+
+ node.prev = prev;
+ node.next = next;
+
+ list.length++;
+
+ return node;
+};
+
+var _remove = function _remove(node, list) {
+ var prev = node.prev,
+ next = node.next;
+
+
+ if (prev !== null) {
+ prev.next = next;
+ } else {
+ list.head = next;
+ }
+
+ if (next !== null) {
+ next.prev = prev;
+ } else {
+ list.tail = prev;
+ }
+
+ node.prev = node.next = null;
+
+ list.length--;
+
+ return node;
+};
+
+var LinkedList = function () {
+ function LinkedList(vals) {
+ var _this = this;
+
+ _classCallCheck(this, LinkedList);
+
+ this.length = 0;
+ this.head = null;
+ this.tail = null;
+
+ if (vals != null) {
+ vals.forEach(function (v) {
+ return _this.push(v);
+ });
+ }
+ }
+
+ _createClass(LinkedList, [{
+ key: "size",
+ value: function size() {
+ return this.length;
+ }
+ }, {
+ key: "insertBefore",
+ value: function insertBefore(val, otherNode) {
+ return add(otherNode.prev, nodeFrom(val), otherNode, this);
+ }
+ }, {
+ key: "insertAfter",
+ value: function insertAfter(val, otherNode) {
+ return add(otherNode, nodeFrom(val), otherNode.next, this);
+ }
+ }, {
+ key: "insertNodeBefore",
+ value: function insertNodeBefore(newNode, otherNode) {
+ return add(otherNode.prev, newNode, otherNode, this);
+ }
+ }, {
+ key: "insertNodeAfter",
+ value: function insertNodeAfter(newNode, otherNode) {
+ return add(otherNode, newNode, otherNode.next, this);
+ }
+ }, {
+ key: "push",
+ value: function push(val) {
+ return add(this.tail, nodeFrom(val), null, this);
+ }
+ }, {
+ key: "unshift",
+ value: function unshift(val) {
+ return add(null, nodeFrom(val), this.head, this);
+ }
+ }, {
+ key: "remove",
+ value: function remove(node) {
+ return _remove(node, this);
+ }
+ }, {
+ key: "pop",
+ value: function pop() {
+ return _remove(this.tail, this).value;
+ }
+ }, {
+ key: "popNode",
+ value: function popNode() {
+ return _remove(this.tail, this);
+ }
+ }, {
+ key: "shift",
+ value: function shift() {
+ return _remove(this.head, this).value;
+ }
+ }, {
+ key: "shiftNode",
+ value: function shiftNode() {
+ return _remove(this.head, this);
+ }
+ }, {
+ key: "get_object_at",
+ value: function get_object_at(index) {
+ if (index <= this.length()) {
+ var i = 1;
+ var current = this.head;
+ while (i < index) {
+ current = current.next;
+ i++;
+ }
+ return current.value;
+ }
+ }
+ }, {
+ key: "set_object_at",
+ value: function set_object_at(index, value) {
+ if (index <= this.length()) {
+ var i = 1;
+ var current = this.head;
+ while (i < index) {
+ current = current.next;
+ i++;
+ }
+ current.value = value;
+ }
+ }
+ }]);
+
+ return LinkedList;
+}();
+
+module.exports = LinkedList;
+
+/***/ }),
+/* 12 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+/*
+ *This class is the javascript implementation of the Point.java class in jdk
+ */
+function Point(x, y, p) {
+ this.x = null;
+ this.y = null;
+ if (x == null && y == null && p == null) {
+ this.x = 0;
+ this.y = 0;
+ } else if (typeof x == 'number' && typeof y == 'number' && p == null) {
+ this.x = x;
+ this.y = y;
+ } else if (x.constructor.name == 'Point' && y == null && p == null) {
+ p = x;
+ this.x = p.x;
+ this.y = p.y;
+ }
+}
+
+Point.prototype.getX = function () {
+ return this.x;
+};
+
+Point.prototype.getY = function () {
+ return this.y;
+};
+
+Point.prototype.getLocation = function () {
+ return new Point(this.x, this.y);
+};
+
+Point.prototype.setLocation = function (x, y, p) {
+ if (x.constructor.name == 'Point' && y == null && p == null) {
+ p = x;
+ this.setLocation(p.x, p.y);
+ } else if (typeof x == 'number' && typeof y == 'number' && p == null) {
+ //if both parameters are integer just move (x,y) location
+ if (parseInt(x) == x && parseInt(y) == y) {
+ this.move(x, y);
+ } else {
+ this.x = Math.floor(x + 0.5);
+ this.y = Math.floor(y + 0.5);
+ }
+ }
+};
+
+Point.prototype.move = function (x, y) {
+ this.x = x;
+ this.y = y;
+};
+
+Point.prototype.translate = function (dx, dy) {
+ this.x += dx;
+ this.y += dy;
+};
+
+Point.prototype.equals = function (obj) {
+ if (obj.constructor.name == "Point") {
+ var pt = obj;
+ return this.x == pt.x && this.y == pt.y;
+ }
+ return this == obj;
+};
+
+Point.prototype.toString = function () {
+ return new Point().constructor.name + "[x=" + this.x + ",y=" + this.y + "]";
+};
+
+module.exports = Point;
+
+/***/ }),
+/* 13 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+function RectangleD(x, y, width, height) {
+ this.x = 0;
+ this.y = 0;
+ this.width = 0;
+ this.height = 0;
+
+ if (x != null && y != null && width != null && height != null) {
+ this.x = x;
+ this.y = y;
+ this.width = width;
+ this.height = height;
+ }
+}
+
+RectangleD.prototype.getX = function () {
+ return this.x;
+};
+
+RectangleD.prototype.setX = function (x) {
+ this.x = x;
+};
+
+RectangleD.prototype.getY = function () {
+ return this.y;
+};
+
+RectangleD.prototype.setY = function (y) {
+ this.y = y;
+};
+
+RectangleD.prototype.getWidth = function () {
+ return this.width;
+};
+
+RectangleD.prototype.setWidth = function (width) {
+ this.width = width;
+};
+
+RectangleD.prototype.getHeight = function () {
+ return this.height;
+};
+
+RectangleD.prototype.setHeight = function (height) {
+ this.height = height;
+};
+
+RectangleD.prototype.getRight = function () {
+ return this.x + this.width;
+};
+
+RectangleD.prototype.getBottom = function () {
+ return this.y + this.height;
+};
+
+RectangleD.prototype.intersects = function (a) {
+ if (this.getRight() < a.x) {
+ return false;
+ }
+
+ if (this.getBottom() < a.y) {
+ return false;
+ }
+
+ if (a.getRight() < this.x) {
+ return false;
+ }
+
+ if (a.getBottom() < this.y) {
+ return false;
+ }
+
+ return true;
+};
+
+RectangleD.prototype.getCenterX = function () {
+ return this.x + this.width / 2;
+};
+
+RectangleD.prototype.getMinX = function () {
+ return this.getX();
+};
+
+RectangleD.prototype.getMaxX = function () {
+ return this.getX() + this.width;
+};
+
+RectangleD.prototype.getCenterY = function () {
+ return this.y + this.height / 2;
+};
+
+RectangleD.prototype.getMinY = function () {
+ return this.getY();
+};
+
+RectangleD.prototype.getMaxY = function () {
+ return this.getY() + this.height;
+};
+
+RectangleD.prototype.getWidthHalf = function () {
+ return this.width / 2;
+};
+
+RectangleD.prototype.getHeightHalf = function () {
+ return this.height / 2;
+};
+
+module.exports = RectangleD;
+
+/***/ }),
+/* 14 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+
+function UniqueIDGeneretor() {}
+
+UniqueIDGeneretor.lastID = 0;
+
+UniqueIDGeneretor.createID = function (obj) {
+ if (UniqueIDGeneretor.isPrimitive(obj)) {
+ return obj;
+ }
+ if (obj.uniqueID != null) {
+ return obj.uniqueID;
+ }
+ obj.uniqueID = UniqueIDGeneretor.getString();
+ UniqueIDGeneretor.lastID++;
+ return obj.uniqueID;
+};
+
+UniqueIDGeneretor.getString = function (id) {
+ if (id == null) id = UniqueIDGeneretor.lastID;
+ return "Object#" + id + "";
+};
+
+UniqueIDGeneretor.isPrimitive = function (arg) {
+ var type = typeof arg === "undefined" ? "undefined" : _typeof(arg);
+ return arg == null || type != "object" && type != "function";
+};
+
+module.exports = UniqueIDGeneretor;
+
+/***/ }),
+/* 15 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
+
+var LayoutConstants = __webpack_require__(0);
+var LGraphManager = __webpack_require__(7);
+var LNode = __webpack_require__(3);
+var LEdge = __webpack_require__(1);
+var LGraph = __webpack_require__(6);
+var PointD = __webpack_require__(5);
+var Transform = __webpack_require__(17);
+var Emitter = __webpack_require__(29);
+
+function Layout(isRemoteUse) {
+ Emitter.call(this);
+
+ //Layout Quality: 0:draft, 1:default, 2:proof
+ this.layoutQuality = LayoutConstants.QUALITY;
+ //Whether layout should create bendpoints as needed or not
+ this.createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED;
+ //Whether layout should be incremental or not
+ this.incremental = LayoutConstants.DEFAULT_INCREMENTAL;
+ //Whether we animate from before to after layout node positions
+ this.animationOnLayout = LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT;
+ //Whether we animate the layout process or not
+ this.animationDuringLayout = LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT;
+ //Number iterations that should be done between two successive animations
+ this.animationPeriod = LayoutConstants.DEFAULT_ANIMATION_PERIOD;
+ /**
+ * Whether or not leaf nodes (non-compound nodes) are of uniform sizes. When
+ * they are, both spring and repulsion forces between two leaf nodes can be
+ * calculated without the expensive clipping point calculations, resulting
+ * in major speed-up.
+ */
+ this.uniformLeafNodeSizes = LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES;
+ /**
+ * This is used for creation of bendpoints by using dummy nodes and edges.
+ * Maps an LEdge to its dummy bendpoint path.
+ */
+ this.edgeToDummyNodes = new Map();
+ this.graphManager = new LGraphManager(this);
+ this.isLayoutFinished = false;
+ this.isSubLayout = false;
+ this.isRemoteUse = false;
+
+ if (isRemoteUse != null) {
+ this.isRemoteUse = isRemoteUse;
+ }
+}
+
+Layout.RANDOM_SEED = 1;
+
+Layout.prototype = Object.create(Emitter.prototype);
+
+Layout.prototype.getGraphManager = function () {
+ return this.graphManager;
+};
+
+Layout.prototype.getAllNodes = function () {
+ return this.graphManager.getAllNodes();
+};
+
+Layout.prototype.getAllEdges = function () {
+ return this.graphManager.getAllEdges();
+};
+
+Layout.prototype.getAllNodesToApplyGravitation = function () {
+ return this.graphManager.getAllNodesToApplyGravitation();
+};
+
+Layout.prototype.newGraphManager = function () {
+ var gm = new LGraphManager(this);
+ this.graphManager = gm;
+ return gm;
+};
+
+Layout.prototype.newGraph = function (vGraph) {
+ return new LGraph(null, this.graphManager, vGraph);
+};
+
+Layout.prototype.newNode = function (vNode) {
+ return new LNode(this.graphManager, vNode);
+};
+
+Layout.prototype.newEdge = function (vEdge) {
+ return new LEdge(null, null, vEdge);
+};
+
+Layout.prototype.checkLayoutSuccess = function () {
+ return this.graphManager.getRoot() == null || this.graphManager.getRoot().getNodes().length == 0 || this.graphManager.includesInvalidEdge();
+};
+
+Layout.prototype.runLayout = function () {
+ this.isLayoutFinished = false;
+
+ if (this.tilingPreLayout) {
+ this.tilingPreLayout();
+ }
+
+ this.initParameters();
+ var isLayoutSuccessfull;
+
+ if (this.checkLayoutSuccess()) {
+ isLayoutSuccessfull = false;
+ } else {
+ isLayoutSuccessfull = this.layout();
+ }
+
+ if (LayoutConstants.ANIMATE === 'during') {
+ // If this is a 'during' layout animation. Layout is not finished yet.
+ // We need to perform these in index.js when layout is really finished.
+ return false;
+ }
+
+ if (isLayoutSuccessfull) {
+ if (!this.isSubLayout) {
+ this.doPostLayout();
+ }
+ }
+
+ if (this.tilingPostLayout) {
+ this.tilingPostLayout();
+ }
+
+ this.isLayoutFinished = true;
+
+ return isLayoutSuccessfull;
+};
+
+/**
+ * This method performs the operations required after layout.
+ */
+Layout.prototype.doPostLayout = function () {
+ //assert !isSubLayout : "Should not be called on sub-layout!";
+ // Propagate geometric changes to v-level objects
+ if (!this.incremental) {
+ this.transform();
+ }
+ this.update();
+};
+
+/**
+ * This method updates the geometry of the target graph according to
+ * calculated layout.
+ */
+Layout.prototype.update2 = function () {
+ // update bend points
+ if (this.createBendsAsNeeded) {
+ this.createBendpointsFromDummyNodes();
+
+ // reset all edges, since the topology has changed
+ this.graphManager.resetAllEdges();
+ }
+
+ // perform edge, node and root updates if layout is not called
+ // remotely
+ if (!this.isRemoteUse) {
+ // update all edges
+ var edge;
+ var allEdges = this.graphManager.getAllEdges();
+ for (var i = 0; i < allEdges.length; i++) {
+ edge = allEdges[i];
+ // this.update(edge);
+ }
+
+ // recursively update nodes
+ var node;
+ var nodes = this.graphManager.getRoot().getNodes();
+ for (var i = 0; i < nodes.length; i++) {
+ node = nodes[i];
+ // this.update(node);
+ }
+
+ // update root graph
+ this.update(this.graphManager.getRoot());
+ }
+};
+
+Layout.prototype.update = function (obj) {
+ if (obj == null) {
+ this.update2();
+ } else if (obj instanceof LNode) {
+ var node = obj;
+ if (node.getChild() != null) {
+ // since node is compound, recursively update child nodes
+ var nodes = node.getChild().getNodes();
+ for (var i = 0; i < nodes.length; i++) {
+ update(nodes[i]);
+ }
+ }
+
+ // if the l-level node is associated with a v-level graph object,
+ // then it is assumed that the v-level node implements the
+ // interface Updatable.
+ if (node.vGraphObject != null) {
+ // cast to Updatable without any type check
+ var vNode = node.vGraphObject;
+
+ // call the update method of the interface
+ vNode.update(node);
+ }
+ } else if (obj instanceof LEdge) {
+ var edge = obj;
+ // if the l-level edge is associated with a v-level graph object,
+ // then it is assumed that the v-level edge implements the
+ // interface Updatable.
+
+ if (edge.vGraphObject != null) {
+ // cast to Updatable without any type check
+ var vEdge = edge.vGraphObject;
+
+ // call the update method of the interface
+ vEdge.update(edge);
+ }
+ } else if (obj instanceof LGraph) {
+ var graph = obj;
+ // if the l-level graph is associated with a v-level graph object,
+ // then it is assumed that the v-level object implements the
+ // interface Updatable.
+
+ if (graph.vGraphObject != null) {
+ // cast to Updatable without any type check
+ var vGraph = graph.vGraphObject;
+
+ // call the update method of the interface
+ vGraph.update(graph);
+ }
+ }
+};
+
+/**
+ * This method is used to set all layout parameters to default values
+ * determined at compile time.
+ */
+Layout.prototype.initParameters = function () {
+ if (!this.isSubLayout) {
+ this.layoutQuality = LayoutConstants.QUALITY;
+ this.animationDuringLayout = LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT;
+ this.animationPeriod = LayoutConstants.DEFAULT_ANIMATION_PERIOD;
+ this.animationOnLayout = LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT;
+ this.incremental = LayoutConstants.DEFAULT_INCREMENTAL;
+ this.createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED;
+ this.uniformLeafNodeSizes = LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES;
+ }
+
+ if (this.animationDuringLayout) {
+ this.animationOnLayout = false;
+ }
+};
+
+Layout.prototype.transform = function (newLeftTop) {
+ if (newLeftTop == undefined) {
+ this.transform(new PointD(0, 0));
+ } else {
+ // create a transformation object (from Eclipse to layout). When an
+ // inverse transform is applied, we get upper-left coordinate of the
+ // drawing or the root graph at given input coordinate (some margins
+ // already included in calculation of left-top).
+
+ var trans = new Transform();
+ var leftTop = this.graphManager.getRoot().updateLeftTop();
+
+ if (leftTop != null) {
+ trans.setWorldOrgX(newLeftTop.x);
+ trans.setWorldOrgY(newLeftTop.y);
+
+ trans.setDeviceOrgX(leftTop.x);
+ trans.setDeviceOrgY(leftTop.y);
+
+ var nodes = this.getAllNodes();
+ var node;
+
+ for (var i = 0; i < nodes.length; i++) {
+ node = nodes[i];
+ node.transform(trans);
+ }
+ }
+ }
+};
+
+Layout.prototype.positionNodesRandomly = function (graph) {
+
+ if (graph == undefined) {
+ //assert !this.incremental;
+ this.positionNodesRandomly(this.getGraphManager().getRoot());
+ this.getGraphManager().getRoot().updateBounds(true);
+ } else {
+ var lNode;
+ var childGraph;
+
+ var nodes = graph.getNodes();
+ for (var i = 0; i < nodes.length; i++) {
+ lNode = nodes[i];
+ childGraph = lNode.getChild();
+
+ if (childGraph == null) {
+ lNode.scatter();
+ } else if (childGraph.getNodes().length == 0) {
+ lNode.scatter();
+ } else {
+ this.positionNodesRandomly(childGraph);
+ lNode.updateBounds();
+ }
+ }
+ }
+};
+
+/**
+ * This method returns a list of trees where each tree is represented as a
+ * list of l-nodes. The method returns a list of size 0 when:
+ * - The graph is not flat or
+ * - One of the component(s) of the graph is not a tree.
+ */
+Layout.prototype.getFlatForest = function () {
+ var flatForest = [];
+ var isForest = true;
+
+ // Quick reference for all nodes in the graph manager associated with
+ // this layout. The list should not be changed.
+ var allNodes = this.graphManager.getRoot().getNodes();
+
+ // First be sure that the graph is flat
+ var isFlat = true;
+
+ for (var i = 0; i < allNodes.length; i++) {
+ if (allNodes[i].getChild() != null) {
+ isFlat = false;
+ }
+ }
+
+ // Return empty forest if the graph is not flat.
+ if (!isFlat) {
+ return flatForest;
+ }
+
+ // Run BFS for each component of the graph.
+
+ var visited = new Set();
+ var toBeVisited = [];
+ var parents = new Map();
+ var unProcessedNodes = [];
+
+ unProcessedNodes = unProcessedNodes.concat(allNodes);
+
+ // Each iteration of this loop finds a component of the graph and
+ // decides whether it is a tree or not. If it is a tree, adds it to the
+ // forest and continued with the next component.
+
+ while (unProcessedNodes.length > 0 && isForest) {
+ toBeVisited.push(unProcessedNodes[0]);
+
+ // Start the BFS. Each iteration of this loop visits a node in a
+ // BFS manner.
+ while (toBeVisited.length > 0 && isForest) {
+ //pool operation
+ var currentNode = toBeVisited[0];
+ toBeVisited.splice(0, 1);
+ visited.add(currentNode);
+
+ // Traverse all neighbors of this node
+ var neighborEdges = currentNode.getEdges();
+
+ for (var i = 0; i < neighborEdges.length; i++) {
+ var currentNeighbor = neighborEdges[i].getOtherEnd(currentNode);
+
+ // If BFS is not growing from this neighbor.
+ if (parents.get(currentNode) != currentNeighbor) {
+ // We haven't previously visited this neighbor.
+ if (!visited.has(currentNeighbor)) {
+ toBeVisited.push(currentNeighbor);
+ parents.set(currentNeighbor, currentNode);
+ }
+ // Since we have previously visited this neighbor and
+ // this neighbor is not parent of currentNode, given
+ // graph contains a component that is not tree, hence
+ // it is not a forest.
+ else {
+ isForest = false;
+ break;
+ }
+ }
+ }
+ }
+
+ // The graph contains a component that is not a tree. Empty
+ // previously found trees. The method will end.
+ if (!isForest) {
+ flatForest = [];
+ }
+ // Save currently visited nodes as a tree in our forest. Reset
+ // visited and parents lists. Continue with the next component of
+ // the graph, if any.
+ else {
+ var temp = [].concat(_toConsumableArray(visited));
+ flatForest.push(temp);
+ //flatForest = flatForest.concat(temp);
+ //unProcessedNodes.removeAll(visited);
+ for (var i = 0; i < temp.length; i++) {
+ var value = temp[i];
+ var index = unProcessedNodes.indexOf(value);
+ if (index > -1) {
+ unProcessedNodes.splice(index, 1);
+ }
+ }
+ visited = new Set();
+ parents = new Map();
+ }
+ }
+
+ return flatForest;
+};
+
+/**
+ * This method creates dummy nodes (an l-level node with minimal dimensions)
+ * for the given edge (one per bendpoint). The existing l-level structure
+ * is updated accordingly.
+ */
+Layout.prototype.createDummyNodesForBendpoints = function (edge) {
+ var dummyNodes = [];
+ var prev = edge.source;
+
+ var graph = this.graphManager.calcLowestCommonAncestor(edge.source, edge.target);
+
+ for (var i = 0; i < edge.bendpoints.length; i++) {
+ // create new dummy node
+ var dummyNode = this.newNode(null);
+ dummyNode.setRect(new Point(0, 0), new Dimension(1, 1));
+
+ graph.add(dummyNode);
+
+ // create new dummy edge between prev and dummy node
+ var dummyEdge = this.newEdge(null);
+ this.graphManager.add(dummyEdge, prev, dummyNode);
+
+ dummyNodes.add(dummyNode);
+ prev = dummyNode;
+ }
+
+ var dummyEdge = this.newEdge(null);
+ this.graphManager.add(dummyEdge, prev, edge.target);
+
+ this.edgeToDummyNodes.set(edge, dummyNodes);
+
+ // remove real edge from graph manager if it is inter-graph
+ if (edge.isInterGraph()) {
+ this.graphManager.remove(edge);
+ }
+ // else, remove the edge from the current graph
+ else {
+ graph.remove(edge);
+ }
+
+ return dummyNodes;
+};
+
+/**
+ * This method creates bendpoints for edges from the dummy nodes
+ * at l-level.
+ */
+Layout.prototype.createBendpointsFromDummyNodes = function () {
+ var edges = [];
+ edges = edges.concat(this.graphManager.getAllEdges());
+ edges = [].concat(_toConsumableArray(this.edgeToDummyNodes.keys())).concat(edges);
+
+ for (var k = 0; k < edges.length; k++) {
+ var lEdge = edges[k];
+
+ if (lEdge.bendpoints.length > 0) {
+ var path = this.edgeToDummyNodes.get(lEdge);
+
+ for (var i = 0; i < path.length; i++) {
+ var dummyNode = path[i];
+ var p = new PointD(dummyNode.getCenterX(), dummyNode.getCenterY());
+
+ // update bendpoint's location according to dummy node
+ var ebp = lEdge.bendpoints.get(i);
+ ebp.x = p.x;
+ ebp.y = p.y;
+
+ // remove the dummy node, dummy edges incident with this
+ // dummy node is also removed (within the remove method)
+ dummyNode.getOwner().remove(dummyNode);
+ }
+
+ // add the real edge to graph
+ this.graphManager.add(lEdge, lEdge.source, lEdge.target);
+ }
+ }
+};
+
+Layout.transform = function (sliderValue, defaultValue, minDiv, maxMul) {
+ if (minDiv != undefined && maxMul != undefined) {
+ var value = defaultValue;
+
+ if (sliderValue <= 50) {
+ var minValue = defaultValue / minDiv;
+ value -= (defaultValue - minValue) / 50 * (50 - sliderValue);
+ } else {
+ var maxValue = defaultValue * maxMul;
+ value += (maxValue - defaultValue) / 50 * (sliderValue - 50);
+ }
+
+ return value;
+ } else {
+ var a, b;
+
+ if (sliderValue <= 50) {
+ a = 9.0 * defaultValue / 500.0;
+ b = defaultValue / 10.0;
+ } else {
+ a = 9.0 * defaultValue / 50.0;
+ b = -8 * defaultValue;
+ }
+
+ return a * sliderValue + b;
+ }
+};
+
+/**
+ * This method finds and returns the center of the given nodes, assuming
+ * that the given nodes form a tree in themselves.
+ */
+Layout.findCenterOfTree = function (nodes) {
+ var list = [];
+ list = list.concat(nodes);
+
+ var removedNodes = [];
+ var remainingDegrees = new Map();
+ var foundCenter = false;
+ var centerNode = null;
+
+ if (list.length == 1 || list.length == 2) {
+ foundCenter = true;
+ centerNode = list[0];
+ }
+
+ for (var i = 0; i < list.length; i++) {
+ var node = list[i];
+ var degree = node.getNeighborsList().size;
+ remainingDegrees.set(node, node.getNeighborsList().size);
+
+ if (degree == 1) {
+ removedNodes.push(node);
+ }
+ }
+
+ var tempList = [];
+ tempList = tempList.concat(removedNodes);
+
+ while (!foundCenter) {
+ var tempList2 = [];
+ tempList2 = tempList2.concat(tempList);
+ tempList = [];
+
+ for (var i = 0; i < list.length; i++) {
+ var node = list[i];
+
+ var index = list.indexOf(node);
+ if (index >= 0) {
+ list.splice(index, 1);
+ }
+
+ var neighbours = node.getNeighborsList();
+
+ neighbours.forEach(function (neighbour) {
+ if (removedNodes.indexOf(neighbour) < 0) {
+ var otherDegree = remainingDegrees.get(neighbour);
+ var newDegree = otherDegree - 1;
+
+ if (newDegree == 1) {
+ tempList.push(neighbour);
+ }
+
+ remainingDegrees.set(neighbour, newDegree);
+ }
+ });
+ }
+
+ removedNodes = removedNodes.concat(tempList);
+
+ if (list.length == 1 || list.length == 2) {
+ foundCenter = true;
+ centerNode = list[0];
+ }
+ }
+
+ return centerNode;
+};
+
+/**
+ * During the coarsening process, this layout may be referenced by two graph managers
+ * this setter function grants access to change the currently being used graph manager
+ */
+Layout.prototype.setGraphManager = function (gm) {
+ this.graphManager = gm;
+};
+
+module.exports = Layout;
+
+/***/ }),
+/* 16 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+function RandomSeed() {}
+// adapted from: https://stackoverflow.com/a/19303725
+RandomSeed.seed = 1;
+RandomSeed.x = 0;
+
+RandomSeed.nextDouble = function () {
+ RandomSeed.x = Math.sin(RandomSeed.seed++) * 10000;
+ return RandomSeed.x - Math.floor(RandomSeed.x);
+};
+
+module.exports = RandomSeed;
+
+/***/ }),
+/* 17 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var PointD = __webpack_require__(5);
+
+function Transform(x, y) {
+ this.lworldOrgX = 0.0;
+ this.lworldOrgY = 0.0;
+ this.ldeviceOrgX = 0.0;
+ this.ldeviceOrgY = 0.0;
+ this.lworldExtX = 1.0;
+ this.lworldExtY = 1.0;
+ this.ldeviceExtX = 1.0;
+ this.ldeviceExtY = 1.0;
+}
+
+Transform.prototype.getWorldOrgX = function () {
+ return this.lworldOrgX;
+};
+
+Transform.prototype.setWorldOrgX = function (wox) {
+ this.lworldOrgX = wox;
+};
+
+Transform.prototype.getWorldOrgY = function () {
+ return this.lworldOrgY;
+};
+
+Transform.prototype.setWorldOrgY = function (woy) {
+ this.lworldOrgY = woy;
+};
+
+Transform.prototype.getWorldExtX = function () {
+ return this.lworldExtX;
+};
+
+Transform.prototype.setWorldExtX = function (wex) {
+ this.lworldExtX = wex;
+};
+
+Transform.prototype.getWorldExtY = function () {
+ return this.lworldExtY;
+};
+
+Transform.prototype.setWorldExtY = function (wey) {
+ this.lworldExtY = wey;
+};
+
+/* Device related */
+
+Transform.prototype.getDeviceOrgX = function () {
+ return this.ldeviceOrgX;
+};
+
+Transform.prototype.setDeviceOrgX = function (dox) {
+ this.ldeviceOrgX = dox;
+};
+
+Transform.prototype.getDeviceOrgY = function () {
+ return this.ldeviceOrgY;
+};
+
+Transform.prototype.setDeviceOrgY = function (doy) {
+ this.ldeviceOrgY = doy;
+};
+
+Transform.prototype.getDeviceExtX = function () {
+ return this.ldeviceExtX;
+};
+
+Transform.prototype.setDeviceExtX = function (dex) {
+ this.ldeviceExtX = dex;
+};
+
+Transform.prototype.getDeviceExtY = function () {
+ return this.ldeviceExtY;
+};
+
+Transform.prototype.setDeviceExtY = function (dey) {
+ this.ldeviceExtY = dey;
+};
+
+Transform.prototype.transformX = function (x) {
+ var xDevice = 0.0;
+ var worldExtX = this.lworldExtX;
+ if (worldExtX != 0.0) {
+ xDevice = this.ldeviceOrgX + (x - this.lworldOrgX) * this.ldeviceExtX / worldExtX;
+ }
+
+ return xDevice;
+};
+
+Transform.prototype.transformY = function (y) {
+ var yDevice = 0.0;
+ var worldExtY = this.lworldExtY;
+ if (worldExtY != 0.0) {
+ yDevice = this.ldeviceOrgY + (y - this.lworldOrgY) * this.ldeviceExtY / worldExtY;
+ }
+
+ return yDevice;
+};
+
+Transform.prototype.inverseTransformX = function (x) {
+ var xWorld = 0.0;
+ var deviceExtX = this.ldeviceExtX;
+ if (deviceExtX != 0.0) {
+ xWorld = this.lworldOrgX + (x - this.ldeviceOrgX) * this.lworldExtX / deviceExtX;
+ }
+
+ return xWorld;
+};
+
+Transform.prototype.inverseTransformY = function (y) {
+ var yWorld = 0.0;
+ var deviceExtY = this.ldeviceExtY;
+ if (deviceExtY != 0.0) {
+ yWorld = this.lworldOrgY + (y - this.ldeviceOrgY) * this.lworldExtY / deviceExtY;
+ }
+ return yWorld;
+};
+
+Transform.prototype.inverseTransformPoint = function (inPoint) {
+ var outPoint = new PointD(this.inverseTransformX(inPoint.x), this.inverseTransformY(inPoint.y));
+ return outPoint;
+};
+
+module.exports = Transform;
+
+/***/ }),
+/* 18 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
+
+var Layout = __webpack_require__(15);
+var FDLayoutConstants = __webpack_require__(4);
+var LayoutConstants = __webpack_require__(0);
+var IGeometry = __webpack_require__(8);
+var IMath = __webpack_require__(9);
+
+function FDLayout() {
+ Layout.call(this);
+
+ this.useSmartIdealEdgeLengthCalculation = FDLayoutConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION;
+ this.gravityConstant = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH;
+ this.compoundGravityConstant = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH;
+ this.gravityRangeFactor = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR;
+ this.compoundGravityRangeFactor = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR;
+ this.displacementThresholdPerNode = 3.0 * FDLayoutConstants.DEFAULT_EDGE_LENGTH / 100;
+ this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL;
+ this.initialCoolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL;
+ this.totalDisplacement = 0.0;
+ this.oldTotalDisplacement = 0.0;
+ this.maxIterations = FDLayoutConstants.MAX_ITERATIONS;
+}
+
+FDLayout.prototype = Object.create(Layout.prototype);
+
+for (var prop in Layout) {
+ FDLayout[prop] = Layout[prop];
+}
+
+FDLayout.prototype.initParameters = function () {
+ Layout.prototype.initParameters.call(this, arguments);
+
+ this.totalIterations = 0;
+ this.notAnimatedIterations = 0;
+
+ this.useFRGridVariant = FDLayoutConstants.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION;
+
+ this.grid = [];
+};
+
+FDLayout.prototype.calcIdealEdgeLengths = function () {
+ var edge;
+ var originalIdealLength;
+ var lcaDepth;
+ var source;
+ var target;
+ var sizeOfSourceInLca;
+ var sizeOfTargetInLca;
+
+ var allEdges = this.getGraphManager().getAllEdges();
+ for (var i = 0; i < allEdges.length; i++) {
+ edge = allEdges[i];
+
+ originalIdealLength = edge.idealLength;
+
+ if (edge.isInterGraph) {
+ source = edge.getSource();
+ target = edge.getTarget();
+
+ sizeOfSourceInLca = edge.getSourceInLca().getEstimatedSize();
+ sizeOfTargetInLca = edge.getTargetInLca().getEstimatedSize();
+
+ if (this.useSmartIdealEdgeLengthCalculation) {
+ edge.idealLength += sizeOfSourceInLca + sizeOfTargetInLca - 2 * LayoutConstants.SIMPLE_NODE_SIZE;
+ }
+
+ lcaDepth = edge.getLca().getInclusionTreeDepth();
+
+ edge.idealLength += originalIdealLength * FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR * (source.getInclusionTreeDepth() + target.getInclusionTreeDepth() - 2 * lcaDepth);
+ }
+ }
+};
+
+FDLayout.prototype.initSpringEmbedder = function () {
+
+ var s = this.getAllNodes().length;
+ if (this.incremental) {
+ if (s > FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) {
+ this.coolingFactor = Math.max(this.coolingFactor * FDLayoutConstants.COOLING_ADAPTATION_FACTOR, this.coolingFactor - (s - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) / (FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) * this.coolingFactor * (1 - FDLayoutConstants.COOLING_ADAPTATION_FACTOR));
+ }
+ this.maxNodeDisplacement = FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL;
+ } else {
+ if (s > FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) {
+ this.coolingFactor = Math.max(FDLayoutConstants.COOLING_ADAPTATION_FACTOR, 1.0 - (s - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) / (FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) * (1 - FDLayoutConstants.COOLING_ADAPTATION_FACTOR));
+ } else {
+ this.coolingFactor = 1.0;
+ }
+ this.initialCoolingFactor = this.coolingFactor;
+ this.maxNodeDisplacement = FDLayoutConstants.MAX_NODE_DISPLACEMENT;
+ }
+
+ this.maxIterations = Math.max(this.getAllNodes().length * 5, this.maxIterations);
+
+ // Reassign this attribute by using new constant value
+ this.displacementThresholdPerNode = 3.0 * FDLayoutConstants.DEFAULT_EDGE_LENGTH / 100;
+ this.totalDisplacementThreshold = this.displacementThresholdPerNode * this.getAllNodes().length;
+
+ this.repulsionRange = this.calcRepulsionRange();
+};
+
+FDLayout.prototype.calcSpringForces = function () {
+ var lEdges = this.getAllEdges();
+ var edge;
+
+ for (var i = 0; i < lEdges.length; i++) {
+ edge = lEdges[i];
+
+ this.calcSpringForce(edge, edge.idealLength);
+ }
+};
+
+FDLayout.prototype.calcRepulsionForces = function () {
+ var gridUpdateAllowed = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
+ var forceToNodeSurroundingUpdate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
+
+ var i, j;
+ var nodeA, nodeB;
+ var lNodes = this.getAllNodes();
+ var processedNodeSet;
+
+ if (this.useFRGridVariant) {
+ if (this.totalIterations % FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD == 1 && gridUpdateAllowed) {
+ this.updateGrid();
+ }
+
+ processedNodeSet = new Set();
+
+ // calculate repulsion forces between each nodes and its surrounding
+ for (i = 0; i < lNodes.length; i++) {
+ nodeA = lNodes[i];
+ this.calculateRepulsionForceOfANode(nodeA, processedNodeSet, gridUpdateAllowed, forceToNodeSurroundingUpdate);
+ processedNodeSet.add(nodeA);
+ }
+ } else {
+ for (i = 0; i < lNodes.length; i++) {
+ nodeA = lNodes[i];
+
+ for (j = i + 1; j < lNodes.length; j++) {
+ nodeB = lNodes[j];
+
+ // If both nodes are not members of the same graph, skip.
+ if (nodeA.getOwner() != nodeB.getOwner()) {
+ continue;
+ }
+
+ this.calcRepulsionForce(nodeA, nodeB);
+ }
+ }
+ }
+};
+
+FDLayout.prototype.calcGravitationalForces = function () {
+ var node;
+ var lNodes = this.getAllNodesToApplyGravitation();
+
+ for (var i = 0; i < lNodes.length; i++) {
+ node = lNodes[i];
+ this.calcGravitationalForce(node);
+ }
+};
+
+FDLayout.prototype.moveNodes = function () {
+ var lNodes = this.getAllNodes();
+ var node;
+
+ for (var i = 0; i < lNodes.length; i++) {
+ node = lNodes[i];
+ node.move();
+ }
+};
+
+FDLayout.prototype.calcSpringForce = function (edge, idealLength) {
+ var sourceNode = edge.getSource();
+ var targetNode = edge.getTarget();
+
+ var length;
+ var springForce;
+ var springForceX;
+ var springForceY;
+
+ // Update edge length
+ if (this.uniformLeafNodeSizes && sourceNode.getChild() == null && targetNode.getChild() == null) {
+ edge.updateLengthSimple();
+ } else {
+ edge.updateLength();
+
+ if (edge.isOverlapingSourceAndTarget) {
+ return;
+ }
+ }
+
+ length = edge.getLength();
+
+ if (length == 0) return;
+
+ // Calculate spring forces
+ springForce = edge.edgeElasticity * (length - idealLength);
+
+ // Project force onto x and y axes
+ springForceX = springForce * (edge.lengthX / length);
+ springForceY = springForce * (edge.lengthY / length);
+
+ // Apply forces on the end nodes
+ sourceNode.springForceX += springForceX;
+ sourceNode.springForceY += springForceY;
+ targetNode.springForceX -= springForceX;
+ targetNode.springForceY -= springForceY;
+};
+
+FDLayout.prototype.calcRepulsionForce = function (nodeA, nodeB) {
+ var rectA = nodeA.getRect();
+ var rectB = nodeB.getRect();
+ var overlapAmount = new Array(2);
+ var clipPoints = new Array(4);
+ var distanceX;
+ var distanceY;
+ var distanceSquared;
+ var distance;
+ var repulsionForce;
+ var repulsionForceX;
+ var repulsionForceY;
+
+ if (rectA.intersects(rectB)) // two nodes overlap
+ {
+ // calculate separation amount in x and y directions
+ IGeometry.calcSeparationAmount(rectA, rectB, overlapAmount, FDLayoutConstants.DEFAULT_EDGE_LENGTH / 2.0);
+
+ repulsionForceX = 2 * overlapAmount[0];
+ repulsionForceY = 2 * overlapAmount[1];
+
+ var childrenConstant = nodeA.noOfChildren * nodeB.noOfChildren / (nodeA.noOfChildren + nodeB.noOfChildren);
+
+ // Apply forces on the two nodes
+ nodeA.repulsionForceX -= childrenConstant * repulsionForceX;
+ nodeA.repulsionForceY -= childrenConstant * repulsionForceY;
+ nodeB.repulsionForceX += childrenConstant * repulsionForceX;
+ nodeB.repulsionForceY += childrenConstant * repulsionForceY;
+ } else // no overlap
+ {
+ // calculate distance
+
+ if (this.uniformLeafNodeSizes && nodeA.getChild() == null && nodeB.getChild() == null) // simply base repulsion on distance of node centers
+ {
+ distanceX = rectB.getCenterX() - rectA.getCenterX();
+ distanceY = rectB.getCenterY() - rectA.getCenterY();
+ } else // use clipping points
+ {
+ IGeometry.getIntersection(rectA, rectB, clipPoints);
+
+ distanceX = clipPoints[2] - clipPoints[0];
+ distanceY = clipPoints[3] - clipPoints[1];
+ }
+
+ // No repulsion range. FR grid variant should take care of this.
+ if (Math.abs(distanceX) < FDLayoutConstants.MIN_REPULSION_DIST) {
+ distanceX = IMath.sign(distanceX) * FDLayoutConstants.MIN_REPULSION_DIST;
+ }
+
+ if (Math.abs(distanceY) < FDLayoutConstants.MIN_REPULSION_DIST) {
+ distanceY = IMath.sign(distanceY) * FDLayoutConstants.MIN_REPULSION_DIST;
+ }
+
+ distanceSquared = distanceX * distanceX + distanceY * distanceY;
+ distance = Math.sqrt(distanceSquared);
+
+ // Here we use half of the nodes' repulsion values for backward compatibility
+ repulsionForce = (nodeA.nodeRepulsion / 2 + nodeB.nodeRepulsion / 2) * nodeA.noOfChildren * nodeB.noOfChildren / distanceSquared;
+
+ // Project force onto x and y axes
+ repulsionForceX = repulsionForce * distanceX / distance;
+ repulsionForceY = repulsionForce * distanceY / distance;
+
+ // Apply forces on the two nodes
+ nodeA.repulsionForceX -= repulsionForceX;
+ nodeA.repulsionForceY -= repulsionForceY;
+ nodeB.repulsionForceX += repulsionForceX;
+ nodeB.repulsionForceY += repulsionForceY;
+ }
+};
+
+FDLayout.prototype.calcGravitationalForce = function (node) {
+ var ownerGraph;
+ var ownerCenterX;
+ var ownerCenterY;
+ var distanceX;
+ var distanceY;
+ var absDistanceX;
+ var absDistanceY;
+ var estimatedSize;
+ ownerGraph = node.getOwner();
+
+ ownerCenterX = (ownerGraph.getRight() + ownerGraph.getLeft()) / 2;
+ ownerCenterY = (ownerGraph.getTop() + ownerGraph.getBottom()) / 2;
+ distanceX = node.getCenterX() - ownerCenterX;
+ distanceY = node.getCenterY() - ownerCenterY;
+ absDistanceX = Math.abs(distanceX) + node.getWidth() / 2;
+ absDistanceY = Math.abs(distanceY) + node.getHeight() / 2;
+
+ if (node.getOwner() == this.graphManager.getRoot()) // in the root graph
+ {
+ estimatedSize = ownerGraph.getEstimatedSize() * this.gravityRangeFactor;
+
+ if (absDistanceX > estimatedSize || absDistanceY > estimatedSize) {
+ node.gravitationForceX = -this.gravityConstant * distanceX;
+ node.gravitationForceY = -this.gravityConstant * distanceY;
+ }
+ } else // inside a compound
+ {
+ estimatedSize = ownerGraph.getEstimatedSize() * this.compoundGravityRangeFactor;
+
+ if (absDistanceX > estimatedSize || absDistanceY > estimatedSize) {
+ node.gravitationForceX = -this.gravityConstant * distanceX * this.compoundGravityConstant;
+ node.gravitationForceY = -this.gravityConstant * distanceY * this.compoundGravityConstant;
+ }
+ }
+};
+
+FDLayout.prototype.isConverged = function () {
+ var converged;
+ var oscilating = false;
+
+ if (this.totalIterations > this.maxIterations / 3) {
+ oscilating = Math.abs(this.totalDisplacement - this.oldTotalDisplacement) < 2;
+ }
+
+ converged = this.totalDisplacement < this.totalDisplacementThreshold;
+
+ this.oldTotalDisplacement = this.totalDisplacement;
+
+ return converged || oscilating;
+};
+
+FDLayout.prototype.animate = function () {
+ if (this.animationDuringLayout && !this.isSubLayout) {
+ if (this.notAnimatedIterations == this.animationPeriod) {
+ this.update();
+ this.notAnimatedIterations = 0;
+ } else {
+ this.notAnimatedIterations++;
+ }
+ }
+};
+
+//This method calculates the number of children (weight) for all nodes
+FDLayout.prototype.calcNoOfChildrenForAllNodes = function () {
+ var node;
+ var allNodes = this.graphManager.getAllNodes();
+
+ for (var i = 0; i < allNodes.length; i++) {
+ node = allNodes[i];
+ node.noOfChildren = node.getNoOfChildren();
+ }
+};
+
+// -----------------------------------------------------------------------------
+// Section: FR-Grid Variant Repulsion Force Calculation
+// -----------------------------------------------------------------------------
+
+FDLayout.prototype.calcGrid = function (graph) {
+
+ var sizeX = 0;
+ var sizeY = 0;
+
+ sizeX = parseInt(Math.ceil((graph.getRight() - graph.getLeft()) / this.repulsionRange));
+ sizeY = parseInt(Math.ceil((graph.getBottom() - graph.getTop()) / this.repulsionRange));
+
+ var grid = new Array(sizeX);
+
+ for (var i = 0; i < sizeX; i++) {
+ grid[i] = new Array(sizeY);
+ }
+
+ for (var i = 0; i < sizeX; i++) {
+ for (var j = 0; j < sizeY; j++) {
+ grid[i][j] = new Array();
+ }
+ }
+
+ return grid;
+};
+
+FDLayout.prototype.addNodeToGrid = function (v, left, top) {
+
+ var startX = 0;
+ var finishX = 0;
+ var startY = 0;
+ var finishY = 0;
+
+ startX = parseInt(Math.floor((v.getRect().x - left) / this.repulsionRange));
+ finishX = parseInt(Math.floor((v.getRect().width + v.getRect().x - left) / this.repulsionRange));
+ startY = parseInt(Math.floor((v.getRect().y - top) / this.repulsionRange));
+ finishY = parseInt(Math.floor((v.getRect().height + v.getRect().y - top) / this.repulsionRange));
+
+ for (var i = startX; i <= finishX; i++) {
+ for (var j = startY; j <= finishY; j++) {
+ this.grid[i][j].push(v);
+ v.setGridCoordinates(startX, finishX, startY, finishY);
+ }
+ }
+};
+
+FDLayout.prototype.updateGrid = function () {
+ var i;
+ var nodeA;
+ var lNodes = this.getAllNodes();
+
+ this.grid = this.calcGrid(this.graphManager.getRoot());
+
+ // put all nodes to proper grid cells
+ for (i = 0; i < lNodes.length; i++) {
+ nodeA = lNodes[i];
+ this.addNodeToGrid(nodeA, this.graphManager.getRoot().getLeft(), this.graphManager.getRoot().getTop());
+ }
+};
+
+FDLayout.prototype.calculateRepulsionForceOfANode = function (nodeA, processedNodeSet, gridUpdateAllowed, forceToNodeSurroundingUpdate) {
+
+ if (this.totalIterations % FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD == 1 && gridUpdateAllowed || forceToNodeSurroundingUpdate) {
+ var surrounding = new Set();
+ nodeA.surrounding = new Array();
+ var nodeB;
+ var grid = this.grid;
+
+ for (var i = nodeA.startX - 1; i < nodeA.finishX + 2; i++) {
+ for (var j = nodeA.startY - 1; j < nodeA.finishY + 2; j++) {
+ if (!(i < 0 || j < 0 || i >= grid.length || j >= grid[0].length)) {
+ for (var k = 0; k < grid[i][j].length; k++) {
+ nodeB = grid[i][j][k];
+
+ // If both nodes are not members of the same graph,
+ // or both nodes are the same, skip.
+ if (nodeA.getOwner() != nodeB.getOwner() || nodeA == nodeB) {
+ continue;
+ }
+
+ // check if the repulsion force between
+ // nodeA and nodeB has already been calculated
+ if (!processedNodeSet.has(nodeB) && !surrounding.has(nodeB)) {
+ var distanceX = Math.abs(nodeA.getCenterX() - nodeB.getCenterX()) - (nodeA.getWidth() / 2 + nodeB.getWidth() / 2);
+ var distanceY = Math.abs(nodeA.getCenterY() - nodeB.getCenterY()) - (nodeA.getHeight() / 2 + nodeB.getHeight() / 2);
+
+ // if the distance between nodeA and nodeB
+ // is less then calculation range
+ if (distanceX <= this.repulsionRange && distanceY <= this.repulsionRange) {
+ //then add nodeB to surrounding of nodeA
+ surrounding.add(nodeB);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ nodeA.surrounding = [].concat(_toConsumableArray(surrounding));
+ }
+ for (i = 0; i < nodeA.surrounding.length; i++) {
+ this.calcRepulsionForce(nodeA, nodeA.surrounding[i]);
+ }
+};
+
+FDLayout.prototype.calcRepulsionRange = function () {
+ return 0.0;
+};
+
+module.exports = FDLayout;
+
+/***/ }),
+/* 19 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var LEdge = __webpack_require__(1);
+var FDLayoutConstants = __webpack_require__(4);
+
+function FDLayoutEdge(source, target, vEdge) {
+ LEdge.call(this, source, target, vEdge);
+
+ // Ideal length and elasticity value for this edge
+ this.idealLength = FDLayoutConstants.DEFAULT_EDGE_LENGTH;
+ this.edgeElasticity = FDLayoutConstants.DEFAULT_SPRING_STRENGTH;
+}
+
+FDLayoutEdge.prototype = Object.create(LEdge.prototype);
+
+for (var prop in LEdge) {
+ FDLayoutEdge[prop] = LEdge[prop];
+}
+
+module.exports = FDLayoutEdge;
+
+/***/ }),
+/* 20 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var LNode = __webpack_require__(3);
+var FDLayoutConstants = __webpack_require__(4);
+
+function FDLayoutNode(gm, loc, size, vNode) {
+ // alternative constructor is handled inside LNode
+ LNode.call(this, gm, loc, size, vNode);
+
+ // Repulsion value of this node
+ this.nodeRepulsion = FDLayoutConstants.DEFAULT_REPULSION_STRENGTH;
+
+ //Spring, repulsion and gravitational forces acting on this node
+ this.springForceX = 0;
+ this.springForceY = 0;
+ this.repulsionForceX = 0;
+ this.repulsionForceY = 0;
+ this.gravitationForceX = 0;
+ this.gravitationForceY = 0;
+ //Amount by which this node is to be moved in this iteration
+ this.displacementX = 0;
+ this.displacementY = 0;
+
+ //Start and finish grid coordinates that this node is fallen into
+ this.startX = 0;
+ this.finishX = 0;
+ this.startY = 0;
+ this.finishY = 0;
+
+ //Geometric neighbors of this node
+ this.surrounding = [];
+}
+
+FDLayoutNode.prototype = Object.create(LNode.prototype);
+
+for (var prop in LNode) {
+ FDLayoutNode[prop] = LNode[prop];
+}
+
+FDLayoutNode.prototype.setGridCoordinates = function (_startX, _finishX, _startY, _finishY) {
+ this.startX = _startX;
+ this.finishX = _finishX;
+ this.startY = _startY;
+ this.finishY = _finishY;
+};
+
+module.exports = FDLayoutNode;
+
+/***/ }),
+/* 21 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+function DimensionD(width, height) {
+ this.width = 0;
+ this.height = 0;
+ if (width !== null && height !== null) {
+ this.height = height;
+ this.width = width;
+ }
+}
+
+DimensionD.prototype.getWidth = function () {
+ return this.width;
+};
+
+DimensionD.prototype.setWidth = function (width) {
+ this.width = width;
+};
+
+DimensionD.prototype.getHeight = function () {
+ return this.height;
+};
+
+DimensionD.prototype.setHeight = function (height) {
+ this.height = height;
+};
+
+module.exports = DimensionD;
+
+/***/ }),
+/* 22 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var UniqueIDGeneretor = __webpack_require__(14);
+
+function HashMap() {
+ this.map = {};
+ this.keys = [];
+}
+
+HashMap.prototype.put = function (key, value) {
+ var theId = UniqueIDGeneretor.createID(key);
+ if (!this.contains(theId)) {
+ this.map[theId] = value;
+ this.keys.push(key);
+ }
+};
+
+HashMap.prototype.contains = function (key) {
+ var theId = UniqueIDGeneretor.createID(key);
+ return this.map[key] != null;
+};
+
+HashMap.prototype.get = function (key) {
+ var theId = UniqueIDGeneretor.createID(key);
+ return this.map[theId];
+};
+
+HashMap.prototype.keySet = function () {
+ return this.keys;
+};
+
+module.exports = HashMap;
+
+/***/ }),
+/* 23 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var UniqueIDGeneretor = __webpack_require__(14);
+
+function HashSet() {
+ this.set = {};
+}
+;
+
+HashSet.prototype.add = function (obj) {
+ var theId = UniqueIDGeneretor.createID(obj);
+ if (!this.contains(theId)) this.set[theId] = obj;
+};
+
+HashSet.prototype.remove = function (obj) {
+ delete this.set[UniqueIDGeneretor.createID(obj)];
+};
+
+HashSet.prototype.clear = function () {
+ this.set = {};
+};
+
+HashSet.prototype.contains = function (obj) {
+ return this.set[UniqueIDGeneretor.createID(obj)] == obj;
+};
+
+HashSet.prototype.isEmpty = function () {
+ return this.size() === 0;
+};
+
+HashSet.prototype.size = function () {
+ return Object.keys(this.set).length;
+};
+
+//concats this.set to the given list
+HashSet.prototype.addAllTo = function (list) {
+ var keys = Object.keys(this.set);
+ var length = keys.length;
+ for (var i = 0; i < length; i++) {
+ list.push(this.set[keys[i]]);
+ }
+};
+
+HashSet.prototype.size = function () {
+ return Object.keys(this.set).length;
+};
+
+HashSet.prototype.addAll = function (list) {
+ var s = list.length;
+ for (var i = 0; i < s; i++) {
+ var v = list[i];
+ this.add(v);
+ }
+};
+
+module.exports = HashSet;
+
+/***/ }),
+/* 24 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+// Some matrix (1d and 2d array) operations
+function Matrix() {}
+
+/**
+ * matrix multiplication
+ * array1, array2 and result are 2d arrays
+ */
+Matrix.multMat = function (array1, array2) {
+ var result = [];
+
+ for (var i = 0; i < array1.length; i++) {
+ result[i] = [];
+ for (var j = 0; j < array2[0].length; j++) {
+ result[i][j] = 0;
+ for (var k = 0; k < array1[0].length; k++) {
+ result[i][j] += array1[i][k] * array2[k][j];
+ }
+ }
+ }
+ return result;
+};
+
+/**
+ * matrix transpose
+ * array and result are 2d arrays
+ */
+Matrix.transpose = function (array) {
+ var result = [];
+
+ for (var i = 0; i < array[0].length; i++) {
+ result[i] = [];
+ for (var j = 0; j < array.length; j++) {
+ result[i][j] = array[j][i];
+ }
+ }
+
+ return result;
+};
+
+/**
+ * multiply array with constant
+ * array and result are 1d arrays
+ */
+Matrix.multCons = function (array, constant) {
+ var result = [];
+
+ for (var i = 0; i < array.length; i++) {
+ result[i] = array[i] * constant;
+ }
+
+ return result;
+};
+
+/**
+ * substract two arrays
+ * array1, array2 and result are 1d arrays
+ */
+Matrix.minusOp = function (array1, array2) {
+ var result = [];
+
+ for (var i = 0; i < array1.length; i++) {
+ result[i] = array1[i] - array2[i];
+ }
+
+ return result;
+};
+
+/**
+ * dot product of two arrays with same size
+ * array1 and array2 are 1d arrays
+ */
+Matrix.dotProduct = function (array1, array2) {
+ var product = 0;
+
+ for (var i = 0; i < array1.length; i++) {
+ product += array1[i] * array2[i];
+ }
+
+ return product;
+};
+
+/**
+ * magnitude of an array
+ * array is 1d array
+ */
+Matrix.mag = function (array) {
+ return Math.sqrt(this.dotProduct(array, array));
+};
+
+/**
+ * normalization of an array
+ * array and result are 1d array
+ */
+Matrix.normalize = function (array) {
+ var result = [];
+ var magnitude = this.mag(array);
+
+ for (var i = 0; i < array.length; i++) {
+ result[i] = array[i] / magnitude;
+ }
+
+ return result;
+};
+
+/**
+ * multiply an array with centering matrix
+ * array and result are 1d array
+ */
+Matrix.multGamma = function (array) {
+ var result = [];
+ var sum = 0;
+
+ for (var i = 0; i < array.length; i++) {
+ sum += array[i];
+ }
+
+ sum *= -1 / array.length;
+
+ for (var _i = 0; _i < array.length; _i++) {
+ result[_i] = sum + array[_i];
+ }
+ return result;
+};
+
+/**
+ * a special matrix multiplication
+ * result = 0.5 * C * INV * C^T * array
+ * array and result are 1d, C and INV are 2d arrays
+ */
+Matrix.multL = function (array, C, INV) {
+ var result = [];
+ var temp1 = [];
+ var temp2 = [];
+
+ // multiply by C^T
+ for (var i = 0; i < C[0].length; i++) {
+ var sum = 0;
+ for (var j = 0; j < C.length; j++) {
+ sum += -0.5 * C[j][i] * array[j];
+ }
+ temp1[i] = sum;
+ }
+ // multiply the result by INV
+ for (var _i2 = 0; _i2 < INV.length; _i2++) {
+ var _sum = 0;
+ for (var _j = 0; _j < INV.length; _j++) {
+ _sum += INV[_i2][_j] * temp1[_j];
+ }
+ temp2[_i2] = _sum;
+ }
+ // multiply the result by C
+ for (var _i3 = 0; _i3 < C.length; _i3++) {
+ var _sum2 = 0;
+ for (var _j2 = 0; _j2 < C[0].length; _j2++) {
+ _sum2 += C[_i3][_j2] * temp2[_j2];
+ }
+ result[_i3] = _sum2;
+ }
+
+ return result;
+};
+
+module.exports = Matrix;
+
+/***/ }),
+/* 25 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+/**
+ * A classic Quicksort algorithm with Hoare's partition
+ * - Works also on LinkedList objects
+ *
+ * Copyright: i-Vis Research Group, Bilkent University, 2007 - present
+ */
+
+var LinkedList = __webpack_require__(11);
+
+var Quicksort = function () {
+ function Quicksort(A, compareFunction) {
+ _classCallCheck(this, Quicksort);
+
+ if (compareFunction !== null || compareFunction !== undefined) this.compareFunction = this._defaultCompareFunction;
+
+ var length = void 0;
+ if (A instanceof LinkedList) length = A.size();else length = A.length;
+
+ this._quicksort(A, 0, length - 1);
+ }
+
+ _createClass(Quicksort, [{
+ key: '_quicksort',
+ value: function _quicksort(A, p, r) {
+ if (p < r) {
+ var q = this._partition(A, p, r);
+ this._quicksort(A, p, q);
+ this._quicksort(A, q + 1, r);
+ }
+ }
+ }, {
+ key: '_partition',
+ value: function _partition(A, p, r) {
+ var x = this._get(A, p);
+ var i = p;
+ var j = r;
+ while (true) {
+ while (this.compareFunction(x, this._get(A, j))) {
+ j--;
+ }while (this.compareFunction(this._get(A, i), x)) {
+ i++;
+ }if (i < j) {
+ this._swap(A, i, j);
+ i++;
+ j--;
+ } else return j;
+ }
+ }
+ }, {
+ key: '_get',
+ value: function _get(object, index) {
+ if (object instanceof LinkedList) return object.get_object_at(index);else return object[index];
+ }
+ }, {
+ key: '_set',
+ value: function _set(object, index, value) {
+ if (object instanceof LinkedList) object.set_object_at(index, value);else object[index] = value;
+ }
+ }, {
+ key: '_swap',
+ value: function _swap(A, i, j) {
+ var temp = this._get(A, i);
+ this._set(A, i, this._get(A, j));
+ this._set(A, j, temp);
+ }
+ }, {
+ key: '_defaultCompareFunction',
+ value: function _defaultCompareFunction(a, b) {
+ return b > a;
+ }
+ }]);
+
+ return Quicksort;
+}();
+
+module.exports = Quicksort;
+
+/***/ }),
+/* 26 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+// Singular Value Decomposition implementation
+function SVD() {};
+
+/* Below singular value decomposition (svd) code including hypot function is adopted from https://github.com/dragonfly-ai/JamaJS
+ Some changes are applied to make the code compatible with the fcose code and to make it independent from Jama.
+ Input matrix is changed to a 2D array instead of Jama matrix. Matrix dimensions are taken according to 2D array instead of using Jama functions.
+ An object that includes singular value components is created for return.
+ The types of input parameters of the hypot function are removed.
+ let is used instead of var for the variable initialization.
+*/
+/*
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "{}"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright {yyyy} {name of copyright owner}
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+SVD.svd = function (A) {
+ this.U = null;
+ this.V = null;
+ this.s = null;
+ this.m = 0;
+ this.n = 0;
+ this.m = A.length;
+ this.n = A[0].length;
+ var nu = Math.min(this.m, this.n);
+ this.s = function (s) {
+ var a = [];
+ while (s-- > 0) {
+ a.push(0);
+ }return a;
+ }(Math.min(this.m + 1, this.n));
+ this.U = function (dims) {
+ var allocate = function allocate(dims) {
+ if (dims.length == 0) {
+ return 0;
+ } else {
+ var array = [];
+ for (var i = 0; i < dims[0]; i++) {
+ array.push(allocate(dims.slice(1)));
+ }
+ return array;
+ }
+ };
+ return allocate(dims);
+ }([this.m, nu]);
+ this.V = function (dims) {
+ var allocate = function allocate(dims) {
+ if (dims.length == 0) {
+ return 0;
+ } else {
+ var array = [];
+ for (var i = 0; i < dims[0]; i++) {
+ array.push(allocate(dims.slice(1)));
+ }
+ return array;
+ }
+ };
+ return allocate(dims);
+ }([this.n, this.n]);
+ var e = function (s) {
+ var a = [];
+ while (s-- > 0) {
+ a.push(0);
+ }return a;
+ }(this.n);
+ var work = function (s) {
+ var a = [];
+ while (s-- > 0) {
+ a.push(0);
+ }return a;
+ }(this.m);
+ var wantu = true;
+ var wantv = true;
+ var nct = Math.min(this.m - 1, this.n);
+ var nrt = Math.max(0, Math.min(this.n - 2, this.m));
+ for (var k = 0; k < Math.max(nct, nrt); k++) {
+ if (k < nct) {
+ this.s[k] = 0;
+ for (var i = k; i < this.m; i++) {
+ this.s[k] = SVD.hypot(this.s[k], A[i][k]);
+ }
+ ;
+ if (this.s[k] !== 0.0) {
+ if (A[k][k] < 0.0) {
+ this.s[k] = -this.s[k];
+ }
+ for (var _i = k; _i < this.m; _i++) {
+ A[_i][k] /= this.s[k];
+ }
+ ;
+ A[k][k] += 1.0;
+ }
+ this.s[k] = -this.s[k];
+ }
+ for (var j = k + 1; j < this.n; j++) {
+ if (function (lhs, rhs) {
+ return lhs && rhs;
+ }(k < nct, this.s[k] !== 0.0)) {
+ var t = 0;
+ for (var _i2 = k; _i2 < this.m; _i2++) {
+ t += A[_i2][k] * A[_i2][j];
+ }
+ ;
+ t = -t / A[k][k];
+ for (var _i3 = k; _i3 < this.m; _i3++) {
+ A[_i3][j] += t * A[_i3][k];
+ }
+ ;
+ }
+ e[j] = A[k][j];
+ }
+ ;
+ if (function (lhs, rhs) {
+ return lhs && rhs;
+ }(wantu, k < nct)) {
+ for (var _i4 = k; _i4 < this.m; _i4++) {
+ this.U[_i4][k] = A[_i4][k];
+ }
+ ;
+ }
+ if (k < nrt) {
+ e[k] = 0;
+ for (var _i5 = k + 1; _i5 < this.n; _i5++) {
+ e[k] = SVD.hypot(e[k], e[_i5]);
+ }
+ ;
+ if (e[k] !== 0.0) {
+ if (e[k + 1] < 0.0) {
+ e[k] = -e[k];
+ }
+ for (var _i6 = k + 1; _i6 < this.n; _i6++) {
+ e[_i6] /= e[k];
+ }
+ ;
+ e[k + 1] += 1.0;
+ }
+ e[k] = -e[k];
+ if (function (lhs, rhs) {
+ return lhs && rhs;
+ }(k + 1 < this.m, e[k] !== 0.0)) {
+ for (var _i7 = k + 1; _i7 < this.m; _i7++) {
+ work[_i7] = 0.0;
+ }
+ ;
+ for (var _j = k + 1; _j < this.n; _j++) {
+ for (var _i8 = k + 1; _i8 < this.m; _i8++) {
+ work[_i8] += e[_j] * A[_i8][_j];
+ }
+ ;
+ }
+ ;
+ for (var _j2 = k + 1; _j2 < this.n; _j2++) {
+ var _t = -e[_j2] / e[k + 1];
+ for (var _i9 = k + 1; _i9 < this.m; _i9++) {
+ A[_i9][_j2] += _t * work[_i9];
+ }
+ ;
+ }
+ ;
+ }
+ if (wantv) {
+ for (var _i10 = k + 1; _i10 < this.n; _i10++) {
+ this.V[_i10][k] = e[_i10];
+ };
+ }
+ }
+ };
+ var p = Math.min(this.n, this.m + 1);
+ if (nct < this.n) {
+ this.s[nct] = A[nct][nct];
+ }
+ if (this.m < p) {
+ this.s[p - 1] = 0.0;
+ }
+ if (nrt + 1 < p) {
+ e[nrt] = A[nrt][p - 1];
+ }
+ e[p - 1] = 0.0;
+ if (wantu) {
+ for (var _j3 = nct; _j3 < nu; _j3++) {
+ for (var _i11 = 0; _i11 < this.m; _i11++) {
+ this.U[_i11][_j3] = 0.0;
+ }
+ ;
+ this.U[_j3][_j3] = 1.0;
+ };
+ for (var _k = nct - 1; _k >= 0; _k--) {
+ if (this.s[_k] !== 0.0) {
+ for (var _j4 = _k + 1; _j4 < nu; _j4++) {
+ var _t2 = 0;
+ for (var _i12 = _k; _i12 < this.m; _i12++) {
+ _t2 += this.U[_i12][_k] * this.U[_i12][_j4];
+ };
+ _t2 = -_t2 / this.U[_k][_k];
+ for (var _i13 = _k; _i13 < this.m; _i13++) {
+ this.U[_i13][_j4] += _t2 * this.U[_i13][_k];
+ };
+ };
+ for (var _i14 = _k; _i14 < this.m; _i14++) {
+ this.U[_i14][_k] = -this.U[_i14][_k];
+ };
+ this.U[_k][_k] = 1.0 + this.U[_k][_k];
+ for (var _i15 = 0; _i15 < _k - 1; _i15++) {
+ this.U[_i15][_k] = 0.0;
+ };
+ } else {
+ for (var _i16 = 0; _i16 < this.m; _i16++) {
+ this.U[_i16][_k] = 0.0;
+ };
+ this.U[_k][_k] = 1.0;
+ }
+ };
+ }
+ if (wantv) {
+ for (var _k2 = this.n - 1; _k2 >= 0; _k2--) {
+ if (function (lhs, rhs) {
+ return lhs && rhs;
+ }(_k2 < nrt, e[_k2] !== 0.0)) {
+ for (var _j5 = _k2 + 1; _j5 < nu; _j5++) {
+ var _t3 = 0;
+ for (var _i17 = _k2 + 1; _i17 < this.n; _i17++) {
+ _t3 += this.V[_i17][_k2] * this.V[_i17][_j5];
+ };
+ _t3 = -_t3 / this.V[_k2 + 1][_k2];
+ for (var _i18 = _k2 + 1; _i18 < this.n; _i18++) {
+ this.V[_i18][_j5] += _t3 * this.V[_i18][_k2];
+ };
+ };
+ }
+ for (var _i19 = 0; _i19 < this.n; _i19++) {
+ this.V[_i19][_k2] = 0.0;
+ };
+ this.V[_k2][_k2] = 1.0;
+ };
+ }
+ var pp = p - 1;
+ var iter = 0;
+ var eps = Math.pow(2.0, -52.0);
+ var tiny = Math.pow(2.0, -966.0);
+ while (p > 0) {
+ var _k3 = void 0;
+ var kase = void 0;
+ for (_k3 = p - 2; _k3 >= -1; _k3--) {
+ if (_k3 === -1) {
+ break;
+ }
+ if (Math.abs(e[_k3]) <= tiny + eps * (Math.abs(this.s[_k3]) + Math.abs(this.s[_k3 + 1]))) {
+ e[_k3] = 0.0;
+ break;
+ }
+ };
+ if (_k3 === p - 2) {
+ kase = 4;
+ } else {
+ var ks = void 0;
+ for (ks = p - 1; ks >= _k3; ks--) {
+ if (ks === _k3) {
+ break;
+ }
+ var _t4 = (ks !== p ? Math.abs(e[ks]) : 0.0) + (ks !== _k3 + 1 ? Math.abs(e[ks - 1]) : 0.0);
+ if (Math.abs(this.s[ks]) <= tiny + eps * _t4) {
+ this.s[ks] = 0.0;
+ break;
+ }
+ };
+ if (ks === _k3) {
+ kase = 3;
+ } else if (ks === p - 1) {
+ kase = 1;
+ } else {
+ kase = 2;
+ _k3 = ks;
+ }
+ }
+ _k3++;
+ switch (kase) {
+ case 1:
+ {
+ var f = e[p - 2];
+ e[p - 2] = 0.0;
+ for (var _j6 = p - 2; _j6 >= _k3; _j6--) {
+ var _t5 = SVD.hypot(this.s[_j6], f);
+ var cs = this.s[_j6] / _t5;
+ var sn = f / _t5;
+ this.s[_j6] = _t5;
+ if (_j6 !== _k3) {
+ f = -sn * e[_j6 - 1];
+ e[_j6 - 1] = cs * e[_j6 - 1];
+ }
+ if (wantv) {
+ for (var _i20 = 0; _i20 < this.n; _i20++) {
+ _t5 = cs * this.V[_i20][_j6] + sn * this.V[_i20][p - 1];
+ this.V[_i20][p - 1] = -sn * this.V[_i20][_j6] + cs * this.V[_i20][p - 1];
+ this.V[_i20][_j6] = _t5;
+ };
+ }
+ };
+ };
+ break;
+ case 2:
+ {
+ var _f = e[_k3 - 1];
+ e[_k3 - 1] = 0.0;
+ for (var _j7 = _k3; _j7 < p; _j7++) {
+ var _t6 = SVD.hypot(this.s[_j7], _f);
+ var _cs = this.s[_j7] / _t6;
+ var _sn = _f / _t6;
+ this.s[_j7] = _t6;
+ _f = -_sn * e[_j7];
+ e[_j7] = _cs * e[_j7];
+ if (wantu) {
+ for (var _i21 = 0; _i21 < this.m; _i21++) {
+ _t6 = _cs * this.U[_i21][_j7] + _sn * this.U[_i21][_k3 - 1];
+ this.U[_i21][_k3 - 1] = -_sn * this.U[_i21][_j7] + _cs * this.U[_i21][_k3 - 1];
+ this.U[_i21][_j7] = _t6;
+ };
+ }
+ };
+ };
+ break;
+ case 3:
+ {
+ var scale = Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[p - 1]), Math.abs(this.s[p - 2])), Math.abs(e[p - 2])), Math.abs(this.s[_k3])), Math.abs(e[_k3]));
+ var sp = this.s[p - 1] / scale;
+ var spm1 = this.s[p - 2] / scale;
+ var epm1 = e[p - 2] / scale;
+ var sk = this.s[_k3] / scale;
+ var ek = e[_k3] / scale;
+ var b = ((spm1 + sp) * (spm1 - sp) + epm1 * epm1) / 2.0;
+ var c = sp * epm1 * (sp * epm1);
+ var shift = 0.0;
+ if (function (lhs, rhs) {
+ return lhs || rhs;
+ }(b !== 0.0, c !== 0.0)) {
+ shift = Math.sqrt(b * b + c);
+ if (b < 0.0) {
+ shift = -shift;
+ }
+ shift = c / (b + shift);
+ }
+ var _f2 = (sk + sp) * (sk - sp) + shift;
+ var g = sk * ek;
+ for (var _j8 = _k3; _j8 < p - 1; _j8++) {
+ var _t7 = SVD.hypot(_f2, g);
+ var _cs2 = _f2 / _t7;
+ var _sn2 = g / _t7;
+ if (_j8 !== _k3) {
+ e[_j8 - 1] = _t7;
+ }
+ _f2 = _cs2 * this.s[_j8] + _sn2 * e[_j8];
+ e[_j8] = _cs2 * e[_j8] - _sn2 * this.s[_j8];
+ g = _sn2 * this.s[_j8 + 1];
+ this.s[_j8 + 1] = _cs2 * this.s[_j8 + 1];
+ if (wantv) {
+ for (var _i22 = 0; _i22 < this.n; _i22++) {
+ _t7 = _cs2 * this.V[_i22][_j8] + _sn2 * this.V[_i22][_j8 + 1];
+ this.V[_i22][_j8 + 1] = -_sn2 * this.V[_i22][_j8] + _cs2 * this.V[_i22][_j8 + 1];
+ this.V[_i22][_j8] = _t7;
+ };
+ }
+ _t7 = SVD.hypot(_f2, g);
+ _cs2 = _f2 / _t7;
+ _sn2 = g / _t7;
+ this.s[_j8] = _t7;
+ _f2 = _cs2 * e[_j8] + _sn2 * this.s[_j8 + 1];
+ this.s[_j8 + 1] = -_sn2 * e[_j8] + _cs2 * this.s[_j8 + 1];
+ g = _sn2 * e[_j8 + 1];
+ e[_j8 + 1] = _cs2 * e[_j8 + 1];
+ if (wantu && _j8 < this.m - 1) {
+ for (var _i23 = 0; _i23 < this.m; _i23++) {
+ _t7 = _cs2 * this.U[_i23][_j8] + _sn2 * this.U[_i23][_j8 + 1];
+ this.U[_i23][_j8 + 1] = -_sn2 * this.U[_i23][_j8] + _cs2 * this.U[_i23][_j8 + 1];
+ this.U[_i23][_j8] = _t7;
+ };
+ }
+ };
+ e[p - 2] = _f2;
+ iter = iter + 1;
+ };
+ break;
+ case 4:
+ {
+ if (this.s[_k3] <= 0.0) {
+ this.s[_k3] = this.s[_k3] < 0.0 ? -this.s[_k3] : 0.0;
+ if (wantv) {
+ for (var _i24 = 0; _i24 <= pp; _i24++) {
+ this.V[_i24][_k3] = -this.V[_i24][_k3];
+ };
+ }
+ }
+ while (_k3 < pp) {
+ if (this.s[_k3] >= this.s[_k3 + 1]) {
+ break;
+ }
+ var _t8 = this.s[_k3];
+ this.s[_k3] = this.s[_k3 + 1];
+ this.s[_k3 + 1] = _t8;
+ if (wantv && _k3 < this.n - 1) {
+ for (var _i25 = 0; _i25 < this.n; _i25++) {
+ _t8 = this.V[_i25][_k3 + 1];
+ this.V[_i25][_k3 + 1] = this.V[_i25][_k3];
+ this.V[_i25][_k3] = _t8;
+ };
+ }
+ if (wantu && _k3 < this.m - 1) {
+ for (var _i26 = 0; _i26 < this.m; _i26++) {
+ _t8 = this.U[_i26][_k3 + 1];
+ this.U[_i26][_k3 + 1] = this.U[_i26][_k3];
+ this.U[_i26][_k3] = _t8;
+ };
+ }
+ _k3++;
+ };
+ iter = 0;
+ p--;
+ };
+ break;
+ }
+ };
+ var result = { U: this.U, V: this.V, S: this.s };
+ return result;
+};
+
+// sqrt(a^2 + b^2) without under/overflow.
+SVD.hypot = function (a, b) {
+ var r = void 0;
+ if (Math.abs(a) > Math.abs(b)) {
+ r = b / a;
+ r = Math.abs(a) * Math.sqrt(1 + r * r);
+ } else if (b != 0) {
+ r = a / b;
+ r = Math.abs(b) * Math.sqrt(1 + r * r);
+ } else {
+ r = 0.0;
+ }
+ return r;
+};
+
+module.exports = SVD;
+
+/***/ }),
+/* 27 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+/**
+ * Needleman-Wunsch algorithm is an procedure to compute the optimal global alignment of two string
+ * sequences by S.B.Needleman and C.D.Wunsch (1970).
+ *
+ * Aside from the inputs, you can assign the scores for,
+ * - Match: The two characters at the current index are same.
+ * - Mismatch: The two characters at the current index are different.
+ * - Insertion/Deletion(gaps): The best alignment involves one letter aligning to a gap in the other string.
+ */
+
+var NeedlemanWunsch = function () {
+ function NeedlemanWunsch(sequence1, sequence2) {
+ var match_score = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
+ var mismatch_penalty = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : -1;
+ var gap_penalty = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : -1;
+
+ _classCallCheck(this, NeedlemanWunsch);
+
+ this.sequence1 = sequence1;
+ this.sequence2 = sequence2;
+ this.match_score = match_score;
+ this.mismatch_penalty = mismatch_penalty;
+ this.gap_penalty = gap_penalty;
+
+ // Just the remove redundancy
+ this.iMax = sequence1.length + 1;
+ this.jMax = sequence2.length + 1;
+
+ // Grid matrix of scores
+ this.grid = new Array(this.iMax);
+ for (var i = 0; i < this.iMax; i++) {
+ this.grid[i] = new Array(this.jMax);
+
+ for (var j = 0; j < this.jMax; j++) {
+ this.grid[i][j] = 0;
+ }
+ }
+
+ // Traceback matrix (2D array, each cell is an array of boolean values for [`Diag`, `Up`, `Left`] positions)
+ this.tracebackGrid = new Array(this.iMax);
+ for (var _i = 0; _i < this.iMax; _i++) {
+ this.tracebackGrid[_i] = new Array(this.jMax);
+
+ for (var _j = 0; _j < this.jMax; _j++) {
+ this.tracebackGrid[_i][_j] = [null, null, null];
+ }
+ }
+
+ // The aligned sequences (return multiple possibilities)
+ this.alignments = [];
+
+ // Final alignment score
+ this.score = -1;
+
+ // Calculate scores and tracebacks
+ this.computeGrids();
+ }
+
+ _createClass(NeedlemanWunsch, [{
+ key: "getScore",
+ value: function getScore() {
+ return this.score;
+ }
+ }, {
+ key: "getAlignments",
+ value: function getAlignments() {
+ return this.alignments;
+ }
+
+ // Main dynamic programming procedure
+
+ }, {
+ key: "computeGrids",
+ value: function computeGrids() {
+ // Fill in the first row
+ for (var j = 1; j < this.jMax; j++) {
+ this.grid[0][j] = this.grid[0][j - 1] + this.gap_penalty;
+ this.tracebackGrid[0][j] = [false, false, true];
+ }
+
+ // Fill in the first column
+ for (var i = 1; i < this.iMax; i++) {
+ this.grid[i][0] = this.grid[i - 1][0] + this.gap_penalty;
+ this.tracebackGrid[i][0] = [false, true, false];
+ }
+
+ // Fill the rest of the grid
+ for (var _i2 = 1; _i2 < this.iMax; _i2++) {
+ for (var _j2 = 1; _j2 < this.jMax; _j2++) {
+ // Find the max score(s) among [`Diag`, `Up`, `Left`]
+ var diag = void 0;
+ if (this.sequence1[_i2 - 1] === this.sequence2[_j2 - 1]) diag = this.grid[_i2 - 1][_j2 - 1] + this.match_score;else diag = this.grid[_i2 - 1][_j2 - 1] + this.mismatch_penalty;
+
+ var up = this.grid[_i2 - 1][_j2] + this.gap_penalty;
+ var left = this.grid[_i2][_j2 - 1] + this.gap_penalty;
+
+ // If there exists multiple max values, capture them for multiple paths
+ var maxOf = [diag, up, left];
+ var indices = this.arrayAllMaxIndexes(maxOf);
+
+ // Update Grids
+ this.grid[_i2][_j2] = maxOf[indices[0]];
+ this.tracebackGrid[_i2][_j2] = [indices.includes(0), indices.includes(1), indices.includes(2)];
+ }
+ }
+
+ // Update alignment score
+ this.score = this.grid[this.iMax - 1][this.jMax - 1];
+ }
+
+ // Gets all possible valid sequence combinations
+
+ }, {
+ key: "alignmentTraceback",
+ value: function alignmentTraceback() {
+ var inProcessAlignments = [];
+
+ inProcessAlignments.push({ pos: [this.sequence1.length, this.sequence2.length],
+ seq1: "",
+ seq2: ""
+ });
+
+ while (inProcessAlignments[0]) {
+ var current = inProcessAlignments[0];
+ var directions = this.tracebackGrid[current.pos[0]][current.pos[1]];
+
+ if (directions[0]) {
+ inProcessAlignments.push({ pos: [current.pos[0] - 1, current.pos[1] - 1],
+ seq1: this.sequence1[current.pos[0] - 1] + current.seq1,
+ seq2: this.sequence2[current.pos[1] - 1] + current.seq2
+ });
+ }
+ if (directions[1]) {
+ inProcessAlignments.push({ pos: [current.pos[0] - 1, current.pos[1]],
+ seq1: this.sequence1[current.pos[0] - 1] + current.seq1,
+ seq2: '-' + current.seq2
+ });
+ }
+ if (directions[2]) {
+ inProcessAlignments.push({ pos: [current.pos[0], current.pos[1] - 1],
+ seq1: '-' + current.seq1,
+ seq2: this.sequence2[current.pos[1] - 1] + current.seq2
+ });
+ }
+
+ if (current.pos[0] === 0 && current.pos[1] === 0) this.alignments.push({ sequence1: current.seq1,
+ sequence2: current.seq2
+ });
+
+ inProcessAlignments.shift();
+ }
+
+ return this.alignments;
+ }
+
+ // Helper Functions
+
+ }, {
+ key: "getAllIndexes",
+ value: function getAllIndexes(arr, val) {
+ var indexes = [],
+ i = -1;
+ while ((i = arr.indexOf(val, i + 1)) !== -1) {
+ indexes.push(i);
+ }
+ return indexes;
+ }
+ }, {
+ key: "arrayAllMaxIndexes",
+ value: function arrayAllMaxIndexes(array) {
+ return this.getAllIndexes(array, Math.max.apply(null, array));
+ }
+ }]);
+
+ return NeedlemanWunsch;
+}();
+
+module.exports = NeedlemanWunsch;
+
+/***/ }),
+/* 28 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var layoutBase = function layoutBase() {
+ return;
+};
+
+layoutBase.FDLayout = __webpack_require__(18);
+layoutBase.FDLayoutConstants = __webpack_require__(4);
+layoutBase.FDLayoutEdge = __webpack_require__(19);
+layoutBase.FDLayoutNode = __webpack_require__(20);
+layoutBase.DimensionD = __webpack_require__(21);
+layoutBase.HashMap = __webpack_require__(22);
+layoutBase.HashSet = __webpack_require__(23);
+layoutBase.IGeometry = __webpack_require__(8);
+layoutBase.IMath = __webpack_require__(9);
+layoutBase.Integer = __webpack_require__(10);
+layoutBase.Point = __webpack_require__(12);
+layoutBase.PointD = __webpack_require__(5);
+layoutBase.RandomSeed = __webpack_require__(16);
+layoutBase.RectangleD = __webpack_require__(13);
+layoutBase.Transform = __webpack_require__(17);
+layoutBase.UniqueIDGeneretor = __webpack_require__(14);
+layoutBase.Quicksort = __webpack_require__(25);
+layoutBase.LinkedList = __webpack_require__(11);
+layoutBase.LGraphObject = __webpack_require__(2);
+layoutBase.LGraph = __webpack_require__(6);
+layoutBase.LEdge = __webpack_require__(1);
+layoutBase.LGraphManager = __webpack_require__(7);
+layoutBase.LNode = __webpack_require__(3);
+layoutBase.Layout = __webpack_require__(15);
+layoutBase.LayoutConstants = __webpack_require__(0);
+layoutBase.NeedlemanWunsch = __webpack_require__(27);
+layoutBase.Matrix = __webpack_require__(24);
+layoutBase.SVD = __webpack_require__(26);
+
+module.exports = layoutBase;
+
+/***/ }),
+/* 29 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+function Emitter() {
+ this.listeners = [];
+}
+
+var p = Emitter.prototype;
+
+p.addListener = function (event, callback) {
+ this.listeners.push({
+ event: event,
+ callback: callback
+ });
+};
+
+p.removeListener = function (event, callback) {
+ for (var i = this.listeners.length; i >= 0; i--) {
+ var l = this.listeners[i];
+
+ if (l.event === event && l.callback === callback) {
+ this.listeners.splice(i, 1);
+ }
+ }
+};
+
+p.emit = function (event, data) {
+ for (var i = 0; i < this.listeners.length; i++) {
+ var l = this.listeners[i];
+
+ if (event === l.event) {
+ l.callback(data);
+ }
+ }
+};
+
+module.exports = Emitter;
+
+/***/ })
+/******/ ]);
+});
\ No newline at end of file
diff --git a/node_modules/layout-base/layout-schema.png b/node_modules/layout-base/layout-schema.png
new file mode 100644
index 00000000..0c739a68
Binary files /dev/null and b/node_modules/layout-base/layout-schema.png differ
diff --git a/node_modules/layout-base/nbproject/private/private.properties b/node_modules/layout-base/nbproject/private/private.properties
new file mode 100644
index 00000000..3b1a22e6
--- /dev/null
+++ b/node_modules/layout-base/nbproject/private/private.properties
@@ -0,0 +1 @@
+browser=Chrome.INTEGRATED
diff --git a/node_modules/layout-base/nbproject/private/private.xml b/node_modules/layout-base/nbproject/private/private.xml
new file mode 100644
index 00000000..8a1e68f7
--- /dev/null
+++ b/node_modules/layout-base/nbproject/private/private.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
+ <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
+ <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
+ <group/>
+ <group name="Constraint Support"/>
+ </open-files>
+</project-private>
diff --git a/node_modules/layout-base/nbproject/project.properties b/node_modules/layout-base/nbproject/project.properties
new file mode 100644
index 00000000..da97eba5
--- /dev/null
+++ b/node_modules/layout-base/nbproject/project.properties
@@ -0,0 +1,3 @@
+files.encoding=UTF-8
+site.root.folder=
+source.folder=
diff --git a/node_modules/layout-base/nbproject/project.xml b/node_modules/layout-base/nbproject/project.xml
new file mode 100644
index 00000000..71c7a284
--- /dev/null
+++ b/node_modules/layout-base/nbproject/project.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://www.netbeans.org/ns/project/1">
+ <type>org.netbeans.modules.web.clientproject</type>
+ <configuration>
+ <data xmlns="http://www.netbeans.org/ns/clientside-project/1">
+ <name>layout-base</name>
+ </data>
+ </configuration>
+</project>
diff --git a/node_modules/layout-base/package.json b/node_modules/layout-base/package.json
new file mode 100644
index 00000000..44534e7c
--- /dev/null
+++ b/node_modules/layout-base/package.json
@@ -0,0 +1,37 @@
+{
+ "name": "layout-base",
+ "version": "2.0.1",
+ "description": "Basic layout model and some utilities for Cytoscape.js layout extensions",
+ "main": "layout-base.js",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1",
+ "build": "cross-env NODE_ENV=production webpack"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/iVis-at-Bilkent/layout-base.git"
+ },
+ "author": "",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/iVis-at-Bilkent/layout-base/issues"
+ },
+ "homepage": "https://github.com/iVis-at-Bilkent/layout-base#readme",
+ "devDependencies": {
+ "babel-core": "^6.24.1",
+ "babel-loader": "^7.0.0",
+ "babel-preset-env": "^1.5.1",
+ "camelcase": "^4.1.0",
+ "cpy-cli": "^1.0.1",
+ "cross-env": "^5.1.6",
+ "eslint": "^3.19.0",
+ "gh-pages": "^1.1.0",
+ "npm-run-all": "^4.1.2",
+ "rimraf": "^2.6.2",
+ "update": "^0.7.4",
+ "updater-license": "^1.0.0",
+ "forever": "^0.15.3",
+ "webpack": "^2.6.1",
+ "webpack-dev-server": "^2.4.5"
+ }
+}
diff --git a/node_modules/layout-base/src/LEdge.js b/node_modules/layout-base/src/LEdge.js
new file mode 100644
index 00000000..6905a1ce
--- /dev/null
+++ b/node_modules/layout-base/src/LEdge.js
@@ -0,0 +1,153 @@
+var LGraphObject = require('./LGraphObject');
+var IGeometry = require('./util/IGeometry');
+var IMath = require('./util/IMath');
+
+function LEdge(source, target, vEdge) {
+ LGraphObject.call(this, vEdge);
+
+ this.isOverlapingSourceAndTarget = false;
+ this.vGraphObject = vEdge;
+ this.bendpoints = [];
+ this.source = source;
+ this.target = target;
+}
+
+LEdge.prototype = Object.create(LGraphObject.prototype);
+
+for (var prop in LGraphObject) {
+ LEdge[prop] = LGraphObject[prop];
+}
+
+LEdge.prototype.getSource = function ()
+{
+ return this.source;
+};
+
+LEdge.prototype.getTarget = function ()
+{
+ return this.target;
+};
+
+LEdge.prototype.isInterGraph = function ()
+{
+ return this.isInterGraph;
+};
+
+LEdge.prototype.getLength = function ()
+{
+ return this.length;
+};
+
+LEdge.prototype.isOverlapingSourceAndTarget = function ()
+{
+ return this.isOverlapingSourceAndTarget;
+};
+
+LEdge.prototype.getBendpoints = function ()
+{
+ return this.bendpoints;
+};
+
+LEdge.prototype.getLca = function ()
+{
+ return this.lca;
+};
+
+LEdge.prototype.getSourceInLca = function ()
+{
+ return this.sourceInLca;
+};
+
+LEdge.prototype.getTargetInLca = function ()
+{
+ return this.targetInLca;
+};
+
+LEdge.prototype.getOtherEnd = function (node)
+{
+ if (this.source === node)
+ {
+ return this.target;
+ }
+ else if (this.target === node)
+ {
+ return this.source;
+ }
+ else
+ {
+ throw "Node is not incident with this edge";
+ }
+}
+
+LEdge.prototype.getOtherEndInGraph = function (node, graph)
+{
+ var otherEnd = this.getOtherEnd(node);
+ var root = graph.getGraphManager().getRoot();
+
+ while (true)
+ {
+ if (otherEnd.getOwner() == graph)
+ {
+ return otherEnd;
+ }
+
+ if (otherEnd.getOwner() == root)
+ {
+ break;
+ }
+
+ otherEnd = otherEnd.getOwner().getParent();
+ }
+
+ return null;
+};
+
+LEdge.prototype.updateLength = function ()
+{
+ var clipPointCoordinates = new Array(4);
+
+ this.isOverlapingSourceAndTarget =
+ IGeometry.getIntersection(this.target.getRect(),
+ this.source.getRect(),
+ clipPointCoordinates);
+
+ if (!this.isOverlapingSourceAndTarget)
+ {
+ this.lengthX = clipPointCoordinates[0] - clipPointCoordinates[2];
+ this.lengthY = clipPointCoordinates[1] - clipPointCoordinates[3];
+
+ if (Math.abs(this.lengthX) < 1.0)
+ {
+ this.lengthX = IMath.sign(this.lengthX);
+ }
+
+ if (Math.abs(this.lengthY) < 1.0)
+ {
+ this.lengthY = IMath.sign(this.lengthY);
+ }
+
+ this.length = Math.sqrt(
+ this.lengthX * this.lengthX + this.lengthY * this.lengthY);
+ }
+};
+
+LEdge.prototype.updateLengthSimple = function ()
+{
+ this.lengthX = this.target.getCenterX() - this.source.getCenterX();
+ this.lengthY = this.target.getCenterY() - this.source.getCenterY();
+
+ if (Math.abs(this.lengthX) < 1.0)
+ {
+ this.lengthX = IMath.sign(this.lengthX);
+ }
+
+ if (Math.abs(this.lengthY) < 1.0)
+ {
+ this.lengthY = IMath.sign(this.lengthY);
+ }
+
+ this.length = Math.sqrt(
+ this.lengthX * this.lengthX + this.lengthY * this.lengthY);
+}
+
+module.exports = LEdge;
diff --git a/node_modules/layout-base/src/LGraph.js b/node_modules/layout-base/src/LGraph.js
new file mode 100644
index 00000000..93a237ae
--- /dev/null
+++ b/node_modules/layout-base/src/LGraph.js
@@ -0,0 +1,477 @@
+var LGraphObject = require('./LGraphObject');
+var Integer = require('./util/Integer');
+var LayoutConstants = require('./LayoutConstants');
+var LGraphManager = require('./LGraphManager');
+var LNode = require('./LNode');
+var LEdge = require('./LEdge');
+var RectangleD = require('./util/RectangleD');
+var Point = require('./util/Point');
+var LinkedList = require('./util/LinkedList');
+
+function LGraph(parent, obj2, vGraph) {
+ LGraphObject.call(this, vGraph);
+ this.estimatedSize = Integer.MIN_VALUE;
+ this.margin = LayoutConstants.DEFAULT_GRAPH_MARGIN;
+ this.edges = [];
+ this.nodes = [];
+ this.isConnected = false;
+ this.parent = parent;
+
+ if (obj2 != null && obj2 instanceof LGraphManager) {
+ this.graphManager = obj2;
+ }
+ else if (obj2 != null && obj2 instanceof Layout) {
+ this.graphManager = obj2.graphManager;
+ }
+}
+
+LGraph.prototype = Object.create(LGraphObject.prototype);
+for (var prop in LGraphObject) {
+ LGraph[prop] = LGraphObject[prop];
+}
+
+LGraph.prototype.getNodes = function () {
+ return this.nodes;
+};
+
+LGraph.prototype.getEdges = function () {
+ return this.edges;
+};
+
+LGraph.prototype.getGraphManager = function ()
+{
+ return this.graphManager;
+};
+
+LGraph.prototype.getParent = function ()
+{
+ return this.parent;
+};
+
+LGraph.prototype.getLeft = function ()
+{
+ return this.left;
+};
+
+LGraph.prototype.getRight = function ()
+{
+ return this.right;
+};
+
+LGraph.prototype.getTop = function ()
+{
+ return this.top;
+};
+
+LGraph.prototype.getBottom = function ()
+{
+ return this.bottom;
+};
+
+LGraph.prototype.isConnected = function ()
+{
+ return this.isConnected;
+};
+
+LGraph.prototype.add = function (obj1, sourceNode, targetNode) {
+ if (sourceNode == null && targetNode == null) {
+ var newNode = obj1;
+ if (this.graphManager == null) {
+ throw "Graph has no graph mgr!";
+ }
+ if (this.getNodes().indexOf(newNode) > -1) {
+ throw "Node already in graph!";
+ }
+ newNode.owner = this;
+ this.getNodes().push(newNode);
+
+ return newNode;
+ }
+ else {
+ var newEdge = obj1;
+ if (!(this.getNodes().indexOf(sourceNode) > -1 && (this.getNodes().indexOf(targetNode)) > -1)) {
+ throw "Source or target not in graph!";
+ }
+
+ if (!(sourceNode.owner == targetNode.owner && sourceNode.owner == this)) {
+ throw "Both owners must be this graph!";
+ }
+
+ if (sourceNode.owner != targetNode.owner)
+ {
+ return null;
+ }
+
+ // set source and target
+ newEdge.source = sourceNode;
+ newEdge.target = targetNode;
+
+ // set as intra-graph edge
+ newEdge.isInterGraph = false;
+
+ // add to graph edge list
+ this.getEdges().push(newEdge);
+
+ // add to incidency lists
+ sourceNode.edges.push(newEdge);
+
+ if (targetNode != sourceNode)
+ {
+ targetNode.edges.push(newEdge);
+ }
+
+ return newEdge;
+ }
+};
+
+LGraph.prototype.remove = function (obj) {
+ var node = obj;
+ if (obj instanceof LNode) {
+ if (node == null) {
+ throw "Node is null!";
+ }
+ if (!(node.owner != null && node.owner == this)) {
+ throw "Owner graph is invalid!";
+ }
+ if (this.graphManager == null) {
+ throw "Owner graph manager is invalid!";
+ }
+ // remove incident edges first (make a copy to do it safely)
+ var edgesToBeRemoved = node.edges.slice();
+ var edge;
+ var s = edgesToBeRemoved.length;
+ for (var i = 0; i < s; i++)
+ {
+ edge = edgesToBeRemoved[i];
+
+ if (edge.isInterGraph)
+ {
+ this.graphManager.remove(edge);
+ }
+ else
+ {
+ edge.source.owner.remove(edge);
+ }
+ }
+
+ // now the node itself
+ var index = this.nodes.indexOf(node);
+ if (index == -1) {
+ throw "Node not in owner node list!";
+ }
+
+ this.nodes.splice(index, 1);
+ }
+ else if (obj instanceof LEdge) {
+ var edge = obj;
+ if (edge == null) {
+ throw "Edge is null!";
+ }
+ if (!(edge.source != null && edge.target != null)) {
+ throw "Source and/or target is null!";
+ }
+ if (!(edge.source.owner != null && edge.target.owner != null &&
+ edge.source.owner == this && edge.target.owner == this)) {
+ throw "Source and/or target owner is invalid!";
+ }
+
+ var sourceIndex = edge.source.edges.indexOf(edge);
+ var targetIndex = edge.target.edges.indexOf(edge);
+ if (!(sourceIndex > -1 && targetIndex > -1)) {
+ throw "Source and/or target doesn't know this edge!";
+ }
+
+ edge.source.edges.splice(sourceIndex, 1);
+
+ if (edge.target != edge.source)
+ {
+ edge.target.edges.splice(targetIndex, 1);
+ }
+
+ var index = edge.source.owner.getEdges().indexOf(edge);
+ if (index == -1) {
+ throw "Not in owner's edge list!";
+ }
+
+ edge.source.owner.getEdges().splice(index, 1);
+ }
+};
+
+LGraph.prototype.updateLeftTop = function ()
+{
+ var top = Integer.MAX_VALUE;
+ var left = Integer.MAX_VALUE;
+ var nodeTop;
+ var nodeLeft;
+ var margin;
+
+ var nodes = this.getNodes();
+ var s = nodes.length;
+
+ for (var i = 0; i < s; i++)
+ {
+ var lNode = nodes[i];
+ nodeTop = lNode.getTop();
+ nodeLeft = lNode.getLeft();
+
+ if (top > nodeTop)
+ {
+ top = nodeTop;
+ }
+
+ if (left > nodeLeft)
+ {
+ left = nodeLeft;
+ }
+ }
+
+ // Do we have any nodes in this graph?
+ if (top == Integer.MAX_VALUE)
+ {
+ return null;
+ }
+
+ if(nodes[0].getParent().paddingLeft != undefined){
+ margin = nodes[0].getParent().paddingLeft;
+ }
+ else{
+ margin = this.margin;
+ }
+
+ this.left = left - margin;
+ this.top = top - margin;
+
+ // Apply the margins and return the result
+ return new Point(this.left, this.top);
+};
+
+LGraph.prototype.updateBounds = function (recursive)
+{
+ // calculate bounds
+ var left = Integer.MAX_VALUE;
+ var right = -Integer.MAX_VALUE;
+ var top = Integer.MAX_VALUE;
+ var bottom = -Integer.MAX_VALUE;
+ var nodeLeft;
+ var nodeRight;
+ var nodeTop;
+ var nodeBottom;
+ var margin;
+
+ var nodes = this.nodes;
+ var s = nodes.length;
+ for (var i = 0; i < s; i++)
+ {
+ var lNode = nodes[i];
+
+ if (recursive && lNode.child != null)
+ {
+ lNode.updateBounds();
+ }
+ nodeLeft = lNode.getLeft();
+ nodeRight = lNode.getRight();
+ nodeTop = lNode.getTop();
+ nodeBottom = lNode.getBottom();
+
+ if (left > nodeLeft)
+ {
+ left = nodeLeft;
+ }
+
+ if (right < nodeRight)
+ {
+ right = nodeRight;
+ }
+
+ if (top > nodeTop)
+ {
+ top = nodeTop;
+ }
+
+ if (bottom < nodeBottom)
+ {
+ bottom = nodeBottom;
+ }
+ }
+
+ var boundingRect = new RectangleD(left, top, right - left, bottom - top);
+ if (left == Integer.MAX_VALUE)
+ {
+ this.left = this.parent.getLeft();
+ this.right = this.parent.getRight();
+ this.top = this.parent.getTop();
+ this.bottom = this.parent.getBottom();
+ }
+
+ if(nodes[0].getParent().paddingLeft != undefined){
+ margin = nodes[0].getParent().paddingLeft;
+ }
+ else{
+ margin = this.margin;
+ }
+
+ this.left = boundingRect.x - margin;
+ this.right = boundingRect.x + boundingRect.width + margin;
+ this.top = boundingRect.y - margin;
+ this.bottom = boundingRect.y + boundingRect.height + margin;
+};
+
+LGraph.calculateBounds = function (nodes)
+{
+ var left = Integer.MAX_VALUE;
+ var right = -Integer.MAX_VALUE;
+ var top = Integer.MAX_VALUE;
+ var bottom = -Integer.MAX_VALUE;
+ var nodeLeft;
+ var nodeRight;
+ var nodeTop;
+ var nodeBottom;
+
+ var s = nodes.length;
+
+ for (var i = 0; i < s; i++)
+ {
+ var lNode = nodes[i];
+ nodeLeft = lNode.getLeft();
+ nodeRight = lNode.getRight();
+ nodeTop = lNode.getTop();
+ nodeBottom = lNode.getBottom();
+
+ if (left > nodeLeft)
+ {
+ left = nodeLeft;
+ }
+
+ if (right < nodeRight)
+ {
+ right = nodeRight;
+ }
+
+ if (top > nodeTop)
+ {
+ top = nodeTop;
+ }
+
+ if (bottom < nodeBottom)
+ {
+ bottom = nodeBottom;
+ }
+ }
+
+ var boundingRect = new RectangleD(left, top, right - left, bottom - top);
+
+ return boundingRect;
+};
+
+LGraph.prototype.getInclusionTreeDepth = function ()
+{
+ if (this == this.graphManager.getRoot())
+ {
+ return 1;
+ }
+ else
+ {
+ return this.parent.getInclusionTreeDepth();
+ }
+};
+
+LGraph.prototype.getEstimatedSize = function ()
+{
+ if (this.estimatedSize == Integer.MIN_VALUE) {
+ throw "assert failed";
+ }
+ return this.estimatedSize;
+};
+
+LGraph.prototype.calcEstimatedSize = function ()
+{
+ var size = 0;
+ var nodes = this.nodes;
+ var s = nodes.length;
+
+ for (var i = 0; i < s; i++)
+ {
+ var lNode = nodes[i];
+ size += lNode.calcEstimatedSize();
+ }
+
+ if (size == 0)
+ {
+ this.estimatedSize = LayoutConstants.EMPTY_COMPOUND_NODE_SIZE;
+ }
+ else
+ {
+ this.estimatedSize = size / Math.sqrt(this.nodes.length);
+ }
+
+ return this.estimatedSize;
+};
+
+LGraph.prototype.updateConnected = function ()
+{
+ var self = this;
+ if (this.nodes.length == 0)
+ {
+ this.isConnected = true;
+ return;
+ }
+
+ var queue = new LinkedList();
+ var visited = new Set();
+ var currentNode = this.nodes[0];
+ var neighborEdges;
+ var currentNeighbor;
+ var childrenOfNode = currentNode.withChildren();
+ childrenOfNode.forEach(function(node) {
+ queue.push(node);
+ visited.add(node);
+ });
+
+ while (queue.length !== 0)
+ {
+ currentNode = queue.shift();
+
+ // Traverse all neighbors of this node
+ neighborEdges = currentNode.getEdges();
+ var size = neighborEdges.length;
+ for (var i = 0; i < size; i++)
+ {
+ var neighborEdge = neighborEdges[i];
+ currentNeighbor =
+ neighborEdge.getOtherEndInGraph(currentNode, this);
+
+ // Add unvisited neighbors to the list to visit
+ if (currentNeighbor != null &&
+ !visited.has(currentNeighbor))
+ {
+ var childrenOfNeighbor = currentNeighbor.withChildren();
+
+ childrenOfNeighbor.forEach(function(node) {
+ queue.push(node);
+ visited.add(node);
+ });
+ }
+ }
+ }
+
+ this.isConnected = false;
+
+ if (visited.size >= this.nodes.length)
+ {
+ var noOfVisitedInThisGraph = 0;
+
+ visited.forEach(function(visitedNode) {
+ if (visitedNode.owner == self)
+ {
+ noOfVisitedInThisGraph++;
+ }
+ });
+
+ if (noOfVisitedInThisGraph == this.nodes.length)
+ {
+ this.isConnected = true;
+ }
+ }
+};
+
+module.exports = LGraph;
diff --git a/node_modules/layout-base/src/LGraphManager.js b/node_modules/layout-base/src/LGraphManager.js
new file mode 100644
index 00000000..f6da40d8
--- /dev/null
+++ b/node_modules/layout-base/src/LGraphManager.js
@@ -0,0 +1,500 @@
+var LGraph;
+var LEdge = require('./LEdge');
+
+function LGraphManager(layout) {
+ LGraph = require('./LGraph'); // It may be better to initilize this out of this function but it gives an error (Right-hand side of 'instanceof' is not callable) now.
+ this.layout = layout;
+
+ this.graphs = [];
+ this.edges = [];
+}
+
+LGraphManager.prototype.addRoot = function ()
+{
+ var ngraph = this.layout.newGraph();
+ var nnode = this.layout.newNode(null);
+ var root = this.add(ngraph, nnode);
+ this.setRootGraph(root);
+ return this.rootGraph;
+};
+
+LGraphManager.prototype.add = function (newGraph, parentNode, newEdge, sourceNode, targetNode)
+{
+ //there are just 2 parameters are passed then it adds an LGraph else it adds an LEdge
+ if (newEdge == null && sourceNode == null && targetNode == null) {
+ if (newGraph == null) {
+ throw "Graph is null!";
+ }
+ if (parentNode == null) {
+ throw "Parent node is null!";
+ }
+ if (this.graphs.indexOf(newGraph) > -1) {
+ throw "Graph already in this graph mgr!";
+ }
+
+ this.graphs.push(newGraph);
+
+ if (newGraph.parent != null) {
+ throw "Already has a parent!";
+ }
+ if (parentNode.child != null) {
+ throw "Already has a child!";
+ }
+
+ newGraph.parent = parentNode;
+ parentNode.child = newGraph;
+
+ return newGraph;
+ }
+ else {
+ //change the order of the parameters
+ targetNode = newEdge;
+ sourceNode = parentNode;
+ newEdge = newGraph;
+ var sourceGraph = sourceNode.getOwner();
+ var targetGraph = targetNode.getOwner();
+
+ if (!(sourceGraph != null && sourceGraph.getGraphManager() == this)) {
+ throw "Source not in this graph mgr!";
+ }
+ if (!(targetGraph != null && targetGraph.getGraphManager() == this)) {
+ throw "Target not in this graph mgr!";
+ }
+
+ if (sourceGraph == targetGraph)
+ {
+ newEdge.isInterGraph = false;
+ return sourceGraph.add(newEdge, sourceNode, targetNode);
+ }
+ else
+ {
+ newEdge.isInterGraph = true;
+
+ // set source and target
+ newEdge.source = sourceNode;
+ newEdge.target = targetNode;
+
+ // add edge to inter-graph edge list
+ if (this.edges.indexOf(newEdge) > -1) {
+ throw "Edge already in inter-graph edge list!";
+ }
+
+ this.edges.push(newEdge);
+
+ // add edge to source and target incidency lists
+ if (!(newEdge.source != null && newEdge.target != null)) {
+ throw "Edge source and/or target is null!";
+ }
+
+ if (!(newEdge.source.edges.indexOf(newEdge) == -1 && newEdge.target.edges.indexOf(newEdge) == -1)) {
+ throw "Edge already in source and/or target incidency list!";
+ }
+
+ newEdge.source.edges.push(newEdge);
+ newEdge.target.edges.push(newEdge);
+
+ return newEdge;
+ }
+ }
+};
+
+LGraphManager.prototype.remove = function (lObj) {
+ if (lObj instanceof LGraph) {
+ var graph = lObj;
+ if (graph.getGraphManager() != this) {
+ throw "Graph not in this graph mgr";
+ }
+ if (!(graph == this.rootGraph || (graph.parent != null && graph.parent.graphManager == this))) {
+ throw "Invalid parent node!";
+ }
+
+ // first the edges (make a copy to do it safely)
+ var edgesToBeRemoved = [];
+
+ edgesToBeRemoved = edgesToBeRemoved.concat(graph.getEdges());
+
+ var edge;
+ var s = edgesToBeRemoved.length;
+ for (var i = 0; i < s; i++)
+ {
+ edge = edgesToBeRemoved[i];
+ graph.remove(edge);
+ }
+
+ // then the nodes (make a copy to do it safely)
+ var nodesToBeRemoved = [];
+
+ nodesToBeRemoved = nodesToBeRemoved.concat(graph.getNodes());
+
+ var node;
+ s = nodesToBeRemoved.length;
+ for (var i = 0; i < s; i++)
+ {
+ node = nodesToBeRemoved[i];
+ graph.remove(node);
+ }
+
+ // check if graph is the root
+ if (graph == this.rootGraph)
+ {
+ this.setRootGraph(null);
+ }
+
+ // now remove the graph itself
+ var index = this.graphs.indexOf(graph);
+ this.graphs.splice(index, 1);
+
+ // also reset the parent of the graph
+ graph.parent = null;
+ }
+ else if (lObj instanceof LEdge) {
+ edge = lObj;
+ if (edge == null) {
+ throw "Edge is null!";
+ }
+ if (!edge.isInterGraph) {
+ throw "Not an inter-graph edge!";
+ }
+ if (!(edge.source != null && edge.target != null)) {
+ throw "Source and/or target is null!";
+ }
+
+ // remove edge from source and target nodes' incidency lists
+
+ if (!(edge.source.edges.indexOf(edge) != -1 && edge.target.edges.indexOf(edge) != -1)) {
+ throw "Source and/or target doesn't know this edge!";
+ }
+
+ var index = edge.source.edges.indexOf(edge);
+ edge.source.edges.splice(index, 1);
+ index = edge.target.edges.indexOf(edge);
+ edge.target.edges.splice(index, 1);
+
+ // remove edge from owner graph manager's inter-graph edge list
+
+ if (!(edge.source.owner != null && edge.source.owner.getGraphManager() != null)) {
+ throw "Edge owner graph or owner graph manager is null!";
+ }
+ if (edge.source.owner.getGraphManager().edges.indexOf(edge) == -1) {
+ throw "Not in owner graph manager's edge list!";
+ }
+
+ var index = edge.source.owner.getGraphManager().edges.indexOf(edge);
+ edge.source.owner.getGraphManager().edges.splice(index, 1);
+ }
+};
+
+LGraphManager.prototype.updateBounds = function ()
+{
+ this.rootGraph.updateBounds(true);
+};
+
+LGraphManager.prototype.getGraphs = function ()
+{
+ return this.graphs;
+};
+
+LGraphManager.prototype.getAllNodes = function ()
+{
+ if (this.allNodes == null)
+ {
+ var nodeList = [];
+ var graphs = this.getGraphs();
+ var s = graphs.length;
+ for (var i = 0; i < s; i++)
+ {
+ nodeList = nodeList.concat(graphs[i].getNodes());
+ }
+ this.allNodes = nodeList;
+ }
+ return this.allNodes;
+};
+
+LGraphManager.prototype.resetAllNodes = function ()
+{
+ this.allNodes = null;
+};
+
+LGraphManager.prototype.resetAllEdges = function ()
+{
+ this.allEdges = null;
+};
+
+LGraphManager.prototype.resetAllNodesToApplyGravitation = function ()
+{
+ this.allNodesToApplyGravitation = null;
+};
+
+LGraphManager.prototype.getAllEdges = function ()
+{
+ if (this.allEdges == null)
+ {
+ var edgeList = [];
+ var graphs = this.getGraphs();
+ var s = graphs.length;
+ for (var i = 0; i < graphs.length; i++)
+ {
+ edgeList = edgeList.concat(graphs[i].getEdges());
+ }
+
+ edgeList = edgeList.concat(this.edges);
+
+ this.allEdges = edgeList;
+ }
+ return this.allEdges;
+};
+
+LGraphManager.prototype.getAllNodesToApplyGravitation = function ()
+{
+ return this.allNodesToApplyGravitation;
+};
+
+LGraphManager.prototype.setAllNodesToApplyGravitation = function (nodeList)
+{
+ if (this.allNodesToApplyGravitation != null) {
+ throw "assert failed";
+ }
+
+ this.allNodesToApplyGravitation = nodeList;
+};
+
+LGraphManager.prototype.getRoot = function ()
+{
+ return this.rootGraph;
+};
+
+LGraphManager.prototype.setRootGraph = function (graph)
+{
+ if (graph.getGraphManager() != this) {
+ throw "Root not in this graph mgr!";
+ }
+
+ this.rootGraph = graph;
+ // root graph must have a root node associated with it for convenience
+ if (graph.parent == null)
+ {
+ graph.parent = this.layout.newNode("Root node");
+ }
+};
+
+LGraphManager.prototype.getLayout = function ()
+{
+ return this.layout;
+};
+
+LGraphManager.prototype.isOneAncestorOfOther = function (firstNode, secondNode)
+{
+ if (!(firstNode != null && secondNode != null)) {
+ throw "assert failed";
+ }
+
+ if (firstNode == secondNode)
+ {
+ return true;
+ }
+ // Is second node an ancestor of the first one?
+ var ownerGraph = firstNode.getOwner();
+ var parentNode;
+
+ do
+ {
+ parentNode = ownerGraph.getParent();
+
+ if (parentNode == null)
+ {
+ break;
+ }
+
+ if (parentNode == secondNode)
+ {
+ return true;
+ }
+
+ ownerGraph = parentNode.getOwner();
+ if (ownerGraph == null)
+ {
+ break;
+ }
+ } while (true);
+ // Is first node an ancestor of the second one?
+ ownerGraph = secondNode.getOwner();
+
+ do
+ {
+ parentNode = ownerGraph.getParent();
+
+ if (parentNode == null)
+ {
+ break;
+ }
+
+ if (parentNode == firstNode)
+ {
+ return true;
+ }
+
+ ownerGraph = parentNode.getOwner();
+ if (ownerGraph == null)
+ {
+ break;
+ }
+ } while (true);
+
+ return false;
+};
+
+LGraphManager.prototype.calcLowestCommonAncestors = function ()
+{
+ var edge;
+ var sourceNode;
+ var targetNode;
+ var sourceAncestorGraph;
+ var targetAncestorGraph;
+
+ var edges = this.getAllEdges();
+ var s = edges.length;
+ for (var i = 0; i < s; i++)
+ {
+ edge = edges[i];
+
+ sourceNode = edge.source;
+ targetNode = edge.target;
+ edge.lca = null;
+ edge.sourceInLca = sourceNode;
+ edge.targetInLca = targetNode;
+
+ if (sourceNode == targetNode)
+ {
+ edge.lca = sourceNode.getOwner();
+ continue;
+ }
+
+ sourceAncestorGraph = sourceNode.getOwner();
+
+ while (edge.lca == null)
+ {
+ edge.targetInLca = targetNode;
+ targetAncestorGraph = targetNode.getOwner();
+
+ while (edge.lca == null)
+ {
+ if (targetAncestorGraph == sourceAncestorGraph)
+ {
+ edge.lca = targetAncestorGraph;
+ break;
+ }
+
+ if (targetAncestorGraph == this.rootGraph)
+ {
+ break;
+ }
+
+ if (edge.lca != null) {
+ throw "assert failed";
+ }
+ edge.targetInLca = targetAncestorGraph.getParent();
+ targetAncestorGraph = edge.targetInLca.getOwner();
+ }
+
+ if (sourceAncestorGraph == this.rootGraph)
+ {
+ break;
+ }
+
+ if (edge.lca == null)
+ {
+ edge.sourceInLca = sourceAncestorGraph.getParent();
+ sourceAncestorGraph = edge.sourceInLca.getOwner();
+ }
+ }
+
+ if (edge.lca == null) {
+ throw "assert failed";
+ }
+ }
+};
+
+LGraphManager.prototype.calcLowestCommonAncestor = function (firstNode, secondNode)
+{
+ if (firstNode == secondNode)
+ {
+ return firstNode.getOwner();
+ }
+ var firstOwnerGraph = firstNode.getOwner();
+
+ do
+ {
+ if (firstOwnerGraph == null)
+ {
+ break;
+ }
+ var secondOwnerGraph = secondNode.getOwner();
+
+ do
+ {
+ if (secondOwnerGraph == null)
+ {
+ break;
+ }
+
+ if (secondOwnerGraph == firstOwnerGraph)
+ {
+ return secondOwnerGraph;
+ }
+ secondOwnerGraph = secondOwnerGraph.getParent().getOwner();
+ } while (true);
+
+ firstOwnerGraph = firstOwnerGraph.getParent().getOwner();
+ } while (true);
+
+ return firstOwnerGraph;
+};
+
+LGraphManager.prototype.calcInclusionTreeDepths = function (graph, depth) {
+ if (graph == null && depth == null) {
+ graph = this.rootGraph;
+ depth = 1;
+ }
+ var node;
+
+ var nodes = graph.getNodes();
+ var s = nodes.length;
+ for (var i = 0; i < s; i++)
+ {
+ node = nodes[i];
+ node.inclusionTreeDepth = depth;
+
+ if (node.child != null)
+ {
+ this.calcInclusionTreeDepths(node.child, depth + 1);
+ }
+ }
+};
+
+LGraphManager.prototype.includesInvalidEdge = function ()
+{
+ var edge;
+ var edgesToRemove = [];
+
+ var s = this.edges.length;
+ for (var i = 0; i < s; i++)
+ {
+ edge = this.edges[i];
+
+ if (this.isOneAncestorOfOther(edge.source, edge.target))
+ {
+ edgesToRemove.push(edge);
+ }
+ }
+
+ // Remove invalid edges from graph manager
+ for (var i = 0; i < edgesToRemove.length; i++)
+ {
+ this.remove(edgesToRemove[i]);
+ }
+
+ // Invalid edges are cleared, so return false
+ return false;
+};
+
+module.exports = LGraphManager;
diff --git a/node_modules/layout-base/src/LGraphObject.js b/node_modules/layout-base/src/LGraphObject.js
new file mode 100644
index 00000000..17305144
--- /dev/null
+++ b/node_modules/layout-base/src/LGraphObject.js
@@ -0,0 +1,5 @@
+function LGraphObject(vGraphObject) {
+ this.vGraphObject = vGraphObject;
+}
+
+module.exports = LGraphObject;
diff --git a/node_modules/layout-base/src/LNode.js b/node_modules/layout-base/src/LNode.js
new file mode 100644
index 00000000..5c9e456c
--- /dev/null
+++ b/node_modules/layout-base/src/LNode.js
@@ -0,0 +1,418 @@
+var LGraphObject = require('./LGraphObject');
+var Integer = require('./util/Integer');
+var RectangleD = require('./util/RectangleD');
+var LayoutConstants = require('./LayoutConstants');
+var RandomSeed = require('./util/RandomSeed');
+var PointD = require('./util/PointD');
+
+function LNode(gm, loc, size, vNode) {
+ //Alternative constructor 1 : LNode(LGraphManager gm, Point loc, Dimension size, Object vNode)
+ if (size == null && vNode == null) {
+ vNode = loc;
+ }
+
+ LGraphObject.call(this, vNode);
+
+ //Alternative constructor 2 : LNode(Layout layout, Object vNode)
+ if (gm.graphManager != null)
+ gm = gm.graphManager;
+
+ this.estimatedSize = Integer.MIN_VALUE;
+ this.inclusionTreeDepth = Integer.MAX_VALUE;
+ this.vGraphObject = vNode;
+ this.edges = [];
+ this.graphManager = gm;
+
+ if (size != null && loc != null)
+ this.rect = new RectangleD(loc.x, loc.y, size.width, size.height);
+ else
+ this.rect = new RectangleD();
+}
+
+LNode.prototype = Object.create(LGraphObject.prototype);
+for (var prop in LGraphObject) {
+ LNode[prop] = LGraphObject[prop];
+}
+
+LNode.prototype.getEdges = function ()
+{
+ return this.edges;
+};
+
+LNode.prototype.getChild = function ()
+{
+ return this.child;
+};
+
+LNode.prototype.getOwner = function ()
+{
+// if (this.owner != null) {
+// if (!(this.owner == null || this.owner.getNodes().indexOf(this) > -1)) {
+// throw "assert failed";
+// }
+// }
+
+ return this.owner;
+};
+
+LNode.prototype.getWidth = function ()
+{
+ return this.rect.width;
+};
+
+LNode.prototype.setWidth = function (width)
+{
+ this.rect.width = width;
+};
+
+LNode.prototype.getHeight = function ()
+{
+ return this.rect.height;
+};
+
+LNode.prototype.setHeight = function (height)
+{
+ this.rect.height = height;
+};
+
+LNode.prototype.getCenterX = function ()
+{
+ return this.rect.x + this.rect.width / 2;
+};
+
+LNode.prototype.getCenterY = function ()
+{
+ return this.rect.y + this.rect.height / 2;
+};
+
+LNode.prototype.getCenter = function ()
+{
+ return new PointD(this.rect.x + this.rect.width / 2,
+ this.rect.y + this.rect.height / 2);
+};
+
+LNode.prototype.getLocation = function ()
+{
+ return new PointD(this.rect.x, this.rect.y);
+};
+
+LNode.prototype.getRect = function ()
+{
+ return this.rect;
+};
+
+LNode.prototype.getDiagonal = function ()
+{
+ return Math.sqrt(this.rect.width * this.rect.width +
+ this.rect.height * this.rect.height);
+};
+
+/**
+ * This method returns half the diagonal length of this node.
+ */
+LNode.prototype.getHalfTheDiagonal = function () {
+ return Math.sqrt(this.rect.height * this.rect.height +
+ this.rect.width * this.rect.width) / 2;
+};
+
+LNode.prototype.setRect = function (upperLeft, dimension)
+{
+ this.rect.x = upperLeft.x;
+ this.rect.y = upperLeft.y;
+ this.rect.width = dimension.width;
+ this.rect.height = dimension.height;
+};
+
+LNode.prototype.setCenter = function (cx, cy)
+{
+ this.rect.x = cx - this.rect.width / 2;
+ this.rect.y = cy - this.rect.height / 2;
+};
+
+LNode.prototype.setLocation = function (x, y)
+{
+ this.rect.x = x;
+ this.rect.y = y;
+};
+
+LNode.prototype.moveBy = function (dx, dy)
+{
+ this.rect.x += dx;
+ this.rect.y += dy;
+};
+
+LNode.prototype.getEdgeListToNode = function (to)
+{
+ var edgeList = [];
+ var edge;
+ var self = this;
+
+ self.edges.forEach(function(edge) {
+
+ if (edge.target == to)
+ {
+ if (edge.source != self)
+ throw "Incorrect edge source!";
+
+ edgeList.push(edge);
+ }
+ });
+
+ return edgeList;
+};
+
+LNode.prototype.getEdgesBetween = function (other)
+{
+ var edgeList = [];
+ var edge;
+
+ var self = this;
+ self.edges.forEach(function(edge) {
+
+ if (!(edge.source == self || edge.target == self))
+ throw "Incorrect edge source and/or target";
+
+ if ((edge.target == other) || (edge.source == other))
+ {
+ edgeList.push(edge);
+ }
+ });
+
+ return edgeList;
+};
+
+LNode.prototype.getNeighborsList = function ()
+{
+ var neighbors = new Set();
+
+ var self = this;
+ self.edges.forEach(function(edge) {
+
+ if (edge.source == self)
+ {
+ neighbors.add(edge.target);
+ }
+ else
+ {
+ if (edge.target != self) {
+ throw "Incorrect incidency!";
+ }
+
+ neighbors.add(edge.source);
+ }
+ });
+
+ return neighbors;
+};
+
+LNode.prototype.withChildren = function ()
+{
+ var withNeighborsList = new Set();
+ var childNode;
+ var children;
+
+ withNeighborsList.add(this);
+
+ if (this.child != null)
+ {
+ var nodes = this.child.getNodes();
+ for (var i = 0; i < nodes.length; i++)
+ {
+ childNode = nodes[i];
+ children = childNode.withChildren();
+ children.forEach(function(node) {
+ withNeighborsList.add(node);
+ });
+ }
+ }
+
+ return withNeighborsList;
+};
+
+LNode.prototype.getNoOfChildren = function ()
+{
+ var noOfChildren = 0;
+ var childNode;
+
+ if(this.child == null){
+ noOfChildren = 1;
+ }
+ else
+ {
+ var nodes = this.child.getNodes();
+ for (var i = 0; i < nodes.length; i++)
+ {
+ childNode = nodes[i];
+
+ noOfChildren += childNode.getNoOfChildren();
+ }
+ }
+
+ if(noOfChildren == 0){
+ noOfChildren = 1;
+ }
+ return noOfChildren;
+};
+
+LNode.prototype.getEstimatedSize = function () {
+ if (this.estimatedSize == Integer.MIN_VALUE) {
+ throw "assert failed";
+ }
+ return this.estimatedSize;
+};
+
+LNode.prototype.calcEstimatedSize = function () {
+ if (this.child == null)
+ {
+ return this.estimatedSize = (this.rect.width + this.rect.height) / 2;
+ }
+ else
+ {
+ this.estimatedSize = this.child.calcEstimatedSize();
+ this.rect.width = this.estimatedSize;
+ this.rect.height = this.estimatedSize;
+
+ return this.estimatedSize;
+ }
+};
+
+LNode.prototype.scatter = function () {
+ var randomCenterX;
+ var randomCenterY;
+
+ var minX = -LayoutConstants.INITIAL_WORLD_BOUNDARY;
+ var maxX = LayoutConstants.INITIAL_WORLD_BOUNDARY;
+ randomCenterX = LayoutConstants.WORLD_CENTER_X +
+ (RandomSeed.nextDouble() * (maxX - minX)) + minX;
+
+ var minY = -LayoutConstants.INITIAL_WORLD_BOUNDARY;
+ var maxY = LayoutConstants.INITIAL_WORLD_BOUNDARY;
+ randomCenterY = LayoutConstants.WORLD_CENTER_Y +
+ (RandomSeed.nextDouble() * (maxY - minY)) + minY;
+
+ this.rect.x = randomCenterX;
+ this.rect.y = randomCenterY
+};
+
+LNode.prototype.updateBounds = function () {
+ if (this.getChild() == null) {
+ throw "assert failed";
+ }
+ if (this.getChild().getNodes().length != 0)
+ {
+ // wrap the children nodes by re-arranging the boundaries
+ var childGraph = this.getChild();
+ childGraph.updateBounds(true);
+
+ this.rect.x = childGraph.getLeft();
+ this.rect.y = childGraph.getTop();
+
+ this.setWidth(childGraph.getRight() - childGraph.getLeft());
+ this.setHeight(childGraph.getBottom() - childGraph.getTop());
+
+ // Update compound bounds considering its label properties
+ if(LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS){
+
+ var width = childGraph.getRight() - childGraph.getLeft();
+ var height = childGraph.getBottom() - childGraph.getTop();
+
+ if(this.labelWidth){
+ if(this.labelPosHorizontal == "left"){
+ this.rect.x -= (this.labelWidth);
+ this.setWidth(width + this.labelWidth);
+ }
+ else if(this.labelPosHorizontal == "center" && this.labelWidth > width){
+ this.rect.x -= (this.labelWidth - width) / 2;
+ this.setWidth(this.labelWidth);
+ }
+ else if(this.labelPosHorizontal == "right"){
+ this.setWidth(width + this.labelWidth);
+ }
+ }
+
+ if(this.labelHeight){
+ if(this.labelPosVertical == "top"){
+ this.rect.y -= (this.labelHeight);
+ this.setHeight(height + this.labelHeight);
+ }
+ else if(this.labelPosVertical == "center" && this.labelHeight > height){
+ this.rect.y -= (this.labelHeight - height) / 2;
+ this.setHeight(this.labelHeight);
+ }
+ else if(this.labelPosVertical == "bottom"){
+ this.setHeight(height + this.labelHeight);
+ }
+ }
+ }
+ }
+};
+
+LNode.prototype.getInclusionTreeDepth = function ()
+{
+ if (this.inclusionTreeDepth == Integer.MAX_VALUE) {
+ throw "assert failed";
+ }
+ return this.inclusionTreeDepth;
+};
+
+LNode.prototype.transform = function (trans)
+{
+ var left = this.rect.x;
+
+ if (left > LayoutConstants.WORLD_BOUNDARY)
+ {
+ left = LayoutConstants.WORLD_BOUNDARY;
+ }
+ else if (left < -LayoutConstants.WORLD_BOUNDARY)
+ {
+ left = -LayoutConstants.WORLD_BOUNDARY;
+ }
+
+ var top = this.rect.y;
+
+ if (top > LayoutConstants.WORLD_BOUNDARY)
+ {
+ top = LayoutConstants.WORLD_BOUNDARY;
+ }
+ else if (top < -LayoutConstants.WORLD_BOUNDARY)
+ {
+ top = -LayoutConstants.WORLD_BOUNDARY;
+ }
+
+ var leftTop = new PointD(left, top);
+ var vLeftTop = trans.inverseTransformPoint(leftTop);
+
+ this.setLocation(vLeftTop.x, vLeftTop.y);
+};
+
+LNode.prototype.getLeft = function ()
+{
+ return this.rect.x;
+};
+
+LNode.prototype.getRight = function ()
+{
+ return this.rect.x + this.rect.width;
+};
+
+LNode.prototype.getTop = function ()
+{
+ return this.rect.y;
+};
+
+LNode.prototype.getBottom = function ()
+{
+ return this.rect.y + this.rect.height;
+};
+
+LNode.prototype.getParent = function ()
+{
+ if (this.owner == null)
+ {
+ return null;
+ }
+
+ return this.owner.getParent();
+};
+
+module.exports = LNode;
diff --git a/node_modules/layout-base/src/Layout.js b/node_modules/layout-base/src/Layout.js
new file mode 100644
index 00000000..50731372
--- /dev/null
+++ b/node_modules/layout-base/src/Layout.js
@@ -0,0 +1,672 @@
+var LayoutConstants = require('./LayoutConstants');
+var LGraphManager = require('./LGraphManager');
+var LNode = require('./LNode');
+var LEdge = require('./LEdge');
+var LGraph = require('./LGraph');
+var PointD = require('./util/PointD');
+var Transform = require('./util/Transform');
+var Emitter = require('./util/Emitter');
+
+function Layout(isRemoteUse) {
+ Emitter.call( this );
+
+ //Layout Quality: 0:draft, 1:default, 2:proof
+ this.layoutQuality = LayoutConstants.QUALITY;
+ //Whether layout should create bendpoints as needed or not
+ this.createBendsAsNeeded =
+ LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED;
+ //Whether layout should be incremental or not
+ this.incremental = LayoutConstants.DEFAULT_INCREMENTAL;
+ //Whether we animate from before to after layout node positions
+ this.animationOnLayout =
+ LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT;
+ //Whether we animate the layout process or not
+ this.animationDuringLayout = LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT;
+ //Number iterations that should be done between two successive animations
+ this.animationPeriod = LayoutConstants.DEFAULT_ANIMATION_PERIOD;
+ /**
+ * Whether or not leaf nodes (non-compound nodes) are of uniform sizes. When
+ * they are, both spring and repulsion forces between two leaf nodes can be
+ * calculated without the expensive clipping point calculations, resulting
+ * in major speed-up.
+ */
+ this.uniformLeafNodeSizes =
+ LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES;
+ /**
+ * This is used for creation of bendpoints by using dummy nodes and edges.
+ * Maps an LEdge to its dummy bendpoint path.
+ */
+ this.edgeToDummyNodes = new Map();
+ this.graphManager = new LGraphManager(this);
+ this.isLayoutFinished = false;
+ this.isSubLayout = false;
+ this.isRemoteUse = false;
+
+ if (isRemoteUse != null) {
+ this.isRemoteUse = isRemoteUse;
+ }
+}
+
+Layout.RANDOM_SEED = 1;
+
+Layout.prototype = Object.create( Emitter.prototype );
+
+Layout.prototype.getGraphManager = function () {
+ return this.graphManager;
+};
+
+Layout.prototype.getAllNodes = function () {
+ return this.graphManager.getAllNodes();
+};
+
+Layout.prototype.getAllEdges = function () {
+ return this.graphManager.getAllEdges();
+};
+
+Layout.prototype.getAllNodesToApplyGravitation = function () {
+ return this.graphManager.getAllNodesToApplyGravitation();
+};
+
+Layout.prototype.newGraphManager = function () {
+ var gm = new LGraphManager(this);
+ this.graphManager = gm;
+ return gm;
+};
+
+Layout.prototype.newGraph = function (vGraph)
+{
+ return new LGraph(null, this.graphManager, vGraph);
+};
+
+Layout.prototype.newNode = function (vNode)
+{
+ return new LNode(this.graphManager, vNode);
+};
+
+Layout.prototype.newEdge = function (vEdge)
+{
+ return new LEdge(null, null, vEdge);
+};
+
+Layout.prototype.checkLayoutSuccess = function() {
+ return (this.graphManager.getRoot() == null)
+ || this.graphManager.getRoot().getNodes().length == 0
+ || this.graphManager.includesInvalidEdge();
+};
+
+Layout.prototype.runLayout = function ()
+{
+ this.isLayoutFinished = false;
+
+ if (this.tilingPreLayout) {
+ this.tilingPreLayout();
+ }
+
+ this.initParameters();
+ var isLayoutSuccessfull;
+
+ if (this.checkLayoutSuccess())
+ {
+ isLayoutSuccessfull = false;
+ }
+ else
+ {
+ isLayoutSuccessfull = this.layout();
+ }
+
+ if (LayoutConstants.ANIMATE === 'during') {
+ // If this is a 'during' layout animation. Layout is not finished yet.
+ // We need to perform these in index.js when layout is really finished.
+ return false;
+ }
+
+ if (isLayoutSuccessfull)
+ {
+ if (!this.isSubLayout)
+ {
+ this.doPostLayout();
+ }
+ }
+
+ if (this.tilingPostLayout) {
+ this.tilingPostLayout();
+ }
+
+ this.isLayoutFinished = true;
+
+ return isLayoutSuccessfull;
+};
+
+/**
+ * This method performs the operations required after layout.
+ */
+Layout.prototype.doPostLayout = function ()
+{
+ //assert !isSubLayout : "Should not be called on sub-layout!";
+ // Propagate geometric changes to v-level objects
+ if(!this.incremental){
+ this.transform();
+ }
+ this.update();
+};
+
+/**
+ * This method updates the geometry of the target graph according to
+ * calculated layout.
+ */
+Layout.prototype.update2 = function () {
+ // update bend points
+ if (this.createBendsAsNeeded)
+ {
+ this.createBendpointsFromDummyNodes();
+
+ // reset all edges, since the topology has changed
+ this.graphManager.resetAllEdges();
+ }
+
+ // perform edge, node and root updates if layout is not called
+ // remotely
+ if (!this.isRemoteUse)
+ {
+ // update all edges
+ var edge;
+ var allEdges = this.graphManager.getAllEdges();
+ for (var i = 0; i < allEdges.length; i++)
+ {
+ edge = allEdges[i];
+// this.update(edge);
+ }
+
+ // recursively update nodes
+ var node;
+ var nodes = this.graphManager.getRoot().getNodes();
+ for (var i = 0; i < nodes.length; i++)
+ {
+ node = nodes[i];
+// this.update(node);
+ }
+
+ // update root graph
+ this.update(this.graphManager.getRoot());
+ }
+};
+
+Layout.prototype.update = function (obj) {
+ if (obj == null) {
+ this.update2();
+ }
+ else if (obj instanceof LNode) {
+ var node = obj;
+ if (node.getChild() != null)
+ {
+ // since node is compound, recursively update child nodes
+ var nodes = node.getChild().getNodes();
+ for (var i = 0; i < nodes.length; i++)
+ {
+ update(nodes[i]);
+ }
+ }
+
+ // if the l-level node is associated with a v-level graph object,
+ // then it is assumed that the v-level node implements the
+ // interface Updatable.
+ if (node.vGraphObject != null)
+ {
+ // cast to Updatable without any type check
+ var vNode = node.vGraphObject;
+
+ // call the update method of the interface
+ vNode.update(node);
+ }
+ }
+ else if (obj instanceof LEdge) {
+ var edge = obj;
+ // if the l-level edge is associated with a v-level graph object,
+ // then it is assumed that the v-level edge implements the
+ // interface Updatable.
+
+ if (edge.vGraphObject != null)
+ {
+ // cast to Updatable without any type check
+ var vEdge = edge.vGraphObject;
+
+ // call the update method of the interface
+ vEdge.update(edge);
+ }
+ }
+ else if (obj instanceof LGraph) {
+ var graph = obj;
+ // if the l-level graph is associated with a v-level graph object,
+ // then it is assumed that the v-level object implements the
+ // interface Updatable.
+
+ if (graph.vGraphObject != null)
+ {
+ // cast to Updatable without any type check
+ var vGraph = graph.vGraphObject;
+
+ // call the update method of the interface
+ vGraph.update(graph);
+ }
+ }
+};
+
+/**
+ * This method is used to set all layout parameters to default values
+ * determined at compile time.
+ */
+Layout.prototype.initParameters = function () {
+ if (!this.isSubLayout)
+ {
+ this.layoutQuality = LayoutConstants.QUALITY;
+ this.animationDuringLayout = LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT;
+ this.animationPeriod = LayoutConstants.DEFAULT_ANIMATION_PERIOD;
+ this.animationOnLayout = LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT;
+ this.incremental = LayoutConstants.DEFAULT_INCREMENTAL;
+ this.createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED;
+ this.uniformLeafNodeSizes = LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES;
+ }
+
+ if (this.animationDuringLayout)
+ {
+ this.animationOnLayout = false;
+ }
+};
+
+Layout.prototype.transform = function (newLeftTop) {
+ if (newLeftTop == undefined) {
+ this.transform(new PointD(0, 0));
+ }
+ else {
+ // create a transformation object (from Eclipse to layout). When an
+ // inverse transform is applied, we get upper-left coordinate of the
+ // drawing or the root graph at given input coordinate (some margins
+ // already included in calculation of left-top).
+
+ var trans = new Transform();
+ var leftTop = this.graphManager.getRoot().updateLeftTop();
+
+ if (leftTop != null)
+ {
+ trans.setWorldOrgX(newLeftTop.x);
+ trans.setWorldOrgY(newLeftTop.y);
+
+ trans.setDeviceOrgX(leftTop.x);
+ trans.setDeviceOrgY(leftTop.y);
+
+ var nodes = this.getAllNodes();
+ var node;
+
+ for (var i = 0; i < nodes.length; i++)
+ {
+ node = nodes[i];
+ node.transform(trans);
+ }
+ }
+ }
+};
+
+Layout.prototype.positionNodesRandomly = function (graph) {
+
+ if (graph == undefined) {
+ //assert !this.incremental;
+ this.positionNodesRandomly(this.getGraphManager().getRoot());
+ this.getGraphManager().getRoot().updateBounds(true);
+ }
+ else {
+ var lNode;
+ var childGraph;
+
+ var nodes = graph.getNodes();
+ for (var i = 0; i < nodes.length; i++)
+ {
+ lNode = nodes[i];
+ childGraph = lNode.getChild();
+
+ if (childGraph == null)
+ {
+ lNode.scatter();
+ }
+ else if (childGraph.getNodes().length == 0)
+ {
+ lNode.scatter();
+ }
+ else
+ {
+ this.positionNodesRandomly(childGraph);
+ lNode.updateBounds();
+ }
+ }
+ }
+};
+
+/**
+ * This method returns a list of trees where each tree is represented as a
+ * list of l-nodes. The method returns a list of size 0 when:
+ * - The graph is not flat or
+ * - One of the component(s) of the graph is not a tree.
+ */
+Layout.prototype.getFlatForest = function ()
+{
+ var flatForest = [];
+ var isForest = true;
+
+ // Quick reference for all nodes in the graph manager associated with
+ // this layout. The list should not be changed.
+ var allNodes = this.graphManager.getRoot().getNodes();
+
+ // First be sure that the graph is flat
+ var isFlat = true;
+
+ for (var i = 0; i < allNodes.length; i++)
+ {
+ if (allNodes[i].getChild() != null)
+ {
+ isFlat = false;
+ }
+ }
+
+ // Return empty forest if the graph is not flat.
+ if (!isFlat)
+ {
+ return flatForest;
+ }
+
+ // Run BFS for each component of the graph.
+
+ var visited = new Set();
+ var toBeVisited = [];
+ var parents = new Map();
+ var unProcessedNodes = [];
+
+ unProcessedNodes = unProcessedNodes.concat(allNodes);
+
+ // Each iteration of this loop finds a component of the graph and
+ // decides whether it is a tree or not. If it is a tree, adds it to the
+ // forest and continued with the next component.
+
+ while (unProcessedNodes.length > 0 && isForest)
+ {
+ toBeVisited.push(unProcessedNodes[0]);
+
+ // Start the BFS. Each iteration of this loop visits a node in a
+ // BFS manner.
+ while (toBeVisited.length > 0 && isForest)
+ {
+ //pool operation
+ var currentNode = toBeVisited[0];
+ toBeVisited.splice(0, 1);
+ visited.add(currentNode);
+
+ // Traverse all neighbors of this node
+ var neighborEdges = currentNode.getEdges();
+
+ for (var i = 0; i < neighborEdges.length; i++)
+ {
+ var currentNeighbor =
+ neighborEdges[i].getOtherEnd(currentNode);
+
+ // If BFS is not growing from this neighbor.
+ if (parents.get(currentNode) != currentNeighbor)
+ {
+ // We haven't previously visited this neighbor.
+ if (!visited.has(currentNeighbor))
+ {
+ toBeVisited.push(currentNeighbor);
+ parents.set(currentNeighbor, currentNode);
+ }
+ // Since we have previously visited this neighbor and
+ // this neighbor is not parent of currentNode, given
+ // graph contains a component that is not tree, hence
+ // it is not a forest.
+ else
+ {
+ isForest = false;
+ break;
+ }
+ }
+ }
+ }
+
+ // The graph contains a component that is not a tree. Empty
+ // previously found trees. The method will end.
+ if (!isForest)
+ {
+ flatForest = [];
+ }
+ // Save currently visited nodes as a tree in our forest. Reset
+ // visited and parents lists. Continue with the next component of
+ // the graph, if any.
+ else
+ {
+ var temp = [...visited];
+ flatForest.push(temp);
+ //flatForest = flatForest.concat(temp);
+ //unProcessedNodes.removeAll(visited);
+ for (var i = 0; i < temp.length; i++) {
+ var value = temp[i];
+ var index = unProcessedNodes.indexOf(value);
+ if (index > -1) {
+ unProcessedNodes.splice(index, 1);
+ }
+ }
+ visited = new Set();
+ parents = new Map();
+ }
+ }
+
+ return flatForest;
+};
+
+/**
+ * This method creates dummy nodes (an l-level node with minimal dimensions)
+ * for the given edge (one per bendpoint). The existing l-level structure
+ * is updated accordingly.
+ */
+Layout.prototype.createDummyNodesForBendpoints = function (edge)
+{
+ var dummyNodes = [];
+ var prev = edge.source;
+
+ var graph = this.graphManager.calcLowestCommonAncestor(edge.source, edge.target);
+
+ for (var i = 0; i < edge.bendpoints.length; i++)
+ {
+ // create new dummy node
+ var dummyNode = this.newNode(null);
+ dummyNode.setRect(new Point(0, 0), new Dimension(1, 1));
+
+ graph.add(dummyNode);
+
+ // create new dummy edge between prev and dummy node
+ var dummyEdge = this.newEdge(null);
+ this.graphManager.add(dummyEdge, prev, dummyNode);
+
+ dummyNodes.add(dummyNode);
+ prev = dummyNode;
+ }
+
+ var dummyEdge = this.newEdge(null);
+ this.graphManager.add(dummyEdge, prev, edge.target);
+
+ this.edgeToDummyNodes.set(edge, dummyNodes);
+
+ // remove real edge from graph manager if it is inter-graph
+ if (edge.isInterGraph())
+ {
+ this.graphManager.remove(edge);
+ }
+ // else, remove the edge from the current graph
+ else
+ {
+ graph.remove(edge);
+ }
+
+ return dummyNodes;
+};
+
+/**
+ * This method creates bendpoints for edges from the dummy nodes
+ * at l-level.
+ */
+Layout.prototype.createBendpointsFromDummyNodes = function ()
+{
+ var edges = [];
+ edges = edges.concat(this.graphManager.getAllEdges());
+ edges = [...this.edgeToDummyNodes.keys()].concat(edges);
+
+ for (var k = 0; k < edges.length; k++)
+ {
+ var lEdge = edges[k];
+
+ if (lEdge.bendpoints.length > 0)
+ {
+ var path = this.edgeToDummyNodes.get(lEdge);
+
+ for (var i = 0; i < path.length; i++)
+ {
+ var dummyNode = path[i];
+ var p = new PointD(dummyNode.getCenterX(),
+ dummyNode.getCenterY());
+
+ // update bendpoint's location according to dummy node
+ var ebp = lEdge.bendpoints.get(i);
+ ebp.x = p.x;
+ ebp.y = p.y;
+
+ // remove the dummy node, dummy edges incident with this
+ // dummy node is also removed (within the remove method)
+ dummyNode.getOwner().remove(dummyNode);
+ }
+
+ // add the real edge to graph
+ this.graphManager.add(lEdge, lEdge.source, lEdge.target);
+ }
+ }
+};
+
+Layout.transform = function (sliderValue, defaultValue, minDiv, maxMul) {
+ if (minDiv != undefined && maxMul != undefined) {
+ var value = defaultValue;
+
+ if (sliderValue <= 50)
+ {
+ var minValue = defaultValue / minDiv;
+ value -= ((defaultValue - minValue) / 50) * (50 - sliderValue);
+ }
+ else
+ {
+ var maxValue = defaultValue * maxMul;
+ value += ((maxValue - defaultValue) / 50) * (sliderValue - 50);
+ }
+
+ return value;
+ }
+ else {
+ var a, b;
+
+ if (sliderValue <= 50)
+ {
+ a = 9.0 * defaultValue / 500.0;
+ b = defaultValue / 10.0;
+ }
+ else
+ {
+ a = 9.0 * defaultValue / 50.0;
+ b = -8 * defaultValue;
+ }
+
+ return (a * sliderValue + b);
+ }
+};
+
+/**
+ * This method finds and returns the center of the given nodes, assuming
+ * that the given nodes form a tree in themselves.
+ */
+Layout.findCenterOfTree = function (nodes)
+{
+ var list = [];
+ list = list.concat(nodes);
+
+ var removedNodes = [];
+ var remainingDegrees = new Map();
+ var foundCenter = false;
+ var centerNode = null;
+
+ if (list.length == 1 || list.length == 2)
+ {
+ foundCenter = true;
+ centerNode = list[0];
+ }
+
+ for (var i = 0; i < list.length; i++)
+ {
+ var node = list[i];
+ var degree = node.getNeighborsList().size;
+ remainingDegrees.set(node, node.getNeighborsList().size);
+
+ if (degree == 1)
+ {
+ removedNodes.push(node);
+ }
+ }
+
+ var tempList = [];
+ tempList = tempList.concat(removedNodes);
+
+ while (!foundCenter)
+ {
+ var tempList2 = [];
+ tempList2 = tempList2.concat(tempList);
+ tempList = [];
+
+ for (var i = 0; i < list.length; i++)
+ {
+ var node = list[i];
+
+ var index = list.indexOf(node);
+ if (index >= 0) {
+ list.splice(index, 1);
+ }
+
+ var neighbours = node.getNeighborsList();
+
+ neighbours.forEach(function(neighbour) {
+ if (removedNodes.indexOf(neighbour) < 0)
+ {
+ var otherDegree = remainingDegrees.get(neighbour);
+ var newDegree = otherDegree - 1;
+
+ if (newDegree == 1)
+ {
+ tempList.push(neighbour);
+ }
+
+ remainingDegrees.set(neighbour, newDegree);
+ }
+ });
+ }
+
+ removedNodes = removedNodes.concat(tempList);
+
+ if (list.length == 1 || list.length == 2)
+ {
+ foundCenter = true;
+ centerNode = list[0];
+ }
+ }
+
+ return centerNode;
+};
+
+/**
+ * During the coarsening process, this layout may be referenced by two graph managers
+ * this setter function grants access to change the currently being used graph manager
+ */
+Layout.prototype.setGraphManager = function (gm)
+{
+ this.graphManager = gm;
+};
+
+module.exports = Layout;
diff --git a/node_modules/layout-base/src/LayoutConstants.js b/node_modules/layout-base/src/LayoutConstants.js
new file mode 100644
index 00000000..c6645820
--- /dev/null
+++ b/node_modules/layout-base/src/LayoutConstants.js
@@ -0,0 +1,70 @@
+function LayoutConstants() {
+}
+
+/**
+ * Layout Quality: 0:draft, 1:default, 2:proof
+ */
+LayoutConstants.QUALITY = 1;
+
+/**
+ * Default parameters
+ */
+LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED = false;
+LayoutConstants.DEFAULT_INCREMENTAL = false;
+LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT = true;
+LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT = false;
+LayoutConstants.DEFAULT_ANIMATION_PERIOD = 50;
+LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES = false;
+
+// -----------------------------------------------------------------------------
+// Section: General other constants
+// -----------------------------------------------------------------------------
+/*
+ * Margins of a graph to be applied on bouding rectangle of its contents. We
+ * assume margins on all four sides to be uniform.
+ */
+LayoutConstants.DEFAULT_GRAPH_MARGIN = 15;
+
+/*
+ * Whether to consider labels in node dimensions or not
+ */
+LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = false;
+
+/*
+ * Default dimension of a non-compound node.
+ */
+LayoutConstants.SIMPLE_NODE_SIZE = 40;
+
+/*
+ * Default dimension of a non-compound node.
+ */
+LayoutConstants.SIMPLE_NODE_HALF_SIZE = LayoutConstants.SIMPLE_NODE_SIZE / 2;
+
+/*
+ * Empty compound node size. When a compound node is empty, its both
+ * dimensions should be of this value.
+ */
+LayoutConstants.EMPTY_COMPOUND_NODE_SIZE = 40;
+
+/*
+ * Minimum length that an edge should take during layout
+ */
+LayoutConstants.MIN_EDGE_LENGTH = 1;
+
+/*
+ * World boundaries that layout operates on
+ */
+LayoutConstants.WORLD_BOUNDARY = 1000000;
+
+/*
+ * World boundaries that random positioning can be performed with
+ */
+LayoutConstants.INITIAL_WORLD_BOUNDARY = LayoutConstants.WORLD_BOUNDARY / 1000;
+
+/*
+ * Coordinates of the world center
+ */
+LayoutConstants.WORLD_CENTER_X = 1200;
+LayoutConstants.WORLD_CENTER_Y = 900;
+
+module.exports = LayoutConstants;
diff --git a/node_modules/layout-base/src/fd/FDLayout.js b/node_modules/layout-base/src/fd/FDLayout.js
new file mode 100644
index 00000000..42a03ff5
--- /dev/null
+++ b/node_modules/layout-base/src/fd/FDLayout.js
@@ -0,0 +1,529 @@
+var Layout = require('../Layout');
+var FDLayoutConstants = require('./FDLayoutConstants');
+var LayoutConstants = require('../LayoutConstants');
+var IGeometry = require('../util/IGeometry');
+var IMath = require('../util/IMath');
+
+function FDLayout() {
+ Layout.call(this);
+
+ this.useSmartIdealEdgeLengthCalculation = FDLayoutConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION;
+ this.gravityConstant = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH;
+ this.compoundGravityConstant = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH;
+ this.gravityRangeFactor = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR;
+ this.compoundGravityRangeFactor = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR;
+ this.displacementThresholdPerNode = (3.0 * FDLayoutConstants.DEFAULT_EDGE_LENGTH) / 100;
+ this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL;
+ this.initialCoolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL;
+ this.totalDisplacement = 0.0;
+ this.oldTotalDisplacement = 0.0;
+ this.maxIterations = FDLayoutConstants.MAX_ITERATIONS;
+}
+
+FDLayout.prototype = Object.create(Layout.prototype);
+
+for (var prop in Layout) {
+ FDLayout[prop] = Layout[prop];
+}
+
+FDLayout.prototype.initParameters = function () {
+ Layout.prototype.initParameters.call(this, arguments);
+
+ this.totalIterations = 0;
+ this.notAnimatedIterations = 0;
+
+ this.useFRGridVariant = FDLayoutConstants.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION;
+
+ this.grid = [];
+};
+
+FDLayout.prototype.calcIdealEdgeLengths = function () {
+ var edge;
+ var originalIdealLength;
+ var lcaDepth;
+ var source;
+ var target;
+ var sizeOfSourceInLca;
+ var sizeOfTargetInLca;
+
+ var allEdges = this.getGraphManager().getAllEdges();
+ for (var i = 0; i < allEdges.length; i++)
+ {
+ edge = allEdges[i];
+
+ originalIdealLength = edge.idealLength;
+
+ if (edge.isInterGraph)
+ {
+ source = edge.getSource();
+ target = edge.getTarget();
+
+ sizeOfSourceInLca = edge.getSourceInLca().getEstimatedSize();
+ sizeOfTargetInLca = edge.getTargetInLca().getEstimatedSize();
+
+ if (this.useSmartIdealEdgeLengthCalculation)
+ {
+ edge.idealLength += sizeOfSourceInLca + sizeOfTargetInLca -
+ 2 * LayoutConstants.SIMPLE_NODE_SIZE;
+ }
+
+ lcaDepth = edge.getLca().getInclusionTreeDepth();
+
+ edge.idealLength += originalIdealLength *
+ FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR *
+ (source.getInclusionTreeDepth() +
+ target.getInclusionTreeDepth() - 2 * lcaDepth);
+ }
+ }
+};
+
+FDLayout.prototype.initSpringEmbedder = function () {
+
+ var s = this.getAllNodes().length;
+ if (this.incremental) {
+ if(s > FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT){
+ this.coolingFactor = Math.max(this.coolingFactor*FDLayoutConstants.COOLING_ADAPTATION_FACTOR, this.coolingFactor -
+ (s-FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT)/(FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT-FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-FDLayoutConstants.COOLING_ADAPTATION_FACTOR));
+ }
+ this.maxNodeDisplacement = FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL;
+ }
+ else {
+ if(s > FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT){
+ this.coolingFactor = Math.max(FDLayoutConstants.COOLING_ADAPTATION_FACTOR, 1.0 -
+ (s-FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT)/(FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT-FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT)*(1-FDLayoutConstants.COOLING_ADAPTATION_FACTOR));
+ }
+ else {
+ this.coolingFactor = 1.0;
+ }
+ this.initialCoolingFactor = this.coolingFactor;
+ this.maxNodeDisplacement = FDLayoutConstants.MAX_NODE_DISPLACEMENT;
+ }
+
+ this.maxIterations =
+ Math.max(this.getAllNodes().length * 5, this.maxIterations);
+
+ // Reassign this attribute by using new constant value
+ this.displacementThresholdPerNode = (3.0 * FDLayoutConstants.DEFAULT_EDGE_LENGTH) / 100;
+ this.totalDisplacementThreshold = this.displacementThresholdPerNode * this.getAllNodes().length;
+
+ this.repulsionRange = this.calcRepulsionRange();
+};
+
+FDLayout.prototype.calcSpringForces = function () {
+ var lEdges = this.getAllEdges();
+ var edge;
+
+ for (var i = 0; i < lEdges.length; i++)
+ {
+ edge = lEdges[i];
+
+ this.calcSpringForce(edge, edge.idealLength);
+ }
+};
+
+FDLayout.prototype.calcRepulsionForces = function (gridUpdateAllowed = true, forceToNodeSurroundingUpdate = false) {
+ var i, j;
+ var nodeA, nodeB;
+ var lNodes = this.getAllNodes();
+ var processedNodeSet;
+
+ if (this.useFRGridVariant)
+ {
+ if ((this.totalIterations % FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD == 1 && gridUpdateAllowed))
+ {
+ this.updateGrid();
+ }
+
+ processedNodeSet = new Set();
+
+ // calculate repulsion forces between each nodes and its surrounding
+ for (i = 0; i < lNodes.length; i++)
+ {
+ nodeA = lNodes[i];
+ this.calculateRepulsionForceOfANode(nodeA, processedNodeSet, gridUpdateAllowed, forceToNodeSurroundingUpdate);
+ processedNodeSet.add(nodeA);
+ }
+ }
+ else
+ {
+ for (i = 0; i < lNodes.length; i++)
+ {
+ nodeA = lNodes[i];
+
+ for (j = i + 1; j < lNodes.length; j++)
+ {
+ nodeB = lNodes[j];
+
+ // If both nodes are not members of the same graph, skip.
+ if (nodeA.getOwner() != nodeB.getOwner())
+ {
+ continue;
+ }
+
+ this.calcRepulsionForce(nodeA, nodeB);
+ }
+ }
+ }
+};
+
+FDLayout.prototype.calcGravitationalForces = function () {
+ var node;
+ var lNodes = this.getAllNodesToApplyGravitation();
+
+ for (var i = 0; i < lNodes.length; i++)
+ {
+ node = lNodes[i];
+ this.calcGravitationalForce(node);
+ }
+};
+
+FDLayout.prototype.moveNodes = function () {
+ var lNodes = this.getAllNodes();
+ var node;
+
+ for (var i = 0; i < lNodes.length; i++)
+ {
+ node = lNodes[i];
+ node.move();
+ }
+}
+
+FDLayout.prototype.calcSpringForce = function (edge, idealLength) {
+ var sourceNode = edge.getSource();
+ var targetNode = edge.getTarget();
+
+ var length;
+ var springForce;
+ var springForceX;
+ var springForceY;
+
+ // Update edge length
+ if (this.uniformLeafNodeSizes &&
+ sourceNode.getChild() == null && targetNode.getChild() == null)
+ {
+ edge.updateLengthSimple();
+ }
+ else
+ {
+ edge.updateLength();
+
+ if (edge.isOverlapingSourceAndTarget)
+ {
+ return;
+ }
+ }
+
+ length = edge.getLength();
+
+ if(length == 0)
+ return;
+
+ // Calculate spring forces
+ springForce = edge.edgeElasticity * (length - idealLength);
+
+ // Project force onto x and y axes
+ springForceX = springForce * (edge.lengthX / length);
+ springForceY = springForce * (edge.lengthY / length);
+
+ // Apply forces on the end nodes
+ sourceNode.springForceX += springForceX;
+ sourceNode.springForceY += springForceY;
+ targetNode.springForceX -= springForceX;
+ targetNode.springForceY -= springForceY;
+};
+
+FDLayout.prototype.calcRepulsionForce = function (nodeA, nodeB) {
+ var rectA = nodeA.getRect();
+ var rectB = nodeB.getRect();
+ var overlapAmount = new Array(2);
+ var clipPoints = new Array(4);
+ var distanceX;
+ var distanceY;
+ var distanceSquared;
+ var distance;
+ var repulsionForce;
+ var repulsionForceX;
+ var repulsionForceY;
+
+ if (rectA.intersects(rectB))// two nodes overlap
+ {
+ // calculate separation amount in x and y directions
+ IGeometry.calcSeparationAmount(rectA,
+ rectB,
+ overlapAmount,
+ FDLayoutConstants.DEFAULT_EDGE_LENGTH / 2.0);
+
+ repulsionForceX = 2 * overlapAmount[0];
+ repulsionForceY = 2 * overlapAmount[1];
+
+ var childrenConstant = nodeA.noOfChildren * nodeB.noOfChildren / (nodeA.noOfChildren + nodeB.noOfChildren);
+
+ // Apply forces on the two nodes
+ nodeA.repulsionForceX -= childrenConstant * repulsionForceX;
+ nodeA.repulsionForceY -= childrenConstant * repulsionForceY;
+ nodeB.repulsionForceX += childrenConstant * repulsionForceX;
+ nodeB.repulsionForceY += childrenConstant * repulsionForceY;
+ }
+ else// no overlap
+ {
+ // calculate distance
+
+ if (this.uniformLeafNodeSizes &&
+ nodeA.getChild() == null && nodeB.getChild() == null)// simply base repulsion on distance of node centers
+ {
+ distanceX = rectB.getCenterX() - rectA.getCenterX();
+ distanceY = rectB.getCenterY() - rectA.getCenterY();
+ }
+ else// use clipping points
+ {
+ IGeometry.getIntersection(rectA, rectB, clipPoints);
+
+ distanceX = clipPoints[2] - clipPoints[0];
+ distanceY = clipPoints[3] - clipPoints[1];
+ }
+
+ // No repulsion range. FR grid variant should take care of this.
+ if (Math.abs(distanceX) < FDLayoutConstants.MIN_REPULSION_DIST)
+ {
+ distanceX = IMath.sign(distanceX) *
+ FDLayoutConstants.MIN_REPULSION_DIST;
+ }
+
+ if (Math.abs(distanceY) < FDLayoutConstants.MIN_REPULSION_DIST)
+ {
+ distanceY = IMath.sign(distanceY) *
+ FDLayoutConstants.MIN_REPULSION_DIST;
+ }
+
+ distanceSquared = distanceX * distanceX + distanceY * distanceY;
+ distance = Math.sqrt(distanceSquared);
+
+ // Here we use half of the nodes' repulsion values for backward compatibility
+ repulsionForce = (nodeA.nodeRepulsion / 2 + nodeB.nodeRepulsion / 2) * nodeA.noOfChildren * nodeB.noOfChildren / distanceSquared;
+
+ // Project force onto x and y axes
+ repulsionForceX = repulsionForce * distanceX / distance;
+ repulsionForceY = repulsionForce * distanceY / distance;
+
+ // Apply forces on the two nodes
+ nodeA.repulsionForceX -= repulsionForceX;
+ nodeA.repulsionForceY -= repulsionForceY;
+ nodeB.repulsionForceX += repulsionForceX;
+ nodeB.repulsionForceY += repulsionForceY;
+ }
+};
+
+FDLayout.prototype.calcGravitationalForce = function (node) {
+ var ownerGraph;
+ var ownerCenterX;
+ var ownerCenterY;
+ var distanceX;
+ var distanceY;
+ var absDistanceX;
+ var absDistanceY;
+ var estimatedSize;
+ ownerGraph = node.getOwner();
+
+ ownerCenterX = (ownerGraph.getRight() + ownerGraph.getLeft()) / 2;
+ ownerCenterY = (ownerGraph.getTop() + ownerGraph.getBottom()) / 2;
+ distanceX = node.getCenterX() - ownerCenterX;
+ distanceY = node.getCenterY() - ownerCenterY;
+ absDistanceX = Math.abs(distanceX) + node.getWidth() / 2;
+ absDistanceY = Math.abs(distanceY) + node.getHeight() / 2;
+
+ if (node.getOwner() == this.graphManager.getRoot())// in the root graph
+ {
+ estimatedSize = ownerGraph.getEstimatedSize() * this.gravityRangeFactor;
+
+ if (absDistanceX > estimatedSize || absDistanceY > estimatedSize)
+ {
+ node.gravitationForceX = -this.gravityConstant * distanceX;
+ node.gravitationForceY = -this.gravityConstant * distanceY;
+ }
+ }
+ else// inside a compound
+ {
+ estimatedSize = ownerGraph.getEstimatedSize() * this.compoundGravityRangeFactor;
+
+ if (absDistanceX > estimatedSize || absDistanceY > estimatedSize)
+ {
+ node.gravitationForceX = -this.gravityConstant * distanceX *
+ this.compoundGravityConstant;
+ node.gravitationForceY = -this.gravityConstant * distanceY *
+ this.compoundGravityConstant;
+ }
+ }
+};
+
+FDLayout.prototype.isConverged = function () {
+ var converged;
+ var oscilating = false;
+
+ if (this.totalIterations > this.maxIterations / 3)
+ {
+ oscilating =
+ Math.abs(this.totalDisplacement - this.oldTotalDisplacement) < 2;
+ }
+
+ converged = this.totalDisplacement < this.totalDisplacementThreshold;
+
+ this.oldTotalDisplacement = this.totalDisplacement;
+
+ return converged || oscilating;
+};
+
+FDLayout.prototype.animate = function () {
+ if (this.animationDuringLayout && !this.isSubLayout)
+ {
+ if (this.notAnimatedIterations == this.animationPeriod)
+ {
+ this.update();
+ this.notAnimatedIterations = 0;
+ }
+ else
+ {
+ this.notAnimatedIterations++;
+ }
+ }
+};
+
+//This method calculates the number of children (weight) for all nodes
+FDLayout.prototype.calcNoOfChildrenForAllNodes = function ()
+{
+ var node;
+ var allNodes = this.graphManager.getAllNodes();
+
+ for(var i = 0; i < allNodes.length; i++)
+ {
+ node = allNodes[i];
+ node.noOfChildren = node.getNoOfChildren();
+ }
+};
+
+// -----------------------------------------------------------------------------
+// Section: FR-Grid Variant Repulsion Force Calculation
+// -----------------------------------------------------------------------------
+
+FDLayout.prototype.calcGrid = function (graph){
+
+ var sizeX = 0;
+ var sizeY = 0;
+
+ sizeX = parseInt(Math.ceil((graph.getRight() - graph.getLeft()) / this.repulsionRange));
+ sizeY = parseInt(Math.ceil((graph.getBottom() - graph.getTop()) / this.repulsionRange));
+
+ var grid = new Array(sizeX);
+
+ for(var i = 0; i < sizeX; i++){
+ grid[i] = new Array(sizeY);
+ }
+
+ for(var i = 0; i < sizeX; i++){
+ for(var j = 0; j < sizeY; j++){
+ grid[i][j] = new Array();
+ }
+ }
+
+ return grid;
+};
+
+FDLayout.prototype.addNodeToGrid = function (v, left, top){
+
+ var startX = 0;
+ var finishX = 0;
+ var startY = 0;
+ var finishY = 0;
+
+ startX = parseInt(Math.floor((v.getRect().x - left) / this.repulsionRange));
+ finishX = parseInt(Math.floor((v.getRect().width + v.getRect().x - left) / this.repulsionRange));
+ startY = parseInt(Math.floor((v.getRect().y - top) / this.repulsionRange));
+ finishY = parseInt(Math.floor((v.getRect().height + v.getRect().y - top) / this.repulsionRange));
+
+ for (var i = startX; i <= finishX; i++)
+ {
+ for (var j = startY; j <= finishY; j++)
+ {
+ this.grid[i][j].push(v);
+ v.setGridCoordinates(startX, finishX, startY, finishY);
+ }
+ }
+
+};
+
+FDLayout.prototype.updateGrid = function() {
+ var i;
+ var nodeA;
+ var lNodes = this.getAllNodes();
+
+ this.grid = this.calcGrid(this.graphManager.getRoot());
+
+ // put all nodes to proper grid cells
+ for (i = 0; i < lNodes.length; i++)
+ {
+ nodeA = lNodes[i];
+ this.addNodeToGrid(nodeA, this.graphManager.getRoot().getLeft(), this.graphManager.getRoot().getTop());
+ }
+
+};
+
+FDLayout.prototype.calculateRepulsionForceOfANode = function (nodeA, processedNodeSet, gridUpdateAllowed, forceToNodeSurroundingUpdate){
+
+ if ((this.totalIterations % FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD == 1 && gridUpdateAllowed) || forceToNodeSurroundingUpdate)
+ {
+ var surrounding = new Set();
+ nodeA.surrounding = new Array();
+ var nodeB;
+ var grid = this.grid;
+
+ for (var i = (nodeA.startX - 1); i < (nodeA.finishX + 2); i++)
+ {
+ for (var j = (nodeA.startY - 1); j < (nodeA.finishY + 2); j++)
+ {
+ if (!((i < 0) || (j < 0) || (i >= grid.length) || (j >= grid[0].length)))
+ {
+ for (var k = 0; k < grid[i][j].length; k++) {
+ nodeB = grid[i][j][k];
+
+ // If both nodes are not members of the same graph,
+ // or both nodes are the same, skip.
+ if ((nodeA.getOwner() != nodeB.getOwner()) || (nodeA == nodeB))
+ {
+ continue;
+ }
+
+ // check if the repulsion force between
+ // nodeA and nodeB has already been calculated
+ if (!processedNodeSet.has(nodeB) && !surrounding.has(nodeB))
+ {
+ var distanceX = Math.abs(nodeA.getCenterX()-nodeB.getCenterX()) -
+ ((nodeA.getWidth()/2) + (nodeB.getWidth()/2));
+ var distanceY = Math.abs(nodeA.getCenterY()-nodeB.getCenterY()) -
+ ((nodeA.getHeight()/2) + (nodeB.getHeight()/2));
+
+ // if the distance between nodeA and nodeB
+ // is less then calculation range
+ if ((distanceX <= this.repulsionRange) && (distanceY <= this.repulsionRange))
+ {
+ //then add nodeB to surrounding of nodeA
+ surrounding.add(nodeB);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ nodeA.surrounding = [...surrounding];
+
+ }
+ for (i = 0; i < nodeA.surrounding.length; i++)
+ {
+ this.calcRepulsionForce(nodeA, nodeA.surrounding[i]);
+ }
+};
+
+FDLayout.prototype.calcRepulsionRange = function () {
+ return 0.0;
+};
+
+module.exports = FDLayout;
diff --git a/node_modules/layout-base/src/fd/FDLayoutConstants.js b/node_modules/layout-base/src/fd/FDLayoutConstants.js
new file mode 100644
index 00000000..35982be9
--- /dev/null
+++ b/node_modules/layout-base/src/fd/FDLayoutConstants.js
@@ -0,0 +1,34 @@
+var LayoutConstants = require('../LayoutConstants');
+
+function FDLayoutConstants() {
+}
+
+//FDLayoutConstants inherits static props in LayoutConstants
+for (var prop in LayoutConstants) {
+ FDLayoutConstants[prop] = LayoutConstants[prop];
+}
+
+FDLayoutConstants.MAX_ITERATIONS = 2500;
+
+FDLayoutConstants.DEFAULT_EDGE_LENGTH = 50;
+FDLayoutConstants.DEFAULT_SPRING_STRENGTH = 0.45;
+FDLayoutConstants.DEFAULT_REPULSION_STRENGTH = 4500.0;
+FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH = 0.4;
+FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = 1.0;
+FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR = 3.8;
+FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = 1.5;
+FDLayoutConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION = true;
+FDLayoutConstants.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION = true;
+FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = 0.3;
+FDLayoutConstants.COOLING_ADAPTATION_FACTOR = 0.33;
+FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT = 1000;
+FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT = 5000;
+FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL = 100.0;
+FDLayoutConstants.MAX_NODE_DISPLACEMENT = FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL * 3;
+FDLayoutConstants.MIN_REPULSION_DIST = FDLayoutConstants.DEFAULT_EDGE_LENGTH / 10.0;
+FDLayoutConstants.CONVERGENCE_CHECK_PERIOD = 100;
+FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = 0.1;
+FDLayoutConstants.MIN_EDGE_LENGTH = 1;
+FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD = 10;
+
+module.exports = FDLayoutConstants;
diff --git a/node_modules/layout-base/src/fd/FDLayoutEdge.js b/node_modules/layout-base/src/fd/FDLayoutEdge.js
new file mode 100644
index 00000000..b04ce287
--- /dev/null
+++ b/node_modules/layout-base/src/fd/FDLayoutEdge.js
@@ -0,0 +1,18 @@
+var LEdge = require('../LEdge');
+var FDLayoutConstants = require('./FDLayoutConstants');
+
+function FDLayoutEdge(source, target, vEdge) {
+ LEdge.call(this, source, target, vEdge);
+
+ // Ideal length and elasticity value for this edge
+ this.idealLength = FDLayoutConstants.DEFAULT_EDGE_LENGTH;
+ this.edgeElasticity = FDLayoutConstants.DEFAULT_SPRING_STRENGTH;
+}
+
+FDLayoutEdge.prototype = Object.create(LEdge.prototype);
+
+for (var prop in LEdge) {
+ FDLayoutEdge[prop] = LEdge[prop];
+}
+
+module.exports = FDLayoutEdge;
diff --git a/node_modules/layout-base/src/fd/FDLayoutNode.js b/node_modules/layout-base/src/fd/FDLayoutNode.js
new file mode 100644
index 00000000..aa0f8bae
--- /dev/null
+++ b/node_modules/layout-base/src/fd/FDLayoutNode.js
@@ -0,0 +1,47 @@
+var LNode = require('../LNode');
+var FDLayoutConstants = require('./FDLayoutConstants');
+
+function FDLayoutNode(gm, loc, size, vNode) {
+ // alternative constructor is handled inside LNode
+ LNode.call(this, gm, loc, size, vNode);
+
+ // Repulsion value of this node
+ this.nodeRepulsion = FDLayoutConstants.DEFAULT_REPULSION_STRENGTH;
+
+ //Spring, repulsion and gravitational forces acting on this node
+ this.springForceX = 0;
+ this.springForceY = 0;
+ this.repulsionForceX = 0;
+ this.repulsionForceY = 0;
+ this.gravitationForceX = 0;
+ this.gravitationForceY = 0;
+ //Amount by which this node is to be moved in this iteration
+ this.displacementX = 0;
+ this.displacementY = 0;
+
+ //Start and finish grid coordinates that this node is fallen into
+ this.startX = 0;
+ this.finishX = 0;
+ this.startY = 0;
+ this.finishY = 0;
+
+ //Geometric neighbors of this node
+ this.surrounding = [];
+}
+
+FDLayoutNode.prototype = Object.create(LNode.prototype);
+
+for (var prop in LNode) {
+ FDLayoutNode[prop] = LNode[prop];
+}
+
+FDLayoutNode.prototype.setGridCoordinates = function (_startX, _finishX, _startY, _finishY)
+{
+ this.startX = _startX;
+ this.finishX = _finishX;
+ this.startY = _startY;
+ this.finishY = _finishY;
+
+};
+
+module.exports = FDLayoutNode;
diff --git a/node_modules/layout-base/src/util/DimensionD.js b/node_modules/layout-base/src/util/DimensionD.js
new file mode 100644
index 00000000..8632401e
--- /dev/null
+++ b/node_modules/layout-base/src/util/DimensionD.js
@@ -0,0 +1,30 @@
+function DimensionD(width, height) {
+ this.width = 0;
+ this.height = 0;
+ if (width !== null && height !== null) {
+ this.height = height;
+ this.width = width;
+ }
+}
+
+DimensionD.prototype.getWidth = function ()
+{
+ return this.width;
+};
+
+DimensionD.prototype.setWidth = function (width)
+{
+ this.width = width;
+};
+
+DimensionD.prototype.getHeight = function ()
+{
+ return this.height;
+};
+
+DimensionD.prototype.setHeight = function (height)
+{
+ this.height = height;
+};
+
+module.exports = DimensionD;
diff --git a/node_modules/layout-base/src/util/Emitter.js b/node_modules/layout-base/src/util/Emitter.js
new file mode 100644
index 00000000..b4d4934c
--- /dev/null
+++ b/node_modules/layout-base/src/util/Emitter.js
@@ -0,0 +1,34 @@
+function Emitter(){
+ this.listeners = [];
+}
+
+var p = Emitter.prototype;
+
+p.addListener = function( event, callback ){
+ this.listeners.push({
+ event: event,
+ callback: callback
+ });
+};
+
+p.removeListener = function( event, callback ){
+ for( var i = this.listeners.length; i >= 0; i-- ){
+ var l = this.listeners[i];
+
+ if( l.event === event && l.callback === callback ){
+ this.listeners.splice( i, 1 );
+ }
+ }
+};
+
+p.emit = function( event, data ){
+ for( var i = 0; i < this.listeners.length; i++ ){
+ var l = this.listeners[i];
+
+ if( event === l.event ){
+ l.callback( data );
+ }
+ }
+};
+
+module.exports = Emitter;
diff --git a/node_modules/layout-base/src/util/HashMap.js b/node_modules/layout-base/src/util/HashMap.js
new file mode 100644
index 00000000..0d8ad3e2
--- /dev/null
+++ b/node_modules/layout-base/src/util/HashMap.js
@@ -0,0 +1,30 @@
+var UniqueIDGeneretor = require('./UniqueIDGeneretor');
+
+function HashMap() {
+ this.map = {};
+ this.keys = [];
+}
+
+HashMap.prototype.put = function (key, value) {
+ var theId = UniqueIDGeneretor.createID(key);
+ if (!this.contains(theId)) {
+ this.map[theId] = value;
+ this.keys.push(key);
+ }
+};
+
+HashMap.prototype.contains = function (key) {
+ var theId = UniqueIDGeneretor.createID(key);
+ return this.map[key] != null;
+};
+
+HashMap.prototype.get = function (key) {
+ var theId = UniqueIDGeneretor.createID(key);
+ return this.map[theId];
+};
+
+HashMap.prototype.keySet = function () {
+ return this.keys;
+};
+
+module.exports = HashMap;
diff --git a/node_modules/layout-base/src/util/HashSet.js b/node_modules/layout-base/src/util/HashSet.js
new file mode 100644
index 00000000..84c23fc6
--- /dev/null
+++ b/node_modules/layout-base/src/util/HashSet.js
@@ -0,0 +1,55 @@
+var UniqueIDGeneretor = require('./UniqueIDGeneretor');
+
+function HashSet() {
+ this.set = {};
+}
+;
+
+HashSet.prototype.add = function (obj) {
+ var theId = UniqueIDGeneretor.createID(obj);
+ if (!this.contains(theId))
+ this.set[theId] = obj;
+};
+
+HashSet.prototype.remove = function (obj) {
+ delete this.set[UniqueIDGeneretor.createID(obj)];
+};
+
+HashSet.prototype.clear = function () {
+ this.set = {};
+};
+
+HashSet.prototype.contains = function (obj) {
+ return this.set[UniqueIDGeneretor.createID(obj)] == obj;
+};
+
+HashSet.prototype.isEmpty = function () {
+ return this.size() === 0;
+};
+
+HashSet.prototype.size = function () {
+ return Object.keys(this.set).length;
+};
+
+//concats this.set to the given list
+HashSet.prototype.addAllTo = function (list) {
+ var keys = Object.keys(this.set);
+ var length = keys.length;
+ for (var i = 0; i < length; i++) {
+ list.push(this.set[keys[i]]);
+ }
+};
+
+HashSet.prototype.size = function () {
+ return Object.keys(this.set).length;
+};
+
+HashSet.prototype.addAll = function (list) {
+ var s = list.length;
+ for (var i = 0; i < s; i++) {
+ var v = list[i];
+ this.add(v);
+ }
+};
+
+module.exports = HashSet;
diff --git a/node_modules/layout-base/src/util/IGeometry.js b/node_modules/layout-base/src/util/IGeometry.js
new file mode 100644
index 00000000..b7fec84b
--- /dev/null
+++ b/node_modules/layout-base/src/util/IGeometry.js
@@ -0,0 +1,621 @@
+/**
+ * This class maintains a list of static geometry related utility methods.
+ *
+ *
+ * Copyright: i-Vis Research Group, Bilkent University, 2007 - present
+ */
+
+const Point = require('./Point');
+
+function IGeometry() {
+
+}
+
+/**
+ * This method calculates *half* the amount in x and y directions of the two
+ * input rectangles needed to separate them keeping their respective
+ * positioning, and returns the result in the input array. An input
+ * separation buffer added to the amount in both directions. We assume that
+ * the two rectangles do intersect.
+ */
+IGeometry.calcSeparationAmount = function (rectA, rectB, overlapAmount, separationBuffer)
+{
+ if (!rectA.intersects(rectB)) {
+ throw "assert failed";
+ }
+
+ let directions = new Array(2);
+
+ this.decideDirectionsForOverlappingNodes(rectA, rectB, directions);
+
+ overlapAmount[0] = Math.min(rectA.getRight(), rectB.getRight()) -
+ Math.max(rectA.x, rectB.x);
+ overlapAmount[1] = Math.min(rectA.getBottom(), rectB.getBottom()) -
+ Math.max(rectA.y, rectB.y);
+
+ // update the overlapping amounts for the following cases:
+ if ((rectA.getX() <= rectB.getX()) && (rectA.getRight() >= rectB.getRight()))
+ {
+ /* Case x.1:
+ *
+ * rectA
+ * | |
+ * | _________ |
+ * | | | |
+ * |________|_______|______|
+ * | |
+ * | |
+ * rectB
+ */
+ overlapAmount[0] += Math.min((rectB.getX() - rectA.getX()),
+ (rectA.getRight() - rectB.getRight()));
+ }
+ else if ((rectB.getX() <= rectA.getX()) && (rectB.getRight() >= rectA.getRight()))
+ {
+ /* Case x.2:
+ *
+ * rectB
+ * | |
+ * | _________ |
+ * | | | |
+ * |________|_______|______|
+ * | |
+ * | |
+ * rectA
+ */
+ overlapAmount[0] += Math.min((rectA.getX() - rectB.getX()),
+ (rectB.getRight() - rectA.getRight()));
+ }
+ if ((rectA.getY() <= rectB.getY()) && (rectA.getBottom() >= rectB.getBottom()))
+ {
+ /* Case y.1:
+ * ________ rectA
+ * |
+ * |
+ * ______|____ rectB
+ * | |
+ * | |
+ * ______|____|
+ * |
+ * |
+ * |________
+ *
+ */
+ overlapAmount[1] += Math.min((rectB.getY() - rectA.getY()),
+ (rectA.getBottom() - rectB.getBottom()));
+ }
+ else if ((rectB.getY() <= rectA.getY()) && (rectB.getBottom() >= rectA.getBottom()))
+ {
+ /* Case y.2:
+ * ________ rectB
+ * |
+ * |
+ * ______|____ rectA
+ * | |
+ * | |
+ * ______|____|
+ * |
+ * |
+ * |________
+ *
+ */
+ overlapAmount[1] += Math.min((rectA.getY() - rectB.getY()),
+ (rectB.getBottom() - rectA.getBottom()));
+ }
+
+ // find slope of the line passes two centers
+ let slope = Math.abs((rectB.getCenterY() - rectA.getCenterY()) /
+ (rectB.getCenterX() - rectA.getCenterX()));
+ // if centers are overlapped
+ if ((rectB.getCenterY() === rectA.getCenterY()) &&
+ (rectB.getCenterX() === rectA.getCenterX()))
+ {
+ // assume the slope is 1 (45 degree)
+ slope = 1.0;
+ }
+
+ let moveByY = slope * overlapAmount[0];
+ let moveByX = overlapAmount[1] / slope;
+ if (overlapAmount[0] < moveByX)
+ {
+ moveByX = overlapAmount[0];
+ }
+ else
+ {
+ moveByY = overlapAmount[1];
+ }
+ // return half the amount so that if each rectangle is moved by these
+ // amounts in opposite directions, overlap will be resolved
+ overlapAmount[0] = -1 * directions[0] * ((moveByX / 2) + separationBuffer);
+ overlapAmount[1] = -1 * directions[1] * ((moveByY / 2) + separationBuffer);
+};
+
+/**
+ * This method decides the separation direction of overlapping nodes
+ *
+ * if directions[0] = -1, then rectA goes left
+ * if directions[0] = 1, then rectA goes right
+ * if directions[1] = -1, then rectA goes up
+ * if directions[1] = 1, then rectA goes down
+ */
+IGeometry.decideDirectionsForOverlappingNodes = function (rectA, rectB, directions)
+{
+ if (rectA.getCenterX() < rectB.getCenterX())
+ {
+ directions[0] = -1;
+ }
+ else
+ {
+ directions[0] = 1;
+ }
+
+ if (rectA.getCenterY() < rectB.getCenterY())
+ {
+ directions[1] = -1;
+ }
+ else
+ {
+ directions[1] = 1;
+ }
+};
+
+/**
+ * This method calculates the intersection (clipping) points of the two
+ * input rectangles with line segment defined by the centers of these two
+ * rectangles. The clipping points are saved in the input double array and
+ * whether or not the two rectangles overlap is returned.
+ */
+IGeometry.getIntersection2 = function(rectA, rectB, result)
+{
+ //result[0-1] will contain clipPoint of rectA, result[2-3] will contain clipPoint of rectB
+ let p1x = rectA.getCenterX();
+ let p1y = rectA.getCenterY();
+ let p2x = rectB.getCenterX();
+ let p2y = rectB.getCenterY();
+
+ //if two rectangles intersect, then clipping points are centers
+ if (rectA.intersects(rectB))
+ {
+ result[0] = p1x;
+ result[1] = p1y;
+ result[2] = p2x;
+ result[3] = p2y;
+ return true;
+ }
+ //variables for rectA
+ let topLeftAx = rectA.getX();
+ let topLeftAy = rectA.getY();
+ let topRightAx = rectA.getRight();
+ let bottomLeftAx = rectA.getX();
+ let bottomLeftAy = rectA.getBottom();
+ let bottomRightAx = rectA.getRight();
+ let halfWidthA = rectA.getWidthHalf();
+ let halfHeightA = rectA.getHeightHalf();
+ //variables for rectB
+ let topLeftBx = rectB.getX();
+ let topLeftBy = rectB.getY();
+ let topRightBx = rectB.getRight();
+ let bottomLeftBx = rectB.getX();
+ let bottomLeftBy = rectB.getBottom();
+ let bottomRightBx = rectB.getRight();
+ let halfWidthB = rectB.getWidthHalf();
+ let halfHeightB = rectB.getHeightHalf();
+
+ //flag whether clipping points are found
+ let clipPointAFound = false;
+ let clipPointBFound = false;
+
+ // line is vertical
+ if (p1x === p2x)
+ {
+ if (p1y > p2y)
+ {
+ result[0] = p1x;
+ result[1] = topLeftAy;
+ result[2] = p2x;
+ result[3] = bottomLeftBy;
+ return false;
+ }
+ else if (p1y < p2y)
+ {
+ result[0] = p1x;
+ result[1] = bottomLeftAy;
+ result[2] = p2x;
+ result[3] = topLeftBy;
+ return false;
+ }
+ else
+ {
+ //not line, return null;
+ }
+ }
+ // line is horizontal
+ else if (p1y === p2y)
+ {
+ if (p1x > p2x)
+ {
+ result[0] = topLeftAx;
+ result[1] = p1y;
+ result[2] = topRightBx;
+ result[3] = p2y;
+ return false;
+ }
+ else if (p1x < p2x)
+ {
+ result[0] = topRightAx;
+ result[1] = p1y;
+ result[2] = topLeftBx;
+ result[3] = p2y;
+ return false;
+ }
+ else
+ {
+ //not valid line, return null;
+ }
+ }
+ else
+ {
+ //slopes of rectA's and rectB's diagonals
+ let slopeA = rectA.height / rectA.width;
+ let slopeB = rectB.height / rectB.width;
+
+ //slope of line between center of rectA and center of rectB
+ let slopePrime = (p2y - p1y) / (p2x - p1x);
+ let cardinalDirectionA;
+ let cardinalDirectionB;
+ let tempPointAx;
+ let tempPointAy;
+ let tempPointBx;
+ let tempPointBy;
+
+ //determine whether clipping point is the corner of nodeA
+ if ((-slopeA) === slopePrime)
+ {
+ if (p1x > p2x)
+ {
+ result[0] = bottomLeftAx;
+ result[1] = bottomLeftAy;
+ clipPointAFound = true;
+ }
+ else
+ {
+ result[0] = topRightAx;
+ result[1] = topLeftAy;
+ clipPointAFound = true;
+ }
+ }
+ else if (slopeA === slopePrime)
+ {
+ if (p1x > p2x)
+ {
+ result[0] = topLeftAx;
+ result[1] = topLeftAy;
+ clipPointAFound = true;
+ }
+ else
+ {
+ result[0] = bottomRightAx;
+ result[1] = bottomLeftAy;
+ clipPointAFound = true;
+ }
+ }
+
+ //determine whether clipping point is the corner of nodeB
+ if ((-slopeB) === slopePrime)
+ {
+ if (p2x > p1x)
+ {
+ result[2] = bottomLeftBx;
+ result[3] = bottomLeftBy;
+ clipPointBFound = true;
+ }
+ else
+ {
+ result[2] = topRightBx;
+ result[3] = topLeftBy;
+ clipPointBFound = true;
+ }
+ }
+ else if (slopeB === slopePrime)
+ {
+ if (p2x > p1x)
+ {
+ result[2] = topLeftBx;
+ result[3] = topLeftBy;
+ clipPointBFound = true;
+ }
+ else
+ {
+ result[2] = bottomRightBx;
+ result[3] = bottomLeftBy;
+ clipPointBFound = true;
+ }
+ }
+
+ //if both clipping points are corners
+ if (clipPointAFound && clipPointBFound)
+ {
+ return false;
+ }
+
+ //determine Cardinal Direction of rectangles
+ if (p1x > p2x)
+ {
+ if (p1y > p2y)
+ {
+ cardinalDirectionA = this.getCardinalDirection(slopeA, slopePrime, 4);
+ cardinalDirectionB = this.getCardinalDirection(slopeB, slopePrime, 2);
+ }
+ else
+ {
+ cardinalDirectionA = this.getCardinalDirection(-slopeA, slopePrime, 3);
+ cardinalDirectionB = this.getCardinalDirection(-slopeB, slopePrime, 1);
+ }
+ }
+ else
+ {
+ if (p1y > p2y)
+ {
+ cardinalDirectionA = this.getCardinalDirection(-slopeA, slopePrime, 1);
+ cardinalDirectionB = this.getCardinalDirection(-slopeB, slopePrime, 3);
+ }
+ else
+ {
+ cardinalDirectionA = this.getCardinalDirection(slopeA, slopePrime, 2);
+ cardinalDirectionB = this.getCardinalDirection(slopeB, slopePrime, 4);
+ }
+ }
+ //calculate clipping Point if it is not found before
+ if (!clipPointAFound)
+ {
+ switch (cardinalDirectionA)
+ {
+ case 1:
+ tempPointAy = topLeftAy;
+ tempPointAx = p1x + (-halfHeightA) / slopePrime;
+ result[0] = tempPointAx;
+ result[1] = tempPointAy;
+ break;
+ case 2:
+ tempPointAx = bottomRightAx;
+ tempPointAy = p1y + halfWidthA * slopePrime;
+ result[0] = tempPointAx;
+ result[1] = tempPointAy;
+ break;
+ case 3:
+ tempPointAy = bottomLeftAy;
+ tempPointAx = p1x + halfHeightA / slopePrime;
+ result[0] = tempPointAx;
+ result[1] = tempPointAy;
+ break;
+ case 4:
+ tempPointAx = bottomLeftAx;
+ tempPointAy = p1y + (-halfWidthA) * slopePrime;
+ result[0] = tempPointAx;
+ result[1] = tempPointAy;
+ break;
+ }
+ }
+ if (!clipPointBFound)
+ {
+ switch (cardinalDirectionB)
+ {
+ case 1:
+ tempPointBy = topLeftBy;
+ tempPointBx = p2x + (-halfHeightB) / slopePrime;
+ result[2] = tempPointBx;
+ result[3] = tempPointBy;
+ break;
+ case 2:
+ tempPointBx = bottomRightBx;
+ tempPointBy = p2y + halfWidthB * slopePrime;
+ result[2] = tempPointBx;
+ result[3] = tempPointBy;
+ break;
+ case 3:
+ tempPointBy = bottomLeftBy;
+ tempPointBx = p2x + halfHeightB / slopePrime;
+ result[2] = tempPointBx;
+ result[3] = tempPointBy;
+ break;
+ case 4:
+ tempPointBx = bottomLeftBx;
+ tempPointBy = p2y + (-halfWidthB) * slopePrime;
+ result[2] = tempPointBx;
+ result[3] = tempPointBy;
+ break;
+ }
+ }
+ }
+ return false;
+};
+
+/**
+ * This method returns in which cardinal direction does input point stays
+ * 1: North
+ * 2: East
+ * 3: South
+ * 4: West
+ */
+IGeometry.getCardinalDirection = function (slope, slopePrime, line)
+{
+ if (slope > slopePrime)
+ {
+ return line;
+ }
+ else
+ {
+ return 1 + line % 4;
+ }
+};
+
+/**
+ * This method calculates the intersection of the two lines defined by
+ * point pairs (s1,s2) and (f1,f2).
+ */
+IGeometry.getIntersection = function(s1, s2, f1, f2)
+{
+ if (f2 == null) {
+ return this.getIntersection2(s1, s2, f1);
+ }
+
+ let x1 = s1.x;
+ let y1 = s1.y;
+ let x2 = s2.x;
+ let y2 = s2.y;
+ let x3 = f1.x;
+ let y3 = f1.y;
+ let x4 = f2.x;
+ let y4 = f2.y;
+ let x, y; // intersection point
+ let a1, a2, b1, b2, c1, c2; // coefficients of line eqns.
+ let denom;
+
+ a1 = y2 - y1;
+ b1 = x1 - x2;
+ c1 = x2 * y1 - x1 * y2; // { a1*x + b1*y + c1 = 0 is line 1 }
+
+ a2 = y4 - y3;
+ b2 = x3 - x4;
+ c2 = x4 * y3 - x3 * y4; // { a2*x + b2*y + c2 = 0 is line 2 }
+
+ denom = a1 * b2 - a2 * b1;
+
+ if (denom === 0)
+ {
+ return null;
+ }
+
+ x = (b1 * c2 - b2 * c1) / denom;
+ y = (a2 * c1 - a1 * c2) / denom;
+
+ return new Point(x, y);
+};
+
+/**
+ * This method finds and returns the angle of the vector from the + x-axis
+ * in clockwise direction (compatible w/ Java coordinate system!).
+ */
+IGeometry.angleOfVector = function(Cx, Cy, Nx, Ny)
+{
+ let C_angle;
+
+ if (Cx !== Nx)
+ {
+ C_angle = Math.atan((Ny - Cy) / (Nx - Cx));
+
+ if (Nx < Cx)
+ {
+ C_angle += Math.PI;
+ }
+ else if (Ny < Cy)
+ {
+ C_angle += this.TWO_PI;
+ }
+ }
+ else if (Ny < Cy)
+ {
+ C_angle = this.ONE_AND_HALF_PI; // 270 degrees
+ }
+ else
+ {
+ C_angle = this.HALF_PI; // 90 degrees
+ }
+
+ return C_angle;
+};
+
+
+/**
+ * This method checks whether the given two line segments (one with point
+ * p1 and p2, the other with point p3 and p4) intersect at a point other
+ * than these points.
+ */
+IGeometry.doIntersect = function(p1, p2, p3, p4){
+ let a = p1.x;
+ let b = p1.y;
+ let c = p2.x;
+ let d = p2.y;
+ let p = p3.x;
+ let q = p3.y;
+ let r = p4.x;
+ let s = p4.y;
+ let det = (c - a) * (s - q) - (r - p) * (d - b);
+
+ if (det === 0) {
+ return false;
+ } else {
+ let lambda = ((s - q) * (r - a) + (p - r) * (s - b)) / det;
+ let gamma = ((b - d) * (r - a) + (c - a) * (s - b)) / det;
+ return (0 < lambda && lambda < 1) && (0 < gamma && gamma < 1);
+ }
+};
+
+/**
+ * This method checks and calculates the intersection of
+ * a line segment and a circle.
+ */
+IGeometry.findCircleLineIntersections = function(Ex, Ey, Lx, Ly, Cx, Cy, r) {
+
+ // E is the starting point of the ray,
+ // L is the end point of the ray,
+ // C is the center of sphere you're testing against
+ // r is the radius of that sphere
+
+ // Compute:
+ // d = L - E ( Direction vector of ray, from start to end )
+ // f = E - C ( Vector from center sphere to ray start )
+
+ // Then the intersection is found by..
+ // P = E + t * d
+ // This is a parametric equation:
+ // Px = Ex + tdx
+ // Py = Ey + tdy
+
+ // get a, b, c values
+ let a = (Lx-Ex)*(Lx-Ex) + (Ly-Ey)*(Ly-Ey);
+ let b = 2*((Ex-Cx)*(Lx-Ex)+(Ey-Cy)*(Ly-Ey)) ;
+ let c = (Ex-Cx)*(Ex-Cx)+(Ey-Cy)*(Ey-Cy) - r*r ;
+
+ // get discriminant
+ var disc = b*b - 4 * a * c;
+ if (disc >= 0) {
+ // insert into quadratic formula
+ let t1 = (-b + Math.sqrt(b*b - 4 * a * c)) / (2 * a);
+ let t2 = (-b - Math.sqrt(b*b - 4 * a * c)) / (2 * a);
+ let intersections = null;
+ if( t1 >= 0 && t1 <= 1 )
+ {
+ // t1 is the intersection, and it's closer than t2
+ // (since t1 uses -b - discriminant)
+ // Impale, Poke
+ return [t1];
+ }
+
+ // here t1 didn't intersect so we are either started
+ // inside the sphere or completely past it
+ if( t2 >= 0 && t2 <= 1 )
+ {
+ // ExitWound
+ return [t2] ;
+ }
+
+ return intersections;
+ }
+ else
+ return null;
+};
+
+// -----------------------------------------------------------------------------
+// Section: Class Constants
+// -----------------------------------------------------------------------------
+/**
+ * Some useful pre-calculated constants
+ */
+IGeometry.HALF_PI = 0.5 * Math.PI;
+IGeometry.ONE_AND_HALF_PI = 1.5 * Math.PI;
+IGeometry.TWO_PI = 2.0 * Math.PI;
+IGeometry.THREE_PI = 3.0 * Math.PI;
+
+
+module.exports = IGeometry;
diff --git a/node_modules/layout-base/src/util/IMath.js b/node_modules/layout-base/src/util/IMath.js
new file mode 100644
index 00000000..c9dd5da9
--- /dev/null
+++ b/node_modules/layout-base/src/util/IMath.js
@@ -0,0 +1,30 @@
+function IMath() {
+}
+
+/**
+ * This method returns the sign of the input value.
+ */
+IMath.sign = function (value) {
+ if (value > 0)
+ {
+ return 1;
+ }
+ else if (value < 0)
+ {
+ return -1;
+ }
+ else
+ {
+ return 0;
+ }
+};
+
+IMath.floor = function (value) {
+ return value < 0 ? Math.ceil(value) : Math.floor(value);
+};
+
+IMath.ceil = function (value) {
+ return value < 0 ? Math.floor(value) : Math.ceil(value);
+};
+
+module.exports = IMath;
diff --git a/node_modules/layout-base/src/util/Integer.js b/node_modules/layout-base/src/util/Integer.js
new file mode 100644
index 00000000..e8e755ca
--- /dev/null
+++ b/node_modules/layout-base/src/util/Integer.js
@@ -0,0 +1,7 @@
+function Integer() {
+}
+
+Integer.MAX_VALUE = 2147483647;
+Integer.MIN_VALUE = -2147483648;
+
+module.exports = Integer;
diff --git a/node_modules/layout-base/src/util/LinkedList.js b/node_modules/layout-base/src/util/LinkedList.js
new file mode 100644
index 00000000..3a7cf9cc
--- /dev/null
+++ b/node_modules/layout-base/src/util/LinkedList.js
@@ -0,0 +1,130 @@
+const nodeFrom = value => ({ value, next: null, prev: null });
+
+const add = ( prev, node, next, list ) => {
+ if( prev !== null ){
+ prev.next = node;
+ } else {
+ list.head = node;
+ }
+
+ if( next !== null ){
+ next.prev = node;
+ } else {
+ list.tail = node;
+ }
+
+ node.prev = prev;
+ node.next = next;
+
+ list.length++;
+
+ return node;
+};
+
+const remove = ( node, list ) => {
+ let { prev, next } = node;
+
+ if( prev !== null ){
+ prev.next = next;
+ } else {
+ list.head = next;
+ }
+
+ if( next !== null ){
+ next.prev = prev;
+ } else {
+ list.tail = prev;
+ }
+
+ node.prev = node.next = null;
+
+ list.length--;
+
+ return node;
+};
+
+class LinkedList {
+ constructor( vals ){
+ this.length = 0;
+ this.head = null;
+ this.tail = null;
+
+ if( vals != null ){
+ vals.forEach( v => this.push(v) );
+ }
+ }
+
+ size(){
+ return this.length;
+ }
+
+ insertBefore( val, otherNode ){
+ return add( otherNode.prev, nodeFrom(val), otherNode, this );
+ }
+
+ insertAfter( val, otherNode ){
+ return add( otherNode, nodeFrom(val), otherNode.next, this );
+ }
+
+ insertNodeBefore( newNode, otherNode ){
+ return add( otherNode.prev, newNode, otherNode, this );
+ }
+
+ insertNodeAfter( newNode, otherNode ){
+ return add( otherNode, newNode, otherNode.next, this );
+ }
+
+ push( val ){
+ return add( this.tail, nodeFrom(val), null, this );
+ }
+
+ unshift( val ){
+ return add( null, nodeFrom(val), this.head, this );
+ }
+
+ remove( node ){
+ return remove( node, this );
+ }
+
+ pop(){
+ return remove( this.tail, this ).value;
+ }
+
+ popNode(){
+ return remove( this.tail, this );
+ }
+
+ shift(){
+ return remove( this.head, this ).value;
+ }
+
+ shiftNode(){
+ return remove( this.head, this );
+ }
+
+ get_object_at( index ){
+ if(index <= this.length()){
+ var i = 1;
+ var current = this.head;
+ while(i < index){
+ current = current.next;
+ i++;
+ }
+ return current.value;
+ }
+ }
+
+ set_object_at( index, value){
+ if(index <= this.length()) {
+ var i = 1;
+ var current = this.head;
+ while (i < index) {
+ current = current.next;
+ i++;
+ }
+ current.value = value;
+ }
+ }
+}
+
+module.exports = LinkedList;
diff --git a/node_modules/layout-base/src/util/Matrix.js b/node_modules/layout-base/src/util/Matrix.js
new file mode 100644
index 00000000..aee02206
--- /dev/null
+++ b/node_modules/layout-base/src/util/Matrix.js
@@ -0,0 +1,164 @@
+// Some matrix (1d and 2d array) operations
+function Matrix() {
+}
+
+/**
+ * matrix multiplication
+ * array1, array2 and result are 2d arrays
+ */
+Matrix.multMat = function(array1, array2){
+ let result = [];
+
+ for(let i = 0; i < array1.length; i++){
+ result[i] = [];
+ for(let j = 0; j < array2[0].length; j++){
+ result[i][j] = 0;
+ for(let k = 0; k < array1[0].length; k++){
+ result[i][j] += array1[i][k] * array2[k][j];
+ }
+ }
+ }
+ return result;
+};
+
+/**
+ * matrix transpose
+ * array and result are 2d arrays
+ */
+Matrix.transpose = function(array){
+ let result = [];
+
+ for(let i = 0; i < array[0].length; i++){
+ result[i] = [];
+ for(let j = 0; j < array.length; j++){
+ result[i][j] = array[j][i];
+ }
+ }
+
+ return result;
+};
+
+/**
+ * multiply array with constant
+ * array and result are 1d arrays
+ */
+Matrix.multCons = function(array, constant){
+ let result = [];
+
+ for(let i = 0; i < array.length; i++){
+ result[i] = array[i] * constant;
+ }
+
+ return result;
+};
+
+/**
+ * substract two arrays
+ * array1, array2 and result are 1d arrays
+ */
+Matrix.minusOp = function(array1, array2){
+ let result = [];
+
+ for(let i = 0; i < array1.length; i++){
+ result[i] = array1[i] - array2[i];
+ }
+
+ return result;
+};
+
+/**
+ * dot product of two arrays with same size
+ * array1 and array2 are 1d arrays
+ */
+Matrix.dotProduct = function(array1, array2){
+ let product = 0;
+
+ for(let i = 0; i < array1.length; i++){
+ product += array1[i] * array2[i];
+ }
+
+ return product;
+};
+
+/**
+ * magnitude of an array
+ * array is 1d array
+ */
+Matrix.mag = function(array){
+ return Math.sqrt(this.dotProduct(array, array));
+};
+
+/**
+ * normalization of an array
+ * array and result are 1d array
+ */
+Matrix.normalize = function(array){
+ let result = [];
+ let magnitude = this.mag(array);
+
+ for(let i = 0; i < array.length; i++){
+ result[i] = array[i] / magnitude;
+ }
+
+ return result;
+};
+
+/**
+ * multiply an array with centering matrix
+ * array and result are 1d array
+ */
+Matrix.multGamma = function(array){
+ let result = [];
+ let sum = 0;
+
+ for(let i = 0; i < array.length; i++){
+ sum += array[i];
+ }
+
+ sum *= (-1)/array.length;
+
+ for(let i = 0; i < array.length; i++){
+ result[i] = sum + array[i];
+ }
+ return result;
+};
+
+/**
+ * a special matrix multiplication
+ * result = 0.5 * C * INV * C^T * array
+ * array and result are 1d, C and INV are 2d arrays
+ */
+Matrix.multL = function(array, C, INV){
+ let result = [];
+ let temp1 = [];
+ let temp2 = [];
+
+ // multiply by C^T
+ for(let i = 0; i < C[0].length; i++){
+ let sum = 0;
+ for(let j = 0; j < C.length; j++){
+ sum += -0.5 * C[j][i] * array[j];
+ }
+ temp1[i] = sum;
+ }
+ // multiply the result by INV
+ for(let i = 0; i < INV.length; i++){
+ let sum = 0;
+ for(let j = 0; j < INV.length; j++){
+ sum += INV[i][j] * temp1[j];
+ }
+ temp2[i] = sum;
+ }
+ // multiply the result by C
+ for(let i = 0; i < C.length; i++){
+ let sum = 0;
+ for(let j = 0; j < C[0].length; j++){
+ sum += C[i][j] * temp2[j];
+ }
+ result[i] = sum;
+ }
+
+ return result;
+};
+
+module.exports = Matrix;
diff --git a/node_modules/layout-base/src/util/Point.js b/node_modules/layout-base/src/util/Point.js
new file mode 100644
index 00000000..0e905fc9
--- /dev/null
+++ b/node_modules/layout-base/src/util/Point.js
@@ -0,0 +1,73 @@
+/*
+ *This class is the javascript implementation of the Point.java class in jdk
+ */
+function Point(x, y, p) {
+ this.x = null;
+ this.y = null;
+ if (x == null && y == null && p == null) {
+ this.x = 0;
+ this.y = 0;
+ }
+ else if (typeof x == 'number' && typeof y == 'number' && p == null) {
+ this.x = x;
+ this.y = y;
+ }
+ else if (x.constructor.name == 'Point' && y == null && p == null) {
+ p = x;
+ this.x = p.x;
+ this.y = p.y;
+ }
+}
+
+Point.prototype.getX = function () {
+ return this.x;
+}
+
+Point.prototype.getY = function () {
+ return this.y;
+}
+
+Point.prototype.getLocation = function () {
+ return new Point(this.x, this.y);
+}
+
+Point.prototype.setLocation = function (x, y, p) {
+ if (x.constructor.name == 'Point' && y == null && p == null) {
+ p = x;
+ this.setLocation(p.x, p.y);
+ }
+ else if (typeof x == 'number' && typeof y == 'number' && p == null) {
+ //if both parameters are integer just move (x,y) location
+ if (parseInt(x) == x && parseInt(y) == y) {
+ this.move(x, y);
+ }
+ else {
+ this.x = Math.floor(x + 0.5);
+ this.y = Math.floor(y + 0.5);
+ }
+ }
+}
+
+Point.prototype.move = function (x, y) {
+ this.x = x;
+ this.y = y;
+}
+
+Point.prototype.translate = function (dx, dy) {
+ this.x += dx;
+ this.y += dy;
+}
+
+Point.prototype.equals = function (obj) {
+ if (obj.constructor.name == "Point") {
+ var pt = obj;
+ return (this.x == pt.x) && (this.y == pt.y);
+ }
+ return this == obj;
+}
+
+Point.prototype.toString = function () {
+ return new Point().constructor.name + "[x=" + this.x + ",y=" + this.y + "]";
+}
+
+module.exports = Point;
diff --git a/node_modules/layout-base/src/util/PointD.js b/node_modules/layout-base/src/util/PointD.js
new file mode 100644
index 00000000..4fc34ec4
--- /dev/null
+++ b/node_modules/layout-base/src/util/PointD.js
@@ -0,0 +1,48 @@
+function PointD(x, y) {
+ if (x == null && y == null) {
+ this.x = 0;
+ this.y = 0;
+ } else {
+ this.x = x;
+ this.y = y;
+ }
+}
+
+PointD.prototype.getX = function ()
+{
+ return this.x;
+};
+
+PointD.prototype.getY = function ()
+{
+ return this.y;
+};
+
+PointD.prototype.setX = function (x)
+{
+ this.x = x;
+};
+
+PointD.prototype.setY = function (y)
+{
+ this.y = y;
+};
+
+PointD.prototype.getDifference = function (pt)
+{
+ return new DimensionD(this.x - pt.x, this.y - pt.y);
+};
+
+PointD.prototype.getCopy = function ()
+{
+ return new PointD(this.x, this.y);
+};
+
+PointD.prototype.translate = function (dim)
+{
+ this.x += dim.width;
+ this.y += dim.height;
+ return this;
+};
+
+module.exports = PointD;
diff --git a/node_modules/layout-base/src/util/Quicksort.js b/node_modules/layout-base/src/util/Quicksort.js
new file mode 100644
index 00000000..cee9ecb9
--- /dev/null
+++ b/node_modules/layout-base/src/util/Quicksort.js
@@ -0,0 +1,77 @@
+/**
+ * A classic Quicksort algorithm with Hoare's partition
+ * - Works also on LinkedList objects
+ *
+ * Copyright: i-Vis Research Group, Bilkent University, 2007 - present
+ */
+
+const LinkedList = require('./LinkedList.js');
+
+class Quicksort {
+ constructor(A, compareFunction) {
+ if(compareFunction !== null || compareFunction !== undefined)
+ this.compareFunction = this._defaultCompareFunction;
+
+ let length;
+ if( A instanceof LinkedList )
+ length = A.size();
+ else
+ length = A.length;
+
+ this._quicksort(A, 0, length - 1);
+ }
+
+ _quicksort(A, p, r){
+ if(p < r) {
+ let q = this._partition(A, p, r);
+ this._quicksort(A, p, q);
+ this._quicksort(A, q + 1, r);
+ }
+ }
+
+ _partition(A, p, r){
+ let x = this._get(A, p);
+ let i = p;
+ let j = r;
+ while(true){
+ while (this.compareFunction(x, this._get(A, j)))
+ j--;
+ while (this.compareFunction(this._get(A, i), x))
+ i++;
+
+ if (i < j){
+ this._swap(A, i, j);
+ i++;
+ j--;
+ }
+ else
+ return j;
+ }
+ }
+
+ _get(object, index){
+ if( object instanceof LinkedList)
+ return object.get_object_at(index);
+ else
+ return object[index];
+ }
+
+ _set(object, index, value){
+ if( object instanceof LinkedList)
+ object.set_object_at(index, value);
+ else
+ object[index] = value;
+ }
+
+ _swap(A, i, j){
+ let temp = this._get(A, i);
+ this._set(A, i, this._get(A, j));
+ this._set(A, j, temp);
+ }
+
+ _defaultCompareFunction(a, b){
+ return b > a;
+ }
+}
+
+module.exports = Quicksort;
\ No newline at end of file
diff --git a/node_modules/layout-base/src/util/RandomSeed.js b/node_modules/layout-base/src/util/RandomSeed.js
new file mode 100644
index 00000000..f71f40ff
--- /dev/null
+++ b/node_modules/layout-base/src/util/RandomSeed.js
@@ -0,0 +1,12 @@
+function RandomSeed() {
+}
+// adapted from: https://stackoverflow.com/a/19303725
+RandomSeed.seed = 1;
+RandomSeed.x = 0;
+
+RandomSeed.nextDouble = function () {
+ RandomSeed.x = Math.sin(RandomSeed.seed++) * 10000;
+ return RandomSeed.x - Math.floor(RandomSeed.x);
+};
+
+module.exports = RandomSeed;
diff --git a/node_modules/layout-base/src/util/RectangleD.js b/node_modules/layout-base/src/util/RectangleD.js
new file mode 100644
index 00000000..d36e3571
--- /dev/null
+++ b/node_modules/layout-base/src/util/RectangleD.js
@@ -0,0 +1,130 @@
+function RectangleD(x, y, width, height) {
+ this.x = 0;
+ this.y = 0;
+ this.width = 0;
+ this.height = 0;
+
+ if (x != null && y != null && width != null && height != null) {
+ this.x = x;
+ this.y = y;
+ this.width = width;
+ this.height = height;
+ }
+}
+
+RectangleD.prototype.getX = function ()
+{
+ return this.x;
+};
+
+RectangleD.prototype.setX = function (x)
+{
+ this.x = x;
+};
+
+RectangleD.prototype.getY = function ()
+{
+ return this.y;
+};
+
+RectangleD.prototype.setY = function (y)
+{
+ this.y = y;
+};
+
+RectangleD.prototype.getWidth = function ()
+{
+ return this.width;
+};
+
+RectangleD.prototype.setWidth = function (width)
+{
+ this.width = width;
+};
+
+RectangleD.prototype.getHeight = function ()
+{
+ return this.height;
+};
+
+RectangleD.prototype.setHeight = function (height)
+{
+ this.height = height;
+};
+
+RectangleD.prototype.getRight = function ()
+{
+ return this.x + this.width;
+};
+
+RectangleD.prototype.getBottom = function ()
+{
+ return this.y + this.height;
+};
+
+RectangleD.prototype.intersects = function (a)
+{
+ if (this.getRight() < a.x)
+ {
+ return false;
+ }
+
+ if (this.getBottom() < a.y)
+ {
+ return false;
+ }
+
+ if (a.getRight() < this.x)
+ {
+ return false;
+ }
+
+ if (a.getBottom() < this.y)
+ {
+ return false;
+ }
+
+ return true;
+};
+
+RectangleD.prototype.getCenterX = function ()
+{
+ return this.x + this.width / 2;
+};
+
+RectangleD.prototype.getMinX = function ()
+{
+ return this.getX();
+};
+
+RectangleD.prototype.getMaxX = function ()
+{
+ return this.getX() + this.width;
+};
+
+RectangleD.prototype.getCenterY = function ()
+{
+ return this.y + this.height / 2;
+};
+
+RectangleD.prototype.getMinY = function ()
+{
+ return this.getY();
+};
+
+RectangleD.prototype.getMaxY = function ()
+{
+ return this.getY() + this.height;
+};
+
+RectangleD.prototype.getWidthHalf = function ()
+{
+ return this.width / 2;
+};
+
+RectangleD.prototype.getHeightHalf = function ()
+{
+ return this.height / 2;
+};
+
+module.exports = RectangleD;
diff --git a/node_modules/layout-base/src/util/SVD.js b/node_modules/layout-base/src/util/SVD.js
new file mode 100644
index 00000000..2029bcc8
--- /dev/null
+++ b/node_modules/layout-base/src/util/SVD.js
@@ -0,0 +1,639 @@
+// Singular Value Decomposition implementation
+function SVD() {
+};
+
+/* Below singular value decomposition (svd) code including hypot function is adopted from https://github.com/dragonfly-ai/JamaJS
+ Some changes are applied to make the code compatible with the fcose code and to make it independent from Jama.
+ Input matrix is changed to a 2D array instead of Jama matrix. Matrix dimensions are taken according to 2D array instead of using Jama functions.
+ An object that includes singular value components is created for return.
+ The types of input parameters of the hypot function are removed.
+ let is used instead of var for the variable initialization.
+*/
+/*
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "{}"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright {yyyy} {name of copyright owner}
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+SVD.svd = function (A) {
+ this.U = null;
+ this.V = null;
+ this.s = null;
+ this.m = 0;
+ this.n = 0;
+ this.m = A.length;
+ this.n = A[0].length;
+ let nu = Math.min(this.m, this.n);
+ this.s = (function (s) {
+ let a = [];
+ while (s-- > 0)
+ a.push(0);
+ return a;
+ })(Math.min(this.m + 1, this.n));
+ this.U = (function (dims) {
+ let allocate = function (dims) {
+ if (dims.length == 0) {
+ return 0;
+ } else {
+ let array = [];
+ for (let i = 0; i < dims[0]; i++) {
+ array.push(allocate(dims.slice(1)));
+ }
+ return array;
+ }
+ };
+ return allocate(dims);
+ })([this.m, nu]);
+ this.V = (function (dims) {
+ let allocate = function (dims) {
+ if (dims.length == 0) {
+ return 0;
+ } else {
+ let array = [];
+ for (let i = 0; i < dims[0]; i++) {
+ array.push(allocate(dims.slice(1)));
+ }
+ return array;
+ }
+ };
+ return allocate(dims);
+ })([this.n, this.n]);
+ let e = (function (s) {
+ let a = [];
+ while (s-- > 0)
+ a.push(0);
+ return a;
+ })(this.n);
+ let work = (function (s) {
+ let a = [];
+ while (s-- > 0)
+ a.push(0);
+ return a;
+ })(this.m);
+ let wantu = true;
+ let wantv = true;
+ let nct = Math.min(this.m - 1, this.n);
+ let nrt = Math.max(0, Math.min(this.n - 2, this.m));
+ for (let k = 0; k < Math.max(nct, nrt); k++) {
+ if (k < nct) {
+ this.s[k] = 0;
+ for (let i = k; i < this.m; i++) {
+ this.s[k] = SVD.hypot(this.s[k], A[i][k]);
+ }
+ ;
+ if (this.s[k] !== 0.0) {
+ if (A[k][k] < 0.0) {
+ this.s[k] = -this.s[k];
+ }
+ for (let i = k; i < this.m; i++) {
+ A[i][k] /= this.s[k];
+ }
+ ;
+ A[k][k] += 1.0;
+ }
+ this.s[k] = -this.s[k];
+ }
+ for (let j = k + 1; j < this.n; j++) {
+ if ((function (lhs, rhs) {
+ return lhs && rhs;
+ })((k < nct), (this.s[k] !== 0.0))) {
+ let t = 0;
+ for (let i = k; i < this.m; i++) {
+ t += A[i][k] * A[i][j];
+ }
+ ;
+ t = -t / A[k][k];
+ for (let i = k; i < this.m; i++) {
+ A[i][j] += t * A[i][k];
+ }
+ ;
+ }
+ e[j] = A[k][j];
+ }
+ ;
+ if ((function (lhs, rhs) {
+ return lhs && rhs;
+ })(wantu, (k < nct))) {
+ for (let i = k; i < this.m; i++) {
+ this.U[i][k] = A[i][k];
+ }
+ ;
+ }
+ if (k < nrt) {
+ e[k] = 0;
+ for (let i = k + 1; i < this.n; i++) {
+ e[k] = SVD.hypot(e[k], e[i]);
+ }
+ ;
+ if (e[k] !== 0.0) {
+ if (e[k + 1] < 0.0) {
+ e[k] = -e[k];
+ }
+ for (let i = k + 1; i < this.n; i++) {
+ e[i] /= e[k];
+ }
+ ;
+ e[k + 1] += 1.0;
+ }
+ e[k] = -e[k];
+ if ((function (lhs, rhs) {
+ return lhs && rhs;
+ })((k + 1 < this.m), (e[k] !== 0.0))) {
+ for (let i = k + 1; i < this.m; i++) {
+ work[i] = 0.0;
+ }
+ ;
+ for (let j = k + 1; j < this.n; j++) {
+ for (let i = k + 1; i < this.m; i++) {
+ work[i] += e[j] * A[i][j];
+ }
+ ;
+ }
+ ;
+ for (let j = k + 1; j < this.n; j++) {
+ let t = -e[j] / e[k + 1];
+ for (let i = k + 1; i < this.m; i++) {
+ A[i][j] += t * work[i];
+ }
+ ;
+ }
+ ;
+ }
+ if (wantv) {
+ for (let i = k + 1; i < this.n; i++) {
+ this.V[i][k] = e[i];
+ };
+ }
+ }
+ };
+ let p = Math.min(this.n, this.m + 1);
+ if (nct < this.n) {
+ this.s[nct] = A[nct][nct];
+ }
+ if (this.m < p) {
+ this.s[p - 1] = 0.0;
+ }
+ if (nrt + 1 < p) {
+ e[nrt] = A[nrt][p - 1];
+ }
+ e[p - 1] = 0.0;
+ if (wantu) {
+ for (let j = nct; j < nu; j++) {
+ for (let i = 0; i < this.m; i++) {
+ this.U[i][j] = 0.0;
+ }
+ ;
+ this.U[j][j] = 1.0;
+ };
+ for (let k = nct - 1; k >= 0; k--) {
+ if (this.s[k] !== 0.0) {
+ for (let j = k + 1; j < nu; j++) {
+ let t = 0;
+ for (let i = k; i < this.m; i++) {
+ t += this.U[i][k] * this.U[i][j];
+ };
+ t = -t / this.U[k][k];
+ for (let i = k; i < this.m; i++) {
+ this.U[i][j] += t * this.U[i][k];
+ };
+ };
+ for (let i = k; i < this.m; i++) {
+ this.U[i][k] = -this.U[i][k];
+ };
+ this.U[k][k] = 1.0 + this.U[k][k];
+ for (let i = 0; i < k - 1; i++) {
+ this.U[i][k] = 0.0;
+ };
+ } else {
+ for (let i = 0; i < this.m; i++) {
+ this.U[i][k] = 0.0;
+ };
+ this.U[k][k] = 1.0;
+ }
+ };
+ }
+ if (wantv) {
+ for (let k = this.n - 1; k >= 0; k--) {
+ if ((function (lhs, rhs) {
+ return lhs && rhs;
+ })((k < nrt), (e[k] !== 0.0))) {
+ for (let j = k + 1; j < nu; j++) {
+ let t = 0;
+ for (let i = k + 1; i < this.n; i++) {
+ t += this.V[i][k] * this.V[i][j];
+ };
+ t = -t / this.V[k + 1][k];
+ for (let i = k + 1; i < this.n; i++) {
+ this.V[i][j] += t * this.V[i][k];
+ };
+ };
+ }
+ for (let i = 0; i < this.n; i++) {
+ this.V[i][k] = 0.0;
+ };
+ this.V[k][k] = 1.0;
+ };
+ }
+ let pp = p - 1;
+ let iter = 0;
+ let eps = Math.pow(2.0, -52.0);
+ let tiny = Math.pow(2.0, -966.0);
+ while ((p > 0)) {
+ let k = void 0;
+ let kase = void 0;
+ for (k = p - 2; k >= -1; k--) {
+ if (k === -1) {
+ break;
+ }
+ if (Math.abs(e[k]) <= tiny + eps * (Math.abs(this.s[k]) + Math.abs(this.s[k + 1]))) {
+ e[k] = 0.0;
+ break;
+ }
+ };
+ if (k === p - 2) {
+ kase = 4;
+ } else {
+ let ks = void 0;
+ for (ks = p - 1; ks >= k; ks--) {
+ if (ks === k) {
+ break;
+ }
+ let t = (ks !== p ? Math.abs(e[ks]) : 0.0) + (ks !== k + 1 ? Math.abs(e[ks - 1]) : 0.0);
+ if (Math.abs(this.s[ks]) <= tiny + eps * t) {
+ this.s[ks] = 0.0;
+ break;
+ }
+ };
+ if (ks === k) {
+ kase = 3;
+ } else if (ks === p - 1) {
+ kase = 1;
+ } else {
+ kase = 2;
+ k = ks;
+ }
+ }
+ k++;
+ switch ((kase)) {
+ case 1:
+ {
+ let f = e[p - 2];
+ e[p - 2] = 0.0;
+ for (let j = p - 2; j >= k; j--) {
+ let t = SVD.hypot(this.s[j], f);
+ let cs = this.s[j] / t;
+ let sn = f / t;
+ this.s[j] = t;
+ if (j !== k) {
+ f = -sn * e[j - 1];
+ e[j - 1] = cs * e[j - 1];
+ }
+ if (wantv) {
+ for (let i = 0; i < this.n; i++) {
+ t = cs * this.V[i][j] + sn * this.V[i][p - 1];
+ this.V[i][p - 1] = -sn * this.V[i][j] + cs * this.V[i][p - 1];
+ this.V[i][j] = t;
+ };
+ }
+ };
+ };
+ break;
+ case 2:
+ {
+ let f = e[k - 1];
+ e[k - 1] = 0.0;
+ for (let j = k; j < p; j++) {
+ let t = SVD.hypot(this.s[j], f);
+ let cs = this.s[j] / t;
+ let sn = f / t;
+ this.s[j] = t;
+ f = -sn * e[j];
+ e[j] = cs * e[j];
+ if (wantu) {
+ for (let i = 0; i < this.m; i++) {
+ t = cs * this.U[i][j] + sn * this.U[i][k - 1];
+ this.U[i][k - 1] = -sn * this.U[i][j] + cs * this.U[i][k - 1];
+ this.U[i][j] = t;
+ };
+ }
+ };
+ };
+ break;
+ case 3:
+ {
+ let scale = Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[p - 1]), Math.abs(this.s[p - 2])), Math.abs(e[p - 2])), Math.abs(this.s[k])), Math.abs(e[k]));
+ let sp = this.s[p - 1] / scale;
+ let spm1 = this.s[p - 2] / scale;
+ let epm1 = e[p - 2] / scale;
+ let sk = this.s[k] / scale;
+ let ek = e[k] / scale;
+ let b = ((spm1 + sp) * (spm1 - sp) + epm1 * epm1) / 2.0;
+ let c = (sp * epm1) * (sp * epm1);
+ let shift = 0.0;
+ if ((function (lhs, rhs) {
+ return lhs || rhs;
+ })((b !== 0.0), (c !== 0.0))) {
+ shift = Math.sqrt(b * b + c);
+ if (b < 0.0) {
+ shift = -shift;
+ }
+ shift = c / (b + shift);
+ }
+ let f = (sk + sp) * (sk - sp) + shift;
+ let g = sk * ek;
+ for (let j = k; j < p - 1; j++) {
+ let t = SVD.hypot(f, g);
+ let cs = f / t;
+ let sn = g / t;
+ if (j !== k) {
+ e[j - 1] = t;
+ }
+ f = cs * this.s[j] + sn * e[j];
+ e[j] = cs * e[j] - sn * this.s[j];
+ g = sn * this.s[j + 1];
+ this.s[j + 1] = cs * this.s[j + 1];
+ if (wantv) {
+ for (let i = 0; i < this.n; i++) {
+ t = cs * this.V[i][j] + sn * this.V[i][j + 1];
+ this.V[i][j + 1] = -sn * this.V[i][j] + cs * this.V[i][j + 1];
+ this.V[i][j] = t;
+ };
+ }
+ t = SVD.hypot(f, g);
+ cs = f / t;
+ sn = g / t;
+ this.s[j] = t;
+ f = cs * e[j] + sn * this.s[j + 1];
+ this.s[j + 1] = -sn * e[j] + cs * this.s[j + 1];
+ g = sn * e[j + 1];
+ e[j + 1] = cs * e[j + 1];
+ if (wantu && (j < this.m - 1)) {
+ for (let i = 0; i < this.m; i++) {
+ t = cs * this.U[i][j] + sn * this.U[i][j + 1];
+ this.U[i][j + 1] = -sn * this.U[i][j] + cs * this.U[i][j + 1];
+ this.U[i][j] = t;
+ };
+ }
+ };
+ e[p - 2] = f;
+ iter = iter + 1;
+ };
+ break;
+ case 4:
+ {
+ if (this.s[k] <= 0.0) {
+ this.s[k] = (this.s[k] < 0.0 ? -this.s[k] : 0.0);
+ if (wantv) {
+ for (let i = 0; i <= pp; i++) {
+ this.V[i][k] = -this.V[i][k];
+ };
+ }
+ }
+ while ((k < pp)) {
+ if (this.s[k] >= this.s[k + 1]) {
+ break;
+ }
+ let t = this.s[k];
+ this.s[k] = this.s[k + 1];
+ this.s[k + 1] = t;
+ if (wantv && (k < this.n - 1)) {
+ for (let i = 0; i < this.n; i++) {
+ t = this.V[i][k + 1];
+ this.V[i][k + 1] = this.V[i][k];
+ this.V[i][k] = t;
+ };
+ }
+ if (wantu && (k < this.m - 1)) {
+ for (let i = 0; i < this.m; i++) {
+ t = this.U[i][k + 1];
+ this.U[i][k + 1] = this.U[i][k];
+ this.U[i][k] = t;
+ };
+ }
+ k++;
+ };
+ iter = 0;
+ p--;
+ };
+ break;
+ }
+ };
+ let result = {U: this.U, V: this.V, S: this.s};
+ return result;
+};
+
+// sqrt(a^2 + b^2) without under/overflow.
+SVD.hypot = function(a, b) {
+ let r;
+ if (Math.abs(a) > Math.abs(b)) {
+ r = b/a;
+ r = Math.abs(a)*Math.sqrt(1+r*r);
+ } else if (b != 0) {
+ r = a/b;
+ r = Math.abs(b)*Math.sqrt(1+r*r);
+ } else {
+ r = 0.0;
+ }
+ return r;
+};
+
+module.exports = SVD;
+
diff --git a/node_modules/layout-base/src/util/Transform.js b/node_modules/layout-base/src/util/Transform.js
new file mode 100644
index 00000000..fc7c120f
--- /dev/null
+++ b/node_modules/layout-base/src/util/Transform.js
@@ -0,0 +1,157 @@
+var PointD = require('./PointD');
+
+function Transform(x, y) {
+ this.lworldOrgX = 0.0;
+ this.lworldOrgY = 0.0;
+ this.ldeviceOrgX = 0.0;
+ this.ldeviceOrgY = 0.0;
+ this.lworldExtX = 1.0;
+ this.lworldExtY = 1.0;
+ this.ldeviceExtX = 1.0;
+ this.ldeviceExtY = 1.0;
+}
+
+Transform.prototype.getWorldOrgX = function ()
+{
+ return this.lworldOrgX;
+}
+
+Transform.prototype.setWorldOrgX = function (wox)
+{
+ this.lworldOrgX = wox;
+}
+
+Transform.prototype.getWorldOrgY = function ()
+{
+ return this.lworldOrgY;
+}
+
+Transform.prototype.setWorldOrgY = function (woy)
+{
+ this.lworldOrgY = woy;
+}
+
+Transform.prototype.getWorldExtX = function ()
+{
+ return this.lworldExtX;
+}
+
+Transform.prototype.setWorldExtX = function (wex)
+{
+ this.lworldExtX = wex;
+}
+
+Transform.prototype.getWorldExtY = function ()
+{
+ return this.lworldExtY;
+}
+
+Transform.prototype.setWorldExtY = function (wey)
+{
+ this.lworldExtY = wey;
+}
+
+/* Device related */
+
+Transform.prototype.getDeviceOrgX = function ()
+{
+ return this.ldeviceOrgX;
+}
+
+Transform.prototype.setDeviceOrgX = function (dox)
+{
+ this.ldeviceOrgX = dox;
+}
+
+Transform.prototype.getDeviceOrgY = function ()
+{
+ return this.ldeviceOrgY;
+}
+
+Transform.prototype.setDeviceOrgY = function (doy)
+{
+ this.ldeviceOrgY = doy;
+}
+
+Transform.prototype.getDeviceExtX = function ()
+{
+ return this.ldeviceExtX;
+}
+
+Transform.prototype.setDeviceExtX = function (dex)
+{
+ this.ldeviceExtX = dex;
+}
+
+Transform.prototype.getDeviceExtY = function ()
+{
+ return this.ldeviceExtY;
+}
+
+Transform.prototype.setDeviceExtY = function (dey)
+{
+ this.ldeviceExtY = dey;
+}
+
+Transform.prototype.transformX = function (x)
+{
+ var xDevice = 0.0;
+ var worldExtX = this.lworldExtX;
+ if (worldExtX != 0.0)
+ {
+ xDevice = this.ldeviceOrgX +
+ ((x - this.lworldOrgX) * this.ldeviceExtX / worldExtX);
+ }
+
+ return xDevice;
+}
+
+Transform.prototype.transformY = function (y)
+{
+ var yDevice = 0.0;
+ var worldExtY = this.lworldExtY;
+ if (worldExtY != 0.0)
+ {
+ yDevice = this.ldeviceOrgY +
+ ((y - this.lworldOrgY) * this.ldeviceExtY / worldExtY);
+ }
+
+
+ return yDevice;
+}
+
+Transform.prototype.inverseTransformX = function (x)
+{
+ var xWorld = 0.0;
+ var deviceExtX = this.ldeviceExtX;
+ if (deviceExtX != 0.0)
+ {
+ xWorld = this.lworldOrgX +
+ ((x - this.ldeviceOrgX) * this.lworldExtX / deviceExtX);
+ }
+
+
+ return xWorld;
+}
+
+Transform.prototype.inverseTransformY = function (y)
+{
+ var yWorld = 0.0;
+ var deviceExtY = this.ldeviceExtY;
+ if (deviceExtY != 0.0)
+ {
+ yWorld = this.lworldOrgY +
+ ((y - this.ldeviceOrgY) * this.lworldExtY / deviceExtY);
+ }
+ return yWorld;
+}
+
+Transform.prototype.inverseTransformPoint = function (inPoint)
+{
+ var outPoint =
+ new PointD(this.inverseTransformX(inPoint.x),
+ this.inverseTransformY(inPoint.y));
+ return outPoint;
+}
+
+module.exports = Transform;
diff --git a/node_modules/layout-base/src/util/UniqueIDGeneretor.js b/node_modules/layout-base/src/util/UniqueIDGeneretor.js
new file mode 100644
index 00000000..0f85c326
--- /dev/null
+++ b/node_modules/layout-base/src/util/UniqueIDGeneretor.js
@@ -0,0 +1,29 @@
+function UniqueIDGeneretor() {
+}
+
+UniqueIDGeneretor.lastID = 0;
+
+UniqueIDGeneretor.createID = function (obj) {
+ if (UniqueIDGeneretor.isPrimitive(obj)) {
+ return obj;
+ }
+ if (obj.uniqueID != null) {
+ return obj.uniqueID;
+ }
+ obj.uniqueID = UniqueIDGeneretor.getString();
+ UniqueIDGeneretor.lastID++;
+ return obj.uniqueID;
+}
+
+UniqueIDGeneretor.getString = function (id) {
+ if (id == null)
+ id = UniqueIDGeneretor.lastID;
+ return "Object#" + id + "";
+}
+
+UniqueIDGeneretor.isPrimitive = function (arg) {
+ var type = typeof arg;
+ return arg == null || (type != "object" && type != "function");
+}
+
+module.exports = UniqueIDGeneretor;
diff --git a/node_modules/layout-base/src/util/alignment/NeedlemanWunsch.js b/node_modules/layout-base/src/util/alignment/NeedlemanWunsch.js
new file mode 100644
index 00000000..6a63781d
--- /dev/null
+++ b/node_modules/layout-base/src/util/alignment/NeedlemanWunsch.js
@@ -0,0 +1,158 @@
+/**
+ * Needleman-Wunsch algorithm is an procedure to compute the optimal global alignment of two string
+ * sequences by S.B.Needleman and C.D.Wunsch (1970).
+ *
+ * Aside from the inputs, you can assign the scores for,
+ * - Match: The two characters at the current index are same.
+ * - Mismatch: The two characters at the current index are different.
+ * - Insertion/Deletion(gaps): The best alignment involves one letter aligning to a gap in the other string.
+ */
+
+class NeedlemanWunsch {
+ constructor(sequence1, sequence2, match_score = 1, mismatch_penalty = -1, gap_penalty = -1) {
+ this.sequence1 = sequence1;
+ this.sequence2 = sequence2;
+ this.match_score = match_score;
+ this.mismatch_penalty = mismatch_penalty;
+ this.gap_penalty = gap_penalty;
+
+ // Just the remove redundancy
+ this.iMax = sequence1.length + 1;
+ this.jMax = sequence2.length + 1;
+
+ // Grid matrix of scores
+ this.grid = new Array(this.iMax);
+ for(let i = 0; i < this.iMax; i++){
+ this.grid[i] = new Array(this.jMax );
+
+ for(let j = 0; j < this.jMax ; j++)
+ this.grid[i][j] = 0;
+ }
+
+ // Traceback matrix (2D array, each cell is an array of boolean values for [`Diag`, `Up`, `Left`] positions)
+ this.tracebackGrid = new Array(this.iMax);
+ for(let i = 0; i < this.iMax; i++) {
+ this.tracebackGrid[i] = new Array(this.jMax);
+
+ for(let j = 0; j < this.jMax ; j++)
+ this.tracebackGrid[i][j] = [null, null, null];
+ }
+
+ // The aligned sequences (return multiple possibilities)
+ this.alignments = [];
+
+ // Final alignment score
+ this.score = -1;
+
+ // Calculate scores and tracebacks
+ this.computeGrids();
+ }
+
+ getScore(){
+ return this.score;
+ }
+
+ getAlignments(){
+ return this.alignments;
+ }
+
+ // Main dynamic programming procedure
+ computeGrids(){
+ // Fill in the first row
+ for (let j = 1; j < this.jMax; j++) {
+ this.grid[0][j] = this.grid[0][j-1] + this.gap_penalty;
+ this.tracebackGrid[0][j] = [false, false, true];
+ }
+
+ // Fill in the first column
+ for (let i = 1; i < this.iMax; i++) {
+ this.grid[i][0] = this.grid[i-1][0] + this.gap_penalty;
+ this.tracebackGrid[i][0] = [false, true, false];
+ }
+
+ // Fill the rest of the grid
+ for(let i = 1; i < this.iMax; i++){
+ for(let j = 1; j < this.jMax; j++){
+ // Find the max score(s) among [`Diag`, `Up`, `Left`]
+ let diag;
+ if(this.sequence1[i-1] === this.sequence2[j-1])
+ diag = this.grid[i-1][j-1] + this.match_score;
+ else
+ diag = this.grid[i-1][j-1] + this.mismatch_penalty;
+
+ let up = this.grid[i-1][j] + this.gap_penalty;
+ let left = this.grid[i][j-1] + this.gap_penalty;
+
+ // If there exists multiple max values, capture them for multiple paths
+ let maxOf = [diag,up,left];
+ let indices = this.arrayAllMaxIndexes(maxOf);
+
+ // Update Grids
+ this.grid[i][j] = maxOf[indices[0]];
+ this.tracebackGrid[i][j] = [indices.includes(0), indices.includes(1), indices.includes(2)];
+ }
+ }
+
+ // Update alignment score
+ this.score = this.grid[this.iMax-1][this.jMax-1];
+ }
+
+ // Gets all possible valid sequence combinations
+ alignmentTraceback(){
+ let inProcessAlignments = [];
+
+ inProcessAlignments.push({ pos: [this.sequence1.length, this.sequence2.length],
+ seq1: "",
+ seq2: ""
+ });
+
+ while(inProcessAlignments[0]){
+ let current = inProcessAlignments[0];
+ let directions = this.tracebackGrid[current.pos[0]][current.pos[1]];
+
+ if(directions[0]){
+ inProcessAlignments.push({ pos: [current.pos[0]-1, current.pos[1]-1],
+ seq1: (this.sequence1[current.pos[0]-1] + current.seq1),
+ seq2: (this.sequence2[current.pos[1]-1] + current.seq2)
+ });
+ }
+ if(directions[1]){
+ inProcessAlignments.push({ pos: [current.pos[0]-1, current.pos[1]],
+ seq1: this.sequence1[current.pos[0]-1] + current.seq1,
+ seq2: '-' + current.seq2
+ });
+ }
+ if(directions[2]){
+ inProcessAlignments.push({ pos: [current.pos[0], current.pos[1]-1],
+ seq1:'-' + current.seq1,
+ seq2: this.sequence2[current.pos[1]-1] + current.seq2
+ });
+ }
+
+ if(current.pos[0] === 0 && current.pos[1] === 0)
+ this.alignments.push({sequence1 : current.seq1,
+ sequence2: current.seq2
+ });
+
+ inProcessAlignments.shift();
+ }
+
+ return this.alignments;
+ }
+
+ // Helper Functions
+
+ getAllIndexes(arr, val) {
+ let indexes = [], i = -1;
+ while ((i = arr.indexOf(val, i+1)) !== -1){
+ indexes.push(i);
+ }
+ return indexes;
+ }
+
+ arrayAllMaxIndexes(array){
+ return this.getAllIndexes(array, Math.max.apply(null, array));
+ }
+}
+
+module.exports = NeedlemanWunsch;
\ No newline at end of file
diff --git a/node_modules/layout-base/webpack.config.js b/node_modules/layout-base/webpack.config.js
new file mode 100644
index 00000000..660d2042
--- /dev/null
+++ b/node_modules/layout-base/webpack.config.js
@@ -0,0 +1,35 @@
+const path = require('path');
+const pkg = require('./package.json');
+const camelcase = require('camelcase');
+const process = require('process');
+const webpack = require('webpack');
+const env = process.env;
+const NODE_ENV = env.NODE_ENV;
+const MIN = env.MIN;
+const PROD = NODE_ENV === 'production';
+
+let config = {
+ devtool: PROD ? false : 'inline-source-map',
+ entry: './index.js',
+ output: {
+ path: path.join( __dirname ),
+ filename: 'layout-base.js',
+ library: camelcase( pkg.name ),
+ libraryTarget: 'umd'
+ },
+ module: {
+ rules: [
+ { test: /\.js$/, exclude: /node_modules/, use: 'babel-loader' }
+ ]
+ },
+ plugins: MIN ? [
+ new webpack.optimize.UglifyJsPlugin({
+ compress: {
+ warnings: false,
+ drop_console: false,
+ }
+ })
+ ] : []
+};
+
+module.exports = config;
diff --git a/node_modules/minipass/LICENSE b/node_modules/minipass/LICENSE
new file mode 100644
index 00000000..97f8e32e
--- /dev/null
+++ b/node_modules/minipass/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) 2017-2023 npm, Inc., Isaac Z. Schlueter, and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/minipass/README.md b/node_modules/minipass/README.md
new file mode 100644
index 00000000..11263305
--- /dev/null
+++ b/node_modules/minipass/README.md
@@ -0,0 +1,825 @@
+# minipass
+
+A _very_ minimal implementation of a [PassThrough
+stream](https://nodejs.org/api/stream.html#stream_class_stream_passthrough)
+
+[It's very
+fast](https://docs.google.com/spreadsheets/d/1K_HR5oh3r80b8WVMWCPPjfuWXUgfkmhlX7FGI6JJ8tY/edit?usp=sharing)
+for objects, strings, and buffers.
+
+Supports `pipe()`ing (including multi-`pipe()` and backpressure
+transmission), buffering data until either a `data` event handler
+or `pipe()` is added (so you don't lose the first chunk), and
+most other cases where PassThrough is a good idea.
+
+There is a `read()` method, but it's much more efficient to
+consume data from this stream via `'data'` events or by calling
+`pipe()` into some other stream. Calling `read()` requires the
+buffer to be flattened in some cases, which requires copying
+memory.
+
+If you set `objectMode: true` in the options, then whatever is
+written will be emitted. Otherwise, it'll do a minimal amount of
+Buffer copying to ensure proper Streams semantics when `read(n)`
+is called.
+
+`objectMode` can only be set at instantiation. Attempting to
+write something other than a String or Buffer without having set
+`objectMode` in the options will throw an error.
+
+This is not a `through` or `through2` stream. It doesn't
+transform the data, it just passes it right through. If you want
+to transform the data, extend the class, and override the
+`write()` method. Once you're done transforming the data however
+you want, call `super.write()` with the transform output.
+
+For some examples of streams that extend Minipass in various
+ways, check out:
+
+- [minizlib](http://npm.im/minizlib)
+- [fs-minipass](http://npm.im/fs-minipass)
+- [tar](http://npm.im/tar)
+- [minipass-collect](http://npm.im/minipass-collect)
+- [minipass-flush](http://npm.im/minipass-flush)
+- [minipass-pipeline](http://npm.im/minipass-pipeline)
+- [tap](http://npm.im/tap)
+- [tap-parser](http://npm.im/tap-parser)
+- [treport](http://npm.im/treport)
+- [minipass-fetch](http://npm.im/minipass-fetch)
+- [pacote](http://npm.im/pacote)
+- [make-fetch-happen](http://npm.im/make-fetch-happen)
+- [cacache](http://npm.im/cacache)
+- [ssri](http://npm.im/ssri)
+- [npm-registry-fetch](http://npm.im/npm-registry-fetch)
+- [minipass-json-stream](http://npm.im/minipass-json-stream)
+- [minipass-sized](http://npm.im/minipass-sized)
+
+## Usage in TypeScript
+
+The `Minipass` class takes three type template definitions:
+
+- `RType` the type being read, which defaults to `Buffer`. If
+ `RType` is `string`, then the constructor _must_ get an options
+ object specifying either an `encoding` or `objectMode: true`.
+ If it's anything other than `string` or `Buffer`, then it
+ _must_ get an options object specifying `objectMode: true`.
+- `WType` the type being written. If `RType` is `Buffer` or
+ `string`, then this defaults to `ContiguousData` (Buffer,
+ string, ArrayBuffer, or ArrayBufferView). Otherwise, it
+ defaults to `RType`.
+- `Events` type mapping event names to the arguments emitted
+ with that event, which extends `Minipass.Events`.
+
+To declare types for custom events in subclasses, extend the
+third parameter with your own event signatures. For example:
+
+```js
+import { Minipass } from 'minipass'
+
+// a NDJSON stream that emits 'jsonError' when it can't stringify
+export interface Events extends Minipass.Events {
+ jsonError: [e: Error]
+}
+
+export class NDJSONStream extends Minipass<string, any, Events> {
+ constructor() {
+ super({ objectMode: true })
+ }
+
+ // data is type `any` because that's WType
+ write(data, encoding, cb) {
+ try {
+ const json = JSON.stringify(data)
+ return super.write(json + '\n', encoding, cb)
+ } catch (er) {
+ if (!er instanceof Error) {
+ er = Object.assign(new Error('json stringify failed'), {
+ cause: er,
+ })
+ }
+ // trying to emit with something OTHER than an error will
+ // fail, because we declared the event arguments type.
+ this.emit('jsonError', er)
+ }
+ }
+}
+
+const s = new NDJSONStream()
+s.on('jsonError', e => {
+ // here, TS knows that e is an Error
+})
+```
+
+Emitting/handling events that aren't declared in this way is
+fine, but the arguments will be typed as `unknown`.
+
+## Differences from Node.js Streams
+
+There are several things that make Minipass streams different
+from (and in some ways superior to) Node.js core streams.
+
+Please read these caveats if you are familiar with node-core
+streams and intend to use Minipass streams in your programs.
+
+You can avoid most of these differences entirely (for a very
+small performance penalty) by setting `{async: true}` in the
+constructor options.
+
+### Timing
+
+Minipass streams are designed to support synchronous use-cases.
+Thus, data is emitted as soon as it is available, always. It is
+buffered until read, but no longer. Another way to look at it is
+that Minipass streams are exactly as synchronous as the logic
+that writes into them.
+
+This can be surprising if your code relies on
+`PassThrough.write()` always providing data on the next tick
+rather than the current one, or being able to call `resume()` and
+not have the entire buffer disappear immediately.
+
+However, without this synchronicity guarantee, there would be no
+way for Minipass to achieve the speeds it does, or support the
+synchronous use cases that it does. Simply put, waiting takes
+time.
+
+This non-deferring approach makes Minipass streams much easier to
+reason about, especially in the context of Promises and other
+flow-control mechanisms.
+
+Example:
+
+```js
+// hybrid module, either works
+import { Minipass } from 'minipass'
+// or:
+const { Minipass } = require('minipass')
+
+const stream = new Minipass()
+stream.on('data', () => console.log('data event'))
+console.log('before write')
+stream.write('hello')
+console.log('after write')
+// output:
+// before write
+// data event
+// after write
+```
+
+### Exception: Async Opt-In
+
+If you wish to have a Minipass stream with behavior that more
+closely mimics Node.js core streams, you can set the stream in
+async mode either by setting `async: true` in the constructor
+options, or by setting `stream.async = true` later on.
+
+```js
+// hybrid module, either works
+import { Minipass } from 'minipass'
+// or:
+const { Minipass } = require('minipass')
+
+const asyncStream = new Minipass({ async: true })
+asyncStream.on('data', () => console.log('data event'))
+console.log('before write')
+asyncStream.write('hello')
+console.log('after write')
+// output:
+// before write
+// after write
+// data event <-- this is deferred until the next tick
+```
+
+Switching _out_ of async mode is unsafe, as it could cause data
+corruption, and so is not enabled. Example:
+
+```js
+import { Minipass } from 'minipass'
+const stream = new Minipass({ encoding: 'utf8' })
+stream.on('data', chunk => console.log(chunk))
+stream.async = true
+console.log('before writes')
+stream.write('hello')
+setStreamSyncAgainSomehow(stream) // <-- this doesn't actually exist!
+stream.write('world')
+console.log('after writes')
+// hypothetical output would be:
+// before writes
+// world
+// after writes
+// hello
+// NOT GOOD!
+```
+
+To avoid this problem, once set into async mode, any attempt to
+make the stream sync again will be ignored.
+
+```js
+const { Minipass } = require('minipass')
+const stream = new Minipass({ encoding: 'utf8' })
+stream.on('data', chunk => console.log(chunk))
+stream.async = true
+console.log('before writes')
+stream.write('hello')
+stream.async = false // <-- no-op, stream already async
+stream.write('world')
+console.log('after writes')
+// actual output:
+// before writes
+// after writes
+// hello
+// world
+```
+
+### No High/Low Water Marks
+
+Node.js core streams will optimistically fill up a buffer,
+returning `true` on all writes until the limit is hit, even if
+the data has nowhere to go. Then, they will not attempt to draw
+more data in until the buffer size dips below a minimum value.
+
+Minipass streams are much simpler. The `write()` method will
+return `true` if the data has somewhere to go (which is to say,
+given the timing guarantees, that the data is already there by
+the time `write()` returns).
+
+If the data has nowhere to go, then `write()` returns false, and
+the data sits in a buffer, to be drained out immediately as soon
+as anyone consumes it.
+
+Since nothing is ever buffered unnecessarily, there is much less
+copying data, and less bookkeeping about buffer capacity levels.
+
+### Hazards of Buffering (or: Why Minipass Is So Fast)
+
+Since data written to a Minipass stream is immediately written
+all the way through the pipeline, and `write()` always returns
+true/false based on whether the data was fully flushed,
+backpressure is communicated immediately to the upstream caller.
+This minimizes buffering.
+
+Consider this case:
+
+```js
+const { PassThrough } = require('stream')
+const p1 = new PassThrough({ highWaterMark: 1024 })
+const p2 = new PassThrough({ highWaterMark: 1024 })
+const p3 = new PassThrough({ highWaterMark: 1024 })
+const p4 = new PassThrough({ highWaterMark: 1024 })
+
+p1.pipe(p2).pipe(p3).pipe(p4)
+p4.on('data', () => console.log('made it through'))
+
+// this returns false and buffers, then writes to p2 on next tick (1)
+// p2 returns false and buffers, pausing p1, then writes to p3 on next tick (2)
+// p3 returns false and buffers, pausing p2, then writes to p4 on next tick (3)
+// p4 returns false and buffers, pausing p3, then emits 'data' and 'drain'
+// on next tick (4)
+// p3 sees p4's 'drain' event, and calls resume(), emitting 'resume' and
+// 'drain' on next tick (5)
+// p2 sees p3's 'drain', calls resume(), emits 'resume' and 'drain' on next tick (6)
+// p1 sees p2's 'drain', calls resume(), emits 'resume' and 'drain' on next
+// tick (7)
+
+p1.write(Buffer.alloc(2048)) // returns false
+```
+
+Along the way, the data was buffered and deferred at each stage,
+and multiple event deferrals happened, for an unblocked pipeline
+where it was perfectly safe to write all the way through!
+
+Furthermore, setting a `highWaterMark` of `1024` might lead
+someone reading the code to think an advisory maximum of 1KiB is
+being set for the pipeline. However, the actual advisory
+buffering level is the _sum_ of `highWaterMark` values, since
+each one has its own bucket.
+
+Consider the Minipass case:
+
+```js
+const m1 = new Minipass()
+const m2 = new Minipass()
+const m3 = new Minipass()
+const m4 = new Minipass()
+
+m1.pipe(m2).pipe(m3).pipe(m4)
+m4.on('data', () => console.log('made it through'))
+
+// m1 is flowing, so it writes the data to m2 immediately
+// m2 is flowing, so it writes the data to m3 immediately
+// m3 is flowing, so it writes the data to m4 immediately
+// m4 is flowing, so it fires the 'data' event immediately, returns true
+// m4's write returned true, so m3 is still flowing, returns true
+// m3's write returned true, so m2 is still flowing, returns true
+// m2's write returned true, so m1 is still flowing, returns true
+// No event deferrals or buffering along the way!
+
+m1.write(Buffer.alloc(2048)) // returns true
+```
+
+It is extremely unlikely that you _don't_ want to buffer any data
+written, or _ever_ buffer data that can be flushed all the way
+through. Neither node-core streams nor Minipass ever fail to
+buffer written data, but node-core streams do a lot of
+unnecessary buffering and pausing.
+
+As always, the faster implementation is the one that does less
+stuff and waits less time to do it.
+
+### Immediately emit `end` for empty streams (when not paused)
+
+If a stream is not paused, and `end()` is called before writing
+any data into it, then it will emit `end` immediately.
+
+If you have logic that occurs on the `end` event which you don't
+want to potentially happen immediately (for example, closing file
+descriptors, moving on to the next entry in an archive parse
+stream, etc.) then be sure to call `stream.pause()` on creation,
+and then `stream.resume()` once you are ready to respond to the
+`end` event.
+
+However, this is _usually_ not a problem because:
+
+### Emit `end` When Asked
+
+One hazard of immediately emitting `'end'` is that you may not
+yet have had a chance to add a listener. In order to avoid this
+hazard, Minipass streams safely re-emit the `'end'` event if a
+new listener is added after `'end'` has been emitted.
+
+Ie, if you do `stream.on('end', someFunction)`, and the stream
+has already emitted `end`, then it will call the handler right
+away. (You can think of this somewhat like attaching a new
+`.then(fn)` to a previously-resolved Promise.)
+
+To prevent calling handlers multiple times who would not expect
+multiple ends to occur, all listeners are removed from the
+`'end'` event whenever it is emitted.
+
+### Emit `error` When Asked
+
+The most recent error object passed to the `'error'` event is
+stored on the stream. If a new `'error'` event handler is added,
+and an error was previously emitted, then the event handler will
+be called immediately (or on `process.nextTick` in the case of
+async streams).
+
+This makes it much more difficult to end up trying to interact
+with a broken stream, if the error handler is added after an
+error was previously emitted.
+
+### Impact of "immediate flow" on Tee-streams
+
+A "tee stream" is a stream piping to multiple destinations:
+
+```js
+const tee = new Minipass()
+t.pipe(dest1)
+t.pipe(dest2)
+t.write('foo') // goes to both destinations
+```
+
+Since Minipass streams _immediately_ process any pending data
+through the pipeline when a new pipe destination is added, this
+can have surprising effects, especially when a stream comes in
+from some other function and may or may not have data in its
+buffer.
+
+```js
+// WARNING! WILL LOSE DATA!
+const src = new Minipass()
+src.write('foo')
+src.pipe(dest1) // 'foo' chunk flows to dest1 immediately, and is gone
+src.pipe(dest2) // gets nothing!
+```
+
+One solution is to create a dedicated tee-stream junction that
+pipes to both locations, and then pipe to _that_ instead.
+
+```js
+// Safe example: tee to both places
+const src = new Minipass()
+src.write('foo')
+const tee = new Minipass()
+tee.pipe(dest1)
+tee.pipe(dest2)
+src.pipe(tee) // tee gets 'foo', pipes to both locations
+```
+
+The same caveat applies to `on('data')` event listeners. The
+first one added will _immediately_ receive all of the data,
+leaving nothing for the second:
+
+```js
+// WARNING! WILL LOSE DATA!
+const src = new Minipass()
+src.write('foo')
+src.on('data', handler1) // receives 'foo' right away
+src.on('data', handler2) // nothing to see here!
+```
+
+Using a dedicated tee-stream can be used in this case as well:
+
+```js
+// Safe example: tee to both data handlers
+const src = new Minipass()
+src.write('foo')
+const tee = new Minipass()
+tee.on('data', handler1)
+tee.on('data', handler2)
+src.pipe(tee)
+```
+
+All of the hazards in this section are avoided by setting `{
+async: true }` in the Minipass constructor, or by setting
+`stream.async = true` afterwards. Note that this does add some
+overhead, so should only be done in cases where you are willing
+to lose a bit of performance in order to avoid having to refactor
+program logic.
+
+## USAGE
+
+It's a stream! Use it like a stream and it'll most likely do what
+you want.
+
+```js
+import { Minipass } from 'minipass'
+const mp = new Minipass(options) // options is optional
+mp.write('foo')
+mp.pipe(someOtherStream)
+mp.end('bar')
+```
+
+### OPTIONS
+
+- `encoding` How would you like the data coming _out_ of the
+ stream to be encoded? Accepts any values that can be passed to
+ `Buffer.toString()`.
+- `objectMode` Emit data exactly as it comes in. This will be
+ flipped on by default if you write() something other than a
+ string or Buffer at any point. Setting `objectMode: true` will
+ prevent setting any encoding value.
+- `async` Defaults to `false`. Set to `true` to defer data
+ emission until next tick. This reduces performance slightly,
+ but makes Minipass streams use timing behavior closer to Node
+ core streams. See [Timing](#timing) for more details.
+- `signal` An `AbortSignal` that will cause the stream to unhook
+ itself from everything and become as inert as possible. Note
+ that providing a `signal` parameter will make `'error'` events
+ no longer throw if they are unhandled, but they will still be
+ emitted to handlers if any are attached.
+
+### API
+
+Implements the user-facing portions of Node.js's `Readable` and
+`Writable` streams.
+
+### Methods
+
+- `write(chunk, [encoding], [callback])` - Put data in. (Note
+ that, in the base Minipass class, the same data will come out.)
+ Returns `false` if the stream will buffer the next write, or
+ true if it's still in "flowing" mode.
+- `end([chunk, [encoding]], [callback])` - Signal that you have
+ no more data to write. This will queue an `end` event to be
+ fired when all the data has been consumed.
+- `pause()` - No more data for a while, please. This also
+ prevents `end` from being emitted for empty streams until the
+ stream is resumed.
+- `resume()` - Resume the stream. If there's data in the buffer,
+ it is all discarded. Any buffered events are immediately
+ emitted.
+- `pipe(dest)` - Send all output to the stream provided. When
+ data is emitted, it is immediately written to any and all pipe
+ destinations. (Or written on next tick in `async` mode.)
+- `unpipe(dest)` - Stop piping to the destination stream. This is
+ immediate, meaning that any asynchronously queued data will
+ _not_ make it to the destination when running in `async` mode.
+ - `options.end` - Boolean, end the destination stream when the
+ source stream ends. Default `true`.
+ - `options.proxyErrors` - Boolean, proxy `error` events from
+ the source stream to the destination stream. Note that errors
+ are _not_ proxied after the pipeline terminates, either due
+ to the source emitting `'end'` or manually unpiping with
+ `src.unpipe(dest)`. Default `false`.
+- `on(ev, fn)`, `emit(ev, fn)` - Minipass streams are
+ EventEmitters. Some events are given special treatment,
+ however. (See below under "events".)
+- `promise()` - Returns a Promise that resolves when the stream
+ emits `end`, or rejects if the stream emits `error`.
+- `collect()` - Return a Promise that resolves on `end` with an
+ array containing each chunk of data that was emitted, or
+ rejects if the stream emits `error`. Note that this consumes
+ the stream data.
+- `concat()` - Same as `collect()`, but concatenates the data
+ into a single Buffer object. Will reject the returned promise
+ if the stream is in objectMode, or if it goes into objectMode
+ by the end of the data.
+- `read(n)` - Consume `n` bytes of data out of the buffer. If `n`
+ is not provided, then consume all of it. If `n` bytes are not
+ available, then it returns null. **Note** consuming streams in
+ this way is less efficient, and can lead to unnecessary Buffer
+ copying.
+- `destroy([er])` - Destroy the stream. If an error is provided,
+ then an `'error'` event is emitted. If the stream has a
+ `close()` method, and has not emitted a `'close'` event yet,
+ then `stream.close()` will be called. Any Promises returned by
+ `.promise()`, `.collect()` or `.concat()` will be rejected.
+ After being destroyed, writing to the stream will emit an
+ error. No more data will be emitted if the stream is destroyed,
+ even if it was previously buffered.
+
+### Properties
+
+- `bufferLength` Read-only. Total number of bytes buffered, or in
+ the case of objectMode, the total number of objects.
+- `encoding` Read-only. The encoding that has been set.
+- `flowing` Read-only. Boolean indicating whether a chunk written
+ to the stream will be immediately emitted.
+- `emittedEnd` Read-only. Boolean indicating whether the end-ish
+ events (ie, `end`, `prefinish`, `finish`) have been emitted.
+ Note that listening on any end-ish event will immediateyl
+ re-emit it if it has already been emitted.
+- `writable` Whether the stream is writable. Default `true`. Set
+ to `false` when `end()`
+- `readable` Whether the stream is readable. Default `true`.
+- `pipes` An array of Pipe objects referencing streams that this
+ stream is piping into.
+- `destroyed` A getter that indicates whether the stream was
+ destroyed.
+- `paused` True if the stream has been explicitly paused,
+ otherwise false.
+- `objectMode` Indicates whether the stream is in `objectMode`.
+- `aborted` Readonly property set when the `AbortSignal`
+ dispatches an `abort` event.
+
+### Events
+
+- `data` Emitted when there's data to read. Argument is the data
+ to read. This is never emitted while not flowing. If a listener
+ is attached, that will resume the stream.
+- `end` Emitted when there's no more data to read. This will be
+ emitted immediately for empty streams when `end()` is called.
+ If a listener is attached, and `end` was already emitted, then
+ it will be emitted again. All listeners are removed when `end`
+ is emitted.
+- `prefinish` An end-ish event that follows the same logic as
+ `end` and is emitted in the same conditions where `end` is
+ emitted. Emitted after `'end'`.
+- `finish` An end-ish event that follows the same logic as `end`
+ and is emitted in the same conditions where `end` is emitted.
+ Emitted after `'prefinish'`.
+- `close` An indication that an underlying resource has been
+ released. Minipass does not emit this event, but will defer it
+ until after `end` has been emitted, since it throws off some
+ stream libraries otherwise.
+- `drain` Emitted when the internal buffer empties, and it is
+ again suitable to `write()` into the stream.
+- `readable` Emitted when data is buffered and ready to be read
+ by a consumer.
+- `resume` Emitted when stream changes state from buffering to
+ flowing mode. (Ie, when `resume` is called, `pipe` is called,
+ or a `data` event listener is added.)
+
+### Static Methods
+
+- `Minipass.isStream(stream)` Returns `true` if the argument is a
+ stream, and false otherwise. To be considered a stream, the
+ object must be either an instance of Minipass, or an
+ EventEmitter that has either a `pipe()` method, or both
+ `write()` and `end()` methods. (Pretty much any stream in
+ node-land will return `true` for this.)
+
+## EXAMPLES
+
+Here are some examples of things you can do with Minipass
+streams.
+
+### simple "are you done yet" promise
+
+```js
+mp.promise().then(
+ () => {
+ // stream is finished
+ },
+ er => {
+ // stream emitted an error
+ }
+)
+```
+
+### collecting
+
+```js
+mp.collect().then(all => {
+ // all is an array of all the data emitted
+ // encoding is supported in this case, so
+ // so the result will be a collection of strings if
+ // an encoding is specified, or buffers/objects if not.
+ //
+ // In an async function, you may do
+ // const data = await stream.collect()
+})
+```
+
+### collecting into a single blob
+
+This is a bit slower because it concatenates the data into one
+chunk for you, but if you're going to do it yourself anyway, it's
+convenient this way:
+
+```js
+mp.concat().then(onebigchunk => {
+ // onebigchunk is a string if the stream
+ // had an encoding set, or a buffer otherwise.
+})
+```
+
+### iteration
+
+You can iterate over streams synchronously or asynchronously in
+platforms that support it.
+
+Synchronous iteration will end when the currently available data
+is consumed, even if the `end` event has not been reached. In
+string and buffer mode, the data is concatenated, so unless
+multiple writes are occurring in the same tick as the `read()`,
+sync iteration loops will generally only have a single iteration.
+
+To consume chunks in this way exactly as they have been written,
+with no flattening, create the stream with the `{ objectMode:
+true }` option.
+
+```js
+const mp = new Minipass({ objectMode: true })
+mp.write('a')
+mp.write('b')
+for (let letter of mp) {
+ console.log(letter) // a, b
+}
+mp.write('c')
+mp.write('d')
+for (let letter of mp) {
+ console.log(letter) // c, d
+}
+mp.write('e')
+mp.end()
+for (let letter of mp) {
+ console.log(letter) // e
+}
+for (let letter of mp) {
+ console.log(letter) // nothing
+}
+```
+
+Asynchronous iteration will continue until the end event is reached,
+consuming all of the data.
+
+```js
+const mp = new Minipass({ encoding: 'utf8' })
+
+// some source of some data
+let i = 5
+const inter = setInterval(() => {
+ if (i-- > 0) mp.write(Buffer.from('foo\n', 'utf8'))
+ else {
+ mp.end()
+ clearInterval(inter)
+ }
+}, 100)
+
+// consume the data with asynchronous iteration
+async function consume() {
+ for await (let chunk of mp) {
+ console.log(chunk)
+ }
+ return 'ok'
+}
+
+consume().then(res => console.log(res))
+// logs `foo\n` 5 times, and then `ok`
+```
+
+### subclass that `console.log()`s everything written into it
+
+```js
+class Logger extends Minipass {
+ write(chunk, encoding, callback) {
+ console.log('WRITE', chunk, encoding)
+ return super.write(chunk, encoding, callback)
+ }
+ end(chunk, encoding, callback) {
+ console.log('END', chunk, encoding)
+ return super.end(chunk, encoding, callback)
+ }
+}
+
+someSource.pipe(new Logger()).pipe(someDest)
+```
+
+### same thing, but using an inline anonymous class
+
+```js
+// js classes are fun
+someSource
+ .pipe(
+ new (class extends Minipass {
+ emit(ev, ...data) {
+ // let's also log events, because debugging some weird thing
+ console.log('EMIT', ev)
+ return super.emit(ev, ...data)
+ }
+ write(chunk, encoding, callback) {
+ console.log('WRITE', chunk, encoding)
+ return super.write(chunk, encoding, callback)
+ }
+ end(chunk, encoding, callback) {
+ console.log('END', chunk, encoding)
+ return super.end(chunk, encoding, callback)
+ }
+ })()
+ )
+ .pipe(someDest)
+```
+
+### subclass that defers 'end' for some reason
+
+```js
+class SlowEnd extends Minipass {
+ emit(ev, ...args) {
+ if (ev === 'end') {
+ console.log('going to end, hold on a sec')
+ setTimeout(() => {
+ console.log('ok, ready to end now')
+ super.emit('end', ...args)
+ }, 100)
+ return true
+ } else {
+ return super.emit(ev, ...args)
+ }
+ }
+}
+```
+
+### transform that creates newline-delimited JSON
+
+```js
+class NDJSONEncode extends Minipass {
+ write(obj, cb) {
+ try {
+ // JSON.stringify can throw, emit an error on that
+ return super.write(JSON.stringify(obj) + '\n', 'utf8', cb)
+ } catch (er) {
+ this.emit('error', er)
+ }
+ }
+ end(obj, cb) {
+ if (typeof obj === 'function') {
+ cb = obj
+ obj = undefined
+ }
+ if (obj !== undefined) {
+ this.write(obj)
+ }
+ return super.end(cb)
+ }
+}
+```
+
+### transform that parses newline-delimited JSON
+
+```js
+class NDJSONDecode extends Minipass {
+ constructor(options) {
+ // always be in object mode, as far as Minipass is concerned
+ super({ objectMode: true })
+ this._jsonBuffer = ''
+ }
+ write(chunk, encoding, cb) {
+ if (
+ typeof chunk === 'string' &&
+ typeof encoding === 'string' &&
+ encoding !== 'utf8'
+ ) {
+ chunk = Buffer.from(chunk, encoding).toString()
+ } else if (Buffer.isBuffer(chunk)) {
+ chunk = chunk.toString()
+ }
+ if (typeof encoding === 'function') {
+ cb = encoding
+ }
+ const jsonData = (this._jsonBuffer + chunk).split('\n')
+ this._jsonBuffer = jsonData.pop()
+ for (let i = 0; i < jsonData.length; i++) {
+ try {
+ // JSON.parse can throw, emit an error on that
+ super.write(JSON.parse(jsonData[i]))
+ } catch (er) {
+ this.emit('error', er)
+ continue
+ }
+ }
+ if (cb) cb()
+ }
+}
+```
diff --git a/node_modules/minipass/package.json b/node_modules/minipass/package.json
new file mode 100644
index 00000000..771969b0
--- /dev/null
+++ b/node_modules/minipass/package.json
@@ -0,0 +1,82 @@
+{
+ "name": "minipass",
+ "version": "7.1.2",
+ "description": "minimal implementation of a PassThrough stream",
+ "main": "./dist/commonjs/index.js",
+ "types": "./dist/commonjs/index.d.ts",
+ "type": "module",
+ "tshy": {
+ "selfLink": false,
+ "main": true,
+ "exports": {
+ "./package.json": "./package.json",
+ ".": "./src/index.ts"
+ }
+ },
+ "exports": {
+ "./package.json": "./package.json",
+ ".": {
+ "import": {
+ "types": "./dist/esm/index.d.ts",
+ "default": "./dist/esm/index.js"
+ },
+ "require": {
+ "types": "./dist/commonjs/index.d.ts",
+ "default": "./dist/commonjs/index.js"
+ }
+ }
+ },
+ "files": [
+ "dist"
+ ],
+ "scripts": {
+ "preversion": "npm test",
+ "postversion": "npm publish",
+ "prepublishOnly": "git push origin --follow-tags",
+ "prepare": "tshy",
+ "pretest": "npm run prepare",
+ "presnap": "npm run prepare",
+ "test": "tap",
+ "snap": "tap",
+ "format": "prettier --write . --loglevel warn",
+ "typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts"
+ },
+ "prettier": {
+ "semi": false,
+ "printWidth": 75,
+ "tabWidth": 2,
+ "useTabs": false,
+ "singleQuote": true,
+ "jsxSingleQuote": false,
+ "bracketSameLine": true,
+ "arrowParens": "avoid",
+ "endOfLine": "lf"
+ },
+ "devDependencies": {
+ "@types/end-of-stream": "^1.4.2",
+ "@types/node": "^20.1.2",
+ "end-of-stream": "^1.4.0",
+ "node-abort-controller": "^3.1.1",
+ "prettier": "^2.6.2",
+ "tap": "^19.0.0",
+ "through2": "^2.0.3",
+ "tshy": "^1.14.0",
+ "typedoc": "^0.25.1"
+ },
+ "repository": "https://github.com/isaacs/minipass",
+ "keywords": [
+ "passthrough",
+ "stream"
+ ],
+ "author": "Isaac Z. Schlueter <[email protected]> (http://blog.izs.me/)",
+ "license": "ISC",
+ "engines": {
+ "node": ">=16 || 14 >=14.17"
+ },
+ "tap": {
+ "typecheck": true,
+ "include": [
+ "test/*.ts"
+ ]
+ }
+}
diff --git a/node_modules/minizlib/LICENSE b/node_modules/minizlib/LICENSE
new file mode 100644
index 00000000..49f7efe4
--- /dev/null
+++ b/node_modules/minizlib/LICENSE
@@ -0,0 +1,26 @@
+Minizlib was created by Isaac Z. Schlueter.
+It is a derivative work of the Node.js project.
+
+"""
+Copyright (c) 2017-2023 Isaac Z. Schlueter and Contributors
+Copyright (c) 2017-2023 Node.js contributors. All rights reserved.
+Copyright (c) 2017-2023 Joyent, Inc. and other Node contributors. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+"""
diff --git a/node_modules/minizlib/README.md b/node_modules/minizlib/README.md
new file mode 100644
index 00000000..0ab810d6
--- /dev/null
+++ b/node_modules/minizlib/README.md
@@ -0,0 +1,62 @@
+# minizlib
+
+A fast zlib stream built on [minipass](http://npm.im/minipass) and
+Node.js's zlib binding.
+
+This module was created to serve the needs of
+[node-tar](http://npm.im/tar) and
+[minipass-fetch](http://npm.im/minipass-fetch).
+
+Brotli is supported in versions of node with a Brotli binding.
+
+## How does this differ from the streams in `'node:zlib'`?
+
+First, there are no convenience methods to compress or decompress a
+buffer. If you want those, use the built-in `zlib` module. This is
+only streams. That being said, Minipass streams to make it fairly easy to
+use as one-liners: `new zlib.Deflate().end(data).read()` will return the
+deflate compressed result.
+
+This module compresses and decompresses the data as fast as you feed
+it in. It is synchronous, and runs on the main process thread. Zlib
+and Brotli operations can be high CPU, but they're very fast, and doing it
+this way means much less bookkeeping and artificial deferral.
+
+Node's built in zlib streams are built on top of `stream.Transform`.
+They do the maximally safe thing with respect to consistent
+asynchrony, buffering, and backpressure.
+
+See [Minipass](http://npm.im/minipass) for more on the differences between
+Node.js core streams and Minipass streams, and the convenience methods
+provided by that class.
+
+## Classes
+
+- Deflate
+- Inflate
+- Gzip
+- Gunzip
+- DeflateRaw
+- InflateRaw
+- Unzip
+- BrotliCompress (Node v10 and higher)
+- BrotliDecompress (Node v10 and higher)
+
+## USAGE
+
+```js
+import { BrotliDecompress } from 'minizlib'
+// or: const BrotliDecompress = require('minizlib')
+
+const input = sourceOfCompressedData()
+const decode = new BrotliDecompress()
+const output = whereToWriteTheDecodedData()
+input.pipe(decode).pipe(output)
+```
+
+## REPRODUCIBLE BUILDS
+
+To create reproducible gzip compressed files across different operating
+systems, set `portable: true` in the options. This causes minizlib to set
+the `OS` indicator in byte 9 of the extended gzip header to `0xFF` for
+'unknown'.
diff --git a/node_modules/minizlib/package.json b/node_modules/minizlib/package.json
new file mode 100644
index 00000000..43cb855e
--- /dev/null
+++ b/node_modules/minizlib/package.json
@@ -0,0 +1,80 @@
+{
+ "name": "minizlib",
+ "version": "3.0.2",
+ "description": "A small fast zlib stream built on [minipass](http://npm.im/minipass) and Node.js's zlib binding.",
+ "main": "./dist/commonjs/index.js",
+ "dependencies": {
+ "minipass": "^7.1.2"
+ },
+ "scripts": {
+ "prepare": "tshy",
+ "pretest": "npm run prepare",
+ "test": "tap",
+ "preversion": "npm test",
+ "postversion": "npm publish",
+ "prepublishOnly": "git push origin --follow-tags",
+ "format": "prettier --write . --loglevel warn",
+ "typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/isaacs/minizlib.git"
+ },
+ "keywords": [
+ "zlib",
+ "gzip",
+ "gunzip",
+ "deflate",
+ "inflate",
+ "compression",
+ "zip",
+ "unzip"
+ ],
+ "author": "Isaac Z. Schlueter <[email protected]> (http://blog.izs.me/)",
+ "license": "MIT",
+ "devDependencies": {
+ "@types/node": "^22.13.14",
+ "tap": "^21.1.0",
+ "tshy": "^3.0.2",
+ "typedoc": "^0.28.1"
+ },
+ "files": [
+ "dist"
+ ],
+ "engines": {
+ "node": ">= 18"
+ },
+ "tshy": {
+ "exports": {
+ "./package.json": "./package.json",
+ ".": "./src/index.ts"
+ }
+ },
+ "exports": {
+ "./package.json": "./package.json",
+ ".": {
+ "import": {
+ "types": "./dist/esm/index.d.ts",
+ "default": "./dist/esm/index.js"
+ },
+ "require": {
+ "types": "./dist/commonjs/index.d.ts",
+ "default": "./dist/commonjs/index.js"
+ }
+ }
+ },
+ "types": "./dist/commonjs/index.d.ts",
+ "type": "module",
+ "prettier": {
+ "semi": false,
+ "printWidth": 75,
+ "tabWidth": 2,
+ "useTabs": false,
+ "singleQuote": true,
+ "jsxSingleQuote": false,
+ "bracketSameLine": true,
+ "arrowParens": "avoid",
+ "endOfLine": "lf"
+ },
+ "module": "./dist/esm/index.js"
+}
diff --git a/node_modules/mkdirp/LICENSE b/node_modules/mkdirp/LICENSE
new file mode 100644
index 00000000..0a034db7
--- /dev/null
+++ b/node_modules/mkdirp/LICENSE
@@ -0,0 +1,21 @@
+Copyright (c) 2011-2023 James Halliday ([email protected]) and Isaac Z. Schlueter ([email protected])
+
+This project is free software released under the MIT license:
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/mkdirp/package.json b/node_modules/mkdirp/package.json
new file mode 100644
index 00000000..f31ac331
--- /dev/null
+++ b/node_modules/mkdirp/package.json
@@ -0,0 +1,91 @@
+{
+ "name": "mkdirp",
+ "description": "Recursively mkdir, like `mkdir -p`",
+ "version": "3.0.1",
+ "keywords": [
+ "mkdir",
+ "directory",
+ "make dir",
+ "make",
+ "dir",
+ "recursive",
+ "native"
+ ],
+ "bin": "./dist/cjs/src/bin.js",
+ "main": "./dist/cjs/src/index.js",
+ "module": "./dist/mjs/index.js",
+ "types": "./dist/mjs/index.d.ts",
+ "exports": {
+ ".": {
+ "import": {
+ "types": "./dist/mjs/index.d.ts",
+ "default": "./dist/mjs/index.js"
+ },
+ "require": {
+ "types": "./dist/cjs/src/index.d.ts",
+ "default": "./dist/cjs/src/index.js"
+ }
+ }
+ },
+ "files": [
+ "dist"
+ ],
+ "scripts": {
+ "preversion": "npm test",
+ "postversion": "npm publish",
+ "prepublishOnly": "git push origin --follow-tags",
+ "preprepare": "rm -rf dist",
+ "prepare": "tsc -p tsconfig.json && tsc -p tsconfig-esm.json",
+ "postprepare": "bash fixup.sh",
+ "pretest": "npm run prepare",
+ "presnap": "npm run prepare",
+ "test": "c8 tap",
+ "snap": "c8 tap",
+ "format": "prettier --write . --loglevel warn",
+ "benchmark": "node benchmark/index.js",
+ "typedoc": "typedoc --tsconfig tsconfig-esm.json ./src/*.ts"
+ },
+ "prettier": {
+ "semi": false,
+ "printWidth": 80,
+ "tabWidth": 2,
+ "useTabs": false,
+ "singleQuote": true,
+ "jsxSingleQuote": false,
+ "bracketSameLine": true,
+ "arrowParens": "avoid",
+ "endOfLine": "lf"
+ },
+ "devDependencies": {
+ "@types/brace-expansion": "^1.1.0",
+ "@types/node": "^18.11.9",
+ "@types/tap": "^15.0.7",
+ "c8": "^7.12.0",
+ "eslint-config-prettier": "^8.6.0",
+ "prettier": "^2.8.2",
+ "tap": "^16.3.3",
+ "ts-node": "^10.9.1",
+ "typedoc": "^0.23.21",
+ "typescript": "^4.9.3"
+ },
+ "tap": {
+ "coverage": false,
+ "node-arg": [
+ "--no-warnings",
+ "--loader",
+ "ts-node/esm"
+ ],
+ "ts": false
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/isaacs/node-mkdirp.git"
+ },
+ "license": "MIT",
+ "engines": {
+ "node": ">=10"
+ }
+}
diff --git a/node_modules/mkdirp/readme.markdown b/node_modules/mkdirp/readme.markdown
new file mode 100644
index 00000000..df654b80
--- /dev/null
+++ b/node_modules/mkdirp/readme.markdown
@@ -0,0 +1,281 @@
+# mkdirp
+
+Like `mkdir -p`, but in Node.js!
+
+Now with a modern API and no\* bugs!
+
+<small>\* may contain some bugs</small>
+
+# example
+
+## pow.js
+
+```js
+// hybrid module, import or require() both work
+import { mkdirp } from 'mkdirp'
+// or:
+const { mkdirp } = require('mkdirp')
+
+// return value is a Promise resolving to the first directory created
+mkdirp('/tmp/foo/bar/baz').then(made =>
+ console.log(`made directories, starting with ${made}`)
+)
+```
+
+Output (where `/tmp/foo` already exists)
+
+```
+made directories, starting with /tmp/foo/bar
+```
+
+Or, if you don't have time to wait around for promises:
+
+```js
+import { mkdirp } from 'mkdirp'
+
+// return value is the first directory created
+const made = mkdirp.sync('/tmp/foo/bar/baz')
+console.log(`made directories, starting with ${made}`)
+```
+
+And now /tmp/foo/bar/baz exists, huzzah!
+
+# methods
+
+```js
+import { mkdirp } from 'mkdirp'
+```
+
+## `mkdirp(dir: string, opts?: MkdirpOptions) => Promise<string | undefined>`
+
+Create a new directory and any necessary subdirectories at `dir`
+with octal permission string `opts.mode`. If `opts` is a string
+or number, it will be treated as the `opts.mode`.
+
+If `opts.mode` isn't specified, it defaults to `0o777`.
+
+Promise resolves to first directory `made` that had to be
+created, or `undefined` if everything already exists. Promise
+rejects if any errors are encountered. Note that, in the case of
+promise rejection, some directories _may_ have been created, as
+recursive directory creation is not an atomic operation.
+
+You can optionally pass in an alternate `fs` implementation by
+passing in `opts.fs`. Your implementation should have
+`opts.fs.mkdir(path, opts, cb)` and `opts.fs.stat(path, cb)`.
+
+You can also override just one or the other of `mkdir` and `stat`
+by passing in `opts.stat` or `opts.mkdir`, or providing an `fs`
+option that only overrides one of these.
+
+## `mkdirp.sync(dir: string, opts: MkdirpOptions) => string|undefined`
+
+Synchronously create a new directory and any necessary
+subdirectories at `dir` with octal permission string `opts.mode`.
+If `opts` is a string or number, it will be treated as the
+`opts.mode`.
+
+If `opts.mode` isn't specified, it defaults to `0o777`.
+
+Returns the first directory that had to be created, or undefined
+if everything already exists.
+
+You can optionally pass in an alternate `fs` implementation by
+passing in `opts.fs`. Your implementation should have
+`opts.fs.mkdirSync(path, mode)` and `opts.fs.statSync(path)`.
+
+You can also override just one or the other of `mkdirSync` and
+`statSync` by passing in `opts.statSync` or `opts.mkdirSync`, or
+providing an `fs` option that only overrides one of these.
+
+## `mkdirp.manual`, `mkdirp.manualSync`
+
+Use the manual implementation (not the native one). This is the
+default when the native implementation is not available or the
+stat/mkdir implementation is overridden.
+
+## `mkdirp.native`, `mkdirp.nativeSync`
+
+Use the native implementation (not the manual one). This is the
+default when the native implementation is available and
+stat/mkdir are not overridden.
+
+# implementation
+
+On Node.js v10.12.0 and above, use the native `fs.mkdir(p,
+{recursive:true})` option, unless `fs.mkdir`/`fs.mkdirSync` has
+been overridden by an option.
+
+## native implementation
+
+- If the path is a root directory, then pass it to the underlying
+ implementation and return the result/error. (In this case,
+ it'll either succeed or fail, but we aren't actually creating
+ any dirs.)
+- Walk up the path statting each directory, to find the first
+ path that will be created, `made`.
+- Call `fs.mkdir(path, { recursive: true })` (or `fs.mkdirSync`)
+- If error, raise it to the caller.
+- Return `made`.
+
+## manual implementation
+
+- Call underlying `fs.mkdir` implementation, with `recursive:
+false`
+- If error:
+ - If path is a root directory, raise to the caller and do not
+ handle it
+ - If ENOENT, mkdirp parent dir, store result as `made`
+ - stat(path)
+ - If error, raise original `mkdir` error
+ - If directory, return `made`
+ - Else, raise original `mkdir` error
+- else
+ - return `undefined` if a root dir, or `made` if set, or `path`
+
+## windows vs unix caveat
+
+On Windows file systems, attempts to create a root directory (ie,
+a drive letter or root UNC path) will fail. If the root
+directory exists, then it will fail with `EPERM`. If the root
+directory does not exist, then it will fail with `ENOENT`.
+
+On posix file systems, attempts to create a root directory (in
+recursive mode) will succeed silently, as it is treated like just
+another directory that already exists. (In non-recursive mode,
+of course, it fails with `EEXIST`.)
+
+In order to preserve this system-specific behavior (and because
+it's not as if we can create the parent of a root directory
+anyway), attempts to create a root directory are passed directly
+to the `fs` implementation, and any errors encountered are not
+handled.
+
+## native error caveat
+
+The native implementation (as of at least Node.js v13.4.0) does
+not provide appropriate errors in some cases (see
+[nodejs/node#31481](https://github.com/nodejs/node/issues/31481)
+and
+[nodejs/node#28015](https://github.com/nodejs/node/issues/28015)).
+
+In order to work around this issue, the native implementation
+will fall back to the manual implementation if an `ENOENT` error
+is encountered.
+
+# choosing a recursive mkdir implementation
+
+There are a few to choose from! Use the one that suits your
+needs best :D
+
+## use `fs.mkdir(path, {recursive: true}, cb)` if:
+
+- You wish to optimize performance even at the expense of other
+ factors.
+- You don't need to know the first dir created.
+- You are ok with getting `ENOENT` as the error when some other
+ problem is the actual cause.
+- You can limit your platforms to Node.js v10.12 and above.
+- You're ok with using callbacks instead of promises.
+- You don't need/want a CLI.
+- You don't need to override the `fs` methods in use.
+
+## use this module (mkdirp 1.x or 2.x) if:
+
+- You need to know the first directory that was created.
+- You wish to use the native implementation if available, but
+ fall back when it's not.
+- You prefer promise-returning APIs to callback-taking APIs.
+- You want more useful error messages than the native recursive
+ mkdir provides (at least as of Node.js v13.4), and are ok with
+ re-trying on `ENOENT` to achieve this.
+- You need (or at least, are ok with) a CLI.
+- You need to override the `fs` methods in use.
+
+## use [`make-dir`](http://npm.im/make-dir) if:
+
+- You do not need to know the first dir created (and wish to save
+ a few `stat` calls when using the native implementation for
+ this reason).
+- You wish to use the native implementation if available, but
+ fall back when it's not.
+- You prefer promise-returning APIs to callback-taking APIs.
+- You are ok with occasionally getting `ENOENT` errors for
+ failures that are actually related to something other than a
+ missing file system entry.
+- You don't need/want a CLI.
+- You need to override the `fs` methods in use.
+
+## use mkdirp 0.x if:
+
+- You need to know the first directory that was created.
+- You need (or at least, are ok with) a CLI.
+- You need to override the `fs` methods in use.
+- You're ok with using callbacks instead of promises.
+- You are not running on Windows, where the root-level ENOENT
+ errors can lead to infinite regress.
+- You think vinyl just sounds warmer and richer for some weird
+ reason.
+- You are supporting truly ancient Node.js versions, before even
+ the advent of a `Promise` language primitive. (Please don't.
+ You deserve better.)
+
+# cli
+
+This package also ships with a `mkdirp` command.
+
+```
+$ mkdirp -h
+
+usage: mkdirp [DIR1,DIR2..] {OPTIONS}
+
+ Create each supplied directory including any necessary parent directories
+ that don't yet exist.
+
+ If the directory already exists, do nothing.
+
+OPTIONS are:
+
+ -m<mode> If a directory needs to be created, set the mode as an octal
+ --mode=<mode> permission string.
+
+ -v --version Print the mkdirp version number
+
+ -h --help Print this helpful banner
+
+ -p --print Print the first directories created for each path provided
+
+ --manual Use manual implementation, even if native is available
+```
+
+# install
+
+With [npm](http://npmjs.org) do:
+
+```
+npm install mkdirp
+```
+
+to get the library locally, or
+
+```
+npm install -g mkdirp
+```
+
+to get the command everywhere, or
+
+```
+npx mkdirp ...
+```
+
+to run the command without installing it globally.
+
+# platform support
+
+This module works on node v8, but only v10 and above are officially
+supported, as Node v8 reached its LTS end of life 2020-01-01, which is in
+the past, as of this writing.
+
+# license
+
+MIT
diff --git a/node_modules/ms/index.js b/node_modules/ms/index.js
new file mode 100644
index 00000000..ea734fb7
--- /dev/null
+++ b/node_modules/ms/index.js
@@ -0,0 +1,162 @@
+/**
+ * Helpers.
+ */
+
+var s = 1000;
+var m = s * 60;
+var h = m * 60;
+var d = h * 24;
+var w = d * 7;
+var y = d * 365.25;
+
+/**
+ * Parse or format the given `val`.
+ *
+ * Options:
+ *
+ * - `long` verbose formatting [false]
+ *
+ * @param {String|Number} val
+ * @param {Object} [options]
+ * @throws {Error} throw an error if val is not a non-empty string or a number
+ * @return {String|Number}
+ * @api public
+ */
+
+module.exports = function (val, options) {
+ options = options || {};
+ var type = typeof val;
+ if (type === 'string' && val.length > 0) {
+ return parse(val);
+ } else if (type === 'number' && isFinite(val)) {
+ return options.long ? fmtLong(val) : fmtShort(val);
+ }
+ throw new Error(
+ 'val is not a non-empty string or a valid number. val=' +
+ JSON.stringify(val)
+ );
+};
+
+/**
+ * Parse the given `str` and return milliseconds.
+ *
+ * @param {String} str
+ * @return {Number}
+ * @api private
+ */
+
+function parse(str) {
+ str = String(str);
+ if (str.length > 100) {
+ return;
+ }
+ var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
+ str
+ );
+ if (!match) {
+ return;
+ }
+ var n = parseFloat(match[1]);
+ var type = (match[2] || 'ms').toLowerCase();
+ switch (type) {
+ case 'years':
+ case 'year':
+ case 'yrs':
+ case 'yr':
+ case 'y':
+ return n * y;
+ case 'weeks':
+ case 'week':
+ case 'w':
+ return n * w;
+ case 'days':
+ case 'day':
+ case 'd':
+ return n * d;
+ case 'hours':
+ case 'hour':
+ case 'hrs':
+ case 'hr':
+ case 'h':
+ return n * h;
+ case 'minutes':
+ case 'minute':
+ case 'mins':
+ case 'min':
+ case 'm':
+ return n * m;
+ case 'seconds':
+ case 'second':
+ case 'secs':
+ case 'sec':
+ case 's':
+ return n * s;
+ case 'milliseconds':
+ case 'millisecond':
+ case 'msecs':
+ case 'msec':
+ case 'ms':
+ return n;
+ default:
+ return undefined;
+ }
+}
+
+/**
+ * Short format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function fmtShort(ms) {
+ var msAbs = Math.abs(ms);
+ if (msAbs >= d) {
+ return Math.round(ms / d) + 'd';
+ }
+ if (msAbs >= h) {
+ return Math.round(ms / h) + 'h';
+ }
+ if (msAbs >= m) {
+ return Math.round(ms / m) + 'm';
+ }
+ if (msAbs >= s) {
+ return Math.round(ms / s) + 's';
+ }
+ return ms + 'ms';
+}
+
+/**
+ * Long format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function fmtLong(ms) {
+ var msAbs = Math.abs(ms);
+ if (msAbs >= d) {
+ return plural(ms, msAbs, d, 'day');
+ }
+ if (msAbs >= h) {
+ return plural(ms, msAbs, h, 'hour');
+ }
+ if (msAbs >= m) {
+ return plural(ms, msAbs, m, 'minute');
+ }
+ if (msAbs >= s) {
+ return plural(ms, msAbs, s, 'second');
+ }
+ return ms + ' ms';
+}
+
+/**
+ * Pluralization helper.
+ */
+
+function plural(ms, msAbs, n, name) {
+ var isPlural = msAbs >= n * 1.5;
+ return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
+}
diff --git a/node_modules/ms/license.md b/node_modules/ms/license.md
new file mode 100644
index 00000000..fa5d39b6
--- /dev/null
+++ b/node_modules/ms/license.md
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2020 Vercel, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/ms/package.json b/node_modules/ms/package.json
new file mode 100644
index 00000000..49971890
--- /dev/null
+++ b/node_modules/ms/package.json
@@ -0,0 +1,38 @@
+{
+ "name": "ms",
+ "version": "2.1.3",
+ "description": "Tiny millisecond conversion utility",
+ "repository": "vercel/ms",
+ "main": "./index",
+ "files": [
+ "index.js"
+ ],
+ "scripts": {
+ "precommit": "lint-staged",
+ "lint": "eslint lib/* bin/*",
+ "test": "mocha tests.js"
+ },
+ "eslintConfig": {
+ "extends": "eslint:recommended",
+ "env": {
+ "node": true,
+ "es6": true
+ }
+ },
+ "lint-staged": {
+ "*.js": [
+ "npm run lint",
+ "prettier --single-quote --write",
+ "git add"
+ ]
+ },
+ "license": "MIT",
+ "devDependencies": {
+ "eslint": "4.18.2",
+ "expect.js": "0.3.1",
+ "husky": "0.14.3",
+ "lint-staged": "5.0.0",
+ "mocha": "4.0.1",
+ "prettier": "2.0.5"
+ }
+}
diff --git a/node_modules/ms/readme.md b/node_modules/ms/readme.md
new file mode 100644
index 00000000..0fc1abb3
--- /dev/null
+++ b/node_modules/ms/readme.md
@@ -0,0 +1,59 @@
+# ms
+
+![CI](https://github.com/vercel/ms/workflows/CI/badge.svg)
+
+Use this package to easily convert various time formats to milliseconds.
+
+## Examples
+
+```js
+ms('2 days') // 172800000
+ms('1d') // 86400000
+ms('10h') // 36000000
+ms('2.5 hrs') // 9000000
+ms('2h') // 7200000
+ms('1m') // 60000
+ms('5s') // 5000
+ms('1y') // 31557600000
+ms('100') // 100
+ms('-3 days') // -259200000
+ms('-1h') // -3600000
+ms('-200') // -200
+```
+
+### Convert from Milliseconds
+
+```js
+ms(60000) // "1m"
+ms(2 * 60000) // "2m"
+ms(-3 * 60000) // "-3m"
+ms(ms('10 hours')) // "10h"
+```
+
+### Time Format Written-Out
+
+```js
+ms(60000, { long: true }) // "1 minute"
+ms(2 * 60000, { long: true }) // "2 minutes"
+ms(-3 * 60000, { long: true }) // "-3 minutes"
+ms(ms('10 hours'), { long: true }) // "10 hours"
+```
+
+## Features
+
+- Works both in [Node.js](https://nodejs.org) and in the browser
+- If a number is supplied to `ms`, a string with a unit is returned
+- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`)
+- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned
+
+## Related Packages
+
+- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time.
+
+## Caught a Bug?
+
+1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
+2. Link the package to the global module directory: `npm link`
+3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, Node.js will now use your clone of ms!
+
+As always, you can run the tests using: `npm test`
diff --git a/node_modules/node-domexception/.history/README_20210527203617.md b/node_modules/node-domexception/.history/README_20210527203617.md
new file mode 100644
index 00000000..38d8f856
--- /dev/null
+++ b/node_modules/node-domexception/.history/README_20210527203617.md
@@ -0,0 +1,2 @@
+# node-domexception
+An implementation of the DOMException class from NodeJS
diff --git a/node_modules/node-domexception/.history/README_20210527212714.md b/node_modules/node-domexception/.history/README_20210527212714.md
new file mode 100644
index 00000000..eed1d13b
--- /dev/null
+++ b/node_modules/node-domexception/.history/README_20210527212714.md
@@ -0,0 +1,41 @@
+# DOMException
+An implementation of the DOMException class from NodeJS
+
+This package implements the [`DOMException`](https://developer.mozilla.org/en-US/docs/Web/API/DOMException) class, from NodeJS itself.
+NodeJS has DOMException built in, but it's not globally available, and you can't require/import it from somewhere.
+
+The only possible way is to use some web-ish tools that have been introduced into NodeJS that throws an error and catch the constructor.
+This way you will have the same class that NodeJS has and you can check if the error is a instance of DOMException.
+The instanceof check would not have worked with a custom class such as the DOMexception provided by domenic which also is much larger in size.
+
+```js
+import DOMException from 'node-domexception'
+
+hello().catch(err => {
+ if (err instanceof DOMException) {
+ ...
+ }
+})
+
+const e1 = new DOMException("Something went wrong", "BadThingsError");
+console.assert(e1.name === "BadThingsError");
+console.assert(e1.code === 0);
+
+const e2 = new DOMException("Another exciting error message", "NoModificationAllowedError");
+console.assert(e2.name === "NoModificationAllowedError");
+console.assert(e2.code === 7);
+
+console.assert(DOMException.INUSE_ATTRIBUTE_ERR === 10);
+```
+
+## APIs
+
+This package exposes two flavors of the `DOMException` interface depending on the imported module.
+
+### `domexception` module
+
+This module default-exports the `DOMException` interface constructor.
+
+### `domexception/webidl2js-wrapper` module
+
+This module exports the `DOMException` [interface wrapper API](https://github.com/jsdom/webidl2js#for-interfaces) generated by [webidl2js](https://github.com/jsdom/webidl2js).
diff --git a/node_modules/node-domexception/.history/README_20210527213345.md b/node_modules/node-domexception/.history/README_20210527213345.md
new file mode 100644
index 00000000..58254167
--- /dev/null
+++ b/node_modules/node-domexception/.history/README_20210527213345.md
@@ -0,0 +1,36 @@
+# DOMException
+An implementation of the DOMException class from NodeJS
+
+This package implements the [`DOMException`](https://developer.mozilla.org/en-US/docs/Web/API/DOMException) class, from NodeJS itself. (including the legacy codes)
+NodeJS has DOMException built in, but it's not globally available, and you can't require/import it from somewhere.
+
+The only possible way is to use some web-ish tools that have been introduced into NodeJS that throws an error and catch the constructor.
+This way you will have the same class that NodeJS has and you can check if the error is a instance of DOMException.
+The instanceof check would not have worked with a custom class such as the DOMException provided by domenic which also is much larger in size.
+
+```js
+import DOMException from 'node-domexception'
+import { MessageChannel } from 'worker_threads'
+
+async function hello() {
+ const port = new MessageChannel().port1
+ const ab = new ArrayBuffer()
+ port.postMessage(ab, [ab, ab])
+}
+
+hello().catch(err => {
+ console.assert(err.name === 'DataCloneError')
+ console.assert(err.code === 25)
+ console.assert(err instanceof DOMException)
+})
+
+const e1 = new DOMException('Something went wrong', 'BadThingsError')
+console.assert(e1.name === 'BadThingsError')
+console.assert(e1.code === 0)
+
+const e2 = new DOMException('Another exciting error message', 'NoModificationAllowedError')
+console.assert(e2.name === 'NoModificationAllowedError')
+console.assert(e2.code === 7)
+
+console.assert(DOMException.INUSE_ATTRIBUTE_ERR === 10)
+```
diff --git a/node_modules/node-domexception/.history/README_20210527213411.md b/node_modules/node-domexception/.history/README_20210527213411.md
new file mode 100644
index 00000000..4c21ec8f
--- /dev/null
+++ b/node_modules/node-domexception/.history/README_20210527213411.md
@@ -0,0 +1,36 @@
+# DOMException
+An implementation of the DOMException class from NodeJS
+
+This package implements the [`DOMException`](https://developer.mozilla.org/en-US/docs/Web/API/DOMException) class that comes from NodeJS itself. (including the legacy codes)
+NodeJS has DOMException built in, but it's not globally available, and you can't require/import it from somewhere.
+
+The only possible way is to use some web-ish tools that have been introduced into NodeJS that throws an error and catch the constructor.
+This way you will have the same class that NodeJS has and you can check if the error is a instance of DOMException.
+The instanceof check would not have worked with a custom class such as the DOMException provided by domenic which also is much larger in size.
+
+```js
+import DOMException from 'node-domexception'
+import { MessageChannel } from 'worker_threads'
+
+async function hello() {
+ const port = new MessageChannel().port1
+ const ab = new ArrayBuffer()
+ port.postMessage(ab, [ab, ab])
+}
+
+hello().catch(err => {
+ console.assert(err.name === 'DataCloneError')
+ console.assert(err.code === 25)
+ console.assert(err instanceof DOMException)
+})
+
+const e1 = new DOMException('Something went wrong', 'BadThingsError')
+console.assert(e1.name === 'BadThingsError')
+console.assert(e1.code === 0)
+
+const e2 = new DOMException('Another exciting error message', 'NoModificationAllowedError')
+console.assert(e2.name === 'NoModificationAllowedError')
+console.assert(e2.code === 7)
+
+console.assert(DOMException.INUSE_ATTRIBUTE_ERR === 10)
+```
diff --git a/node_modules/node-domexception/.history/README_20210527213803.md b/node_modules/node-domexception/.history/README_20210527213803.md
new file mode 100644
index 00000000..4cb85717
--- /dev/null
+++ b/node_modules/node-domexception/.history/README_20210527213803.md
@@ -0,0 +1,36 @@
+# DOMException
+An implementation of the DOMException class from NodeJS
+
+This package exposes the [`DOMException`](https://developer.mozilla.org/en-US/docs/Web/API/DOMException) class that comes from NodeJS itself. (including all of the deprecated legacy codes)
+NodeJS has it built in, but it's not globally available, and you can't require/import it from somewhere.
+
+The only possible way is to use some web-ish tools that have been introduced into NodeJS that throws an error and catch the constructor.
+This way you will have the same class that NodeJS has and you can check if the error is a instance of DOMException.
+The instanceof check would not have worked with a custom class such as the DOMException provided by domenic which also is much larger in size since it has to re-construct the hole class from the ground up.
+
+```js
+import DOMException from 'node-domexception'
+import { MessageChannel } from 'worker_threads'
+
+async function hello() {
+ const port = new MessageChannel().port1
+ const ab = new ArrayBuffer()
+ port.postMessage(ab, [ab, ab])
+}
+
+hello().catch(err => {
+ console.assert(err.name === 'DataCloneError')
+ console.assert(err.code === 25)
+ console.assert(err instanceof DOMException)
+})
+
+const e1 = new DOMException('Something went wrong', 'BadThingsError')
+console.assert(e1.name === 'BadThingsError')
+console.assert(e1.code === 0)
+
+const e2 = new DOMException('Another exciting error message', 'NoModificationAllowedError')
+console.assert(e2.name === 'NoModificationAllowedError')
+console.assert(e2.code === 7)
+
+console.assert(DOMException.INUSE_ATTRIBUTE_ERR === 10)
+```
diff --git a/node_modules/node-domexception/.history/README_20210527214323.md b/node_modules/node-domexception/.history/README_20210527214323.md
new file mode 100644
index 00000000..a32a91b1
--- /dev/null
+++ b/node_modules/node-domexception/.history/README_20210527214323.md
@@ -0,0 +1,38 @@
+# DOMException
+An implementation of the DOMException class from NodeJS
+
+This package exposes the [`DOMException`](https://developer.mozilla.org/en-US/docs/Web/API/DOMException) class that comes from NodeJS itself. (including all of the deprecated legacy codes)
+NodeJS has it built in, but it's not globally available, and you can't require/import it from somewhere.
+
+The only possible way is to use some web-ish tools that have been introduced into NodeJS that throws an error and catch the constructor.
+This way you will have the same class that NodeJS has and you can check if the error is a instance of DOMException.
+The instanceof check would not have worked with a custom class such as the DOMException provided by domenic which also is much larger in size since it has to re-construct the hole class from the ground up.
+
+(plz don't depend on this package in any other environment other than node >=10.5)
+
+```js
+import DOMException from 'node-domexception'
+import { MessageChannel } from 'worker_threads'
+
+async function hello() {
+ const port = new MessageChannel().port1
+ const ab = new ArrayBuffer()
+ port.postMessage(ab, [ab, ab])
+}
+
+hello().catch(err => {
+ console.assert(err.name === 'DataCloneError')
+ console.assert(err.code === 25)
+ console.assert(err instanceof DOMException)
+})
+
+const e1 = new DOMException('Something went wrong', 'BadThingsError')
+console.assert(e1.name === 'BadThingsError')
+console.assert(e1.code === 0)
+
+const e2 = new DOMException('Another exciting error message', 'NoModificationAllowedError')
+console.assert(e2.name === 'NoModificationAllowedError')
+console.assert(e2.code === 7)
+
+console.assert(DOMException.INUSE_ATTRIBUTE_ERR === 10)
+```
diff --git a/node_modules/node-domexception/.history/README_20210527214408.md b/node_modules/node-domexception/.history/README_20210527214408.md
new file mode 100644
index 00000000..a32a91b1
--- /dev/null
+++ b/node_modules/node-domexception/.history/README_20210527214408.md
@@ -0,0 +1,38 @@
+# DOMException
+An implementation of the DOMException class from NodeJS
+
+This package exposes the [`DOMException`](https://developer.mozilla.org/en-US/docs/Web/API/DOMException) class that comes from NodeJS itself. (including all of the deprecated legacy codes)
+NodeJS has it built in, but it's not globally available, and you can't require/import it from somewhere.
+
+The only possible way is to use some web-ish tools that have been introduced into NodeJS that throws an error and catch the constructor.
+This way you will have the same class that NodeJS has and you can check if the error is a instance of DOMException.
+The instanceof check would not have worked with a custom class such as the DOMException provided by domenic which also is much larger in size since it has to re-construct the hole class from the ground up.
+
+(plz don't depend on this package in any other environment other than node >=10.5)
+
+```js
+import DOMException from 'node-domexception'
+import { MessageChannel } from 'worker_threads'
+
+async function hello() {
+ const port = new MessageChannel().port1
+ const ab = new ArrayBuffer()
+ port.postMessage(ab, [ab, ab])
+}
+
+hello().catch(err => {
+ console.assert(err.name === 'DataCloneError')
+ console.assert(err.code === 25)
+ console.assert(err instanceof DOMException)
+})
+
+const e1 = new DOMException('Something went wrong', 'BadThingsError')
+console.assert(e1.name === 'BadThingsError')
+console.assert(e1.code === 0)
+
+const e2 = new DOMException('Another exciting error message', 'NoModificationAllowedError')
+console.assert(e2.name === 'NoModificationAllowedError')
+console.assert(e2.code === 7)
+
+console.assert(DOMException.INUSE_ATTRIBUTE_ERR === 10)
+```
diff --git a/node_modules/node-domexception/.history/index_20210527203842.js b/node_modules/node-domexception/.history/index_20210527203842.js
new file mode 100644
index 00000000..e69de29b
diff --git a/node_modules/node-domexception/.history/index_20210527203947.js b/node_modules/node-domexception/.history/index_20210527203947.js
new file mode 100644
index 00000000..b9a8b765
--- /dev/null
+++ b/node_modules/node-domexception/.history/index_20210527203947.js
@@ -0,0 +1,8 @@
+const { MessageChannel } = require('worker_threads')
+
+if (!globalThis.DOMException) {
+ const port = new MessageChannel().port1
+ const ab = new ArrayBuffer()
+ try { port.postMessage(ab, [ab, ab]) }
+ catch (err) { globalThis.DOMException = err.constructor }
+}
diff --git a/node_modules/node-domexception/.history/index_20210527204259.js b/node_modules/node-domexception/.history/index_20210527204259.js
new file mode 100644
index 00000000..e9332a8d
--- /dev/null
+++ b/node_modules/node-domexception/.history/index_20210527204259.js
@@ -0,0 +1,9 @@
+if (!globalThis.DOMException) {
+ const { MessageChannel } = require('worker_threads')
+ const port = new MessageChannel().port1
+ const ab = new ArrayBuffer()
+ try { port.postMessage(ab, [ab, ab]) }
+ catch (err) { globalThis.DOMException = err.constructor }
+}
+
+module.exports
diff --git a/node_modules/node-domexception/.history/index_20210527204418.js b/node_modules/node-domexception/.history/index_20210527204418.js
new file mode 100644
index 00000000..cb362cc7
--- /dev/null
+++ b/node_modules/node-domexception/.history/index_20210527204418.js
@@ -0,0 +1,9 @@
+if (!globalThis.DOMException) {
+ const { MessageChannel } = require('worker_threads')
+ const port = new MessageChannel().port1
+ const ab = new ArrayBuffer()
+ try { port.postMessage(ab, [ab, ab]) }
+ catch (err) { globalThis.DOMException = err.constructor }
+}
+
+module.exports = globalThis.DOMException
diff --git a/node_modules/node-domexception/.history/index_20210527204756.js b/node_modules/node-domexception/.history/index_20210527204756.js
new file mode 100644
index 00000000..87d26554
--- /dev/null
+++ b/node_modules/node-domexception/.history/index_20210527204756.js
@@ -0,0 +1,11 @@
+/*! blob-to-buffer. MIT License. Jimmy Wärting <https://jimmy.warting.se> */
+
+if (!globalThis.DOMException) {
+ const { MessageChannel } = require('worker_threads')
+ const port = new MessageChannel().port1
+ const ab = new ArrayBuffer()
+ try { port.postMessage(ab, [ab, ab]) }
+ catch (err) { globalThis.DOMException = err.constructor }
+}
+
+module.exports = globalThis.DOMException
diff --git a/node_modules/node-domexception/.history/index_20210527204833.js b/node_modules/node-domexception/.history/index_20210527204833.js
new file mode 100644
index 00000000..837ebdad
--- /dev/null
+++ b/node_modules/node-domexception/.history/index_20210527204833.js
@@ -0,0 +1,11 @@
+/*! blob-to-buffer. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
+
+if (!globalThis.DOMException) {
+ const { MessageChannel } = require('worker_threads')
+ const port = new MessageChannel().port1
+ const ab = new ArrayBuffer()
+ try { port.postMessage(ab, [ab, ab]) }
+ catch (err) { globalThis.DOMException = err.constructor }
+}
+
+module.exports = globalThis.DOMException
diff --git a/node_modules/node-domexception/.history/index_20210527211208.js b/node_modules/node-domexception/.history/index_20210527211208.js
new file mode 100644
index 00000000..ba215ce8
--- /dev/null
+++ b/node_modules/node-domexception/.history/index_20210527211208.js
@@ -0,0 +1,15 @@
+/*! blob-to-buffer. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
+
+if (!globalThis.DOMException) {
+ var { MessageChannel } = require('worker_threads'),
+ port = new MessageChannel().port1,
+ ab = new ArrayBuffer()
+ try { port.postMessage(ab, [ab, ab]) }
+ catch (err) {
+ err.constructor.name === 'DOMException' && (
+ globalThis.DOMException = err.constructor
+ )
+ }
+}
+
+module.exports = globalThis.DOMException
diff --git a/node_modules/node-domexception/.history/index_20210527211248.js b/node_modules/node-domexception/.history/index_20210527211248.js
new file mode 100644
index 00000000..f5c434ee
--- /dev/null
+++ b/node_modules/node-domexception/.history/index_20210527211248.js
@@ -0,0 +1,15 @@
+/*! blob-to-buffer. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
+
+if (!globalThis.DOMException) {
+ const { MessageChannel } = require('worker_threads'),
+ port = new MessageChannel().port1,
+ ab = new ArrayBuffer()
+ try { port.postMessage(ab, [ab, ab]) }
+ catch (err) {
+ err.constructor.name === 'DOMException' && (
+ globalThis.DOMException = err.constructor
+ )
+ }
+}
+
+module.exports = globalThis.DOMException
diff --git a/node_modules/node-domexception/.history/index_20210527212722.js b/node_modules/node-domexception/.history/index_20210527212722.js
new file mode 100644
index 00000000..91b3b526
--- /dev/null
+++ b/node_modules/node-domexception/.history/index_20210527212722.js
@@ -0,0 +1,23 @@
+/*! blob-to-buffer. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
+
+if (!globalThis.DOMException) {
+ const { MessageChannel } = require('worker_threads'),
+ port = new MessageChannel().port1,
+ ab = new ArrayBuffer()
+ try { port.postMessage(ab, [ab, ab]) }
+ catch (err) {
+ err.constructor.name === 'DOMException' && (
+ globalThis.DOMException = err.constructor
+ )
+ }
+}
+
+module.exports = globalThis.DOMException
+
+const e1 = new DOMException("Something went wrong", "BadThingsError");
+console.assert(e1.name === "BadThingsError");
+console.assert(e1.code === 0);
+
+const e2 = new DOMException("Another exciting error message", "NoModificationAllowedError");
+console.assert(e2.name === "NoModificationAllowedError");
+console.assert(e2.code === 7);
diff --git a/node_modules/node-domexception/.history/index_20210527212731.js b/node_modules/node-domexception/.history/index_20210527212731.js
new file mode 100644
index 00000000..cf288643
--- /dev/null
+++ b/node_modules/node-domexception/.history/index_20210527212731.js
@@ -0,0 +1,23 @@
+/*! blob-to-buffer. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
+
+if (!globalThis.DOMException) {
+ const { MessageChannel } = require('worker_threads'),
+ port = new MessageChannel().port1,
+ ab = new ArrayBuffer()
+ try { port.postMessage(ab, [ab, ab]) }
+ catch (err) {
+ err.constructor.name === 'DOMException' && (
+ globalThis.DOMException = err.constructor
+ )
+ }
+}
+
+module.exports = globalThis.DOMException
+
+const e1 = new DOMException("Something went wrong", "BadThingsError");
+console.assert(e1.name === "BadThingsError");
+console.assert(e1.code === 0);
+
+const e2 = new DOMException("Another exciting error message", "NoModificationAllowedError");
+console.assert(e2.name === "NoModificationAllowedError");
+console.assert(e2.code === 2);
diff --git a/node_modules/node-domexception/.history/index_20210527212746.js b/node_modules/node-domexception/.history/index_20210527212746.js
new file mode 100644
index 00000000..f5c434ee
--- /dev/null
+++ b/node_modules/node-domexception/.history/index_20210527212746.js
@@ -0,0 +1,15 @@
+/*! blob-to-buffer. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
+
+if (!globalThis.DOMException) {
+ const { MessageChannel } = require('worker_threads'),
+ port = new MessageChannel().port1,
+ ab = new ArrayBuffer()
+ try { port.postMessage(ab, [ab, ab]) }
+ catch (err) {
+ err.constructor.name === 'DOMException' && (
+ globalThis.DOMException = err.constructor
+ )
+ }
+}
+
+module.exports = globalThis.DOMException
diff --git a/node_modules/node-domexception/.history/index_20210527212900.js b/node_modules/node-domexception/.history/index_20210527212900.js
new file mode 100644
index 00000000..efa2442c
--- /dev/null
+++ b/node_modules/node-domexception/.history/index_20210527212900.js
@@ -0,0 +1,16 @@
+/*! blob-to-buffer. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
+
+if (!globalThis.DOMException) {
+ const { MessageChannel } = require('worker_threads'),
+ port = new MessageChannel().port1,
+ ab = new ArrayBuffer()
+ try { port.postMessage(ab, [ab, ab]) }
+ catch (err) {
+ console.log(err.code)
+ err.constructor.name === 'DOMException' && (
+ globalThis.DOMException = err.constructor
+ )
+ }
+}
+
+module.exports = globalThis.DOMException
diff --git a/node_modules/node-domexception/.history/index_20210527213022.js b/node_modules/node-domexception/.history/index_20210527213022.js
new file mode 100644
index 00000000..e59f047b
--- /dev/null
+++ b/node_modules/node-domexception/.history/index_20210527213022.js
@@ -0,0 +1,16 @@
+/*! blob-to-buffer. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
+
+if (!globalThis.DOMException) {
+ const { MessageChannel } = require('worker_threads'),
+ port = new MessageChannel().port1,
+ ab = new ArrayBuffer()
+ try { port.postMessage(ab, [ab, ab]) }
+ catch (err) {
+ console.log(err.code, err.name, err.message)
+ err.constructor.name === 'DOMException' && (
+ globalThis.DOMException = err.constructor
+ )
+ }
+}
+
+module.exports = globalThis.DOMException
diff --git a/node_modules/node-domexception/.history/index_20210527213822.js b/node_modules/node-domexception/.history/index_20210527213822.js
new file mode 100644
index 00000000..7f4e13dc
--- /dev/null
+++ b/node_modules/node-domexception/.history/index_20210527213822.js
@@ -0,0 +1,16 @@
+/*! node-DOMException. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
+
+if (!globalThis.DOMException) {
+ const { MessageChannel } = require('worker_threads'),
+ port = new MessageChannel().port1,
+ ab = new ArrayBuffer()
+ try { port.postMessage(ab, [ab, ab]) }
+ catch (err) {
+ console.log(err.code, err.name, err.message)
+ err.constructor.name === 'DOMException' && (
+ globalThis.DOMException = err.constructor
+ )
+ }
+}
+
+module.exports = globalThis.DOMException
diff --git a/node_modules/node-domexception/.history/index_20210527213843.js b/node_modules/node-domexception/.history/index_20210527213843.js
new file mode 100644
index 00000000..ee75b730
--- /dev/null
+++ b/node_modules/node-domexception/.history/index_20210527213843.js
@@ -0,0 +1,17 @@
+/*! node-DOMException. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
+
+if (!globalThis.DOMException) {
+ try {
+ const { MessageChannel } = require('worker_threads'),
+ port = new MessageChannel().port1,
+ ab = new ArrayBuffer()
+ port.postMessage(ab, [ab, ab])
+ catch (err) {
+ console.log(err.code, err.name, err.message)
+ err.constructor.name === 'DOMException' && (
+ globalThis.DOMException = err.constructor
+ )
+ }
+}
+
+module.exports = globalThis.DOMException
diff --git a/node_modules/node-domexception/.history/index_20210527213852.js b/node_modules/node-domexception/.history/index_20210527213852.js
new file mode 100644
index 00000000..a82bee3a
--- /dev/null
+++ b/node_modules/node-domexception/.history/index_20210527213852.js
@@ -0,0 +1,17 @@
+/*! node-DOMException. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
+
+if (!globalThis.DOMException) {
+ try {
+ const { MessageChannel } = require('worker_threads'),
+ port = new MessageChannel().port1,
+ ab = new ArrayBuffer()
+ port.postMessage(ab, [ab, ab])
+ } catch (err) {
+ console.log(err.code, err.name, err.message)
+ err.constructor.name === 'DOMException' && (
+ globalThis.DOMException = err.constructor
+ )
+ }
+}
+
+module.exports = globalThis.DOMException
diff --git a/node_modules/node-domexception/.history/index_20210527213910.js b/node_modules/node-domexception/.history/index_20210527213910.js
new file mode 100644
index 00000000..1e1ca29b
--- /dev/null
+++ b/node_modules/node-domexception/.history/index_20210527213910.js
@@ -0,0 +1,16 @@
+/*! node-DOMException. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
+
+if (!globalThis.DOMException) {
+ try {
+ const { MessageChannel } = require('worker_threads'),
+ port = new MessageChannel().port1,
+ ab = new ArrayBuffer()
+ port.postMessage(ab, [ab, ab])
+ } catch (err) {
+ err.constructor.name === 'DOMException' && (
+ globalThis.DOMException = err.constructor
+ )
+ }
+}
+
+module.exports = globalThis.DOMException
diff --git a/node_modules/node-domexception/.history/index_20210527214034.js b/node_modules/node-domexception/.history/index_20210527214034.js
new file mode 100644
index 00000000..b7bbe951
--- /dev/null
+++ b/node_modules/node-domexception/.history/index_20210527214034.js
@@ -0,0 +1,16 @@
+/*! node-domexception. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
+
+if (!globalThis.DOMException) {
+ try {
+ const { MessageChannel } = require('worker_threads'),
+ port = new MessageChannel().port1,
+ ab = new ArrayBuffer()
+ port.postMessage(ab, [ab, ab])
+ } catch (err) {
+ err.constructor.name === 'DOMException' && (
+ globalThis.DOMException = err.constructor
+ )
+ }
+}
+
+module.exports = globalThis.DOMException
diff --git a/node_modules/node-domexception/.history/index_20210527214643.js b/node_modules/node-domexception/.history/index_20210527214643.js
new file mode 100644
index 00000000..92ed8477
--- /dev/null
+++ b/node_modules/node-domexception/.history/index_20210527214643.js
@@ -0,0 +1,41 @@
+/*! node-domexception. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
+
+if (!globalThis.DOMException) {
+ try {
+ const { MessageChannel } = require('worker_threads'),
+ port = new MessageChannel().port1,
+ ab = new ArrayBuffer()
+ port.postMessage(ab, [ab, ab])
+ } catch (err) {
+ err.constructor.name === 'DOMException' && (
+ globalThis.DOMException = err.constructor
+ )
+ }
+}
+
+module.exports = globalThis.DOMException
+
+
+const { MessageChannel } = require('worker_threads')
+
+async function hello() {
+ const port = new MessageChannel().port1
+ const ab = new ArrayBuffer()
+ port.postMessage(ab, [ab, ab])
+}
+
+hello().catch(err => {
+ console.assert(err.name === 'DataCloneError')
+ console.assert(err.code === 25)
+ console.assert(err instanceof DOMException)
+})
+
+const e1 = new DOMException('Something went wrong', 'BadThingsError')
+console.assert(e1.name === 'BadThingsError')
+console.assert(e1.code === 0)
+
+const e2 = new DOMException('Another exciting error message', 'NoModificationAllowedError')
+console.assert(e2.name === 'NoModificationAllowedError')
+console.assert(e2.code === 7)
+
+console.assert(DOMException.INUSE_ATTRIBUTE_ERR === 10)
diff --git a/node_modules/node-domexception/.history/index_20210527214654.js b/node_modules/node-domexception/.history/index_20210527214654.js
new file mode 100644
index 00000000..6d5cb8e5
--- /dev/null
+++ b/node_modules/node-domexception/.history/index_20210527214654.js
@@ -0,0 +1,41 @@
+/*! node-domexception. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
+
+if (!globalThis.DOMException) {
+ try {
+ const { MessageChannel } = require('worker_threads'),
+ port = new MessageChannel().port1,
+ ab = new ArrayBuffer()
+ port.postMessage(ab, [ab, ab])
+ } catch (err) {
+ err.constructor.name === 'DOMException' && (
+ globalThis.DOMException = err.constructor
+ )
+ }
+}
+
+module.exports = globalThis.DOMException
+
+
+const { MessageChannel } = require('worker_threads')
+
+async function hello() {
+ const port = new MessageChannel().port1
+ const ab = new ArrayBuffer()
+ port.postMessage(ab, [ab, ab])
+}
+
+hello().catch(err => {
+ console.assert(err.name === 'DataCloneError')
+ console.assert(err.code === 21)
+ console.assert(err instanceof DOMException)
+})
+
+const e1 = new DOMException('Something went wrong', 'BadThingsError')
+console.assert(e1.name === 'BadThingsError')
+console.assert(e1.code === 0)
+
+const e2 = new DOMException('Another exciting error message', 'NoModificationAllowedError')
+console.assert(e2.name === 'NoModificationAllowedError')
+console.assert(e2.code === 7)
+
+console.assert(DOMException.INUSE_ATTRIBUTE_ERR === 10)
diff --git a/node_modules/node-domexception/.history/index_20210527214700.js b/node_modules/node-domexception/.history/index_20210527214700.js
new file mode 100644
index 00000000..b7bbe951
--- /dev/null
+++ b/node_modules/node-domexception/.history/index_20210527214700.js
@@ -0,0 +1,16 @@
+/*! node-domexception. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
+
+if (!globalThis.DOMException) {
+ try {
+ const { MessageChannel } = require('worker_threads'),
+ port = new MessageChannel().port1,
+ ab = new ArrayBuffer()
+ port.postMessage(ab, [ab, ab])
+ } catch (err) {
+ err.constructor.name === 'DOMException' && (
+ globalThis.DOMException = err.constructor
+ )
+ }
+}
+
+module.exports = globalThis.DOMException
diff --git a/node_modules/node-domexception/.history/package_20210527203733.json b/node_modules/node-domexception/.history/package_20210527203733.json
new file mode 100644
index 00000000..5eeb306d
--- /dev/null
+++ b/node_modules/node-domexception/.history/package_20210527203733.json
@@ -0,0 +1,19 @@
+{
+ "name": "domexception",
+ "version": "1.0.0",
+ "description": "An implementation of the DOMException class from NodeJS",
+ "main": "index.js",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/jimmywarting/node-domexception.git"
+ },
+ "author": "",
+ "license": "ISC",
+ "bugs": {
+ "url": "https://github.com/jimmywarting/node-domexception/issues"
+ },
+ "homepage": "https://github.com/jimmywarting/node-domexception#readme"
+}
diff --git a/node_modules/node-domexception/.history/package_20210527203825.json b/node_modules/node-domexception/.history/package_20210527203825.json
new file mode 100644
index 00000000..4ca17135
--- /dev/null
+++ b/node_modules/node-domexception/.history/package_20210527203825.json
@@ -0,0 +1,16 @@
+{
+ "name": "node-domexception",
+ "version": "1.0.0",
+ "description": "An implementation of the DOMException class from NodeJS",
+ "main": "index.js",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/jimmywarting/node-domexception.git"
+ },
+ "author": "Jimmy Wärting",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/jimmywarting/node-domexception/issues"
+ },
+ "homepage": "https://github.com/jimmywarting/node-domexception#readme"
+}
diff --git a/node_modules/node-domexception/.history/package_20210527204621.json b/node_modules/node-domexception/.history/package_20210527204621.json
new file mode 100644
index 00000000..3c414e93
--- /dev/null
+++ b/node_modules/node-domexception/.history/package_20210527204621.json
@@ -0,0 +1,19 @@
+{
+ "name": "node-domexception",
+ "version": "1.0.0",
+ "description": "An implementation of the DOMException class from NodeJS",
+ "main": "index.js",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/jimmywarting/node-domexception.git"
+ },
+ "engines": {
+ "node": ">=10.5.0"
+ },
+ "author": "Jimmy Wärting",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/jimmywarting/node-domexception/issues"
+ },
+ "homepage": "https://github.com/jimmywarting/node-domexception#readme"
+}
diff --git a/node_modules/node-domexception/.history/package_20210527204913.json b/node_modules/node-domexception/.history/package_20210527204913.json
new file mode 100644
index 00000000..dbbb5d24
--- /dev/null
+++ b/node_modules/node-domexception/.history/package_20210527204913.json
@@ -0,0 +1,25 @@
+{
+ "name": "node-domexception",
+ "version": "1.0.0",
+ "description": "An implementation of the DOMException class from NodeJS",
+ "main": "index.js",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/jimmywarting/node-domexception.git"
+ },
+ "engines": {
+ "node": ">=10.5.0"
+ },
+ "author": "Jimmy Wärting",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/jimmywarting/node-domexception/issues"
+ },
+ "homepage": "https://github.com/jimmywarting/node-domexception#readme",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/jimmywarting"
+ }
+ ]
+}
diff --git a/node_modules/node-domexception/.history/package_20210527204925.json b/node_modules/node-domexception/.history/package_20210527204925.json
new file mode 100644
index 00000000..dbbb5d24
--- /dev/null
+++ b/node_modules/node-domexception/.history/package_20210527204925.json
@@ -0,0 +1,25 @@
+{
+ "name": "node-domexception",
+ "version": "1.0.0",
+ "description": "An implementation of the DOMException class from NodeJS",
+ "main": "index.js",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/jimmywarting/node-domexception.git"
+ },
+ "engines": {
+ "node": ">=10.5.0"
+ },
+ "author": "Jimmy Wärting",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/jimmywarting/node-domexception/issues"
+ },
+ "homepage": "https://github.com/jimmywarting/node-domexception#readme",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/jimmywarting"
+ }
+ ]
+}
diff --git a/node_modules/node-domexception/.history/package_20210527205145.json b/node_modules/node-domexception/.history/package_20210527205145.json
new file mode 100644
index 00000000..cd08e704
--- /dev/null
+++ b/node_modules/node-domexception/.history/package_20210527205145.json
@@ -0,0 +1,29 @@
+{
+ "name": "node-domexception",
+ "version": "1.0.0",
+ "description": "An implementation of the DOMException class from NodeJS",
+ "main": "index.js",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/jimmywarting/node-domexception.git"
+ },
+ "engines": {
+ "node": ">=10.5.0"
+ },
+ "author": "Jimmy Wärting",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/jimmywarting/node-domexception/issues"
+ },
+ "homepage": "https://github.com/jimmywarting/node-domexception#readme",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/jimmywarting"
+ },
+ {
+ "type": "github",
+ "url": "https://paypal.me/jimmywarting"
+ }
+ ]
+}
diff --git a/node_modules/node-domexception/.history/package_20210527205156.json b/node_modules/node-domexception/.history/package_20210527205156.json
new file mode 100644
index 00000000..cd08e704
--- /dev/null
+++ b/node_modules/node-domexception/.history/package_20210527205156.json
@@ -0,0 +1,29 @@
+{
+ "name": "node-domexception",
+ "version": "1.0.0",
+ "description": "An implementation of the DOMException class from NodeJS",
+ "main": "index.js",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/jimmywarting/node-domexception.git"
+ },
+ "engines": {
+ "node": ">=10.5.0"
+ },
+ "author": "Jimmy Wärting",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/jimmywarting/node-domexception/issues"
+ },
+ "homepage": "https://github.com/jimmywarting/node-domexception#readme",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/jimmywarting"
+ },
+ {
+ "type": "github",
+ "url": "https://paypal.me/jimmywarting"
+ }
+ ]
+}
diff --git a/node_modules/node-domexception/.history/test_20210527205603.js b/node_modules/node-domexception/.history/test_20210527205603.js
new file mode 100644
index 00000000..e69de29b
diff --git a/node_modules/node-domexception/.history/test_20210527205957.js b/node_modules/node-domexception/.history/test_20210527205957.js
new file mode 100644
index 00000000..73feac5f
--- /dev/null
+++ b/node_modules/node-domexception/.history/test_20210527205957.js
@@ -0,0 +1,3 @@
+require('./index.js')
+
+console.log(DOMException.INDEX_SIZE_ERR)
diff --git a/node_modules/node-domexception/.history/test_20210527210021.js b/node_modules/node-domexception/.history/test_20210527210021.js
new file mode 100644
index 00000000..be474916
--- /dev/null
+++ b/node_modules/node-domexception/.history/test_20210527210021.js
@@ -0,0 +1,3 @@
+const e = require('./index.js')
+
+console.log(e.INDEX_SIZE_ERR)
diff --git a/node_modules/node-domexception/LICENSE b/node_modules/node-domexception/LICENSE
new file mode 100644
index 00000000..bc8ceb7f
--- /dev/null
+++ b/node_modules/node-domexception/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2021 Jimmy Wärting
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/node-domexception/README.md b/node_modules/node-domexception/README.md
new file mode 100644
index 00000000..a3694614
--- /dev/null
+++ b/node_modules/node-domexception/README.md
@@ -0,0 +1,46 @@
+# DOMException
+An implementation of the DOMException class from NodeJS
+
+NodeJS has DOMException built in, but it's not globally available, and you can't require/import it from somewhere.
+
+This package exposes the [`DOMException`](https://developer.mozilla.org/en-US/docs/Web/API/DOMException) class that comes from NodeJS itself. (including all of the legacy codes)
+
+<sub>(plz don't depend on this package in any other environment other than node >=10.5)</sub>
+
+```js
+import DOMException from 'node-domexception'
+import { MessageChannel } from 'worker_threads'
+
+async function hello() {
+ const port = new MessageChannel().port1
+ const ab = new ArrayBuffer()
+ port.postMessage(ab, [ab, ab])
+}
+
+hello().catch(err => {
+ console.assert(err.name === 'DataCloneError')
+ console.assert(err.code === 25)
+ console.assert(err instanceof DOMException)
+})
+
+const e1 = new DOMException('Something went wrong', 'BadThingsError')
+console.assert(e1.name === 'BadThingsError')
+console.assert(e1.code === 0)
+
+const e2 = new DOMException('Another exciting error message', 'NoModificationAllowedError')
+console.assert(e2.name === 'NoModificationAllowedError')
+console.assert(e2.code === 7)
+
+console.assert(DOMException.INUSE_ATTRIBUTE_ERR === 10)
+```
+
+# Background
+
+The only possible way is to use some web-ish tools that have been introduced into NodeJS that throws a DOMException and catch the constructor. This is exactly what this package dose for you and exposes it.<br>
+This way you will have the same class that NodeJS has and you can check if the error is a instance of DOMException.<br>
+The instanceof check would not have worked with a custom class such as the DOMException provided by domenic which also is much larger in size since it has to re-construct the hole class from the ground up.
+
+The DOMException is used in many places such as the Fetch API, File & Blobs, PostMessaging and more. <br>
+Why they decided to call it **DOM**, I don't know
+
+Please consider sponsoring if you find this helpful
diff --git a/node_modules/node-domexception/index.js b/node_modules/node-domexception/index.js
new file mode 100644
index 00000000..b7bbe951
--- /dev/null
+++ b/node_modules/node-domexception/index.js
@@ -0,0 +1,16 @@
+/*! node-domexception. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
+
+if (!globalThis.DOMException) {
+ try {
+ const { MessageChannel } = require('worker_threads'),
+ port = new MessageChannel().port1,
+ ab = new ArrayBuffer()
+ port.postMessage(ab, [ab, ab])
+ } catch (err) {
+ err.constructor.name === 'DOMException' && (
+ globalThis.DOMException = err.constructor
+ )
+ }
+}
+
+module.exports = globalThis.DOMException
diff --git a/node_modules/node-domexception/package.json b/node_modules/node-domexception/package.json
new file mode 100644
index 00000000..cd08e704
--- /dev/null
+++ b/node_modules/node-domexception/package.json
@@ -0,0 +1,29 @@
+{
+ "name": "node-domexception",
+ "version": "1.0.0",
+ "description": "An implementation of the DOMException class from NodeJS",
+ "main": "index.js",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/jimmywarting/node-domexception.git"
+ },
+ "engines": {
+ "node": ">=10.5.0"
+ },
+ "author": "Jimmy Wärting",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/jimmywarting/node-domexception/issues"
+ },
+ "homepage": "https://github.com/jimmywarting/node-domexception#readme",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/jimmywarting"
+ },
+ {
+ "type": "github",
+ "url": "https://paypal.me/jimmywarting"
+ }
+ ]
+}
diff --git a/node_modules/node-fetch/@types/index.d.ts b/node_modules/node-fetch/@types/index.d.ts
new file mode 100644
index 00000000..274ca03a
--- /dev/null
+++ b/node_modules/node-fetch/@types/index.d.ts
@@ -0,0 +1,219 @@
+/// <reference types="node" />
+
+import {RequestOptions} from 'http';
+import {FormData} from 'formdata-polyfill/esm.min.js';
+import {
+ Blob,
+ blobFrom,
+ blobFromSync,
+ File,
+ fileFrom,
+ fileFromSync
+} from 'fetch-blob/from.js';
+
+type AbortSignal = {
+ readonly aborted: boolean;
+
+ addEventListener: (type: 'abort', listener: (this: AbortSignal) => void) => void;
+ removeEventListener: (type: 'abort', listener: (this: AbortSignal) => void) => void;
+};
+
+export type HeadersInit = Headers | Record<string, string> | Iterable<readonly [string, string]> | Iterable<Iterable<string>>;
+
+export {
+ FormData,
+ Blob,
+ blobFrom,
+ blobFromSync,
+ File,
+ fileFrom,
+ fileFromSync
+};
+
+/**
+ * This Fetch API interface allows you to perform various actions on HTTP request and response headers.
+ * These actions include retrieving, setting, adding to, and removing.
+ * A Headers object has an associated header list, which is initially empty and consists of zero or more name and value pairs.
+ * You can add to this using methods like append() (see Examples.)
+ * In all methods of this interface, header names are matched by case-insensitive byte sequence.
+ * */
+export class Headers {
+ constructor(init?: HeadersInit);
+
+ append(name: string, value: string): void;
+ delete(name: string): void;
+ get(name: string): string | null;
+ has(name: string): boolean;
+ set(name: string, value: string): void;
+ forEach(
+ callbackfn: (value: string, key: string, parent: Headers) => void,
+ thisArg?: any
+ ): void;
+
+ [Symbol.iterator](): IterableIterator<[string, string]>;
+ /**
+ * Returns an iterator allowing to go through all key/value pairs contained in this object.
+ */
+ entries(): IterableIterator<[string, string]>;
+ /**
+ * Returns an iterator allowing to go through all keys of the key/value pairs contained in this object.
+ */
+ keys(): IterableIterator<string>;
+ /**
+ * Returns an iterator allowing to go through all values of the key/value pairs contained in this object.
+ */
+ values(): IterableIterator<string>;
+
+ /** Node-fetch extension */
+ raw(): Record<string, string[]>;
+}
+
+export interface RequestInit {
+ /**
+ * A BodyInit object or null to set request's body.
+ */
+ body?: BodyInit | null;
+ /**
+ * A Headers object, an object literal, or an array of two-item arrays to set request's headers.
+ */
+ headers?: HeadersInit;
+ /**
+ * A string to set request's method.
+ */
+ method?: string;
+ /**
+ * A string indicating whether request follows redirects, results in an error upon encountering a redirect, or returns the redirect (in an opaque fashion). Sets request's redirect.
+ */
+ redirect?: RequestRedirect;
+ /**
+ * An AbortSignal to set request's signal.
+ */
+ signal?: AbortSignal | null;
+ /**
+ * A string whose value is a same-origin URL, "about:client", or the empty string, to set request’s referrer.
+ */
+ referrer?: string;
+ /**
+ * A referrer policy to set request’s referrerPolicy.
+ */
+ referrerPolicy?: ReferrerPolicy;
+
+ // Node-fetch extensions to the whatwg/fetch spec
+ agent?: RequestOptions['agent'] | ((parsedUrl: URL) => RequestOptions['agent']);
+ compress?: boolean;
+ counter?: number;
+ follow?: number;
+ hostname?: string;
+ port?: number;
+ protocol?: string;
+ size?: number;
+ highWaterMark?: number;
+ insecureHTTPParser?: boolean;
+}
+
+export interface ResponseInit {
+ headers?: HeadersInit;
+ status?: number;
+ statusText?: string;
+}
+
+export type BodyInit =
+ | Blob
+ | Buffer
+ | URLSearchParams
+ | FormData
+ | NodeJS.ReadableStream
+ | string;
+declare class BodyMixin {
+ constructor(body?: BodyInit, options?: {size?: number});
+
+ readonly body: NodeJS.ReadableStream | null;
+ readonly bodyUsed: boolean;
+ readonly size: number;
+
+ /** @deprecated Use `body.arrayBuffer()` instead. */
+ buffer(): Promise<Buffer>;
+ arrayBuffer(): Promise<ArrayBuffer>;
+ formData(): Promise<FormData>;
+ blob(): Promise<Blob>;
+ json(): Promise<unknown>;
+ text(): Promise<string>;
+}
+
+// `Body` must not be exported as a class since it's not exported from the JavaScript code.
+export interface Body extends Pick<BodyMixin, keyof BodyMixin> {}
+
+export type RequestRedirect = 'error' | 'follow' | 'manual';
+export type ReferrerPolicy = '' | 'no-referrer' | 'no-referrer-when-downgrade' | 'same-origin' | 'origin' | 'strict-origin' | 'origin-when-cross-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url';
+export type RequestInfo = string | Request;
+export class Request extends BodyMixin {
+ constructor(input: URL | RequestInfo, init?: RequestInit);
+
+ /**
+ * Returns a Headers object consisting of the headers associated with request. Note that headers added in the network layer by the user agent will not be accounted for in this object, e.g., the "Host" header.
+ */
+ readonly headers: Headers;
+ /**
+ * Returns request's HTTP method, which is "GET" by default.
+ */
+ readonly method: string;
+ /**
+ * Returns the redirect mode associated with request, which is a string indicating how redirects for the request will be handled during fetching. A request will follow redirects by default.
+ */
+ readonly redirect: RequestRedirect;
+ /**
+ * Returns the signal associated with request, which is an AbortSignal object indicating whether or not request has been aborted, and its abort event handler.
+ */
+ readonly signal: AbortSignal;
+ /**
+ * Returns the URL of request as a string.
+ */
+ readonly url: string;
+ /**
+ * A string whose value is a same-origin URL, "about:client", or the empty string, to set request’s referrer.
+ */
+ readonly referrer: string;
+ /**
+ * A referrer policy to set request’s referrerPolicy.
+ */
+ readonly referrerPolicy: ReferrerPolicy;
+ clone(): Request;
+}
+
+type ResponseType = 'basic' | 'cors' | 'default' | 'error' | 'opaque' | 'opaqueredirect';
+
+export class Response extends BodyMixin {
+ constructor(body?: BodyInit | null, init?: ResponseInit);
+
+ readonly headers: Headers;
+ readonly ok: boolean;
+ readonly redirected: boolean;
+ readonly status: number;
+ readonly statusText: string;
+ readonly type: ResponseType;
+ readonly url: string;
+ clone(): Response;
+
+ static error(): Response;
+ static redirect(url: string, status?: number): Response;
+ static json(data: any, init?: ResponseInit): Response;
+}
+
+export class FetchError extends Error {
+ constructor(message: string, type: string, systemError?: Record<string, unknown>);
+
+ name: 'FetchError';
+ [Symbol.toStringTag]: 'FetchError';
+ type: string;
+ code?: string;
+ errno?: string;
+}
+
+export class AbortError extends Error {
+ type: string;
+ name: 'AbortError';
+ [Symbol.toStringTag]: 'AbortError';
+}
+
+export function isRedirect(code: number): boolean;
+export default function fetch(url: URL | RequestInfo, init?: RequestInit): Promise<Response>;
diff --git a/node_modules/node-fetch/LICENSE.md b/node_modules/node-fetch/LICENSE.md
new file mode 100644
index 00000000..41ca1b6e
--- /dev/null
+++ b/node_modules/node-fetch/LICENSE.md
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 - 2020 Node Fetch Team
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
diff --git a/node_modules/node-fetch/README.md b/node_modules/node-fetch/README.md
new file mode 100644
index 00000000..badc2b19
--- /dev/null
+++ b/node_modules/node-fetch/README.md
@@ -0,0 +1,872 @@
+<div align="center">
+ <img src="docs/media/Banner.svg" alt="Node Fetch"/>
+ <br>
+ <p>A light-weight module that brings <a href="https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API">Fetch API</a> to Node.js.</p>
+ <a href="https://github.com/node-fetch/node-fetch/actions"><img src="https://github.com/node-fetch/node-fetch/workflows/CI/badge.svg?branch=master" alt="Build status"></a>
+ <a href="https://coveralls.io/github/node-fetch/node-fetch"><img src="https://img.shields.io/coveralls/github/node-fetch/node-fetch" alt="Coverage status"></a>
+ <a href="https://packagephobia.now.sh/result?p=node-fetch"><img src="https://badgen.net/packagephobia/install/node-fetch" alt="Current version"></a>
+ <a href="https://www.npmjs.com/package/node-fetch"><img src="https://img.shields.io/npm/v/node-fetch" alt="Install size"></a>
+ <a href="https://github.com/sindresorhus/awesome-nodejs"><img src="https://awesome.re/mentioned-badge.svg" alt="Mentioned in Awesome Node.js"></a>
+ <a href="https://discord.gg/Zxbndcm"><img src="https://img.shields.io/discord/619915844268326952?color=%237289DA&label=Discord" alt="Discord"></a>
+ <br>
+ <br>
+ <b>Consider supporting us on our Open Collective:</b>
+ <br>
+ <br>
+ <a href="https://opencollective.com/node-fetch"><img src="https://opencollective.com/node-fetch/donate/button.png?color=blue" alt="Open Collective"></a>
+</div>
+
+---
+
+**You might be looking for the [v2 docs](https://github.com/node-fetch/node-fetch/tree/2.x#readme)**
+
+<!-- TOC -->
+
+- [Motivation](#motivation)
+- [Features](#features)
+- [Difference from client-side fetch](#difference-from-client-side-fetch)
+- [Installation](#installation)
+- [Loading and configuring the module](#loading-and-configuring-the-module)
+- [Upgrading](#upgrading)
+- [Common Usage](#common-usage)
+ - [Plain text or HTML](#plain-text-or-html)
+ - [JSON](#json)
+ - [Simple Post](#simple-post)
+ - [Post with JSON](#post-with-json)
+ - [Post with form parameters](#post-with-form-parameters)
+ - [Handling exceptions](#handling-exceptions)
+ - [Handling client and server errors](#handling-client-and-server-errors)
+ - [Handling cookies](#handling-cookies)
+- [Advanced Usage](#advanced-usage)
+ - [Streams](#streams)
+ - [Accessing Headers and other Metadata](#accessing-headers-and-other-metadata)
+ - [Extract Set-Cookie Header](#extract-set-cookie-header)
+ - [Post data using a file](#post-data-using-a-file)
+ - [Request cancellation with AbortSignal](#request-cancellation-with-abortsignal)
+- [API](#api)
+ - [fetch(url[, options])](#fetchurl-options)
+ - [Options](#options)
+ - [Default Headers](#default-headers)
+ - [Custom Agent](#custom-agent)
+ - [Custom highWaterMark](#custom-highwatermark)
+ - [Insecure HTTP Parser](#insecure-http-parser)
+ - [Class: Request](#class-request)
+ - [new Request(input[, options])](#new-requestinput-options)
+ - [Class: Response](#class-response)
+ - [new Response([body[, options]])](#new-responsebody-options)
+ - [response.ok](#responseok)
+ - [response.redirected](#responseredirected)
+ - [response.type](#responsetype)
+ - [Class: Headers](#class-headers)
+ - [new Headers([init])](#new-headersinit)
+ - [Interface: Body](#interface-body)
+ - [body.body](#bodybody)
+ - [body.bodyUsed](#bodybodyused)
+ - [body.arrayBuffer()](#bodyarraybuffer)
+ - [body.blob()](#bodyblob)
+ - [body.formData()](#formdata)
+ - [body.json()](#bodyjson)
+ - [body.text()](#bodytext)
+ - [Class: FetchError](#class-fetcherror)
+ - [Class: AbortError](#class-aborterror)
+- [TypeScript](#typescript)
+- [Acknowledgement](#acknowledgement)
+- [Team](#team)
+ - [Former](#former)
+- [License](#license)
+
+<!-- /TOC -->
+
+## Motivation
+
+Instead of implementing `XMLHttpRequest` in Node.js to run browser-specific [Fetch polyfill](https://github.com/github/fetch), why not go from native `http` to `fetch` API directly? Hence, `node-fetch`, minimal code for a `window.fetch` compatible API on Node.js runtime.
+
+See Jason Miller's [isomorphic-unfetch](https://www.npmjs.com/package/isomorphic-unfetch) or Leonardo Quixada's [cross-fetch](https://github.com/lquixada/cross-fetch) for isomorphic usage (exports `node-fetch` for server-side, `whatwg-fetch` for client-side).
+
+## Features
+
+- Stay consistent with `window.fetch` API.
+- Make conscious trade-off when following [WHATWG fetch spec][whatwg-fetch] and [stream spec](https://streams.spec.whatwg.org/) implementation details, document known differences.
+- Use native promise and async functions.
+- Use native Node streams for body, on both request and response.
+- Decode content encoding (gzip/deflate/brotli) properly, and convert string output (such as `res.text()` and `res.json()`) to UTF-8 automatically.
+- Useful extensions such as redirect limit, response size limit, [explicit errors][error-handling.md] for troubleshooting.
+
+## Difference from client-side fetch
+
+- See known differences:
+ - [As of v3.x](docs/v3-LIMITS.md)
+ - [As of v2.x](docs/v2-LIMITS.md)
+- If you happen to use a missing feature that `window.fetch` offers, feel free to open an issue.
+- Pull requests are welcomed too!
+
+## Installation
+
+Current stable release (`3.x`) requires at least Node.js 12.20.0.
+
+```sh
+npm install node-fetch
+```
+
+## Loading and configuring the module
+
+### ES Modules (ESM)
+
+```js
+import fetch from 'node-fetch';
+```
+
+### CommonJS
+
+`node-fetch` from v3 is an ESM-only module - you are not able to import it with `require()`.
+
+If you cannot switch to ESM, please use v2 which remains compatible with CommonJS. Critical bug fixes will continue to be published for v2.
+
+```sh
+npm install node-fetch@2
+```
+
+Alternatively, you can use the async `import()` function from CommonJS to load `node-fetch` asynchronously:
+
+```js
+// mod.cjs
+const fetch = (...args) => import('node-fetch').then(({default: fetch}) => fetch(...args));
+```
+
+### Providing global access
+
+To use `fetch()` without importing it, you can patch the `global` object in node:
+
+```js
+// fetch-polyfill.js
+import fetch, {
+ Blob,
+ blobFrom,
+ blobFromSync,
+ File,
+ fileFrom,
+ fileFromSync,
+ FormData,
+ Headers,
+ Request,
+ Response,
+} from 'node-fetch'
+
+if (!globalThis.fetch) {
+ globalThis.fetch = fetch
+ globalThis.Headers = Headers
+ globalThis.Request = Request
+ globalThis.Response = Response
+}
+
+// index.js
+import './fetch-polyfill'
+
+// ...
+```
+
+## Upgrading
+
+Using an old version of node-fetch? Check out the following files:
+
+- [2.x to 3.x upgrade guide](docs/v3-UPGRADE-GUIDE.md)
+- [1.x to 2.x upgrade guide](docs/v2-UPGRADE-GUIDE.md)
+- [Changelog](https://github.com/node-fetch/node-fetch/releases)
+
+## Common Usage
+
+NOTE: The documentation below is up-to-date with `3.x` releases, if you are using an older version, please check how to [upgrade](#upgrading).
+
+### Plain text or HTML
+
+```js
+import fetch from 'node-fetch';
+
+const response = await fetch('https://github.com/');
+const body = await response.text();
+
+console.log(body);
+```
+
+### JSON
+
+```js
+import fetch from 'node-fetch';
+
+const response = await fetch('https://api.github.com/users/github');
+const data = await response.json();
+
+console.log(data);
+```
+
+### Simple Post
+
+```js
+import fetch from 'node-fetch';
+
+const response = await fetch('https://httpbin.org/post', {method: 'POST', body: 'a=1'});
+const data = await response.json();
+
+console.log(data);
+```
+
+### Post with JSON
+
+```js
+import fetch from 'node-fetch';
+
+const body = {a: 1};
+
+const response = await fetch('https://httpbin.org/post', {
+ method: 'post',
+ body: JSON.stringify(body),
+ headers: {'Content-Type': 'application/json'}
+});
+const data = await response.json();
+
+console.log(data);
+```
+
+### Post with form parameters
+
+`URLSearchParams` is available on the global object in Node.js as of v10.0.0. See [official documentation](https://nodejs.org/api/url.html#url_class_urlsearchparams) for more usage methods.
+
+NOTE: The `Content-Type` header is only set automatically to `x-www-form-urlencoded` when an instance of `URLSearchParams` is given as such:
+
+```js
+import fetch from 'node-fetch';
+
+const params = new URLSearchParams();
+params.append('a', 1);
+
+const response = await fetch('https://httpbin.org/post', {method: 'POST', body: params});
+const data = await response.json();
+
+console.log(data);
+```
+
+### Handling exceptions
+
+NOTE: 3xx-5xx responses are _NOT_ exceptions, and should be handled in `then()`, see the next section.
+
+Wrapping the fetch function into a `try/catch` block will catch _all_ exceptions, such as errors originating from node core libraries, like network errors, and operational errors which are instances of FetchError. See the [error handling document][error-handling.md] for more details.
+
+```js
+import fetch from 'node-fetch';
+
+try {
+ await fetch('https://domain.invalid/');
+} catch (error) {
+ console.log(error);
+}
+```
+
+### Handling client and server errors
+
+It is common to create a helper function to check that the response contains no client (4xx) or server (5xx) error responses:
+
+```js
+import fetch from 'node-fetch';
+
+class HTTPResponseError extends Error {
+ constructor(response) {
+ super(`HTTP Error Response: ${response.status} ${response.statusText}`);
+ this.response = response;
+ }
+}
+
+const checkStatus = response => {
+ if (response.ok) {
+ // response.status >= 200 && response.status < 300
+ return response;
+ } else {
+ throw new HTTPResponseError(response);
+ }
+}
+
+const response = await fetch('https://httpbin.org/status/400');
+
+try {
+ checkStatus(response);
+} catch (error) {
+ console.error(error);
+
+ const errorBody = await error.response.text();
+ console.error(`Error body: ${errorBody}`);
+}
+```
+
+### Handling cookies
+
+Cookies are not stored by default. However, cookies can be extracted and passed by manipulating request and response headers. See [Extract Set-Cookie Header](#extract-set-cookie-header) for details.
+
+## Advanced Usage
+
+### Streams
+
+The "Node.js way" is to use streams when possible. You can pipe `res.body` to another stream. This example uses [stream.pipeline](https://nodejs.org/api/stream.html#stream_stream_pipeline_streams_callback) to attach stream error handlers and wait for the download to complete.
+
+```js
+import {createWriteStream} from 'node:fs';
+import {pipeline} from 'node:stream';
+import {promisify} from 'node:util'
+import fetch from 'node-fetch';
+
+const streamPipeline = promisify(pipeline);
+
+const response = await fetch('https://github.githubassets.com/images/modules/logos_page/Octocat.png');
+
+if (!response.ok) throw new Error(`unexpected response ${response.statusText}`);
+
+await streamPipeline(response.body, createWriteStream('./octocat.png'));
+```
+
+In Node.js 14 you can also use async iterators to read `body`; however, be careful to catch
+errors -- the longer a response runs, the more likely it is to encounter an error.
+
+```js
+import fetch from 'node-fetch';
+
+const response = await fetch('https://httpbin.org/stream/3');
+
+try {
+ for await (const chunk of response.body) {
+ console.dir(JSON.parse(chunk.toString()));
+ }
+} catch (err) {
+ console.error(err.stack);
+}
+```
+
+In Node.js 12 you can also use async iterators to read `body`; however, async iterators with streams
+did not mature until Node.js 14, so you need to do some extra work to ensure you handle errors
+directly from the stream and wait on it response to fully close.
+
+```js
+import fetch from 'node-fetch';
+
+const read = async body => {
+ let error;
+ body.on('error', err => {
+ error = err;
+ });
+
+ for await (const chunk of body) {
+ console.dir(JSON.parse(chunk.toString()));
+ }
+
+ return new Promise((resolve, reject) => {
+ body.on('close', () => {
+ error ? reject(error) : resolve();
+ });
+ });
+};
+
+try {
+ const response = await fetch('https://httpbin.org/stream/3');
+ await read(response.body);
+} catch (err) {
+ console.error(err.stack);
+}
+```
+
+### Accessing Headers and other Metadata
+
+```js
+import fetch from 'node-fetch';
+
+const response = await fetch('https://github.com/');
+
+console.log(response.ok);
+console.log(response.status);
+console.log(response.statusText);
+console.log(response.headers.raw());
+console.log(response.headers.get('content-type'));
+```
+
+### Extract Set-Cookie Header
+
+Unlike browsers, you can access raw `Set-Cookie` headers manually using `Headers.raw()`. This is a `node-fetch` only API.
+
+```js
+import fetch from 'node-fetch';
+
+const response = await fetch('https://example.com');
+
+// Returns an array of values, instead of a string of comma-separated values
+console.log(response.headers.raw()['set-cookie']);
+```
+
+### Post data using a file
+
+```js
+import fetch, {
+ Blob,
+ blobFrom,
+ blobFromSync,
+ File,
+ fileFrom,
+ fileFromSync,
+} from 'node-fetch'
+
+const mimetype = 'text/plain'
+const blob = fileFromSync('./input.txt', mimetype)
+const url = 'https://httpbin.org/post'
+
+const response = await fetch(url, { method: 'POST', body: blob })
+const data = await response.json()
+
+console.log(data)
+```
+
+node-fetch comes with a spec-compliant [FormData] implementations for posting
+multipart/form-data payloads
+
+```js
+import fetch, { FormData, File, fileFrom } from 'node-fetch'
+
+const httpbin = 'https://httpbin.org/post'
+const formData = new FormData()
+const binary = new Uint8Array([ 97, 98, 99 ])
+const abc = new File([binary], 'abc.txt', { type: 'text/plain' })
+
+formData.set('greeting', 'Hello, world!')
+formData.set('file-upload', abc, 'new name.txt')
+
+const response = await fetch(httpbin, { method: 'POST', body: formData })
+const data = await response.json()
+
+console.log(data)
+```
+
+If you for some reason need to post a stream coming from any arbitrary place,
+then you can append a [Blob] or a [File] look-a-like item.
+
+The minimum requirement is that it has:
+1. A `Symbol.toStringTag` getter or property that is either `Blob` or `File`
+2. A known size.
+3. And either a `stream()` method or a `arrayBuffer()` method that returns a ArrayBuffer.
+
+The `stream()` must return any async iterable object as long as it yields Uint8Array (or Buffer)
+so Node.Readable streams and whatwg streams works just fine.
+
+```js
+formData.append('upload', {
+ [Symbol.toStringTag]: 'Blob',
+ size: 3,
+ *stream() {
+ yield new Uint8Array([97, 98, 99])
+ },
+ arrayBuffer() {
+ return new Uint8Array([97, 98, 99]).buffer
+ }
+}, 'abc.txt')
+```
+
+### Request cancellation with AbortSignal
+
+You may cancel requests with `AbortController`. A suggested implementation is [`abort-controller`](https://www.npmjs.com/package/abort-controller).
+
+An example of timing out a request after 150ms could be achieved as the following:
+
+```js
+import fetch, { AbortError } from 'node-fetch';
+
+// AbortController was added in node v14.17.0 globally
+const AbortController = globalThis.AbortController || await import('abort-controller')
+
+const controller = new AbortController();
+const timeout = setTimeout(() => {
+ controller.abort();
+}, 150);
+
+try {
+ const response = await fetch('https://example.com', {signal: controller.signal});
+ const data = await response.json();
+} catch (error) {
+ if (error instanceof AbortError) {
+ console.log('request was aborted');
+ }
+} finally {
+ clearTimeout(timeout);
+}
+```
+
+See [test cases](https://github.com/node-fetch/node-fetch/blob/master/test/) for more examples.
+
+## API
+
+### fetch(url[, options])
+
+- `url` A string representing the URL for fetching
+- `options` [Options](#fetch-options) for the HTTP(S) request
+- Returns: <code>Promise&lt;[Response](#class-response)&gt;</code>
+
+Perform an HTTP(S) fetch.
+
+`url` should be an absolute URL, such as `https://example.com/`. A path-relative URL (`/file/under/root`) or protocol-relative URL (`//can-be-http-or-https.com/`) will result in a rejected `Promise`.
+
+<a id="fetch-options"></a>
+
+### Options
+
+The default values are shown after each option key.
+
+```js
+{
+ // These properties are part of the Fetch Standard
+ method: 'GET',
+ headers: {}, // Request headers. format is the identical to that accepted by the Headers constructor (see below)
+ body: null, // Request body. can be null, or a Node.js Readable stream
+ redirect: 'follow', // Set to `manual` to extract redirect headers, `error` to reject redirect
+ signal: null, // Pass an instance of AbortSignal to optionally abort requests
+
+ // The following properties are node-fetch extensions
+ follow: 20, // maximum redirect count. 0 to not follow redirect
+ compress: true, // support gzip/deflate content encoding. false to disable
+ size: 0, // maximum response body size in bytes. 0 to disable
+ agent: null, // http(s).Agent instance or function that returns an instance (see below)
+ highWaterMark: 16384, // the maximum number of bytes to store in the internal buffer before ceasing to read from the underlying resource.
+ insecureHTTPParser: false // Use an insecure HTTP parser that accepts invalid HTTP headers when `true`.
+}
+```
+
+#### Default Headers
+
+If no values are set, the following request headers will be sent automatically:
+
+| Header | Value |
+| ------------------- | ------------------------------------------------------ |
+| `Accept-Encoding` | `gzip, deflate, br` (when `options.compress === true`) |
+| `Accept` | `*/*` |
+| `Content-Length` | _(automatically calculated, if possible)_ |
+| `Host` | _(host and port information from the target URI)_ |
+| `Transfer-Encoding` | `chunked` _(when `req.body` is a stream)_ |
+| `User-Agent` | `node-fetch` |
+
+
+Note: when `body` is a `Stream`, `Content-Length` is not set automatically.
+
+#### Custom Agent
+
+The `agent` option allows you to specify networking related options which are out of the scope of Fetch, including and not limited to the following:
+
+- Support self-signed certificate
+- Use only IPv4 or IPv6
+- Custom DNS Lookup
+
+See [`http.Agent`](https://nodejs.org/api/http.html#http_new_agent_options) for more information.
+
+If no agent is specified, the default agent provided by Node.js is used. Note that [this changed in Node.js 19](https://github.com/nodejs/node/blob/4267b92604ad78584244488e7f7508a690cb80d0/lib/_http_agent.js#L564) to have `keepalive` true by default. If you wish to enable `keepalive` in an earlier version of Node.js, you can override the agent as per the following code sample.
+
+In addition, the `agent` option accepts a function that returns `http`(s)`.Agent` instance given current [URL](https://nodejs.org/api/url.html), this is useful during a redirection chain across HTTP and HTTPS protocol.
+
+```js
+import http from 'node:http';
+import https from 'node:https';
+
+const httpAgent = new http.Agent({
+ keepAlive: true
+});
+const httpsAgent = new https.Agent({
+ keepAlive: true
+});
+
+const options = {
+ agent: function(_parsedURL) {
+ if (_parsedURL.protocol == 'http:') {
+ return httpAgent;
+ } else {
+ return httpsAgent;
+ }
+ }
+};
+```
+
+<a id="custom-highWaterMark"></a>
+
+#### Custom highWaterMark
+
+Stream on Node.js have a smaller internal buffer size (16kB, aka `highWaterMark`) from client-side browsers (>1MB, not consistent across browsers). Because of that, when you are writing an isomorphic app and using `res.clone()`, it will hang with large response in Node.
+
+The recommended way to fix this problem is to resolve cloned response in parallel:
+
+```js
+import fetch from 'node-fetch';
+
+const response = await fetch('https://example.com');
+const r1 = response.clone();
+
+const results = await Promise.all([response.json(), r1.text()]);
+
+console.log(results[0]);
+console.log(results[1]);
+```
+
+If for some reason you don't like the solution above, since `3.x` you are able to modify the `highWaterMark` option:
+
+```js
+import fetch from 'node-fetch';
+
+const response = await fetch('https://example.com', {
+ // About 1MB
+ highWaterMark: 1024 * 1024
+});
+
+const result = await res.clone().arrayBuffer();
+console.dir(result);
+```
+
+#### Insecure HTTP Parser
+
+Passed through to the `insecureHTTPParser` option on http(s).request. See [`http.request`](https://nodejs.org/api/http.html#http_http_request_url_options_callback) for more information.
+
+#### Manual Redirect
+
+The `redirect: 'manual'` option for node-fetch is different from the browser & specification, which
+results in an [opaque-redirect filtered response](https://fetch.spec.whatwg.org/#concept-filtered-response-opaque-redirect).
+node-fetch gives you the typical [basic filtered response](https://fetch.spec.whatwg.org/#concept-filtered-response-basic) instead.
+
+```js
+import fetch from 'node-fetch';
+
+const response = await fetch('https://httpbin.org/status/301', { redirect: 'manual' });
+
+if (response.status === 301 || response.status === 302) {
+ const locationURL = new URL(response.headers.get('location'), response.url);
+ const response2 = await fetch(locationURL, { redirect: 'manual' });
+ console.dir(response2);
+}
+```
+
+<a id="class-request"></a>
+
+### Class: Request
+
+An HTTP(S) request containing information about URL, method, headers, and the body. This class implements the [Body](#iface-body) interface.
+
+Due to the nature of Node.js, the following properties are not implemented at this moment:
+
+- `type`
+- `destination`
+- `mode`
+- `credentials`
+- `cache`
+- `integrity`
+- `keepalive`
+
+The following node-fetch extension properties are provided:
+
+- `follow`
+- `compress`
+- `counter`
+- `agent`
+- `highWaterMark`
+
+See [options](#fetch-options) for exact meaning of these extensions.
+
+#### new Request(input[, options])
+
+<small>_(spec-compliant)_</small>
+
+- `input` A string representing a URL, or another `Request` (which will be cloned)
+- `options` [Options](#fetch-options) for the HTTP(S) request
+
+Constructs a new `Request` object. The constructor is identical to that in the [browser](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request).
+
+In most cases, directly `fetch(url, options)` is simpler than creating a `Request` object.
+
+<a id="class-response"></a>
+
+### Class: Response
+
+An HTTP(S) response. This class implements the [Body](#iface-body) interface.
+
+The following properties are not implemented in node-fetch at this moment:
+
+- `trailer`
+
+#### new Response([body[, options]])
+
+<small>_(spec-compliant)_</small>
+
+- `body` A `String` or [`Readable` stream][node-readable]
+- `options` A [`ResponseInit`][response-init] options dictionary
+
+Constructs a new `Response` object. The constructor is identical to that in the [browser](https://developer.mozilla.org/en-US/docs/Web/API/Response/Response).
+
+Because Node.js does not implement service workers (for which this class was designed), one rarely has to construct a `Response` directly.
+
+#### response.ok
+
+<small>_(spec-compliant)_</small>
+
+Convenience property representing if the request ended normally. Will evaluate to true if the response status was greater than or equal to 200 but smaller than 300.
+
+#### response.redirected
+
+<small>_(spec-compliant)_</small>
+
+Convenience property representing if the request has been redirected at least once. Will evaluate to true if the internal redirect counter is greater than 0.
+
+#### response.type
+
+<small>_(deviation from spec)_</small>
+
+Convenience property representing the response's type. node-fetch only supports `'default'` and `'error'` and does not make use of [filtered responses](https://fetch.spec.whatwg.org/#concept-filtered-response).
+
+<a id="class-headers"></a>
+
+### Class: Headers
+
+This class allows manipulating and iterating over a set of HTTP headers. All methods specified in the [Fetch Standard][whatwg-fetch] are implemented.
+
+#### new Headers([init])
+
+<small>_(spec-compliant)_</small>
+
+- `init` Optional argument to pre-fill the `Headers` object
+
+Construct a new `Headers` object. `init` can be either `null`, a `Headers` object, an key-value map object or any iterable object.
+
+```js
+// Example adapted from https://fetch.spec.whatwg.org/#example-headers-class
+import {Headers} from 'node-fetch';
+
+const meta = {
+ 'Content-Type': 'text/xml'
+};
+const headers = new Headers(meta);
+
+// The above is equivalent to
+const meta = [['Content-Type', 'text/xml']];
+const headers = new Headers(meta);
+
+// You can in fact use any iterable objects, like a Map or even another Headers
+const meta = new Map();
+meta.set('Content-Type', 'text/xml');
+const headers = new Headers(meta);
+const copyOfHeaders = new Headers(headers);
+```
+
+<a id="iface-body"></a>
+
+### Interface: Body
+
+`Body` is an abstract interface with methods that are applicable to both `Request` and `Response` classes.
+
+#### body.body
+
+<small>_(deviation from spec)_</small>
+
+- Node.js [`Readable` stream][node-readable]
+
+Data are encapsulated in the `Body` object. Note that while the [Fetch Standard][whatwg-fetch] requires the property to always be a WHATWG `ReadableStream`, in node-fetch it is a Node.js [`Readable` stream][node-readable].
+
+#### body.bodyUsed
+
+<small>_(spec-compliant)_</small>
+
+- `Boolean`
+
+A boolean property for if this body has been consumed. Per the specs, a consumed body cannot be used again.
+
+#### body.arrayBuffer()
+
+#### body.formData()
+
+#### body.blob()
+
+#### body.json()
+
+#### body.text()
+
+`fetch` comes with methods to parse `multipart/form-data` payloads as well as
+`x-www-form-urlencoded` bodies using `.formData()` this comes from the idea that
+Service Worker can intercept such messages before it's sent to the server to
+alter them. This is useful for anybody building a server so you can use it to
+parse & consume payloads.
+
+<details>
+<summary>Code example</summary>
+
+```js
+import http from 'node:http'
+import { Response } from 'node-fetch'
+
+http.createServer(async function (req, res) {
+ const formData = await new Response(req, {
+ headers: req.headers // Pass along the boundary value
+ }).formData()
+ const allFields = [...formData]
+
+ const file = formData.get('uploaded-files')
+ const arrayBuffer = await file.arrayBuffer()
+ const text = await file.text()
+ const whatwgReadableStream = file.stream()
+
+ // other was to consume the request could be to do:
+ const json = await new Response(req).json()
+ const text = await new Response(req).text()
+ const arrayBuffer = await new Response(req).arrayBuffer()
+ const blob = await new Response(req, {
+ headers: req.headers // So that `type` inherits `Content-Type`
+ }.blob()
+})
+```
+
+</details>
+
+<a id="class-fetcherror"></a>
+
+### Class: FetchError
+
+<small>_(node-fetch extension)_</small>
+
+An operational error in the fetching process. See [ERROR-HANDLING.md][] for more info.
+
+<a id="class-aborterror"></a>
+
+### Class: AbortError
+
+<small>_(node-fetch extension)_</small>
+
+An Error thrown when the request is aborted in response to an `AbortSignal`'s `abort` event. It has a `name` property of `AbortError`. See [ERROR-HANDLING.MD][] for more info.
+
+## TypeScript
+
+**Since `3.x` types are bundled with `node-fetch`, so you don't need to install any additional packages.**
+
+For older versions please use the type definitions from [DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped):
+
+```sh
+npm install --save-dev @types/[email protected]
+```
+
+## Acknowledgement
+
+Thanks to [github/fetch](https://github.com/github/fetch) for providing a solid implementation reference.
+
+## Team
+
+| [![David Frank](https://github.com/bitinn.png?size=100)](https://github.com/bitinn) | [![Jimmy Wärting](https://github.com/jimmywarting.png?size=100)](https://github.com/jimmywarting) | [![Antoni Kepinski](https://github.com/xxczaki.png?size=100)](https://github.com/xxczaki) | [![Richie Bendall](https://github.com/Richienb.png?size=100)](https://github.com/Richienb) | [![Gregor Martynus](https://github.com/gr2m.png?size=100)](https://github.com/gr2m) |
+| ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------- |
+| [David Frank](https://bitinn.net/) | [Jimmy Wärting](https://jimmy.warting.se/) | [Antoni Kepinski](https://kepinski.ch) | [Richie Bendall](https://www.richie-bendall.ml/) | [Gregor Martynus](https://twitter.com/gr2m) |
+
+###### Former
+
+- [Timothy Gu](https://github.com/timothygu)
+- [Jared Kantrowitz](https://github.com/jkantr)
+
+## License
+
+[MIT](LICENSE.md)
+
+[whatwg-fetch]: https://fetch.spec.whatwg.org/
+[response-init]: https://fetch.spec.whatwg.org/#responseinit
+[node-readable]: https://nodejs.org/api/stream.html#stream_readable_streams
+[mdn-headers]: https://developer.mozilla.org/en-US/docs/Web/API/Headers
+[error-handling.md]: https://github.com/node-fetch/node-fetch/blob/master/docs/ERROR-HANDLING.md
+[FormData]: https://developer.mozilla.org/en-US/docs/Web/API/FormData
+[Blob]: https://developer.mozilla.org/en-US/docs/Web/API/Blob
+[File]: https://developer.mozilla.org/en-US/docs/Web/API/File
diff --git a/node_modules/node-fetch/package.json b/node_modules/node-fetch/package.json
new file mode 100644
index 00000000..2b4e8583
--- /dev/null
+++ b/node_modules/node-fetch/package.json
@@ -0,0 +1,131 @@
+{
+ "name": "node-fetch",
+ "version": "3.3.2",
+ "description": "A light-weight module that brings Fetch API to node.js",
+ "main": "./src/index.js",
+ "sideEffects": false,
+ "type": "module",
+ "files": [
+ "src",
+ "@types/index.d.ts"
+ ],
+ "types": "./@types/index.d.ts",
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "scripts": {
+ "test": "mocha",
+ "coverage": "c8 report --reporter=text-lcov | coveralls",
+ "test-types": "tsd",
+ "lint": "xo"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/node-fetch/node-fetch.git"
+ },
+ "keywords": [
+ "fetch",
+ "http",
+ "promise",
+ "request",
+ "curl",
+ "wget",
+ "xhr",
+ "whatwg"
+ ],
+ "author": "David Frank",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/node-fetch/node-fetch/issues"
+ },
+ "homepage": "https://github.com/node-fetch/node-fetch",
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/node-fetch"
+ },
+ "devDependencies": {
+ "abort-controller": "^3.0.0",
+ "abortcontroller-polyfill": "^1.7.1",
+ "busboy": "^1.4.0",
+ "c8": "^7.7.2",
+ "chai": "^4.3.4",
+ "chai-as-promised": "^7.1.1",
+ "chai-iterator": "^3.0.2",
+ "chai-string": "^1.5.0",
+ "coveralls": "^3.1.0",
+ "form-data": "^4.0.0",
+ "formdata-node": "^4.2.4",
+ "mocha": "^9.1.3",
+ "p-timeout": "^5.0.0",
+ "stream-consumers": "^1.0.1",
+ "tsd": "^0.14.0",
+ "xo": "^0.39.1"
+ },
+ "dependencies": {
+ "data-uri-to-buffer": "^4.0.0",
+ "fetch-blob": "^3.1.4",
+ "formdata-polyfill": "^4.0.10"
+ },
+ "tsd": {
+ "cwd": "@types",
+ "compilerOptions": {
+ "esModuleInterop": true
+ }
+ },
+ "xo": {
+ "envs": [
+ "node",
+ "browser"
+ ],
+ "ignores": [
+ "example.js"
+ ],
+ "rules": {
+ "complexity": 0,
+ "import/extensions": 0,
+ "import/no-useless-path-segments": 0,
+ "import/no-anonymous-default-export": 0,
+ "import/no-named-as-default": 0,
+ "unicorn/import-index": 0,
+ "unicorn/no-array-reduce": 0,
+ "unicorn/prefer-node-protocol": 0,
+ "unicorn/numeric-separators-style": 0,
+ "unicorn/explicit-length-check": 0,
+ "capitalized-comments": 0,
+ "node/no-unsupported-features/es-syntax": 0,
+ "@typescript-eslint/member-ordering": 0
+ },
+ "overrides": [
+ {
+ "files": "test/**/*.js",
+ "envs": [
+ "node",
+ "mocha"
+ ],
+ "rules": {
+ "max-nested-callbacks": 0,
+ "no-unused-expressions": 0,
+ "no-warning-comments": 0,
+ "new-cap": 0,
+ "guard-for-in": 0,
+ "unicorn/no-array-for-each": 0,
+ "unicorn/prevent-abbreviations": 0,
+ "promise/prefer-await-to-then": 0,
+ "ava/no-import-test-files": 0
+ }
+ }
+ ]
+ },
+ "runkitExampleFilename": "example.js",
+ "release": {
+ "branches": [
+ "+([0-9]).x",
+ "main",
+ "next",
+ {
+ "name": "beta",
+ "prerelease": true
+ }
+ ]
+ }
+}
diff --git a/node_modules/node-fetch/src/body.js b/node_modules/node-fetch/src/body.js
new file mode 100644
index 00000000..714e27ec
--- /dev/null
+++ b/node_modules/node-fetch/src/body.js
@@ -0,0 +1,397 @@
+
+/**
+ * Body.js
+ *
+ * Body interface provides common methods for Request and Response
+ */
+
+import Stream, {PassThrough} from 'node:stream';
+import {types, deprecate, promisify} from 'node:util';
+import {Buffer} from 'node:buffer';
+
+import Blob from 'fetch-blob';
+import {FormData, formDataToBlob} from 'formdata-polyfill/esm.min.js';
+
+import {FetchError} from './errors/fetch-error.js';
+import {FetchBaseError} from './errors/base.js';
+import {isBlob, isURLSearchParameters} from './utils/is.js';
+
+const pipeline = promisify(Stream.pipeline);
+const INTERNALS = Symbol('Body internals');
+
+/**
+ * Body mixin
+ *
+ * Ref: https://fetch.spec.whatwg.org/#body
+ *
+ * @param Stream body Readable stream
+ * @param Object opts Response options
+ * @return Void
+ */
+export default class Body {
+ constructor(body, {
+ size = 0
+ } = {}) {
+ let boundary = null;
+
+ if (body === null) {
+ // Body is undefined or null
+ body = null;
+ } else if (isURLSearchParameters(body)) {
+ // Body is a URLSearchParams
+ body = Buffer.from(body.toString());
+ } else if (isBlob(body)) {
+ // Body is blob
+ } else if (Buffer.isBuffer(body)) {
+ // Body is Buffer
+ } else if (types.isAnyArrayBuffer(body)) {
+ // Body is ArrayBuffer
+ body = Buffer.from(body);
+ } else if (ArrayBuffer.isView(body)) {
+ // Body is ArrayBufferView
+ body = Buffer.from(body.buffer, body.byteOffset, body.byteLength);
+ } else if (body instanceof Stream) {
+ // Body is stream
+ } else if (body instanceof FormData) {
+ // Body is FormData
+ body = formDataToBlob(body);
+ boundary = body.type.split('=')[1];
+ } else {
+ // None of the above
+ // coerce to string then buffer
+ body = Buffer.from(String(body));
+ }
+
+ let stream = body;
+
+ if (Buffer.isBuffer(body)) {
+ stream = Stream.Readable.from(body);
+ } else if (isBlob(body)) {
+ stream = Stream.Readable.from(body.stream());
+ }
+
+ this[INTERNALS] = {
+ body,
+ stream,
+ boundary,
+ disturbed: false,
+ error: null
+ };
+ this.size = size;
+
+ if (body instanceof Stream) {
+ body.on('error', error_ => {
+ const error = error_ instanceof FetchBaseError ?
+ error_ :
+ new FetchError(`Invalid response body while trying to fetch ${this.url}: ${error_.message}`, 'system', error_);
+ this[INTERNALS].error = error;
+ });
+ }
+ }
+
+ get body() {
+ return this[INTERNALS].stream;
+ }
+
+ get bodyUsed() {
+ return this[INTERNALS].disturbed;
+ }
+
+ /**
+ * Decode response as ArrayBuffer
+ *
+ * @return Promise
+ */
+ async arrayBuffer() {
+ const {buffer, byteOffset, byteLength} = await consumeBody(this);
+ return buffer.slice(byteOffset, byteOffset + byteLength);
+ }
+
+ async formData() {
+ const ct = this.headers.get('content-type');
+
+ if (ct.startsWith('application/x-www-form-urlencoded')) {
+ const formData = new FormData();
+ const parameters = new URLSearchParams(await this.text());
+
+ for (const [name, value] of parameters) {
+ formData.append(name, value);
+ }
+
+ return formData;
+ }
+
+ const {toFormData} = await import('./utils/multipart-parser.js');
+ return toFormData(this.body, ct);
+ }
+
+ /**
+ * Return raw response as Blob
+ *
+ * @return Promise
+ */
+ async blob() {
+ const ct = (this.headers && this.headers.get('content-type')) || (this[INTERNALS].body && this[INTERNALS].body.type) || '';
+ const buf = await this.arrayBuffer();
+
+ return new Blob([buf], {
+ type: ct
+ });
+ }
+
+ /**
+ * Decode response as json
+ *
+ * @return Promise
+ */
+ async json() {
+ const text = await this.text();
+ return JSON.parse(text);
+ }
+
+ /**
+ * Decode response as text
+ *
+ * @return Promise
+ */
+ async text() {
+ const buffer = await consumeBody(this);
+ return new TextDecoder().decode(buffer);
+ }
+
+ /**
+ * Decode response as buffer (non-spec api)
+ *
+ * @return Promise
+ */
+ buffer() {
+ return consumeBody(this);
+ }
+}
+
+Body.prototype.buffer = deprecate(Body.prototype.buffer, 'Please use \'response.arrayBuffer()\' instead of \'response.buffer()\'', 'node-fetch#buffer');
+
+// In browsers, all properties are enumerable.
+Object.defineProperties(Body.prototype, {
+ body: {enumerable: true},
+ bodyUsed: {enumerable: true},
+ arrayBuffer: {enumerable: true},
+ blob: {enumerable: true},
+ json: {enumerable: true},
+ text: {enumerable: true},
+ data: {get: deprecate(() => {},
+ 'data doesn\'t exist, use json(), text(), arrayBuffer(), or body instead',
+ 'https://github.com/node-fetch/node-fetch/issues/1000 (response)')}
+});
+
+/**
+ * Consume and convert an entire Body to a Buffer.
+ *
+ * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body
+ *
+ * @return Promise
+ */
+async function consumeBody(data) {
+ if (data[INTERNALS].disturbed) {
+ throw new TypeError(`body used already for: ${data.url}`);
+ }
+
+ data[INTERNALS].disturbed = true;
+
+ if (data[INTERNALS].error) {
+ throw data[INTERNALS].error;
+ }
+
+ const {body} = data;
+
+ // Body is null
+ if (body === null) {
+ return Buffer.alloc(0);
+ }
+
+ /* c8 ignore next 3 */
+ if (!(body instanceof Stream)) {
+ return Buffer.alloc(0);
+ }
+
+ // Body is stream
+ // get ready to actually consume the body
+ const accum = [];
+ let accumBytes = 0;
+
+ try {
+ for await (const chunk of body) {
+ if (data.size > 0 && accumBytes + chunk.length > data.size) {
+ const error = new FetchError(`content size at ${data.url} over limit: ${data.size}`, 'max-size');
+ body.destroy(error);
+ throw error;
+ }
+
+ accumBytes += chunk.length;
+ accum.push(chunk);
+ }
+ } catch (error) {
+ const error_ = error instanceof FetchBaseError ? error : new FetchError(`Invalid response body while trying to fetch ${data.url}: ${error.message}`, 'system', error);
+ throw error_;
+ }
+
+ if (body.readableEnded === true || body._readableState.ended === true) {
+ try {
+ if (accum.every(c => typeof c === 'string')) {
+ return Buffer.from(accum.join(''));
+ }
+
+ return Buffer.concat(accum, accumBytes);
+ } catch (error) {
+ throw new FetchError(`Could not create Buffer from response body for ${data.url}: ${error.message}`, 'system', error);
+ }
+ } else {
+ throw new FetchError(`Premature close of server response while trying to fetch ${data.url}`);
+ }
+}
+
+/**
+ * Clone body given Res/Req instance
+ *
+ * @param Mixed instance Response or Request instance
+ * @param String highWaterMark highWaterMark for both PassThrough body streams
+ * @return Mixed
+ */
+export const clone = (instance, highWaterMark) => {
+ let p1;
+ let p2;
+ let {body} = instance[INTERNALS];
+
+ // Don't allow cloning a used body
+ if (instance.bodyUsed) {
+ throw new Error('cannot clone body after it is used');
+ }
+
+ // Check that body is a stream and not form-data object
+ // note: we can't clone the form-data object without having it as a dependency
+ if ((body instanceof Stream) && (typeof body.getBoundary !== 'function')) {
+ // Tee instance body
+ p1 = new PassThrough({highWaterMark});
+ p2 = new PassThrough({highWaterMark});
+ body.pipe(p1);
+ body.pipe(p2);
+ // Set instance body to teed body and return the other teed body
+ instance[INTERNALS].stream = p1;
+ body = p2;
+ }
+
+ return body;
+};
+
+const getNonSpecFormDataBoundary = deprecate(
+ body => body.getBoundary(),
+ 'form-data doesn\'t follow the spec and requires special treatment. Use alternative package',
+ 'https://github.com/node-fetch/node-fetch/issues/1167'
+);
+
+/**
+ * Performs the operation "extract a `Content-Type` value from |object|" as
+ * specified in the specification:
+ * https://fetch.spec.whatwg.org/#concept-bodyinit-extract
+ *
+ * This function assumes that instance.body is present.
+ *
+ * @param {any} body Any options.body input
+ * @returns {string | null}
+ */
+export const extractContentType = (body, request) => {
+ // Body is null or undefined
+ if (body === null) {
+ return null;
+ }
+
+ // Body is string
+ if (typeof body === 'string') {
+ return 'text/plain;charset=UTF-8';
+ }
+
+ // Body is a URLSearchParams
+ if (isURLSearchParameters(body)) {
+ return 'application/x-www-form-urlencoded;charset=UTF-8';
+ }
+
+ // Body is blob
+ if (isBlob(body)) {
+ return body.type || null;
+ }
+
+ // Body is a Buffer (Buffer, ArrayBuffer or ArrayBufferView)
+ if (Buffer.isBuffer(body) || types.isAnyArrayBuffer(body) || ArrayBuffer.isView(body)) {
+ return null;
+ }
+
+ if (body instanceof FormData) {
+ return `multipart/form-data; boundary=${request[INTERNALS].boundary}`;
+ }
+
+ // Detect form data input from form-data module
+ if (body && typeof body.getBoundary === 'function') {
+ return `multipart/form-data;boundary=${getNonSpecFormDataBoundary(body)}`;
+ }
+
+ // Body is stream - can't really do much about this
+ if (body instanceof Stream) {
+ return null;
+ }
+
+ // Body constructor defaults other things to string
+ return 'text/plain;charset=UTF-8';
+};
+
+/**
+ * The Fetch Standard treats this as if "total bytes" is a property on the body.
+ * For us, we have to explicitly get it with a function.
+ *
+ * ref: https://fetch.spec.whatwg.org/#concept-body-total-bytes
+ *
+ * @param {any} obj.body Body object from the Body instance.
+ * @returns {number | null}
+ */
+export const getTotalBytes = request => {
+ const {body} = request[INTERNALS];
+
+ // Body is null or undefined
+ if (body === null) {
+ return 0;
+ }
+
+ // Body is Blob
+ if (isBlob(body)) {
+ return body.size;
+ }
+
+ // Body is Buffer
+ if (Buffer.isBuffer(body)) {
+ return body.length;
+ }
+
+ // Detect form data input from form-data module
+ if (body && typeof body.getLengthSync === 'function') {
+ return body.hasKnownLength && body.hasKnownLength() ? body.getLengthSync() : null;
+ }
+
+ // Body is stream
+ return null;
+};
+
+/**
+ * Write a Body to a Node.js WritableStream (e.g. http.Request) object.
+ *
+ * @param {Stream.Writable} dest The stream to write to.
+ * @param obj.body Body object from the Body instance.
+ * @returns {Promise<void>}
+ */
+export const writeToStream = async (dest, {body}) => {
+ if (body === null) {
+ // Body is null
+ dest.end();
+ } else {
+ // Body is stream
+ await pipeline(body, dest);
+ }
+};
diff --git a/node_modules/node-fetch/src/errors/abort-error.js b/node_modules/node-fetch/src/errors/abort-error.js
new file mode 100644
index 00000000..0b62f1cd
--- /dev/null
+++ b/node_modules/node-fetch/src/errors/abort-error.js
@@ -0,0 +1,10 @@
+import {FetchBaseError} from './base.js';
+
+/**
+ * AbortError interface for cancelled requests
+ */
+export class AbortError extends FetchBaseError {
+ constructor(message, type = 'aborted') {
+ super(message, type);
+ }
+}
diff --git a/node_modules/node-fetch/src/errors/base.js b/node_modules/node-fetch/src/errors/base.js
new file mode 100644
index 00000000..4e66e1bf
--- /dev/null
+++ b/node_modules/node-fetch/src/errors/base.js
@@ -0,0 +1,17 @@
+export class FetchBaseError extends Error {
+ constructor(message, type) {
+ super(message);
+ // Hide custom error implementation details from end-users
+ Error.captureStackTrace(this, this.constructor);
+
+ this.type = type;
+ }
+
+ get name() {
+ return this.constructor.name;
+ }
+
+ get [Symbol.toStringTag]() {
+ return this.constructor.name;
+ }
+}
diff --git a/node_modules/node-fetch/src/errors/fetch-error.js b/node_modules/node-fetch/src/errors/fetch-error.js
new file mode 100644
index 00000000..f7ae5cc4
--- /dev/null
+++ b/node_modules/node-fetch/src/errors/fetch-error.js
@@ -0,0 +1,26 @@
+
+import {FetchBaseError} from './base.js';
+
+/**
+ * @typedef {{ address?: string, code: string, dest?: string, errno: number, info?: object, message: string, path?: string, port?: number, syscall: string}} SystemError
+*/
+
+/**
+ * FetchError interface for operational errors
+ */
+export class FetchError extends FetchBaseError {
+ /**
+ * @param {string} message - Error message for human
+ * @param {string} [type] - Error type for machine
+ * @param {SystemError} [systemError] - For Node.js system error
+ */
+ constructor(message, type, systemError) {
+ super(message, type);
+ // When err.type is `system`, err.erroredSysCall contains system error and err.code contains system error code
+ if (systemError) {
+ // eslint-disable-next-line no-multi-assign
+ this.code = this.errno = systemError.code;
+ this.erroredSysCall = systemError.syscall;
+ }
+ }
+}
diff --git a/node_modules/node-fetch/src/headers.js b/node_modules/node-fetch/src/headers.js
new file mode 100644
index 00000000..cd694558
--- /dev/null
+++ b/node_modules/node-fetch/src/headers.js
@@ -0,0 +1,267 @@
+/**
+ * Headers.js
+ *
+ * Headers class offers convenient helpers
+ */
+
+import {types} from 'node:util';
+import http from 'node:http';
+
+/* c8 ignore next 9 */
+const validateHeaderName = typeof http.validateHeaderName === 'function' ?
+ http.validateHeaderName :
+ name => {
+ if (!/^[\^`\-\w!#$%&'*+.|~]+$/.test(name)) {
+ const error = new TypeError(`Header name must be a valid HTTP token [${name}]`);
+ Object.defineProperty(error, 'code', {value: 'ERR_INVALID_HTTP_TOKEN'});
+ throw error;
+ }
+ };
+
+/* c8 ignore next 9 */
+const validateHeaderValue = typeof http.validateHeaderValue === 'function' ?
+ http.validateHeaderValue :
+ (name, value) => {
+ if (/[^\t\u0020-\u007E\u0080-\u00FF]/.test(value)) {
+ const error = new TypeError(`Invalid character in header content ["${name}"]`);
+ Object.defineProperty(error, 'code', {value: 'ERR_INVALID_CHAR'});
+ throw error;
+ }
+ };
+
+/**
+ * @typedef {Headers | Record<string, string> | Iterable<readonly [string, string]> | Iterable<Iterable<string>>} HeadersInit
+ */
+
+/**
+ * This Fetch API interface allows you to perform various actions on HTTP request and response headers.
+ * These actions include retrieving, setting, adding to, and removing.
+ * A Headers object has an associated header list, which is initially empty and consists of zero or more name and value pairs.
+ * You can add to this using methods like append() (see Examples.)
+ * In all methods of this interface, header names are matched by case-insensitive byte sequence.
+ *
+ */
+export default class Headers extends URLSearchParams {
+ /**
+ * Headers class
+ *
+ * @constructor
+ * @param {HeadersInit} [init] - Response headers
+ */
+ constructor(init) {
+ // Validate and normalize init object in [name, value(s)][]
+ /** @type {string[][]} */
+ let result = [];
+ if (init instanceof Headers) {
+ const raw = init.raw();
+ for (const [name, values] of Object.entries(raw)) {
+ result.push(...values.map(value => [name, value]));
+ }
+ } else if (init == null) { // eslint-disable-line no-eq-null, eqeqeq
+ // No op
+ } else if (typeof init === 'object' && !types.isBoxedPrimitive(init)) {
+ const method = init[Symbol.iterator];
+ // eslint-disable-next-line no-eq-null, eqeqeq
+ if (method == null) {
+ // Record<ByteString, ByteString>
+ result.push(...Object.entries(init));
+ } else {
+ if (typeof method !== 'function') {
+ throw new TypeError('Header pairs must be iterable');
+ }
+
+ // Sequence<sequence<ByteString>>
+ // Note: per spec we have to first exhaust the lists then process them
+ result = [...init]
+ .map(pair => {
+ if (
+ typeof pair !== 'object' || types.isBoxedPrimitive(pair)
+ ) {
+ throw new TypeError('Each header pair must be an iterable object');
+ }
+
+ return [...pair];
+ }).map(pair => {
+ if (pair.length !== 2) {
+ throw new TypeError('Each header pair must be a name/value tuple');
+ }
+
+ return [...pair];
+ });
+ }
+ } else {
+ throw new TypeError('Failed to construct \'Headers\': The provided value is not of type \'(sequence<sequence<ByteString>> or record<ByteString, ByteString>)');
+ }
+
+ // Validate and lowercase
+ result =
+ result.length > 0 ?
+ result.map(([name, value]) => {
+ validateHeaderName(name);
+ validateHeaderValue(name, String(value));
+ return [String(name).toLowerCase(), String(value)];
+ }) :
+ undefined;
+
+ super(result);
+
+ // Returning a Proxy that will lowercase key names, validate parameters and sort keys
+ // eslint-disable-next-line no-constructor-return
+ return new Proxy(this, {
+ get(target, p, receiver) {
+ switch (p) {
+ case 'append':
+ case 'set':
+ return (name, value) => {
+ validateHeaderName(name);
+ validateHeaderValue(name, String(value));
+ return URLSearchParams.prototype[p].call(
+ target,
+ String(name).toLowerCase(),
+ String(value)
+ );
+ };
+
+ case 'delete':
+ case 'has':
+ case 'getAll':
+ return name => {
+ validateHeaderName(name);
+ return URLSearchParams.prototype[p].call(
+ target,
+ String(name).toLowerCase()
+ );
+ };
+
+ case 'keys':
+ return () => {
+ target.sort();
+ return new Set(URLSearchParams.prototype.keys.call(target)).keys();
+ };
+
+ default:
+ return Reflect.get(target, p, receiver);
+ }
+ }
+ });
+ /* c8 ignore next */
+ }
+
+ get [Symbol.toStringTag]() {
+ return this.constructor.name;
+ }
+
+ toString() {
+ return Object.prototype.toString.call(this);
+ }
+
+ get(name) {
+ const values = this.getAll(name);
+ if (values.length === 0) {
+ return null;
+ }
+
+ let value = values.join(', ');
+ if (/^content-encoding$/i.test(name)) {
+ value = value.toLowerCase();
+ }
+
+ return value;
+ }
+
+ forEach(callback, thisArg = undefined) {
+ for (const name of this.keys()) {
+ Reflect.apply(callback, thisArg, [this.get(name), name, this]);
+ }
+ }
+
+ * values() {
+ for (const name of this.keys()) {
+ yield this.get(name);
+ }
+ }
+
+ /**
+ * @type {() => IterableIterator<[string, string]>}
+ */
+ * entries() {
+ for (const name of this.keys()) {
+ yield [name, this.get(name)];
+ }
+ }
+
+ [Symbol.iterator]() {
+ return this.entries();
+ }
+
+ /**
+ * Node-fetch non-spec method
+ * returning all headers and their values as array
+ * @returns {Record<string, string[]>}
+ */
+ raw() {
+ return [...this.keys()].reduce((result, key) => {
+ result[key] = this.getAll(key);
+ return result;
+ }, {});
+ }
+
+ /**
+ * For better console.log(headers) and also to convert Headers into Node.js Request compatible format
+ */
+ [Symbol.for('nodejs.util.inspect.custom')]() {
+ return [...this.keys()].reduce((result, key) => {
+ const values = this.getAll(key);
+ // Http.request() only supports string as Host header.
+ // This hack makes specifying custom Host header possible.
+ if (key === 'host') {
+ result[key] = values[0];
+ } else {
+ result[key] = values.length > 1 ? values : values[0];
+ }
+
+ return result;
+ }, {});
+ }
+}
+
+/**
+ * Re-shaping object for Web IDL tests
+ * Only need to do it for overridden methods
+ */
+Object.defineProperties(
+ Headers.prototype,
+ ['get', 'entries', 'forEach', 'values'].reduce((result, property) => {
+ result[property] = {enumerable: true};
+ return result;
+ }, {})
+);
+
+/**
+ * Create a Headers object from an http.IncomingMessage.rawHeaders, ignoring those that do
+ * not conform to HTTP grammar productions.
+ * @param {import('http').IncomingMessage['rawHeaders']} headers
+ */
+export function fromRawHeaders(headers = []) {
+ return new Headers(
+ headers
+ // Split into pairs
+ .reduce((result, value, index, array) => {
+ if (index % 2 === 0) {
+ result.push(array.slice(index, index + 2));
+ }
+
+ return result;
+ }, [])
+ .filter(([name, value]) => {
+ try {
+ validateHeaderName(name);
+ validateHeaderValue(name, String(value));
+ return true;
+ } catch {
+ return false;
+ }
+ })
+
+ );
+}
diff --git a/node_modules/node-fetch/src/index.js b/node_modules/node-fetch/src/index.js
new file mode 100644
index 00000000..7c4aee87
--- /dev/null
+++ b/node_modules/node-fetch/src/index.js
@@ -0,0 +1,417 @@
+/**
+ * Index.js
+ *
+ * a request API compatible with window.fetch
+ *
+ * All spec algorithm step numbers are based on https://fetch.spec.whatwg.org/commit-snapshots/ae716822cb3a61843226cd090eefc6589446c1d2/.
+ */
+
+import http from 'node:http';
+import https from 'node:https';
+import zlib from 'node:zlib';
+import Stream, {PassThrough, pipeline as pump} from 'node:stream';
+import {Buffer} from 'node:buffer';
+
+import dataUriToBuffer from 'data-uri-to-buffer';
+
+import {writeToStream, clone} from './body.js';
+import Response from './response.js';
+import Headers, {fromRawHeaders} from './headers.js';
+import Request, {getNodeRequestOptions} from './request.js';
+import {FetchError} from './errors/fetch-error.js';
+import {AbortError} from './errors/abort-error.js';
+import {isRedirect} from './utils/is-redirect.js';
+import {FormData} from 'formdata-polyfill/esm.min.js';
+import {isDomainOrSubdomain, isSameProtocol} from './utils/is.js';
+import {parseReferrerPolicyFromHeader} from './utils/referrer.js';
+import {
+ Blob,
+ File,
+ fileFromSync,
+ fileFrom,
+ blobFromSync,
+ blobFrom
+} from 'fetch-blob/from.js';
+
+export {FormData, Headers, Request, Response, FetchError, AbortError, isRedirect};
+export {Blob, File, fileFromSync, fileFrom, blobFromSync, blobFrom};
+
+const supportedSchemas = new Set(['data:', 'http:', 'https:']);
+
+/**
+ * Fetch function
+ *
+ * @param {string | URL | import('./request').default} url - Absolute url or Request instance
+ * @param {*} [options_] - Fetch options
+ * @return {Promise<import('./response').default>}
+ */
+export default async function fetch(url, options_) {
+ return new Promise((resolve, reject) => {
+ // Build request object
+ const request = new Request(url, options_);
+ const {parsedURL, options} = getNodeRequestOptions(request);
+ if (!supportedSchemas.has(parsedURL.protocol)) {
+ throw new TypeError(`node-fetch cannot load ${url}. URL scheme "${parsedURL.protocol.replace(/:$/, '')}" is not supported.`);
+ }
+
+ if (parsedURL.protocol === 'data:') {
+ const data = dataUriToBuffer(request.url);
+ const response = new Response(data, {headers: {'Content-Type': data.typeFull}});
+ resolve(response);
+ return;
+ }
+
+ // Wrap http.request into fetch
+ const send = (parsedURL.protocol === 'https:' ? https : http).request;
+ const {signal} = request;
+ let response = null;
+
+ const abort = () => {
+ const error = new AbortError('The operation was aborted.');
+ reject(error);
+ if (request.body && request.body instanceof Stream.Readable) {
+ request.body.destroy(error);
+ }
+
+ if (!response || !response.body) {
+ return;
+ }
+
+ response.body.emit('error', error);
+ };
+
+ if (signal && signal.aborted) {
+ abort();
+ return;
+ }
+
+ const abortAndFinalize = () => {
+ abort();
+ finalize();
+ };
+
+ // Send request
+ const request_ = send(parsedURL.toString(), options);
+
+ if (signal) {
+ signal.addEventListener('abort', abortAndFinalize);
+ }
+
+ const finalize = () => {
+ request_.abort();
+ if (signal) {
+ signal.removeEventListener('abort', abortAndFinalize);
+ }
+ };
+
+ request_.on('error', error => {
+ reject(new FetchError(`request to ${request.url} failed, reason: ${error.message}`, 'system', error));
+ finalize();
+ });
+
+ fixResponseChunkedTransferBadEnding(request_, error => {
+ if (response && response.body) {
+ response.body.destroy(error);
+ }
+ });
+
+ /* c8 ignore next 18 */
+ if (process.version < 'v14') {
+ // Before Node.js 14, pipeline() does not fully support async iterators and does not always
+ // properly handle when the socket close/end events are out of order.
+ request_.on('socket', s => {
+ let endedWithEventsCount;
+ s.prependListener('end', () => {
+ endedWithEventsCount = s._eventsCount;
+ });
+ s.prependListener('close', hadError => {
+ // if end happened before close but the socket didn't emit an error, do it now
+ if (response && endedWithEventsCount < s._eventsCount && !hadError) {
+ const error = new Error('Premature close');
+ error.code = 'ERR_STREAM_PREMATURE_CLOSE';
+ response.body.emit('error', error);
+ }
+ });
+ });
+ }
+
+ request_.on('response', response_ => {
+ request_.setTimeout(0);
+ const headers = fromRawHeaders(response_.rawHeaders);
+
+ // HTTP fetch step 5
+ if (isRedirect(response_.statusCode)) {
+ // HTTP fetch step 5.2
+ const location = headers.get('Location');
+
+ // HTTP fetch step 5.3
+ let locationURL = null;
+ try {
+ locationURL = location === null ? null : new URL(location, request.url);
+ } catch {
+ // error here can only be invalid URL in Location: header
+ // do not throw when options.redirect == manual
+ // let the user extract the errorneous redirect URL
+ if (request.redirect !== 'manual') {
+ reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect'));
+ finalize();
+ return;
+ }
+ }
+
+ // HTTP fetch step 5.5
+ switch (request.redirect) {
+ case 'error':
+ reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect'));
+ finalize();
+ return;
+ case 'manual':
+ // Nothing to do
+ break;
+ case 'follow': {
+ // HTTP-redirect fetch step 2
+ if (locationURL === null) {
+ break;
+ }
+
+ // HTTP-redirect fetch step 5
+ if (request.counter >= request.follow) {
+ reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect'));
+ finalize();
+ return;
+ }
+
+ // HTTP-redirect fetch step 6 (counter increment)
+ // Create a new Request object.
+ const requestOptions = {
+ headers: new Headers(request.headers),
+ follow: request.follow,
+ counter: request.counter + 1,
+ agent: request.agent,
+ compress: request.compress,
+ method: request.method,
+ body: clone(request),
+ signal: request.signal,
+ size: request.size,
+ referrer: request.referrer,
+ referrerPolicy: request.referrerPolicy
+ };
+
+ // when forwarding sensitive headers like "Authorization",
+ // "WWW-Authenticate", and "Cookie" to untrusted targets,
+ // headers will be ignored when following a redirect to a domain
+ // that is not a subdomain match or exact match of the initial domain.
+ // For example, a redirect from "foo.com" to either "foo.com" or "sub.foo.com"
+ // will forward the sensitive headers, but a redirect to "bar.com" will not.
+ // headers will also be ignored when following a redirect to a domain using
+ // a different protocol. For example, a redirect from "https://foo.com" to "http://foo.com"
+ // will not forward the sensitive headers
+ if (!isDomainOrSubdomain(request.url, locationURL) || !isSameProtocol(request.url, locationURL)) {
+ for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) {
+ requestOptions.headers.delete(name);
+ }
+ }
+
+ // HTTP-redirect fetch step 9
+ if (response_.statusCode !== 303 && request.body && options_.body instanceof Stream.Readable) {
+ reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect'));
+ finalize();
+ return;
+ }
+
+ // HTTP-redirect fetch step 11
+ if (response_.statusCode === 303 || ((response_.statusCode === 301 || response_.statusCode === 302) && request.method === 'POST')) {
+ requestOptions.method = 'GET';
+ requestOptions.body = undefined;
+ requestOptions.headers.delete('content-length');
+ }
+
+ // HTTP-redirect fetch step 14
+ const responseReferrerPolicy = parseReferrerPolicyFromHeader(headers);
+ if (responseReferrerPolicy) {
+ requestOptions.referrerPolicy = responseReferrerPolicy;
+ }
+
+ // HTTP-redirect fetch step 15
+ resolve(fetch(new Request(locationURL, requestOptions)));
+ finalize();
+ return;
+ }
+
+ default:
+ return reject(new TypeError(`Redirect option '${request.redirect}' is not a valid value of RequestRedirect`));
+ }
+ }
+
+ // Prepare response
+ if (signal) {
+ response_.once('end', () => {
+ signal.removeEventListener('abort', abortAndFinalize);
+ });
+ }
+
+ let body = pump(response_, new PassThrough(), error => {
+ if (error) {
+ reject(error);
+ }
+ });
+ // see https://github.com/nodejs/node/pull/29376
+ /* c8 ignore next 3 */
+ if (process.version < 'v12.10') {
+ response_.on('aborted', abortAndFinalize);
+ }
+
+ const responseOptions = {
+ url: request.url,
+ status: response_.statusCode,
+ statusText: response_.statusMessage,
+ headers,
+ size: request.size,
+ counter: request.counter,
+ highWaterMark: request.highWaterMark
+ };
+
+ // HTTP-network fetch step 12.1.1.3
+ const codings = headers.get('Content-Encoding');
+
+ // HTTP-network fetch step 12.1.1.4: handle content codings
+
+ // in following scenarios we ignore compression support
+ // 1. compression support is disabled
+ // 2. HEAD request
+ // 3. no Content-Encoding header
+ // 4. no content response (204)
+ // 5. content not modified response (304)
+ if (!request.compress || request.method === 'HEAD' || codings === null || response_.statusCode === 204 || response_.statusCode === 304) {
+ response = new Response(body, responseOptions);
+ resolve(response);
+ return;
+ }
+
+ // For Node v6+
+ // Be less strict when decoding compressed responses, since sometimes
+ // servers send slightly invalid responses that are still accepted
+ // by common browsers.
+ // Always using Z_SYNC_FLUSH is what cURL does.
+ const zlibOptions = {
+ flush: zlib.Z_SYNC_FLUSH,
+ finishFlush: zlib.Z_SYNC_FLUSH
+ };
+
+ // For gzip
+ if (codings === 'gzip' || codings === 'x-gzip') {
+ body = pump(body, zlib.createGunzip(zlibOptions), error => {
+ if (error) {
+ reject(error);
+ }
+ });
+ response = new Response(body, responseOptions);
+ resolve(response);
+ return;
+ }
+
+ // For deflate
+ if (codings === 'deflate' || codings === 'x-deflate') {
+ // Handle the infamous raw deflate response from old servers
+ // a hack for old IIS and Apache servers
+ const raw = pump(response_, new PassThrough(), error => {
+ if (error) {
+ reject(error);
+ }
+ });
+ raw.once('data', chunk => {
+ // See http://stackoverflow.com/questions/37519828
+ if ((chunk[0] & 0x0F) === 0x08) {
+ body = pump(body, zlib.createInflate(), error => {
+ if (error) {
+ reject(error);
+ }
+ });
+ } else {
+ body = pump(body, zlib.createInflateRaw(), error => {
+ if (error) {
+ reject(error);
+ }
+ });
+ }
+
+ response = new Response(body, responseOptions);
+ resolve(response);
+ });
+ raw.once('end', () => {
+ // Some old IIS servers return zero-length OK deflate responses, so
+ // 'data' is never emitted. See https://github.com/node-fetch/node-fetch/pull/903
+ if (!response) {
+ response = new Response(body, responseOptions);
+ resolve(response);
+ }
+ });
+ return;
+ }
+
+ // For br
+ if (codings === 'br') {
+ body = pump(body, zlib.createBrotliDecompress(), error => {
+ if (error) {
+ reject(error);
+ }
+ });
+ response = new Response(body, responseOptions);
+ resolve(response);
+ return;
+ }
+
+ // Otherwise, use response as-is
+ response = new Response(body, responseOptions);
+ resolve(response);
+ });
+
+ // eslint-disable-next-line promise/prefer-await-to-then
+ writeToStream(request_, request).catch(reject);
+ });
+}
+
+function fixResponseChunkedTransferBadEnding(request, errorCallback) {
+ const LAST_CHUNK = Buffer.from('0\r\n\r\n');
+
+ let isChunkedTransfer = false;
+ let properLastChunkReceived = false;
+ let previousChunk;
+
+ request.on('response', response => {
+ const {headers} = response;
+ isChunkedTransfer = headers['transfer-encoding'] === 'chunked' && !headers['content-length'];
+ });
+
+ request.on('socket', socket => {
+ const onSocketClose = () => {
+ if (isChunkedTransfer && !properLastChunkReceived) {
+ const error = new Error('Premature close');
+ error.code = 'ERR_STREAM_PREMATURE_CLOSE';
+ errorCallback(error);
+ }
+ };
+
+ const onData = buf => {
+ properLastChunkReceived = Buffer.compare(buf.slice(-5), LAST_CHUNK) === 0;
+
+ // Sometimes final 0-length chunk and end of message code are in separate packets
+ if (!properLastChunkReceived && previousChunk) {
+ properLastChunkReceived = (
+ Buffer.compare(previousChunk.slice(-3), LAST_CHUNK.slice(0, 3)) === 0 &&
+ Buffer.compare(buf.slice(-2), LAST_CHUNK.slice(3)) === 0
+ );
+ }
+
+ previousChunk = buf;
+ };
+
+ socket.prependListener('close', onSocketClose);
+ socket.on('data', onData);
+
+ request.on('close', () => {
+ socket.removeListener('close', onSocketClose);
+ socket.removeListener('data', onData);
+ });
+ });
+}
diff --git a/node_modules/node-fetch/src/request.js b/node_modules/node-fetch/src/request.js
new file mode 100644
index 00000000..af2ebc8e
--- /dev/null
+++ b/node_modules/node-fetch/src/request.js
@@ -0,0 +1,313 @@
+/**
+ * Request.js
+ *
+ * Request class contains server only options
+ *
+ * All spec algorithm step numbers are based on https://fetch.spec.whatwg.org/commit-snapshots/ae716822cb3a61843226cd090eefc6589446c1d2/.
+ */
+
+import {format as formatUrl} from 'node:url';
+import {deprecate} from 'node:util';
+import Headers from './headers.js';
+import Body, {clone, extractContentType, getTotalBytes} from './body.js';
+import {isAbortSignal} from './utils/is.js';
+import {getSearch} from './utils/get-search.js';
+import {
+ validateReferrerPolicy, determineRequestsReferrer, DEFAULT_REFERRER_POLICY
+} from './utils/referrer.js';
+
+const INTERNALS = Symbol('Request internals');
+
+/**
+ * Check if `obj` is an instance of Request.
+ *
+ * @param {*} object
+ * @return {boolean}
+ */
+const isRequest = object => {
+ return (
+ typeof object === 'object' &&
+ typeof object[INTERNALS] === 'object'
+ );
+};
+
+const doBadDataWarn = deprecate(() => {},
+ '.data is not a valid RequestInit property, use .body instead',
+ 'https://github.com/node-fetch/node-fetch/issues/1000 (request)');
+
+/**
+ * Request class
+ *
+ * Ref: https://fetch.spec.whatwg.org/#request-class
+ *
+ * @param Mixed input Url or Request instance
+ * @param Object init Custom options
+ * @return Void
+ */
+export default class Request extends Body {
+ constructor(input, init = {}) {
+ let parsedURL;
+
+ // Normalize input and force URL to be encoded as UTF-8 (https://github.com/node-fetch/node-fetch/issues/245)
+ if (isRequest(input)) {
+ parsedURL = new URL(input.url);
+ } else {
+ parsedURL = new URL(input);
+ input = {};
+ }
+
+ if (parsedURL.username !== '' || parsedURL.password !== '') {
+ throw new TypeError(`${parsedURL} is an url with embedded credentials.`);
+ }
+
+ let method = init.method || input.method || 'GET';
+ if (/^(delete|get|head|options|post|put)$/i.test(method)) {
+ method = method.toUpperCase();
+ }
+
+ if (!isRequest(init) && 'data' in init) {
+ doBadDataWarn();
+ }
+
+ // eslint-disable-next-line no-eq-null, eqeqeq
+ if ((init.body != null || (isRequest(input) && input.body !== null)) &&
+ (method === 'GET' || method === 'HEAD')) {
+ throw new TypeError('Request with GET/HEAD method cannot have body');
+ }
+
+ const inputBody = init.body ?
+ init.body :
+ (isRequest(input) && input.body !== null ?
+ clone(input) :
+ null);
+
+ super(inputBody, {
+ size: init.size || input.size || 0
+ });
+
+ const headers = new Headers(init.headers || input.headers || {});
+
+ if (inputBody !== null && !headers.has('Content-Type')) {
+ const contentType = extractContentType(inputBody, this);
+ if (contentType) {
+ headers.set('Content-Type', contentType);
+ }
+ }
+
+ let signal = isRequest(input) ?
+ input.signal :
+ null;
+ if ('signal' in init) {
+ signal = init.signal;
+ }
+
+ // eslint-disable-next-line no-eq-null, eqeqeq
+ if (signal != null && !isAbortSignal(signal)) {
+ throw new TypeError('Expected signal to be an instanceof AbortSignal or EventTarget');
+ }
+
+ // §5.4, Request constructor steps, step 15.1
+ // eslint-disable-next-line no-eq-null, eqeqeq
+ let referrer = init.referrer == null ? input.referrer : init.referrer;
+ if (referrer === '') {
+ // §5.4, Request constructor steps, step 15.2
+ referrer = 'no-referrer';
+ } else if (referrer) {
+ // §5.4, Request constructor steps, step 15.3.1, 15.3.2
+ const parsedReferrer = new URL(referrer);
+ // §5.4, Request constructor steps, step 15.3.3, 15.3.4
+ referrer = /^about:(\/\/)?client$/.test(parsedReferrer) ? 'client' : parsedReferrer;
+ } else {
+ referrer = undefined;
+ }
+
+ this[INTERNALS] = {
+ method,
+ redirect: init.redirect || input.redirect || 'follow',
+ headers,
+ parsedURL,
+ signal,
+ referrer
+ };
+
+ // Node-fetch-only options
+ this.follow = init.follow === undefined ? (input.follow === undefined ? 20 : input.follow) : init.follow;
+ this.compress = init.compress === undefined ? (input.compress === undefined ? true : input.compress) : init.compress;
+ this.counter = init.counter || input.counter || 0;
+ this.agent = init.agent || input.agent;
+ this.highWaterMark = init.highWaterMark || input.highWaterMark || 16384;
+ this.insecureHTTPParser = init.insecureHTTPParser || input.insecureHTTPParser || false;
+
+ // §5.4, Request constructor steps, step 16.
+ // Default is empty string per https://fetch.spec.whatwg.org/#concept-request-referrer-policy
+ this.referrerPolicy = init.referrerPolicy || input.referrerPolicy || '';
+ }
+
+ /** @returns {string} */
+ get method() {
+ return this[INTERNALS].method;
+ }
+
+ /** @returns {string} */
+ get url() {
+ return formatUrl(this[INTERNALS].parsedURL);
+ }
+
+ /** @returns {Headers} */
+ get headers() {
+ return this[INTERNALS].headers;
+ }
+
+ get redirect() {
+ return this[INTERNALS].redirect;
+ }
+
+ /** @returns {AbortSignal} */
+ get signal() {
+ return this[INTERNALS].signal;
+ }
+
+ // https://fetch.spec.whatwg.org/#dom-request-referrer
+ get referrer() {
+ if (this[INTERNALS].referrer === 'no-referrer') {
+ return '';
+ }
+
+ if (this[INTERNALS].referrer === 'client') {
+ return 'about:client';
+ }
+
+ if (this[INTERNALS].referrer) {
+ return this[INTERNALS].referrer.toString();
+ }
+
+ return undefined;
+ }
+
+ get referrerPolicy() {
+ return this[INTERNALS].referrerPolicy;
+ }
+
+ set referrerPolicy(referrerPolicy) {
+ this[INTERNALS].referrerPolicy = validateReferrerPolicy(referrerPolicy);
+ }
+
+ /**
+ * Clone this request
+ *
+ * @return Request
+ */
+ clone() {
+ return new Request(this);
+ }
+
+ get [Symbol.toStringTag]() {
+ return 'Request';
+ }
+}
+
+Object.defineProperties(Request.prototype, {
+ method: {enumerable: true},
+ url: {enumerable: true},
+ headers: {enumerable: true},
+ redirect: {enumerable: true},
+ clone: {enumerable: true},
+ signal: {enumerable: true},
+ referrer: {enumerable: true},
+ referrerPolicy: {enumerable: true}
+});
+
+/**
+ * Convert a Request to Node.js http request options.
+ *
+ * @param {Request} request - A Request instance
+ * @return The options object to be passed to http.request
+ */
+export const getNodeRequestOptions = request => {
+ const {parsedURL} = request[INTERNALS];
+ const headers = new Headers(request[INTERNALS].headers);
+
+ // Fetch step 1.3
+ if (!headers.has('Accept')) {
+ headers.set('Accept', '*/*');
+ }
+
+ // HTTP-network-or-cache fetch steps 2.4-2.7
+ let contentLengthValue = null;
+ if (request.body === null && /^(post|put)$/i.test(request.method)) {
+ contentLengthValue = '0';
+ }
+
+ if (request.body !== null) {
+ const totalBytes = getTotalBytes(request);
+ // Set Content-Length if totalBytes is a number (that is not NaN)
+ if (typeof totalBytes === 'number' && !Number.isNaN(totalBytes)) {
+ contentLengthValue = String(totalBytes);
+ }
+ }
+
+ if (contentLengthValue) {
+ headers.set('Content-Length', contentLengthValue);
+ }
+
+ // 4.1. Main fetch, step 2.6
+ // > If request's referrer policy is the empty string, then set request's referrer policy to the
+ // > default referrer policy.
+ if (request.referrerPolicy === '') {
+ request.referrerPolicy = DEFAULT_REFERRER_POLICY;
+ }
+
+ // 4.1. Main fetch, step 2.7
+ // > If request's referrer is not "no-referrer", set request's referrer to the result of invoking
+ // > determine request's referrer.
+ if (request.referrer && request.referrer !== 'no-referrer') {
+ request[INTERNALS].referrer = determineRequestsReferrer(request);
+ } else {
+ request[INTERNALS].referrer = 'no-referrer';
+ }
+
+ // 4.5. HTTP-network-or-cache fetch, step 6.9
+ // > If httpRequest's referrer is a URL, then append `Referer`/httpRequest's referrer, serialized
+ // > and isomorphic encoded, to httpRequest's header list.
+ if (request[INTERNALS].referrer instanceof URL) {
+ headers.set('Referer', request.referrer);
+ }
+
+ // HTTP-network-or-cache fetch step 2.11
+ if (!headers.has('User-Agent')) {
+ headers.set('User-Agent', 'node-fetch');
+ }
+
+ // HTTP-network-or-cache fetch step 2.15
+ if (request.compress && !headers.has('Accept-Encoding')) {
+ headers.set('Accept-Encoding', 'gzip, deflate, br');
+ }
+
+ let {agent} = request;
+ if (typeof agent === 'function') {
+ agent = agent(parsedURL);
+ }
+
+ // HTTP-network fetch step 4.2
+ // chunked encoding is handled by Node.js
+
+ const search = getSearch(parsedURL);
+
+ // Pass the full URL directly to request(), but overwrite the following
+ // options:
+ const options = {
+ // Overwrite search to retain trailing ? (issue #776)
+ path: parsedURL.pathname + search,
+ // The following options are not expressed in the URL
+ method: request.method,
+ headers: headers[Symbol.for('nodejs.util.inspect.custom')](),
+ insecureHTTPParser: request.insecureHTTPParser,
+ agent
+ };
+
+ return {
+ /** @type {URL} */
+ parsedURL,
+ options
+ };
+};
diff --git a/node_modules/node-fetch/src/response.js b/node_modules/node-fetch/src/response.js
new file mode 100644
index 00000000..9806c0cb
--- /dev/null
+++ b/node_modules/node-fetch/src/response.js
@@ -0,0 +1,160 @@
+/**
+ * Response.js
+ *
+ * Response class provides content decoding
+ */
+
+import Headers from './headers.js';
+import Body, {clone, extractContentType} from './body.js';
+import {isRedirect} from './utils/is-redirect.js';
+
+const INTERNALS = Symbol('Response internals');
+
+/**
+ * Response class
+ *
+ * Ref: https://fetch.spec.whatwg.org/#response-class
+ *
+ * @param Stream body Readable stream
+ * @param Object opts Response options
+ * @return Void
+ */
+export default class Response extends Body {
+ constructor(body = null, options = {}) {
+ super(body, options);
+
+ // eslint-disable-next-line no-eq-null, eqeqeq, no-negated-condition
+ const status = options.status != null ? options.status : 200;
+
+ const headers = new Headers(options.headers);
+
+ if (body !== null && !headers.has('Content-Type')) {
+ const contentType = extractContentType(body, this);
+ if (contentType) {
+ headers.append('Content-Type', contentType);
+ }
+ }
+
+ this[INTERNALS] = {
+ type: 'default',
+ url: options.url,
+ status,
+ statusText: options.statusText || '',
+ headers,
+ counter: options.counter,
+ highWaterMark: options.highWaterMark
+ };
+ }
+
+ get type() {
+ return this[INTERNALS].type;
+ }
+
+ get url() {
+ return this[INTERNALS].url || '';
+ }
+
+ get status() {
+ return this[INTERNALS].status;
+ }
+
+ /**
+ * Convenience property representing if the request ended normally
+ */
+ get ok() {
+ return this[INTERNALS].status >= 200 && this[INTERNALS].status < 300;
+ }
+
+ get redirected() {
+ return this[INTERNALS].counter > 0;
+ }
+
+ get statusText() {
+ return this[INTERNALS].statusText;
+ }
+
+ get headers() {
+ return this[INTERNALS].headers;
+ }
+
+ get highWaterMark() {
+ return this[INTERNALS].highWaterMark;
+ }
+
+ /**
+ * Clone this response
+ *
+ * @return Response
+ */
+ clone() {
+ return new Response(clone(this, this.highWaterMark), {
+ type: this.type,
+ url: this.url,
+ status: this.status,
+ statusText: this.statusText,
+ headers: this.headers,
+ ok: this.ok,
+ redirected: this.redirected,
+ size: this.size,
+ highWaterMark: this.highWaterMark
+ });
+ }
+
+ /**
+ * @param {string} url The URL that the new response is to originate from.
+ * @param {number} status An optional status code for the response (e.g., 302.)
+ * @returns {Response} A Response object.
+ */
+ static redirect(url, status = 302) {
+ if (!isRedirect(status)) {
+ throw new RangeError('Failed to execute "redirect" on "response": Invalid status code');
+ }
+
+ return new Response(null, {
+ headers: {
+ location: new URL(url).toString()
+ },
+ status
+ });
+ }
+
+ static error() {
+ const response = new Response(null, {status: 0, statusText: ''});
+ response[INTERNALS].type = 'error';
+ return response;
+ }
+
+ static json(data = undefined, init = {}) {
+ const body = JSON.stringify(data);
+
+ if (body === undefined) {
+ throw new TypeError('data is not JSON serializable');
+ }
+
+ const headers = new Headers(init && init.headers);
+
+ if (!headers.has('content-type')) {
+ headers.set('content-type', 'application/json');
+ }
+
+ return new Response(body, {
+ ...init,
+ headers
+ });
+ }
+
+ get [Symbol.toStringTag]() {
+ return 'Response';
+ }
+}
+
+Object.defineProperties(Response.prototype, {
+ type: {enumerable: true},
+ url: {enumerable: true},
+ status: {enumerable: true},
+ ok: {enumerable: true},
+ redirected: {enumerable: true},
+ statusText: {enumerable: true},
+ headers: {enumerable: true},
+ clone: {enumerable: true}
+});
diff --git a/node_modules/node-fetch/src/utils/get-search.js b/node_modules/node-fetch/src/utils/get-search.js
new file mode 100644
index 00000000..d067e7c7
--- /dev/null
+++ b/node_modules/node-fetch/src/utils/get-search.js
@@ -0,0 +1,9 @@
+export const getSearch = parsedURL => {
+ if (parsedURL.search) {
+ return parsedURL.search;
+ }
+
+ const lastOffset = parsedURL.href.length - 1;
+ const hash = parsedURL.hash || (parsedURL.href[lastOffset] === '#' ? '#' : '');
+ return parsedURL.href[lastOffset - hash.length] === '?' ? '?' : '';
+};
diff --git a/node_modules/node-fetch/src/utils/is-redirect.js b/node_modules/node-fetch/src/utils/is-redirect.js
new file mode 100644
index 00000000..d1347f00
--- /dev/null
+++ b/node_modules/node-fetch/src/utils/is-redirect.js
@@ -0,0 +1,11 @@
+const redirectStatus = new Set([301, 302, 303, 307, 308]);
+
+/**
+ * Redirect code matching
+ *
+ * @param {number} code - Status code
+ * @return {boolean}
+ */
+export const isRedirect = code => {
+ return redirectStatus.has(code);
+};
diff --git a/node_modules/node-fetch/src/utils/is.js b/node_modules/node-fetch/src/utils/is.js
new file mode 100644
index 00000000..f9e467e4
--- /dev/null
+++ b/node_modules/node-fetch/src/utils/is.js
@@ -0,0 +1,87 @@
+/**
+ * Is.js
+ *
+ * Object type checks.
+ */
+
+const NAME = Symbol.toStringTag;
+
+/**
+ * Check if `obj` is a URLSearchParams object
+ * ref: https://github.com/node-fetch/node-fetch/issues/296#issuecomment-307598143
+ * @param {*} object - Object to check for
+ * @return {boolean}
+ */
+export const isURLSearchParameters = object => {
+ return (
+ typeof object === 'object' &&
+ typeof object.append === 'function' &&
+ typeof object.delete === 'function' &&
+ typeof object.get === 'function' &&
+ typeof object.getAll === 'function' &&
+ typeof object.has === 'function' &&
+ typeof object.set === 'function' &&
+ typeof object.sort === 'function' &&
+ object[NAME] === 'URLSearchParams'
+ );
+};
+
+/**
+ * Check if `object` is a W3C `Blob` object (which `File` inherits from)
+ * @param {*} object - Object to check for
+ * @return {boolean}
+ */
+export const isBlob = object => {
+ return (
+ object &&
+ typeof object === 'object' &&
+ typeof object.arrayBuffer === 'function' &&
+ typeof object.type === 'string' &&
+ typeof object.stream === 'function' &&
+ typeof object.constructor === 'function' &&
+ /^(Blob|File)$/.test(object[NAME])
+ );
+};
+
+/**
+ * Check if `obj` is an instance of AbortSignal.
+ * @param {*} object - Object to check for
+ * @return {boolean}
+ */
+export const isAbortSignal = object => {
+ return (
+ typeof object === 'object' && (
+ object[NAME] === 'AbortSignal' ||
+ object[NAME] === 'EventTarget'
+ )
+ );
+};
+
+/**
+ * isDomainOrSubdomain reports whether sub is a subdomain (or exact match) of
+ * the parent domain.
+ *
+ * Both domains must already be in canonical form.
+ * @param {string|URL} original
+ * @param {string|URL} destination
+ */
+export const isDomainOrSubdomain = (destination, original) => {
+ const orig = new URL(original).hostname;
+ const dest = new URL(destination).hostname;
+
+ return orig === dest || orig.endsWith(`.${dest}`);
+};
+
+/**
+ * isSameProtocol reports whether the two provided URLs use the same protocol.
+ *
+ * Both domains must already be in canonical form.
+ * @param {string|URL} original
+ * @param {string|URL} destination
+ */
+export const isSameProtocol = (destination, original) => {
+ const orig = new URL(original).protocol;
+ const dest = new URL(destination).protocol;
+
+ return orig === dest;
+};
diff --git a/node_modules/node-fetch/src/utils/multipart-parser.js b/node_modules/node-fetch/src/utils/multipart-parser.js
new file mode 100644
index 00000000..5ad06f98
--- /dev/null
+++ b/node_modules/node-fetch/src/utils/multipart-parser.js
@@ -0,0 +1,432 @@
+import {File} from 'fetch-blob/from.js';
+import {FormData} from 'formdata-polyfill/esm.min.js';
+
+let s = 0;
+const S = {
+ START_BOUNDARY: s++,
+ HEADER_FIELD_START: s++,
+ HEADER_FIELD: s++,
+ HEADER_VALUE_START: s++,
+ HEADER_VALUE: s++,
+ HEADER_VALUE_ALMOST_DONE: s++,
+ HEADERS_ALMOST_DONE: s++,
+ PART_DATA_START: s++,
+ PART_DATA: s++,
+ END: s++
+};
+
+let f = 1;
+const F = {
+ PART_BOUNDARY: f,
+ LAST_BOUNDARY: f *= 2
+};
+
+const LF = 10;
+const CR = 13;
+const SPACE = 32;
+const HYPHEN = 45;
+const COLON = 58;
+const A = 97;
+const Z = 122;
+
+const lower = c => c | 0x20;
+
+const noop = () => {};
+
+class MultipartParser {
+ /**
+ * @param {string} boundary
+ */
+ constructor(boundary) {
+ this.index = 0;
+ this.flags = 0;
+
+ this.onHeaderEnd = noop;
+ this.onHeaderField = noop;
+ this.onHeadersEnd = noop;
+ this.onHeaderValue = noop;
+ this.onPartBegin = noop;
+ this.onPartData = noop;
+ this.onPartEnd = noop;
+
+ this.boundaryChars = {};
+
+ boundary = '\r\n--' + boundary;
+ const ui8a = new Uint8Array(boundary.length);
+ for (let i = 0; i < boundary.length; i++) {
+ ui8a[i] = boundary.charCodeAt(i);
+ this.boundaryChars[ui8a[i]] = true;
+ }
+
+ this.boundary = ui8a;
+ this.lookbehind = new Uint8Array(this.boundary.length + 8);
+ this.state = S.START_BOUNDARY;
+ }
+
+ /**
+ * @param {Uint8Array} data
+ */
+ write(data) {
+ let i = 0;
+ const length_ = data.length;
+ let previousIndex = this.index;
+ let {lookbehind, boundary, boundaryChars, index, state, flags} = this;
+ const boundaryLength = this.boundary.length;
+ const boundaryEnd = boundaryLength - 1;
+ const bufferLength = data.length;
+ let c;
+ let cl;
+
+ const mark = name => {
+ this[name + 'Mark'] = i;
+ };
+
+ const clear = name => {
+ delete this[name + 'Mark'];
+ };
+
+ const callback = (callbackSymbol, start, end, ui8a) => {
+ if (start === undefined || start !== end) {
+ this[callbackSymbol](ui8a && ui8a.subarray(start, end));
+ }
+ };
+
+ const dataCallback = (name, clear) => {
+ const markSymbol = name + 'Mark';
+ if (!(markSymbol in this)) {
+ return;
+ }
+
+ if (clear) {
+ callback(name, this[markSymbol], i, data);
+ delete this[markSymbol];
+ } else {
+ callback(name, this[markSymbol], data.length, data);
+ this[markSymbol] = 0;
+ }
+ };
+
+ for (i = 0; i < length_; i++) {
+ c = data[i];
+
+ switch (state) {
+ case S.START_BOUNDARY:
+ if (index === boundary.length - 2) {
+ if (c === HYPHEN) {
+ flags |= F.LAST_BOUNDARY;
+ } else if (c !== CR) {
+ return;
+ }
+
+ index++;
+ break;
+ } else if (index - 1 === boundary.length - 2) {
+ if (flags & F.LAST_BOUNDARY && c === HYPHEN) {
+ state = S.END;
+ flags = 0;
+ } else if (!(flags & F.LAST_BOUNDARY) && c === LF) {
+ index = 0;
+ callback('onPartBegin');
+ state = S.HEADER_FIELD_START;
+ } else {
+ return;
+ }
+
+ break;
+ }
+
+ if (c !== boundary[index + 2]) {
+ index = -2;
+ }
+
+ if (c === boundary[index + 2]) {
+ index++;
+ }
+
+ break;
+ case S.HEADER_FIELD_START:
+ state = S.HEADER_FIELD;
+ mark('onHeaderField');
+ index = 0;
+ // falls through
+ case S.HEADER_FIELD:
+ if (c === CR) {
+ clear('onHeaderField');
+ state = S.HEADERS_ALMOST_DONE;
+ break;
+ }
+
+ index++;
+ if (c === HYPHEN) {
+ break;
+ }
+
+ if (c === COLON) {
+ if (index === 1) {
+ // empty header field
+ return;
+ }
+
+ dataCallback('onHeaderField', true);
+ state = S.HEADER_VALUE_START;
+ break;
+ }
+
+ cl = lower(c);
+ if (cl < A || cl > Z) {
+ return;
+ }
+
+ break;
+ case S.HEADER_VALUE_START:
+ if (c === SPACE) {
+ break;
+ }
+
+ mark('onHeaderValue');
+ state = S.HEADER_VALUE;
+ // falls through
+ case S.HEADER_VALUE:
+ if (c === CR) {
+ dataCallback('onHeaderValue', true);
+ callback('onHeaderEnd');
+ state = S.HEADER_VALUE_ALMOST_DONE;
+ }
+
+ break;
+ case S.HEADER_VALUE_ALMOST_DONE:
+ if (c !== LF) {
+ return;
+ }
+
+ state = S.HEADER_FIELD_START;
+ break;
+ case S.HEADERS_ALMOST_DONE:
+ if (c !== LF) {
+ return;
+ }
+
+ callback('onHeadersEnd');
+ state = S.PART_DATA_START;
+ break;
+ case S.PART_DATA_START:
+ state = S.PART_DATA;
+ mark('onPartData');
+ // falls through
+ case S.PART_DATA:
+ previousIndex = index;
+
+ if (index === 0) {
+ // boyer-moore derrived algorithm to safely skip non-boundary data
+ i += boundaryEnd;
+ while (i < bufferLength && !(data[i] in boundaryChars)) {
+ i += boundaryLength;
+ }
+
+ i -= boundaryEnd;
+ c = data[i];
+ }
+
+ if (index < boundary.length) {
+ if (boundary[index] === c) {
+ if (index === 0) {
+ dataCallback('onPartData', true);
+ }
+
+ index++;
+ } else {
+ index = 0;
+ }
+ } else if (index === boundary.length) {
+ index++;
+ if (c === CR) {
+ // CR = part boundary
+ flags |= F.PART_BOUNDARY;
+ } else if (c === HYPHEN) {
+ // HYPHEN = end boundary
+ flags |= F.LAST_BOUNDARY;
+ } else {
+ index = 0;
+ }
+ } else if (index - 1 === boundary.length) {
+ if (flags & F.PART_BOUNDARY) {
+ index = 0;
+ if (c === LF) {
+ // unset the PART_BOUNDARY flag
+ flags &= ~F.PART_BOUNDARY;
+ callback('onPartEnd');
+ callback('onPartBegin');
+ state = S.HEADER_FIELD_START;
+ break;
+ }
+ } else if (flags & F.LAST_BOUNDARY) {
+ if (c === HYPHEN) {
+ callback('onPartEnd');
+ state = S.END;
+ flags = 0;
+ } else {
+ index = 0;
+ }
+ } else {
+ index = 0;
+ }
+ }
+
+ if (index > 0) {
+ // when matching a possible boundary, keep a lookbehind reference
+ // in case it turns out to be a false lead
+ lookbehind[index - 1] = c;
+ } else if (previousIndex > 0) {
+ // if our boundary turned out to be rubbish, the captured lookbehind
+ // belongs to partData
+ const _lookbehind = new Uint8Array(lookbehind.buffer, lookbehind.byteOffset, lookbehind.byteLength);
+ callback('onPartData', 0, previousIndex, _lookbehind);
+ previousIndex = 0;
+ mark('onPartData');
+
+ // reconsider the current character even so it interrupted the sequence
+ // it could be the beginning of a new sequence
+ i--;
+ }
+
+ break;
+ case S.END:
+ break;
+ default:
+ throw new Error(`Unexpected state entered: ${state}`);
+ }
+ }
+
+ dataCallback('onHeaderField');
+ dataCallback('onHeaderValue');
+ dataCallback('onPartData');
+
+ // Update properties for the next call
+ this.index = index;
+ this.state = state;
+ this.flags = flags;
+ }
+
+ end() {
+ if ((this.state === S.HEADER_FIELD_START && this.index === 0) ||
+ (this.state === S.PART_DATA && this.index === this.boundary.length)) {
+ this.onPartEnd();
+ } else if (this.state !== S.END) {
+ throw new Error('MultipartParser.end(): stream ended unexpectedly');
+ }
+ }
+}
+
+function _fileName(headerValue) {
+ // matches either a quoted-string or a token (RFC 2616 section 19.5.1)
+ const m = headerValue.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);
+ if (!m) {
+ return;
+ }
+
+ const match = m[2] || m[3] || '';
+ let filename = match.slice(match.lastIndexOf('\\') + 1);
+ filename = filename.replace(/%22/g, '"');
+ filename = filename.replace(/&#(\d{4});/g, (m, code) => {
+ return String.fromCharCode(code);
+ });
+ return filename;
+}
+
+export async function toFormData(Body, ct) {
+ if (!/multipart/i.test(ct)) {
+ throw new TypeError('Failed to fetch');
+ }
+
+ const m = ct.match(/boundary=(?:"([^"]+)"|([^;]+))/i);
+
+ if (!m) {
+ throw new TypeError('no or bad content-type header, no multipart boundary');
+ }
+
+ const parser = new MultipartParser(m[1] || m[2]);
+
+ let headerField;
+ let headerValue;
+ let entryValue;
+ let entryName;
+ let contentType;
+ let filename;
+ const entryChunks = [];
+ const formData = new FormData();
+
+ const onPartData = ui8a => {
+ entryValue += decoder.decode(ui8a, {stream: true});
+ };
+
+ const appendToFile = ui8a => {
+ entryChunks.push(ui8a);
+ };
+
+ const appendFileToFormData = () => {
+ const file = new File(entryChunks, filename, {type: contentType});
+ formData.append(entryName, file);
+ };
+
+ const appendEntryToFormData = () => {
+ formData.append(entryName, entryValue);
+ };
+
+ const decoder = new TextDecoder('utf-8');
+ decoder.decode();
+
+ parser.onPartBegin = function () {
+ parser.onPartData = onPartData;
+ parser.onPartEnd = appendEntryToFormData;
+
+ headerField = '';
+ headerValue = '';
+ entryValue = '';
+ entryName = '';
+ contentType = '';
+ filename = null;
+ entryChunks.length = 0;
+ };
+
+ parser.onHeaderField = function (ui8a) {
+ headerField += decoder.decode(ui8a, {stream: true});
+ };
+
+ parser.onHeaderValue = function (ui8a) {
+ headerValue += decoder.decode(ui8a, {stream: true});
+ };
+
+ parser.onHeaderEnd = function () {
+ headerValue += decoder.decode();
+ headerField = headerField.toLowerCase();
+
+ if (headerField === 'content-disposition') {
+ // matches either a quoted-string or a token (RFC 2616 section 19.5.1)
+ const m = headerValue.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);
+
+ if (m) {
+ entryName = m[2] || m[3] || '';
+ }
+
+ filename = _fileName(headerValue);
+
+ if (filename) {
+ parser.onPartData = appendToFile;
+ parser.onPartEnd = appendFileToFormData;
+ }
+ } else if (headerField === 'content-type') {
+ contentType = headerValue;
+ }
+
+ headerValue = '';
+ headerField = '';
+ };
+
+ for await (const chunk of Body) {
+ parser.write(chunk);
+ }
+
+ parser.end();
+
+ return formData;
+}
diff --git a/node_modules/node-fetch/src/utils/referrer.js b/node_modules/node-fetch/src/utils/referrer.js
new file mode 100644
index 00000000..6741f2fc
--- /dev/null
+++ b/node_modules/node-fetch/src/utils/referrer.js
@@ -0,0 +1,340 @@
+import {isIP} from 'node:net';
+
+/**
+ * @external URL
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/URL|URL}
+ */
+
+/**
+ * @module utils/referrer
+ * @private
+ */
+
+/**
+ * @see {@link https://w3c.github.io/webappsec-referrer-policy/#strip-url|Referrer Policy §8.4. Strip url for use as a referrer}
+ * @param {string} URL
+ * @param {boolean} [originOnly=false]
+ */
+export function stripURLForUseAsAReferrer(url, originOnly = false) {
+ // 1. If url is null, return no referrer.
+ if (url == null) { // eslint-disable-line no-eq-null, eqeqeq
+ return 'no-referrer';
+ }
+
+ url = new URL(url);
+
+ // 2. If url's scheme is a local scheme, then return no referrer.
+ if (/^(about|blob|data):$/.test(url.protocol)) {
+ return 'no-referrer';
+ }
+
+ // 3. Set url's username to the empty string.
+ url.username = '';
+
+ // 4. Set url's password to null.
+ // Note: `null` appears to be a mistake as this actually results in the password being `"null"`.
+ url.password = '';
+
+ // 5. Set url's fragment to null.
+ // Note: `null` appears to be a mistake as this actually results in the fragment being `"#null"`.
+ url.hash = '';
+
+ // 6. If the origin-only flag is true, then:
+ if (originOnly) {
+ // 6.1. Set url's path to null.
+ // Note: `null` appears to be a mistake as this actually results in the path being `"/null"`.
+ url.pathname = '';
+
+ // 6.2. Set url's query to null.
+ // Note: `null` appears to be a mistake as this actually results in the query being `"?null"`.
+ url.search = '';
+ }
+
+ // 7. Return url.
+ return url;
+}
+
+/**
+ * @see {@link https://w3c.github.io/webappsec-referrer-policy/#enumdef-referrerpolicy|enum ReferrerPolicy}
+ */
+export const ReferrerPolicy = new Set([
+ '',
+ 'no-referrer',
+ 'no-referrer-when-downgrade',
+ 'same-origin',
+ 'origin',
+ 'strict-origin',
+ 'origin-when-cross-origin',
+ 'strict-origin-when-cross-origin',
+ 'unsafe-url'
+]);
+
+/**
+ * @see {@link https://w3c.github.io/webappsec-referrer-policy/#default-referrer-policy|default referrer policy}
+ */
+export const DEFAULT_REFERRER_POLICY = 'strict-origin-when-cross-origin';
+
+/**
+ * @see {@link https://w3c.github.io/webappsec-referrer-policy/#referrer-policies|Referrer Policy §3. Referrer Policies}
+ * @param {string} referrerPolicy
+ * @returns {string} referrerPolicy
+ */
+export function validateReferrerPolicy(referrerPolicy) {
+ if (!ReferrerPolicy.has(referrerPolicy)) {
+ throw new TypeError(`Invalid referrerPolicy: ${referrerPolicy}`);
+ }
+
+ return referrerPolicy;
+}
+
+/**
+ * @see {@link https://w3c.github.io/webappsec-secure-contexts/#is-origin-trustworthy|Referrer Policy §3.2. Is origin potentially trustworthy?}
+ * @param {external:URL} url
+ * @returns `true`: "Potentially Trustworthy", `false`: "Not Trustworthy"
+ */
+export function isOriginPotentiallyTrustworthy(url) {
+ // 1. If origin is an opaque origin, return "Not Trustworthy".
+ // Not applicable
+
+ // 2. Assert: origin is a tuple origin.
+ // Not for implementations
+
+ // 3. If origin's scheme is either "https" or "wss", return "Potentially Trustworthy".
+ if (/^(http|ws)s:$/.test(url.protocol)) {
+ return true;
+ }
+
+ // 4. If origin's host component matches one of the CIDR notations 127.0.0.0/8 or ::1/128 [RFC4632], return "Potentially Trustworthy".
+ const hostIp = url.host.replace(/(^\[)|(]$)/g, '');
+ const hostIPVersion = isIP(hostIp);
+
+ if (hostIPVersion === 4 && /^127\./.test(hostIp)) {
+ return true;
+ }
+
+ if (hostIPVersion === 6 && /^(((0+:){7})|(::(0+:){0,6}))0*1$/.test(hostIp)) {
+ return true;
+ }
+
+ // 5. If origin's host component is "localhost" or falls within ".localhost", and the user agent conforms to the name resolution rules in [let-localhost-be-localhost], return "Potentially Trustworthy".
+ // We are returning FALSE here because we cannot ensure conformance to
+ // let-localhost-be-loalhost (https://tools.ietf.org/html/draft-west-let-localhost-be-localhost)
+ if (url.host === 'localhost' || url.host.endsWith('.localhost')) {
+ return false;
+ }
+
+ // 6. If origin's scheme component is file, return "Potentially Trustworthy".
+ if (url.protocol === 'file:') {
+ return true;
+ }
+
+ // 7. If origin's scheme component is one which the user agent considers to be authenticated, return "Potentially Trustworthy".
+ // Not supported
+
+ // 8. If origin has been configured as a trustworthy origin, return "Potentially Trustworthy".
+ // Not supported
+
+ // 9. Return "Not Trustworthy".
+ return false;
+}
+
+/**
+ * @see {@link https://w3c.github.io/webappsec-secure-contexts/#is-url-trustworthy|Referrer Policy §3.3. Is url potentially trustworthy?}
+ * @param {external:URL} url
+ * @returns `true`: "Potentially Trustworthy", `false`: "Not Trustworthy"
+ */
+export function isUrlPotentiallyTrustworthy(url) {
+ // 1. If url is "about:blank" or "about:srcdoc", return "Potentially Trustworthy".
+ if (/^about:(blank|srcdoc)$/.test(url)) {
+ return true;
+ }
+
+ // 2. If url's scheme is "data", return "Potentially Trustworthy".
+ if (url.protocol === 'data:') {
+ return true;
+ }
+
+ // Note: The origin of blob: and filesystem: URLs is the origin of the context in which they were
+ // created. Therefore, blobs created in a trustworthy origin will themselves be potentially
+ // trustworthy.
+ if (/^(blob|filesystem):$/.test(url.protocol)) {
+ return true;
+ }
+
+ // 3. Return the result of executing §3.2 Is origin potentially trustworthy? on url's origin.
+ return isOriginPotentiallyTrustworthy(url);
+}
+
+/**
+ * Modifies the referrerURL to enforce any extra security policy considerations.
+ * @see {@link https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer|Referrer Policy §8.3. Determine request's Referrer}, step 7
+ * @callback module:utils/referrer~referrerURLCallback
+ * @param {external:URL} referrerURL
+ * @returns {external:URL} modified referrerURL
+ */
+
+/**
+ * Modifies the referrerOrigin to enforce any extra security policy considerations.
+ * @see {@link https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer|Referrer Policy §8.3. Determine request's Referrer}, step 7
+ * @callback module:utils/referrer~referrerOriginCallback
+ * @param {external:URL} referrerOrigin
+ * @returns {external:URL} modified referrerOrigin
+ */
+
+/**
+ * @see {@link https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer|Referrer Policy §8.3. Determine request's Referrer}
+ * @param {Request} request
+ * @param {object} o
+ * @param {module:utils/referrer~referrerURLCallback} o.referrerURLCallback
+ * @param {module:utils/referrer~referrerOriginCallback} o.referrerOriginCallback
+ * @returns {external:URL} Request's referrer
+ */
+export function determineRequestsReferrer(request, {referrerURLCallback, referrerOriginCallback} = {}) {
+ // There are 2 notes in the specification about invalid pre-conditions. We return null, here, for
+ // these cases:
+ // > Note: If request's referrer is "no-referrer", Fetch will not call into this algorithm.
+ // > Note: If request's referrer policy is the empty string, Fetch will not call into this
+ // > algorithm.
+ if (request.referrer === 'no-referrer' || request.referrerPolicy === '') {
+ return null;
+ }
+
+ // 1. Let policy be request's associated referrer policy.
+ const policy = request.referrerPolicy;
+
+ // 2. Let environment be request's client.
+ // not applicable to node.js
+
+ // 3. Switch on request's referrer:
+ if (request.referrer === 'about:client') {
+ return 'no-referrer';
+ }
+
+ // "a URL": Let referrerSource be request's referrer.
+ const referrerSource = request.referrer;
+
+ // 4. Let request's referrerURL be the result of stripping referrerSource for use as a referrer.
+ let referrerURL = stripURLForUseAsAReferrer(referrerSource);
+
+ // 5. Let referrerOrigin be the result of stripping referrerSource for use as a referrer, with the
+ // origin-only flag set to true.
+ let referrerOrigin = stripURLForUseAsAReferrer(referrerSource, true);
+
+ // 6. If the result of serializing referrerURL is a string whose length is greater than 4096, set
+ // referrerURL to referrerOrigin.
+ if (referrerURL.toString().length > 4096) {
+ referrerURL = referrerOrigin;
+ }
+
+ // 7. The user agent MAY alter referrerURL or referrerOrigin at this point to enforce arbitrary
+ // policy considerations in the interests of minimizing data leakage. For example, the user
+ // agent could strip the URL down to an origin, modify its host, replace it with an empty
+ // string, etc.
+ if (referrerURLCallback) {
+ referrerURL = referrerURLCallback(referrerURL);
+ }
+
+ if (referrerOriginCallback) {
+ referrerOrigin = referrerOriginCallback(referrerOrigin);
+ }
+
+ // 8.Execute the statements corresponding to the value of policy:
+ const currentURL = new URL(request.url);
+
+ switch (policy) {
+ case 'no-referrer':
+ return 'no-referrer';
+
+ case 'origin':
+ return referrerOrigin;
+
+ case 'unsafe-url':
+ return referrerURL;
+
+ case 'strict-origin':
+ // 1. If referrerURL is a potentially trustworthy URL and request's current URL is not a
+ // potentially trustworthy URL, then return no referrer.
+ if (isUrlPotentiallyTrustworthy(referrerURL) && !isUrlPotentiallyTrustworthy(currentURL)) {
+ return 'no-referrer';
+ }
+
+ // 2. Return referrerOrigin.
+ return referrerOrigin.toString();
+
+ case 'strict-origin-when-cross-origin':
+ // 1. If the origin of referrerURL and the origin of request's current URL are the same, then
+ // return referrerURL.
+ if (referrerURL.origin === currentURL.origin) {
+ return referrerURL;
+ }
+
+ // 2. If referrerURL is a potentially trustworthy URL and request's current URL is not a
+ // potentially trustworthy URL, then return no referrer.
+ if (isUrlPotentiallyTrustworthy(referrerURL) && !isUrlPotentiallyTrustworthy(currentURL)) {
+ return 'no-referrer';
+ }
+
+ // 3. Return referrerOrigin.
+ return referrerOrigin;
+
+ case 'same-origin':
+ // 1. If the origin of referrerURL and the origin of request's current URL are the same, then
+ // return referrerURL.
+ if (referrerURL.origin === currentURL.origin) {
+ return referrerURL;
+ }
+
+ // 2. Return no referrer.
+ return 'no-referrer';
+
+ case 'origin-when-cross-origin':
+ // 1. If the origin of referrerURL and the origin of request's current URL are the same, then
+ // return referrerURL.
+ if (referrerURL.origin === currentURL.origin) {
+ return referrerURL;
+ }
+
+ // Return referrerOrigin.
+ return referrerOrigin;
+
+ case 'no-referrer-when-downgrade':
+ // 1. If referrerURL is a potentially trustworthy URL and request's current URL is not a
+ // potentially trustworthy URL, then return no referrer.
+ if (isUrlPotentiallyTrustworthy(referrerURL) && !isUrlPotentiallyTrustworthy(currentURL)) {
+ return 'no-referrer';
+ }
+
+ // 2. Return referrerURL.
+ return referrerURL;
+
+ default:
+ throw new TypeError(`Invalid referrerPolicy: ${policy}`);
+ }
+}
+
+/**
+ * @see {@link https://w3c.github.io/webappsec-referrer-policy/#parse-referrer-policy-from-header|Referrer Policy §8.1. Parse a referrer policy from a Referrer-Policy header}
+ * @param {Headers} headers Response headers
+ * @returns {string} policy
+ */
+export function parseReferrerPolicyFromHeader(headers) {
+ // 1. Let policy-tokens be the result of extracting header list values given `Referrer-Policy`
+ // and response’s header list.
+ const policyTokens = (headers.get('referrer-policy') || '').split(/[,\s]+/);
+
+ // 2. Let policy be the empty string.
+ let policy = '';
+
+ // 3. For each token in policy-tokens, if token is a referrer policy and token is not the empty
+ // string, then set policy to token.
+ // Note: This algorithm loops over multiple policy values to allow deployment of new policy
+ // values with fallbacks for older user agents, as described in § 11.1 Unknown Policy Values.
+ for (const token of policyTokens) {
+ if (token && ReferrerPolicy.has(token)) {
+ policy = token;
+ }
+ }
+
+ // 4. Return policy.
+ return policy;
+}
diff --git a/node_modules/npm-normalize-package-bin/LICENSE b/node_modules/npm-normalize-package-bin/LICENSE
new file mode 100644
index 00000000..19cec97b
--- /dev/null
+++ b/node_modules/npm-normalize-package-bin/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) npm, Inc.
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/npm-normalize-package-bin/README.md b/node_modules/npm-normalize-package-bin/README.md
new file mode 100644
index 00000000..65ba316a
--- /dev/null
+++ b/node_modules/npm-normalize-package-bin/README.md
@@ -0,0 +1,14 @@
+# npm-normalize-package-bin
+
+Turn any flavor of allowable package.json bin into a normalized object.
+
+## API
+
+```js
+const normalize = require('npm-normalize-package-bin')
+const pkg = {name: 'foo', bin: 'bar'}
+console.log(normalize(pkg)) // {name:'foo', bin:{foo: 'bar'}}
+```
+
+Also strips out weird dots and slashes to prevent accidental and/or
+malicious bad behavior when the package is installed.
diff --git a/node_modules/npm-normalize-package-bin/package.json b/node_modules/npm-normalize-package-bin/package.json
new file mode 100644
index 00000000..a1aeef0e
--- /dev/null
+++ b/node_modules/npm-normalize-package-bin/package.json
@@ -0,0 +1,45 @@
+{
+ "name": "npm-normalize-package-bin",
+ "version": "4.0.0",
+ "description": "Turn any flavor of allowable package.json bin into a normalized object",
+ "main": "lib/index.js",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/npm/npm-normalize-package-bin.git"
+ },
+ "author": "GitHub Inc.",
+ "license": "ISC",
+ "scripts": {
+ "test": "tap",
+ "snap": "tap",
+ "lint": "npm run eslint",
+ "postlint": "template-oss-check",
+ "template-oss-apply": "template-oss-apply --force",
+ "lintfix": "npm run eslint -- --fix",
+ "posttest": "npm run lint",
+ "eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\""
+ },
+ "devDependencies": {
+ "@npmcli/eslint-config": "^5.0.0",
+ "@npmcli/template-oss": "4.23.3",
+ "tap": "^16.3.0"
+ },
+ "files": [
+ "bin/",
+ "lib/"
+ ],
+ "engines": {
+ "node": "^18.17.0 || >=20.5.0"
+ },
+ "templateOSS": {
+ "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
+ "version": "4.23.3",
+ "publish": "true"
+ },
+ "tap": {
+ "nyc-arg": [
+ "--exclude",
+ "tap-snapshots/**"
+ ]
+ }
+}
diff --git a/node_modules/proc-log/LICENSE b/node_modules/proc-log/LICENSE
new file mode 100644
index 00000000..83837797
--- /dev/null
+++ b/node_modules/proc-log/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) GitHub, Inc.
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/proc-log/README.md b/node_modules/proc-log/README.md
new file mode 100644
index 00000000..9d1d1a91
--- /dev/null
+++ b/node_modules/proc-log/README.md
@@ -0,0 +1,226 @@
+# proc-log
+
+Emits events on the process object which a listener can consume and print to the terminal or log file.
+
+This is used by various modules within the npm CLI stack in order to send log events that can be consumed by a listener on the process object.
+
+Currently emits `log`, `output`, `input`, and `time` events.
+
+## API
+
+```js
+const { log, output, input, time } = require('proc-log')
+```
+
+#### output
+* `output.standard(...args)` calls `process.emit('output', 'standard', ...args)`
+
+ This is for general standard output. Consumers will typically show this on stdout (after optionally formatting or filtering it).
+
+* `output.error(...args)` calls `process.emit('output', 'error', ...args)`
+
+ This is for general error output. Consumers will typically show this on stderr (after optionally formatting or filtering it).
+
+* `output.buffer(...args)` calls `process.emit('output', 'buffer', ...args)`
+
+ This is for buffered output. Consumers will typically buffer this until they are ready to display.
+
+* `output.flush(...args)` calls `process.emit('output', 'flush', ...args)`
+
+ This is to indicate that the output buffer should be flushed.
+
+* `output.LEVELS` an array of strings of all output method names
+
+#### log
+* `log.error(...args)` calls `process.emit('log', 'error', ...args)`
+
+ The highest log level. For printing extremely serious errors that indicate something went wrong.
+
+* `log.warn(...args)` calls `process.emit('log', 'warn', ...args)`
+
+ A fairly high log level. Things that the user needs to be aware of, but which won't necessarily cause improper functioning of the system.
+
+* `log.notice(...args)` calls `process.emit('log', 'notice', ...args)`
+
+ Notices which are important, but not necessarily dangerous or a cause for excess concern.
+
+* `log.info(...args)` calls `process.emit('log', 'info', ...args)`
+
+ Informative messages that may benefit the user, but aren't particularly important.
+
+* `log.verbose(...args)` calls `process.emit('log', 'verbose', ...args)`
+
+ Noisy output that is more detail that most users will care about.
+
+* `log.silly(...args)` calls `process.emit('log', 'silly', ...args)`
+
+ Extremely noisy excessive logging messages that are typically only useful for debugging.
+
+* `log.http(...args)` calls `process.emit('log', 'http', ...args)`
+
+ Information about HTTP requests made and/or completed.
+
+* `log.timing(...args)` calls `process.emit('log', 'timing', ...args)`
+
+ Timing information.
+
+* `log.pause()` calls `process.emit('log', 'pause')`
+
+ Used to tell the consumer to stop printing messages.
+
+* `log.resume()` calls `process.emit('log', 'resume')`
+
+ Used to tell the consumer that it is ok to print messages again.
+
+* `log.LEVELS` an array of strings of all log method names
+
+#### input
+
+* `input.start(fn?)` calls `process.emit('input', 'start')`
+
+ Used to tell the consumer that the terminal is going to begin reading user input. Returns a function that will call `input.end()` for convenience.
+
+ This also takes an optional callback which will run `input.end()` on its completion. If the callback returns a `Promise` then `input.end()` will be run during `finally()`.
+
+* `input.end()` calls `process.emit('input', 'end')`
+
+ Used to tell the consumer that the terminal has stopped reading user input.
+
+* `input.read(...args): Promise` calls `process.emit('input', 'read', resolve, reject, ...args)`
+
+ Used to tell the consumer that the terminal is reading user input and returns a `Promise` that the producer can `await` until the consumer has finished its async action.
+
+ This emits `resolve` and `reject` functions (in addition to all passed in arguments) which the consumer must use to resolve the returned `Promise`.
+
+#### time
+
+* `time.start(timerName, fn?)` calls `process.emit('time', 'start', 'timerName')`
+
+ Used to start a timer with the specified name. Returns a function that will call `time.end()` for convenience.
+
+ This also takes an optional callback which will run `time.end()` on its completion. If the callback returns a `Promise` then `time.end()` will be run during `finally()`.
+
+* `time.end(timerName)` calls `process.emit('time', 'end', timeName)`
+
+ Used to tell the consumer to stop a timer with the specified name.
+
+## Examples
+
+### log
+
+Every `log` method calls `process.emit('log', level, ...otherArgs)` internally. So in order to consume those events you need to do `process.on('log', fn)`.
+
+#### Colorize based on level
+
+Here's an example of how to consume `proc-log` log events and colorize them based on level:
+
+```js
+const chalk = require('chalk')
+
+process.on('log', (level, ...args) => {
+ if (level === 'error') {
+ console.log(chalk.red(level), ...args)
+ } else {
+ console.log(chalk.blue(level), ...args)
+ }
+})
+```
+
+#### Pause and resume
+
+`log.pause` and `log.resume` are included so you have the ability to tell your consumer that you want to pause or resume your display of logs. In the npm CLI we use this to buffer all logs on init until we know the correct loglevel to display. But we also setup a second handler that writes everything to a file even if paused.
+
+```js
+let paused = true
+const buffer = []
+
+// this handler will buffer and replay logs only after `procLog.resume()` is called
+process.on('log', (level, ...args) => {
+ if (level === 'resume') {
+ buffer.forEach((item) => console.log(...item))
+ paused = false
+ return
+ } 
+
+ if (paused) {
+ buffer.push([level, ...args])
+ } else {
+ console.log(level, ...args)
+ }
+})
+
+// this handler will write everything to a file
+process.on('log', (...args) => {
+ fs.appendFileSync('debug.log', args.join(' '))
+})
+```
+
+### input
+
+### `start` and `end`
+
+**producer.js**
+```js
+const { output, input } = require('proc-log')
+const { readFromUserInput } = require('./my-read')
+
+// Using callback passed to `start`
+try {
+ const res = await input.start(
+ readFromUserInput({ prompt: 'OK?', default: 'y' })
+ )
+ output.standard(`User said ${res}`)
+} catch (err) {
+ output.error(`User cancelled: ${err}`)
+}
+
+// Manually calling `start` and `end`
+try {
+ input.start()
+ const res = await readFromUserInput({ prompt: 'OK?', default: 'y' })
+ output.standard(`User said ${res}`)
+} catch (err) {
+ output.error(`User cancelled: ${err}`)
+} finally {
+ input.end()
+}
+```
+
+**consumer.js**
+```js
+const { read } = require('read')
+
+process.on('input', (level) => {
+ if (level === 'start') {
+ // Hide UI to make room for user input being read
+ } else if (level === 'end') {
+ // Restore UI now that reading is ended
+ }
+})
+```
+
+### Using `read` to call `read()`
+
+**producer.js**
+```js
+const { output, input } = require('proc-log')
+
+try {
+ const res = await input.read({ prompt: 'OK?', default: 'y' })
+ output.standard(`User said ${res}`)
+} catch (err) {
+ output.error(`User cancelled: ${err}`)
+}
+```
+
+**consumer.js**
+```js
+const { read } = require('read')
+
+process.on('input', (level, ...args) => {
+ if (level === 'read') {
+ const [res, rej, opts] = args
+ read(opts).then(res).catch(rej)
+ }
+})
+```
\ No newline at end of file
diff --git a/node_modules/proc-log/package.json b/node_modules/proc-log/package.json
new file mode 100644
index 00000000..957209d3
--- /dev/null
+++ b/node_modules/proc-log/package.json
@@ -0,0 +1,46 @@
+{
+ "name": "proc-log",
+ "version": "5.0.0",
+ "files": [
+ "bin/",
+ "lib/"
+ ],
+ "main": "lib/index.js",
+ "description": "just emit 'log' events on the process object",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/npm/proc-log.git"
+ },
+ "author": "GitHub Inc.",
+ "license": "ISC",
+ "scripts": {
+ "test": "tap",
+ "snap": "tap",
+ "posttest": "npm run lint",
+ "postsnap": "eslint index.js test/*.js --fix",
+ "lint": "npm run eslint",
+ "postlint": "template-oss-check",
+ "lintfix": "npm run eslint -- --fix",
+ "template-oss-apply": "template-oss-apply --force",
+ "eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\""
+ },
+ "devDependencies": {
+ "@npmcli/eslint-config": "^5.0.0",
+ "@npmcli/template-oss": "4.23.3",
+ "tap": "^16.0.1"
+ },
+ "engines": {
+ "node": "^18.17.0 || >=20.5.0"
+ },
+ "templateOSS": {
+ "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
+ "version": "4.23.3",
+ "publish": true
+ },
+ "tap": {
+ "nyc-arg": [
+ "--exclude",
+ "tap-snapshots/**"
+ ]
+ }
+}
diff --git a/node_modules/read-cmd-shim/LICENSE b/node_modules/read-cmd-shim/LICENSE
new file mode 100644
index 00000000..f4be44d8
--- /dev/null
+++ b/node_modules/read-cmd-shim/LICENSE
@@ -0,0 +1,14 @@
+Copyright (c) 2015, Rebecca Turner <[email protected]>
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
diff --git a/node_modules/read-cmd-shim/README.md b/node_modules/read-cmd-shim/README.md
new file mode 100644
index 00000000..457e36e3
--- /dev/null
+++ b/node_modules/read-cmd-shim/README.md
@@ -0,0 +1,36 @@
+# read-cmd-shim
+
+Figure out what a [`cmd-shim`](https://github.com/ForbesLindesay/cmd-shim)
+is pointing at. This acts as the equivalent of
+[`fs.readlink`](https://nodejs.org/api/fs.html#fs_fs_readlink_path_callback).
+
+### Usage
+
+```
+const readCmdShim = require('read-cmd-shim')
+
+readCmdShim('/path/to/shim.cmd').then(destination => {
+ …
+})
+
+const destination = readCmdShim.sync('/path/to/shim.cmd')
+```
+
+### readCmdShim(path) -> Promise
+
+Reads the `cmd-shim` located at `path` and resolves with the _relative_
+path that the shim points at. Consider this as roughly the equivalent of
+`fs.readlink`.
+
+This can read both `.cmd` style that are run by the Windows Command Prompt
+and Powershell, and the kind without any extension that are used by Cygwin.
+
+This can return errors that `fs.readFile` returns, except that they'll
+include a stack trace from where `readCmdShim` was called. Plus it can
+return a special `ENOTASHIM` exception, when it can't find a cmd-shim in the
+file referenced by `path`. This should only happen if you pass in a
+non-command shim.
+
+### readCmdShim.sync(path)
+
+Same as above but synchronous. Errors are thrown.
diff --git a/node_modules/read-cmd-shim/package.json b/node_modules/read-cmd-shim/package.json
new file mode 100644
index 00000000..3b16802d
--- /dev/null
+++ b/node_modules/read-cmd-shim/package.json
@@ -0,0 +1,48 @@
+{
+ "name": "read-cmd-shim",
+ "version": "5.0.0",
+ "description": "Figure out what a cmd-shim is pointing at. This acts as the equivalent of fs.readlink.",
+ "main": "lib/index.js",
+ "devDependencies": {
+ "@npmcli/eslint-config": "^5.0.0",
+ "@npmcli/template-oss": "4.23.3",
+ "cmd-shim": "^7.0.0",
+ "tap": "^16.0.1"
+ },
+ "scripts": {
+ "test": "tap",
+ "lint": "npm run eslint",
+ "postlint": "template-oss-check",
+ "template-oss-apply": "template-oss-apply --force",
+ "lintfix": "npm run eslint -- --fix",
+ "snap": "tap",
+ "posttest": "npm run lint",
+ "eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\""
+ },
+ "tap": {
+ "check-coverage": true,
+ "nyc-arg": [
+ "--exclude",
+ "tap-snapshots/**"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/npm/read-cmd-shim.git"
+ },
+ "license": "ISC",
+ "homepage": "https://github.com/npm/read-cmd-shim#readme",
+ "files": [
+ "bin/",
+ "lib/"
+ ],
+ "author": "GitHub Inc.",
+ "engines": {
+ "node": "^18.17.0 || >=20.5.0"
+ },
+ "templateOSS": {
+ "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
+ "version": "4.23.3",
+ "publish": true
+ }
+}
diff --git a/node_modules/signal-exit/LICENSE.txt b/node_modules/signal-exit/LICENSE.txt
new file mode 100644
index 00000000..954f2fa8
--- /dev/null
+++ b/node_modules/signal-exit/LICENSE.txt
@@ -0,0 +1,16 @@
+The ISC License
+
+Copyright (c) 2015-2023 Benjamin Coe, Isaac Z. Schlueter, and Contributors
+
+Permission to use, copy, modify, and/or distribute this software
+for any purpose with or without fee is hereby granted, provided
+that the above copyright notice and this permission notice
+appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE
+LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/signal-exit/README.md b/node_modules/signal-exit/README.md
new file mode 100644
index 00000000..c55cd45e
--- /dev/null
+++ b/node_modules/signal-exit/README.md
@@ -0,0 +1,74 @@
+# signal-exit
+
+When you want to fire an event no matter how a process exits:
+
+- reaching the end of execution.
+- explicitly having `process.exit(code)` called.
+- having `process.kill(pid, sig)` called.
+- receiving a fatal signal from outside the process
+
+Use `signal-exit`.
+
+```js
+// Hybrid module, either works
+import { onExit } from 'signal-exit'
+// or:
+// const { onExit } = require('signal-exit')
+
+onExit((code, signal) => {
+ console.log('process exited!', code, signal)
+})
+```
+
+## API
+
+`remove = onExit((code, signal) => {}, options)`
+
+The return value of the function is a function that will remove
+the handler.
+
+Note that the function _only_ fires for signals if the signal
+would cause the process to exit. That is, there are no other
+listeners, and it is a fatal signal.
+
+If the global `process` object is not suitable for this purpose
+(ie, it's unset, or doesn't have an `emit` method, etc.) then the
+`onExit` function is a no-op that returns a no-op `remove` method.
+
+### Options
+
+- `alwaysLast`: Run this handler after any other signal or exit
+ handlers. This causes `process.emit` to be monkeypatched.
+
+### Capturing Signal Exits
+
+If the handler returns an exact boolean `true`, and the exit is a
+due to signal, then the signal will be considered handled, and
+will _not_ trigger a synthetic `process.kill(process.pid,
+signal)` after firing the `onExit` handlers.
+
+In this case, it your responsibility as the caller to exit with a
+signal (for example, by calling `process.kill()`) if you wish to
+preserve the same exit status that would otherwise have occurred.
+If you do not, then the process will likely exit gracefully with
+status 0 at some point, assuming that no other terminating signal
+or other exit trigger occurs.
+
+Prior to calling handlers, the `onExit` machinery is unloaded, so
+any subsequent exits or signals will not be handled, even if the
+signal is captured and the exit is thus prevented.
+
+Note that numeric code exits may indicate that the process is
+already committed to exiting, for example due to a fatal
+exception or unhandled promise rejection, and so there is no way to
+prevent it safely.
+
+### Browser Fallback
+
+The `'signal-exit/browser'` module is the same fallback shim that
+just doesn't do anything, but presents the same function
+interface.
+
+Patches welcome to add something that hooks onto
+`window.onbeforeunload` or similar, but it might just not be a
+thing that makes sense there.
diff --git a/node_modules/signal-exit/package.json b/node_modules/signal-exit/package.json
new file mode 100644
index 00000000..ac176cec
--- /dev/null
+++ b/node_modules/signal-exit/package.json
@@ -0,0 +1,106 @@
+{
+ "name": "signal-exit",
+ "version": "4.1.0",
+ "description": "when you want to fire an event no matter how a process exits.",
+ "main": "./dist/cjs/index.js",
+ "module": "./dist/mjs/index.js",
+ "browser": "./dist/mjs/browser.js",
+ "types": "./dist/mjs/index.d.ts",
+ "exports": {
+ ".": {
+ "import": {
+ "types": "./dist/mjs/index.d.ts",
+ "default": "./dist/mjs/index.js"
+ },
+ "require": {
+ "types": "./dist/cjs/index.d.ts",
+ "default": "./dist/cjs/index.js"
+ }
+ },
+ "./signals": {
+ "import": {
+ "types": "./dist/mjs/signals.d.ts",
+ "default": "./dist/mjs/signals.js"
+ },
+ "require": {
+ "types": "./dist/cjs/signals.d.ts",
+ "default": "./dist/cjs/signals.js"
+ }
+ },
+ "./browser": {
+ "import": {
+ "types": "./dist/mjs/browser.d.ts",
+ "default": "./dist/mjs/browser.js"
+ },
+ "require": {
+ "types": "./dist/cjs/browser.d.ts",
+ "default": "./dist/cjs/browser.js"
+ }
+ }
+ },
+ "files": [
+ "dist"
+ ],
+ "engines": {
+ "node": ">=14"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/tapjs/signal-exit.git"
+ },
+ "keywords": [
+ "signal",
+ "exit"
+ ],
+ "author": "Ben Coe <[email protected]>",
+ "license": "ISC",
+ "devDependencies": {
+ "@types/cross-spawn": "^6.0.2",
+ "@types/node": "^18.15.11",
+ "@types/signal-exit": "^3.0.1",
+ "@types/tap": "^15.0.8",
+ "c8": "^7.13.0",
+ "prettier": "^2.8.6",
+ "tap": "^16.3.4",
+ "ts-node": "^10.9.1",
+ "typedoc": "^0.23.28",
+ "typescript": "^5.0.2"
+ },
+ "scripts": {
+ "preversion": "npm test",
+ "postversion": "npm publish",
+ "prepublishOnly": "git push origin --follow-tags",
+ "preprepare": "rm -rf dist",
+ "prepare": "tsc -p tsconfig.json && tsc -p tsconfig-esm.json && bash ./scripts/fixup.sh",
+ "pretest": "npm run prepare",
+ "presnap": "npm run prepare",
+ "test": "c8 tap",
+ "snap": "c8 tap",
+ "format": "prettier --write . --loglevel warn",
+ "typedoc": "typedoc --tsconfig tsconfig-esm.json ./src/*.ts"
+ },
+ "prettier": {
+ "semi": false,
+ "printWidth": 75,
+ "tabWidth": 2,
+ "useTabs": false,
+ "singleQuote": true,
+ "jsxSingleQuote": false,
+ "bracketSameLine": true,
+ "arrowParens": "avoid",
+ "endOfLine": "lf"
+ },
+ "tap": {
+ "coverage": false,
+ "jobs": 1,
+ "node-arg": [
+ "--no-warnings",
+ "--loader",
+ "ts-node/esm"
+ ],
+ "ts": false
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+}
diff --git a/node_modules/supabase/LICENSE b/node_modules/supabase/LICENSE
new file mode 100644
index 00000000..f1802dff
--- /dev/null
+++ b/node_modules/supabase/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2021 Supabase, Inc. and contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/supabase/README.md b/node_modules/supabase/README.md
new file mode 100644
index 00000000..8fb5d7a3
--- /dev/null
+++ b/node_modules/supabase/README.md
@@ -0,0 +1,183 @@
+# Supabase CLI
+
+[![Coverage Status](https://coveralls.io/repos/github/supabase/cli/badge.svg?branch=main)](https://coveralls.io/github/supabase/cli?branch=main) [![Bitbucket Pipelines](https://img.shields.io/bitbucket/pipelines/supabase-cli/setup-cli/master?style=flat-square&label=Bitbucket%20Canary)](https://bitbucket.org/supabase-cli/setup-cli/pipelines) [![Gitlab Pipeline Status](https://img.shields.io/gitlab/pipeline-status/sweatybridge%2Fsetup-cli?label=Gitlab%20Canary)
+](https://gitlab.com/sweatybridge/setup-cli/-/pipelines)
+
+[Supabase](https://supabase.io) is an open source Firebase alternative. We're building the features of Firebase using enterprise-grade open source tools.
+
+This repository contains all the functionality for Supabase CLI.
+
+- [x] Running Supabase locally
+- [x] Managing database migrations
+- [x] Creating and deploying Supabase Functions
+- [x] Generating types directly from your database schema
+- [x] Making authenticated HTTP requests to [Management API](https://supabase.com/docs/reference/api/introduction)
+
+## Getting started
+
+### Install the CLI
+
+Available via [NPM](https://www.npmjs.com) as dev dependency. To install:
+
+```bash
+npm i supabase --save-dev
+```
+
+To install the beta release channel:
+
+```bash
+npm i supabase@beta --save-dev
+```
+
+When installing with yarn 4, you need to disable experimental fetch with the following nodejs config.
+
+```
+NODE_OPTIONS=--no-experimental-fetch yarn add supabase
+```
+
+> **Note**
+For Bun versions below v1.0.17, you must add `supabase` as a [trusted dependency](https://bun.sh/guides/install/trusted) before running `bun add -D supabase`.
+
+<details>
+ <summary><b>macOS</b></summary>
+
+ Available via [Homebrew](https://brew.sh). To install:
+
+ ```sh
+ brew install supabase/tap/supabase
+ ```
+
+ To install the beta release channel:
+
+ ```sh
+ brew install supabase/tap/supabase-beta
+ brew link --overwrite supabase-beta
+ ```
+
+ To upgrade:
+
+ ```sh
+ brew upgrade supabase
+ ```
+</details>
+
+<details>
+ <summary><b>Windows</b></summary>
+
+ Available via [Scoop](https://scoop.sh). To install:
+
+ ```powershell
+ scoop bucket add supabase https://github.com/supabase/scoop-bucket.git
+ scoop install supabase
+ ```
+
+ To upgrade:
+
+ ```powershell
+ scoop update supabase
+ ```
+</details>
+
+<details>
+ <summary><b>Linux</b></summary>
+
+ Available via [Homebrew](https://brew.sh) and Linux packages.
+
+ #### via Homebrew
+
+ To install:
+
+ ```sh
+ brew install supabase/tap/supabase
+ ```
+
+ To upgrade:
+
+ ```sh
+ brew upgrade supabase
+ ```
+
+ #### via Linux packages
+
+ Linux packages are provided in [Releases](https://github.com/supabase/cli/releases). To install, download the `.apk`/`.deb`/`.rpm`/`.pkg.tar.zst` file depending on your package manager and run the respective commands.
+
+ ```sh
+ sudo apk add --allow-untrusted <...>.apk
+ ```
+
+ ```sh
+ sudo dpkg -i <...>.deb
+ ```
+
+ ```sh
+ sudo rpm -i <...>.rpm
+ ```
+
+ ```sh
+ sudo pacman -U <...>.pkg.tar.zst
+ ```
+</details>
+
+<details>
+ <summary><b>Other Platforms</b></summary>
+
+ You can also install the CLI via [go modules](https://go.dev/ref/mod#go-install) without the help of package managers.
+
+ ```sh
+ go install github.com/supabase/cli@latest
+ ```
+
+ Add a symlink to the binary in `$PATH` for easier access:
+
+ ```sh
+ ln -s "$(go env GOPATH)/bin/cli" /usr/bin/supabase
+ ```
+
+ This works on other non-standard Linux distros.
+</details>
+
+<details>
+ <summary><b>Community Maintained Packages</b></summary>
+
+ Available via [pkgx](https://pkgx.sh/). Package script [here](https://github.com/pkgxdev/pantry/blob/main/projects/supabase.com/cli/package.yml).
+ To install in your working directory:
+
+ ```bash
+ pkgx install supabase
+ ```
+
+ Available via [Nixpkgs](https://nixos.org/). Package script [here](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/tools/supabase-cli/default.nix).
+</details>
+
+### Run the CLI
+
+```bash
+supabase bootstrap
+```
+
+Or using npx:
+
+```bash
+npx supabase bootstrap
+```
+
+The bootstrap command will guide you through the process of setting up a Supabase project using one of the [starter](https://github.com/supabase-community/supabase-samples/blob/main/samples.json) templates.
+
+## Docs
+
+Command & config reference can be found [here](https://supabase.com/docs/reference/cli/about).
+
+## Breaking changes
+
+We follow semantic versioning for changes that directly impact CLI commands, flags, and configurations.
+
+However, due to dependencies on other service images, we cannot guarantee that schema migrations, seed.sql, and generated types will always work for the same CLI major version. If you need such guarantees, we encourage you to pin a specific version of CLI in package.json.
+
+## Developing
+
+To run from source:
+
+```sh
+# Go >= 1.22
+go run . help
+```
diff --git a/node_modules/supabase/bin/supabase b/node_modules/supabase/bin/supabase
new file mode 100755
index 00000000..7b815a5d
Binary files /dev/null and b/node_modules/supabase/bin/supabase differ
diff --git a/node_modules/supabase/package.json b/node_modules/supabase/package.json
new file mode 100644
index 00000000..eb714722
--- /dev/null
+++ b/node_modules/supabase/package.json
@@ -0,0 +1,45 @@
+{
+ "name": "supabase",
+ "version": "2.22.6",
+ "description": "Supabase CLI",
+ "repository": "supabase/cli",
+ "homepage": "https://supabase.com/docs/reference/cli",
+ "bugs": "https://github.com/supabase/cli/issues",
+ "license": "MIT",
+ "author": "Supabase",
+ "type": "module",
+ "engines": {
+ "npm": ">=8"
+ },
+ "files": [
+ "scripts"
+ ],
+ "scripts": {
+ "postinstall": "node scripts/postinstall.js"
+ },
+ "bin": {
+ "supabase": "bin/supabase"
+ },
+ "dependencies": {
+ "bin-links": "^5.0.0",
+ "https-proxy-agent": "^7.0.2",
+ "node-fetch": "^3.3.2",
+ "tar": "7.4.3"
+ },
+ "release": {
+ "branches": [
+ {
+ "name": "+([0-9])?(.{+([0-9]),x}).x",
+ "channel": "hotfix"
+ },
+ {
+ "name": "develop",
+ "channel": "beta"
+ }
+ ],
+ "plugins": [
+ "@semantic-release/commit-analyzer",
+ "@semantic-release/git"
+ ]
+ }
+}
diff --git a/node_modules/supabase/scripts/postinstall.js b/node_modules/supabase/scripts/postinstall.js
new file mode 100755
index 00000000..517617ff
--- /dev/null
+++ b/node_modules/supabase/scripts/postinstall.js
@@ -0,0 +1,180 @@
+#!/usr/bin/env node
+
+// Ref 1: https://github.com/sanathkr/go-npm
+// Ref 2: https://medium.com/xendit-engineering/how-we-repurposed-npm-to-publish-and-distribute-our-go-binaries-for-internal-cli-23981b80911b
+"use strict";
+
+import binLinks from "bin-links";
+import { createHash } from "crypto";
+import fs from "fs";
+import fetch from "node-fetch";
+import { Agent } from "https";
+import { HttpsProxyAgent } from "https-proxy-agent";
+import path from "path";
+import { extract } from "tar";
+import zlib from "zlib";
+
+// Mapping from Node's `process.arch` to Golang's `$GOARCH`
+const ARCH_MAPPING = {
+ x64: "amd64",
+ arm64: "arm64",
+};
+
+// Mapping between Node's `process.platform` to Golang's
+const PLATFORM_MAPPING = {
+ darwin: "darwin",
+ linux: "linux",
+ win32: "windows",
+};
+
+const arch = ARCH_MAPPING[process.arch];
+const platform = PLATFORM_MAPPING[process.platform];
+
+// TODO: import pkg from "../package.json" assert { type: "json" };
+const readPackageJson = async () => {
+ const contents = await fs.promises.readFile("package.json");
+ return JSON.parse(contents);
+};
+
+// Build the download url from package.json
+const getDownloadUrl = (packageJson) => {
+ const pkgName = packageJson.name;
+ const version = packageJson.version;
+ const repo = packageJson.repository;
+ const url = `https://github.com/${repo}/releases/download/v${version}/${pkgName}_${platform}_${arch}.tar.gz`;
+ return url;
+};
+
+const fetchAndParseCheckSumFile = async (packageJson, agent) => {
+ const version = packageJson.version;
+ const pkgName = packageJson.name;
+ const repo = packageJson.repository;
+ const checksumFileUrl = `https://github.com/${repo}/releases/download/v${version}/${pkgName}_${version}_checksums.txt`;
+
+ // Fetch the checksum file
+ console.info("Downloading", checksumFileUrl);
+ const response = await fetch(checksumFileUrl, { agent });
+ if (response.ok) {
+ const checkSumContent = await response.text();
+ const lines = checkSumContent.split("\n");
+
+ const checksums = {};
+ for (const line of lines) {
+ const [checksum, packageName] = line.split(/\s+/);
+ checksums[packageName] = checksum;
+ }
+
+ return checksums;
+ } else {
+ console.error(
+ "Could not fetch checksum file",
+ response.status,
+ response.statusText
+ );
+ }
+};
+
+const errGlobal = `Installing Supabase CLI as a global module is not supported.
+Please use one of the supported package managers: https://github.com/supabase/cli#install-the-cli
+`;
+const errChecksum = "Checksum mismatch. Downloaded data might be corrupted.";
+const errUnsupported = `Installation is not supported for ${process.platform} ${process.arch}`;
+
+/**
+ * Reads the configuration from application's package.json,
+ * downloads the binary from package url and stores at
+ * ./bin in the package's root.
+ *
+ * See: https://docs.npmjs.com/files/package.json#bin
+ */
+async function main() {
+ const yarnGlobal = JSON.parse(
+ process.env.npm_config_argv || "{}"
+ ).original?.includes("global");
+ if (process.env.npm_config_global || yarnGlobal) {
+ throw errGlobal;
+ }
+ if (!arch || !platform) {
+ throw errUnsupported;
+ }
+
+ // Read from package.json and prepare for the installation.
+ const pkg = await readPackageJson();
+ if (platform === "windows") {
+ // Update bin path in package.json
+ pkg.bin[pkg.name] += ".exe";
+ }
+
+ // Prepare the installation path by creating the directory if it doesn't exist.
+ const binPath = pkg.bin[pkg.name];
+ const binDir = path.dirname(binPath);
+ await fs.promises.mkdir(binDir, { recursive: true });
+
+ // Create the agent that will be used for all the fetch requests later.
+ const proxyUrl =
+ process.env.npm_config_https_proxy ||
+ process.env.npm_config_http_proxy ||
+ process.env.npm_config_proxy;
+ // Keeps the TCP connection alive when sending multiple requests
+ // Ref: https://github.com/node-fetch/node-fetch/issues/1735
+ const agent = proxyUrl
+ ? new HttpsProxyAgent(proxyUrl, { keepAlive: true })
+ : new Agent({ keepAlive: true });
+
+ // First, fetch the checksum map.
+ const checksumMap = await fetchAndParseCheckSumFile(pkg, agent);
+
+ // Then, download the binary.
+ const url = getDownloadUrl(pkg);
+ console.info("Downloading", url);
+ const resp = await fetch(url, { agent });
+ const hash = createHash("sha256");
+ const pkgNameWithPlatform = `${pkg.name}_${platform}_${arch}.tar.gz`;
+
+ // Then, decompress the binary -- we will first Un-GZip, then we will untar.
+ const ungz = zlib.createGunzip();
+ const binName = path.basename(binPath);
+ const untar = extract({ cwd: binDir }, [binName]);
+
+ // Update the hash with the binary data as it's being downloaded.
+ resp.body
+ .on("data", (chunk) => {
+ hash.update(chunk);
+ })
+ // Pipe the data to the ungz stream.
+ .pipe(ungz);
+
+ // After the ungz stream has ended, verify the checksum.
+ ungz
+ .on("end", () => {
+ const expectedChecksum = checksumMap?.[pkgNameWithPlatform];
+ // Skip verification if we can't find the file checksum
+ if (!expectedChecksum) {
+ console.warn("Skipping checksum verification");
+ return;
+ }
+ const calculatedChecksum = hash.digest("hex");
+ if (calculatedChecksum !== expectedChecksum) {
+ throw errChecksum;
+ }
+ console.info("Checksum verified.");
+ })
+ // Pipe the data to the untar stream.
+ .pipe(untar);
+
+ // Wait for the untar stream to finish.
+ await new Promise((resolve, reject) => {
+ untar.on("error", reject);
+ untar.on("end", () => resolve());
+ });
+
+ // Link the binaries in postinstall to support yarn
+ await binLinks({
+ path: path.resolve("."),
+ pkg: { ...pkg, bin: { [pkg.name]: binPath } },
+ });
+
+ console.info("Installed Supabase CLI successfully");
+}
+
+await main();
diff --git a/node_modules/tar/LICENSE b/node_modules/tar/LICENSE
new file mode 100644
index 00000000..19129e31
--- /dev/null
+++ b/node_modules/tar/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/tar/README.md b/node_modules/tar/README.md
new file mode 100644
index 00000000..feb225cc
--- /dev/null
+++ b/node_modules/tar/README.md
@@ -0,0 +1,1105 @@
+# node-tar
+
+Fast and full-featured Tar for Node.js
+
+The API is designed to mimic the behavior of `tar(1)` on unix systems.
+If you are familiar with how tar works, most of this will hopefully be
+straightforward for you. If not, then hopefully this module can teach
+you useful unix skills that may come in handy someday :)
+
+## Background
+
+A "tar file" or "tarball" is an archive of file system entries
+(directories, files, links, etc.) The name comes from "tape archive".
+If you run `man tar` on almost any Unix command line, you'll learn
+quite a bit about what it can do, and its history.
+
+Tar has 5 main top-level commands:
+
+- `c` Create an archive
+- `r` Replace entries within an archive
+- `u` Update entries within an archive (ie, replace if they're newer)
+- `t` List out the contents of an archive
+- `x` Extract an archive to disk
+
+The other flags and options modify how this top level function works.
+
+## High-Level API
+
+These 5 functions are the high-level API. All of them have a
+single-character name (for unix nerds familiar with `tar(1)`) as well
+as a long name (for everyone else).
+
+All the high-level functions take the following arguments, all three
+of which are optional and may be omitted.
+
+1. `options` - An optional object specifying various options
+2. `paths` - An array of paths to add or extract
+3. `callback` - Called when the command is completed, if async. (If
+ sync or no file specified, providing a callback throws a
+ `TypeError`.)
+
+If the command is sync (ie, if `options.sync=true`), then the
+callback is not allowed, since the action will be completed immediately.
+
+If a `file` argument is specified, and the command is async, then a
+`Promise` is returned. In this case, if async, a callback may be
+provided which is called when the command is completed.
+
+If a `file` option is not specified, then a stream is returned. For
+`create`, this is a readable stream of the generated archive. For
+`list` and `extract` this is a writable stream that an archive should
+be written into. If a file is not specified, then a callback is not
+allowed, because you're already getting a stream to work with.
+
+`replace` and `update` only work on existing archives, and so require
+a `file` argument.
+
+Sync commands without a file argument return a stream that acts on its
+input immediately in the same tick. For readable streams, this means
+that all of the data is immediately available by calling
+`stream.read()`. For writable streams, it will be acted upon as soon
+as it is provided, but this can be at any time.
+
+### Warnings and Errors
+
+Tar emits warnings and errors for recoverable and unrecoverable situations,
+respectively. In many cases, a warning only affects a single entry in an
+archive, or is simply informing you that it's modifying an entry to comply
+with the settings provided.
+
+Unrecoverable warnings will always raise an error (ie, emit `'error'` on
+streaming actions, throw for non-streaming sync actions, reject the
+returned Promise for non-streaming async operations, or call a provided
+callback with an `Error` as the first argument). Recoverable errors will
+raise an error only if `strict: true` is set in the options.
+
+Respond to (recoverable) warnings by listening to the `warn` event.
+Handlers receive 3 arguments:
+
+- `code` String. One of the error codes below. This may not match
+ `data.code`, which preserves the original error code from fs and zlib.
+- `message` String. More details about the error.
+- `data` Metadata about the error. An `Error` object for errors raised by
+ fs and zlib. All fields are attached to errors raisd by tar. Typically
+ contains the following fields, as relevant:
+ - `tarCode` The tar error code.
+ - `code` Either the tar error code, or the error code set by the
+ underlying system.
+ - `file` The archive file being read or written.
+ - `cwd` Working directory for creation and extraction operations.
+ - `entry` The entry object (if it could be created) for `TAR_ENTRY_INFO`,
+ `TAR_ENTRY_INVALID`, and `TAR_ENTRY_ERROR` warnings.
+ - `header` The header object (if it could be created, and the entry could
+ not be created) for `TAR_ENTRY_INFO` and `TAR_ENTRY_INVALID` warnings.
+ - `recoverable` Boolean. If `false`, then the warning will emit an
+ `error`, even in non-strict mode.
+
+#### Error Codes
+
+- `TAR_ENTRY_INFO` An informative error indicating that an entry is being
+ modified, but otherwise processed normally. For example, removing `/` or
+ `C:\` from absolute paths if `preservePaths` is not set.
+
+- `TAR_ENTRY_INVALID` An indication that a given entry is not a valid tar
+ archive entry, and will be skipped. This occurs when:
+
+ - a checksum fails,
+ - a `linkpath` is missing for a link type, or
+ - a `linkpath` is provided for a non-link type.
+
+ If every entry in a parsed archive raises an `TAR_ENTRY_INVALID` error,
+ then the archive is presumed to be unrecoverably broken, and
+ `TAR_BAD_ARCHIVE` will be raised.
+
+- `TAR_ENTRY_ERROR` The entry appears to be a valid tar archive entry, but
+ encountered an error which prevented it from being unpacked. This occurs
+ when:
+
+ - an unrecoverable fs error happens during unpacking,
+ - an entry is trying to extract into an excessively deep
+ location (by default, limited to 1024 subfolders),
+ - an entry has `..` in the path and `preservePaths` is not set, or
+ - an entry is extracting through a symbolic link, when `preservePaths` is
+ not set.
+
+- `TAR_ENTRY_UNSUPPORTED` An indication that a given entry is
+ a valid archive entry, but of a type that is unsupported, and so will be
+ skipped in archive creation or extracting.
+
+- `TAR_ABORT` When parsing gzipped-encoded archives, the parser will
+ abort the parse process raise a warning for any zlib errors encountered.
+ Aborts are considered unrecoverable for both parsing and unpacking.
+
+- `TAR_BAD_ARCHIVE` The archive file is totally hosed. This can happen for
+ a number of reasons, and always occurs at the end of a parse or extract:
+
+ - An entry body was truncated before seeing the full number of bytes.
+ - The archive contained only invalid entries, indicating that it is
+ likely not an archive, or at least, not an archive this library can
+ parse.
+
+ `TAR_BAD_ARCHIVE` is considered informative for parse operations, but
+ unrecoverable for extraction. Note that, if encountered at the end of an
+ extraction, tar WILL still have extracted as much it could from the
+ archive, so there may be some garbage files to clean up.
+
+Errors that occur deeper in the system (ie, either the filesystem or zlib)
+will have their error codes left intact, and a `tarCode` matching one of
+the above will be added to the warning metadata or the raised error object.
+
+Errors generated by tar will have one of the above codes set as the
+`error.code` field as well, but since errors originating in zlib or fs will
+have their original codes, it's better to read `error.tarCode` if you wish
+to see how tar is handling the issue.
+
+### Examples
+
+The API mimics the `tar(1)` command line functionality, with aliases
+for more human-readable option and function names. The goal is that
+if you know how to use `tar(1)` in Unix, then you know how to use
+`import('tar')` in JavaScript.
+
+To replicate `tar czf my-tarball.tgz files and folders`, you'd do:
+
+```js
+import { create } from 'tar'
+create(
+ {
+ gzip: <true|gzip options>,
+ file: 'my-tarball.tgz'
+ },
+ ['some', 'files', 'and', 'folders']
+).then(_ => { .. tarball has been created .. })
+```
+
+To replicate `tar cz files and folders > my-tarball.tgz`, you'd do:
+
+```js
+// if you're familiar with the tar(1) cli flags, this can be nice
+import * as tar from 'tar'
+tar.c(
+ {
+ // 'z' is alias for 'gzip' option
+ z: <true|gzip options>
+ },
+ ['some', 'files', 'and', 'folders']
+).pipe(fs.createWriteStream('my-tarball.tgz'))
+```
+
+To replicate `tar xf my-tarball.tgz` you'd do:
+
+```js
+tar.x( // or `tar.extract`
+ {
+ // or `file:`
+ f: 'my-tarball.tgz'
+ }
+).then(_=> { .. tarball has been dumped in cwd .. })
+```
+
+To replicate `cat my-tarball.tgz | tar x -C some-dir --strip=1`:
+
+```js
+fs.createReadStream('my-tarball.tgz').pipe(
+ tar.x({
+ strip: 1,
+ C: 'some-dir', // alias for cwd:'some-dir', also ok
+ }),
+)
+```
+
+To replicate `tar tf my-tarball.tgz`, do this:
+
+```js
+tar.t({
+ file: 'my-tarball.tgz',
+ onReadEntry: entry => { .. do whatever with it .. }
+})
+```
+
+For example, to just get the list of filenames from an archive:
+
+```js
+const getEntryFilenames = async tarballFilename => {
+ const filenames = []
+ await tar.t({
+ file: tarballFilename,
+ onReadEntry: entry => filenames.push(entry.path),
+ })
+ return filenames
+}
+```
+
+To replicate `cat my-tarball.tgz | tar t` do:
+
+```js
+fs.createReadStream('my-tarball.tgz')
+ .pipe(tar.t())
+ .on('entry', entry => { .. do whatever with it .. })
+```
+
+To do anything synchronous, add `sync: true` to the options. Note
+that sync functions don't take a callback and don't return a promise.
+When the function returns, it's already done. Sync methods without a
+file argument return a sync stream, which flushes immediately. But,
+of course, it still won't be done until you `.end()` it.
+
+```js
+const getEntryFilenamesSync = tarballFilename => {
+ const filenames = []
+ tar.t({
+ file: tarballFilename,
+ onReadEntry: entry => filenames.push(entry.path),
+ sync: true,
+ })
+ return filenames
+}
+```
+
+To filter entries, add `filter: <function>` to the options.
+Tar-creating methods call the filter with `filter(path, stat)`.
+Tar-reading methods (including extraction) call the filter with
+`filter(path, entry)`. The filter is called in the `this`-context of
+the `Pack` or `Unpack` stream object.
+
+The arguments list to `tar t` and `tar x` specify a list of filenames
+to extract or list, so they're equivalent to a filter that tests if
+the file is in the list.
+
+For those who _aren't_ fans of tar's single-character command names:
+
+```
+tar.c === tar.create
+tar.r === tar.replace (appends to archive, file is required)
+tar.u === tar.update (appends if newer, file is required)
+tar.x === tar.extract
+tar.t === tar.list
+```
+
+Keep reading for all the command descriptions and options, as well as
+the low-level API that they are built on.
+
+### tar.c(options, fileList, callback) [alias: tar.create]
+
+Create a tarball archive.
+
+The `fileList` is an array of paths to add to the tarball. Adding a
+directory also adds its children recursively.
+
+An entry in `fileList` that starts with an `@` symbol is a tar archive
+whose entries will be added. To add a file that starts with `@`,
+prepend it with `./`.
+
+The following options are supported:
+
+- `file` Write the tarball archive to the specified filename. If this
+ is specified, then the callback will be fired when the file has been
+ written, and a promise will be returned that resolves when the file
+ is written. If a filename is not specified, then a Readable Stream
+ will be returned which will emit the file data. [Alias: `f`]
+- `sync` Act synchronously. If this is set, then any provided file
+ will be fully written after the call to `tar.c`. If this is set,
+ and a file is not provided, then the resulting stream will already
+ have the data ready to `read` or `emit('data')` as soon as you
+ request it.
+- `onwarn` A function that will get called with `(code, message, data)` for
+ any warnings encountered. (See "Warnings and Errors")
+- `strict` Treat warnings as crash-worthy errors. Default false.
+- `cwd` The current working directory for creating the archive.
+ Defaults to `process.cwd()`. [Alias: `C`]
+- `prefix` A path portion to prefix onto the entries in the archive.
+- `gzip` Set to any truthy value to create a gzipped archive, or an
+ object with settings for `zlib.Gzip()` [Alias: `z`]
+- `filter` A function that gets called with `(path, stat)` for each
+ entry being added. Return `true` to add the entry to the archive,
+ or `false` to omit it.
+- `portable` Omit metadata that is system-specific: `ctime`, `atime`,
+ `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note
+ that `mtime` is still included, because this is necessary for other
+ time-based operations. Additionally, `mode` is set to a "reasonable
+ default" for most unix systems, based on a `umask` value of `0o22`.
+- `preservePaths` Allow absolute paths. By default, `/` is stripped
+ from absolute paths. [Alias: `P`]
+- `mode` The mode to set on the created file archive
+- `noDirRecurse` Do not recursively archive the contents of
+ directories. [Alias: `n`]
+- `follow` Set to true to pack the targets of symbolic links. Without
+ this option, symbolic links are archived as such. [Alias: `L`, `h`]
+- `noPax` Suppress pax extended headers. Note that this means that
+ long paths and linkpaths will be truncated, and large or negative
+ numeric values may be interpreted incorrectly.
+- `noMtime` Set to true to omit writing `mtime` values for entries.
+ Note that this prevents using other mtime-based features like
+ `tar.update` or the `keepNewer` option with the resulting tar archive.
+ [Alias: `m`, `no-mtime`]
+- `mtime` Set to a `Date` object to force a specific `mtime` for
+ everything added to the archive. Overridden by `noMtime`.
+- `onWriteEntry` Called with each `WriteEntry` or
+ `WriteEntrySync` that is created in the course of writing the
+ archive.
+
+The following options are mostly internal, but can be modified in some
+advanced use cases, such as re-using caches between runs.
+
+- `linkCache` A Map object containing the device and inode value for
+ any file whose nlink is > 1, to identify hard links.
+- `statCache` A Map object that caches calls `lstat`.
+- `readdirCache` A Map object that caches calls to `readdir`.
+- `jobs` A number specifying how many concurrent jobs to run.
+ Defaults to 4.
+- `maxReadSize` The maximum buffer size for `fs.read()` operations.
+ Defaults to 16 MB.
+
+### tar.x(options, fileList, callback) [alias: tar.extract]
+
+Extract a tarball archive.
+
+The `fileList` is an array of paths to extract from the tarball. If
+no paths are provided, then all the entries are extracted.
+
+If the archive is gzipped, then tar will detect this and unzip it.
+
+Note that all directories that are created will be forced to be
+writable, readable, and listable by their owner, to avoid cases where
+a directory prevents extraction of child entries by virtue of its
+mode.
+
+Most extraction errors will cause a `warn` event to be emitted. If
+the `cwd` is missing, or not a directory, then the extraction will
+fail completely.
+
+The following options are supported:
+
+- `cwd` Extract files relative to the specified directory. Defaults
+ to `process.cwd()`. If provided, this must exist and must be a
+ directory. [Alias: `C`]
+- `file` The archive file to extract. If not specified, then a
+ Writable stream is returned where the archive data should be
+ written. [Alias: `f`]
+- `sync` Create files and directories synchronously.
+- `strict` Treat warnings as crash-worthy errors. Default false.
+- `filter` A function that gets called with `(path, entry)` for each
+ entry being unpacked. Return `true` to unpack the entry from the
+ archive, or `false` to skip it.
+- `newer` Set to true to keep the existing file on disk if it's newer
+ than the file in the archive. [Alias: `keep-newer`,
+ `keep-newer-files`]
+- `keep` Do not overwrite existing files. In particular, if a file
+ appears more than once in an archive, later copies will not
+ overwrite earlier copies. [Alias: `k`, `keep-existing`]
+- `preservePaths` Allow absolute paths, paths containing `..`, and
+ extracting through symbolic links. By default, `/` is stripped from
+ absolute paths, `..` paths are not extracted, and any file whose
+ location would be modified by a symbolic link is not extracted.
+ [Alias: `P`]
+- `unlink` Unlink files before creating them. Without this option,
+ tar overwrites existing files, which preserves existing hardlinks.
+ With this option, existing hardlinks will be broken, as will any
+ symlink that would affect the location of an extracted file. [Alias:
+ `U`]
+- `strip` Remove the specified number of leading path elements.
+ Pathnames with fewer elements will be silently skipped. Note that
+ the pathname is edited after applying the filter, but before
+ security checks. [Alias: `strip-components`, `stripComponents`]
+- `onwarn` A function that will get called with `(code, message, data)` for
+ any warnings encountered. (See "Warnings and Errors")
+- `preserveOwner` If true, tar will set the `uid` and `gid` of
+ extracted entries to the `uid` and `gid` fields in the archive.
+ This defaults to true when run as root, and false otherwise. If
+ false, then files and directories will be set with the owner and
+ group of the user running the process. This is similar to `-p` in
+ `tar(1)`, but ACLs and other system-specific data is never unpacked
+ in this implementation, and modes are set by default already.
+ [Alias: `p`]
+- `uid` Set to a number to force ownership of all extracted files and
+ folders, and all implicitly created directories, to be owned by the
+ specified user id, regardless of the `uid` field in the archive.
+ Cannot be used along with `preserveOwner`. Requires also setting a
+ `gid` option.
+- `gid` Set to a number to force ownership of all extracted files and
+ folders, and all implicitly created directories, to be owned by the
+ specified group id, regardless of the `gid` field in the archive.
+ Cannot be used along with `preserveOwner`. Requires also setting a
+ `uid` option.
+- `noMtime` Set to true to omit writing `mtime` value for extracted
+ entries. [Alias: `m`, `no-mtime`]
+- `transform` Provide a function that takes an `entry` object, and
+ returns a stream, or any falsey value. If a stream is provided,
+ then that stream's data will be written instead of the contents of
+ the archive entry. If a falsey value is provided, then the entry is
+ written to disk as normal. (To exclude items from extraction, use
+ the `filter` option described above.)
+- `onReadEntry` A function that gets called with `(entry)` for each entry
+ that passes the filter.
+- `onwarn` A function that will get called with `(code, message, data)` for
+ any warnings encountered. (See "Warnings and Errors")
+- `chmod` Set to true to call `fs.chmod()` to ensure that the
+ extracted file matches the entry mode. This may necessitate a
+ call to the deprecated and thread-unsafe `process.umask()`
+ method to determine the default umask value, unless a
+ `processUmask` options is also provided. Otherwise tar will
+ extract with whatever mode is provided, and let the process
+ `umask` apply normally.
+- `processUmask` Set to an explicit numeric value to avoid
+ calling `process.umask()` when `chmod: true` is set.
+- `maxDepth` The maximum depth of subfolders to extract into. This
+ defaults to 1024. Anything deeper than the limit will raise a
+ warning and skip the entry. Set to `Infinity` to remove the
+ limitation.
+
+The following options are mostly internal, but can be modified in some
+advanced use cases, such as re-using caches between runs.
+
+- `maxReadSize` The maximum buffer size for `fs.read()` operations.
+ Defaults to 16 MB.
+- `umask` Filter the modes of entries like `process.umask()`.
+- `dmode` Default mode for directories
+- `fmode` Default mode for files
+- `dirCache` A Map object of which directories exist.
+- `maxMetaEntrySize` The maximum size of meta entries that is
+ supported. Defaults to 1 MB.
+
+Note that using an asynchronous stream type with the `transform`
+option will cause undefined behavior in sync extractions.
+[MiniPass](http://npm.im/minipass)-based streams are designed for this
+use case.
+
+### tar.t(options, fileList, callback) [alias: tar.list]
+
+List the contents of a tarball archive.
+
+The `fileList` is an array of paths to list from the tarball. If
+no paths are provided, then all the entries are listed.
+
+If the archive is gzipped, then tar will detect this and unzip it.
+
+If the `file` option is _not_ provided, then returns an event emitter that
+emits `entry` events with `tar.ReadEntry` objects. However, they don't
+emit `'data'` or `'end'` events. (If you want to get actual readable
+entries, use the `tar.Parse` class instead.)
+
+If a `file` option _is_ provided, then the return value will be a promise
+that resolves when the file has been fully traversed in async mode, or
+`undefined` if `sync: true` is set. Thus, you _must_ specify an `onReadEntry`
+method in order to do anything useful with the data it parses.
+
+The following options are supported:
+
+- `file` The archive file to list. If not specified, then a
+ Writable stream is returned where the archive data should be
+ written. [Alias: `f`]
+- `sync` Read the specified file synchronously. (This has no effect
+ when a file option isn't specified, because entries are emitted as
+ fast as they are parsed from the stream anyway.)
+- `strict` Treat warnings as crash-worthy errors. Default false.
+- `filter` A function that gets called with `(path, entry)` for each
+ entry being listed. Return `true` to emit the entry from the
+ archive, or `false` to skip it.
+- `onReadEntry` A function that gets called with `(entry)` for each entry
+ that passes the filter. This is important for when `file` is set,
+ because there is no other way to do anything useful with this method.
+- `maxReadSize` The maximum buffer size for `fs.read()` operations.
+ Defaults to 16 MB.
+- `noResume` By default, `entry` streams are resumed immediately after
+ the call to `onReadEntry`. Set `noResume: true` to suppress this
+ behavior. Note that by opting into this, the stream will never
+ complete until the entry data is consumed.
+- `onwarn` A function that will get called with `(code, message, data)` for
+ any warnings encountered. (See "Warnings and Errors")
+
+### tar.u(options, fileList, callback) [alias: tar.update]
+
+Add files to an archive if they are newer than the entry already in
+the tarball archive.
+
+The `fileList` is an array of paths to add to the tarball. Adding a
+directory also adds its children recursively.
+
+An entry in `fileList` that starts with an `@` symbol is a tar archive
+whose entries will be added. To add a file that starts with `@`,
+prepend it with `./`.
+
+The following options are supported:
+
+- `file` Required. Write the tarball archive to the specified
+ filename. [Alias: `f`]
+- `sync` Act synchronously. If this is set, then any provided file
+ will be fully written after the call to `tar.c`.
+- `onwarn` A function that will get called with `(code, message, data)` for
+ any warnings encountered. (See "Warnings and Errors")
+- `strict` Treat warnings as crash-worthy errors. Default false.
+- `cwd` The current working directory for adding entries to the
+ archive. Defaults to `process.cwd()`. [Alias: `C`]
+- `prefix` A path portion to prefix onto the entries in the archive.
+- `gzip` Set to any truthy value to create a gzipped archive, or an
+ object with settings for `zlib.Gzip()` [Alias: `z`]
+- `filter` A function that gets called with `(path, stat)` for each
+ entry being added. Return `true` to add the entry to the archive,
+ or `false` to omit it.
+- `portable` Omit metadata that is system-specific: `ctime`, `atime`,
+ `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note
+ that `mtime` is still included, because this is necessary for other
+ time-based operations. Additionally, `mode` is set to a "reasonable
+ default" for most unix systems, based on a `umask` value of `0o22`.
+- `preservePaths` Allow absolute paths. By default, `/` is stripped
+ from absolute paths. [Alias: `P`]
+- `maxReadSize` The maximum buffer size for `fs.read()` operations.
+ Defaults to 16 MB.
+- `noDirRecurse` Do not recursively archive the contents of
+ directories. [Alias: `n`]
+- `follow` Set to true to pack the targets of symbolic links. Without
+ this option, symbolic links are archived as such. [Alias: `L`, `h`]
+- `noPax` Suppress pax extended headers. Note that this means that
+ long paths and linkpaths will be truncated, and large or negative
+ numeric values may be interpreted incorrectly.
+- `noMtime` Set to true to omit writing `mtime` values for entries.
+ Note that this prevents using other mtime-based features like
+ `tar.update` or the `keepNewer` option with the resulting tar archive.
+ [Alias: `m`, `no-mtime`]
+- `mtime` Set to a `Date` object to force a specific `mtime` for
+ everything added to the archive. Overridden by `noMtime`.
+- `onWriteEntry` Called with each `WriteEntry` or
+ `WriteEntrySync` that is created in the course of writing the
+ archive.
+
+### tar.r(options, fileList, callback) [alias: tar.replace]
+
+Add files to an existing archive. Because later entries override
+earlier entries, this effectively replaces any existing entries.
+
+The `fileList` is an array of paths to add to the tarball. Adding a
+directory also adds its children recursively.
+
+An entry in `fileList` that starts with an `@` symbol is a tar archive
+whose entries will be added. To add a file that starts with `@`,
+prepend it with `./`.
+
+The following options are supported:
+
+- `file` Required. Write the tarball archive to the specified
+ filename. [Alias: `f`]
+- `sync` Act synchronously. If this is set, then any provided file
+ will be fully written after the call to `tar.c`.
+- `onwarn` A function that will get called with `(code, message, data)` for
+ any warnings encountered. (See "Warnings and Errors")
+- `strict` Treat warnings as crash-worthy errors. Default false.
+- `cwd` The current working directory for adding entries to the
+ archive. Defaults to `process.cwd()`. [Alias: `C`]
+- `prefix` A path portion to prefix onto the entries in the archive.
+- `gzip` Set to any truthy value to create a gzipped archive, or an
+ object with settings for `zlib.Gzip()` [Alias: `z`]
+- `filter` A function that gets called with `(path, stat)` for each
+ entry being added. Return `true` to add the entry to the archive,
+ or `false` to omit it.
+- `portable` Omit metadata that is system-specific: `ctime`, `atime`,
+ `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note
+ that `mtime` is still included, because this is necessary for other
+ time-based operations. Additionally, `mode` is set to a "reasonable
+ default" for most unix systems, based on a `umask` value of `0o22`.
+- `preservePaths` Allow absolute paths. By default, `/` is stripped
+ from absolute paths. [Alias: `P`]
+- `maxReadSize` The maximum buffer size for `fs.read()` operations.
+ Defaults to 16 MB.
+- `noDirRecurse` Do not recursively archive the contents of
+ directories. [Alias: `n`]
+- `follow` Set to true to pack the targets of symbolic links. Without
+ this option, symbolic links are archived as such. [Alias: `L`, `h`]
+- `noPax` Suppress pax extended headers. Note that this means that
+ long paths and linkpaths will be truncated, and large or negative
+ numeric values may be interpreted incorrectly.
+- `noMtime` Set to true to omit writing `mtime` values for entries.
+ Note that this prevents using other mtime-based features like
+ `tar.update` or the `keepNewer` option with the resulting tar archive.
+ [Alias: `m`, `no-mtime`]
+- `mtime` Set to a `Date` object to force a specific `mtime` for
+ everything added to the archive. Overridden by `noMtime`.
+- `onWriteEntry` Called with each `WriteEntry` or
+ `WriteEntrySync` that is created in the course of writing the
+ archive.
+
+## Low-Level API
+
+### class Pack
+
+A readable tar stream.
+
+Has all the standard readable stream interface stuff. `'data'` and
+`'end'` events, `read()` method, `pause()` and `resume()`, etc.
+
+#### constructor(options)
+
+The following options are supported:
+
+- `onwarn` A function that will get called with `(code, message, data)` for
+ any warnings encountered. (See "Warnings and Errors")
+- `strict` Treat warnings as crash-worthy errors. Default false.
+- `cwd` The current working directory for creating the archive.
+ Defaults to `process.cwd()`.
+- `prefix` A path portion to prefix onto the entries in the archive.
+- `gzip` Set to any truthy value to create a gzipped archive, or an
+ object with settings for `zlib.Gzip()`
+- `filter` A function that gets called with `(path, stat)` for each
+ entry being added. Return `true` to add the entry to the archive,
+ or `false` to omit it.
+- `portable` Omit metadata that is system-specific: `ctime`, `atime`,
+ `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note
+ that `mtime` is still included, because this is necessary for other
+ time-based operations. Additionally, `mode` is set to a "reasonable
+ default" for most unix systems, based on a `umask` value of `0o22`.
+- `preservePaths` Allow absolute paths. By default, `/` is stripped
+ from absolute paths.
+- `linkCache` A Map object containing the device and inode value for
+ any file whose nlink is > 1, to identify hard links.
+- `statCache` A Map object that caches calls `lstat`.
+- `readdirCache` A Map object that caches calls to `readdir`.
+- `jobs` A number specifying how many concurrent jobs to run.
+ Defaults to 4.
+- `maxReadSize` The maximum buffer size for `fs.read()` operations.
+ Defaults to 16 MB.
+- `noDirRecurse` Do not recursively archive the contents of
+ directories.
+- `follow` Set to true to pack the targets of symbolic links. Without
+ this option, symbolic links are archived as such.
+- `noPax` Suppress pax extended headers. Note that this means that
+ long paths and linkpaths will be truncated, and large or negative
+ numeric values may be interpreted incorrectly.
+- `noMtime` Set to true to omit writing `mtime` values for entries.
+ Note that this prevents using other mtime-based features like
+ `tar.update` or the `keepNewer` option with the resulting tar archive.
+- `mtime` Set to a `Date` object to force a specific `mtime` for
+ everything added to the archive. Overridden by `noMtime`.
+- `onWriteEntry` Called with each `WriteEntry` or
+ `WriteEntrySync` that is created in the course of writing the
+ archive.
+
+#### add(path)
+
+Adds an entry to the archive. Returns the Pack stream.
+
+#### write(path)
+
+Adds an entry to the archive. Returns true if flushed.
+
+#### end()
+
+Finishes the archive.
+
+### class PackSync
+
+Synchronous version of `Pack`.
+
+### class Unpack
+
+A writable stream that unpacks a tar archive onto the file system.
+
+All the normal writable stream stuff is supported. `write()` and
+`end()` methods, `'drain'` events, etc.
+
+Note that all directories that are created will be forced to be
+writable, readable, and listable by their owner, to avoid cases where
+a directory prevents extraction of child entries by virtue of its
+mode.
+
+`'close'` is emitted when it's done writing stuff to the file system.
+
+Most unpack errors will cause a `warn` event to be emitted. If the
+`cwd` is missing, or not a directory, then an error will be emitted.
+
+#### constructor(options)
+
+- `cwd` Extract files relative to the specified directory. Defaults
+ to `process.cwd()`. If provided, this must exist and must be a
+ directory.
+- `filter` A function that gets called with `(path, entry)` for each
+ entry being unpacked. Return `true` to unpack the entry from the
+ archive, or `false` to skip it.
+- `newer` Set to true to keep the existing file on disk if it's newer
+ than the file in the archive.
+- `keep` Do not overwrite existing files. In particular, if a file
+ appears more than once in an archive, later copies will not
+ overwrite earlier copies.
+- `preservePaths` Allow absolute paths, paths containing `..`, and
+ extracting through symbolic links. By default, `/` is stripped from
+ absolute paths, `..` paths are not extracted, and any file whose
+ location would be modified by a symbolic link is not extracted.
+- `unlink` Unlink files before creating them. Without this option,
+ tar overwrites existing files, which preserves existing hardlinks.
+ With this option, existing hardlinks will be broken, as will any
+ symlink that would affect the location of an extracted file.
+- `strip` Remove the specified number of leading path elements.
+ Pathnames with fewer elements will be silently skipped. Note that
+ the pathname is edited after applying the filter, but before
+ security checks.
+- `onwarn` A function that will get called with `(code, message, data)` for
+ any warnings encountered. (See "Warnings and Errors")
+- `umask` Filter the modes of entries like `process.umask()`.
+- `dmode` Default mode for directories
+- `fmode` Default mode for files
+- `dirCache` A Map object of which directories exist.
+- `maxMetaEntrySize` The maximum size of meta entries that is
+ supported. Defaults to 1 MB.
+- `preserveOwner` If true, tar will set the `uid` and `gid` of
+ extracted entries to the `uid` and `gid` fields in the archive.
+ This defaults to true when run as root, and false otherwise. If
+ false, then files and directories will be set with the owner and
+ group of the user running the process. This is similar to `-p` in
+ `tar(1)`, but ACLs and other system-specific data is never unpacked
+ in this implementation, and modes are set by default already.
+- `win32` True if on a windows platform. Causes behavior where
+ filenames containing `<|>?` chars are converted to
+ windows-compatible values while being unpacked.
+- `uid` Set to a number to force ownership of all extracted files and
+ folders, and all implicitly created directories, to be owned by the
+ specified user id, regardless of the `uid` field in the archive.
+ Cannot be used along with `preserveOwner`. Requires also setting a
+ `gid` option.
+- `gid` Set to a number to force ownership of all extracted files and
+ folders, and all implicitly created directories, to be owned by the
+ specified group id, regardless of the `gid` field in the archive.
+ Cannot be used along with `preserveOwner`. Requires also setting a
+ `uid` option.
+- `noMtime` Set to true to omit writing `mtime` value for extracted
+ entries.
+- `transform` Provide a function that takes an `entry` object, and
+ returns a stream, or any falsey value. If a stream is provided,
+ then that stream's data will be written instead of the contents of
+ the archive entry. If a falsey value is provided, then the entry is
+ written to disk as normal. (To exclude items from extraction, use
+ the `filter` option described above.)
+- `strict` Treat warnings as crash-worthy errors. Default false.
+- `onReadEntry` A function that gets called with `(entry)` for each entry
+ that passes the filter.
+- `onwarn` A function that will get called with `(code, message, data)` for
+ any warnings encountered. (See "Warnings and Errors")
+- `chmod` Set to true to call `fs.chmod()` to ensure that the
+ extracted file matches the entry mode. This may necessitate a
+ call to the deprecated and thread-unsafe `process.umask()`
+ method to determine the default umask value, unless a
+ `processUmask` options is also provided. Otherwise tar will
+ extract with whatever mode is provided, and let the process
+ `umask` apply normally.
+- `processUmask` Set to an explicit numeric value to avoid
+ calling `process.umask()` when `chmod: true` is set.
+- `maxDepth` The maximum depth of subfolders to extract into. This
+ defaults to 1024. Anything deeper than the limit will raise a
+ warning and skip the entry. Set to `Infinity` to remove the
+ limitation.
+
+### class UnpackSync
+
+Synchronous version of `Unpack`.
+
+Note that using an asynchronous stream type with the `transform`
+option will cause undefined behavior in sync unpack streams.
+[MiniPass](http://npm.im/minipass)-based streams are designed for this
+use case.
+
+### class tar.Parse
+
+A writable stream that parses a tar archive stream. All the standard
+writable stream stuff is supported.
+
+If the archive is gzipped, then tar will detect this and unzip it.
+
+Emits `'entry'` events with `tar.ReadEntry` objects, which are
+themselves readable streams that you can pipe wherever.
+
+Each `entry` will not emit until the one before it is flushed through,
+so make sure to either consume the data (with `on('data', ...)` or
+`.pipe(...)`) or throw it away with `.resume()` to keep the stream
+flowing.
+
+#### constructor(options)
+
+Returns an event emitter that emits `entry` events with
+`tar.ReadEntry` objects.
+
+The following options are supported:
+
+- `strict` Treat warnings as crash-worthy errors. Default false.
+- `filter` A function that gets called with `(path, entry)` for each
+ entry being listed. Return `true` to emit the entry from the
+ archive, or `false` to skip it.
+- `onReadEntry` A function that gets called with `(entry)` for each entry
+ that passes the filter.
+- `onwarn` A function that will get called with `(code, message, data)` for
+ any warnings encountered. (See "Warnings and Errors")
+
+#### abort(error)
+
+Stop all parsing activities. This is called when there are zlib
+errors. It also emits an unrecoverable warning with the error provided.
+
+### class tar.ReadEntry extends [MiniPass](http://npm.im/minipass)
+
+A representation of an entry that is being read out of a tar archive.
+
+It has the following fields:
+
+- `extended` The extended metadata object provided to the constructor.
+- `globalExtended` The global extended metadata object provided to the
+ constructor.
+- `remain` The number of bytes remaining to be written into the
+ stream.
+- `blockRemain` The number of 512-byte blocks remaining to be written
+ into the stream.
+- `ignore` Whether this entry should be ignored.
+- `meta` True if this represents metadata about the next entry, false
+ if it represents a filesystem object.
+- All the fields from the header, extended header, and global extended
+ header are added to the ReadEntry object. So it has `path`, `type`,
+ `size`, `mode`, and so on.
+
+#### constructor(header, extended, globalExtended)
+
+Create a new ReadEntry object with the specified header, extended
+header, and global extended header values.
+
+### class tar.WriteEntry extends [MiniPass](http://npm.im/minipass)
+
+A representation of an entry that is being written from the file
+system into a tar archive.
+
+Emits data for the Header, and for the Pax Extended Header if one is
+required, as well as any body data.
+
+Creating a WriteEntry for a directory does not also create
+WriteEntry objects for all of the directory contents.
+
+It has the following fields:
+
+- `path` The path field that will be written to the archive. By
+ default, this is also the path from the cwd to the file system
+ object.
+- `portable` Omit metadata that is system-specific: `ctime`, `atime`,
+ `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note
+ that `mtime` is still included, because this is necessary for other
+ time-based operations. Additionally, `mode` is set to a "reasonable
+ default" for most unix systems, based on a `umask` value of `0o22`.
+- `myuid` If supported, the uid of the user running the current
+ process.
+- `myuser` The `env.USER` string if set, or `''`. Set as the entry
+ `uname` field if the file's `uid` matches `this.myuid`.
+- `maxReadSize` The maximum buffer size for `fs.read()` operations.
+ Defaults to 1 MB.
+- `linkCache` A Map object containing the device and inode value for
+ any file whose nlink is > 1, to identify hard links.
+- `statCache` A Map object that caches calls `lstat`.
+- `preservePaths` Allow absolute paths. By default, `/` is stripped
+ from absolute paths.
+- `cwd` The current working directory for creating the archive.
+ Defaults to `process.cwd()`.
+- `absolute` The absolute path to the entry on the filesystem. By
+ default, this is `path.resolve(this.cwd, this.path)`, but it can be
+ overridden explicitly.
+- `strict` Treat warnings as crash-worthy errors. Default false.
+- `win32` True if on a windows platform. Causes behavior where paths
+ replace `\` with `/` and filenames containing the windows-compatible
+ forms of `<|>?:` characters are converted to actual `<|>?:` characters
+ in the archive.
+- `noPax` Suppress pax extended headers. Note that this means that
+ long paths and linkpaths will be truncated, and large or negative
+ numeric values may be interpreted incorrectly.
+- `noMtime` Set to true to omit writing `mtime` values for entries.
+ Note that this prevents using other mtime-based features like
+ `tar.update` or the `keepNewer` option with the resulting tar archive.
+
+#### constructor(path, options)
+
+`path` is the path of the entry as it is written in the archive.
+
+The following options are supported:
+
+- `portable` Omit metadata that is system-specific: `ctime`, `atime`,
+ `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note
+ that `mtime` is still included, because this is necessary for other
+ time-based operations. Additionally, `mode` is set to a "reasonable
+ default" for most unix systems, based on a `umask` value of `0o22`.
+- `maxReadSize` The maximum buffer size for `fs.read()` operations.
+ Defaults to 1 MB.
+- `linkCache` A Map object containing the device and inode value for
+ any file whose nlink is > 1, to identify hard links.
+- `statCache` A Map object that caches calls `lstat`.
+- `preservePaths` Allow absolute paths. By default, `/` is stripped
+ from absolute paths.
+- `cwd` The current working directory for creating the archive.
+ Defaults to `process.cwd()`.
+- `absolute` The absolute path to the entry on the filesystem. By
+ default, this is `path.resolve(this.cwd, this.path)`, but it can be
+ overridden explicitly.
+- `strict` Treat warnings as crash-worthy errors. Default false.
+- `win32` True if on a windows platform. Causes behavior where paths
+ replace `\` with `/`.
+- `onwarn` A function that will get called with `(code, message, data)` for
+ any warnings encountered. (See "Warnings and Errors")
+- `noMtime` Set to true to omit writing `mtime` values for entries.
+ Note that this prevents using other mtime-based features like
+ `tar.update` or the `keepNewer` option with the resulting tar archive.
+- `umask` Set to restrict the modes on the entries in the archive,
+ somewhat like how umask works on file creation. Defaults to
+ `process.umask()` on unix systems, or `0o22` on Windows.
+
+#### warn(message, data)
+
+If strict, emit an error with the provided message.
+
+Othewise, emit a `'warn'` event with the provided message and data.
+
+### class tar.WriteEntry.Sync
+
+Synchronous version of tar.WriteEntry
+
+### class tar.WriteEntry.Tar
+
+A version of tar.WriteEntry that gets its data from a tar.ReadEntry
+instead of from the filesystem.
+
+#### constructor(readEntry, options)
+
+`readEntry` is the entry being read out of another archive.
+
+The following options are supported:
+
+- `portable` Omit metadata that is system-specific: `ctime`, `atime`,
+ `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note
+ that `mtime` is still included, because this is necessary for other
+ time-based operations. Additionally, `mode` is set to a "reasonable
+ default" for most unix systems, based on a `umask` value of `0o22`.
+- `preservePaths` Allow absolute paths. By default, `/` is stripped
+ from absolute paths.
+- `strict` Treat warnings as crash-worthy errors. Default false.
+- `onwarn` A function that will get called with `(code, message, data)` for
+ any warnings encountered. (See "Warnings and Errors")
+- `noMtime` Set to true to omit writing `mtime` values for entries.
+ Note that this prevents using other mtime-based features like
+ `tar.update` or the `keepNewer` option with the resulting tar archive.
+
+### class tar.Header
+
+A class for reading and writing header blocks.
+
+It has the following fields:
+
+- `nullBlock` True if decoding a block which is entirely composed of
+ `0x00` null bytes. (Useful because tar files are terminated by
+ at least 2 null blocks.)
+- `cksumValid` True if the checksum in the header is valid, false
+ otherwise.
+- `needPax` True if the values, as encoded, will require a Pax
+ extended header.
+- `path` The path of the entry.
+- `mode` The 4 lowest-order octal digits of the file mode. That is,
+ read/write/execute permissions for world, group, and owner, and the
+ setuid, setgid, and sticky bits.
+- `uid` Numeric user id of the file owner
+- `gid` Numeric group id of the file owner
+- `size` Size of the file in bytes
+- `mtime` Modified time of the file
+- `cksum` The checksum of the header. This is generated by adding all
+ the bytes of the header block, treating the checksum field itself as
+ all ascii space characters (that is, `0x20`).
+- `type` The human-readable name of the type of entry this represents,
+ or the alphanumeric key if unknown.
+- `typeKey` The alphanumeric key for the type of entry this header
+ represents.
+- `linkpath` The target of Link and SymbolicLink entries.
+- `uname` Human-readable user name of the file owner
+- `gname` Human-readable group name of the file owner
+- `devmaj` The major portion of the device number. Always `0` for
+ files, directories, and links.
+- `devmin` The minor portion of the device number. Always `0` for
+ files, directories, and links.
+- `atime` File access time.
+- `ctime` File change time.
+
+#### constructor(data, [offset=0])
+
+`data` is optional. It is either a Buffer that should be interpreted
+as a tar Header starting at the specified offset and continuing for
+512 bytes, or a data object of keys and values to set on the header
+object, and eventually encode as a tar Header.
+
+#### decode(block, offset)
+
+Decode the provided buffer starting at the specified offset.
+
+Buffer length must be greater than 512 bytes.
+
+#### set(data)
+
+Set the fields in the data object.
+
+#### encode(buffer, offset)
+
+Encode the header fields into the buffer at the specified offset.
+
+Returns `this.needPax` to indicate whether a Pax Extended Header is
+required to properly encode the specified data.
+
+### class tar.Pax
+
+An object representing a set of key-value pairs in an Pax extended
+header entry.
+
+It has the following fields. Where the same name is used, they have
+the same semantics as the tar.Header field of the same name.
+
+- `global` True if this represents a global extended header, or false
+ if it is for a single entry.
+- `atime`
+- `charset`
+- `comment`
+- `ctime`
+- `gid`
+- `gname`
+- `linkpath`
+- `mtime`
+- `path`
+- `size`
+- `uid`
+- `uname`
+- `dev`
+- `ino`
+- `nlink`
+
+#### constructor(object, global)
+
+Set the fields set in the object. `global` is a boolean that defaults
+to false.
+
+#### encode()
+
+Return a Buffer containing the header and body for the Pax extended
+header entry, or `null` if there is nothing to encode.
+
+#### encodeBody()
+
+Return a string representing the body of the pax extended header
+entry.
+
+#### encodeField(fieldName)
+
+Return a string representing the key/value encoding for the specified
+fieldName, or `''` if the field is unset.
+
+### tar.Pax.parse(string, extended, global)
+
+Return a new Pax object created by parsing the contents of the string
+provided.
+
+If the `extended` object is set, then also add the fields from that
+object. (This is necessary because multiple metadata entries can
+occur in sequence.)
+
+### tar.types
+
+A translation table for the `type` field in tar headers.
+
+#### tar.types.name.get(code)
+
+Get the human-readable name for a given alphanumeric code.
+
+#### tar.types.code.get(name)
+
+Get the alphanumeric code for a given human-readable name.
diff --git a/node_modules/tar/node_modules/.bin/mkdirp b/node_modules/tar/node_modules/.bin/mkdirp
new file mode 120000
index 00000000..33f8e24d
--- /dev/null
+++ b/node_modules/tar/node_modules/.bin/mkdirp
@@ -0,0 +1 @@
+../../../mkdirp/dist/cjs/src/bin.js
\ No newline at end of file
diff --git a/node_modules/tar/package.json b/node_modules/tar/package.json
new file mode 100644
index 00000000..0283103e
--- /dev/null
+++ b/node_modules/tar/package.json
@@ -0,0 +1,325 @@
+{
+ "author": "Isaac Z. Schlueter",
+ "name": "tar",
+ "description": "tar for node",
+ "version": "7.4.3",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/isaacs/node-tar.git"
+ },
+ "scripts": {
+ "genparse": "node scripts/generate-parse-fixtures.js",
+ "snap": "tap",
+ "test": "tap",
+ "pretest": "npm run prepare",
+ "presnap": "npm run prepare",
+ "prepare": "tshy",
+ "preversion": "npm test",
+ "postversion": "npm publish",
+ "prepublishOnly": "git push origin --follow-tags",
+ "format": "prettier --write . --log-level warn",
+ "typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts"
+ },
+ "dependencies": {
+ "@isaacs/fs-minipass": "^4.0.0",
+ "chownr": "^3.0.0",
+ "minipass": "^7.1.2",
+ "minizlib": "^3.0.1",
+ "mkdirp": "^3.0.1",
+ "yallist": "^5.0.0"
+ },
+ "devDependencies": {
+ "chmodr": "^1.2.0",
+ "end-of-stream": "^1.4.3",
+ "events-to-array": "^2.0.3",
+ "mutate-fs": "^2.1.1",
+ "nock": "^13.5.4",
+ "prettier": "^3.2.5",
+ "rimraf": "^5.0.5",
+ "tap": "^18.7.2",
+ "tshy": "^1.13.1",
+ "typedoc": "^0.25.13"
+ },
+ "license": "ISC",
+ "engines": {
+ "node": ">=18"
+ },
+ "files": [
+ "dist"
+ ],
+ "tap": {
+ "coverage-map": "map.js",
+ "timeout": 0,
+ "typecheck": true
+ },
+ "prettier": {
+ "experimentalTernaries": true,
+ "semi": false,
+ "printWidth": 70,
+ "tabWidth": 2,
+ "useTabs": false,
+ "singleQuote": true,
+ "jsxSingleQuote": false,
+ "bracketSameLine": true,
+ "arrowParens": "avoid",
+ "endOfLine": "lf"
+ },
+ "tshy": {
+ "exports": {
+ "./package.json": "./package.json",
+ ".": "./src/index.ts",
+ "./c": "./src/create.ts",
+ "./create": "./src/create.ts",
+ "./replace": "./src/create.ts",
+ "./r": "./src/create.ts",
+ "./list": "./src/list.ts",
+ "./t": "./src/list.ts",
+ "./update": "./src/update.ts",
+ "./u": "./src/update.ts",
+ "./extract": "./src/extract.ts",
+ "./x": "./src/extract.ts",
+ "./pack": "./src/pack.ts",
+ "./unpack": "./src/unpack.ts",
+ "./parse": "./src/parse.ts",
+ "./read-entry": "./src/read-entry.ts",
+ "./write-entry": "./src/write-entry.ts",
+ "./header": "./src/header.ts",
+ "./pax": "./src/pax.ts",
+ "./types": "./src/types.ts"
+ }
+ },
+ "exports": {
+ "./package.json": "./package.json",
+ ".": {
+ "import": {
+ "source": "./src/index.ts",
+ "types": "./dist/esm/index.d.ts",
+ "default": "./dist/esm/index.js"
+ },
+ "require": {
+ "source": "./src/index.ts",
+ "types": "./dist/commonjs/index.d.ts",
+ "default": "./dist/commonjs/index.js"
+ }
+ },
+ "./c": {
+ "import": {
+ "source": "./src/create.ts",
+ "types": "./dist/esm/create.d.ts",
+ "default": "./dist/esm/create.js"
+ },
+ "require": {
+ "source": "./src/create.ts",
+ "types": "./dist/commonjs/create.d.ts",
+ "default": "./dist/commonjs/create.js"
+ }
+ },
+ "./create": {
+ "import": {
+ "source": "./src/create.ts",
+ "types": "./dist/esm/create.d.ts",
+ "default": "./dist/esm/create.js"
+ },
+ "require": {
+ "source": "./src/create.ts",
+ "types": "./dist/commonjs/create.d.ts",
+ "default": "./dist/commonjs/create.js"
+ }
+ },
+ "./replace": {
+ "import": {
+ "source": "./src/create.ts",
+ "types": "./dist/esm/create.d.ts",
+ "default": "./dist/esm/create.js"
+ },
+ "require": {
+ "source": "./src/create.ts",
+ "types": "./dist/commonjs/create.d.ts",
+ "default": "./dist/commonjs/create.js"
+ }
+ },
+ "./r": {
+ "import": {
+ "source": "./src/create.ts",
+ "types": "./dist/esm/create.d.ts",
+ "default": "./dist/esm/create.js"
+ },
+ "require": {
+ "source": "./src/create.ts",
+ "types": "./dist/commonjs/create.d.ts",
+ "default": "./dist/commonjs/create.js"
+ }
+ },
+ "./list": {
+ "import": {
+ "source": "./src/list.ts",
+ "types": "./dist/esm/list.d.ts",
+ "default": "./dist/esm/list.js"
+ },
+ "require": {
+ "source": "./src/list.ts",
+ "types": "./dist/commonjs/list.d.ts",
+ "default": "./dist/commonjs/list.js"
+ }
+ },
+ "./t": {
+ "import": {
+ "source": "./src/list.ts",
+ "types": "./dist/esm/list.d.ts",
+ "default": "./dist/esm/list.js"
+ },
+ "require": {
+ "source": "./src/list.ts",
+ "types": "./dist/commonjs/list.d.ts",
+ "default": "./dist/commonjs/list.js"
+ }
+ },
+ "./update": {
+ "import": {
+ "source": "./src/update.ts",
+ "types": "./dist/esm/update.d.ts",
+ "default": "./dist/esm/update.js"
+ },
+ "require": {
+ "source": "./src/update.ts",
+ "types": "./dist/commonjs/update.d.ts",
+ "default": "./dist/commonjs/update.js"
+ }
+ },
+ "./u": {
+ "import": {
+ "source": "./src/update.ts",
+ "types": "./dist/esm/update.d.ts",
+ "default": "./dist/esm/update.js"
+ },
+ "require": {
+ "source": "./src/update.ts",
+ "types": "./dist/commonjs/update.d.ts",
+ "default": "./dist/commonjs/update.js"
+ }
+ },
+ "./extract": {
+ "import": {
+ "source": "./src/extract.ts",
+ "types": "./dist/esm/extract.d.ts",
+ "default": "./dist/esm/extract.js"
+ },
+ "require": {
+ "source": "./src/extract.ts",
+ "types": "./dist/commonjs/extract.d.ts",
+ "default": "./dist/commonjs/extract.js"
+ }
+ },
+ "./x": {
+ "import": {
+ "source": "./src/extract.ts",
+ "types": "./dist/esm/extract.d.ts",
+ "default": "./dist/esm/extract.js"
+ },
+ "require": {
+ "source": "./src/extract.ts",
+ "types": "./dist/commonjs/extract.d.ts",
+ "default": "./dist/commonjs/extract.js"
+ }
+ },
+ "./pack": {
+ "import": {
+ "source": "./src/pack.ts",
+ "types": "./dist/esm/pack.d.ts",
+ "default": "./dist/esm/pack.js"
+ },
+ "require": {
+ "source": "./src/pack.ts",
+ "types": "./dist/commonjs/pack.d.ts",
+ "default": "./dist/commonjs/pack.js"
+ }
+ },
+ "./unpack": {
+ "import": {
+ "source": "./src/unpack.ts",
+ "types": "./dist/esm/unpack.d.ts",
+ "default": "./dist/esm/unpack.js"
+ },
+ "require": {
+ "source": "./src/unpack.ts",
+ "types": "./dist/commonjs/unpack.d.ts",
+ "default": "./dist/commonjs/unpack.js"
+ }
+ },
+ "./parse": {
+ "import": {
+ "source": "./src/parse.ts",
+ "types": "./dist/esm/parse.d.ts",
+ "default": "./dist/esm/parse.js"
+ },
+ "require": {
+ "source": "./src/parse.ts",
+ "types": "./dist/commonjs/parse.d.ts",
+ "default": "./dist/commonjs/parse.js"
+ }
+ },
+ "./read-entry": {
+ "import": {
+ "source": "./src/read-entry.ts",
+ "types": "./dist/esm/read-entry.d.ts",
+ "default": "./dist/esm/read-entry.js"
+ },
+ "require": {
+ "source": "./src/read-entry.ts",
+ "types": "./dist/commonjs/read-entry.d.ts",
+ "default": "./dist/commonjs/read-entry.js"
+ }
+ },
+ "./write-entry": {
+ "import": {
+ "source": "./src/write-entry.ts",
+ "types": "./dist/esm/write-entry.d.ts",
+ "default": "./dist/esm/write-entry.js"
+ },
+ "require": {
+ "source": "./src/write-entry.ts",
+ "types": "./dist/commonjs/write-entry.d.ts",
+ "default": "./dist/commonjs/write-entry.js"
+ }
+ },
+ "./header": {
+ "import": {
+ "source": "./src/header.ts",
+ "types": "./dist/esm/header.d.ts",
+ "default": "./dist/esm/header.js"
+ },
+ "require": {
+ "source": "./src/header.ts",
+ "types": "./dist/commonjs/header.d.ts",
+ "default": "./dist/commonjs/header.js"
+ }
+ },
+ "./pax": {
+ "import": {
+ "source": "./src/pax.ts",
+ "types": "./dist/esm/pax.d.ts",
+ "default": "./dist/esm/pax.js"
+ },
+ "require": {
+ "source": "./src/pax.ts",
+ "types": "./dist/commonjs/pax.d.ts",
+ "default": "./dist/commonjs/pax.js"
+ }
+ },
+ "./types": {
+ "import": {
+ "source": "./src/types.ts",
+ "types": "./dist/esm/types.d.ts",
+ "default": "./dist/esm/types.js"
+ },
+ "require": {
+ "source": "./src/types.ts",
+ "types": "./dist/commonjs/types.d.ts",
+ "default": "./dist/commonjs/types.js"
+ }
+ }
+ },
+ "type": "module",
+ "main": "./dist/commonjs/index.js",
+ "types": "./dist/commonjs/index.d.ts"
+}
diff --git a/node_modules/web-streams-polyfill/LICENSE b/node_modules/web-streams-polyfill/LICENSE
new file mode 100644
index 00000000..9fe85ac0
--- /dev/null
+++ b/node_modules/web-streams-polyfill/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2024 Mattias Buelens
+Copyright (c) 2016 Diwank Singh Tomer
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/web-streams-polyfill/README.md b/node_modules/web-streams-polyfill/README.md
new file mode 100644
index 00000000..f4023ff0
--- /dev/null
+++ b/node_modules/web-streams-polyfill/README.md
@@ -0,0 +1,110 @@
+# web-streams-polyfill
+
+Web Streams, based on the WHATWG spec reference implementation.
+
+[![build status](https://api.travis-ci.com/MattiasBuelens/web-streams-polyfill.svg?branch=master)](https://travis-ci.com/MattiasBuelens/web-streams-polyfill)
+[![npm version](https://img.shields.io/npm/v/web-streams-polyfill.svg)](https://www.npmjs.com/package/web-streams-polyfill)
+[![license](https://img.shields.io/npm/l/web-streams-polyfill.svg)](https://github.com/MattiasBuelens/web-streams-polyfill/blob/master/LICENSE)
+
+## Links
+
+ - [Official spec][spec]
+ - [Reference implementation][ref-impl]
+
+## Usage
+
+This library comes in multiple variants:
+* `web-streams-polyfill`: a polyfill that replaces the native stream implementations.
+ Recommended for use in web apps supporting older browsers through a `<script>` tag.
+* `web-streams-polyfill/es6`: a polyfill targeting ES2015+ environments.
+ Recommended for use in web apps supporting modern browsers through a `<script>` tag.
+* `web-streams-polyfill/es2018`: a polyfill targeting ES2018+ environments.
+* `web-streams-polyfill/ponyfill`: a [ponyfill] that provides
+ the stream implementations without replacing any globals.
+ Recommended for use in legacy Node applications, or in web libraries supporting older browsers.
+* `web-streams-polyfill/ponyfill/es6`: a ponyfill targeting ES2015+ environments.
+ Recommended for use in Node 6+ applications, or in web libraries supporting modern browsers.
+* `web-streams-polyfill/ponyfill/es2018`: a ponyfill targeting ES2018+ environments.
+ Recommended for use in Node 10+ applications.
+
+Each variant also includes TypeScript type definitions, compatible with the DOM type definitions for streams included in TypeScript.
+
+Usage as a polyfill:
+```html
+<!-- option 1: hosted by unpkg CDN -->
+<script src="https://unpkg.com/web-streams-polyfill/dist/polyfill.min.js"></script>
+<!-- option 2: self hosted -->
+<script src="/path/to/web-streams-polyfill/dist/polyfill.min.js"></script>
+<script>
+var readable = new ReadableStream();
+</script>
+```
+Usage as a Node module:
+```js
+var streams = require("web-streams-polyfill/ponyfill");
+var readable = new streams.ReadableStream();
+```
+Usage as a ES2015 module:
+```js
+import { ReadableStream } from "web-streams-polyfill/ponyfill";
+const readable = new ReadableStream();
+```
+
+## Compatibility
+
+The `polyfill` and `ponyfill` variants work in any ES5-compatible environment that has a global `Promise`.
+If you need to support older browsers or Node versions that do not have a native `Promise` implementation
+(check the [support table][promise-support]), you must first include a `Promise` polyfill
+(e.g. [promise-polyfill][promise-polyfill]).
+
+The `polyfill/es6` and `ponyfill/es6` variants work in any ES2015-compatible environment.
+
+The `polyfill/es2018` and `ponyfill/es2018` variants work in any ES2018-compatible environment.
+
+[Async iterable support for `ReadableStream`][rs-asynciterator] is available in all variants, but requires an ES2018-compatible environment or a polyfill for `Symbol.asyncIterator`.
+
+[`WritableStreamDefaultController.signal`][ws-controller-signal] is available in all variants, but requires a global `AbortController` constructor. If necessary, consider using a polyfill such as [abortcontroller-polyfill].
+
+[Reading with a BYOB reader][mdn-byob-read] is available in all variants, but requires `ArrayBuffer.prototype.transfer()` or `structuredClone()` to exist in order to correctly transfer the given view's buffer. If not available, then the buffer won't be transferred during the read.
+
+## Compliance
+
+The polyfill implements [version `4dc123a` (13 Nov 2023)][spec-snapshot] of the streams specification.
+
+The polyfill is tested against the same [web platform tests][wpt] that are used by browsers to test their native implementations.
+The polyfill aims to pass all tests, although it allows some exceptions for practical reasons:
+* The `es2018` variant passes all of the tests.
+* The `es6` variant passes the same tests as the `es2018` variant, except for the [test for the prototype of `ReadableStream`'s async iterator][wpt-async-iterator-prototype].
+ Retrieving the correct `%AsyncIteratorPrototype%` requires using an async generator (`async function* () {}`), which is invalid syntax before ES2018.
+ Instead, the polyfill [creates its own version][stub-async-iterator-prototype] which is functionally equivalent to the real prototype.
+* The `es5` variant passes the same tests as the `es6` variant, except for various tests about specific characteristics of the constructors, properties and methods.
+ These test failures do not affect the run-time behavior of the polyfill.
+ For example:
+ * The `name` property of down-leveled constructors is incorrect.
+ * The `length` property of down-leveled constructors and methods with optional arguments is incorrect.
+ * Not all properties and methods are correctly marked as non-enumerable.
+ * Down-leveled class methods are not correctly marked as non-constructable.
+
+The type definitions are compatible with the built-in stream types of TypeScript 3.3.
+
+## Contributors
+
+Thanks to these people for their work on [the original polyfill][creatorrr-polyfill]:
+
+ - Diwank Singh Tomer ([creatorrr](https://github.com/creatorrr))
+ - Anders Riutta ([ariutta](https://github.com/ariutta))
+
+[spec]: https://streams.spec.whatwg.org
+[ref-impl]: https://github.com/whatwg/streams
+[ponyfill]: https://github.com/sindresorhus/ponyfill
+[promise-support]: https://kangax.github.io/compat-table/es6/#test-Promise
+[promise-polyfill]: https://www.npmjs.com/package/promise-polyfill
+[rs-asynciterator]: https://streams.spec.whatwg.org/#rs-asynciterator
+[ws-controller-signal]: https://streams.spec.whatwg.org/#ws-default-controller-signal
+[abortcontroller-polyfill]: https://www.npmjs.com/package/abortcontroller-polyfill
+[mdn-byob-read]: https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamBYOBReader/read
+[spec-snapshot]: https://streams.spec.whatwg.org/commit-snapshots/4dc123a6e7f7ba89a8c6a7975b021156f39cab52/
+[wpt]: https://github.com/web-platform-tests/wpt/tree/2a298b616b7c865917d7198a287310881cbfdd8d/streams
+[wpt-async-iterator-prototype]: https://github.com/web-platform-tests/wpt/blob/2a298b616b7c865917d7198a287310881cbfdd8d/streams/readable-streams/async-iterator.any.js#L24
+[stub-async-iterator-prototype]: https://github.com/MattiasBuelens/web-streams-polyfill/blob/v2.0.0/src/target/es5/stub/async-iterator-prototype.ts
+[creatorrr-polyfill]: https://github.com/creatorrr/web-streams-polyfill
diff --git a/node_modules/web-streams-polyfill/es2018/package.json b/node_modules/web-streams-polyfill/es2018/package.json
new file mode 100644
index 00000000..97f8fb1b
--- /dev/null
+++ b/node_modules/web-streams-polyfill/es2018/package.json
@@ -0,0 +1,14 @@
+{
+ "name": "web-streams-polyfill-es2018",
+ "main": "../dist/polyfill.es2018",
+ "browser": "../dist/polyfill.es2018.min.js",
+ "module": "../dist/polyfill.es2018.mjs",
+ "types": "../dist/types/polyfill.d.ts",
+ "typesVersions": {
+ ">=3.6": {
+ "../dist/types/*": [
+ "../dist/types/ts3.6/*"
+ ]
+ }
+ }
+}
diff --git a/node_modules/web-streams-polyfill/es6/package.json b/node_modules/web-streams-polyfill/es6/package.json
new file mode 100644
index 00000000..ca3909bc
--- /dev/null
+++ b/node_modules/web-streams-polyfill/es6/package.json
@@ -0,0 +1,14 @@
+{
+ "name": "web-streams-polyfill-es6",
+ "main": "../dist/polyfill.es6",
+ "browser": "../dist/polyfill.es6.min.js",
+ "module": "../dist/polyfill.es6.mjs",
+ "types": "../dist/types/polyfill.d.ts",
+ "typesVersions": {
+ ">=3.6": {
+ "../dist/types/*": [
+ "../dist/types/ts3.6/*"
+ ]
+ }
+ }
+}
diff --git a/node_modules/web-streams-polyfill/package.json b/node_modules/web-streams-polyfill/package.json
new file mode 100644
index 00000000..fa7d1648
--- /dev/null
+++ b/node_modules/web-streams-polyfill/package.json
@@ -0,0 +1,83 @@
+{
+ "name": "web-streams-polyfill",
+ "version": "3.3.3",
+ "description": "Web Streams, based on the WHATWG spec reference implementation",
+ "main": "dist/polyfill",
+ "browser": "dist/polyfill.min.js",
+ "module": "dist/polyfill.mjs",
+ "types": "dist/types/polyfill.d.ts",
+ "typesVersions": {
+ ">=3.6": {
+ "dist/types/*": [
+ "dist/types/ts3.6/*"
+ ]
+ }
+ },
+ "scripts": {
+ "test": "npm run test:types && npm run test:unit && npm run test:wpt",
+ "test:wpt": "npm run test:wpt:node && npm run test:wpt:chromium && npm run test:wpt:firefox",
+ "test:wpt:node": "node --expose_gc ./test/wpt/node/run.js",
+ "test:wpt:chromium": "node ./test/wpt/browser/run.js --browser chromium",
+ "test:wpt:firefox": "node ./test/wpt/browser/run.js --browser firefox",
+ "test:types": "tsc -p ./test/types/tsconfig.json",
+ "test:unit": "jasmine --config=test/unit/jasmine.json",
+ "lint": "eslint \"src/**/*.ts\"",
+ "build": "npm run build:bundle && npm run build:types",
+ "build:bundle": "rollup -c",
+ "build:types": "tsc --project . --emitDeclarationOnly --declarationDir ./lib && api-extractor run",
+ "accept:types": "npm run build:types -- --local",
+ "postbuild:types": "downlevel-dts ./dist/types/ts3.6/ ./dist/types/ --to=3.5 && node ./build/downlevel-dts.js",
+ "prepare": "npm run build"
+ },
+ "files": [
+ "dist",
+ "es6",
+ "es2018",
+ "ponyfill"
+ ],
+ "engines": {
+ "node": ">= 8"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/MattiasBuelens/web-streams-polyfill.git"
+ },
+ "keywords": [
+ "streams",
+ "whatwg",
+ "polyfill"
+ ],
+ "author": "Mattias Buelens <[email protected]>",
+ "contributors": [
+ "Diwank Singh <[email protected]>"
+ ],
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/MattiasBuelens/web-streams-polyfill/issues"
+ },
+ "homepage": "https://github.com/MattiasBuelens/web-streams-polyfill#readme",
+ "devDependencies": {
+ "@microsoft/api-extractor": "^7.39.1",
+ "@rollup/plugin-inject": "^5.0.5",
+ "@rollup/plugin-replace": "^5.0.5",
+ "@rollup/plugin-strip": "^3.0.4",
+ "@rollup/plugin-terser": "^0.4.4",
+ "@rollup/plugin-typescript": "^11.1.5",
+ "@types/node": "^18.19.4",
+ "@typescript-eslint/eslint-plugin": "^6.17.0",
+ "@typescript-eslint/parser": "^6.17.0",
+ "@ungap/promise-all-settled": "^1.1.2",
+ "downlevel-dts": "^0.11.0",
+ "eslint": "^8.56.0",
+ "jasmine": "^5.1.0",
+ "micromatch": "^4.0.5",
+ "minimist": "^1.2.5",
+ "playwright": "^1.14.1",
+ "recursive-readdir": "^2.2.2",
+ "rollup": "^4.9.2",
+ "ts-morph": "^10.0.2",
+ "tslib": "^2.6.2",
+ "typescript": "^5.3.3",
+ "wpt-runner": "^5.0.0"
+ }
+}
diff --git a/node_modules/web-streams-polyfill/ponyfill/es2018/package.json b/node_modules/web-streams-polyfill/ponyfill/es2018/package.json
new file mode 100644
index 00000000..26816ac9
--- /dev/null
+++ b/node_modules/web-streams-polyfill/ponyfill/es2018/package.json
@@ -0,0 +1,13 @@
+{
+ "name": "web-streams-ponyfill-es2018",
+ "main": "../../dist/ponyfill.es2018",
+ "module": "../../dist/ponyfill.es2018.mjs",
+ "types": "../../dist/types/ponyfill.d.ts",
+ "typesVersions": {
+ ">=3.6": {
+ "../../dist/types/*": [
+ "../../dist/types/ts3.6/*"
+ ]
+ }
+ }
+}
diff --git a/node_modules/web-streams-polyfill/ponyfill/es6/package.json b/node_modules/web-streams-polyfill/ponyfill/es6/package.json
new file mode 100644
index 00000000..b54520da
--- /dev/null
+++ b/node_modules/web-streams-polyfill/ponyfill/es6/package.json
@@ -0,0 +1,13 @@
+{
+ "name": "web-streams-ponyfill-es6",
+ "main": "../../dist/ponyfill.es6",
+ "module": "../../dist/ponyfill.es6.mjs",
+ "types": "../../dist/types/ponyfill.d.ts",
+ "typesVersions": {
+ ">=3.6": {
+ "../../dist/types/*": [
+ "../../dist/types/ts3.6/*"
+ ]
+ }
+ }
+}
diff --git a/node_modules/web-streams-polyfill/ponyfill/package.json b/node_modules/web-streams-polyfill/ponyfill/package.json
new file mode 100644
index 00000000..36e9fbe4
--- /dev/null
+++ b/node_modules/web-streams-polyfill/ponyfill/package.json
@@ -0,0 +1,13 @@
+{
+ "name": "web-streams-ponyfill",
+ "main": "../dist/ponyfill",
+ "module": "../dist/ponyfill.mjs",
+ "types": "../dist/types/ponyfill.d.ts",
+ "typesVersions": {
+ ">=3.6": {
+ "../dist/types/*": [
+ "../dist/types/ts3.6/*"
+ ]
+ }
+ }
+}
diff --git a/node_modules/write-file-atomic/LICENSE.md b/node_modules/write-file-atomic/LICENSE.md
new file mode 100644
index 00000000..95e65a77
--- /dev/null
+++ b/node_modules/write-file-atomic/LICENSE.md
@@ -0,0 +1,6 @@
+Copyright (c) 2015, Rebecca Turner
+
+Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
diff --git a/node_modules/write-file-atomic/README.md b/node_modules/write-file-atomic/README.md
new file mode 100644
index 00000000..2d9ef602
--- /dev/null
+++ b/node_modules/write-file-atomic/README.md
@@ -0,0 +1,91 @@
+write-file-atomic
+-----------------
+
+This is an extension for node's `fs.writeFile` that makes its operation
+atomic and allows you set ownership (uid/gid of the file).
+
+### `writeFileAtomic(filename, data, [options], [callback])`
+
+#### Description:
+
+Atomically and asynchronously writes data to a file, replacing the file if it already
+exists. data can be a string or a buffer.
+
+#### Options:
+* filename **String**
+* data **String** | **Buffer**
+* options **Object** | **String**
+ * chown **Object** default, uid & gid of existing file, if any
+ * uid **Number**
+ * gid **Number**
+ * encoding **String** | **Null** default = 'utf8'
+ * fsync **Boolean** default = true
+ * mode **Number** default, from existing file, if any
+ * tmpfileCreated **Function** called when the tmpfile is created
+* callback **Function**
+
+#### Usage:
+
+```js
+var writeFileAtomic = require('write-file-atomic')
+writeFileAtomic(filename, data, [options], [callback])
+```
+
+The file is initially named `filename + "." + murmurhex(__filename, process.pid, ++invocations)`.
+Note that `require('worker_threads').threadId` is used in addition to `process.pid` if running inside of a worker thread.
+If writeFile completes successfully then, if passed the **chown** option it will change
+the ownership of the file. Finally it renames the file back to the filename you specified. If
+it encounters errors at any of these steps it will attempt to unlink the temporary file and then
+pass the error back to the caller.
+If multiple writes are concurrently issued to the same file, the write operations are put into a queue and serialized in the order they were called, using Promises. Writes to different files are still executed in parallel.
+
+If provided, the **chown** option requires both **uid** and **gid** properties or else
+you'll get an error. If **chown** is not specified it will default to using
+the owner of the previous file. To prevent chown from being ran you can
+also pass `false`, in which case the file will be created with the current user's credentials.
+
+If **mode** is not specified, it will default to using the permissions from
+an existing file, if any. Expicitly setting this to `false` remove this default, resulting
+in a file created with the system default permissions.
+
+If options is a String, it's assumed to be the **encoding** option. The **encoding** option is ignored if **data** is a buffer. It defaults to 'utf8'.
+
+If the **fsync** option is **false**, writeFile will skip the final fsync call.
+
+If the **tmpfileCreated** option is specified it will be called with the name of the tmpfile when created.
+
+Example:
+
+```javascript
+writeFileAtomic('message.txt', 'Hello Node', {chown:{uid:100,gid:50}}, function (err) {
+ if (err) throw err;
+ console.log('It\'s saved!');
+});
+```
+
+This function also supports async/await:
+
+```javascript
+(async () => {
+ try {
+ await writeFileAtomic('message.txt', 'Hello Node', {chown:{uid:100,gid:50}});
+ console.log('It\'s saved!');
+ } catch (err) {
+ console.error(err);
+ process.exit(1);
+ }
+})();
+```
+
+### `writeFileAtomicSync(filename, data, [options])`
+
+#### Description:
+
+The synchronous version of **writeFileAtomic**.
+
+#### Usage:
+```js
+var writeFileAtomicSync = require('write-file-atomic').sync
+writeFileAtomicSync(filename, data, [options])
+```
+
diff --git a/node_modules/write-file-atomic/package.json b/node_modules/write-file-atomic/package.json
new file mode 100644
index 00000000..1e88b5b8
--- /dev/null
+++ b/node_modules/write-file-atomic/package.json
@@ -0,0 +1,58 @@
+{
+ "name": "write-file-atomic",
+ "version": "6.0.0",
+ "description": "Write files in an atomic fashion w/configurable ownership",
+ "main": "./lib/index.js",
+ "scripts": {
+ "test": "tap",
+ "posttest": "npm run lint",
+ "lint": "npm run eslint",
+ "postlint": "template-oss-check",
+ "lintfix": "npm run eslint -- --fix",
+ "snap": "tap",
+ "template-oss-apply": "template-oss-apply --force",
+ "eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\""
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/npm/write-file-atomic.git"
+ },
+ "keywords": [
+ "writeFile",
+ "atomic"
+ ],
+ "author": "GitHub Inc.",
+ "license": "ISC",
+ "bugs": {
+ "url": "https://github.com/npm/write-file-atomic/issues"
+ },
+ "homepage": "https://github.com/npm/write-file-atomic",
+ "dependencies": {
+ "imurmurhash": "^0.1.4",
+ "signal-exit": "^4.0.1"
+ },
+ "devDependencies": {
+ "@npmcli/eslint-config": "^5.0.0",
+ "@npmcli/template-oss": "4.23.3",
+ "tap": "^16.0.1"
+ },
+ "files": [
+ "bin/",
+ "lib/"
+ ],
+ "engines": {
+ "node": "^18.17.0 || >=20.5.0"
+ },
+ "templateOSS": {
+ "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
+ "windowsCI": false,
+ "version": "4.23.3",
+ "publish": "true"
+ },
+ "tap": {
+ "nyc-arg": [
+ "--exclude",
+ "tap-snapshots/**"
+ ]
+ }
+}
diff --git a/node_modules/yallist/LICENSE.md b/node_modules/yallist/LICENSE.md
new file mode 100644
index 00000000..881248b6
--- /dev/null
+++ b/node_modules/yallist/LICENSE.md
@@ -0,0 +1,63 @@
+All packages under `src/` are licensed according to the terms in
+their respective `LICENSE` or `LICENSE.md` files.
+
+The remainder of this project is licensed under the Blue Oak
+Model License, as follows:
+
+-----
+
+# Blue Oak Model License
+
+Version 1.0.0
+
+## Purpose
+
+This license gives everyone as much permission to work with
+this software as possible, while protecting contributors
+from liability.
+
+## Acceptance
+
+In order to receive this license, you must agree to its
+rules. The rules of this license are both obligations
+under that agreement and conditions to your license.
+You must not do anything with this software that triggers
+a rule that you cannot or will not follow.
+
+## Copyright
+
+Each contributor licenses you to do everything with this
+software that would otherwise infringe that contributor's
+copyright in it.
+
+## Notices
+
+You must ensure that everyone who gets a copy of
+any part of this software from you, with or without
+changes, also gets the text of this license or a link to
+<https://blueoakcouncil.org/license/1.0.0>.
+
+## Excuse
+
+If anyone notifies you in writing that you have not
+complied with [Notices](#notices), you can keep your
+license by taking all practical steps to comply within 30
+days after the notice. If you do not do so, your license
+ends immediately.
+
+## Patent
+
+Each contributor licenses you to do everything with this
+software that would otherwise infringe any patent claims
+they can license or become able to license.
+
+## Reliability
+
+No contributor can revoke this license.
+
+## No Liability
+
+***As far as the law allows, this software comes as is,
+without any warranty or condition, and no contributor
+will be liable to anyone for any damages related to this
+software or this license, under any kind of legal claim.***
diff --git a/node_modules/yallist/README.md b/node_modules/yallist/README.md
new file mode 100644
index 00000000..68f6162d
--- /dev/null
+++ b/node_modules/yallist/README.md
@@ -0,0 +1,205 @@
+# yallist
+
+Yet Another Linked List
+
+There are many doubly-linked list implementations like it, but this
+one is mine.
+
+For when an array would be too big, and a Map can't be iterated in
+reverse order.
+
+## basic usage
+
+```js
+import { Yallist } from 'yallist'
+var myList = new Yallist([1, 2, 3])
+myList.push('foo')
+myList.unshift('bar')
+// of course pop() and shift() are there, too
+console.log(myList.toArray()) // ['bar', 1, 2, 3, 'foo']
+myList.forEach(function (k) {
+ // walk the list head to tail
+})
+myList.forEachReverse(function (k, index, list) {
+ // walk the list tail to head
+})
+var myDoubledList = myList.map(function (k) {
+ return k + k
+})
+// now myDoubledList contains ['barbar', 2, 4, 6, 'foofoo']
+// mapReverse is also a thing
+var myDoubledListReverse = myList.mapReverse(function (k) {
+ return k + k
+}) // ['foofoo', 6, 4, 2, 'barbar']
+
+var reduced = myList.reduce(function (set, entry) {
+ set += entry
+ return set
+}, 'start')
+console.log(reduced) // 'startfoo123bar'
+```
+
+## api
+
+The whole API is considered "public".
+
+Functions with the same name as an Array method work more or less the
+same way.
+
+There's reverse versions of most things because that's the point.
+
+### Yallist
+
+Default export, the class that holds and manages a list.
+
+Call it with either a forEach-able (like an array) or a set of
+arguments, to initialize the list.
+
+The Array-ish methods all act like you'd expect. No magic length,
+though, so if you change that it won't automatically prune or add
+empty spots.
+
+### Yallist.create(..)
+
+Alias for Yallist function. Some people like factories.
+
+#### yallist.head
+
+The first node in the list
+
+#### yallist.tail
+
+The last node in the list
+
+#### yallist.length
+
+The number of nodes in the list. (Change this at your peril. It is
+not magic like Array length.)
+
+#### yallist.toArray()
+
+Convert the list to an array.
+
+#### yallist.forEach(fn, [thisp])
+
+Call a function on each item in the list.
+
+#### yallist.forEachReverse(fn, [thisp])
+
+Call a function on each item in the list, in reverse order.
+
+#### yallist.get(n)
+
+Get the data at position `n` in the list. If you use this a lot,
+probably better off just using an Array.
+
+#### yallist.getReverse(n)
+
+Get the data at position `n`, counting from the tail.
+
+#### yallist.map(fn, thisp)
+
+Create a new Yallist with the result of calling the function on each
+item.
+
+#### yallist.mapReverse(fn, thisp)
+
+Same as `map`, but in reverse.
+
+#### yallist.pop()
+
+Get the data from the list tail, and remove the tail from the list.
+
+#### yallist.push(item, ...)
+
+Insert one or more items to the tail of the list.
+
+#### yallist.reduce(fn, initialValue)
+
+Like Array.reduce.
+
+#### yallist.reduceReverse
+
+Like Array.reduce, but in reverse.
+
+#### yallist.reverse
+
+Reverse the list in place.
+
+#### yallist.shift()
+
+Get the data from the list head, and remove the head from the list.
+
+#### yallist.slice([from], [to])
+
+Just like Array.slice, but returns a new Yallist.
+
+#### yallist.sliceReverse([from], [to])
+
+Just like yallist.slice, but the result is returned in reverse.
+
+#### yallist.splice(start, deleteCount, ...)
+
+Like Array.splice.
+
+#### yallist.toArray()
+
+Create an array representation of the list.
+
+#### yallist.toArrayReverse()
+
+Create a reversed array representation of the list.
+
+#### yallist.unshift(item, ...)
+
+Insert one or more items to the head of the list.
+
+#### yallist.unshiftNode(node)
+
+Move a Node object to the front of the list. (That is, pull it out of
+wherever it lives, and make it the new head.)
+
+If the node belongs to a different list, then that list will remove it
+first.
+
+#### yallist.pushNode(node)
+
+Move a Node object to the end of the list. (That is, pull it out of
+wherever it lives, and make it the new tail.)
+
+If the node belongs to a list already, then that list will remove it
+first.
+
+#### yallist.removeNode(node)
+
+Remove a node from the list, preserving referential integrity of head
+and tail and other nodes.
+
+Will throw an error if you try to have a list remove a node that
+doesn't belong to it.
+
+### Yallist.Node
+
+The class that holds the data and is actually the list.
+
+Call with `const n = new Node(value, previousNode, nextNode)`
+
+Note that if you do direct operations on Nodes themselves, it's very
+easy to get into weird states where the list is broken. Be careful :)
+
+#### node.next
+
+The next node in the list.
+
+#### node.prev
+
+The previous node in the list.
+
+#### node.value
+
+The data the node contains.
+
+#### node.list
+
+The list to which this node belongs. (Null if it does not belong to
+any list.)
diff --git a/node_modules/yallist/package.json b/node_modules/yallist/package.json
new file mode 100644
index 00000000..2f524780
--- /dev/null
+++ b/node_modules/yallist/package.json
@@ -0,0 +1,68 @@
+{
+ "name": "yallist",
+ "version": "5.0.0",
+ "description": "Yet Another Linked List",
+ "files": [
+ "dist"
+ ],
+ "devDependencies": {
+ "prettier": "^3.2.5",
+ "tap": "^18.7.2",
+ "tshy": "^1.13.1",
+ "typedoc": "^0.25.13"
+ },
+ "scripts": {
+ "preversion": "npm test",
+ "postversion": "npm publish",
+ "prepublishOnly": "git push origin --follow-tags",
+ "prepare": "tshy",
+ "pretest": "npm run prepare",
+ "presnap": "npm run prepare",
+ "test": "tap",
+ "snap": "tap",
+ "format": "prettier --write . --loglevel warn --ignore-path ../../.prettierignore --cache",
+ "typedoc": "typedoc"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/isaacs/yallist.git"
+ },
+ "author": "Isaac Z. Schlueter <[email protected]> (http://blog.izs.me/)",
+ "license": "BlueOak-1.0.0",
+ "tshy": {
+ "exports": {
+ "./package.json": "./package.json",
+ ".": "./src/index.ts"
+ }
+ },
+ "exports": {
+ "./package.json": "./package.json",
+ ".": {
+ "import": {
+ "types": "./dist/esm/index.d.ts",
+ "default": "./dist/esm/index.js"
+ },
+ "require": {
+ "types": "./dist/commonjs/index.d.ts",
+ "default": "./dist/commonjs/index.js"
+ }
+ }
+ },
+ "main": "./dist/commonjs/index.js",
+ "types": "./dist/commonjs/index.d.ts",
+ "type": "module",
+ "prettier": {
+ "semi": false,
+ "printWidth": 70,
+ "tabWidth": 2,
+ "useTabs": false,
+ "singleQuote": true,
+ "jsxSingleQuote": false,
+ "bracketSameLine": true,
+ "arrowParens": "avoid",
+ "endOfLine": "lf"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+}
diff --git a/package.json b/package.json
index fc4b6bc4..acad59f5 100644
--- a/package.json
+++ b/package.json
@@ -12,5 +12,9 @@
},
"devDependencies": {
"supabase": "^2.19.7"
+ },
+ "dependencies": {
+ "cytoscape-fcose": "^2.2.0",
+ "graphology-layout-forceatlas2": "^0.10.1"
}
-}
\ No newline at end of file
+}
diff --git a/yarn.lock b/yarn.lock
new file mode 100644
index 00000000..a6aa7d03
--- /dev/null
+++ b/yarn.lock
@@ -0,0 +1,203 @@
+# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
+# yarn lockfile v1
+
+
+"@isaacs/fs-minipass@^4.0.0":
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz#2d59ae3ab4b38fb4270bfa23d30f8e2e86c7fe32"
+ integrity sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==
+ dependencies:
+ minipass "^7.0.4"
+
+agent-base@^7.1.2:
+ version "7.1.3"
+ resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-7.1.3.tgz#29435eb821bc4194633a5b89e5bc4703bafc25a1"
+ integrity sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==
+
+bin-links@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/bin-links/-/bin-links-5.0.0.tgz#2b0605b62dd5e1ddab3b92a3c4e24221cae06cca"
+ integrity sha512-sdleLVfCjBtgO5cNjA2HVRvWBJAHs4zwenaCPMNJAJU0yNxpzj80IpjOIimkpkr+mhlA+how5poQtt53PygbHA==
+ dependencies:
+ cmd-shim "^7.0.0"
+ npm-normalize-package-bin "^4.0.0"
+ proc-log "^5.0.0"
+ read-cmd-shim "^5.0.0"
+ write-file-atomic "^6.0.0"
+
+chownr@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/chownr/-/chownr-3.0.0.tgz#9855e64ecd240a9cc4267ce8a4aa5d24a1da15e4"
+ integrity sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==
+
+cmd-shim@^7.0.0:
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/cmd-shim/-/cmd-shim-7.0.0.tgz#23bcbf69fff52172f7e7c02374e18fb215826d95"
+ integrity sha512-rtpaCbr164TPPh+zFdkWpCyZuKkjpAzODfaZCf/SVJZzJN+4bHQb/LP3Jzq5/+84um3XXY8r548XiWKSborwVw==
+
+cose-base@^2.2.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/cose-base/-/cose-base-2.2.0.tgz#1c395c35b6e10bb83f9769ca8b817d614add5c01"
+ integrity sha512-AzlgcsCbUMymkADOJtQm3wO9S3ltPfYOFD5033keQn9NJzIbtnZj+UdBJe7DYml/8TdbtHJW3j58SOnKhWY/5g==
+ dependencies:
+ layout-base "^2.0.0"
+
+cytoscape-fcose@^2.2.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/cytoscape-fcose/-/cytoscape-fcose-2.2.0.tgz#e4d6f6490df4fab58ae9cea9e5c3ab8d7472f471"
+ integrity sha512-ki1/VuRIHFCzxWNrsshHYPs6L7TvLu3DL+TyIGEsRcvVERmxokbf5Gdk7mFxZnTdiGtnA4cfSmjZJMviqSuZrQ==
+ dependencies:
+ cose-base "^2.2.0"
+
+data-uri-to-buffer@^4.0.0:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz#d8feb2b2881e6a4f58c2e08acfd0e2834e26222e"
+ integrity sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==
+
+debug@4:
+ version "4.4.0"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.0.tgz#2b3f2aea2ffeb776477460267377dc8710faba8a"
+ integrity sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==
+ dependencies:
+ ms "^2.1.3"
+
+fetch-blob@^3.1.2, fetch-blob@^3.1.4:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/fetch-blob/-/fetch-blob-3.2.0.tgz#f09b8d4bbd45adc6f0c20b7e787e793e309dcce9"
+ integrity sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==
+ dependencies:
+ node-domexception "^1.0.0"
+ web-streams-polyfill "^3.0.3"
+
+formdata-polyfill@^4.0.10:
+ version "4.0.10"
+ resolved "https://registry.yarnpkg.com/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz#24807c31c9d402e002ab3d8c720144ceb8848423"
+ integrity sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==
+ dependencies:
+ fetch-blob "^3.1.2"
+
+graphology-layout-forceatlas2@^0.10.1:
+ version "0.10.1"
+ resolved "https://registry.yarnpkg.com/graphology-layout-forceatlas2/-/graphology-layout-forceatlas2-0.10.1.tgz#741842135609d82d12db5a5fdf74672062c28205"
+ integrity sha512-ogzBeF1FvWzjkikrIFwxhlZXvD2+wlY54lqhsrWprcdPjopM2J9HoMweUmIgwaTvY4bUYVimpSsOdvDv1gPRFQ==
+ dependencies:
+ graphology-utils "^2.1.0"
+
+graphology-utils@^2.1.0:
+ version "2.5.2"
+ resolved "https://registry.yarnpkg.com/graphology-utils/-/graphology-utils-2.5.2.tgz#4d30d6e567d27c01f105e1494af816742e8d2440"
+ integrity sha512-ckHg8MXrXJkOARk56ZaSCM1g1Wihe2d6iTmz1enGOz4W/l831MBCKSayeFQfowgF8wd+PQ4rlch/56Vs/VZLDQ==
+
+https-proxy-agent@^7.0.2:
+ version "7.0.6"
+ resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz#da8dfeac7da130b05c2ba4b59c9b6cd66611a6b9"
+ integrity sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==
+ dependencies:
+ agent-base "^7.1.2"
+ debug "4"
+
+imurmurhash@^0.1.4:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
+ integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==
+
+layout-base@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/layout-base/-/layout-base-2.0.1.tgz#d0337913586c90f9c2c075292069f5c2da5dd285"
+ integrity sha512-dp3s92+uNI1hWIpPGH3jK2kxE2lMjdXdr+DH8ynZHpd6PUlH6x6cbuXnoMmiNumznqaNO31xu9e79F0uuZ0JFg==
+
+minipass@^7.0.4, minipass@^7.1.2:
+ version "7.1.2"
+ resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707"
+ integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==
+
+minizlib@^3.0.1:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-3.0.2.tgz#f33d638eb279f664439aa38dc5f91607468cb574"
+ integrity sha512-oG62iEk+CYt5Xj2YqI5Xi9xWUeZhDI8jjQmC5oThVH5JGCTgIjr7ciJDzC7MBzYd//WvR1OTmP5Q38Q8ShQtVA==
+ dependencies:
+ minipass "^7.1.2"
+
+mkdirp@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-3.0.1.tgz#e44e4c5607fb279c168241713cc6e0fea9adcb50"
+ integrity sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==
+
+ms@^2.1.3:
+ version "2.1.3"
+ resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
+ integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==
+
+node-domexception@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5"
+ integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==
+
+node-fetch@^3.3.2:
+ version "3.3.2"
+ resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.3.2.tgz#d1e889bacdf733b4ff3b2b243eb7a12866a0b78b"
+ integrity sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==
+ dependencies:
+ data-uri-to-buffer "^4.0.0"
+ fetch-blob "^3.1.4"
+ formdata-polyfill "^4.0.10"
+
+npm-normalize-package-bin@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/npm-normalize-package-bin/-/npm-normalize-package-bin-4.0.0.tgz#df79e70cd0a113b77c02d1fe243c96b8e618acb1"
+ integrity sha512-TZKxPvItzai9kN9H/TkmCtx/ZN/hvr3vUycjlfmH0ootY9yFBzNOpiXAdIn1Iteqsvk4lQn6B5PTrt+n6h8k/w==
+
+proc-log@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/proc-log/-/proc-log-5.0.0.tgz#e6c93cf37aef33f835c53485f314f50ea906a9d8"
+ integrity sha512-Azwzvl90HaF0aCz1JrDdXQykFakSSNPaPoiZ9fm5qJIMHioDZEi7OAdRwSm6rSoPtY3Qutnm3L7ogmg3dc+wbQ==
+
+read-cmd-shim@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/read-cmd-shim/-/read-cmd-shim-5.0.0.tgz#6e5450492187a0749f6c80dcbef0debc1117acca"
+ integrity sha512-SEbJV7tohp3DAAILbEMPXavBjAnMN0tVnh4+9G8ihV4Pq3HYF9h8QNez9zkJ1ILkv9G2BjdzwctznGZXgu/HGw==
+
+signal-exit@^4.0.1:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04"
+ integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==
+
+supabase@^2.19.7:
+ version "2.22.6"
+ resolved "https://registry.yarnpkg.com/supabase/-/supabase-2.22.6.tgz#44e7f215d57ede89feea62ca5cc74c9a7dd6d116"
+ integrity sha512-W/A5JlKqrp0pxSaFRYwlWpk+aCql9xUp1ZeLVarRVtqsT6QPLqLsLPIwES0005lQKS3QBbdWDgYThEStPM1kxQ==
+ dependencies:
+ bin-links "^5.0.0"
+ https-proxy-agent "^7.0.2"
+ node-fetch "^3.3.2"
+ tar "7.4.3"
+
+ version "7.4.3"
+ resolved "https://registry.yarnpkg.com/tar/-/tar-7.4.3.tgz#88bbe9286a3fcd900e94592cda7a22b192e80571"
+ integrity sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw==
+ dependencies:
+ "@isaacs/fs-minipass" "^4.0.0"
+ chownr "^3.0.0"
+ minipass "^7.1.2"
+ minizlib "^3.0.1"
+ mkdirp "^3.0.1"
+ yallist "^5.0.0"
+
+web-streams-polyfill@^3.0.3:
+ version "3.3.3"
+ resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz#2073b91a2fdb1fbfbd401e7de0ac9f8214cecb4b"
+ integrity sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==
+
+write-file-atomic@^6.0.0:
+ version "6.0.0"
+ resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-6.0.0.tgz#e9c89c8191b3ef0606bc79fb92681aa1aa16fa93"
+ integrity sha512-GmqrO8WJ1NuzJ2DrziEI2o57jKAVIQNf8a18W3nCYU3H7PNWqCCVTeH6/NQE93CIllIgQS98rrmVkYgTX9fFJQ==
+ dependencies:
+ imurmurhash "^0.1.4"
+ signal-exit "^4.0.1"
+
+yallist@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/yallist/-/yallist-5.0.0.tgz#00e2de443639ed0d78fd87de0d27469fbcffb533"
+ integrity sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==