}}} {{{ formParagraphs
359116
function formParagraphs(text) {

        text = text.replace(/^\n+/g,"");
        text = text.replace(/\n+$/g,"");

        var grafs = text.split(/\n{2,}/g);
        var grafsOut = new Array();
        var end = grafs.length;

        for(var i=0; i<end; i++) {
            var str = grafs[i];

            if(str.search(/~K(\d+)K/g) >= 0) {
                grafsOut.push(str);
            } else if (str.search(/\S/) >= 0) {
                str = runSpanGamut(str);
                str = str.replace(/^([ \t]*)/g,"<p>");
                str += "</p>"
                grafsOut.push(str);
            }

        }

        end = grafsOut.length;

        for(var i=0; i<end; i++) {
            while(grafsOut[i].search(/~K(\d+)K/) >= 0) {
                var blockText = htmlBlock[RegExp.$1];
                blockText = blockText.replace(/\$/g,"$$$$");
                grafsOut[i] = grafsOut[i].replace(/~K\d+K/,blockText);
            }
        }

        return grafsOut.join("\n\n");
    }
345654
function ( width, height, widthSegments, heightSegments ) {

	BufferGeometry.call( this );

	this.type = '';

	this.parameters = {
		width: width,
		height: height,
		widthSegments: widthSegments,
		heightSegments: heightSegments
	};

	width = width || 1;
	height = height || 1;

	var width_half = width / 2;
	var height_half = height / 2;

	var gridX = Math.floor( widthSegments ) || 1;
	var gridY = Math.floor( heightSegments ) || 1;

	var gridX1 = gridX + 1;
	var gridY1 = gridY + 1;

	var segment_width = width / gridX;
	var segment_height = height / gridY;

	var ix, iy;

	// buffers

	var indices = [];
	var vertices = [];
	var normals = [];
	var uvs = [];

	// generate vertices, normals and uvs

	for ( iy = 0; iy < gridY1; iy ++ ) {

		var y = iy * segment_height - height_half;

		for ( ix = 0; ix < gridX1; ix ++ ) {

			var x = ix * segment_width - width_half;

			vertices.push( x, - y, 0 );

			normals.push( 0, 0, 1 );

			uvs.push( ix / gridX );
			uvs.push( 1 - ( iy / gridY ) );

		}

	}

	// indices

	for ( iy = 0; iy < gridY; iy ++ ) {

		for ( ix = 0; ix < gridX; ix ++ ) {

			var a = ix + gridX1 * iy;
			var b = ix + gridX1 * ( iy + 1 );
			var c = ( ix + 1 ) + gridX1 * ( iy + 1 );
			var d = ( ix + 1 ) + gridX1 * iy;

			// faces

			indices.push( a, b, d );
			indices.push( b, c, d );

		}

	}

	// build geometry

	this.setIndex( indices );
	this.addAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );
	this.addAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );
	this.addAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );

}
425334
function ( shapes, curveSegments ) {

	BufferGeometry.call( this );

	this.type = '';

	this.parameters = {
		shapes: shapes,
		curveSegments: curveSegments
	};

	curveSegments = curveSegments || 12;

	// buffers

	var indices = [];
	var vertices = [];
	var normals = [];
	var uvs = [];

	// helper variables

	var groupStart = 0;
	var groupCount = 0;

	// allow single and array values for "shapes" parameter

	if ( Array.isArray( shapes ) === false ) {

		addShape( shapes );

	} else {

		for ( var i = 0; i < shapes.length; i ++ ) {

			addShape( shapes[ i ] );

			this.addGroup( groupStart, groupCount, i ); // enables MultiMaterial support

			groupStart += groupCount;
			groupCount = 0;

		}

	}

	// build geometry

	this.setIndex( indices );
	this.addAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );
	this.addAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );
	this.addAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );


	// helper functions

	function addShape( shape ) {

		var i, l, shapeHole;

		var indexOffset = vertices.length / 3;
		var points = shape.extractPoints( curveSegments );

		var shapeVertices = points.shape;
		var shapeHoles = points.holes;

		// check direction of vertices

		if ( ShapeUtils.isClockWise( shapeVertices ) === false ) {

			shapeVertices = shapeVertices.reverse();

		}

		for ( i = 0, l = shapeHoles.length; i < l; i ++ ) {

			shapeHole = shapeHoles[ i ];

			if ( ShapeUtils.isClockWise( shapeHole ) === true ) {

				shapeHoles[ i ] = shapeHole.reverse();

			}

		}

		var faces = ShapeUtils.triangulateShape( shapeVertices, shapeHoles );

		// join vertices of inner and outer paths to a single array

		for ( i = 0, l = shapeHoles.length; i < l; i ++ ) {

			shapeHole = shapeHoles[ i ];
			shapeVertices = shapeVertices.concat( shapeHole );

		}

		// vertices, normals, uvs

		for ( i = 0, l = shapeVertices.length; i < l; i ++ ) {

			var vertex = shapeVertices[ i ];

			vertices.push( vertex.x, vertex.y, 0 );
			normals.push( 0, 0, 1 );
			uvs.push( vertex.x, vertex.y ); // world uvs

		}

		// incides

		for ( i = 0, l = faces.length; i < l; i ++ ) {

			var face = faces[ i ];

			var a = face[ 0 ] + indexOffset;
			var b = face[ 1 ] + indexOffset;
			var c = face[ 2 ] + indexOffset;

			indices.push( a, b, c );
			groupCount += 3;

		}

	}

}
1248607
function form(bind, el, param, value) {
  var node = element('input');

  for (var key in param) {
    if (key !== 'signal' && key !== 'element') {
      node.setAttribute(key === 'input' ? 'type' : key, param[key]);
    }
  }
  node.setAttribute('name', param.signal);
  node.value = value;

  el.appendChild(node);

  node.addEventListener('input', function() {
    bind.update(node.value);
  });

  bind.elements = [node];
  bind.set = function(value) { node.value = value; };
}
263188
function(codePath) {
        let text =
            "\n" +
            "digraph {\n" +
            "node[shape=box,style=\"rounded,filled\",fillcolor=white];\n" +
            "initial[label=\"\",shape=circle,style=filled,fillcolor=black,width=0.25,height=0.25];\n";

        if (codePath.returnedSegments.length > 0) {
            text += "final[label=\"\",shape=doublecircle,style=filled,fillcolor=black,width=0.25,height=0.25];\n";
        }
        if (codePath.thrownSegments.length > 0) {
            text += "thrown[label=\"✘\",shape=circle,width=0.3,height=0.3,fixedsize];\n";
        }

        const traceMap = Object.create(null);
        const arrows = this.makeDotArrows(codePath, traceMap);

        for (const id in traceMap) { // eslint-disable-line guard-for-in
            const segment = traceMap[id];

            text += `${id}[`;

            if (segment.reachable) {
                text += "label=\"";
            } else {
                text += "style=\"rounded,dashed,filled\",fillcolor=\"#FF9800\",label=\"<<unreachable>>\\n";
            }

            if (segment.internal.nodes.length > 0 || segment.internal.exitNodes.length > 0) {
                text += [].concat(
                    segment.internal.nodes.map(node => {
                        switch (node.type) {
                            case "Identifier": return `${node.type} (${node.name})`;
                            case "Literal": return `${node.type} (${node.value})`;
                            default: return node.type;
                        }
                    }),
                    segment.internal.exitNodes.map(node => {
                        switch (node.type) {
                            case "Identifier": return `${node.type}:exit (${node.name})`;
                            case "Literal": return `${node.type}:exit (${node.value})`;
                            default: return `${node.type}:exit`;
                        }
                    })
                ).join("\\n");
            } else {
                text += "????";
            }

            text += "\"];\n";
        }

        text += `${arrows}\n`;
        text += "}";
        debug("DOT", text);
    }
437104
def method2format(output, _format="png", mx=None, raw=None):
    
    # pydot is optional!
    import pydot

    buff = "digraph {\n"
    buff += "graph [rankdir=TB]\n"
    buff += "node [shape=plaintext]\n"

    if raw:
        data = raw
    else:
        data = method2dot(mx)

    # subgraphs cluster
    buff += "subgraph cluster_{} ".format(hashlib.md5(bytearray(output, "UTF-8")).hexdigest())
    buff += "{\n"
    buff += "label=\"{}\"\n".format(data['name'])
    buff += data['nodes']
    buff += "}\n"

    # subgraphs edges
    buff += data['edges']
    buff += "}\n"

    d = pydot.graph_from_dot_data(buff)
    if d:
        for g in d:
            getattr(g, "write_" + _format.lower())(output)
764512
function ( buffers, geoInfo, facePositionIndexes, materialIndex, faceNormals, faceColors, faceUVs, faceWeights, faceWeightIndices, faceLength ) {

			for ( var i = 2; i < faceLength; i ++ ) {

				buffers.vertex.push( geoInfo.vertexPositions[ facePositionIndexes[ 0 ] ] );
				buffers.vertex.push( geoInfo.vertexPositions[ facePositionIndexes[ 1 ] ] );
				buffers.vertex.push( geoInfo.vertexPositions[ facePositionIndexes[ 2 ] ] );

				buffers.vertex.push( geoInfo.vertexPositions[ facePositionIndexes[ ( i - 1 ) * 3 ] ] );
				buffers.vertex.push( geoInfo.vertexPositions[ facePositionIndexes[ ( i - 1 ) * 3 + 1 ] ] );
				buffers.vertex.push( geoInfo.vertexPositions[ facePositionIndexes[ ( i - 1 ) * 3 + 2 ] ] );

				buffers.vertex.push( geoInfo.vertexPositions[ facePositionIndexes[ i * 3 ] ] );
				buffers.vertex.push( geoInfo.vertexPositions[ facePositionIndexes[ i * 3 + 1 ] ] );
				buffers.vertex.push( geoInfo.vertexPositions[ facePositionIndexes[ i * 3 + 2 ] ] );

				if ( geoInfo.skeleton ) {

					buffers.vertexWeights.push( faceWeights[ 0 ] );
					buffers.vertexWeights.push( faceWeights[ 1 ] );
					buffers.vertexWeights.push( faceWeights[ 2 ] );
					buffers.vertexWeights.push( faceWeights[ 3 ] );

					buffers.vertexWeights.push( faceWeights[ ( i - 1 ) * 4 ] );
					buffers.vertexWeights.push( faceWeights[ ( i - 1 ) * 4 + 1 ] );
					buffers.vertexWeights.push( faceWeights[ ( i - 1 ) * 4 + 2 ] );
					buffers.vertexWeights.push( faceWeights[ ( i - 1 ) * 4 + 3 ] );

					buffers.vertexWeights.push( faceWeights[ i * 4 ] );
					buffers.vertexWeights.push( faceWeights[ i * 4 + 1 ] );
					buffers.vertexWeights.push( faceWeights[ i * 4 + 2 ] );
					buffers.vertexWeights.push( faceWeights[ i * 4 + 3 ] );

					buffers.weightsIndices.push( faceWeightIndices[ 0 ] );
					buffers.weightsIndices.push( faceWeightIndices[ 1 ] );
					buffers.weightsIndices.push( faceWeightIndices[ 2 ] );
					buffers.weightsIndices.push( faceWeightIndices[ 3 ] );

					buffers.weightsIndices.push( faceWeightIndices[ ( i - 1 ) * 4 ] );
					buffers.weightsIndices.push( faceWeightIndices[ ( i - 1 ) * 4 + 1 ] );
					buffers.weightsIndices.push( faceWeightIndices[ ( i - 1 ) * 4 + 2 ] );
					buffers.weightsIndices.push( faceWeightIndices[ ( i - 1 ) * 4 + 3 ] );

					buffers.weightsIndices.push( faceWeightIndices[ i * 4 ] );
					buffers.weightsIndices.push( faceWeightIndices[ i * 4 + 1 ] );
					buffers.weightsIndices.push( faceWeightIndices[ i * 4 + 2 ] );
					buffers.weightsIndices.push( faceWeightIndices[ i * 4 + 3 ] );

				}

				if ( geoInfo.color ) {

					buffers.colors.push( faceColors[ 0 ] );
					buffers.colors.push( faceColors[ 1 ] );
					buffers.colors.push( faceColors[ 2 ] );

					buffers.colors.push( faceColors[ ( i - 1 ) * 3 ] );
					buffers.colors.push( faceColors[ ( i - 1 ) * 3 + 1 ] );
					buffers.colors.push( faceColors[ ( i - 1 ) * 3 + 2 ] );

					buffers.colors.push( faceColors[ i * 3 ] );
					buffers.colors.push( faceColors[ i * 3 + 1 ] );
					buffers.colors.push( faceColors[ i * 3 + 2 ] );

				}

				if ( geoInfo.material && geoInfo.material.mappingType !== 'AllSame' ) {

					buffers.materialIndex.push( materialIndex );
					buffers.materialIndex.push( materialIndex );
					buffers.materialIndex.push( materialIndex );

				}

				if ( geoInfo.normal ) {

					buffers.normal.push( faceNormals[ 0 ] );
					buffers.normal.push( faceNormals[ 1 ] );
					buffers.normal.push( faceNormals[ 2 ] );

					buffers.normal.push( faceNormals[ ( i - 1 ) * 3 ] );
					buffers.normal.push( faceNormals[ ( i - 1 ) * 3 + 1 ] );
					buffers.normal.push( faceNormals[ ( i - 1 ) * 3 + 2 ] );

					buffers.normal.push( faceNormals[ i * 3 ] );
					buffers.normal.push( faceNormals[ i * 3 + 1 ] );
					buffers.normal.push( faceNormals[ i * 3 + 2 ] );

				}

				if ( geoInfo.uv ) {

					geoInfo.uv.forEach( function ( uv, j ) {

						if ( buffers.uvs[ j ] === undefined ) buffers.uvs[ j ] = [];

						buffers.uvs[ j ].push( faceUVs[ j ][ 0 ] );
						buffers.uvs[ j ].push( faceUVs[ j ][ 1 ] );

						buffers.uvs[ j ].push( faceUVs[ j ][ ( i - 1 ) * 2 ] );
						buffers.uvs[ j ].push( faceUVs[ j ][ ( i - 1 ) * 2 + 1 ] );

						buffers.uvs[ j ].push( faceUVs[ j ][ i * 2 ] );
						buffers.uvs[ j ].push( faceUVs[ j ][ i * 2 + 1 ] );

					} );

				}

			}

		}
15332
def format(self, vertices):
        
        index = ' '.join(str(vertices[vn].index) for vn in self.vnames)
        com = ' '.join(self.vnames)  # for comment
        return '({0:s})  // {1:s} ({2:s})'.format(index, self.name, com)
565929
function form () {
  form.form = $("#swagger-parser-form");

  form.allow = {
    label: form.form.find("#allow-label"),
    menu: form.form.find("#allow-menu"),
    json: form.form.find("input[name=allow-json]"),
    yaml: form.form.find("input[name=allow-yaml]"),
    text: form.form.find("input[name=allow-text]"),
    empty: form.form.find("input[name=allow-empty]"),
    unknown: form.form.find("input[name=allow-unknown]")
  };

  form.refs = {
    label: form.form.find("#refs-label"),
    menu: form.form.find("#refs-menu"),
    external: form.form.find("input[name=refs-external]"),
    circular: form.form.find("input[name=refs-circular]")
  };

  form.validate = {
    label: form.form.find("#validate-label"),
    menu: form.form.find("#validate-menu"),
    schema: form.form.find("input[name=validate-schema]"),
    spec: form.form.find("input[name=validate-spec]")
  };

  form.tabs = {
    url: form.form.find("#url-tab"),
    text: form.form.find("#text-tab")
  };

  form.method = {
    button: form.form.find("button[name=method]"),
    menu: form.form.find("#method-menu")
  };

  form.samples = {
    url: {
      container: form.form.find("#url-sample"),
      link: form.form.find("#url-sample-link"),
    },
    text: {
      container: form.form.find("#text-sample"),
      link: form.form.find("#text-sample-link"),
    }
  };

  form.url = form.form.find("input[name=url]");
  form.textBox = null; // This is set in editors.js
  form.bookmark = form.form.find("#bookmark");
}
514764
function GraphInput() {
        this.addOutput("", "");

        this.name_in_graph = "";
        this.properties = {};
        var that = this;

        Object.defineProperty(this.properties, "name", {
            get: function() {
                return that.name_in_graph;
            },
            set: function(v) {
                if (v == "" || v == that.name_in_graph || v == "enabled") {
                    return;
                }
                if (that.name_in_graph) {
                    //already added
                    that.graph.renameInput(that.name_in_graph, v);
                } else {
                    that.graph.addInput(v, that.properties.type);
                }
                that.name_widget.value = v;
                that.name_in_graph = v;
            },
            enumerable: true
        });

        Object.defineProperty(this.properties, "type", {
            get: function() {
                return that.outputs[0].type;
            },
            set: function(v) {
                if (v == "event") {
                    v = LiteGraph.EVENT;
                }
                that.outputs[0].type = v;
                if (that.name_in_graph) {
                    //already added
                    that.graph.changeInputType(
                        that.name_in_graph,
                        that.outputs[0].type
                    );
                }
                that.type_widget.value = v;
            },
            enumerable: true
        });

        this.name_widget = this.addWidget(
            "text",
            "Name",
            this.properties.name,
            function(v) {
                if (!v) {
                    return;
                }
                that.properties.name = v;
            }
        );
        this.type_widget = this.addWidget(
            "text",
            "Type",
            this.properties.type,
            function(v) {
                v = v || "";
                that.properties.type = v;
            }
        );

        this.widgets_up = true;
        this.size = [180, 60];
    }
1168038
function walkAndFormat(node) {
  if (node) {
    if (node.append !== 'once') {
      if (node.children && node.children.length) {
        for (var i = 0, len = node.children.length; i < len; i++) {
          walkAndFormat(node.children[i])
        }
      }
    }
    else {
      format(node)
    }
  }
}
902575
function splitUpParagraph(segment, resultStr, stack, tokens, tokenIndex) {
	let startOfWord = resultStr.indexOf(stack[0].complete) + 1;
	let textBeforeSelected = resultStr.slice(0, startOfWord);
	let startToken = tokens[2][tokenIndex];
	let selected = resultStr.slice(startOfWord + segment.length - 1, resultStr.indexOf(segment));
	let endToken = tokens[3][tokenIndex];
	let textAfterSelected = resultStr.slice(resultStr.indexOf(segment) + segment.length - 1);
	return textBeforeSelected + startToken + selected + endToken + textAfterSelected;
}
147824
function ( radius, detail ) {

	var vertices = [
		1, 1, 1, 	- 1, - 1, 1, 	- 1, 1, - 1, 	1, - 1, - 1
	];

	var indices = [
		2, 1, 0, 	0, 3, 2,	1, 3, 0,	2, 3, 1
	];

	PolyhedronBufferGeometry.call( this, vertices, indices, radius, detail );

	this.type = '';

	this.parameters = {
		radius: radius,
		detail: detail
	};

}
151173
function renderDesructuration(pattern, expr, traverse, path, state) {
  utils.catchupNewlines(pattern.range[1], state);

  var id;

  if (pattern.type === Syntax.ObjectPattern && pattern.properties.length === 1) {
    id = expr;
  } else if (pattern.type === Syntax.ArrayPattern && pattern.elements.length === 1) {
    id = expr;
  } else {
    id = renderExpressionMemoized(expr, traverse, path, state);
  }

  if (pattern.type === Syntax.ObjectPattern) {

    pattern.properties.forEach(function(prop, idx) {
      var comma = (idx !== pattern.properties.length - 1) ? ', ' : '';

      if (isPattern(prop.value)) {
        renderDesructuration(prop.value, [id, '.', prop.key.name], traverse, path, state);
      } else {
        utils.append(prop.value.name + ' = ', state);
        render([id, '.' + prop.key.name], traverse, path, state);
        utils.append(comma, state);
      }
    });

  } else {

    pattern.elements.forEach(function(elem, idx) {
      // null means skip
      if (elem === null) {
        return;
      }

      var comma = (idx !== pattern.elements.length - 1) ? ', ' : '';

      if (isPattern(elem)) {
        renderDesructuration(elem, [id, '[' + idx + ']'], traverse, path, state);
      } else if (elem.type === Syntax.SpreadElement) {
        utils.append(elem.argument.name + ' = ', state);
        render([id, '.slice(' + idx + ')'], traverse, path, state);
        utils.append(comma, state);
      } else {
        utils.append(elem.name + ' = ', state);
        render([id, '[' + idx + ']'], traverse, path, state);
        utils.append(comma, state);
      }
    });
  }
}
1275076
function() {
		"use strict";

		var parent = this;
		var options = parent.options;
		var legendWidth = options.displayLegend ? (parent.Legend.getDim("width") + options.legendMargin[1] + options.legendMargin[3]) : 0;
		var legendHeight = options.displayLegend ? (parent.Legend.getDim("height") + options.legendMargin[0] + options.legendMargin[2]) : 0;

		var graphWidth = parent.graphDim.width - options.domainGutter - options.cellPadding;
		var graphHeight = parent.graphDim.height - options.domainGutter - options.cellPadding;

		this.root.transition().duration(options.animationDuration)
			.attr("width", function() {
				if (options.legendVerticalPosition === "middle" || options.legendVerticalPosition === "center") {
					return graphWidth + legendWidth;
				}
				return Math.max(graphWidth, legendWidth);
			})
			.attr("height", function() {
				if (options.legendVerticalPosition === "middle" || options.legendVerticalPosition === "center") {
					return Math.max(graphHeight, legendHeight);
				}
				return graphHeight + legendHeight;
			})
		;

		this.root.select(".graph").transition().duration(options.animationDuration)
			.attr("y", function() {
				if (options.legendVerticalPosition === "top") {
					return legendHeight;
				}
				return 0;
			})
			.attr("x", function() {
				if (
					(options.legendVerticalPosition === "middle" || options.legendVerticalPosition === "center") &&
					options.legendHorizontalPosition === "left") {
					return legendWidth;
				}
				return 0;

			})
		;
	}
1187995
function Axes( graph ) {

	// INSTANCE ATTRIBUTES //

	this._parent = graph;
	this._root = undefined;
	this._children = {};
	this._config = [
		{
			"display": true,
			"scale": "x",
			"label": "x",
			"ticks": {
				"display": true,
				"num": 5,
				"format": null,
				"padding": 3,
				"innerSize": 6,
				"outerSize": 6,
				"rotation": 0,
				"direction": "out"
			},
			"orient": "bottom"
		},
		{
			"display": true,
			"scale": "y",
			"label": "y",
			"ticks": {
				"display": true,
				"num": 5,
				"format": null,
				"padding": 3,
				"innerSize": 6,
				"outerSize": 6,
				"rotation": 0,
				"direction": "out"
			},
			"orient": "left"
		}
	];

	// GENERATORS //

	this._xAxis = this.axis()
		.scale( graph._xScale )
		.orient( this._config[ 0 ].orient )
		.ticks( this._config[ 0 ].ticks.num )
		.innerTickSize( this._config[ 0 ].ticks.innerSize )
		.outerTickSize( this._config[ 0 ].ticks.outerSize )
		.tickPadding( this._config[ 0 ].ticks.padding )
		.tickFormat( this._config[ 0 ].ticks.format );

	this._yAxis = this.axis()
		.scale( graph._yScale )
		.orient( this._config[ 1 ].orient )
		.ticks( this._config[ 1 ].ticks.num )
		.innerTickSize( this._config[ 1 ].ticks.innerSize )
		.outerTickSize( this._config[ 1 ].ticks.outerSize )
		.tickPadding( this._config[ 1 ].ticks.padding )
		.tickFormat( this._config[ 1 ].ticks.format );

	// REGISTER //
	if ( graph._config.hasOwnProperty( 'axes' ) ) {
		graph._config.axes.push( this._config );
	} else {
		graph._config.axes = [ this._config ];
	}
	if ( graph._children.hasOwnProperty( 'axes' ) ) {
		graph._children.axes.push( this );
	} else {
		graph._children.axes = [ this ];
	}

	return this;

}
994365
function graph(g) {
    init(g);

    var xs = [upperLeft(g), upperRight(g), lowerRight(g), lowerLeft(g)];

    g.nodes().forEach(function(u) {
      var xArray = [];
      for (var i = 0; i < xs.length; ++i) {
        xArray.push(xs[i][u]);
      }
      xArray.sort();
      g.node(u).x = (xArray[1] + xArray[2]) / 2;
    });
  }