<commit_before><!doctype html>

<html lang="en">
	<head>
		<meta charset="utf-8">
		<title>CP-Net Visualizer</title>
		<meta name="description" content="Visualizes a CP-Net as a force-directed graph">
		<meta name="author" content="<NAME>">
		<link rel="stylesheet" href="resources/style.css?v=1.0">

		<!--[if lt IE 9]>
		<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
		<![endif]-->

		<style>
			/* This must stay in the html file, other wise the links (and nodes?) will not work properly in Firefox.
			   Something to do with Firefox not waiting for the linked css files to load before loading everything else. */
			.node {
				cursor: default;
				font-size: 6pt; /* Must be here for Safari */
			}
			.node-circle {
				stroke-width: 1px;
				stroke: black;
				fill: white;
			}
			.link, .linking-arrow {
				stroke-width: 1.5px;
				opacity: 0.4;
				marker-end: url(#end-arrow);
				pointer-events: none;
			}
			.linking-arrow
			{
				stroke: #7585CF;
			}
			.node-name-text {
				font-family: Helvetica, Arial, sans-serif;
				fill: black;
				text-anchor: middle;
				dominant-baseline: middle;
				pointer-events: none;
			}
			.node-cpt-text {
				text-anchor: start;
				font-size: 0.7em;
			}
			.node-cpt-highlighted-text {
				text-anchor: start;
				font-size: 0.7em;
				fill: #7585CF;
				font-weight: bold;
			}
		</style>
	</head>

	<body>
		<div id="graph"></div>
			
		<p id="message-bar"></p>
		
		<!-- UI panels -->
		<div class="panel" id="options-panel">
			<p class="header">controls</p>
			<input type="button" id="add-node-button" value="Add Root Node" onclick="AddNodeButtonClicked()"/>
			<input type="button" id="delete-node-button" value="Delete Selected Node" onclick="RemoveNodeButtonClicked()" disabled/>
			<input type="button" id="link-node-button" value="(Un)Link Selected Node to..." onclick="LinkNodesButtonClicked()" disabled/>
			<input type="button" id="affix-node-button" value="Affix Selected Node" onclick="AffixNodeButtonClicked()" disabled/>
			<div class="spacer"></div>
			
			<p class="header">options</p>
			<input type="checkbox" id="allow-cycles-checkbox" onchange="AllowCyclesCheckChanged()"/> <p class="inlinetext">Allow Cycles</p><br>
			<input type="checkbox" id="show-cpts-in-graph-checkbox" onchange="ShowCPTsInGraphCheckChanged()"/> <p class="inlinetext">Show CPTs in Graph</p><br>
			<input type="number" id="max-in-nodes-selector" min=1 max=20 value=5 style="margin-top:0.3em;width:3em;" onchange="MaxInNodesSelectorChanged()"/> <p class="inlinetext">Max In-Degree</p><br>
			<input type="number" id="node-spacing-selector" min=5 max=40 value=12 style="margin-top:0.3em;width:3em;" onchange="NodeSpacingSelectorChanged()"/> <p class="inlinetext">Node Spacing</p><br>
			<div class="spacer"></div>

			<p class="header" style="margin-bottom:0;">loading and saving</p>
			<p class="header" style="margin-bottom:0.8em;font-size:0.8em;" id="saved-notifier" >currently saved</p>
			<input type="text" id="cp-net-name-input" placeholder="CP-Net Name">
			<div class="smallspacer"></div>
			<input type="button" value="New CP-Net" onclick="LoadNewCPNet()"/>
			<div class="smallspacer"></div>
			
			<input type="button" value="Load CP-Net from File" onclick="LoadCPNetFromFile()"/>
			<input type="button" value="Save CP-Net as XML" onclick="SaveCPNetAsXML()"/>
			<input type="button" value="Save CP-Net as SVG" onclick="SaveCPNetAsSVG()"/>
			
			<div class="spacer"></div>

			<p class="header">utilities</p>
			<input type="button" value="Visualize Flipping Sequence" onclick="VisualizeFlippingSequence()"/>
		</div>

		<div class="panel" id="nodeinfo-panel">
			<p class="header" id="node-name-display">no selected node</p>
			<input type="text" id="node-name-input" oninput="NodeNameInputChanged()" placeholder="Node Name"/>

			<div class="spacer"></div>
			<p class="header">domain - one per line</p>
			<textarea id="domain-list-textarea" onchange="DomainInputChanged()" rows="40" cols="40"></textarea>

			<div class="spacer"></div>
			<p class="header">parents</p>

			<table id="parents-list-table" cellpadding="0" cellspacing="0"></table><commit_msg>Changed node spacing control to a slider<commit_after><!doctype html>

<html lang="en">
	<head>
		<meta charset="utf-8">
		<title>CP-Net Visualizer</title>
		<meta name="description" content="Visualizes a CP-Net as a force-directed graph">
		<meta name="author" content="<NAME>">
		<link rel="stylesheet" href="resources/style.css?v=1.0">

		<!--[if lt IE 9]>
		<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
		<![endif]-->

		<style>
			/* This must stay in the html file, other wise the links (and nodes?) will not work properly in Firefox.
			   Something to do with Firefox not waiting for the linked css files to load before loading everything else. */
			.node {
				cursor: default;
				font-size: 6pt; /* Must be here for Safari */
			}
			.node-circle {
				stroke-width: 1px;
				stroke: black;
				fill: white;
			}
			.link, .linking-arrow {
				stroke-width: 1.5px;
				opacity: 0.4;
				marker-end: url(#end-arrow);
				pointer-events: none;
			}
			.linking-arrow
			{
				stroke: #7585CF;
			}
			.node-name-text {
				font-family: Helvetica, Arial, sans-serif;
				fill: black;
				text-anchor: middle;
				dominant-baseline: middle;
				pointer-events: none;
			}
			.node-cpt-text {
				text-anchor: start;
				font-size: 0.7em;
			}
			.node-cpt-highlighted-text {
				text-anchor: start;
				font-size: 0.7em;
				fill: #7585CF;
				font-weight: bold;
			}
		</style>
	</head>

	<body>
		<div id="graph"></div>
			
		<p id="message-bar"></p>
		
		<!-- UI panels -->
		<div class="panel" id="options-panel">
			<p class="header">controls</p>
			<input type="button" id="add-node-button" value="Add Root Node" onclick="AddNodeButtonClicked()"/>
			<input type="button" id="delete-node-button" value="Delete Selected Node" onclick="RemoveNodeButtonClicked()" disabled/>
			<input type="button" id="link-node-button" value="(Un)Link Selected Node to..." onclick="LinkNodesButtonClicked()" disabled/>
			<input type="button" id="affix-node-button" value="Affix Selected Node" onclick="AffixNodeButtonClicked()" disabled/>
			<div class="spacer"></div>
			
			<p class="header">options</p>
			<input type="checkbox" id="allow-cycles-checkbox" onchange="AllowCyclesCheckChanged()"/> <p class="inlinetext">Allow Cycles</p><br>
			<input type="checkbox" id="show-cpts-in-graph-checkbox" onchange="ShowCPTsInGraphCheckChanged()"/> <p class="inlinetext">Show CPTs in Graph</p><br>
			<input type="number" id="max-in-nodes-selector" min=1 max=20 value=5 style="margin-top:0.3em;width:3em;" onchange="MaxInNodesSelectorChanged()"/> <p class="inlinetext">Max In-Degree</p><br>
			<input type="range" id="node-spacing-selector" min="8" max="60" value="12" style="margin-top:0.3em;width:6em;" oninput="NodeSpacingSelectorChanged()"> <p class="inlinetext">Node Spacing</p><br>
			<div class="spacer"></div>

			<p class="header" style="margin-bottom:0;">loading and saving</p>
			<p class="header" style="margin-bottom:0.8em;font-size:0.8em;" id="saved-notifier" >currently saved</p>
			<input type="text" id="cp-net-name-input" placeholder="CP-Net Name">
			<div class="smallspacer"></div>
			<input type="button" value="New CP-Net" onclick="LoadNewCPNet()"/>
			<div class="smallspacer"></div>
			
			<input type="button" value="Load CP-Net from File" onclick="LoadCPNetFromFile()"/>
			<input type="button" value="Save CP-Net as XML" onclick="SaveCPNetAsXML()"/>
			<input type="button" value="Save CP-Net as SVG" onclick="SaveCPNetAsSVG()"/>
			
			<div class="spacer"></div>

			<p class="header">utilities</p>
			<input type="button" value="Visualize Flipping Sequence" onclick="VisualizeFlippingSequence()"/>
		</div>

		<div class="panel" id="nodeinfo-panel">
			<p class="header" id="node-name-display">no selected node</p>
			<input type="text" id="node-name-input" oninput="NodeNameInputChanged()" placeholder="Node Name"/>

			<div class="spacer"></div>
			<p class="header">domain - one per line</p>
			<textarea id="domain-list-textarea" onchange="DomainInputChanged()" rows="40" cols="40"></textarea>

			<div class="spacer"></div>
			<p class="header">parents</p>

			<table id="parents-list-table" cellpadding="0" cellspacing="0"></table>
{'fraction_non_alphanumeric': 0.18396452540747843, 'fraction_numerical': 0.011984659635666348, 'mean_word_length': 4.281645569620253, 'pattern_counts': {'":': 0, '<': 177, '<?xml version=': 0, '>': 177, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7445211', 'n_tokens_mistral': 3319, 'n_tokens_neox': 2815, 'n_words': 619}