Commit 341b744a authored by Timon Stampfli's avatar Timon Stampfli

wip push so johannes can see it

parent 0c363270
Pipeline #4878 failed with stages
in 32 seconds
......@@ -2,3 +2,5 @@ out
node_modules
.vscode-test/
*.vsix
helper/helper
helper/helper*
module git.dolansoft.org/timon/soicode
require (
github.com/BurntSushi/toml v0.3.1
github.com/cenkalti/backoff v2.0.0+incompatible
github.com/fatih/color v1.7.0
github.com/mattn/go-colorable v0.1.4 // indirect
github.com/mattn/go-isatty v0.0.9 // indirect
github.com/ulikunitz/xz v0.5.4
golang.org/x/net v0.0.0-20181005035420-146acd28ed58 // indirect
)
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/cenkalti/backoff v2.0.0+incompatible h1:5IIPUHhlnUZbcHQsQou5k1Tn58nJkeJL9U+ig5CHJbY=
github.com/cenkalti/backoff v2.0.0+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=
github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA=
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
github.com/mattn/go-isatty v0.0.9 h1:d5US/mDsogSGW37IV293h//ZFaeajb69h+EHFsv2xGg=
github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ=
github.com/ulikunitz/xz v0.5.4 h1:zATC2OoZ8H1TZll3FpbX+ikwmadbO699PE06cIkm9oU=
github.com/ulikunitz/xz v0.5.4/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8=
golang.org/x/net v0.0.0-20181005035420-146acd28ed58 h1:otZG8yDCO4LVps5+9bxOeNiCvgmOyt96J3roHTYs7oE=
golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a h1:aYOabOQFp6Vj6W1F80affTUvO9UxmJRx8K0gsfABByQ=
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
package main
import (
"bufio"
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"net"
"os"
"strings"
"github.com/fatih/color"
)
func main() {
/*
commands:
func sendResult(conn net.Conn, binaryPath, sampleName string, res sampleExecutionResult) {
type transportSampleExecutionResult struct {
Binarypath string
Samplename string
Result sampleExecutionResult
}
runSample
- Sample (samplename)
- Binary
- ManualInput
msg, err := json.Marshal(transportSampleExecutionResult{
Binarypath: binaryPath,
Samplename: sampleName,
Result: res,
})
if err != nil {
panic(err)
}
fmt.Fprintf(conn, string(msg))
fmt.Fprintf(conn, "\n")
}
runSamples
- Samples
var (
colorInfo = color.New(color.FgYellow)
colorInfoIdent = color.New(color.FgHiYellow)
colorError = color.New(color.FgRed)
colorErrorIdent = color.New(color.FgHiRed)
colorCorrect = color.New(color.FgGreen)
colorCorrectIdent = color.New(color.FgHiGreen)
colorProgramOutput = color.New(color.FgBlue)
colorExpectedOutput = color.New(color.FgCyan)
)
*/
stdinReader := bufio.NewScanner(os.Stdin)
terminateStdinReading := make(chan int)
stdinChannel := make(chan string)
go func() {
for {
select {
case <-terminateStdinReading:
fmt.Printf("terminate process stdin reading loop")
return
default:
fmt.Printf("start of default clause\n")
if stdinReader.Scan() {
fmt.Printf("input has been read")
stdinChannel <- stdinReader.Text()
}
fmt.Printf("end of default clause\n")
}
}
}()
func printRunManualInput(binaryPath string) {
colorInfo.Printf("Running program '")
colorInfoIdent.Printf("%v", binaryPath)
colorInfo.Printf("' with your input :\n")
}
func printRunSampleInfo(binaryPath, sampleName string) {
colorInfo.Printf("Running Sample'")
colorInfoIdent.Printf("%v", sampleName)
colorInfo.Printf("' on program '")
colorInfoIdent.Printf("%v", binaryPath)
colorInfo.Printf("':\n")
}
func printSampleVerdict(binaryPath, sampleName, programOutput, expectedOutput string) {
if programOutput != expectedOutput {
// Todo: Highlight diff
colorError.Printf("Sample '")
colorErrorIdent.Printf("%v", sampleName)
colorError.Printf("': Output differs\n")
colorInfo.Printf("Expected Output:\n")
colorProgramOutput.Printf("%v", expectedOutput)
colorInfo.Printf("\nYour Program's output:\n")
colorExpectedOutput.Printf("%v\n", programOutput)
} else {
colorCorrect.Printf("Sample '")
colorCorrectIdent.Printf("%v", sampleName)
colorCorrect.Printf("': Correct\n")
}
}
outFile := ""
outFileContent := ""
func main() {
var conn net.Conn
for argIndex := 1; argIndex < len(os.Args); argIndex++ {
switch os.Args[argIndex] {
case "outfile": // outfile filePath
case "connectTo": // port
argIndex++
outFile = os.Args[argIndex]
case "compile": // compile compilerPath flags
port := os.Args[argIndex]
var err error
conn, err = net.Dial("tcp", "127.0.0.1:"+port)
if err != nil {
panic(err)
}
case "runSample": // binaryPath soitaskPath sampleName
argIndex++
compilerPath := os.Args[argIndex]
binaryPath := os.Args[argIndex]
argIndex++
compileFlags := os.Args[argIndex]
flags := strings.Split(compileFlags, " ")
in, out, err, errorcode := compile(compilerPath, flags, stdinChannel)
outFileContent = outFileContent + in + out + err + errorcode
}
}
soitaskPath := os.Args[argIndex]
argIndex++
sampleName := os.Args[argIndex]
f, err := os.Create(outFile)
if err != nil {
panic(err)
}
defer f.Close()
f.Write([]byte(outFileContent))
sample, err := parseSample(soitaskPath, sampleName)
if err != nil {
panic(err)
}
printRunSampleInfo(binaryPath, sampleName)
executionResult := runSample(binaryPath, bytes.NewBufferString(sample.Input), os.Stdout, os.Stderr)
printSampleVerdict(binaryPath, sampleName, executionResult.Stdout, sample.Output)
sendResult(conn, binaryPath, sampleName, executionResult)
case "runAllSamples": // binaryPath soitaskPath
argIndex++
binaryPath := os.Args[argIndex]
argIndex++
soitaskPath := os.Args[argIndex]
samples, err := parseAllSamples(soitaskPath)
if err != nil {
panic(err)
}
for sampleName, sample := range samples {
printRunSampleInfo(binaryPath, sampleName)
executionResult := runSample(binaryPath, bytes.NewBufferString(sample.Input), ioutil.Discard, ioutil.Discard)
printSampleVerdict(binaryPath, sampleName, executionResult.Stdout, sample.Output)
fmt.Printf("readed almost end")
terminateStdinReading <- 0
fmt.Printf("reached end")
sendResult(conn, binaryPath, sampleName, executionResult)
}
case "runManualInput": // binaryPath
argIndex++
binaryPath := os.Args[argIndex]
printRunManualInput(binaryPath)
executionResult := runSample(binaryPath, os.Stdin, os.Stdout, os.Stderr)
sendResult(conn, binaryPath, "manualInput", executionResult)
}
}
}
package main
import (
"bufio"
"bytes"
"fmt"
"io"
"os"
"os/exec"
)
func run(cmd string, args []string, stdin chan string) (collectedStdin, collectedStdout, collectedStderr, errcode string) {
process := exec.Command(cmd, args...)
stdoutReader, _ := process.StdoutPipe()
stderrReader, _ := process.StderrPipe()
stdoutScanner := bufio.NewScanner(stdoutReader)
stderrScanner := bufio.NewScanner(stderrReader)
var stdoutBuf bytes.Buffer
var stderrBuf bytes.Buffer
var stdinBuf bytes.Buffer
type sampleExecutionResult struct {
Stdin string
Stdout string
Stderr string
ProcessError string
}
func runSample(cmd string, input io.Reader, output, stderr io.Writer) sampleExecutionResult {
processStdinWritePipe, err := process.StdinPipe()
process := exec.Command(cmd)
process.Env = []string{"SOI_H_EOFCHECK=1"}
processStdin, err := process.StdinPipe()
if err != nil {
fmt.Println(err)
panic(err)
}
defer processStdinWritePipe.Close()
terminateIOLoop := make(chan int)
go func() {
for {
select {
case <-terminateIOLoop:
fmt.Printf("terminate process io loop")
return
case in := <-stdin:
stdoutBuf.WriteString(in)
io.WriteString(processStdinWritePipe, in)
default:
if stdoutScanner.Scan() {
out := stdoutScanner.Text()
stdoutBuf.WriteString(out)
fmt.Printf("%s", out)
}
if stderrScanner.Scan() {
err := stderrScanner.Text()
stderrBuf.WriteString(err)
fmt.Fprintf(os.Stderr, "%s", err)
}
}
}
}()
process.Start()
processError := process.Wait()
errorcode := ""
if processError != nil {
errcode = processError.Error()
processStdout, err := process.StdoutPipe()
if err != nil {
panic(err)
}
processStderr, err := process.StderrPipe()
if err != nil {
panic(err)
}
var collectedStdin bytes.Buffer
var collectedStdout bytes.Buffer
var collectedStderr bytes.Buffer
go io.Copy(io.MultiWriter(processStdin, &collectedStdin), input)
go io.Copy(io.MultiWriter(output, &collectedStdout), processStdout)
go io.Copy(io.MultiWriter(stderr, &collectedStderr), processStderr)
err = process.Run()
processErrorString := ""
if err != nil {
processErrorString = err.Error()
}
return sampleExecutionResult{
Stdin: collectedStdin.String(),
Stdout: collectedStdout.String(),
Stderr: collectedStderr.String(),
ProcessError: processErrorString,
}
terminateIOLoop <- 0
return stdinBuf.String(), stdoutBuf.String(), stderrBuf.String(), errorcode
}
func compile(compilerPath string, flags []string, stdin chan string) (collectedStdin, collectedStdout, collectedStderr, err string) {
return run(compilerPath, flags, stdin)
}
package main
import (
"fmt"
"io/ioutil"
"strings"
"github.com/BurntSushi/toml"
)
// Sample contains input and output of a sample of a test for a competitive solution
type Sample struct {
Input string
Output string
}
// Soitask is content of a Soitask file, a toml structured collection of testcases for a competitive program
type Soitask = map[string]map[string]Sample
func parseSample(soitaskPath, sampleName string) (Sample, error) {
soitaskToml, err := ioutil.ReadFile(soitaskPath)
if err != nil {
return Sample{}, err
}
var soitask Soitask
toml.Decode(string(soitaskToml), &soitask)
tomlPath := strings.Split(sampleName, ".")
if len(tomlPath) != 2 {
return Sample{}, fmt.Errorf("Samplename '%v' doesn't fit a Soitask", sampleName)
}
return soitask[tomlPath[0]][tomlPath[1]], nil
}
func parseAllSamples(soitaskPath string) (map[string]Sample, error) {
soitaskToml, err := ioutil.ReadFile(soitaskPath)
if err != nil {
return map[string]Sample{}, err
}
var soitask Soitask
toml.Decode(string(soitaskToml), &soitask)
samples := map[string]Sample{}
for major, minormap := range soitask {
for minor, sample := range minormap {
samples[major+"."+minor] = sample
}
}
return samples, nil
}
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><path d="M7.951 3v1.049L8 4h5v8H4V8.297H3V12l1 1h9l1-1V4l-1-1H7.951zM7 4L4 7l3-3z" clip-rule="evenodd" fill="#c5c5c5" fill-rule="evenodd"/><g aria-label="_|" style="line-height:1.25" font-weight="700" font-size="4.667" font-family="courier new" letter-spacing="0" word-spacing="0" fill="#c5c5c5"><path d="M4.87 10.874v-.219h2.82v.22zM8.782 11.41V6.99h.597v4.419z" style="line-height:1.25;-inkscape-font-specification:'courier new, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start"/></g><path d="M3.492 4.413l-.976-.981.326-.327 1.033 1.038 1.018-1.018.326.327-.976.976.976.982-.326.326L3.86 4.698 2.842 5.716l-.326-.326z" fill="#c5c5c5"/><path d="M5.49 1.662v.321h.433l.914-.914.327.326-.866.866.01.027a4.425 4.425 0 0 1 .274 1.901l-.002.025h1.14v.461H6.522l-.003.019a4.03 4.03 0 0 1-.545 1.425l-.019.03 1.102 1.107-.328.326-1.053-1.059-.032.036c-.476.532-1.093.851-1.765.851-.682 0-1.307-.329-1.786-.876l-.032-.037L1.028 7.53l-.326-.326L1.785 6.12l-.019-.03a4.042 4.042 0 0 1-.526-1.397l-.003-.019H.04v-.461h1.139l-.002-.025a4.43 4.43 0 0 1 .267-1.882l.01-.027-.889-.893.327-.326.918.922h.46v-.32a1.61 1.61 0 0 1 3.22 0zm-2.759 0v.321h2.297v-.32a1.148 1.148 0 0 0-2.297 0zm3.154.812l-.011-.03H1.885l-.01.03a3.967 3.967 0 0 0-.247 1.395c0 .888.277 1.674.702 2.227.426.553.978.853 1.55.853.571 0 1.123-.3 1.548-.853.426-.553.703-1.339.703-2.227 0-.506-.09-.98-.246-1.395z" clip-rule="evenodd" fill="#c5c5c5" fill-rule="evenodd"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><defs><clipPath id="a"><rect width="7.424" height="12.746" x="7.763" y="1.695" ry=".025" fill="#ffe680" stroke-width="41.303" stroke-linejoin="round"/></clipPath><clipPath id="b"><rect width="8.746" height="7.424" x=".119" y="7.797" ry=".679" fill="#d40000" stroke-width="41.303" stroke-linejoin="round"/></clipPath></defs><g aria-label="1 2" style="line-height:1.25" font-weight="700" font-size="4.667" font-family="courier new" letter-spacing="0" word-spacing="0" fill="#c5c5c5"><path d="M5.05 11.593v-.476h.886v-2.03q-.089.187-.355.314-.265.128-.556.128V9.04q.316 0 .567-.139.25-.139.378-.383h.606v2.598h.736v.476z" style="line-height:1.25;-inkscape-font-specification:'courier new, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start"/><path d="M9.181 11.593v-.444q.114-.25.324-.501.212-.253.615-.581.315-.258.408-.356.093-.098.146-.19.055-.092.055-.188 0-.164-.108-.258-.107-.093-.314-.093-.205 0-.314.112-.108.109-.14.33l-.644-.037q.054-.446.332-.68.28-.236.761-.236.497 0 .787.228.289.226.289.606 0 .249-.157.486-.155.235-.467.478-.442.342-.595.493-.153.15-.221.305h1.49v.526z" style="-inkscape-font-specification:'courier new, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start" word-spacing="-1.41"/></g><path d="M1.464 4.988l-.001-.02.001.02z" fill="#999"/><path d="M3.493 4.413l-.977-.982.326-.326 1.033 1.038 1.018-1.018.326.326-.976.977.976.981-.326.327L3.86 4.698 2.842 5.716l-.326-.327z" fill="#c5c5c5"/><path d="M5.49 1.662v.32h.433l.914-.914.327.327-.866.866.01.027a4.425 4.425 0 0 1 .274 1.901l-.002.024h1.14v.462H6.522l-.003.018a4.03 4.03 0 0 1-.545 1.426l-.019.03 1.102 1.107-.327.326-1.054-1.06-.032.036c-.476.533-1.093.852-1.765.852-.682 0-1.307-.33-1.786-.877l-.032-.036L1.028 7.53l-.326-.327L1.785 6.12l-.019-.03a4.042 4.042 0 0 1-.526-1.397l-.003-.018H.04v-.462h1.139l-.002-.024a4.43 4.43 0 0 1 .267-1.882l.01-.027-.889-.894.328-.325.917.922h.46v-.321a1.61 1.61 0 0 1 3.22 0zm-2.759 0v.32h2.297v-.32a1.148 1.148 0 0 0-2.297 0zm3.154.812l-.011-.03H1.885l-.01.03a3.967 3.967 0 0 0-.247 1.395c0 .888.277 1.674.703 2.227.425.552.977.852 1.549.852.571 0 1.123-.3 1.548-.852.426-.553.703-1.339.703-2.227 0-.507-.09-.98-.246-1.395z" clip-rule="evenodd" fill="#c5c5c5" fill-rule="evenodd"/><g clip-rule="evenodd" fill="#c5c5c5" fill-rule="evenodd"><path clip-path="url(#a)" d="M4 3L3 4v8l1 1h9l1-1V7l-.293-.707-3-3L10 3zm0 9V4h5v4h4v4zm9-5l-3-3v3z"/><path clip-path="url(#b)" d="M4 3L3 4v8l1 1h9l1-1V7l-.293-.707-3-3L10 3zm0 9V4h5v4h4v4zm9-5l-3-3v3z"/></g></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><defs><clipPath id="b"><rect width="8.746" height="7.424" x=".119" y="7.797" ry=".679" fill="#d40000" stroke-width="41.303" stroke-linejoin="round"/></clipPath><clipPath id="a"><rect width="7.424" height="12.746" x="7.763" y="1.695" ry=".025" fill="#ffe680" stroke-width="41.303" stroke-linejoin="round"/></clipPath></defs><g aria-label="1 2" style="line-height:1.25" font-weight="700" font-size="4.667" font-family="courier new" letter-spacing="0" word-spacing="0" fill="#c5c5c5"><path d="M5.05 11.593v-.476h.886v-2.03q-.089.187-.355.314-.265.128-.556.128V9.04q.316 0 .567-.139.25-.139.378-.383h.606v2.598h.736v.476z" style="line-height:1.25;-inkscape-font-specification:'courier new, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start"/><path d="M9.181 11.593v-.444q.114-.25.324-.501.212-.253.615-.581.315-.258.408-.356.093-.098.146-.19.055-.092.055-.188 0-.164-.108-.258-.107-.093-.314-.093-.205 0-.314.112-.108.109-.14.33l-.644-.037q.054-.446.332-.68.28-.236.761-.236.497 0 .787.228.289.226.289.606 0 .249-.157.486-.155.235-.467.478-.442.342-.595.493-.153.15-.221.305h1.49v.526z" style="-inkscape-font-specification:'courier new, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start" word-spacing="-1.41"/></g><g clip-rule="evenodd" fill="#c5c5c5" fill-rule="evenodd"><path clip-path="url(#a)" d="M4 3L3 4v8l1 1h9l1-1V7l-.293-.707-3-3L10 3zm0 9V4h5v4h4v4zm9-5l-3-3v3z"/><path clip-path="url(#b)" d="M4 3L3 4v8l1 1h9l1-1V7l-.293-.707-3-3L10 3zm0 9V4h5v4h4v4zm9-5l-3-3v3z"/></g><path d="M4 7H3V4H0V3h3V0h1v3h3v1H4z" clip-rule="evenodd" fill="#c5c5c5" fill-rule="evenodd"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><defs><clipPath id="c"><path fill="#fff" stroke-width="1.301" d="M6.754-1.867h11.697v17.524H6.754z"/></clipPath><clipPath id="d"><rect width="8.746" height="7.424" x=".119" y="7.797" ry=".679" fill="#d40000" stroke-width="41.303" stroke-linejoin="round"/></clipPath><clipPath id="a"><path fill="#fff" stroke-width="1.301" d="M6.754-1.867h11.697v17.524H6.754z"/></clipPath><clipPath id="b"><rect width="8.746" height="7.424" x=".119" y="7.797" ry=".679" fill="#d40000" stroke-width="41.303" stroke-linejoin="round"/></clipPath></defs><path d="M5.042 14.747l.98.025.003.228 9.325.008-.07-6.138.452.423.293.707v5l-1 1h-9l-1-1z" fill="#c5c5c5" fill-rule="evenodd"/><path d="M4.015 13.226l.981.025.002.228 9.325.008-.07-6.138.452.423.293.707v5l-1 1h-9l-1-1z" fill="#c5c5c5" fill-rule="evenodd"/><g aria-label="1 2" style="line-height:1.25" font-weight="700" font-size="4.667" font-family="courier new" letter-spacing="0" word-spacing="0" fill="#c5c5c5"><path d="M5.05 11.593v-.476h.886v-2.03q-.089.187-.355.314-.265.128-.556.128V9.04q.316 0 .567-.139.25-.139.378-.383h.606v2.598h.736v.476z" style="line-height:1.25;-inkscape-font-specification:'courier new, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start"/><path d="M9.181 11.593v-.444q.114-.25.324-.501.212-.253.615-.581.315-.258.408-.356.093-.098.146-.19.055-.092.055-.188 0-.164-.108-.258-.107-.093-.314-.093-.205 0-.314.112-.108.109-.14.33l-.644-.037q.054-.446.332-.68.28-.236.761-.236.497 0 .787.228.289.226.289.606 0 .249-.157.486-.155.235-.467.478-.442.342-.595.493-.153.15-.221.305h1.49v.526z" style="-inkscape-font-specification:'courier new, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start" word-spacing="-1.41"/></g><path d="M.527.035v8.28l5.915-4.14zm4.765 4.14L1.187 7.047V1.303z" clip-rule="evenodd" fill="#c5c5c5" fill-rule="evenodd"/><g clip-rule="evenodd" fill="#c5c5c5" fill-rule="evenodd"><path clip-path="url(#c)" d="M4 3L3 4v8l1 1h9l1-1V7l-.293-.707-3-3L10 3zm0 9V4h5v4h4v4zm9-5l-3-3v3z"/><path clip-path="url(#d)" d="M4 3L3 4v8l1 1h9l1-1V7l-.293-.707-3-3L10 3zm0 9V4h5v4h4v4zm9-5l-3-3v3z"/></g></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><path d="M7.951 3v1.049L8 4h5v8H4V8.297H3V12l1 1h9l1-1V4l-1-1H7.951zM7 4L4 7l3-3z" clip-rule="evenodd" fill="#c5c5c5" fill-rule="evenodd"/><g aria-label="_|" style="line-height:1.25" font-weight="700" font-size="4.667" font-family="courier new" letter-spacing="0" word-spacing="0" fill="#c5c5c5"><path d="M4.87 10.874v-.219h2.82v.22zM8.782 11.41V6.99h.597v4.419z" style="line-height:1.25;-inkscape-font-specification:'courier new, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start"/></g><path d="M.527.035v8.281l5.915-4.14zm4.765 4.14L1.187 7.047V1.303z" clip-rule="evenodd" fill="#c5c5c5" fill-rule="evenodd"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><defs><clipPath id="a"><path fill="#fff" stroke-width="1.301" d="M6.754-1.867h11.697v17.524H6.754z"/></clipPath><clipPath id="b"><rect width="8.746" height="7.424" x=".119" y="7.797" ry=".679" fill="#d40000" stroke-width="41.303" stroke-linejoin="round"/></clipPath></defs><g aria-label="1 2" style="line-height:1.25" font-weight="700" font-size="4.667" font-family="courier new" letter-spacing="0" word-spacing="0" fill="#c5c5c5"><path d="M5.05 11.593v-.476h.886v-2.03q-.089.187-.355.314-.265.128-.556.128V9.04q.316 0 .567-.139.25-.139.378-.383h.606v2.598h.736v.476z" style="line-height:1.25;-inkscape-font-specification:'courier new, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start"/><path d="M9.181 11.593v-.444q.114-.25.324-.501.212-.253.615-.581.315-.258.408-.356.093-.098.146-.19.055-.092.055-.188 0-.164-.108-.258-.107-.093-.314-.093-.205 0-.314.112-.108.109-.14.33l-.644-.037q.054-.446.332-.68.28-.236.761-.236.497 0 .787.228.289.226.289.606 0 .249-.157.486-.155.235-.467.478-.442.342-.595.493-.153.15-.221.305h1.49v.526z" style="-inkscape-font-specification:'courier new, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start" word-spacing="-1.41"/></g><path d="M.527.035v8.28l5.915-4.14zm4.765 4.14L1.187 7.047V1.303z" clip-rule="evenodd" fill="#c5c5c5" fill-rule="evenodd"/><g clip-rule="evenodd" fill="#c5c5c5" fill-rule="evenodd"><path clip-path="url(#a)" d="M4 3L3 4v8l1 1h9l1-1V7l-.293-.707-3-3L10 3zm0 9V4h5v4h4v4zm9-5l-3-3v3z"/><path clip-path="url(#b)" d="M4 3L3 4v8l1 1h9l1-1V7l-.293-.707-3-3L10 3zm0 9V4h5v4h4v4zm9-5l-3-3v3z"/></g></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><path d="M4 3L3 4v8l1 1h9l1-1V7l-.293-.707-3-3L10 3zm0 9V4h5v4h4v4zm9-5l-3-3v3z" clip-rule="evenodd" fill="#c5c5c5" fill-rule="evenodd"/><g aria-label="1 2" style="line-height:1.25" font-weight="700" font-size="4.667" font-family="courier new" letter-spacing="0" word-spacing="0" fill="#c5c5c5"><path d="M5.05 11.593v-.476h.886v-2.03q-.089.187-.355.314-.265.128-.556.128V9.04q.316 0 .567-.139.25-.139.378-.383h.606v2.598h.736v.476z" style="line-height:1.25;-inkscape-font-specification:'courier new, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start"/><path d="M9.181 11.593v-.444q.114-.25.324-.501.212-.253.615-.581.315-.258.408-.356.093-.098.146-.19.055-.092.055-.188 0-.164-.108-.258-.107-.093-.314-.093-.205 0-.314.112-.108.109-.14.33l-.644-.037q.054-.446.332-.68.28-.236.761-.236.497 0 .787.228.289.226.289.606 0 .249-.157.486-.155.235-.467.478-.442.342-.595.493-.153.15-.221.305h1.49v.526z" style="-inkscape-font-specification:'courier new, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start" word-spacing="-1.41"/></g></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><path d="M4 7H3V4H0V3h3V0h1v3h3v1H4zm6.2-6l3.808-.055L14 5v8.5l-.5.5h-10l-.5-.5V8h1v5h9V6l-.04-4.044L9 2H5V1z" clip-rule="evenodd" fill="#c5c5c5" fill-rule="evenodd"/><path d="M-10.705 30.875a5.444 5.444 0 0 0-5.443 5.443 5.444 5.444 0 0 0 5.443 5.446 5.444 5.444 0 0 0 5.443-5.446 5.444 5.444 0 0 0-5.443-5.443z" stroke="#c5c5c5" stroke-width="4.536"/><circle r="3.356" cx="8.541" cy="8.605" stroke="#c5c5c5" stroke-width=".61"/><path d="M10.398 8.605L8.541 6.747l3.239-1.981M6.683 8.605h3.715l-1.857 1.858-1.858-1.858-1.65 3.305" stroke="#c5c5c5" stroke-width=".488"/><circle cx="8.541" cy="10.463" r=".732" fill="#c5c5c5"/><circle cy="8.605" cx="10.398" r=".732" fill="#c5c5c5"/><circle cx="8.541" cy="6.747" r=".732" fill="#c5c5c5"/><circle cy="8.605" cx="6.683" r=".732" fill="#c5c5c5"/><circle cy="4.766" cx="11.78" r=".732" fill="#c5c5c5"/><circle cy="11.91" cx="5.034" r=".732" fill="#c5c5c5"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><path d="M14.008.945L10.199 1H3l1 1h5l3.96-.045L13 6v7H4V2L3 1v12.5l.5.5h10l.5-.5V5z" fill="#c5c5c5"/><circle r="3.356" cx="8.541" cy="8.605" stroke="#c5c5c5" stroke-width=".61"/><path d="M10.398 8.605L8.541 6.747l3.239-1.981M6.683 8.605h3.715l-1.857 1.858-1.858-1.858-1.65 3.305" stroke="#c5c5c5" stroke-width=".488"/><circle cx="8.541" cy="10.463" r=".732" fill="#c5c5c5"/><circle cy="8.605" cx="10.398" r=".732" fill="#c5c5c5"/><circle cx="8.541" cy="6.747" r=".732" fill="#c5c5c5"/><circle cy="8.605" cx="6.683" r=".732" fill="#c5c5c5"/><circle cy="4.766" cx="11.78" r=".732" fill="#c5c5c5"/><circle cy="11.91" cx="5.034" r=".732" fill="#c5c5c5"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><path d="M7.951 3v1.049L8 4h5v8H4V8.297H3V12l1 1h9l1-1V4l-1-1H7.951zM7 4L4 7l3-3z" clip-rule="evenodd" fill="#424242" fill-rule="evenodd"/><g aria-label="_|" style="line-height:1.25" font-weight="700" font-size="4.667" font-family="courier new" letter-spacing="0" word-spacing="0" fill="#424242"><path d="M4.87 10.874v-.219h2.82v.22zM8.782 11.41V6.99h.597v4.419z" style="line-height:1.25;-inkscape-font-specification:'courier new, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start"/></g><path d="M3.492 4.413l-.976-.981.326-.327 1.033 1.038 1.018-1.018.326.327-.976.976.976.982-.326.326L3.86 4.698 2.842 5.716l-.326-.326z" fill="#424242"/><path d="M5.49 1.662v.321h.433l.914-.914.327.326-.866.866.01.027a4.425 4.425 0 0 1 .274 1.901l-.002.025h1.14v.461H6.522l-.003.019a4.03 4.03 0 0 1-.545 1.425l-.019.03 1.102 1.107-.328.326-1.053-1.059-.032.036c-.476.532-1.093.851-1.765.851-.682 0-1.307-.329-1.786-.876l-.032-.037L1.028 7.53l-.326-.326L1.785 6.12l-.019-.03a4.042 4.042 0 0 1-.526-1.397l-.003-.019H.04v-.461h1.139l-.002-.025a4.43 4.43 0 0 1 .267-1.882l.01-.027-.889-.893.327-.326.918.922h.46v-.32a1.61 1.61 0 0 1 3.22 0zm-2.759 0v.321h2.297v-.32a1.148 1.148 0 0 0-2.297 0zm3.154.812l-.011-.03H1.885l-.01.03a3.967 3.967 0 0 0-.247 1.395c0 .888.277 1.674.702 2.227.426.553.978.853 1.55.853.571 0 1.123-.3 1.548-.853.426-.553.703-1.339.703-2.227 0-.506-.09-.98-.246-1.395z" clip-rule="evenodd" fill="#424242" fill-rule="evenodd"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><defs><clipPath id="a"><rect width="7.424" height="12.746" x="7.763" y="1.695" ry=".025" fill="#ffe680" stroke-width="41.303" stroke-linejoin="round"/></clipPath><clipPath id="b"><rect width="8.746" height="7.424" x=".119" y="7.797" ry=".679" fill="#d40000" stroke-width="41.303" stroke-linejoin="round"/></clipPath></defs><g aria-label="1 2" style="line-height:1.25" font-weight="700" font-size="4.667" font-family="courier new" letter-spacing="0" word-spacing="0" fill="#424242"><path d="M5.05 11.593v-.476h.886v-2.03q-.089.187-.355.314-.265.128-.556.128V9.04q.316 0 .567-.139.25-.139.378-.383h.606v2.598h.736v.476z" style="line-height:1.25;-inkscape-font-specification:'courier new, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start"/><path d="M9.181 11.593v-.444q.114-.25.324-.501.212-.253.615-.581.315-.258.408-.356.093-.098.146-.19.055-.092.055-.188 0-.164-.108-.258-.107-.093-.314-.093-.205 0-.314.112-.108.109-.14.33l-.644-.037q.054-.446.332-.68.28-.236.761-.236.497 0 .787.228.289.226.289.606 0 .249-.157.486-.155.235-.467.478-.442.342-.595.493-.153.15-.221.305h1.49v.526z" style="-inkscape-font-specification:'courier new, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start" word-spacing="-1.41"/></g><path d="M1.464 4.988l-.001-.02.001.02z" fill="#999"/><path d="M3.493 4.413l-.977-.982.326-.326 1.033 1.038 1.018-1.018.326.326-.976.977.976.981-.326.327L3.86 4.698 2.842 5.716l-.326-.327z" fill="#424242"/><path d="M5.49 1.662v.32h.433l.914-.914.327.327-.866.866.01.027a4.425 4.425 0 0 1 .274 1.901l-.002.024h1.14v.462H6.522l-.003.018a4.03 4.03 0 0 1-.545 1.426l-.019.03 1.102 1.107-.327.326-1.054-1.06-.032.036c-.476.533-1.093.852-1.765.852-.682 0-1.307-.33-1.786-.877l-.032-.036L1.028 7.53l-.326-.327L1.785 6.12l-.019-.03a4.042 4.042 0 0 1-.526-1.397l-.003-.018H.04v-.462h1.139l-.002-.024a4.43 4.43 0 0 1 .267-1.882l.01-.027-.889-.894.328-.325.917.922h.46v-.321a1.61 1.61 0 0 1 3.22 0zm-2.759 0v.32h2.297v-.32a1.148 1.148 0 0 0-2.297 0zm3.154.812l-.011-.03H1.885l-.01.03a3.967 3.967 0 0 0-.247 1.395c0 .888.277 1.674.703 2.227.425.552.977.852 1.549.852.571 0 1.123-.3 1.548-.852.426-.553.703-1.339.703-2.227 0-.507-.09-.98-.246-1.395z" clip-rule="evenodd" fill="#424242" fill-rule="evenodd"/><g clip-rule="evenodd" fill="#424242" fill-rule="evenodd"><path clip-path="url(#a)" d="M4 3L3 4v8l1 1h9l1-1V7l-.293-.707-3-3L10 3zm0 9V4h5v4h4v4zm9-5l-3-3v3z"/><path clip-path="url(#b)" d="M4 3L3 4v8l1 1h9l1-1V7l-.293-.707-3-3L10 3zm0 9V4h5v4h4v4zm9-5l-3-3v3z"/></g></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><defs><clipPath id="b"><rect width="8.746" height="7.424" x=".119" y="7.797" ry=".679" fill="#d40000" stroke-width="41.303" stroke-linejoin="round"/></clipPath><clipPath id="a"><rect width="7.424" height="12.746" x="7.763" y="1.695" ry=".025" fill="#ffe680" stroke-width="41.303" stroke-linejoin="round"/></clipPath></defs><g aria-label="1 2" style="line-height:1.25" font-weight="700" font-size="4.667" font-family="courier new" letter-spacing="0" word-spacing="0" fill="#424242"><path d="M5.05 11.593v-.476h.886v-2.03q-.089.187-.355.314-.265.128-.556.128V9.04q.316 0 .567-.139.25-.139.378-.383h.606v2.598h.736v.476z" style="line-height:1.25;-inkscape-font-specification:'courier new, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start"/><path d="M9.181 11.593v-.444q.114-.25.324-.501.212-.253.615-.581.315-.258.408-.356.093-.098.146-.19.055-.092.055-.188 0-.164-.108-.258-.107-.093-.314-.093-.205 0-.314.112-.108.109-.14.33l-.644-.037q.054-.446.332-.68.28-.236.761-.236.497 0 .787.228.289.226.289.606 0 .249-.157.486-.155.235-.467.478-.442.342-.595.493-.153.15-.221.305h1.49v.526z" style="-inkscape-font-specification:'courier new, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start" word-spacing="-1.41"/></g><g clip-rule="evenodd" fill="#424242" fill-rule="evenodd"><path clip-path="url(#a)" d="M4 3L3 4v8l1 1h9l1-1V7l-.293-.707-3-3L10 3zm0 9V4h5v4h4v4zm9-5l-3-3v3z"/><path clip-path="url(#b)" d="M4 3L3 4v8l1 1h9l1-1V7l-.293-.707-3-3L10 3zm0 9V4h5v4h4v4zm9-5l-3-3v3z"/></g><path d="M4 7H3V4H0V3h3V0h1v3h3v1H4z" clip-rule="evenodd" fill="#424242" fill-rule="evenodd"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><defs><clipPath id="c"><path fill="#fff" stroke-width="1.301" d="M6.754-1.867h11.697v17.524H6.754z"/></clipPath><clipPath id="d"><rect width="8.746" height="7.424" x=".119" y="7.797" ry=".679" fill="#d40000" stroke-width="41.303" stroke-linejoin="round"/></clipPath><clipPath id="a"><path fill="#fff" stroke-width="1.301" d="M6.754-1.867h11.697v17.524H6.754z"/></clipPath><clipPath id="b"><rect width="8.746" height="7.424" x=".119" y="7.797" ry=".679" fill="#d40000" stroke-width="41.303" stroke-linejoin="round"/></clipPath></defs><path d="M5.042 14.747l.98.025.003.228 9.325.008-.07-6.138.452.423.293.707v5l-1 1h-9l-1-1z" fill="#424242" fill-rule="evenodd"/><path d="M4.015 13.226l.981.025.002.228 9.325.008-.07-6.138.452.423.293.707v5l-1 1h-9l-1-1z" fill="#424242" fill-rule="evenodd"/><g aria-label="1 2" style="line-height:1.25" font-weight="700" font-size="4.667" font-family="courier new" letter-spacing="0" word-spacing="0" fill="#424242"><path d="M5.05 11.593v-.476h.886v-2.03q-.089.187-.355.314-.265.128-.556.128V9.04q.316 0 .567-.139.25-.139.378-.383h.606v2.598h.736v.476z" style="line-height:1.25;-inkscape-font-specification:'courier new, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start"/><path d="M9.181 11.593v-.444q.114-.25.324-.501.212-.253.615-.581.315-.258.408-.356.093-.098.146-.19.055-.092.055-.188 0-.164-.108-.258-.107-.093-.314-.093-.205 0-.314.112-.108.109-.14.33l-.644-.037q.054-.446.332-.68.28-.236.761-.236.497 0 .787.228.289.226.289.606 0 .249-.157.486-.155.235-.467.478-.442.342-.595.493-.153.15-.221.305h1.49v.526z" style="-inkscape-font-specification:'courier new, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start" word-spacing="-1.41"/></g><path d="M.527.035v8.28l5.915-4.14zm4.765 4.14L1.187 7.047V1.303z" clip-rule="evenodd" fill="#424242" fill-rule="evenodd"/><g clip-rule="evenodd" fill="#424242" fill-rule="evenodd"><path clip-path="url(#c)" d="M4 3L3 4v8l1 1h9l1-1V7l-.293-.707-3-3L10 3zm0 9V4h5v4h4v4zm9-5l-3-3v3z"/><path clip-path="url(#d)" d="M4 3L3 4v8l1 1h9l1-1V7l-.293-.707-3-3L10 3zm0 9V4h5v4h4v4zm9-5l-3-3v3z"/></g></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><path d="M7.951 3v1.049L8 4h5v8H4V8.297H3V12l1 1h9l1-1V4l-1-1H7.951zM7 4L4 7l3-3z" clip-rule="evenodd" fill="#424242" fill-rule="evenodd"/><g aria-label="_|" style="line-height:1.25" font-weight="700" font-size="4.667" font-family="courier new" letter-spacing="0" word-spacing="0" fill="#424242"><path d="M4.87 10.874v-.219h2.82v.22zM8.782 11.41V6.99h.597v4.419z" style="line-height:1.25;-inkscape-font-specification:'courier new, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start"/></g><path d="M.527.035v8.281l5.915-4.14zm4.765 4.14L1.187 7.047V1.303z" clip-rule="evenodd" fill="#424242" fill-rule="evenodd"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><defs><clipPath id="a"><path fill="#fff" stroke-width="1.301" d="M6.754-1.867h11.697v17.524H6.754z"/></clipPath><clipPath id="b"><rect width="8.746" height="7.424" x=".119" y="7.797" ry=".679" fill="#d40000" stroke-width="41.303" stroke-linejoin="round"/></clipPath></defs><g aria-label="1 2" style="line-height:1.25" font-weight="700" font-size="4.667" font-family="courier new" letter-spacing="0" word-spacing="0" fill="#424242"><path d="M5.05 11.593v-.476h.886v-2.03q-.089.187-.355.314-.265.128-.556.128V9.04q.316 0 .567-.139.25-.139.378-.383h.606v2.598h.736v.476z" style="line-height:1.25;-inkscape-font-specification:'courier new, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start"/><path d="M9.181 11.593v-.444q.114-.25.324-.501.212-.253.615-.581.315-.258.408-.356.093-.098.146-.19.055-.092.055-.188 0-.164-.108-.258-.107-.093-.314-.093-.205 0-.314.112-.108.109-.14.33l-.644-.037q.054-.446.332-.68.28-.236.761-.236.497 0 .787.228.289.226.289.606 0 .249-.157.486-.155.235-.467.478-.442.342-.595.493-.153.15-.221.305h1.49v.526z" style="-inkscape-font-specification:'courier new, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start" word-spacing="-1.41"/></g><path d="M.527.035v8.28l5.915-4.14zm4.765 4.14L1.187 7.047V1.303z" clip-rule="evenodd" fill="#424242" fill-rule="evenodd"/><g clip-rule="evenodd" fill="#424242" fill-rule="evenodd"><path clip-path="url(#a)" d="M4 3L3 4v8l1 1h9l1-1V7l-.293-.707-3-3L10 3zm0 9V4h5v4h4v4zm9-5l-3-3v3z"/><path clip-path="url(#b)" d="M4 3L3 4v8l1 1h9l1-1V7l-.293-.707-3-3L10 3zm0 9V4h5v4h4v4zm9-5l-3-3v3z"/></g></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><path d="M4 3L3 4v8l1 1h9l1-1V7l-.293-.707-3-3L10 3zm0 9V4h5v4h4v4zm9-5l-3-3v3z" clip-rule="evenodd" fill="#424242" fill-rule="evenodd"/><g aria-label="1 2" style="line-height:1.25" font-weight="700" font-size="4.667" font-family="courier new" letter-spacing="0" word-spacing="0" fill="#424242"><path d="M5.05 11.593v-.476h.886v-2.03q-.089.187-.355.314-.265.128-.556.128V9.04q.316 0 .567-.139.25-.139.378-.383h.606v2.598h.736v.476z" style="line-height:1.25;-inkscape-font-specification:'courier new, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start"/><path d="M9.181 11.593v-.444q.114-.25.324-.501.212-.253.615-.581.315-.258.408-.356.093-.098.146-.19.055-.092.055-.188 0-.164-.108-.258-.107-.093-.314-.093-.205 0-.314.112-.108.109-.14.33l-.644-.037q.054-.446.332-.68.28-.236.761-.236.497 0 .787.228.289.226.289.606 0 .249-.157.486-.155.235-.467.478-.442.342-.595.493-.153.15-.221.305h1.49v.526z" style="-inkscape-font-specification:'courier new, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start" word-spacing="-1.41"/></g></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><path d="M4 7H3V4H0V3h3V0h1v3h3v1H4zm6.2-6l3.808-.055L14 5v8.5l-.5.5h-10l-.5-.5V8h1v5h9V6l-.04-4.044L9 2H5V1z" clip-rule="evenodd" fill="#424242" fill-rule="evenodd"/><path d="M-10.705 30.875a5.444 5.444 0 0 0-5.443 5.443 5.444 5.444 0 0 0 5.443 5.446 5.444 5.444 0 0 0 5.443-5.446 5.444 5.444 0 0 0-5.443-5.443z" stroke="#424242" stroke-width="4.536"/><circle r="3.356" cx="8.541" cy="8.605" stroke="#424242" stroke-width=".61"/><path d="M10.398 8.605L8.541 6.747l3.239-1.981M6.683 8.605h3.715l-1.857 1.858-1.858-1.858-1.65 3.305" stroke="#424242" stroke-width=".488"/><circle cx="8.541" cy="10.463" r=".732" fill="#424242"/><circle cy="8.605" cx="10.398" r=".732" fill="#424242"/><circle cx="8.541" cy="6.747" r=".732" fill="#424242"/><circle cy="8.605" cx="6.683" r=".732" fill="#424242"/><circle cy="4.766" cx="11.78" r=".732" fill="#424242"/><circle cy="11.91" cx="5.034" r=".732" fill="#424242"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><path d="M14.008.945L10.199 1H3l1 1h5l3.96-.045L13 6v7H4V2L3 1v12.5l.5.5h10l.5-.5V5z" fill="#424242"/><circle r="3.356" cx="8.541" cy="8.605" stroke="#424242" stroke-width=".61"/><path d="M10.398 8.605L8.541 6.747l3.239-1.981M6.683 8.605h3.715l-1.857 1.858-1.858-1.858-1.65 3.305" stroke="#424242" stroke-width=".488"/><circle cx="8.541" cy="10.463" r=".732" fill="#424242"/><circle cy="8.605" cx="10.398" r=".732" fill="#424242"/><circle cx="8.541" cy="6.747" r=".732" fill="#424242"/><circle cy="8.605" cx="6.683" r=".732" fill="#424242"/><circle cy="4.766" cx="11.78" r=".732" fill="#424242"/><circle cy="11.91" cx="5.034" r=".732" fill="#424242"/></svg>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -2,10 +2,10 @@
"name": "soicode",
"displayName": "soicode",
"description": "A extension which provides integration to solve soi (soi.ch) tasks in vscode",
"version": "0.0.6",
"version": "0.0.7",
"publisher": "swissolyinfo",
"engines": {
"vscode": "^1.27.0"
"vscode": "^1.33.0"
},
"categories": [
"Other"
......@@ -35,8 +35,8 @@
"command": "soicode.createTask",
"title": "Create a new empty SOI task",
"icon": {
"light": "./images/soicode-activitybar.svg",
"dark": "./images/soicode-activitybar-dark.svg"
"light": "./images/icons/light/task-new.svg",
"dark": "./images/icons/dark/task-new.svg"
}
},
{
......@@ -51,49 +51,45 @@
"command": "soicode.runSolutionOnSample",
"title": "Runs a Solution with a specific sample",
"icon": {
"light": "./images/soicode-activitybar.svg",
"dark": "./images/soicode-activitybar-dark.svg"
"light": "./images/icons/light/sample-run.svg",
"dark": "./images/icons/dark/sample-run.svg"
}
},
{
"command": "soicode.runSolutionOnAllSamples",
"title": "Runs a solution on all samples",
"icon": {
"light": "./images/soicode-activitybar.svg",
"dark": "./images/soicode-activitybar-dark.svg"
"light": "./images/icons/light/sample-run-all.svg",
"dark": "./images/icons/dark/sample-run-all.svg"
}
},
{
"command": "soicode.runSolutionWithManualInput",
"title": "Runs a solution allowing on user input",
"title": "Runs a solution with user input",
"icon": {
"light": "./images/soicode-activitybar.svg",
"dark": "./images/soicode-activitybar-dark.svg"
"light": "./images/icons/light/sample-run-manual.svg",
"dark": "./images/icons/dark/sample-run-manual.svg"
}
},
{
"command": "soicode.debugSolutionOnSample",
"title": "Starts the debugger for a solution run on a specific sample",
"icon": {
"light": "./images/soicode-activitybar.svg",
"dark": "./images/soicode-activitybar-dark.svg"
"light": "./images/icons/light/sample-debug.svg",
"dark": "./images/icons/dark/sample-debug.svg"
}
},
{
"command": "soicode.debugSolutionWithManualInput",
"title": "Starts the debugger for a solution with user input",
"icon": {
"light": "./images/soicode-activitybar.svg",
"dark": "./images/soicode-activitybar-dark.svg"
"light": "./images/icons/light/sample-debug-manual.svg",
"dark": "./images/icons/dark/sample-debug-manual.svg"
}
},
{
"command": "soicode.compileCurrentSolution",
"title": "Compiles the currently open solution",
"icon": {
"light": "./images/soicode-activitybar.svg",
"dark": "./images/soicode-activitybar-dark.svg"
}
"title": "Compiles the currently open solution"
},
{
"command": "soicode.addSoitaskTemplate",
......@@ -202,21 +198,24 @@
"vscode:prepublish": "npm run compile",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"postinstall": "node ./node_modules/vscode/bin/install",
"test": "npm run compile && node ./node_modules/vscode/bin/test",
"pretest": "npm run compile",
"build-package": "vsce package",
"postversion": "git push && git push --tags"
"test": "node ./out/test/runTest.js"
},
"devDependencies": {
"@types/mocha": "^2.2.42",
"@types/node": "^8.10.25",
"tslint": "^5.8.0",
"typescript": "^3.1.2",
"vsce": "^1.51.1",
"vscode": "^1.1.21"
"@types/fs-extra": "^5.0.4",
"@types/glob": "^7.1.1",
"@types/mocha": "^5.2.6",
"@types/node": "^10.12.21",
"@types/vscode": "^1.33.0",
"glob": "^7.1.4",
"mocha": "^6.1.4",
"tslint": "^5.12.1",
"typescript": "^3.3.1",
"vsce": "^1.67.1",
"vscode-test": "^1.2.0"
},
"dependencies": {
"@types/fs-extra": "^5.0.4",
"fs-extra": "^7.0.0"
}
}
import { Store } from "./store";
import { getWorkspaceSettings } from "./soiworkspace";
import * as path from "path";
import * as fs from "fs-extra";
import * as https from "https";
export async function getCompilerPath(store: Store): Promise<string | null> {
let settings = await getWorkspaceSettings();
if (settings === null) {
return null;
}
if (settings.compiler.useManagedCompiler) {
return path.join(store.soicodeExtensionPath, "compiler", "clang++");
} else {
return settings.compiler.manualCompilePath;
}
}
export async function downloadCompilerBundle(store: Store) {
let platform = "";
// also look at process.arch
switch (process.platform) {
case "darwin":
platform = "darwin-amd64";
case "win32":
platform = "windows-amd64";
case "linux":
platform = "linux-amd64";
}
await fs.mkdir(store.soicodeExtensionPath);
let file = fs.createWriteStream(path.join(store.soicodeExtensionPath, "helper"));
let response = await https.get("https://blob.dolansoft.org/soicode/helper-" + platform);
response.pipe(file);
}
......@@ -7,6 +7,9 @@ import { initializeWorkspace } from "./soiworkspace";
import { createTask } from "./soitask";
import { insertCppTemplate, subscribeInsertCppTemplateLens } from "./lenses/emptyCppLens";
import { subscribeInsertSoitaskTemplateLens, insertSoitaskTemplate } from "./lenses/emptySoitaskLens";
import { Runner } from "./runner";
import { Store } from "./store";
import { downloadHelperBinary } from "./helperBinary";