drakongen 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.vscode/launch.json +18 -0
- package/LICENSE +24 -0
- package/README.md +80 -0
- package/browser/drakongen.js +1303 -0
- package/browsertest.html +84 -0
- package/buildbrowser +4 -0
- package/buildexamples.js +61 -0
- package/examples/00.Empty.drakon +1 -0
- package/examples/00.Empty.txt +5 -0
- package/examples/01. /320/221/320/265/320/273/321/213/320/270/314/206.drakon" +13 -0
- package/examples/01. /320/221/320/265/320/273/321/213/320/271.json" +16 -0
- package/examples/01. /320/221/320/265/320/273/321/213/320/271.txt" +4 -0
- package/examples/02. /320/247/320/265/314/210/321/200/320/275/321/213/320/270/314/206.drakon" +28 -0
- package/examples/02. /320/247/321/221/321/200/320/275/321/213/320/271.json" +31 -0
- package/examples/02. /320/247/321/221/321/200/320/275/321/213/320/271.txt" +10 -0
- package/examples/03. /320/241/320/265/321/200/321/213/320/270/314/206.drakon" +20 -0
- package/examples/03. /320/241/320/265/321/200/321/213/320/271.json" +23 -0
- package/examples/03. /320/241/320/265/321/200/321/213/320/271.txt" +6 -0
- package/examples/04. /320/221/321/203/321/200/321/213/320/270/314/206.drakon" +25 -0
- package/examples/04. /320/221/321/203/321/200/321/213/320/271.json" +29 -0
- package/examples/04. /320/221/321/203/321/200/321/213/320/271.txt" +7 -0
- package/examples/05. /320/226/320/265/314/210/320/273/321/202/321/213/320/270/314/206.drakon" +25 -0
- package/examples/05. /320/226/321/221/320/273/321/202/321/213/320/271.json" +29 -0
- package/examples/05. /320/226/321/221/320/273/321/202/321/213/320/271.txt" +7 -0
- package/examples/06. /320/221/320/260/320/263/321/200/320/276/320/262/321/213/320/270/314/206.drakon" +30 -0
- package/examples/06. /320/221/320/260/320/263/321/200/320/276/320/262/321/213/320/271.json" +35 -0
- package/examples/06. /320/221/320/260/320/263/321/200/320/276/320/262/321/213/320/271.txt" +10 -0
- package/examples/07. /320/244/320/270/320/276/320/273/320/265/321/202/320/276/320/262/321/213/320/270/314/206.drakon" +42 -0
- package/examples/07. /320/244/320/270/320/276/320/273/320/265/321/202/320/276/320/262/321/213/320/271.json" +49 -0
- package/examples/07. /320/244/320/270/320/276/320/273/320/265/321/202/320/276/320/262/321/213/320/271.txt" +14 -0
- package/examples/08. /320/221/320/270/321/200/321/216/320/267/320/276/320/262/321/213/320/270/314/206.drakon" +27 -0
- package/examples/08. /320/221/320/270/321/200/321/216/320/267/320/276/320/262/321/213/320/271.json" +27 -0
- package/examples/08. /320/221/320/270/321/200/321/216/320/267/320/276/320/262/321/213/320/271.txt" +6 -0
- package/examples/09. /320/236/321/200/320/260/320/275/320/266/320/265/320/262/321/213/320/270/314/206.drakon" +37 -0
- package/examples/09. /320/236/321/200/320/260/320/275/320/266/320/265/320/262/321/213/320/271.json" +39 -0
- package/examples/09. /320/236/321/200/320/260/320/275/320/266/320/265/320/262/321/213/320/271.txt" +10 -0
- package/examples/10. /320/240/320/276/320/267/320/276/320/262/321/213/320/270/314/206.drakon" +42 -0
- package/examples/10. /320/240/320/276/320/267/320/276/320/262/321/213/320/271.json" +54 -0
- package/examples/10. /320/240/320/276/320/267/320/276/320/262/321/213/320/271.txt" +16 -0
- package/examples/11. /320/227/320/260/321/211/320/270/321/202/320/275/321/213/320/270/314/206.drakon" +37 -0
- package/examples/11. /320/227/320/260/321/211/320/270/321/202/320/275/321/213/320/271.json" +39 -0
- package/examples/11. /320/227/320/260/321/211/320/270/321/202/320/275/321/213/320/271.txt" +10 -0
- package/examples/12. /320/221/320/276/320/273/320/276/321/202/320/275/321/213/320/270/314/206.drakon" +44 -0
- package/examples/12. /320/221/320/276/320/273/320/276/321/202/320/275/321/213/320/271.json" +43 -0
- package/examples/12. /320/221/320/276/320/273/320/276/321/202/320/275/321/213/320/271.txt" +10 -0
- package/examples/13. /320/241/320/260/320/273/320/260/321/202/320/276/320/262/321/213/320/270/314/206.drakon" +54 -0
- package/examples/13. /320/241/320/260/320/273/320/260/321/202/320/276/320/262/321/213/320/271.json" +63 -0
- package/examples/13. /320/241/320/260/320/273/320/260/321/202/320/276/320/262/321/213/320/271.txt" +18 -0
- package/examples/14. /320/227/320/276/320/273/320/276/321/202/320/276/320/270/314/206.drakon" +64 -0
- package/examples/14. /320/227/320/276/320/273/320/276/321/202/320/276/320/271.json" +73 -0
- package/examples/14. /320/227/320/276/320/273/320/276/321/202/320/276/320/271.txt" +22 -0
- package/examples/15. /320/241/320/270/320/275/320/270/320/270/314/206.drakon" +54 -0
- package/examples/15. /320/241/320/270/320/275/320/270/320/271.json" +87 -0
- package/examples/15. /320/241/320/270/320/275/320/270/320/271.txt" +26 -0
- package/examples/16. /320/223/320/276/320/273/321/203/320/261/320/276/320/270/314/206.drakon" +37 -0
- package/examples/16. /320/223/320/276/320/273/321/203/320/261/320/276/320/271.json" +48 -0
- package/examples/16. /320/223/320/276/320/273/321/203/320/261/320/276/320/271.txt" +13 -0
- package/examples/17. /320/241/320/260/320/273/320/260/321/202/320/276/320/262/321/213/320/270/314/206.drakon" +39 -0
- package/examples/17. /320/241/320/260/320/273/320/260/321/202/320/276/320/262/321/213/320/271.json" +41 -0
- package/examples/17. /320/241/320/260/320/273/320/260/321/202/320/276/320/262/321/213/320/271.txt" +10 -0
- package/examples/18. /320/241/321/202/320/260/320/273/321/214/320/275/320/276/320/270/314/206.drakon" +49 -0
- package/examples/18. /320/241/321/202/320/260/320/273/321/214/320/275/320/276/320/271.json" +67 -0
- package/examples/18. /320/241/321/202/320/260/320/273/321/214/320/275/320/276/320/271.txt" +19 -0
- package/examples/19. Lilla.drakon +39 -0
- package/examples/19. Lilla.json +45 -0
- package/examples/19. Lilla.txt +11 -0
- package/examples/Adaptive design.drakon +116 -0
- package/examples/Adaptive design.json +153 -0
- package/examples/Adaptive design.txt +47 -0
- package/examples/And test.drakon +46 -0
- package/examples/And test.json +46 -0
- package/examples/And test.txt +10 -0
- package/examples/Arrow - double exit.drakon +41 -0
- package/examples/Arrow - double exit.json +62 -0
- package/examples/Arrow - double exit.txt +14 -0
- package/examples/Complex arrow.drakon +93 -0
- package/examples/Complex arrow.json +162 -0
- package/examples/Complex arrow.txt +43 -0
- package/examples/DoubleArrow.drakon +53 -0
- package/examples/DoubleArrow.json +86 -0
- package/examples/DoubleArrow.txt +18 -0
- package/examples/Find pointing nodes.drakon +104 -0
- package/examples/Find pointing nodes.json +137 -0
- package/examples/Find pointing nodes.txt +29 -0
- package/examples/How to tune PID on a quadcopter.drakon +488 -0
- package/examples/How to tune PID on a quadcopter.json +734 -0
- package/examples/How to tune PID on a quadcopter.txt +169 -0
- package/examples/Or test.drakon +47 -0
- package/examples/Or test.json +46 -0
- package/examples/Or test.txt +10 -0
- package/examples/Silhouette test 1.drakon +47 -0
- package/examples/Silhouette test 1.json +82 -0
- package/examples/Silhouette test 1.txt +24 -0
- package/examples/Work out action-check.drakon +30 -0
- package/examples/Work out action-check.json +45 -0
- package/examples/Work out action-check.txt +9 -0
- package/examples/Workout foreach.drakon +63 -0
- package/examples/Workout foreach.json +62 -0
- package/examples/Workout foreach.txt +14 -0
- package/examples/ar01.drakon +25 -0
- package/examples/ar01.json +40 -0
- package/examples/ar01.txt +7 -0
- package/examples/ar02.drakon +30 -0
- package/examples/ar02.json +45 -0
- package/examples/ar02.txt +10 -0
- package/examples/ar03.drakon +32 -0
- package/examples/ar03.json +44 -0
- package/examples/ar03.txt +7 -0
- package/examples/ar04.drakon +37 -0
- package/examples/ar04.json +49 -0
- package/examples/ar04.txt +10 -0
- package/examples/ar05.drakon +37 -0
- package/examples/ar05.json +59 -0
- package/examples/ar05.txt +11 -0
- package/examples/ar06.drakon +40 -0
- package/examples/ar06.json +70 -0
- package/examples/ar06.txt +13 -0
- package/examples/ar07.drakon +40 -0
- package/examples/ar07.json +70 -0
- package/examples/ar07.txt +13 -0
- package/examples/ar08.drakon +47 -0
- package/examples/ar08.json +81 -0
- package/examples/ar08.txt +16 -0
- package/examples/ar09.drakon +52 -0
- package/examples/ar09.json +87 -0
- package/examples/ar09.txt +17 -0
- package/examples/ar10.drakon +52 -0
- package/examples/ar10.json +88 -0
- package/examples/ar10.txt +18 -0
- package/examples/ar11.drakon +47 -0
- package/examples/ar11.json +82 -0
- package/examples/ar11.txt +17 -0
- package/examples/ar12.drakon +37 -0
- package/examples/ar12.json +49 -0
- package/examples/ar12.txt +10 -0
- package/examples/getToken.drakon +76 -0
- package/examples/getToken.json +88 -0
- package/examples/getToken.txt +41 -0
- package/examples/tmp.drakon +49 -0
- package/examples/tmp.json +82 -0
- package/examples/tmp.txt +37 -0
- package/package.json +21 -0
- package/prompts/drakonToPrompt.txt +139 -0
- package/prompts/index.txt +17 -0
- package/prompts/printPseudo.txt +116 -0
- package/src/browserTools.js +39 -0
- package/src/drakonToPromptStruct.js +44 -0
- package/src/drakonToStruct.js +416 -0
- package/src/drakongen.js +16 -0
- package/src/index.js +17 -0
- package/src/main.js +157 -0
- package/src/nodeTools.js +38 -0
- package/src/printPseudo.js +167 -0
- package/src/structFlow.js +382 -0
- package/src/technicalTree.js +84 -0
- package/src/tools.js +36 -0
- package/src/translate.js +108 -0
package/browsertest.html
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="ru">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8"/>
|
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1"/>
|
|
6
|
+
<style>
|
|
7
|
+
*, *:before, *:after {
|
|
8
|
+
-webkit-box-sizing: border-box;
|
|
9
|
+
-moz-box-sizing: border-box;
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
}
|
|
12
|
+
</style>
|
|
13
|
+
<style>
|
|
14
|
+
.main {
|
|
15
|
+
max-width: 100%;
|
|
16
|
+
width: 1200px;
|
|
17
|
+
margin: auto;
|
|
18
|
+
}
|
|
19
|
+
#input {
|
|
20
|
+
width: 100%;
|
|
21
|
+
}
|
|
22
|
+
</style>
|
|
23
|
+
|
|
24
|
+
<title>Drakongen browser test</title>
|
|
25
|
+
</head>
|
|
26
|
+
<body>
|
|
27
|
+
<div class="main">
|
|
28
|
+
<h1>Drakongen browser test</h1>
|
|
29
|
+
<textarea id="input" rows="30" autocorrect="false" placeholder="Enter drakon Json here" spellcheck="false"></textarea>
|
|
30
|
+
<div><select id="format">
|
|
31
|
+
<option value="pseudo">Pseudocode</option>
|
|
32
|
+
<option value="tree">Tree</option>
|
|
33
|
+
</select></div>
|
|
34
|
+
<div><select id="language">
|
|
35
|
+
<option value="en">English</option>
|
|
36
|
+
<option value="no">Norsk</option>
|
|
37
|
+
<option value="ru">Русский</option>
|
|
38
|
+
</select></div>
|
|
39
|
+
<button onclick="convert()">Convert to pseudocode</button>
|
|
40
|
+
<div></div>
|
|
41
|
+
<pre id="output"></pre>
|
|
42
|
+
</div>
|
|
43
|
+
<script src="browser/drakongen.js"></script>
|
|
44
|
+
<script>
|
|
45
|
+
function clear(node) {
|
|
46
|
+
while (node.firstChild) {
|
|
47
|
+
node.removeChild(node.lastChild);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function setText(element, text) {
|
|
52
|
+
clear(element)
|
|
53
|
+
var newNode = document.createTextNode(text)
|
|
54
|
+
element.appendChild(newNode)
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function get(id) {
|
|
58
|
+
return document.getElementById(id)
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function convert() {
|
|
62
|
+
var input = get("input")
|
|
63
|
+
var output = get("output")
|
|
64
|
+
var format = get("format")
|
|
65
|
+
var language = get("language")
|
|
66
|
+
try {
|
|
67
|
+
var content
|
|
68
|
+
if (format.value === "pseudo") {
|
|
69
|
+
content = toPseudocode(input.value, "Drakongen browser test", "Drakongen browser test.drakon", language.value)
|
|
70
|
+
} else {
|
|
71
|
+
content = toTree(input.value, "Drakongen browser test", "Drakongen browser test.drakon", language.value)
|
|
72
|
+
}
|
|
73
|
+
setText(output, content)
|
|
74
|
+
} catch (ex) {
|
|
75
|
+
var message = ex.message + "\n" + ex.filename + "\n" + ex.nodeId
|
|
76
|
+
setText(output, message)
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
var format = get("format")
|
|
81
|
+
format.value = "pseudo"
|
|
82
|
+
</script>
|
|
83
|
+
</body>
|
|
84
|
+
</html>
|
package/buildbrowser
ADDED
package/buildexamples.js
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
const fs = require('fs/promises');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const { spawn } = require('child_process');
|
|
4
|
+
|
|
5
|
+
// Path to the folder containing the .drakon files
|
|
6
|
+
const examplesFolder = path.join(__dirname, 'examples');
|
|
7
|
+
|
|
8
|
+
// Function to execute a command with a file
|
|
9
|
+
async function executeCommand(filePath) {
|
|
10
|
+
return new Promise((resolve, reject) => {
|
|
11
|
+
const process = spawn('node', ['src/main.js', "--output", examplesFolder, filePath]);
|
|
12
|
+
|
|
13
|
+
// Handle stdout
|
|
14
|
+
process.stdout.on('data', data => {
|
|
15
|
+
console.log(`Output for ${path.basename(filePath)}: ${data}`);
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
// Handle stderr
|
|
19
|
+
process.stderr.on('data', data => {
|
|
20
|
+
console.error(`Error for ${path.basename(filePath)}: ${data}`);
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
// Handle process close
|
|
24
|
+
process.on('close', code => {
|
|
25
|
+
if (code === 0) {
|
|
26
|
+
resolve(`Success: ${filePath}`);
|
|
27
|
+
} else {
|
|
28
|
+
reject(new Error(`Process failed for ${filePath} with exit code ${code}`));
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Main function to process .drakon files
|
|
35
|
+
async function processDrakonFiles() {
|
|
36
|
+
try {
|
|
37
|
+
// Read all files in the folder
|
|
38
|
+
const files = await fs.readdir(examplesFolder);
|
|
39
|
+
|
|
40
|
+
// Filter for .drakon files
|
|
41
|
+
const drakonFiles = files.filter(file => file.endsWith('.drakon'));
|
|
42
|
+
|
|
43
|
+
// Process each .drakon file
|
|
44
|
+
for (const file of drakonFiles) {
|
|
45
|
+
const filePath = path.join(examplesFolder, file);
|
|
46
|
+
try {
|
|
47
|
+
await executeCommand(filePath);
|
|
48
|
+
console.log(`Processed file: ${file}`);
|
|
49
|
+
} catch (error) {
|
|
50
|
+
console.error(`Error processing file ${file}: ${error.message}`);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
console.log('All files processed.');
|
|
55
|
+
} catch (err) {
|
|
56
|
+
console.error('Error reading the examples folder:', err.message);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Run the function
|
|
61
|
+
processDrakonFiles();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ }
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "drakon",
|
|
3
|
+
"items": {
|
|
4
|
+
"2": {
|
|
5
|
+
"type": "end"
|
|
6
|
+
},
|
|
7
|
+
"4": {
|
|
8
|
+
"type": "action",
|
|
9
|
+
"one": "7",
|
|
10
|
+
"content": "3"
|
|
11
|
+
},
|
|
12
|
+
"7": {
|
|
13
|
+
"type": "action",
|
|
14
|
+
"one": "10",
|
|
15
|
+
"content": "4"
|
|
16
|
+
},
|
|
17
|
+
"10": {
|
|
18
|
+
"type": "action",
|
|
19
|
+
"one": "2",
|
|
20
|
+
"content": "5"
|
|
21
|
+
},
|
|
22
|
+
"13": {
|
|
23
|
+
"type": "branch",
|
|
24
|
+
"branchId": 0,
|
|
25
|
+
"one": "4"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "02. Чёрный",
|
|
3
|
+
"params": "",
|
|
4
|
+
"branches": [
|
|
5
|
+
{
|
|
6
|
+
"branchId": 0,
|
|
7
|
+
"start": "4",
|
|
8
|
+
"body": [
|
|
9
|
+
{
|
|
10
|
+
"id": "4",
|
|
11
|
+
"type": "action",
|
|
12
|
+
"content": "3"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"id": "7",
|
|
16
|
+
"type": "action",
|
|
17
|
+
"content": "4"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"id": "10",
|
|
21
|
+
"type": "action",
|
|
22
|
+
"content": "5"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"id": "2",
|
|
26
|
+
"type": "end"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "drakon",
|
|
3
|
+
"items": {
|
|
4
|
+
"2": {
|
|
5
|
+
"type": "end"
|
|
6
|
+
},
|
|
7
|
+
"4": {
|
|
8
|
+
"type": "question",
|
|
9
|
+
"flag1": 1,
|
|
10
|
+
"one": "2",
|
|
11
|
+
"two": "2",
|
|
12
|
+
"content": "3"
|
|
13
|
+
},
|
|
14
|
+
"14": {
|
|
15
|
+
"type": "branch",
|
|
16
|
+
"branchId": 0,
|
|
17
|
+
"one": "4"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "03. Серый",
|
|
3
|
+
"params": "",
|
|
4
|
+
"branches": [
|
|
5
|
+
{
|
|
6
|
+
"branchId": 0,
|
|
7
|
+
"start": "4",
|
|
8
|
+
"body": [
|
|
9
|
+
{
|
|
10
|
+
"type": "question",
|
|
11
|
+
"id": "4",
|
|
12
|
+
"content": "3",
|
|
13
|
+
"yes": [],
|
|
14
|
+
"no": []
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"id": "2",
|
|
18
|
+
"type": "end"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "drakon",
|
|
3
|
+
"items": {
|
|
4
|
+
"2": {
|
|
5
|
+
"type": "end"
|
|
6
|
+
},
|
|
7
|
+
"4": {
|
|
8
|
+
"type": "question",
|
|
9
|
+
"flag1": 1,
|
|
10
|
+
"one": "14",
|
|
11
|
+
"two": "2",
|
|
12
|
+
"content": "3"
|
|
13
|
+
},
|
|
14
|
+
"14": {
|
|
15
|
+
"type": "action",
|
|
16
|
+
"one": "2",
|
|
17
|
+
"content": "4"
|
|
18
|
+
},
|
|
19
|
+
"17": {
|
|
20
|
+
"type": "branch",
|
|
21
|
+
"branchId": 0,
|
|
22
|
+
"one": "4"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "04. Бурый",
|
|
3
|
+
"params": "",
|
|
4
|
+
"branches": [
|
|
5
|
+
{
|
|
6
|
+
"branchId": 0,
|
|
7
|
+
"start": "4",
|
|
8
|
+
"body": [
|
|
9
|
+
{
|
|
10
|
+
"type": "question",
|
|
11
|
+
"id": "4",
|
|
12
|
+
"content": "3",
|
|
13
|
+
"yes": [
|
|
14
|
+
{
|
|
15
|
+
"id": "14",
|
|
16
|
+
"type": "action",
|
|
17
|
+
"content": "4"
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"no": []
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"id": "2",
|
|
24
|
+
"type": "end"
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "drakon",
|
|
3
|
+
"items": {
|
|
4
|
+
"2": {
|
|
5
|
+
"type": "end"
|
|
6
|
+
},
|
|
7
|
+
"4": {
|
|
8
|
+
"type": "question",
|
|
9
|
+
"flag1": 1,
|
|
10
|
+
"one": "2",
|
|
11
|
+
"two": "14",
|
|
12
|
+
"content": "3"
|
|
13
|
+
},
|
|
14
|
+
"14": {
|
|
15
|
+
"type": "action",
|
|
16
|
+
"one": "2",
|
|
17
|
+
"content": "4"
|
|
18
|
+
},
|
|
19
|
+
"17": {
|
|
20
|
+
"type": "branch",
|
|
21
|
+
"branchId": 0,
|
|
22
|
+
"one": "4"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "05. Жёлтый",
|
|
3
|
+
"params": "",
|
|
4
|
+
"branches": [
|
|
5
|
+
{
|
|
6
|
+
"branchId": 0,
|
|
7
|
+
"start": "4",
|
|
8
|
+
"body": [
|
|
9
|
+
{
|
|
10
|
+
"type": "question",
|
|
11
|
+
"id": "4",
|
|
12
|
+
"content": "3",
|
|
13
|
+
"yes": [],
|
|
14
|
+
"no": [
|
|
15
|
+
{
|
|
16
|
+
"id": "14",
|
|
17
|
+
"type": "action",
|
|
18
|
+
"content": "4"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"id": "2",
|
|
24
|
+
"type": "end"
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "drakon",
|
|
3
|
+
"items": {
|
|
4
|
+
"2": {
|
|
5
|
+
"type": "end"
|
|
6
|
+
},
|
|
7
|
+
"4": {
|
|
8
|
+
"type": "question",
|
|
9
|
+
"flag1": 1,
|
|
10
|
+
"one": "14",
|
|
11
|
+
"two": "17",
|
|
12
|
+
"content": "3"
|
|
13
|
+
},
|
|
14
|
+
"14": {
|
|
15
|
+
"type": "action",
|
|
16
|
+
"one": "2",
|
|
17
|
+
"content": "4"
|
|
18
|
+
},
|
|
19
|
+
"17": {
|
|
20
|
+
"type": "action",
|
|
21
|
+
"one": "2",
|
|
22
|
+
"content": "5"
|
|
23
|
+
},
|
|
24
|
+
"20": {
|
|
25
|
+
"type": "branch",
|
|
26
|
+
"branchId": 0,
|
|
27
|
+
"one": "4"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "06. Багровый",
|
|
3
|
+
"params": "",
|
|
4
|
+
"branches": [
|
|
5
|
+
{
|
|
6
|
+
"branchId": 0,
|
|
7
|
+
"start": "4",
|
|
8
|
+
"body": [
|
|
9
|
+
{
|
|
10
|
+
"type": "question",
|
|
11
|
+
"id": "4",
|
|
12
|
+
"content": "3",
|
|
13
|
+
"yes": [
|
|
14
|
+
{
|
|
15
|
+
"id": "14",
|
|
16
|
+
"type": "action",
|
|
17
|
+
"content": "4"
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"no": [
|
|
21
|
+
{
|
|
22
|
+
"id": "17",
|
|
23
|
+
"type": "action",
|
|
24
|
+
"content": "5"
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "2",
|
|
30
|
+
"type": "end"
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "drakon",
|
|
3
|
+
"items": {
|
|
4
|
+
"2": {
|
|
5
|
+
"type": "end"
|
|
6
|
+
},
|
|
7
|
+
"4": {
|
|
8
|
+
"type": "question",
|
|
9
|
+
"flag1": 1,
|
|
10
|
+
"one": "29",
|
|
11
|
+
"two": "14",
|
|
12
|
+
"content": "3"
|
|
13
|
+
},
|
|
14
|
+
"14": {
|
|
15
|
+
"type": "question",
|
|
16
|
+
"flag1": 1,
|
|
17
|
+
"one": "32",
|
|
18
|
+
"two": "35",
|
|
19
|
+
"content": "4"
|
|
20
|
+
},
|
|
21
|
+
"29": {
|
|
22
|
+
"type": "action",
|
|
23
|
+
"one": "2",
|
|
24
|
+
"content": "5"
|
|
25
|
+
},
|
|
26
|
+
"32": {
|
|
27
|
+
"type": "action",
|
|
28
|
+
"one": "2",
|
|
29
|
+
"content": "6"
|
|
30
|
+
},
|
|
31
|
+
"35": {
|
|
32
|
+
"type": "action",
|
|
33
|
+
"one": "2",
|
|
34
|
+
"content": "7"
|
|
35
|
+
},
|
|
36
|
+
"38": {
|
|
37
|
+
"type": "branch",
|
|
38
|
+
"branchId": 0,
|
|
39
|
+
"one": "4"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "07. Фиолетовый",
|
|
3
|
+
"params": "",
|
|
4
|
+
"branches": [
|
|
5
|
+
{
|
|
6
|
+
"branchId": 0,
|
|
7
|
+
"start": "4",
|
|
8
|
+
"body": [
|
|
9
|
+
{
|
|
10
|
+
"type": "question",
|
|
11
|
+
"id": "4",
|
|
12
|
+
"content": "3",
|
|
13
|
+
"yes": [
|
|
14
|
+
{
|
|
15
|
+
"id": "29",
|
|
16
|
+
"type": "action",
|
|
17
|
+
"content": "5"
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"no": [
|
|
21
|
+
{
|
|
22
|
+
"type": "question",
|
|
23
|
+
"id": "14",
|
|
24
|
+
"content": "4",
|
|
25
|
+
"yes": [
|
|
26
|
+
{
|
|
27
|
+
"id": "32",
|
|
28
|
+
"type": "action",
|
|
29
|
+
"content": "6"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"no": [
|
|
33
|
+
{
|
|
34
|
+
"id": "35",
|
|
35
|
+
"type": "action",
|
|
36
|
+
"content": "7"
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"id": "2",
|
|
44
|
+
"type": "end"
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "drakon",
|
|
3
|
+
"items": {
|
|
4
|
+
"2": {
|
|
5
|
+
"type": "end"
|
|
6
|
+
},
|
|
7
|
+
"7": {
|
|
8
|
+
"type": "question",
|
|
9
|
+
"flag1": 1,
|
|
10
|
+
"one": "18",
|
|
11
|
+
"two": "2",
|
|
12
|
+
"content": "3"
|
|
13
|
+
},
|
|
14
|
+
"18": {
|
|
15
|
+
"type": "question",
|
|
16
|
+
"flag1": 1,
|
|
17
|
+
"one": "2",
|
|
18
|
+
"two": "2",
|
|
19
|
+
"content": "4"
|
|
20
|
+
},
|
|
21
|
+
"37": {
|
|
22
|
+
"type": "branch",
|
|
23
|
+
"branchId": 0,
|
|
24
|
+
"one": "7"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|