function Network(container, data, options) {
  if (!(this instanceof Network)) {
    throw new SyntaxError("Constructor must be called with the new operator");
  }

  // set constant values
  this.options = {};
  this.defaultOptions = {
    locale: "en",
    locales: locales,
    clickToUse: false,
  };
  Object.assign(this.options, this.defaultOptions);

  /**
   * Containers for nodes and edges.
   *
   * 'edges' and 'nodes' contain the full definitions of all the network elements.
   * 'nodeIndices' and 'edgeIndices' contain the id's of the active elements.
   *
   * The distinction is important, because a defined node need not be active, i.e.
   * visible on the canvas. This happens in particular when clusters are defined, in
   * that case there will be nodes and edges not displayed.
   * The bottom line is that all code with actions related to visibility, *must* use
   * 'nodeIndices' and 'edgeIndices', not 'nodes' and 'edges' directly.
   */
  this.body = {
    container: container,

    // See comment above for following fields
    nodes: {},
    nodeIndices: [],
    edges: {},
    edgeIndices: [],

    emitter: {
      on: this.on.bind(this),
      off: this.off.bind(this),
      emit: this.emit.bind(this),
      once: this.once.bind(this),
    },
    eventListeners: {
      onTap: function () {},
      onTouch: function () {},
      onDoubleTap: function () {},
      onHold: function () {},
      onDragStart: function () {},
      onDrag: function () {},
      onDragEnd: function () {},
      onMouseWheel: function () {},
      onPinch: function () {},
      onMouseMove: function () {},
      onRelease: function () {},
      onContext: function () {},
    },
    data: {
      nodes: null, // A DataSet or DataView
      edges: null, // A DataSet or DataView
    },
    functions: {
      createNode: function () {},
      createEdge: function () {},
      getPointer: function () {},
    },
    modules: {},
    view: {
      scale: 1,
      translation: { x: 0, y: 0 },
    },
    selectionBox: {
      show: false,
      position: {
        start: { x: 0, y: 0 },
        end: { x: 0, y: 0 },
      },
    },
  };

  // bind the event listeners
  this.bindEventListeners();

  // setting up all modules
  this.images = new Images(() => this.body.emitter.emit("_requestRedraw")); // object with images
  this.groups = new Groups(); // object with groups
  this.canvas = new Canvas(this.body); // DOM handler
  this.selectionHandler = new SelectionHandler(this.body, this.canvas); // Selection handler
  this.interactionHandler = new InteractionHandler(
    this.body,
    this.canvas,
    this.selectionHandler
  ); // Interaction handler handles all the hammer bindings (that are bound by canvas), key
  this.view = new View(this.body, this.canvas); // camera handler, does animations and zooms
  this.renderer = new CanvasRenderer(this.body, this.canvas); // renderer, starts renderloop, has events that modules can hook into
  this.physics = new PhysicsEngine(this.body); // physics engine, does all the simulations
  this.layoutEngine = new LayoutEngine(this.body); // layout engine for inital layout and hierarchical layout
  this.clustering = new ClusterEngine(this.body); // clustering api
  this.manipulation = new ManipulationSystem(
    this.body,
    this.canvas,
    this.selectionHandler,
    this.interactionHandler
  ); // data manipulation system

  this.nodesHandler = new NodesHandler(
    this.body,
    this.images,
    this.groups,
    this.layoutEngine
  ); // Handle adding, deleting and updating of nodes as well as global options
  this.edgesHandler = new EdgesHandler(this.body, this.images, this.groups); // Handle adding, deleting and updating of edges as well as global options

  this.body.modules["kamadaKawai"] = new KamadaKawai(this.body, 150, 0.05); // Layouting algorithm.
  this.body.modules["clustering"] = this.clustering;

  // create the DOM elements
  this.canvas._create();

  // apply options
  this.setOptions(options);

  // load data (the disable start variable will be the same as the enabled clustering)
  this.setData(data);
}
Create a network visualization, displaying nodes and edges.
@param {Element} container   The DOM element in which the Network will
                                 be created. Normally a div element.
@param {object} data         An object containing parameters
                             {Array} nodes
                             {Array} edges
@param {object} options      Options
@class Network