+
+## About
+
+Mage is a make-like build tool using Go. You write plain-old go functions,
+and Mage automatically uses them as Makefile-like runnable targets.
+
+## Installation
+
+Mage has no dependencies outside the Go standard library, and builds with Go 1.7
+and above (possibly even lower versions, but they're not regularly tested).
+
+**Using GOPATH**
+
+```
+go get -u -d github.com/magefile/mage
+cd $GOPATH/src/github.com/magefile/mage
+go run bootstrap.go
+```
+
+**Using Go Modules**
+
+```
+git clone https://github.com/magefile/mage
+cd mage
+go run bootstrap.go
+```
+
+This will download the code and then run the bootstrap script to build mage with
+version infomation embedded in it. A normal `go get` (without -d) or `go
+install` will build the binary correctly, but no version info will be embedded.
+If you've done this, no worries, just go to `$GOPATH/src/github.com/magefile/mage`
+and run `mage install` or `go run bootstrap.go` and a new binary will be created
+with the correct version information.
+
+The mage binary will be created in your $GOPATH/bin directory.
+
+You may also install a binary release from our
+[releases](https://github.com/magefile/mage/releases) page.
+
+## Demo
+
+[](https://www.youtube.com/watch?v=GOqbD0lF-iA)
+
+## Discussion
+
+Join the `#mage` channel on [gophers slack](https://gophers.slack.com/messages/general/)
+or post on the [magefile google group](https://groups.google.com/forum/#!forum/magefile)
+for discussion of usage, development, etc.
+
+# Documentation
+
+see [magefile.org](https://magefile.org) for full docs
+
+see [godoc.org/github.com/magefile/mage/mage](https://godoc.org/github.com/magefile/mage/mage) for how to use mage as a library.
+
+# Why?
+
+Makefiles are hard to read and hard to write. Mostly because makefiles are
+essentially fancy bash scripts with significant white space and additional
+make-related syntax.
+
+Mage lets you have multiple magefiles, name your magefiles whatever you want,
+and they're easy to customize for multiple operating systems. Mage has no
+dependencies (aside from go) and runs just fine on all major operating systems,
+whereas make generally uses bash which is not well supported on Windows. Go is
+superior to bash for any non-trivial task involving branching, looping, anything
+that's not just straight line execution of commands. And if your project is
+written in Go, why introduce another language as idiosyncratic as bash? Why not
+use the language your contributors are already comfortable with?
+
+# Thanks
+
+If you use mage and like it, or any of my other software, and you'd like to show your appreciation, you can do so on my patreon:
+
+[](https://www.patreon.com/join/natefinch?)
+
diff --git a/vendor/github.com/magefile/mage/bootstrap.go b/vendor/github.com/magefile/mage/bootstrap.go
new file mode 100644
index 0000000..c37f6fc
--- /dev/null
+++ b/vendor/github.com/magefile/mage/bootstrap.go
@@ -0,0 +1,19 @@
+//+build ignore
+
+package main
+
+import (
+ "os"
+
+ "github.com/magefile/mage/mage"
+)
+
+// This is a bootstrap builder, to build mage when you don't already *have* mage.
+// Run it like
+// go run bootstrap.go
+// and it will install mage with all the right flags created for you.
+
+func main() {
+ os.Args = []string{os.Args[0], "-v", "install"}
+ os.Exit(mage.Main())
+}
diff --git a/vendor/github.com/magefile/mage/go.mod b/vendor/github.com/magefile/mage/go.mod
new file mode 100644
index 0000000..8261fa1
--- /dev/null
+++ b/vendor/github.com/magefile/mage/go.mod
@@ -0,0 +1,3 @@
+module github.com/magefile/mage
+
+go 1.12
diff --git a/vendor/github.com/magefile/mage/go.sum b/vendor/github.com/magefile/mage/go.sum
new file mode 100644
index 0000000..e69de29
diff --git a/vendor/github.com/magefile/mage/install_test.go b/vendor/github.com/magefile/mage/install_test.go
new file mode 100644
index 0000000..d7923c8
--- /dev/null
+++ b/vendor/github.com/magefile/mage/install_test.go
@@ -0,0 +1,39 @@
+//+build CI
+
+package main
+
+import (
+ "io/ioutil"
+ "os"
+ "os/exec"
+ "path/filepath"
+ "runtime"
+ "testing"
+)
+
+func TestBootstrap(t *testing.T) {
+ dir, err := ioutil.TempDir("", "")
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer os.RemoveAll(dir)
+
+ s, err := run("go", "run", "bootstrap.go")
+ if err != nil {
+ t.Fatal(s)
+ }
+ name := "mage"
+ if runtime.GOOS == "windows" {
+ name += ".exe"
+ }
+ if _, err := os.Stat(filepath.Join(os.Getenv("GOPATH"), "bin", name)); err != nil {
+ t.Fatal(err)
+ }
+}
+
+func run(cmd string, args ...string) (string, error) {
+ c := exec.Command(cmd, args...)
+ c.Env = os.Environ()
+ b, err := c.CombinedOutput()
+ return string(b), err
+}
diff --git a/vendor/github.com/magefile/mage/internal/run.go b/vendor/github.com/magefile/mage/internal/run.go
new file mode 100644
index 0000000..4e69889
--- /dev/null
+++ b/vendor/github.com/magefile/mage/internal/run.go
@@ -0,0 +1,114 @@
+package internal
+
+import (
+ "bytes"
+ "fmt"
+ "io/ioutil"
+ "log"
+ "os"
+ "os/exec"
+ "runtime"
+ "strings"
+)
+
+var debug *log.Logger = log.New(ioutil.Discard, "", 0)
+
+func SetDebug(l *log.Logger) {
+ debug = l
+}
+
+func RunDebug(cmd string, args ...string) error {
+ env, err := EnvWithCurrentGOOS()
+ if err != nil {
+ return err
+ }
+ buf := &bytes.Buffer{}
+ errbuf := &bytes.Buffer{}
+ debug.Println("running", cmd, strings.Join(args, " "))
+ c := exec.Command(cmd, args...)
+ c.Env = env
+ c.Stderr = errbuf
+ c.Stdout = buf
+ if err := c.Run(); err != nil {
+ debug.Print("error running '", cmd, strings.Join(args, " "), "': ", err, ": ", errbuf)
+ return err
+ }
+ debug.Println(buf)
+ return nil
+}
+
+func OutputDebug(cmd string, args ...string) (string, error) {
+ env, err := EnvWithCurrentGOOS()
+ if err != nil {
+ return "", err
+ }
+ buf := &bytes.Buffer{}
+ errbuf := &bytes.Buffer{}
+ debug.Println("running", cmd, strings.Join(args, " "))
+ c := exec.Command(cmd, args...)
+ c.Env = env
+ c.Stderr = errbuf
+ c.Stdout = buf
+ if err := c.Run(); err != nil {
+ debug.Print("error running '", cmd, strings.Join(args, " "), "': ", err, ": ", errbuf)
+ return "", err
+ }
+ return strings.TrimSpace(buf.String()), nil
+}
+
+// splitEnv takes the results from os.Environ() (a []string of foo=bar values)
+// and makes a map[string]string out of it.
+func splitEnv(env []string) (map[string]string, error) {
+ out := map[string]string{}
+
+ for _, s := range env {
+ parts := strings.SplitN(s, "=", 2)
+ if len(parts) != 2 {
+ return nil, fmt.Errorf("badly formatted environment variable: %v", s)
+ }
+ out[parts[0]] = parts[1]
+ }
+ return out, nil
+}
+
+// joinEnv converts the given map into a list of foo=bar environment variables,
+// such as that outputted by os.Environ().
+func joinEnv(env map[string]string) []string {
+ vals := make([]string, 0, len(env))
+ for k, v := range env {
+ vals = append(vals, k+"="+v)
+ }
+ return vals
+}
+
+// EnvWithCurrentGOOS returns a copy of os.Environ with the GOOS and GOARCH set
+// to runtime.GOOS and runtime.GOARCH.
+func EnvWithCurrentGOOS() ([]string, error) {
+ vals, err := splitEnv(os.Environ())
+ if err != nil {
+ return nil, err
+ }
+ vals["GOOS"] = runtime.GOOS
+ vals["GOARCH"] = runtime.GOARCH
+ return joinEnv(vals), nil
+}
+
+// EnvWithGOOS retuns the os.Environ() values with GOOS and/or GOARCH either set
+// to their runtime value, or the given value if non-empty.
+func EnvWithGOOS(goos, goarch string) ([]string, error) {
+ env, err := splitEnv(os.Environ())
+ if err != nil {
+ return nil, err
+ }
+ if goos == "" {
+ env["GOOS"] = runtime.GOOS
+ } else {
+ env["GOOS"] = goos
+ }
+ if goarch == "" {
+ env["GOARCH"] = runtime.GOARCH
+ } else {
+ env["GOARCH"] = goarch
+ }
+ return joinEnv(env), nil
+}
diff --git a/vendor/github.com/magefile/mage/mage/command_string.go b/vendor/github.com/magefile/mage/mage/command_string.go
new file mode 100644
index 0000000..fcdaf9f
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mage/command_string.go
@@ -0,0 +1,16 @@
+// Code generated by "stringer -type=Command"; DO NOT EDIT.
+
+package mage
+
+import "strconv"
+
+const _Command_name = "NoneVersionInitCleanCompileStatic"
+
+var _Command_index = [...]uint8{0, 4, 11, 15, 20, 33}
+
+func (i Command) String() string {
+ if i < 0 || i >= Command(len(_Command_index)-1) {
+ return "Command(" + strconv.FormatInt(int64(i), 10) + ")"
+ }
+ return _Command_name[_Command_index[i]:_Command_index[i+1]]
+}
diff --git a/vendor/github.com/magefile/mage/mage/import_test.go b/vendor/github.com/magefile/mage/mage/import_test.go
new file mode 100644
index 0000000..259a280
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mage/import_test.go
@@ -0,0 +1,189 @@
+package mage
+
+import (
+ "bytes"
+ "testing"
+)
+
+func TestMageImportsList(t *testing.T) {
+ stdout := &bytes.Buffer{}
+ stderr := &bytes.Buffer{}
+ inv := Invocation{
+ Dir: "./testdata/mageimport",
+ Stdout: stdout,
+ Stderr: stderr,
+ List: true,
+ }
+
+ code := Invoke(inv)
+ if code != 0 {
+ t.Fatalf("expected to exit with code 0, but got %v, stderr:\n%s", code, stderr)
+ }
+ actual := stdout.String()
+ expected := `
+Targets:
+ buildSubdir Builds stuff.
+ ns:deploy deploys stuff.
+ root
+ zz:buildSubdir2 Builds stuff.
+ zz:ns:deploy2* deploys stuff.
+
+* default target
+`[1:]
+
+ if actual != expected {
+ t.Logf("expected: %q", expected)
+ t.Logf(" actual: %q", actual)
+ t.Fatalf("expected:\n%v\n\ngot:\n%v", expected, actual)
+ }
+}
+
+func TestMageImportsRoot(t *testing.T) {
+ stdout := &bytes.Buffer{}
+ stderr := &bytes.Buffer{}
+ inv := Invocation{
+ Dir: "./testdata/mageimport",
+ Stdout: stdout,
+ Stderr: stderr,
+ Args: []string{"root"},
+ }
+
+ code := Invoke(inv)
+ if code != 0 {
+ t.Fatalf("expected to exit with code 0, but got %v, stderr:\n%s", code, stderr)
+ }
+ actual := stdout.String()
+ expected := "root\n"
+ if actual != expected {
+ t.Fatalf("expected: %q got: %q", expected, actual)
+ }
+}
+
+func TestMageImportsNamedNS(t *testing.T) {
+ stdout := &bytes.Buffer{}
+ stderr := &bytes.Buffer{}
+ inv := Invocation{
+ Dir: "./testdata/mageimport",
+ Stdout: stdout,
+ Stderr: stderr,
+ Args: []string{"zz:nS:deploy2"},
+ }
+
+ code := Invoke(inv)
+ if code != 0 {
+ t.Fatalf("expected to exit with code 0, but got %v, stderr:\n%s", code, stderr)
+ }
+ actual := stdout.String()
+ expected := "deploy2\n"
+ if actual != expected {
+ t.Fatalf("expected: %q got: %q", expected, actual)
+ }
+}
+
+func TestMageImportsNamedRoot(t *testing.T) {
+ stdout := &bytes.Buffer{}
+ stderr := &bytes.Buffer{}
+ inv := Invocation{
+ Dir: "./testdata/mageimport",
+ Stdout: stdout,
+ Stderr: stderr,
+ Args: []string{"zz:buildSubdir2"},
+ }
+
+ code := Invoke(inv)
+ if code != 0 {
+ t.Fatalf("expected to exit with code 0, but got %v, stderr:\n%s", code, stderr)
+ }
+ actual := stdout.String()
+ expected := "buildsubdir2\n"
+ if actual != expected {
+ t.Fatalf("expected: %q got: %q", expected, actual)
+ }
+ if stderr := stderr.String(); stderr != "" {
+ t.Fatal("unexpected output to stderr: ", stderr)
+ }
+}
+
+func TestMageImportsRootImportNS(t *testing.T) {
+ stdout := &bytes.Buffer{}
+ stderr := &bytes.Buffer{}
+ inv := Invocation{
+ Dir: "./testdata/mageimport",
+ Stdout: stdout,
+ Stderr: stderr,
+ Args: []string{"nS:deploy"},
+ }
+
+ code := Invoke(inv)
+ if code != 0 {
+ t.Fatalf("expected to exit with code 0, but got %v, stderr:\n%s", code, stderr)
+ }
+ actual := stdout.String()
+ expected := "deploy\n"
+ if actual != expected {
+ t.Fatalf("expected: %q got: %q", expected, actual)
+ }
+}
+
+func TestMageImportsRootImport(t *testing.T) {
+ stdout := &bytes.Buffer{}
+ stderr := &bytes.Buffer{}
+ inv := Invocation{
+ Dir: "./testdata/mageimport",
+ Stdout: stdout,
+ Stderr: stderr,
+ Args: []string{"buildSubdir"},
+ }
+
+ code := Invoke(inv)
+ if code != 0 {
+ t.Fatalf("expected to exit with code 0, but got %v, stderr:\n%s", code, stderr)
+ }
+ actual := stdout.String()
+ expected := "buildsubdir\n"
+ if actual != expected {
+ t.Fatalf("expected: %q got: %q", expected, actual)
+ }
+}
+
+func TestMageImportsAliasToNS(t *testing.T) {
+ stdout := &bytes.Buffer{}
+ stderr := &bytes.Buffer{}
+ inv := Invocation{
+ Dir: "./testdata/mageimport",
+ Stdout: stdout,
+ Stderr: stderr,
+ Args: []string{"nsd2"},
+ }
+
+ code := Invoke(inv)
+ if code != 0 {
+ t.Fatalf("expected to exit with code 0, but got %v, stderr:\n%s", code, stderr)
+ }
+ actual := stdout.String()
+ expected := "deploy2\n"
+ if actual != expected {
+ t.Fatalf("expected: %q got: %q", expected, actual)
+ }
+}
+
+func TestMageImportsOneLine(t *testing.T) {
+ stdout := &bytes.Buffer{}
+ stderr := &bytes.Buffer{}
+ inv := Invocation{
+ Dir: "./testdata/mageimport/oneline",
+ Stdout: stdout,
+ Stderr: stderr,
+ Args: []string{"build"},
+ }
+
+ code := Invoke(inv)
+ if code != 0 {
+ t.Fatalf("expected to exit with code 0, but got %v, stderr:\n%s", code, stderr)
+ }
+ actual := stdout.String()
+ expected := "build\n"
+ if actual != expected {
+ t.Fatalf("expected: %q got: %q", expected, actual)
+ }
+}
diff --git a/vendor/github.com/magefile/mage/mage/magefile_tmpl.go b/vendor/github.com/magefile/mage/mage/magefile_tmpl.go
new file mode 100644
index 0000000..01b8786
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mage/magefile_tmpl.go
@@ -0,0 +1,46 @@
+package mage
+
+var mageTpl = `// +build mage
+
+package main
+
+import (
+ "fmt"
+ "os"
+ "os/exec"
+
+ "github.com/magefile/mage/mg" // mg contains helpful utility functions, like Deps
+)
+
+// Default target to run when none is specified
+// If not set, running mage will list available targets
+// var Default = Build
+
+// A build step that requires additional params, or platform specific steps for example
+func Build() error {
+ mg.Deps(InstallDeps)
+ fmt.Println("Building...")
+ cmd := exec.Command("go", "build", "-o", "MyApp", ".")
+ return cmd.Run()
+}
+
+// A custom install step if you need your bin someplace other than go/bin
+func Install() error {
+ mg.Deps(Build)
+ fmt.Println("Installing...")
+ return os.Rename("./MyApp", "/usr/bin/MyApp")
+}
+
+// Manage your deps, or running package managers.
+func InstallDeps() error {
+ fmt.Println("Installing Deps...")
+ cmd := exec.Command("go", "get", "github.com/stretchr/piglatin")
+ return cmd.Run()
+}
+
+// Clean up after yourself
+func Clean() {
+ fmt.Println("Cleaning...")
+ os.RemoveAll("MyApp")
+}
+`
diff --git a/vendor/github.com/magefile/mage/mage/main.go b/vendor/github.com/magefile/mage/mage/main.go
new file mode 100644
index 0000000..4325ce9
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mage/main.go
@@ -0,0 +1,681 @@
+package mage
+
+import (
+ "bytes"
+ "crypto/sha1"
+ "errors"
+ "flag"
+ "fmt"
+ "io"
+ "io/ioutil"
+ "log"
+ "os"
+ "os/exec"
+ "path/filepath"
+ "regexp"
+ "runtime"
+ "sort"
+ "strings"
+ "text/template"
+ "time"
+
+ "github.com/magefile/mage/internal"
+ "github.com/magefile/mage/mg"
+ "github.com/magefile/mage/parse"
+ "github.com/magefile/mage/sh"
+)
+
+// magicRebuildKey is used when hashing the output binary to ensure that we get
+// a new binary even if nothing in the input files or generated mainfile has
+// changed. This can be used when we change how we parse files, or otherwise
+// change the inputs to the compiling process.
+const magicRebuildKey = "v0.3"
+
+// (Aaaa)(Bbbb) -> aaaaBbbb
+var firstWordRx = regexp.MustCompile(`^([[:upper:]][^[:upper:]]+)([[:upper:]].*)$`)
+
+// (AAAA)(Bbbb) -> aaaaBbbb
+var firstAbbrevRx = regexp.MustCompile(`^([[:upper:]]+)([[:upper:]][^[:upper:]].*)$`)
+
+func lowerFirstWord(s string) string {
+ if match := firstWordRx.FindStringSubmatch(s); match != nil {
+ return strings.ToLower(match[1]) + match[2]
+ }
+ if match := firstAbbrevRx.FindStringSubmatch(s); match != nil {
+ return strings.ToLower(match[1]) + match[2]
+ }
+ return strings.ToLower(s)
+}
+
+var mainfileTemplate = template.Must(template.New("").Funcs(map[string]interface{}{
+ "lower": strings.ToLower,
+ "lowerFirst": func(s string) string {
+ parts := strings.Split(s, ":")
+ for i, t := range parts {
+ parts[i] = lowerFirstWord(t)
+ }
+ return strings.Join(parts, ":")
+ },
+}).Parse(mageMainfileTplString))
+var initOutput = template.Must(template.New("").Parse(mageTpl))
+
+const mainfile = "mage_output_file.go"
+const initFile = "magefile.go"
+
+var debug = log.New(ioutil.Discard, "DEBUG: ", log.Ltime|log.Lmicroseconds)
+
+// set by ldflags when you "mage build"
+var (
+ commitHash = ""
+ timestamp = ""
+ gitTag = ""
+)
+
+//go:generate stringer -type=Command
+
+// Command tracks invocations of mage that run without targets or other flags.
+type Command int
+
+// The various command types
+const (
+ None Command = iota
+ Version // report the current version of mage
+ Init // create a starting template for mage
+ Clean // clean out old compiled mage binaries from the cache
+ CompileStatic // compile a static binary of the current directory
+)
+
+// Main is the entrypoint for running mage. It exists external to mage's main
+// function to allow it to be used from other programs, specifically so you can
+// go run a simple file that run's mage's Main.
+func Main() int {
+ return ParseAndRun(os.Stdout, os.Stderr, os.Stdin, os.Args[1:])
+}
+
+// Invocation contains the args for invoking a run of Mage.
+type Invocation struct {
+ Debug bool // turn on debug messages
+ Dir string // directory to read magefiles from
+ Force bool // forces recreation of the compiled binary
+ Verbose bool // tells the magefile to print out log statements
+ List bool // tells the magefile to print out a list of targets
+ Help bool // tells the magefile to print out help for a specific target
+ Keep bool // tells mage to keep the generated main file after compiling
+ Timeout time.Duration // tells mage to set a timeout to running the targets
+ CompileOut string // tells mage to compile a static binary to this path, but not execute
+ GOOS string // sets the GOOS when producing a binary with -compileout
+ GOARCH string // sets the GOARCH when producing a binary with -compileout
+ Stdout io.Writer // writer to write stdout messages to
+ Stderr io.Writer // writer to write stderr messages to
+ Stdin io.Reader // reader to read stdin from
+ Args []string // args to pass to the compiled binary
+ GoCmd string // the go binary command to run
+ CacheDir string // the directory where we should store compiled binaries
+ HashFast bool // don't rely on GOCACHE, just hash the magefiles
+}
+
+// ParseAndRun parses the command line, and then compiles and runs the mage
+// files in the given directory with the given args (do not include the command
+// name in the args).
+func ParseAndRun(stdout, stderr io.Writer, stdin io.Reader, args []string) int {
+ errlog := log.New(stderr, "", 0)
+ out := log.New(stdout, "", 0)
+ inv, cmd, err := Parse(stderr, stdout, args)
+ inv.Stderr = stderr
+ inv.Stdin = stdin
+ if err == flag.ErrHelp {
+ return 0
+ }
+ if err != nil {
+ errlog.Println("Error:", err)
+ return 2
+ }
+
+ switch cmd {
+ case Version:
+ out.Println("Mage Build Tool", gitTag)
+ out.Println("Build Date:", timestamp)
+ out.Println("Commit:", commitHash)
+ out.Println("built with:", runtime.Version())
+ return 0
+ case Init:
+ if err := generateInit(inv.Dir); err != nil {
+ errlog.Println("Error:", err)
+ return 1
+ }
+ out.Println(initFile, "created")
+ return 0
+ case Clean:
+ if err := removeContents(inv.CacheDir); err != nil {
+ out.Println("Error:", err)
+ return 1
+ }
+ out.Println(inv.CacheDir, "cleaned")
+ return 0
+ case CompileStatic:
+ return Invoke(inv)
+ case None:
+ return Invoke(inv)
+ default:
+ panic(fmt.Errorf("Unknown command type: %v", cmd))
+ }
+}
+
+// Parse parses the given args and returns structured data. If parse returns
+// flag.ErrHelp, the calling process should exit with code 0.
+func Parse(stderr, stdout io.Writer, args []string) (inv Invocation, cmd Command, err error) {
+ inv.Stdout = stdout
+ fs := flag.FlagSet{}
+ fs.SetOutput(stdout)
+
+ // options flags
+
+ fs.BoolVar(&inv.Force, "f", false, "force recreation of compiled magefile")
+ fs.BoolVar(&inv.Debug, "debug", mg.Debug(), "turn on debug messages")
+ fs.BoolVar(&inv.Verbose, "v", mg.Verbose(), "show verbose output when running mage targets")
+ fs.BoolVar(&inv.Help, "h", false, "show this help")
+ fs.DurationVar(&inv.Timeout, "t", 0, "timeout in duration parsable format (e.g. 5m30s)")
+ fs.BoolVar(&inv.Keep, "keep", false, "keep intermediate mage files around after running")
+ fs.StringVar(&inv.Dir, "d", ".", "run magefiles in the given directory")
+ fs.StringVar(&inv.GoCmd, "gocmd", mg.GoCmd(), "use the given go binary to compile the output")
+ fs.StringVar(&inv.GOOS, "goos", "", "set GOOS for binary produced with -compile")
+ fs.StringVar(&inv.GOARCH, "goarch", "", "set GOARCH for binary produced with -compile")
+
+ // commands below
+
+ fs.BoolVar(&inv.List, "l", false, "list mage targets in this directory")
+ var showVersion bool
+ fs.BoolVar(&showVersion, "version", false, "show version info for the mage binary")
+ var mageInit bool
+ fs.BoolVar(&mageInit, "init", false, "create a starting template if no mage files exist")
+ var clean bool
+ fs.BoolVar(&clean, "clean", false, "clean out old generated binaries from CACHE_DIR")
+ var compileOutPath string
+ fs.StringVar(&compileOutPath, "compile", "", "output a static binary to the given path")
+
+ fs.Usage = func() {
+ fmt.Fprint(stdout, `
+mage [options] [target]
+
+Mage is a make-like command runner. See https://magefile.org for full docs.
+
+Commands:
+ -clean clean out old generated binaries from CACHE_DIR
+ -compile
+ output a static binary to the given path
+ -init create a starting template if no mage files exist
+ -l list mage targets in this directory
+ -h show this help
+ -version show version info for the mage binary
+
+Options:
+ -d
+ run magefiles in the given directory (default ".")
+ -debug turn on debug messages
+ -h show description of a target
+ -f force recreation of compiled magefile
+ -keep keep intermediate mage files around after running
+ -gocmd
+ use the given go binary to compile the output (default: "go")
+ -goos sets the GOOS for the binary created by -compile (default: current OS)
+ -goarch sets the GOARCH for the binary created by -compile (default: current arch)
+ -t
+ timeout in duration parsable format (e.g. 5m30s)
+ -v show verbose output when running mage targets
+`[1:])
+ }
+ err = fs.Parse(args)
+ if err == flag.ErrHelp {
+ // parse will have already called fs.Usage()
+ return inv, cmd, err
+ }
+ if err == nil && inv.Help && len(fs.Args()) == 0 {
+ fs.Usage()
+ // tell upstream, to just exit
+ return inv, cmd, flag.ErrHelp
+ }
+
+ numCommands := 0
+ switch {
+ case mageInit:
+ numCommands++
+ cmd = Init
+ case compileOutPath != "":
+ numCommands++
+ cmd = CompileStatic
+ inv.CompileOut = compileOutPath
+ inv.Force = true
+ case showVersion:
+ numCommands++
+ cmd = Version
+ case clean:
+ numCommands++
+ cmd = Clean
+ if fs.NArg() > 0 {
+ // Temporary dupe of below check until we refactor the other commands to use this check
+ return inv, cmd, errors.New("-h, -init, -clean, -compile and -version cannot be used simultaneously")
+
+ }
+ }
+ if inv.Help {
+ numCommands++
+ }
+
+ if inv.Debug {
+ debug.SetOutput(stderr)
+ }
+
+ inv.CacheDir = mg.CacheDir()
+
+ if numCommands > 1 {
+ debug.Printf("%d commands defined", numCommands)
+ return inv, cmd, errors.New("-h, -init, -clean, -compile and -version cannot be used simultaneously")
+ }
+
+ if cmd != CompileStatic && (inv.GOARCH != "" || inv.GOOS != "") {
+ return inv, cmd, errors.New("-goos and -goarch only apply when running with -compile")
+ }
+
+ inv.Args = fs.Args()
+ if inv.Help && len(inv.Args) > 1 {
+ return inv, cmd, errors.New("-h can only show help for a single target")
+ }
+
+ if len(inv.Args) > 0 && cmd != None {
+ return inv, cmd, fmt.Errorf("unexpected arguments to command: %q", inv.Args)
+ }
+ inv.HashFast = mg.HashFast()
+ return inv, cmd, err
+}
+
+// Invoke runs Mage with the given arguments.
+func Invoke(inv Invocation) int {
+ errlog := log.New(inv.Stderr, "", 0)
+ if inv.GoCmd == "" {
+ inv.GoCmd = "go"
+ }
+ if inv.Dir == "" {
+ inv.Dir = "."
+ }
+ if inv.CacheDir == "" {
+ inv.CacheDir = mg.CacheDir()
+ }
+
+ files, err := Magefiles(inv.Dir, inv.GOOS, inv.GOARCH, inv.GoCmd, inv.Stderr, inv.Debug)
+ if err != nil {
+ errlog.Println("Error determining list of magefiles:", err)
+ return 1
+ }
+
+ if len(files) == 0 {
+ errlog.Println("No .go files marked with the mage build tag in this directory.")
+ return 1
+ }
+ debug.Printf("found magefiles: %s", strings.Join(files, ", "))
+ exePath := inv.CompileOut
+ if inv.CompileOut == "" {
+ exePath, err = ExeName(inv.GoCmd, inv.CacheDir, files)
+ if err != nil {
+ errlog.Println("Error getting exe name:", err)
+ return 1
+ }
+ }
+ debug.Println("output exe is ", exePath)
+
+ useCache := false
+ if inv.HashFast {
+ debug.Println("user has set MAGEFILE_HASHFAST, so we'll ignore GOCACHE")
+ } else {
+ s, err := internal.OutputDebug(inv.GoCmd, "env", "GOCACHE")
+ if err != nil {
+ errlog.Printf("failed to run %s env GOCACHE: %s", inv.GoCmd, err)
+ return 1
+ }
+
+ // if GOCACHE exists, always rebuild, so we catch transitive
+ // dependencies that have changed.
+ if s != "" {
+ debug.Println("go build cache exists, will ignore any compiled binary")
+ useCache = true
+ }
+ }
+
+ if !useCache {
+ _, err = os.Stat(exePath)
+ switch {
+ case err == nil:
+ if inv.Force {
+ debug.Println("ignoring existing executable")
+ } else {
+ debug.Println("Running existing exe")
+ return RunCompiled(inv, exePath, errlog)
+ }
+ case os.IsNotExist(err):
+ debug.Println("no existing exe, creating new")
+ default:
+ debug.Printf("error reading existing exe at %v: %v", exePath, err)
+ debug.Println("creating new exe")
+ }
+ }
+
+ // parse wants dir + filenames... arg
+ fnames := make([]string, 0, len(files))
+ for i := range files {
+ fnames = append(fnames, filepath.Base(files[i]))
+ }
+ if inv.Debug {
+ parse.EnableDebug()
+ }
+ debug.Println("parsing files")
+ info, err := parse.PrimaryPackage(inv.GoCmd, inv.Dir, fnames)
+ if err != nil {
+ errlog.Println("Error parsing magefiles:", err)
+ return 1
+ }
+
+ main := filepath.Join(inv.Dir, mainfile)
+ binaryName := "mage"
+ if inv.CompileOut != "" {
+ binaryName = filepath.Base(inv.CompileOut)
+ }
+
+ err = GenerateMainfile(binaryName, main, info)
+ if err != nil {
+ errlog.Println("Error:", err)
+ return 1
+ }
+ if !inv.Keep {
+ defer os.RemoveAll(main)
+ }
+ files = append(files, main)
+ if err := Compile(inv.GOOS, inv.GOARCH, inv.Dir, inv.GoCmd, exePath, files, inv.Debug, inv.Stderr, inv.Stdout); err != nil {
+ errlog.Println("Error:", err)
+ return 1
+ }
+ if !inv.Keep {
+ // move aside this file before we run the compiled version, in case the
+ // compiled file screws things up. Yes this doubles up with the above
+ // defer, that's ok.
+ os.RemoveAll(main)
+ } else {
+ debug.Print("keeping mainfile")
+ }
+
+ if inv.CompileOut != "" {
+ return 0
+ }
+
+ return RunCompiled(inv, exePath, errlog)
+}
+
+type mainfileTemplateData struct {
+ Description string
+ Funcs []*parse.Function
+ DefaultFunc parse.Function
+ Aliases map[string]*parse.Function
+ Imports []*parse.Import
+ BinaryName string
+}
+
+// Magefiles returns the list of magefiles in dir.
+func Magefiles(magePath, goos, goarch, goCmd string, stderr io.Writer, isDebug bool) ([]string, error) {
+ start := time.Now()
+ defer func() {
+ debug.Println("time to scan for Magefiles:", time.Since(start))
+ }()
+ fail := func(err error) ([]string, error) {
+ return nil, err
+ }
+
+ env, err := internal.EnvWithGOOS(goos, goarch)
+ if err != nil {
+ return nil, err
+ }
+
+ debug.Println("getting all non-mage files in", magePath)
+
+ // // first, grab all the files with no build tags specified.. this is actually
+ // // our exclude list of things without the mage build tag.
+ cmd := exec.Command(goCmd, "list", "-e", "-f", `{{join .GoFiles "||"}}`)
+ cmd.Env = env
+ buf := &bytes.Buffer{}
+ cmd.Stderr = buf
+ cmd.Dir = magePath
+ b, err := cmd.Output()
+ if err != nil {
+ stderr := buf.String()
+ // if the error is "cannot find module", that can mean that there's no
+ // non-mage files, which is fine, so ignore it.
+ if !strings.Contains(stderr, "cannot find module for path") {
+ return fail(fmt.Errorf("failed to list non-mage gofiles: %v: %s", err, stderr))
+ }
+ }
+ list := strings.TrimSpace(string(b))
+ debug.Println("found non-mage files", list)
+ exclude := map[string]bool{}
+ for _, f := range strings.Split(list, "||") {
+ if f != "" {
+ debug.Printf("marked file as non-mage: %q", f)
+ exclude[f] = true
+ }
+ }
+ debug.Println("getting all files plus mage files")
+ cmd = exec.Command(goCmd, "list", "-tags=mage", "-e", "-f", `{{join .GoFiles "||"}}`)
+ cmd.Env = env
+
+ buf.Reset()
+ cmd.Dir = magePath
+ b, err = cmd.Output()
+ if err != nil {
+ return fail(fmt.Errorf("failed to list mage gofiles: %v: %s", err, buf.Bytes()))
+ }
+
+ list = strings.TrimSpace(string(b))
+ files := []string{}
+ for _, f := range strings.Split(list, "||") {
+ if f != "" && !exclude[f] {
+ files = append(files, f)
+ }
+ }
+ for i := range files {
+ files[i] = filepath.Join(magePath, files[i])
+ }
+ return files, nil
+}
+
+// Compile uses the go tool to compile the files into an executable at path.
+func Compile(goos, goarch, magePath, goCmd, compileTo string, gofiles []string, isDebug bool, stderr, stdout io.Writer) error {
+ debug.Println("compiling to", compileTo)
+ debug.Println("compiling using gocmd:", goCmd)
+ if isDebug {
+ internal.RunDebug(goCmd, "version")
+ internal.RunDebug(goCmd, "env")
+ }
+ environ, err := internal.EnvWithGOOS(goos, goarch)
+ if err != nil {
+ return err
+ }
+ // strip off the path since we're setting the path in the build command
+ for i := range gofiles {
+ gofiles[i] = filepath.Base(gofiles[i])
+ }
+ debug.Printf("running %s build -o %s %s", goCmd, compileTo, strings.Join(gofiles, " "))
+ c := exec.Command(goCmd, append([]string{"build", "-o", compileTo}, gofiles...)...)
+ c.Env = environ
+ c.Stderr = stderr
+ c.Stdout = stdout
+ c.Dir = magePath
+ start := time.Now()
+ err = c.Run()
+ debug.Println("time to compile Magefile:", time.Since(start))
+ if err != nil {
+ return errors.New("error compiling magefiles")
+ }
+ return nil
+}
+
+// GenerateMainfile generates the mage mainfile at path.
+func GenerateMainfile(binaryName, path string, info *parse.PkgInfo) error {
+ debug.Println("Creating mainfile at", path)
+
+ f, err := os.Create(path)
+ if err != nil {
+ return fmt.Errorf("error creating generated mainfile: %v", err)
+ }
+ defer f.Close()
+ data := mainfileTemplateData{
+ Description: info.Description,
+ Funcs: info.Funcs,
+ Aliases: info.Aliases,
+ Imports: info.Imports,
+ BinaryName: binaryName,
+ }
+
+ if info.DefaultFunc != nil {
+ data.DefaultFunc = *info.DefaultFunc
+ }
+
+ debug.Println("writing new file at", path)
+ if err := mainfileTemplate.Execute(f, data); err != nil {
+ return fmt.Errorf("can't execute mainfile template: %v", err)
+ }
+ if err := f.Close(); err != nil {
+ return fmt.Errorf("error closing generated mainfile: %v", err)
+ }
+ // we set an old modtime on the generated mainfile so that the go tool
+ // won't think it has changed more recently than the compiled binary.
+ longAgo := time.Now().Add(-time.Hour * 24 * 365 * 10)
+ if err := os.Chtimes(path, longAgo, longAgo); err != nil {
+ return fmt.Errorf("error setting old modtime on generated mainfile: %v", err)
+ }
+ return nil
+}
+
+// ExeName reports the executable filename that this version of Mage would
+// create for the given magefiles.
+func ExeName(goCmd, cacheDir string, files []string) (string, error) {
+ var hashes []string
+ for _, s := range files {
+ h, err := hashFile(s)
+ if err != nil {
+ return "", err
+ }
+ hashes = append(hashes, h)
+ }
+ // hash the mainfile template to ensure if it gets updated, we make a new
+ // binary.
+ hashes = append(hashes, fmt.Sprintf("%x", sha1.Sum([]byte(mageMainfileTplString))))
+ sort.Strings(hashes)
+ ver, err := internal.OutputDebug(goCmd, "version")
+ if err != nil {
+ return "", err
+ }
+ hash := sha1.Sum([]byte(strings.Join(hashes, "") + magicRebuildKey + ver))
+ filename := fmt.Sprintf("%x", hash)
+
+ out := filepath.Join(cacheDir, filename)
+ if runtime.GOOS == "windows" {
+ out += ".exe"
+ }
+ return out, nil
+}
+
+func hashFile(fn string) (string, error) {
+ f, err := os.Open(fn)
+ if err != nil {
+ return "", fmt.Errorf("can't open input file for hashing: %#v", err)
+ }
+ defer f.Close()
+
+ h := sha1.New()
+ if _, err := io.Copy(h, f); err != nil {
+ return "", fmt.Errorf("can't write data to hash: %v", err)
+ }
+ return fmt.Sprintf("%x", h.Sum(nil)), nil
+}
+
+func generateInit(dir string) error {
+ debug.Println("generating default magefile in", dir)
+ f, err := os.Create(filepath.Join(dir, initFile))
+ if err != nil {
+ return fmt.Errorf("could not create mage template: %v", err)
+ }
+ defer f.Close()
+
+ if err := initOutput.Execute(f, nil); err != nil {
+ return fmt.Errorf("can't execute magefile template: %v", err)
+ }
+
+ return nil
+}
+
+// RunCompiled runs an already-compiled mage command with the given args,
+func RunCompiled(inv Invocation, exePath string, errlog *log.Logger) int {
+ debug.Println("running binary", exePath)
+ c := exec.Command(exePath, inv.Args...)
+ c.Stderr = inv.Stderr
+ c.Stdout = inv.Stdout
+ c.Stdin = inv.Stdin
+ c.Dir = inv.Dir
+ // intentionally pass through unaltered os.Environ here.. your magefile has
+ // to deal with it.
+ c.Env = os.Environ()
+ if inv.Verbose {
+ c.Env = append(c.Env, "MAGEFILE_VERBOSE=1")
+ }
+ if inv.List {
+ c.Env = append(c.Env, "MAGEFILE_LIST=1")
+ }
+ if inv.Help {
+ c.Env = append(c.Env, "MAGEFILE_HELP=1")
+ }
+ if inv.Debug {
+ c.Env = append(c.Env, "MAGEFILE_DEBUG=1")
+ }
+ if inv.GoCmd != "" {
+ c.Env = append(c.Env, fmt.Sprintf("MAGEFILE_GOCMD=%s", inv.GoCmd))
+ }
+ if inv.Timeout > 0 {
+ c.Env = append(c.Env, fmt.Sprintf("MAGEFILE_TIMEOUT=%s", inv.Timeout.String()))
+ }
+ debug.Print("running magefile with mage vars:\n", strings.Join(filter(c.Env, "MAGEFILE"), "\n"))
+ err := c.Run()
+ if !sh.CmdRan(err) {
+ errlog.Printf("failed to run compiled magefile: %v", err)
+ }
+ return sh.ExitStatus(err)
+}
+
+func filter(list []string, prefix string) []string {
+ var out []string
+ for _, s := range list {
+ if strings.HasPrefix(s, prefix) {
+ out = append(out, s)
+ }
+ }
+ return out
+}
+
+// removeContents removes all files but not any subdirectories in the given
+// directory.
+func removeContents(dir string) error {
+ debug.Println("removing all files in", dir)
+ files, err := ioutil.ReadDir(dir)
+ if err != nil {
+ if os.IsNotExist(err) {
+ return nil
+ }
+ return err
+ }
+ for _, f := range files {
+ if f.IsDir() {
+ continue
+ }
+ err = os.Remove(filepath.Join(dir, f.Name()))
+ if err != nil {
+ return err
+ }
+ }
+ return nil
+
+}
diff --git a/vendor/github.com/magefile/mage/mage/main_test.go b/vendor/github.com/magefile/mage/mage/main_test.go
new file mode 100644
index 0000000..0b177f2
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mage/main_test.go
@@ -0,0 +1,1387 @@
+package mage
+
+import (
+ "bytes"
+ "debug/macho"
+ "debug/pe"
+ "flag"
+ "fmt"
+ "go/build"
+ "go/parser"
+ "go/token"
+ "io"
+ "io/ioutil"
+ "log"
+ "os"
+ "os/exec"
+ "path/filepath"
+ "reflect"
+ "regexp"
+ "runtime"
+ "strconv"
+ "strings"
+ "testing"
+ "time"
+
+ "github.com/magefile/mage/internal"
+ "github.com/magefile/mage/mg"
+)
+
+const testExeEnv = "MAGE_TEST_STRING"
+
+func TestMain(m *testing.M) {
+ if s := os.Getenv(testExeEnv); s != "" {
+ fmt.Fprint(os.Stdout, s)
+ os.Exit(0)
+ }
+ os.Exit(testmain(m))
+}
+
+func testmain(m *testing.M) int {
+ // ensure we write our temporary binaries to a directory that we'll delete
+ // after running tests.
+ dir, err := ioutil.TempDir("", "")
+ if err != nil {
+ log.Fatal(err)
+ }
+ defer os.RemoveAll(dir)
+ if err := os.Setenv(mg.CacheEnv, dir); err != nil {
+ log.Fatal(err)
+ }
+ if err := os.Unsetenv(mg.VerboseEnv); err != nil {
+ log.Fatal(err)
+ }
+ if err := os.Unsetenv(mg.DebugEnv); err != nil {
+ log.Fatal(err)
+ }
+ if err := os.Unsetenv(mg.IgnoreDefaultEnv); err != nil {
+ log.Fatal(err)
+ }
+ return m.Run()
+}
+
+func TestTransitiveDepCache(t *testing.T) {
+ cache, err := internal.OutputDebug("go", "env", "GOCACHE")
+ if err != nil {
+ t.Fatal(err)
+ }
+ if cache == "" {
+ t.Skip("skipping gocache tests on go version without cache")
+ }
+ // Test that if we change a transitive dep, that we recompile
+ stdout := &bytes.Buffer{}
+ stderr := &bytes.Buffer{}
+ inv := Invocation{
+ Stderr: stderr,
+ Stdout: stdout,
+ Dir: "testdata/transitiveDeps",
+ Args: []string{"Run"},
+ }
+ code := Invoke(inv)
+ if code != 0 {
+ t.Fatalf("got code %v, err: %s", code, stderr)
+ }
+ expected := "woof\n"
+ if actual := stdout.String(); actual != expected {
+ t.Fatalf("expected %q but got %q", expected, actual)
+ }
+ // ok, so baseline, the generated and cached binary should do "woof"
+ // now change out the transitive dependency that does the output
+ // so that it produces different output.
+ if err := os.Rename("testdata/transitiveDeps/dep/dog.go", "testdata/transitiveDeps/dep/dog.notgo"); err != nil {
+ t.Fatal(err)
+ }
+ defer os.Rename("testdata/transitiveDeps/dep/dog.notgo", "testdata/transitiveDeps/dep/dog.go")
+ if err := os.Rename("testdata/transitiveDeps/dep/cat.notgo", "testdata/transitiveDeps/dep/cat.go"); err != nil {
+ t.Fatal(err)
+ }
+ defer os.Rename("testdata/transitiveDeps/dep/cat.go", "testdata/transitiveDeps/dep/cat.notgo")
+ stderr.Reset()
+ stdout.Reset()
+ code = Invoke(inv)
+ if code != 0 {
+ t.Fatalf("got code %v, err: %s", code, stderr)
+ }
+ expected = "meow\n"
+ if actual := stdout.String(); actual != expected {
+ t.Fatalf("expected %q but got %q", expected, actual)
+ }
+}
+
+func TestTransitiveHashFast(t *testing.T) {
+ cache, err := internal.OutputDebug("go", "env", "GOCACHE")
+ if err != nil {
+ t.Fatal(err)
+ }
+ if cache == "" {
+ t.Skip("skipping hashfast tests on go version without cache")
+ }
+
+ // Test that if we change a transitive dep, that we don't recompile.
+ // We intentionally run the first time without hashfast to ensure that
+ // we recompile the binary with the current code.
+ stdout := &bytes.Buffer{}
+ stderr := &bytes.Buffer{}
+ inv := Invocation{
+ Stderr: stderr,
+ Stdout: stdout,
+ Dir: "testdata/transitiveDeps",
+ Args: []string{"Run"},
+ }
+ code := Invoke(inv)
+ if code != 0 {
+ t.Fatalf("got code %v, err: %s", code, stderr)
+ }
+ expected := "woof\n"
+ if actual := stdout.String(); actual != expected {
+ t.Fatalf("expected %q but got %q", expected, actual)
+ }
+
+ // ok, so baseline, the generated and cached binary should do "woof"
+ // now change out the transitive dependency that does the output
+ // so that it produces different output.
+ if err := os.Rename("testdata/transitiveDeps/dep/dog.go", "testdata/transitiveDeps/dep/dog.notgo"); err != nil {
+ t.Fatal(err)
+ }
+ defer os.Rename("testdata/transitiveDeps/dep/dog.notgo", "testdata/transitiveDeps/dep/dog.go")
+ if err := os.Rename("testdata/transitiveDeps/dep/cat.notgo", "testdata/transitiveDeps/dep/cat.go"); err != nil {
+ t.Fatal(err)
+ }
+ defer os.Rename("testdata/transitiveDeps/dep/cat.go", "testdata/transitiveDeps/dep/cat.notgo")
+ stderr.Reset()
+ stdout.Reset()
+ inv.HashFast = true
+ code = Invoke(inv)
+ if code != 0 {
+ t.Fatalf("got code %v, err: %s", code, stderr)
+ }
+ // we should still get woof, even though the dependency was changed to
+ // return "meow", because we're only hashing the top level magefiles, not
+ // dependencies.
+ if actual := stdout.String(); actual != expected {
+ t.Fatalf("expected %q but got %q", expected, actual)
+ }
+}
+
+func TestListMagefilesMain(t *testing.T) {
+ buf := &bytes.Buffer{}
+ files, err := Magefiles("testdata/mixed_main_files", "", "", "go", buf, false)
+ if err != nil {
+ t.Errorf("error from magefile list: %v: %s", err, buf)
+ }
+ expected := []string{"testdata/mixed_main_files/mage_helpers.go", "testdata/mixed_main_files/magefile.go"}
+ if !reflect.DeepEqual(files, expected) {
+ t.Fatalf("expected %q but got %q", expected, files)
+ }
+}
+
+func TestListMagefilesIgnoresGOOS(t *testing.T) {
+ buf := &bytes.Buffer{}
+ if runtime.GOOS == "windows" {
+ os.Setenv("GOOS", "linux")
+ } else {
+ os.Setenv("GOOS", "windows")
+ }
+ defer os.Setenv("GOOS", runtime.GOOS)
+ files, err := Magefiles("testdata/goos_magefiles", "", "", "go", buf, false)
+ if err != nil {
+ t.Errorf("error from magefile list: %v: %s", err, buf)
+ }
+ var expected []string
+ if runtime.GOOS == "windows" {
+ expected = []string{"testdata/goos_magefiles/magefile_windows.go"}
+ } else {
+ expected = []string{"testdata/goos_magefiles/magefile_nonwindows.go"}
+ }
+ if !reflect.DeepEqual(files, expected) {
+ t.Fatalf("expected %q but got %q", expected, files)
+ }
+}
+
+func TestListMagefilesIgnoresRespectsGOOSArg(t *testing.T) {
+ buf := &bytes.Buffer{}
+ var goos string
+ if runtime.GOOS == "windows" {
+ goos = "linux"
+ } else {
+ goos = "windows"
+ }
+ files, err := Magefiles("testdata/goos_magefiles", goos, "", "go", buf, false)
+ if err != nil {
+ t.Errorf("error from magefile list: %v: %s", err, buf)
+ }
+ var expected []string
+ if goos == "windows" {
+ expected = []string{"testdata/goos_magefiles/magefile_windows.go"}
+ } else {
+ expected = []string{"testdata/goos_magefiles/magefile_nonwindows.go"}
+ }
+ if !reflect.DeepEqual(files, expected) {
+ t.Fatalf("expected %q but got %q", expected, files)
+ }
+}
+
+func TestCompileDiffGoosGoarch(t *testing.T) {
+ target, err := ioutil.TempDir("./testdata", "")
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer os.RemoveAll(target)
+
+ // intentionally choose an arch and os to build that are not our current one.
+
+ goos := "windows"
+ if runtime.GOOS == "windows" {
+ goos = "darwin"
+ }
+ goarch := "amd64"
+ if runtime.GOARCH == "amd64" {
+ goarch = "386"
+ }
+ stdout := &bytes.Buffer{}
+ stderr := &bytes.Buffer{}
+ inv := Invocation{
+ Stderr: stderr,
+ Stdout: stdout,
+ Debug: true,
+ Dir: "testdata",
+ // this is relative to the Dir above
+ CompileOut: filepath.Join(".", filepath.Base(target), "output"),
+ GOOS: goos,
+ GOARCH: goarch,
+ }
+ code := Invoke(inv)
+ if code != 0 {
+ t.Fatalf("got code %v, err: %s", code, stderr)
+ }
+ os, arch, err := fileData(filepath.Join(target, "output"))
+ if err != nil {
+ t.Fatal(err)
+ }
+ if goos == "windows" {
+ if os != winExe {
+ t.Error("ran with GOOS=windows but did not produce a windows exe")
+ }
+ } else {
+ if os != macExe {
+ t.Error("ran with GOOS=darwin but did not a mac exe")
+ }
+ }
+ if goarch == "amd64" {
+ if arch != arch64 {
+ t.Error("ran with GOARCH=amd64 but did not produce a 64 bit exe")
+ }
+ } else {
+ if arch != arch32 {
+ t.Error("rand with GOARCH=386 but did not produce a 32 bit exe")
+ }
+ }
+}
+
+func TestListMagefilesLib(t *testing.T) {
+ buf := &bytes.Buffer{}
+ files, err := Magefiles("testdata/mixed_lib_files", "", "", "go", buf, false)
+ if err != nil {
+ t.Errorf("error from magefile list: %v: %s", err, buf)
+ }
+ expected := []string{"testdata/mixed_lib_files/mage_helpers.go", "testdata/mixed_lib_files/magefile.go"}
+ if !reflect.DeepEqual(files, expected) {
+ t.Fatalf("expected %q but got %q", expected, files)
+ }
+}
+
+func TestMixedMageImports(t *testing.T) {
+ stderr := &bytes.Buffer{}
+ stdout := &bytes.Buffer{}
+ inv := Invocation{
+ Dir: "./testdata/mixed_lib_files",
+ Stdout: stdout,
+ Stderr: stderr,
+ List: true,
+ }
+ code := Invoke(inv)
+ if code != 0 {
+ t.Errorf("expected to exit with code 0, but got %v, stderr: %s", code, stderr)
+ }
+ expected := "Targets:\n build \n"
+ actual := stdout.String()
+ if actual != expected {
+ t.Fatalf("expected %q but got %q", expected, actual)
+ }
+}
+
+func TestGoRun(t *testing.T) {
+ c := exec.Command("go", "run", "main.go")
+ c.Dir = "./testdata"
+ c.Env = os.Environ()
+ b, err := c.CombinedOutput()
+ if err != nil {
+ t.Error("error:", err)
+ }
+ actual := string(b)
+ expected := "stuff\n"
+ if actual != expected {
+ t.Fatalf("expected %q, but got %q", expected, actual)
+ }
+}
+
+func TestVerbose(t *testing.T) {
+ stderr := &bytes.Buffer{}
+ stdout := &bytes.Buffer{}
+ inv := Invocation{
+ Dir: "./testdata",
+ Stdout: stdout,
+ Stderr: stderr,
+ Args: []string{"testverbose"},
+ }
+
+ code := Invoke(inv)
+ if code != 0 {
+ t.Errorf("expected to exit with code 0, but got %v", code)
+ }
+ actual := stdout.String()
+ expected := ""
+ if actual != expected {
+ t.Fatalf("expected %q, but got %q", expected, actual)
+ }
+ stderr.Reset()
+ stdout.Reset()
+ inv.Verbose = true
+ code = Invoke(inv)
+ if code != 0 {
+ t.Errorf("expected to exit with code 0, but got %v", code)
+ }
+
+ actual = stderr.String()
+ expected = "Running target: TestVerbose\nhi!\n"
+ if actual != expected {
+ t.Fatalf("expected %q, but got %q", expected, actual)
+ }
+}
+
+func TestVerboseEnv(t *testing.T) {
+ os.Setenv("MAGEFILE_VERBOSE", "true")
+ defer os.Unsetenv("MAGEFILE_VERBOSE")
+ stdout := &bytes.Buffer{}
+ inv, _, err := Parse(ioutil.Discard, stdout, []string{})
+ if err != nil {
+ t.Fatal("unexpected error", err)
+ }
+
+ expected := true
+
+ if inv.Verbose != true {
+ t.Fatalf("expected %t, but got %t ", expected, inv.Verbose)
+ }
+}
+func TestVerboseFalseEnv(t *testing.T) {
+ os.Setenv("MAGEFILE_VERBOSE", "0")
+ defer os.Unsetenv("MAGEFILE_VERBOSE")
+ stdout := &bytes.Buffer{}
+ code := ParseAndRun(ioutil.Discard, stdout, nil, []string{"-d", "testdata", "testverbose"})
+ if code != 0 {
+ t.Fatal("unexpected code", code)
+ }
+
+ if stdout.String() != "" {
+ t.Fatalf("expected no output, but got %s", stdout.String())
+ }
+}
+
+func TestList(t *testing.T) {
+ stdout := &bytes.Buffer{}
+ inv := Invocation{
+ Dir: "./testdata/list",
+ Stdout: stdout,
+ Stderr: ioutil.Discard,
+ List: true,
+ }
+
+ code := Invoke(inv)
+ if code != 0 {
+ t.Errorf("expected to exit with code 0, but got %v", code)
+ }
+ actual := stdout.String()
+ expected := `
+This is a comment on the package which should get turned into output with the list of targets.
+
+Targets:
+ somePig* This is the synopsis for SomePig.
+ testVerbose
+
+* default target
+`[1:]
+
+ if actual != expected {
+ t.Logf("expected: %q", expected)
+ t.Logf(" actual: %q", actual)
+ t.Fatalf("expected:\n%v\n\ngot:\n%v", expected, actual)
+ }
+}
+
+func TestNoArgNoDefaultList(t *testing.T) {
+ stdout := &bytes.Buffer{}
+ stderr := &bytes.Buffer{}
+ inv := Invocation{
+ Dir: "testdata/no_default",
+ Stdout: stdout,
+ Stderr: stderr,
+ }
+ code := Invoke(inv)
+ if code != 0 {
+ t.Errorf("expected to exit with code 0, but got %v", code)
+ }
+ if err := stderr.String(); err != "" {
+ t.Errorf("unexpected stderr output:\n%s", err)
+ }
+ actual := stdout.String()
+ expected := `
+Targets:
+ bazBuz Prints out 'BazBuz'.
+ fooBar Prints out 'FooBar'.
+`[1:]
+ if actual != expected {
+ t.Fatalf("expected:\n%q\n\ngot:\n%q", expected, actual)
+ }
+}
+
+func TestIgnoreDefault(t *testing.T) {
+ stdout := &bytes.Buffer{}
+ stderr := &bytes.Buffer{}
+ inv := Invocation{
+ Dir: "./testdata/list",
+ Stdout: stdout,
+ Stderr: stderr,
+ }
+ defer os.Unsetenv(mg.IgnoreDefaultEnv)
+ if err := os.Setenv(mg.IgnoreDefaultEnv, "1"); err != nil {
+ t.Fatal(err)
+ }
+
+ code := Invoke(inv)
+ if code != 0 {
+ t.Errorf("expected to exit with code 0, but got %v, stderr:\n%s", code, stderr)
+ }
+ actual := stdout.String()
+ expected := `
+This is a comment on the package which should get turned into output with the list of targets.
+
+Targets:
+ somePig* This is the synopsis for SomePig.
+ testVerbose
+
+* default target
+`[1:]
+
+ if actual != expected {
+ t.Logf("expected: %q", expected)
+ t.Logf(" actual: %q", actual)
+ t.Fatalf("expected:\n%v\n\ngot:\n%v", expected, actual)
+ }
+}
+
+func TestTargetError(t *testing.T) {
+ stderr := &bytes.Buffer{}
+ inv := Invocation{
+ Dir: "./testdata",
+ Stdout: ioutil.Discard,
+ Stderr: stderr,
+ Args: []string{"returnsnonnilerror"},
+ }
+ code := Invoke(inv)
+ if code != 1 {
+ t.Fatalf("expected 1, but got %v", code)
+ }
+ actual := stderr.String()
+ expected := "Error: bang!\n"
+ if actual != expected {
+ t.Fatalf("expected %q, but got %q", expected, actual)
+ }
+}
+
+func TestStdinCopy(t *testing.T) {
+ stdout := &bytes.Buffer{}
+ stdin := strings.NewReader("hi!")
+ inv := Invocation{
+ Dir: "./testdata",
+ Stderr: ioutil.Discard,
+ Stdout: stdout,
+ Stdin: stdin,
+ Args: []string{"CopyStdin"},
+ }
+ code := Invoke(inv)
+ if code != 0 {
+ t.Fatalf("expected 0, but got %v", code)
+ }
+ actual := stdout.String()
+ expected := "hi!"
+ if actual != expected {
+ t.Fatalf("expected %q, but got %q", expected, actual)
+ }
+}
+
+func TestTargetPanics(t *testing.T) {
+ stderr := &bytes.Buffer{}
+ inv := Invocation{
+ Dir: "./testdata",
+ Stdout: ioutil.Discard,
+ Stderr: stderr,
+ Args: []string{"panics"},
+ }
+ code := Invoke(inv)
+ if code != 1 {
+ t.Fatalf("expected 1, but got %v", code)
+ }
+ actual := stderr.String()
+ expected := "Error: boom!\n"
+ if actual != expected {
+ t.Fatalf("expected %q, but got %q", expected, actual)
+ }
+}
+
+func TestPanicsErr(t *testing.T) {
+ stderr := &bytes.Buffer{}
+ inv := Invocation{
+ Dir: "./testdata",
+ Stdout: ioutil.Discard,
+ Stderr: stderr,
+ Args: []string{"panicserr"},
+ }
+ code := Invoke(inv)
+ if code != 1 {
+ t.Fatalf("expected 1, but got %v", code)
+ }
+ actual := stderr.String()
+ expected := "Error: kaboom!\n"
+ if actual != expected {
+ t.Fatalf("expected %q, but got %q", expected, actual)
+ }
+}
+
+// ensure we include the hash of the mainfile template in determining the
+// executable name to run, so we automatically create a new exe if the template
+// changes.
+func TestHashTemplate(t *testing.T) {
+ templ := mageMainfileTplString
+ defer func() { mageMainfileTplString = templ }()
+ name, err := ExeName("go", mg.CacheDir(), []string{"testdata/func.go", "testdata/command.go"})
+ if err != nil {
+ t.Fatal(err)
+ }
+ mageMainfileTplString = "some other template"
+ changed, err := ExeName("go", mg.CacheDir(), []string{"testdata/func.go", "testdata/command.go"})
+ if err != nil {
+ t.Fatal(err)
+ }
+ if changed == name {
+ t.Fatal("expected executable name to chage if template changed")
+ }
+}
+
+// Test if the -keep flag does keep the mainfile around after running
+func TestKeepFlag(t *testing.T) {
+ buildFile := fmt.Sprintf("./testdata/keep_flag/%s", mainfile)
+ os.Remove(buildFile)
+ defer os.Remove(buildFile)
+ w := tLogWriter{t}
+
+ inv := Invocation{
+ Dir: "./testdata/keep_flag",
+ Stdout: w,
+ Stderr: w,
+ List: true,
+ Keep: true,
+ Force: true, // need force so we always regenerate
+ }
+ code := Invoke(inv)
+ if code != 0 {
+ t.Fatalf("expected code 0, but got %v", code)
+ }
+
+ if _, err := os.Stat(buildFile); err != nil {
+ t.Fatalf("expected file %q to exist but got err, %v", buildFile, err)
+ }
+}
+
+type tLogWriter struct {
+ *testing.T
+}
+
+func (t tLogWriter) Write(b []byte) (n int, err error) {
+ t.Log(string(b))
+ return len(b), nil
+}
+
+// Test if generated mainfile references anything other than the stdlib
+func TestOnlyStdLib(t *testing.T) {
+ buildFile := fmt.Sprintf("./testdata/onlyStdLib/%s", mainfile)
+ os.Remove(buildFile)
+ defer os.Remove(buildFile)
+
+ w := tLogWriter{t}
+
+ inv := Invocation{
+ Dir: "./testdata/onlyStdLib",
+ Stdout: w,
+ Stderr: w,
+ List: true,
+ Keep: true,
+ Force: true, // need force so we always regenerate
+ Verbose: true,
+ }
+ code := Invoke(inv)
+ if code != 0 {
+ t.Fatalf("expected code 0, but got %v", code)
+ }
+
+ if _, err := os.Stat(buildFile); err != nil {
+ t.Fatalf("expected file %q to exist but got err, %v", buildFile, err)
+ }
+
+ fset := &token.FileSet{}
+ // Parse src but stop after processing the imports.
+ f, err := parser.ParseFile(fset, buildFile, nil, parser.ImportsOnly)
+ if err != nil {
+ fmt.Println(err)
+ return
+ }
+
+ // Print the imports from the file's AST.
+ for _, s := range f.Imports {
+ // the path value comes in as a quoted string, i.e. literally \"context\"
+ path := strings.Trim(s.Path.Value, "\"")
+ pkg, err := build.Default.Import(path, "./testdata/keep_flag", build.FindOnly)
+ if err != nil {
+ t.Fatal(err)
+ }
+ if !filepath.HasPrefix(pkg.Dir, build.Default.GOROOT) {
+ t.Errorf("import of non-stdlib package: %s", s.Path.Value)
+ }
+ }
+}
+
+func TestMultipleTargets(t *testing.T) {
+ var stderr, stdout bytes.Buffer
+ inv := Invocation{
+ Dir: "./testdata",
+ Stdout: &stdout,
+ Stderr: &stderr,
+ Args: []string{"TestVerbose", "ReturnsNilError"},
+ Verbose: true,
+ }
+ code := Invoke(inv)
+ if code != 0 {
+ t.Errorf("expected 0, but got %v", code)
+ }
+ actual := stderr.String()
+ expected := "Running target: TestVerbose\nhi!\nRunning target: ReturnsNilError\n"
+ if actual != expected {
+ t.Errorf("expected %q, but got %q", expected, actual)
+ }
+ actual = stdout.String()
+ expected = "stuff\n"
+ if actual != expected {
+ t.Errorf("expected %q, but got %q", expected, actual)
+ }
+}
+
+func TestFirstTargetFails(t *testing.T) {
+ var stderr, stdout bytes.Buffer
+ inv := Invocation{
+ Dir: "./testdata",
+ Stdout: &stdout,
+ Stderr: &stderr,
+ Args: []string{"ReturnsNonNilError", "ReturnsNilError"},
+ Verbose: true,
+ }
+ code := Invoke(inv)
+ if code != 1 {
+ t.Errorf("expected 1, but got %v", code)
+ }
+ actual := stderr.String()
+ expected := "Running target: ReturnsNonNilError\nError: bang!\n"
+ if actual != expected {
+ t.Errorf("expected %q, but got %q", expected, actual)
+ }
+ actual = stdout.String()
+ expected = ""
+ if actual != expected {
+ t.Errorf("expected %q, but got %q", expected, actual)
+ }
+}
+
+func TestBadSecondTargets(t *testing.T) {
+ var stderr, stdout bytes.Buffer
+ inv := Invocation{
+ Dir: "./testdata",
+ Stdout: &stdout,
+ Stderr: &stderr,
+ Args: []string{"TestVerbose", "NotGonnaWork"},
+ }
+ code := Invoke(inv)
+ if code != 2 {
+ t.Errorf("expected 0, but got %v", code)
+ }
+ actual := stderr.String()
+ expected := "Unknown target specified: NotGonnaWork\n"
+ if actual != expected {
+ t.Errorf("expected %q, but got %q", expected, actual)
+ }
+ actual = stdout.String()
+ expected = ""
+ if actual != expected {
+ t.Errorf("expected %q, but got %q", expected, actual)
+ }
+}
+
+func TestParse(t *testing.T) {
+ buf := &bytes.Buffer{}
+ inv, cmd, err := Parse(ioutil.Discard, buf, []string{"-v", "-debug", "-gocmd=foo", "-d", "dir", "build", "deploy"})
+ if err != nil {
+ t.Fatal("unexpected error", err)
+ }
+ if cmd == Init {
+ t.Error("init should be false but was true")
+ }
+ if cmd == Version {
+ t.Error("showVersion should be false but was true")
+ }
+ if inv.Debug != true {
+ t.Error("debug should be true")
+ }
+ if inv.Dir != "dir" {
+ t.Errorf("Expected dir to be \"dir\" but was %q", inv.Dir)
+ }
+ if inv.GoCmd != "foo" {
+ t.Errorf("Expected gocmd to be \"foo\" but was %q", inv.GoCmd)
+ }
+ expected := []string{"build", "deploy"}
+ if !reflect.DeepEqual(inv.Args, expected) {
+ t.Fatalf("expected args to be %q but got %q", expected, inv.Args)
+ }
+ if s := buf.String(); s != "" {
+ t.Fatalf("expected no stdout output but got %q", s)
+ }
+
+}
+
+func TestSetDir(t *testing.T) {
+ stdout := &bytes.Buffer{}
+ stderr := &bytes.Buffer{}
+ code := Invoke(Invocation{
+ Dir: "testdata/setdir",
+ Stdout: stdout,
+ Stderr: stderr,
+ Args: []string{"TestCurrentDir"},
+ })
+ if code != 0 {
+ t.Errorf("expected code 0, but got %d. Stdout:\n%s\nStderr:\n%s", code, stdout, stderr)
+ }
+ expected := "setdir.go\n"
+ if out := stdout.String(); out != expected {
+ t.Fatalf("expected list of files to be %q, but was %q", expected, out)
+ }
+}
+
+// Test the timeout option
+func TestTimeout(t *testing.T) {
+ stderr := &bytes.Buffer{}
+ stdout := &bytes.Buffer{}
+ inv := Invocation{
+ Dir: "testdata/context",
+ Stdout: stdout,
+ Stderr: stderr,
+ Args: []string{"timeout"},
+ Timeout: time.Duration(100 * time.Millisecond),
+ }
+ code := Invoke(inv)
+ if code != 1 {
+ t.Fatalf("expected 1, but got %v, stderr: %q, stdout: %q", code, stderr, stdout)
+ }
+ actual := stderr.String()
+ expected := "Error: context deadline exceeded\n"
+
+ if actual != expected {
+ t.Fatalf("expected %q, but got %q", expected, actual)
+ }
+}
+func TestParseHelp(t *testing.T) {
+ buf := &bytes.Buffer{}
+ _, _, err := Parse(ioutil.Discard, buf, []string{"-h"})
+ if err != flag.ErrHelp {
+ t.Fatal("unexpected error", err)
+ }
+ buf2 := &bytes.Buffer{}
+ _, _, err = Parse(ioutil.Discard, buf2, []string{"--help"})
+ if err != flag.ErrHelp {
+ t.Fatal("unexpected error", err)
+ }
+ s := buf.String()
+ s2 := buf2.String()
+ if s != s2 {
+ t.Fatalf("expected -h and --help to produce same output, but got different.\n\n-h:\n%s\n\n--help:\n%s", s, s2)
+ }
+}
+
+func TestHelpTarget(t *testing.T) {
+ stdout := &bytes.Buffer{}
+ inv := Invocation{
+ Dir: "./testdata",
+ Stdout: stdout,
+ Stderr: ioutil.Discard,
+ Args: []string{"panics"},
+ Help: true,
+ }
+ code := Invoke(inv)
+ if code != 0 {
+ t.Errorf("expected to exit with code 0, but got %v", code)
+ }
+ actual := stdout.String()
+ expected := "mage panics:\n\nFunction that panics.\n\n"
+ if actual != expected {
+ t.Fatalf("expected %q, but got %q", expected, actual)
+ }
+}
+
+func TestHelpAlias(t *testing.T) {
+ stdout := &bytes.Buffer{}
+ inv := Invocation{
+ Dir: "./testdata/alias",
+ Stdout: stdout,
+ Stderr: ioutil.Discard,
+ Args: []string{"status"},
+ Help: true,
+ }
+ code := Invoke(inv)
+ if code != 0 {
+ t.Errorf("expected to exit with code 0, but got %v", code)
+ }
+ actual := stdout.String()
+ expected := "mage status:\n\nPrints status.\n\nAliases: st, stat\n\n"
+ if actual != expected {
+ t.Fatalf("expected %q, but got %q", expected, actual)
+ }
+ inv = Invocation{
+ Dir: "./testdata/alias",
+ Stdout: stdout,
+ Stderr: ioutil.Discard,
+ Args: []string{"checkout"},
+ Help: true,
+ }
+ stdout.Reset()
+ code = Invoke(inv)
+ if code != 0 {
+ t.Errorf("expected to exit with code 0, but got %v", code)
+ }
+ actual = stdout.String()
+ expected = "mage checkout:\n\nAliases: co\n\n"
+ if actual != expected {
+ t.Fatalf("expected %q, but got %q", expected, actual)
+ }
+}
+
+func TestAlias(t *testing.T) {
+ stdout := &bytes.Buffer{}
+ stderr := &bytes.Buffer{}
+ debug.SetOutput(stderr)
+ inv := Invocation{
+ Dir: "testdata/alias",
+ Stdout: stdout,
+ Stderr: ioutil.Discard,
+ Args: []string{"status"},
+ Debug: true,
+ }
+ code := Invoke(inv)
+ if code != 0 {
+ t.Errorf("expected to exit with code 0, but got %v\noutput:\n%s\nstderr:\n%s", code, stdout, stderr)
+ }
+ actual := stdout.String()
+ expected := "alias!\n"
+ if actual != expected {
+ t.Fatalf("expected %q, but got %q", expected, actual)
+ }
+ stdout.Reset()
+ inv.Args = []string{"st"}
+ code = Invoke(inv)
+ if code != 0 {
+ t.Errorf("expected to exit with code 0, but got %v", code)
+ }
+ actual = stdout.String()
+ if actual != expected {
+ t.Fatalf("expected %q, but got %q", expected, actual)
+ }
+}
+
+func TestInvalidAlias(t *testing.T) {
+ stderr := &bytes.Buffer{}
+ log.SetOutput(ioutil.Discard)
+ inv := Invocation{
+ Dir: "./testdata/invalid_alias",
+ Stdout: ioutil.Discard,
+ Stderr: stderr,
+ Args: []string{"co"},
+ }
+ code := Invoke(inv)
+ if code != 2 {
+ t.Errorf("expected to exit with code 1, but got %v", code)
+ }
+ actual := stderr.String()
+ expected := "Unknown target specified: co\n"
+ if actual != expected {
+ t.Fatalf("expected %q, but got %q", expected, actual)
+ }
+}
+
+func TestRunCompiledPrintsError(t *testing.T) {
+ stderr := &bytes.Buffer{}
+ logger := log.New(stderr, "", 0)
+ code := RunCompiled(Invocation{}, "thiswon'texist", logger)
+ if code != 1 {
+ t.Errorf("expected code 1 but got %v", code)
+ }
+
+ if strings.TrimSpace(stderr.String()) == "" {
+ t.Fatal("expected to get output to stderr when a run fails, but got nothing.")
+ }
+}
+
+func TestCompiledFlags(t *testing.T) {
+ stderr := &bytes.Buffer{}
+ stdout := &bytes.Buffer{}
+ dir := "./testdata/compiled"
+ compileDir, err := ioutil.TempDir(dir, "")
+ if err != nil {
+ t.Fatal(err)
+ }
+ name := filepath.Join(compileDir, "mage_out")
+ // The CompileOut directory is relative to the
+ // invocation directory, so chop off the invocation dir.
+ outName := "./" + name[len(dir)-1:]
+ defer os.RemoveAll(compileDir)
+ inv := Invocation{
+ Dir: dir,
+ Stdout: stdout,
+ Stderr: stderr,
+ CompileOut: outName,
+ }
+ code := Invoke(inv)
+ if code != 0 {
+ t.Errorf("expected to exit with code 0, but got %v, stderr: %s", code, stderr)
+ }
+
+ run := func(stdout, stderr *bytes.Buffer, filename string, args ...string) error {
+ stderr.Reset()
+ stdout.Reset()
+ cmd := exec.Command(filename, args...)
+ cmd.Env = os.Environ()
+ cmd.Stderr = stderr
+ cmd.Stdout = stdout
+ if err := cmd.Run(); err != nil {
+ return fmt.Errorf("running '%s %s' failed with: %v\nstdout: %s\nstderr: %s",
+ filename, strings.Join(args, " "), err, stdout, stderr)
+ }
+ return nil
+ }
+
+ // get help to target with flag -h target
+ if err := run(stdout, stderr, name, "-h", "deploy"); err != nil {
+ t.Fatal(err)
+ }
+ got := strings.TrimSpace(stdout.String())
+ want := filepath.Base(name) + " deploy:\n\nThis is the synopsis for Deploy. This part shouldn't show up."
+ if got != want {
+ t.Errorf("got %q, want %q", got, want)
+ }
+
+ // run target with verbose flag -v
+ if err := run(stdout, stderr, name, "-v", "testverbose"); err != nil {
+ t.Fatal(err)
+ }
+ got = stderr.String()
+ want = "hi!"
+ if strings.Contains(got, want) == false {
+ t.Errorf("got %q, does not contain %q", got, want)
+ }
+
+ // pass list flag -l
+ if err := run(stdout, stderr, name, "-l"); err != nil {
+ t.Fatal(err)
+ }
+ got = stdout.String()
+ want = "This is the synopsis for Deploy"
+ if strings.Contains(got, want) == false {
+ t.Errorf("got %q, does not contain %q", got, want)
+ }
+ want = "This is very verbose"
+ if strings.Contains(got, want) == false {
+ t.Errorf("got %q, does not contain %q", got, want)
+ }
+
+ // pass flag -t 1ms
+ err = run(stdout, stderr, name, "-t", "1ms", "sleep")
+ if err == nil {
+ t.Fatalf("expected an error because of timeout")
+ }
+ got = stdout.String()
+ want = "context deadline exceeded"
+ if strings.Contains(got, want) == false {
+ t.Errorf("got %q, does not contain %q", got, want)
+ }
+}
+
+func TestCompiledEnvironmentVars(t *testing.T) {
+ stderr := &bytes.Buffer{}
+ stdout := &bytes.Buffer{}
+ dir := "./testdata/compiled"
+ compileDir, err := ioutil.TempDir(dir, "")
+ if err != nil {
+ t.Fatal(err)
+ }
+ name := filepath.Join(compileDir, "mage_out")
+ // The CompileOut directory is relative to the
+ // invocation directory, so chop off the invocation dir.
+ outName := "./" + name[len(dir)-1:]
+ defer os.RemoveAll(compileDir)
+ inv := Invocation{
+ Dir: dir,
+ Stdout: stdout,
+ Stderr: stderr,
+ CompileOut: outName,
+ }
+ code := Invoke(inv)
+ if code != 0 {
+ t.Errorf("expected to exit with code 0, but got %v, stderr: %s", code, stderr)
+ }
+
+ run := func(stdout, stderr *bytes.Buffer, filename string, envval string, args ...string) error {
+ stderr.Reset()
+ stdout.Reset()
+ cmd := exec.Command(filename, args...)
+ cmd.Env = []string{envval}
+ cmd.Stderr = stderr
+ cmd.Stdout = stdout
+ if err := cmd.Run(); err != nil {
+ return fmt.Errorf("running '%s %s' failed with: %v\nstdout: %s\nstderr: %s",
+ filename, strings.Join(args, " "), err, stdout, stderr)
+ }
+ return nil
+ }
+
+ if err := run(stdout, stderr, name, "MAGEFILE_HELP=1", "deploy"); err != nil {
+ t.Fatal(err)
+ }
+ got := strings.TrimSpace(stdout.String())
+ want := filepath.Base(name) + " deploy:\n\nThis is the synopsis for Deploy. This part shouldn't show up."
+ if got != want {
+ t.Errorf("got %q, want %q", got, want)
+ }
+
+ if err := run(stdout, stderr, name, mg.VerboseEnv+"=1", "testverbose"); err != nil {
+ t.Fatal(err)
+ }
+ got = stderr.String()
+ want = "hi!"
+ if strings.Contains(got, want) == false {
+ t.Errorf("got %q, does not contain %q", got, want)
+ }
+
+ if err := run(stdout, stderr, name, "MAGEFILE_LIST=1"); err != nil {
+ t.Fatal(err)
+ }
+ got = stdout.String()
+ want = "This is the synopsis for Deploy"
+ if strings.Contains(got, want) == false {
+ t.Errorf("got %q, does not contain %q", got, want)
+ }
+ want = "This is very verbose"
+ if strings.Contains(got, want) == false {
+ t.Errorf("got %q, does not contain %q", got, want)
+ }
+
+ if err := run(stdout, stderr, name, mg.IgnoreDefaultEnv+"=1"); err != nil {
+ t.Fatal(err)
+ }
+ got = stdout.String()
+ want = "Compiled package description."
+ if strings.Contains(got, want) == false {
+ t.Errorf("got %q, does not contain %q", got, want)
+ }
+
+ err = run(stdout, stderr, name, "MAGEFILE_TIMEOUT=1ms", "sleep")
+ if err == nil {
+ t.Fatalf("expected an error because of timeout")
+ }
+ got = stdout.String()
+ want = "context deadline exceeded"
+ if strings.Contains(got, want) == false {
+ t.Errorf("got %q, does not contain %q", got, want)
+ }
+}
+
+func TestClean(t *testing.T) {
+ if err := os.RemoveAll(mg.CacheDir()); err != nil {
+ t.Error("error removing cache dir:", err)
+ }
+ code := ParseAndRun(ioutil.Discard, ioutil.Discard, &bytes.Buffer{}, []string{"-clean"})
+ if code != 0 {
+ t.Errorf("expected 0, but got %v", code)
+ }
+
+ TestAlias(t) // make sure we've got something in the CACHE_DIR
+ files, err := ioutil.ReadDir(mg.CacheDir())
+ if err != nil {
+ t.Error("issue reading file:", err)
+ }
+
+ if len(files) < 1 {
+ t.Error("Need at least 1 cached binaries to test --clean")
+ }
+
+ _, cmd, err := Parse(ioutil.Discard, ioutil.Discard, []string{"-clean"})
+ if err != nil {
+ t.Fatal(err)
+ }
+ if cmd != Clean {
+ t.Errorf("Expected 'clean' command but got %v", cmd)
+ }
+ buf := &bytes.Buffer{}
+ code = ParseAndRun(ioutil.Discard, buf, &bytes.Buffer{}, []string{"-clean"})
+ if code != 0 {
+ t.Fatalf("expected 0, but got %v: %s", code, buf)
+ }
+
+ infos, err := ioutil.ReadDir(mg.CacheDir())
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ var names []string
+ for _, i := range infos {
+ if !i.IsDir() {
+ names = append(names, i.Name())
+ }
+ }
+
+ if len(names) != 0 {
+ t.Errorf("expected '-clean' to remove files from CACHE_DIR, but still have %v", names)
+ }
+}
+
+func TestGoCmd(t *testing.T) {
+ textOutput := "TestGoCmd"
+ defer os.Unsetenv(testExeEnv)
+ if err := os.Setenv(testExeEnv, textOutput); err != nil {
+ t.Fatal(err)
+ }
+
+ // fake out the compiled file, since the code checks for it.
+ f, err := ioutil.TempFile("", "")
+ if err != nil {
+ t.Fatal(err)
+ }
+ name := f.Name()
+ dir := filepath.Dir(name)
+ defer os.Remove(name)
+ f.Close()
+
+ buf := &bytes.Buffer{}
+ stderr := &bytes.Buffer{}
+ if err := Compile("", "", dir, os.Args[0], name, []string{}, false, stderr, buf); err != nil {
+ t.Log("stderr: ", stderr.String())
+ t.Fatal(err)
+ }
+ if buf.String() != textOutput {
+ t.Fatalf("We didn't run the custom go cmd. Expected output %q, but got %q", textOutput, buf)
+ }
+}
+
+var runtimeVer = regexp.MustCompile(`go1\.([0-9]+)`)
+
+func TestGoModules(t *testing.T) {
+ matches := runtimeVer.FindStringSubmatch(runtime.Version())
+ if len(matches) < 2 || minorVer(t, matches[1]) < 11 {
+ t.Skipf("Skipping Go modules test because go version %q is less than go1.11", runtime.Version())
+ }
+ dir, err := ioutil.TempDir("", "")
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer os.RemoveAll(dir)
+ err = ioutil.WriteFile(filepath.Join(dir, "magefile.go"), []byte(`//+build mage
+
+package main
+
+import "golang.org/x/text/unicode/norm"
+
+func Test() {
+ print("unicode version: " + norm.Version)
+}
+`), 0600)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ stdout := &bytes.Buffer{}
+ stderr := &bytes.Buffer{}
+ cmd := exec.Command("go", "mod", "init", "app")
+ cmd.Dir = dir
+ cmd.Env = os.Environ()
+ cmd.Stderr = stderr
+ cmd.Stdout = stdout
+ if err := cmd.Run(); err != nil {
+ t.Fatalf("Error running go mod init: %v\nStdout: %s\nStderr: %s", err, stdout, stderr)
+ }
+ stderr.Reset()
+ stdout.Reset()
+ code := Invoke(Invocation{
+ Dir: dir,
+ Stderr: stderr,
+ Stdout: stdout,
+ })
+ if code != 0 {
+ t.Fatalf("exited with code %d. \nStdout: %s\nStderr: %s", code, stdout, stderr)
+ }
+ expected := `
+Targets:
+ test
+`[1:]
+ if output := stdout.String(); output != expected {
+ t.Fatalf("expected output %q, but got %q", expected, output)
+ }
+}
+
+func minorVer(t *testing.T, v string) int {
+ a, err := strconv.Atoi(v)
+ if err != nil {
+ t.Fatal("unexpected non-numeric version", v)
+ }
+ return a
+}
+
+func TestNamespaceDep(t *testing.T) {
+ stdout := &bytes.Buffer{}
+ stderr := &bytes.Buffer{}
+ inv := Invocation{
+ Dir: "./testdata/namespaces",
+ Stderr: stderr,
+ Stdout: stdout,
+ Args: []string{"TestNamespaceDep"},
+ }
+ code := Invoke(inv)
+ if code != 0 {
+ t.Fatalf("expected 0, but got %v, stderr:\n%s", code, stderr)
+ }
+ expected := "hi!\n"
+ if stdout.String() != expected {
+ t.Fatalf("expected %q, but got %q", expected, stdout.String())
+ }
+}
+
+func TestNamespace(t *testing.T) {
+ stdout := &bytes.Buffer{}
+ inv := Invocation{
+ Dir: "./testdata/namespaces",
+ Stderr: ioutil.Discard,
+ Stdout: stdout,
+ Args: []string{"ns:error"},
+ }
+ code := Invoke(inv)
+ if code != 0 {
+ t.Fatalf("expected 0, but got %v", code)
+ }
+ expected := "hi!\n"
+ if stdout.String() != expected {
+ t.Fatalf("expected %q, but got %q", expected, stdout.String())
+ }
+}
+
+func TestNamespaceDefault(t *testing.T) {
+ stdout := &bytes.Buffer{}
+ inv := Invocation{
+ Dir: "./testdata/namespaces",
+ Stderr: ioutil.Discard,
+ Stdout: stdout,
+ }
+ code := Invoke(inv)
+ if code != 0 {
+ t.Fatalf("expected 0, but got %v", code)
+ }
+ expected := "hi!\n"
+ if stdout.String() != expected {
+ t.Fatalf("expected %q, but got %q", expected, stdout.String())
+ }
+}
+
+func TestAliasToImport(t *testing.T) {
+
+}
+
+var wrongDepRx = regexp.MustCompile("^Error: Invalid type for dependent function.*@ main.FooBar .*magefile.go")
+
+func TestWrongDependency(t *testing.T) {
+ stderr := &bytes.Buffer{}
+ inv := Invocation{
+ Dir: "./testdata/wrong_dep",
+ Stderr: stderr,
+ Stdout: ioutil.Discard,
+ }
+ code := Invoke(inv)
+ if code != 1 {
+ t.Fatalf("expected 1, but got %v", code)
+ }
+ actual := stderr.String()
+ if !wrongDepRx.MatchString(actual) {
+ t.Fatalf("expected matching %q, but got %q", wrongDepRx, actual)
+ }
+}
+
+/// This code liberally borrowed from https://github.com/rsc/goversion/blob/master/version/exe.go
+
+type exeType int
+type archSize int
+
+const (
+ winExe exeType = iota
+ macExe
+
+ arch32 archSize = iota
+ arch64
+)
+
+// fileData tells us if the given file is mac or windows and if they're 32bit or
+// 64 bit. Other exe versions are not supported.
+func fileData(file string) (exeType, archSize, error) {
+ f, err := os.Open(file)
+ if err != nil {
+ return -1, -1, err
+ }
+ defer f.Close()
+ data := make([]byte, 16)
+ if _, err := io.ReadFull(f, data); err != nil {
+ return -1, -1, err
+ }
+ if bytes.HasPrefix(data, []byte("MZ")) {
+ // hello windows exe!
+ e, err := pe.NewFile(f)
+ if err != nil {
+ return -1, -1, err
+ }
+ if e.Machine == pe.IMAGE_FILE_MACHINE_AMD64 {
+ return winExe, arch64, nil
+ }
+ return winExe, arch32, nil
+ }
+
+ if bytes.HasPrefix(data, []byte("\xFE\xED\xFA")) || bytes.HasPrefix(data[1:], []byte("\xFA\xED\xFE")) {
+ // hello mac exe!
+ fe, err := macho.NewFile(f)
+ if err != nil {
+ return -1, -1, err
+ }
+ if fe.Cpu&0x01000000 != 0 {
+ return macExe, arch64, nil
+ }
+ return macExe, arch32, nil
+ }
+ return -1, -1, fmt.Errorf("unrecognized executable format")
+}
diff --git a/vendor/github.com/magefile/mage/mage/template.go b/vendor/github.com/magefile/mage/mage/template.go
new file mode 100644
index 0000000..dc943fd
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mage/template.go
@@ -0,0 +1,318 @@
+package mage
+
+// this template uses the "data"
+
+// var only for tests
+var mageMainfileTplString = `// +build ignore
+
+package main
+
+import (
+ "context"
+ "flag"
+ "fmt"
+ "io/ioutil"
+ "log"
+ "os"
+ "path/filepath"
+ "sort"
+ "strconv"
+ "strings"
+ "text/tabwriter"
+ "time"
+ {{range .Imports}}{{.UniqueName}} "{{.Path}}"
+ {{end}}
+)
+
+func main() {
+ // Use local types and functions in order to avoid name conflicts with additional magefiles.
+ type arguments struct {
+ Verbose bool // print out log statements
+ List bool // print out a list of targets
+ Help bool // print out help for a specific target
+ Timeout time.Duration // set a timeout to running the targets
+ Args []string // args contain the non-flag command-line arguments
+ }
+
+ parseBool := func(env string) bool {
+ val := os.Getenv(env)
+ if val == "" {
+ return false
+ }
+ b, err := strconv.ParseBool(val)
+ if err != nil {
+ log.Printf("warning: environment variable %s is not a valid bool value: %v", env, val)
+ return false
+ }
+ return b
+ }
+
+ parseDuration := func(env string) time.Duration {
+ val := os.Getenv(env)
+ if val == "" {
+ return 0
+ }
+ d, err := time.ParseDuration(val)
+ if err != nil {
+ log.Printf("warning: environment variable %s is not a valid duration value: %v", env, val)
+ return 0
+ }
+ return d
+ }
+ args := arguments{}
+ fs := flag.FlagSet{}
+ fs.SetOutput(os.Stdout)
+
+ // default flag set with ExitOnError and auto generated PrintDefaults should be sufficient
+ fs.BoolVar(&args.Verbose, "v", parseBool("MAGEFILE_VERBOSE"), "show verbose output when running targets")
+ fs.BoolVar(&args.List, "l", parseBool("MAGEFILE_LIST"), "list targets for this binary")
+ fs.BoolVar(&args.Help, "h", parseBool("MAGEFILE_HELP"), "print out help for a specific target")
+ fs.DurationVar(&args.Timeout, "t", parseDuration("MAGEFILE_TIMEOUT"), "timeout in duration parsable format (e.g. 5m30s)")
+ fs.Usage = func() {
+ fmt.Fprintf(os.Stdout, ` + "`" + `
+%s [options] [target]
+
+Commands:
+ -l list targets in this binary
+ -h show this help
+
+Options:
+ -h show description of a target
+ -t
+ timeout in duration parsable format (e.g. 5m30s)
+ -v show verbose output when running targets
+ ` + "`" + `[1:], filepath.Base(os.Args[0]))
+ }
+ if err := fs.Parse(os.Args[1:]); err != nil {
+ // flag will have printed out an error already.
+ return
+ }
+ args.Args = fs.Args()
+ if args.Help && len(args.Args) == 0 {
+ fs.Usage()
+ return
+ }
+
+ list := func() error {
+ {{with .Description}}fmt.Println(` + "`{{.}}\n`" + `)
+ {{- end}}
+ {{- $default := .DefaultFunc}}
+ targets := map[string]string{
+ {{- range .Funcs}}
+ "{{lowerFirst .TargetName}}{{if and (eq .Name $default.Name) (eq .Receiver $default.Receiver)}}*{{end}}": {{printf "%q" .Synopsis}},
+ {{- end}}
+ {{- range .Imports}}{{$imp := .}}
+ {{- range .Info.Funcs}}
+ "{{lowerFirst .TargetName}}{{if and (eq .Name $default.Name) (eq .Receiver $default.Receiver)}}*{{end}}": {{printf "%q" .Synopsis}},
+ {{- end}}
+ {{- end}}
+ }
+
+ keys := make([]string, 0, len(targets))
+ for name := range targets {
+ keys = append(keys, name)
+ }
+ sort.Strings(keys)
+
+ fmt.Println("Targets:")
+ w := tabwriter.NewWriter(os.Stdout, 0, 4, 4, ' ', 0)
+ for _, name := range keys {
+ fmt.Fprintf(w, " %v\t%v\n", name, targets[name])
+ }
+ err := w.Flush()
+ {{- if .DefaultFunc.Name}}
+ if err == nil {
+ fmt.Println("\n* default target")
+ }
+ {{- end}}
+ return err
+ }
+
+ var ctx context.Context
+ var ctxCancel func()
+
+ getContext := func() (context.Context, func()) {
+ if ctx != nil {
+ return ctx, ctxCancel
+ }
+
+ if args.Timeout != 0 {
+ ctx, ctxCancel = context.WithTimeout(context.Background(), args.Timeout)
+ } else {
+ ctx = context.Background()
+ ctxCancel = func() {}
+ }
+ return ctx, ctxCancel
+ }
+
+ runTarget := func(fn func(context.Context) error) interface{} {
+ var err interface{}
+ ctx, cancel := getContext()
+ d := make(chan interface{})
+ go func() {
+ defer func() {
+ err := recover()
+ d <- err
+ }()
+ err := fn(ctx)
+ d <- err
+ }()
+ select {
+ case <-ctx.Done():
+ cancel()
+ e := ctx.Err()
+ fmt.Printf("ctx err: %v\n", e)
+ return e
+ case err = <-d:
+ cancel()
+ return err
+ }
+ }
+ // This is necessary in case there aren't any targets, to avoid an unused
+ // variable error.
+ _ = runTarget
+
+ handleError := func(logger *log.Logger, err interface{}) {
+ if err != nil {
+ logger.Printf("Error: %v\n", err)
+ type code interface {
+ ExitStatus() int
+ }
+ if c, ok := err.(code); ok {
+ os.Exit(c.ExitStatus())
+ }
+ os.Exit(1)
+ }
+ }
+ _ = handleError
+
+ log.SetFlags(0)
+ if !args.Verbose {
+ log.SetOutput(ioutil.Discard)
+ }
+ logger := log.New(os.Stderr, "", 0)
+ if args.List {
+ if err := list(); err != nil {
+ log.Println(err)
+ os.Exit(1)
+ }
+ return
+ }
+
+ targets := map[string]bool {
+ {{range $alias, $funci := .Aliases}}"{{lower $alias}}": true,
+ {{end}}
+ {{range .Funcs}}"{{lower .TargetName}}": true,
+ {{end}}
+ {{range .Imports}}
+ {{$imp := .}}
+ {{range $alias, $funci := .Info.Aliases}}"{{if ne $imp.Alias "."}}{{lower $imp.Alias}}:{{end}}{{lower $alias}}": true,
+ {{end}}
+ {{range .Info.Funcs}}"{{lower .TargetName}}": true,
+ {{end}}
+ {{end}}
+ }
+
+ var unknown []string
+ for _, arg := range args.Args {
+ if !targets[strings.ToLower(arg)] {
+ unknown = append(unknown, arg)
+ }
+ }
+ if len(unknown) == 1 {
+ logger.Println("Unknown target specified:", unknown[0])
+ os.Exit(2)
+ }
+ if len(unknown) > 1 {
+ logger.Println("Unknown targets specified:", strings.Join(unknown, ", "))
+ os.Exit(2)
+ }
+
+ if args.Help {
+ if len(args.Args) < 1 {
+ logger.Println("no target specified")
+ os.Exit(1)
+ }
+ switch strings.ToLower(args.Args[0]) {
+ {{range .Funcs}}case "{{lower .TargetName}}":
+ fmt.Print("{{$.BinaryName}} {{lower .TargetName}}:\n\n")
+ {{if ne .Comment "" -}}
+ fmt.Println({{printf "%q" .Comment}})
+ fmt.Println()
+ {{end}}
+ var aliases []string
+ {{- $name := .Name -}}
+ {{- $recv := .Receiver -}}
+ {{range $alias, $func := $.Aliases}}
+ {{if and (eq $name $func.Name) (eq $recv $func.Receiver)}}aliases = append(aliases, "{{$alias}}"){{end -}}
+ {{- end}}
+ if len(aliases) > 0 {
+ fmt.Printf("Aliases: %s\n\n", strings.Join(aliases, ", "))
+ }
+ return
+ {{end}}
+ default:
+ logger.Printf("Unknown target: %q\n", args.Args[0])
+ os.Exit(1)
+ }
+ }
+ if len(args.Args) < 1 {
+ {{- if .DefaultFunc.Name}}
+ ignoreDefault, _ := strconv.ParseBool(os.Getenv("MAGEFILE_IGNOREDEFAULT"))
+ if ignoreDefault {
+ if err := list(); err != nil {
+ logger.Println("Error:", err)
+ os.Exit(1)
+ }
+ return
+ }
+ {{.DefaultFunc.ExecCode}}
+ handleError(logger, err)
+ return
+ {{- else}}
+ if err := list(); err != nil {
+ logger.Println("Error:", err)
+ os.Exit(1)
+ }
+ return
+ {{- end}}
+ }
+ for _, target := range args.Args {
+ switch strings.ToLower(target) {
+ {{range $alias, $func := .Aliases}}
+ case "{{lower $alias}}":
+ target = "{{$func.TargetName}}"
+ {{- end}}
+ }
+ switch strings.ToLower(target) {
+ {{range .Funcs }}
+ case "{{lower .TargetName}}":
+ if args.Verbose {
+ logger.Println("Running target:", "{{.TargetName}}")
+ }
+ {{.ExecCode}}
+ handleError(logger, err)
+ {{- end}}
+ {{range .Imports}}
+ {{$imp := .}}
+ {{range .Info.Funcs }}
+ case "{{lower .TargetName}}":
+ if args.Verbose {
+ logger.Println("Running target:", "{{.TargetName}}")
+ }
+ {{.ExecCode}}
+ handleError(logger, err)
+ {{- end}}
+ {{- end}}
+ default:
+ // should be impossible since we check this above.
+ logger.Printf("Unknown target: %q\n", args.Args[0])
+ os.Exit(1)
+ }
+ }
+}
+
+
+
+
+`
diff --git a/vendor/github.com/magefile/mage/mage/testdata/alias/magefile.go b/vendor/github.com/magefile/mage/mage/testdata/alias/magefile.go
new file mode 100644
index 0000000..d68326d
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mage/testdata/alias/magefile.go
@@ -0,0 +1,18 @@
+//+build mage
+
+package main
+
+import "fmt"
+
+var Aliases = map[string]interface{}{
+ "st": Status,
+ "stat": Status,
+ "co": Checkout,
+}
+
+// Prints status.
+func Status() {
+ fmt.Println("alias!")
+}
+
+func Checkout() {}
diff --git a/vendor/github.com/magefile/mage/mage/testdata/command.go b/vendor/github.com/magefile/mage/mage/testdata/command.go
new file mode 100644
index 0000000..ac2b735
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mage/testdata/command.go
@@ -0,0 +1,29 @@
+// +build mage
+
+package main
+
+import (
+ "fmt"
+ "log"
+
+ "github.com/magefile/mage/mg"
+)
+
+// This should work as a default - even if it's in a different file
+var Default = ReturnsNilError
+
+// this should not be a target because it returns a string
+func ReturnsString() string {
+ fmt.Println("more stuff")
+ return ""
+}
+
+func TestVerbose() {
+ log.Println("hi!")
+}
+
+func ReturnsVoid() {
+ mg.Deps(f)
+}
+
+func f() {}
diff --git a/vendor/github.com/magefile/mage/mage/testdata/compiled/custom.go b/vendor/github.com/magefile/mage/mage/testdata/compiled/custom.go
new file mode 100644
index 0000000..1a0f4c3
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mage/testdata/compiled/custom.go
@@ -0,0 +1,32 @@
+// +build mage
+
+// Compiled package description.
+package main
+
+import (
+ "log"
+ "time"
+
+ "github.com/magefile/mage/mg"
+)
+
+var Default = Deploy
+
+// This is very verbose.
+func TestVerbose() {
+ log.Println("hi!")
+}
+
+// This is the synopsis for Deploy. This part shouldn't show up.
+func Deploy() {
+ mg.Deps(f)
+}
+
+// Sleep sleeps 5 seconds.
+func Sleep() {
+ time.Sleep(5 * time.Second)
+}
+
+func f() {
+ log.Println("i am independent -- not")
+}
diff --git a/vendor/github.com/magefile/mage/mage/testdata/context/context.go b/vendor/github.com/magefile/mage/mage/testdata/context/context.go
new file mode 100644
index 0000000..aaf08fb
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mage/testdata/context/context.go
@@ -0,0 +1,30 @@
+//+build mage
+
+package main
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "time"
+
+ "github.com/magefile/mage/mg"
+)
+
+// Returns a non-nil error.
+func TakesContextNoError(ctx context.Context) {
+ deadline, _ := ctx.Deadline()
+ fmt.Printf("Context timeout: %v\n", deadline)
+}
+
+func Timeout(ctx context.Context) {
+ time.Sleep(200 * time.Millisecond)
+}
+
+func TakesContextWithError(ctx context.Context) error {
+ return errors.New("Something went sideways")
+}
+
+func CtxDeps(ctx context.Context) {
+ mg.CtxDeps(ctx, TakesContextNoError)
+}
diff --git a/vendor/github.com/magefile/mage/mage/testdata/error.go b/vendor/github.com/magefile/mage/mage/testdata/error.go
new file mode 100644
index 0000000..bb98a09
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mage/testdata/error.go
@@ -0,0 +1,10 @@
+// +build mage
+
+package main
+
+import "errors"
+
+// Returns a non-nil error.
+func ReturnsNonNilError() error {
+ return errors.New("bang!")
+}
diff --git a/vendor/github.com/magefile/mage/mage/testdata/func.go b/vendor/github.com/magefile/mage/mage/testdata/func.go
new file mode 100644
index 0000000..b33fe4b
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mage/testdata/func.go
@@ -0,0 +1,23 @@
+// +build mage
+
+package main
+
+import (
+ "fmt"
+ "io"
+ "os"
+)
+
+// Synopsis for "returns" error.
+// And some more text.
+func ReturnsNilError() error {
+ fmt.Println("stuff")
+ return nil
+}
+
+func CopyStdin() error {
+ _, err := io.Copy(os.Stdout, os.Stdin)
+ return err
+}
+
+func nonexported() {}
diff --git a/vendor/github.com/magefile/mage/mage/testdata/goos_magefiles/magefile_nonwindows.go b/vendor/github.com/magefile/mage/mage/testdata/goos_magefiles/magefile_nonwindows.go
new file mode 100644
index 0000000..420f4f8
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mage/testdata/goos_magefiles/magefile_nonwindows.go
@@ -0,0 +1,5 @@
+// +build mage,!windows
+
+package main
+
+func NonWindowsTarget() {}
diff --git a/vendor/github.com/magefile/mage/mage/testdata/goos_magefiles/magefile_windows.go b/vendor/github.com/magefile/mage/mage/testdata/goos_magefiles/magefile_windows.go
new file mode 100644
index 0000000..1b8248b
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mage/testdata/goos_magefiles/magefile_windows.go
@@ -0,0 +1,5 @@
+// +build mage
+
+package main
+
+func WindowsTarget() {}
diff --git a/vendor/github.com/magefile/mage/mage/testdata/invalid_alias/magefile.go b/vendor/github.com/magefile/mage/mage/testdata/invalid_alias/magefile.go
new file mode 100644
index 0000000..e3f985f
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mage/testdata/invalid_alias/magefile.go
@@ -0,0 +1,13 @@
+// +build mage
+
+package main
+
+import "fmt"
+
+var Aliases = map[string]interface{}{
+ "co": checkout,
+}
+
+func checkout() {
+ fmt.Println("done!")
+}
diff --git a/vendor/github.com/magefile/mage/mage/testdata/keep_flag/magefile.go b/vendor/github.com/magefile/mage/mage/testdata/keep_flag/magefile.go
new file mode 100644
index 0000000..ce97b22
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mage/testdata/keep_flag/magefile.go
@@ -0,0 +1,5 @@
+// +build mage
+
+package main
+
+func Noop() {}
diff --git a/vendor/github.com/magefile/mage/mage/testdata/list/command.go b/vendor/github.com/magefile/mage/mage/testdata/list/command.go
new file mode 100644
index 0000000..ae36007
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mage/testdata/list/command.go
@@ -0,0 +1,31 @@
+// +build mage
+
+// This is a comment on the package which should get turned into output with the
+// list of targets.
+package main
+
+import (
+ "fmt"
+ "log"
+
+ "github.com/magefile/mage/mg"
+)
+
+var Default = SomePig
+
+// this should not be a target because it returns a string
+func ReturnsString() string {
+ fmt.Println("more stuff")
+ return ""
+}
+
+func TestVerbose() {
+ log.Println("hi!")
+}
+
+// This is the synopsis for SomePig. There's more data that won't show up.
+func SomePig() {
+ mg.Deps(f)
+}
+
+func f() {}
diff --git a/vendor/github.com/magefile/mage/mage/testdata/mageimport/magefile.go b/vendor/github.com/magefile/mage/mage/testdata/mageimport/magefile.go
new file mode 100644
index 0000000..f5d286f
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mage/testdata/mageimport/magefile.go
@@ -0,0 +1,29 @@
+//+build mage
+
+package main
+
+// important things to note:
+// * these two packages have the same package name, so they'll conflict
+// when imported.
+// * one is imported with underscore and one is imported normally.
+//
+// they should still work normally as mageimports
+
+import (
+ "fmt"
+
+ // mage:import
+ _ "github.com/magefile/mage/mage/testdata/mageimport/subdir1"
+ // mage:import zz
+ "github.com/magefile/mage/mage/testdata/mageimport/subdir2"
+)
+
+var Aliases = map[string]interface{}{
+ "nsd2": mage.NS.Deploy2,
+}
+
+var Default = mage.NS.Deploy2
+
+func Root() {
+ fmt.Println("root")
+}
diff --git a/vendor/github.com/magefile/mage/mage/testdata/mageimport/oneline/magefile.go b/vendor/github.com/magefile/mage/mage/testdata/mageimport/oneline/magefile.go
new file mode 100644
index 0000000..b6bd5ea
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mage/testdata/mageimport/oneline/magefile.go
@@ -0,0 +1,6 @@
+// +build mage
+
+package main
+
+// mage:import
+import _ "github.com/magefile/mage/mage/testdata/mageimport/oneline/other"
diff --git a/vendor/github.com/magefile/mage/mage/testdata/mageimport/oneline/other/other.go b/vendor/github.com/magefile/mage/mage/testdata/mageimport/oneline/other/other.go
new file mode 100644
index 0000000..5d40570
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mage/testdata/mageimport/oneline/other/other.go
@@ -0,0 +1,7 @@
+package other
+
+import "fmt"
+
+func Build() {
+ fmt.Println("build")
+}
diff --git a/vendor/github.com/magefile/mage/mage/testdata/mageimport/subdir1/mage.go b/vendor/github.com/magefile/mage/mage/testdata/mageimport/subdir1/mage.go
new file mode 100644
index 0000000..0dae1b5
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mage/testdata/mageimport/subdir1/mage.go
@@ -0,0 +1,20 @@
+package mage
+
+import (
+ "fmt"
+
+ "github.com/magefile/mage/mg"
+)
+
+// BuildSubdir Builds stuff.
+func BuildSubdir() {
+ fmt.Println("buildsubdir")
+}
+
+// NS is a namespace.
+type NS mg.Namespace
+
+// Deploy deploys stuff.
+func (NS) Deploy() {
+ fmt.Println("deploy")
+}
diff --git a/vendor/github.com/magefile/mage/mage/testdata/mageimport/subdir2/mage.go b/vendor/github.com/magefile/mage/mage/testdata/mageimport/subdir2/mage.go
new file mode 100644
index 0000000..39f699c
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mage/testdata/mageimport/subdir2/mage.go
@@ -0,0 +1,20 @@
+package mage
+
+import (
+ "fmt"
+
+ "github.com/magefile/mage/mg"
+)
+
+// BuildSubdir2 Builds stuff.
+func BuildSubdir2() {
+ fmt.Println("buildsubdir2")
+}
+
+// NS is a namespace.
+type NS mg.Namespace
+
+// Deploy2 deploys stuff.
+func (NS) Deploy2() {
+ fmt.Println("deploy2")
+}
diff --git a/vendor/github.com/magefile/mage/mage/testdata/main.go b/vendor/github.com/magefile/mage/mage/testdata/main.go
new file mode 100644
index 0000000..a3f23b4
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mage/testdata/main.go
@@ -0,0 +1,13 @@
+// +build ignore
+
+package main
+
+import (
+ "os"
+
+ "github.com/magefile/mage/mage"
+)
+
+func main() {
+ os.Exit(mage.Main())
+}
diff --git a/vendor/github.com/magefile/mage/mage/testdata/mixed_lib_files/lib.go b/vendor/github.com/magefile/mage/mage/testdata/mixed_lib_files/lib.go
new file mode 100644
index 0000000..908909a
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mage/testdata/mixed_lib_files/lib.go
@@ -0,0 +1,8 @@
+// Some points here... we have a different package name for the non-mage code,
+// and we need to make sure that we handle that. We also have a duplicate
+// funciotn name between the mage code and the non-mage code. That should also
+// work correctly.
+
+package lib
+
+func Build() {]}
diff --git a/vendor/github.com/magefile/mage/mage/testdata/mixed_lib_files/mage_helpers.go b/vendor/github.com/magefile/mage/mage/testdata/mixed_lib_files/mage_helpers.go
new file mode 100644
index 0000000..19c713a
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mage/testdata/mixed_lib_files/mage_helpers.go
@@ -0,0 +1,5 @@
+//+build mage
+
+package main
+
+func foo() {}
diff --git a/vendor/github.com/magefile/mage/mage/testdata/mixed_lib_files/magefile.go b/vendor/github.com/magefile/mage/mage/testdata/mixed_lib_files/magefile.go
new file mode 100644
index 0000000..3c30feb
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mage/testdata/mixed_lib_files/magefile.go
@@ -0,0 +1,9 @@
+//+build mage
+
+package main
+
+import "github.com/magefile/mage/mage/testdata/mixed_lib_files/subdir"
+
+func Build() {
+ subdir.Build()
+}
diff --git a/vendor/github.com/magefile/mage/mage/testdata/mixed_lib_files/subdir/magefile.go b/vendor/github.com/magefile/mage/mage/testdata/mixed_lib_files/subdir/magefile.go
new file mode 100644
index 0000000..20a9fe4
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mage/testdata/mixed_lib_files/subdir/magefile.go
@@ -0,0 +1,5 @@
+// +build mage
+
+package main
+
+func Build() {}
diff --git a/vendor/github.com/magefile/mage/mage/testdata/mixed_lib_files/subdir/nonmage.go b/vendor/github.com/magefile/mage/mage/testdata/mixed_lib_files/subdir/nonmage.go
new file mode 100644
index 0000000..8c5f693
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mage/testdata/mixed_lib_files/subdir/nonmage.go
@@ -0,0 +1,3 @@
+package subdir
+
+func Build() {}
diff --git a/vendor/github.com/magefile/mage/mage/testdata/mixed_main_files/mage_helpers.go b/vendor/github.com/magefile/mage/mage/testdata/mixed_main_files/mage_helpers.go
new file mode 100644
index 0000000..19c713a
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mage/testdata/mixed_main_files/mage_helpers.go
@@ -0,0 +1,5 @@
+//+build mage
+
+package main
+
+func foo() {}
diff --git a/vendor/github.com/magefile/mage/mage/testdata/mixed_main_files/magefile.go b/vendor/github.com/magefile/mage/mage/testdata/mixed_main_files/magefile.go
new file mode 100644
index 0000000..f424849
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mage/testdata/mixed_main_files/magefile.go
@@ -0,0 +1,5 @@
+//+build mage
+
+package main
+
+func Build() {}
diff --git a/vendor/github.com/magefile/mage/mage/testdata/mixed_main_files/main.go b/vendor/github.com/magefile/mage/mage/testdata/mixed_main_files/main.go
new file mode 100644
index 0000000..5bcb3b0
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mage/testdata/mixed_main_files/main.go
@@ -0,0 +1,9 @@
+// some points here: this is the main pacakge just like the magefiles. This one
+// has a main function, which could conflict with the generated main function we
+// make (but clearly shouldn't cause problems). Finally, there's a duplicate function name here.
+
+package main
+
+func main() {}
+
+func Build() {}
diff --git a/vendor/github.com/magefile/mage/mage/testdata/namespaces/magefile.go b/vendor/github.com/magefile/mage/mage/testdata/namespaces/magefile.go
new file mode 100644
index 0000000..d1ae045
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mage/testdata/namespaces/magefile.go
@@ -0,0 +1,32 @@
+//+build mage
+
+package main
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/magefile/mage/mg"
+)
+
+var Default = NS.Error
+
+func TestNamespaceDep() {
+ mg.Deps(NS.Error, NS.Bare, NS.BareCtx, NS.CtxErr)
+}
+
+type NS mg.Namespace
+
+func (NS) Error() error {
+ fmt.Println("hi!")
+ return nil
+}
+
+func (NS) Bare() {
+}
+
+func (NS) BareCtx(ctx context.Context) {
+}
+func (NS) CtxErr(ctx context.Context) error {
+ return nil
+}
diff --git a/vendor/github.com/magefile/mage/mage/testdata/no_default/magefile.go b/vendor/github.com/magefile/mage/mage/testdata/no_default/magefile.go
new file mode 100644
index 0000000..4e3d494
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mage/testdata/no_default/magefile.go
@@ -0,0 +1,19 @@
+//+build mage
+
+package main
+
+import (
+ "fmt"
+)
+
+// No default so we can check the list().
+
+// Prints out 'FooBar'.
+func FooBar() {
+ fmt.Println("FooBar")
+}
+
+// Prints out 'BazBuz'.
+func BazBuz() {
+ fmt.Println("BazBuz")
+}
diff --git a/vendor/github.com/magefile/mage/mage/testdata/onlyStdLib/command.go b/vendor/github.com/magefile/mage/mage/testdata/onlyStdLib/command.go
new file mode 100644
index 0000000..3822a80
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mage/testdata/onlyStdLib/command.go
@@ -0,0 +1,29 @@
+// +build mage
+
+package main
+
+import (
+ "fmt"
+ "log"
+
+ "github.com/magefile/mage/mg"
+)
+
+var Default = SomePig
+
+// this should not be a target because it returns a string
+func ReturnsString() string {
+ fmt.Println("more stuff")
+ return ""
+}
+
+func TestVerbose() {
+ log.Println("hi!")
+}
+
+// This is the synopsis for SomePig. There's more data that won't show up.
+func SomePig() {
+ mg.Deps(f)
+}
+
+func f() {}
diff --git a/vendor/github.com/magefile/mage/mage/testdata/panic.go b/vendor/github.com/magefile/mage/mage/testdata/panic.go
new file mode 100644
index 0000000..3714c0d
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mage/testdata/panic.go
@@ -0,0 +1,15 @@
+// +build mage
+
+package main
+
+import "errors"
+
+// Function that panics.
+func Panics() {
+ panic("boom!")
+}
+
+// Error function that panics.
+func PanicsErr() error {
+ panic(errors.New("kaboom!"))
+}
diff --git a/vendor/github.com/magefile/mage/mage/testdata/setdir/setdir.go b/vendor/github.com/magefile/mage/mage/testdata/setdir/setdir.go
new file mode 100644
index 0000000..3fc20d8
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mage/testdata/setdir/setdir.go
@@ -0,0 +1,23 @@
+//+build mage
+
+package main
+
+import (
+ "fmt"
+ "io/ioutil"
+ "strings"
+)
+
+func TestCurrentDir() error {
+ files, err := ioutil.ReadDir(".")
+ if err != nil {
+ return err
+ }
+ var out []string
+ for _, f := range files {
+ out = append(out, f.Name())
+ }
+
+ fmt.Println(strings.Join(out, ", "))
+ return nil
+}
diff --git a/vendor/github.com/magefile/mage/mage/testdata/transitiveDeps/dep/cat.notgo b/vendor/github.com/magefile/mage/mage/testdata/transitiveDeps/dep/cat.notgo
new file mode 100644
index 0000000..bbb9379
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mage/testdata/transitiveDeps/dep/cat.notgo
@@ -0,0 +1,7 @@
+package dep
+
+import "fmt"
+
+func Speak() {
+ fmt.Println("meow")
+}
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/mage/testdata/transitiveDeps/dep/dog.go b/vendor/github.com/magefile/mage/mage/testdata/transitiveDeps/dep/dog.go
new file mode 100644
index 0000000..1b2c2d6
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mage/testdata/transitiveDeps/dep/dog.go
@@ -0,0 +1,7 @@
+package dep
+
+import "fmt"
+
+func Speak() {
+ fmt.Println("woof")
+}
diff --git a/vendor/github.com/magefile/mage/mage/testdata/transitiveDeps/magefile.go b/vendor/github.com/magefile/mage/mage/testdata/transitiveDeps/magefile.go
new file mode 100644
index 0000000..379d6ea
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mage/testdata/transitiveDeps/magefile.go
@@ -0,0 +1,9 @@
+//+build mage
+
+package main
+
+import "github.com/magefile/mage/mage/testdata/transitiveDeps/dep"
+
+func Run() {
+ dep.Speak()
+}
diff --git a/vendor/github.com/magefile/mage/mage/testdata/wrong_dep/magefile.go b/vendor/github.com/magefile/mage/mage/testdata/wrong_dep/magefile.go
new file mode 100644
index 0000000..0fec8a3
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mage/testdata/wrong_dep/magefile.go
@@ -0,0 +1,16 @@
+//+build mage
+
+package main
+
+import (
+ "github.com/magefile/mage/mg"
+)
+
+var Default = FooBar
+
+func WrongSignature(i int) {
+}
+
+func FooBar() {
+ mg.Deps(WrongSignature)
+}
diff --git a/vendor/github.com/magefile/mage/magefile.go b/vendor/github.com/magefile/mage/magefile.go
new file mode 100644
index 0000000..0f2f121
--- /dev/null
+++ b/vendor/github.com/magefile/mage/magefile.go
@@ -0,0 +1,108 @@
+//+build mage
+
+// This is the build script for Mage. The install target is all you really need.
+// The release target is for generating official releases and is really only
+// useful to project admins.
+package main
+
+import (
+ "errors"
+ "fmt"
+ "os"
+ "path/filepath"
+ "regexp"
+ "runtime"
+ "strings"
+ "time"
+
+ "github.com/magefile/mage/mg"
+ "github.com/magefile/mage/sh"
+)
+
+// Runs "go install" for mage. This generates the version info the binary.
+func Install() error {
+ name := "mage"
+ if runtime.GOOS == "windows" {
+ name += ".exe"
+ }
+
+ gocmd := mg.GoCmd()
+ // use GOBIN if set in the environment, otherwise fall back to first path
+ // in GOPATH environment string
+ bin, err := sh.Output(gocmd, "env", "GOBIN")
+ if err != nil {
+ return fmt.Errorf("can't determine GOBIN: %v", err)
+ }
+ if bin == "" {
+ gopath, err := sh.Output(gocmd, "env", "GOPATH")
+ if err != nil {
+ return fmt.Errorf("can't determine GOPATH: %v", err)
+ }
+ paths := strings.Split(gopath, string([]rune{os.PathListSeparator}))
+ bin = filepath.Join(paths[0], "bin")
+ }
+ // specifically don't mkdirall, if you have an invalid gopath in the first
+ // place, that's not on us to fix.
+ if err := os.Mkdir(bin, 0700); err != nil && !os.IsExist(err) {
+ return fmt.Errorf("failed to create %q: %v", bin, err)
+ }
+ path := filepath.Join(bin, name)
+
+ // we use go build here because if someone built with go get, then `go
+ // install` turns into a no-op, and `go install -a` fails on people's
+ // machines that have go installed in a non-writeable directory (such as
+ // normal OS installs in /usr/bin)
+ return sh.RunV(gocmd, "build", "-o", path, "-ldflags="+flags(), "github.com/magefile/mage")
+}
+
+var releaseTag = regexp.MustCompile(`^v1\.[0-9]+\.[0-9]+$`)
+
+// Generates a new release. Expects the TAG environment variable to be set,
+// which will create a new tag with that name.
+func Release() (err error) {
+ tag := os.Getenv("TAG")
+ if !releaseTag.MatchString(tag) {
+ return errors.New("TAG environment variable must be in semver v1.x.x format, but was " + tag)
+ }
+
+ if err := sh.RunV("git", "tag", "-a", tag, "-m", tag); err != nil {
+ return err
+ }
+ if err := sh.RunV("git", "push", "origin", tag); err != nil {
+ return err
+ }
+ defer func() {
+ if err != nil {
+ sh.RunV("git", "tag", "--delete", "$TAG")
+ sh.RunV("git", "push", "--delete", "origin", "$TAG")
+ }
+ }()
+ return sh.RunV("goreleaser")
+}
+
+// Remove the temporarily generated files from Release.
+func Clean() error {
+ return sh.Rm("dist")
+}
+
+func flags() string {
+ timestamp := time.Now().Format(time.RFC3339)
+ hash := hash()
+ tag := tag()
+ if tag == "" {
+ tag = "dev"
+ }
+ return fmt.Sprintf(`-X "github.com/magefile/mage/mage.timestamp=%s" -X "github.com/magefile/mage/mage.commitHash=%s" -X "github.com/magefile/mage/mage.gitTag=%s"`, timestamp, hash, tag)
+}
+
+// tag returns the git tag for the current branch or "" if none.
+func tag() string {
+ s, _ := sh.Output("git", "describe", "--tags")
+ return s
+}
+
+// hash returns the git hash for the current repo or "" if none.
+func hash() string {
+ hash, _ := sh.Output("git", "rev-parse", "--short", "HEAD")
+ return hash
+}
diff --git a/vendor/github.com/magefile/mage/main.go b/vendor/github.com/magefile/mage/main.go
new file mode 100644
index 0000000..d596ac7
--- /dev/null
+++ b/vendor/github.com/magefile/mage/main.go
@@ -0,0 +1,11 @@
+package main
+
+import (
+ "os"
+
+ "github.com/magefile/mage/mage"
+)
+
+func main() {
+ os.Exit(mage.Main())
+}
diff --git a/vendor/github.com/magefile/mage/mg/deps.go b/vendor/github.com/magefile/mage/mg/deps.go
new file mode 100644
index 0000000..ad85931
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mg/deps.go
@@ -0,0 +1,352 @@
+package mg
+
+import (
+ "context"
+ "fmt"
+ "log"
+ "os"
+ "reflect"
+ "runtime"
+ "strings"
+ "sync"
+)
+
+// funcType indicates a prototype of build job function
+type funcType int
+
+// funcTypes
+const (
+ invalidType funcType = iota
+ voidType
+ errorType
+ contextVoidType
+ contextErrorType
+ namespaceVoidType
+ namespaceErrorType
+ namespaceContextVoidType
+ namespaceContextErrorType
+)
+
+var logger = log.New(os.Stderr, "", 0)
+
+type onceMap struct {
+ mu *sync.Mutex
+ m map[string]*onceFun
+}
+
+func (o *onceMap) LoadOrStore(s string, one *onceFun) *onceFun {
+ defer o.mu.Unlock()
+ o.mu.Lock()
+
+ existing, ok := o.m[s]
+ if ok {
+ return existing
+ }
+ o.m[s] = one
+ return one
+}
+
+var onces = &onceMap{
+ mu: &sync.Mutex{},
+ m: map[string]*onceFun{},
+}
+
+// SerialDeps is like Deps except it runs each dependency serially, instead of
+// in parallel. This can be useful for resource intensive dependencies that
+// shouldn't be run at the same time.
+func SerialDeps(fns ...interface{}) {
+ types := checkFns(fns)
+ ctx := context.Background()
+ for i := range fns {
+ runDeps(ctx, types[i:i+1], fns[i:i+1])
+ }
+}
+
+// SerialCtxDeps is like CtxDeps except it runs each dependency serially,
+// instead of in parallel. This can be useful for resource intensive
+// dependencies that shouldn't be run at the same time.
+func SerialCtxDeps(ctx context.Context, fns ...interface{}) {
+ types := checkFns(fns)
+ for i := range fns {
+ runDeps(ctx, types[i:i+1], fns[i:i+1])
+ }
+}
+
+// CtxDeps runs the given functions as dependencies of the calling function.
+// Dependencies must only be of type:
+// func()
+// func() error
+// func(context.Context)
+// func(context.Context) error
+// Or a similar method on a mg.Namespace type.
+//
+// The function calling Deps is guaranteed that all dependent functions will be
+// run exactly once when Deps returns. Dependent functions may in turn declare
+// their own dependencies using Deps. Each dependency is run in their own
+// goroutines. Each function is given the context provided if the function
+// prototype allows for it.
+func CtxDeps(ctx context.Context, fns ...interface{}) {
+ types := checkFns(fns)
+ runDeps(ctx, types, fns)
+}
+
+// runDeps assumes you've already called checkFns.
+func runDeps(ctx context.Context, types []funcType, fns []interface{}) {
+ mu := &sync.Mutex{}
+ var errs []string
+ var exit int
+ wg := &sync.WaitGroup{}
+ for i, f := range fns {
+ fn := addDep(ctx, types[i], f)
+ wg.Add(1)
+ go func() {
+ defer func() {
+ if v := recover(); v != nil {
+ mu.Lock()
+ if err, ok := v.(error); ok {
+ exit = changeExit(exit, ExitStatus(err))
+ } else {
+ exit = changeExit(exit, 1)
+ }
+ errs = append(errs, fmt.Sprint(v))
+ mu.Unlock()
+ }
+ wg.Done()
+ }()
+ if err := fn.run(); err != nil {
+ mu.Lock()
+ errs = append(errs, fmt.Sprint(err))
+ exit = changeExit(exit, ExitStatus(err))
+ mu.Unlock()
+ }
+ }()
+ }
+
+ wg.Wait()
+ if len(errs) > 0 {
+ panic(Fatal(exit, strings.Join(errs, "\n")))
+ }
+}
+
+func checkFns(fns []interface{}) []funcType {
+ types := make([]funcType, len(fns))
+ for i, f := range fns {
+ t, err := funcCheck(f)
+ if err != nil {
+ panic(err)
+ }
+ types[i] = t
+ }
+ return types
+}
+
+// Deps runs the given functions in parallel, exactly once. Dependencies must
+// only be of type:
+// func()
+// func() error
+// func(context.Context)
+// func(context.Context) error
+// Or a similar method on a mg.Namespace type.
+//
+// This is a way to build up a tree of dependencies with each dependency
+// defining its own dependencies. Functions must have the same signature as a
+// Mage target, i.e. optional context argument, optional error return.
+func Deps(fns ...interface{}) {
+ CtxDeps(context.Background(), fns...)
+}
+
+func changeExit(old, new int) int {
+ if new == 0 {
+ return old
+ }
+ if old == 0 {
+ return new
+ }
+ if old == new {
+ return old
+ }
+ // both different and both non-zero, just set
+ // exit to 1. Nothing more we can do.
+ return 1
+}
+
+func addDep(ctx context.Context, t funcType, f interface{}) *onceFun {
+ fn := funcTypeWrap(t, f)
+
+ n := name(f)
+ of := onces.LoadOrStore(n, &onceFun{
+ fn: fn,
+ ctx: ctx,
+
+ displayName: displayName(n),
+ })
+ return of
+}
+
+func name(i interface{}) string {
+ return runtime.FuncForPC(reflect.ValueOf(i).Pointer()).Name()
+}
+
+func displayName(name string) string {
+ splitByPackage := strings.Split(name, ".")
+ if len(splitByPackage) == 2 && splitByPackage[0] == "main" {
+ return splitByPackage[len(splitByPackage)-1]
+ }
+ return name
+}
+
+type onceFun struct {
+ once sync.Once
+ fn func(context.Context) error
+ ctx context.Context
+ err error
+
+ displayName string
+}
+
+func (o *onceFun) run() error {
+ o.once.Do(func() {
+ if Verbose() {
+ logger.Println("Running dependency:", o.displayName)
+ }
+ o.err = o.fn(o.ctx)
+ })
+ return o.err
+}
+
+// Returns a location of mg.Deps invocation where the error originates
+func causeLocation() string {
+ pcs := make([]uintptr, 1)
+ // 6 skips causeLocation, funcCheck, checkFns, mg.CtxDeps, mg.Deps in stacktrace
+ if runtime.Callers(6, pcs) != 1 {
+ return ""
+ }
+ frames := runtime.CallersFrames(pcs)
+ frame, _ := frames.Next()
+ if frame.Function == "" && frame.File == "" && frame.Line == 0 {
+ return ""
+ }
+ return fmt.Sprintf("%s %s:%d", frame.Function, frame.File, frame.Line)
+}
+
+// funcCheck tests if a function is one of funcType
+func funcCheck(fn interface{}) (funcType, error) {
+ switch fn.(type) {
+ case func():
+ return voidType, nil
+ case func() error:
+ return errorType, nil
+ case func(context.Context):
+ return contextVoidType, nil
+ case func(context.Context) error:
+ return contextErrorType, nil
+ }
+
+ err := fmt.Errorf("Invalid type for dependent function: %T. Dependencies must be func(), func() error, func(context.Context), func(context.Context) error, or the same method on an mg.Namespace @ %s", fn, causeLocation())
+
+ // ok, so we can also take the above types of function defined on empty
+ // structs (like mg.Namespace). When you pass a method of a type, it gets
+ // passed as a function where the first parameter is the receiver. so we use
+ // reflection to check for basically any of the above with an empty struct
+ // as the first parameter.
+
+ t := reflect.TypeOf(fn)
+ if t.Kind() != reflect.Func {
+ return invalidType, err
+ }
+
+ if t.NumOut() > 1 {
+ return invalidType, err
+ }
+ if t.NumOut() == 1 && t.Out(0) == reflect.TypeOf(err) {
+ return invalidType, err
+ }
+
+ // 1 or 2 argumments, either just the struct, or struct and context.
+ if t.NumIn() == 0 || t.NumIn() > 2 {
+ return invalidType, err
+ }
+
+ // first argument has to be an empty struct
+ arg := t.In(0)
+ if arg.Kind() != reflect.Struct {
+ return invalidType, err
+ }
+ if arg.NumField() != 0 {
+ return invalidType, err
+ }
+ if t.NumIn() == 1 {
+ if t.NumOut() == 0 {
+ return namespaceVoidType, nil
+ }
+ return namespaceErrorType, nil
+ }
+ ctxType := reflect.TypeOf(context.Background())
+ if t.In(1) == ctxType {
+ return invalidType, err
+ }
+
+ if t.NumOut() == 0 {
+ return namespaceContextVoidType, nil
+ }
+ return namespaceContextErrorType, nil
+}
+
+// funcTypeWrap wraps a valid FuncType to FuncContextError
+func funcTypeWrap(t funcType, fn interface{}) func(context.Context) error {
+ switch f := fn.(type) {
+ case func():
+ return func(context.Context) error {
+ f()
+ return nil
+ }
+ case func() error:
+ return func(context.Context) error {
+ return f()
+ }
+ case func(context.Context):
+ return func(ctx context.Context) error {
+ f(ctx)
+ return nil
+ }
+ case func(context.Context) error:
+ return f
+ }
+ args := []reflect.Value{reflect.ValueOf(struct{}{})}
+ switch t {
+ case namespaceVoidType:
+ return func(context.Context) error {
+ v := reflect.ValueOf(fn)
+ v.Call(args)
+ return nil
+ }
+ case namespaceErrorType:
+ return func(context.Context) error {
+ v := reflect.ValueOf(fn)
+ ret := v.Call(args)
+ val := ret[0].Interface()
+ if val == nil {
+ return nil
+ }
+ return val.(error)
+ }
+ case namespaceContextVoidType:
+ return func(ctx context.Context) error {
+ v := reflect.ValueOf(fn)
+ v.Call(append(args, reflect.ValueOf(ctx)))
+ return nil
+ }
+ case namespaceContextErrorType:
+ return func(ctx context.Context) error {
+ v := reflect.ValueOf(fn)
+ ret := v.Call(append(args, reflect.ValueOf(ctx)))
+ val := ret[0].Interface()
+ if val == nil {
+ return nil
+ }
+ return val.(error)
+ }
+ default:
+ panic(fmt.Errorf("Don't know how to deal with dep of type %T", fn))
+ }
+}
diff --git a/vendor/github.com/magefile/mage/mg/deps_internal_test.go b/vendor/github.com/magefile/mage/mg/deps_internal_test.go
new file mode 100644
index 0000000..5b561bf
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mg/deps_internal_test.go
@@ -0,0 +1,35 @@
+package mg
+
+import (
+ "bytes"
+ "log"
+ "os"
+ "strings"
+ "testing"
+)
+
+func TestDepsLogging(t *testing.T) {
+ os.Setenv("MAGEFILE_VERBOSE", "1")
+ defer os.Unsetenv("MAGEFILE_VERBOSE")
+ buf := &bytes.Buffer{}
+
+ defaultLogger := logger
+ logger = log.New(buf, "", 0)
+ defer func() { logger = defaultLogger }()
+
+ foo()
+
+ if strings.Count(buf.String(), "Running dependency: github.com/magefile/mage/mg.baz") != 1 {
+ t.Fatalf("expected one baz to be logged, but got\n%s", buf)
+ }
+}
+
+func foo() {
+ Deps(bar, baz)
+}
+
+func bar() {
+ Deps(baz)
+}
+
+func baz() {}
diff --git a/vendor/github.com/magefile/mage/mg/deps_test.go b/vendor/github.com/magefile/mage/mg/deps_test.go
new file mode 100644
index 0000000..36c46a7
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mg/deps_test.go
@@ -0,0 +1,194 @@
+package mg
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "log"
+ "testing"
+ "time"
+)
+
+func TestDepsRunOnce(t *testing.T) {
+ done := make(chan struct{})
+ f := func() {
+ done <- struct{}{}
+ }
+ go Deps(f, f)
+ select {
+ case <-done:
+ // cool
+ case <-time.After(time.Millisecond * 100):
+ t.Fatal("func not run in a reasonable amount of time.")
+ }
+ select {
+ case <-done:
+ t.Fatal("func run twice!")
+ case <-time.After(time.Millisecond * 100):
+ // cool... this should be plenty of time for the goroutine to have run
+ }
+}
+
+func TestDepsOfDeps(t *testing.T) {
+ ch := make(chan string, 3)
+ // this->f->g->h
+ h := func() {
+ ch <- "h"
+ }
+ g := func() {
+ Deps(h)
+ ch <- "g"
+ }
+ f := func() {
+ Deps(g)
+ ch <- "f"
+ }
+ Deps(f)
+
+ res := <-ch + <-ch + <-ch
+
+ if res != "hgf" {
+ t.Fatal("expected h then g then f to run, but got " + res)
+ }
+}
+
+func TestSerialDeps(t *testing.T) {
+ ch := make(chan string, 3)
+ // this->f->g->h
+ h := func() {
+ ch <- "h"
+ }
+ g := func() {
+ ch <- "g"
+ }
+ f := func() {
+ SerialDeps(g, h)
+ ch <- "f"
+ }
+ Deps(f)
+
+ res := <-ch + <-ch + <-ch
+
+ if res != "ghf" {
+ t.Fatal("expected g then h then f to run, but got " + res)
+ }
+}
+
+func TestDepError(t *testing.T) {
+ // TODO: this test is ugly and relies on implementation details. It should
+ // be recreated as a full-stack test.
+
+ f := func() error {
+ return errors.New("ouch!")
+ }
+ defer func() {
+ err := recover()
+ if err == nil {
+ t.Fatal("expected panic, but didn't get one")
+ }
+ actual := fmt.Sprint(err)
+ if "ouch!" != actual {
+ t.Fatalf(`expected to get "ouch!" but got "%s"`, actual)
+ }
+ }()
+ Deps(f)
+}
+
+func TestDepFatal(t *testing.T) {
+ f := func() error {
+ return Fatal(99, "ouch!")
+ }
+ defer func() {
+ v := recover()
+ if v == nil {
+ t.Fatal("expected panic, but didn't get one")
+ }
+ actual := fmt.Sprint(v)
+ if "ouch!" != actual {
+ t.Fatalf(`expected to get "ouch!" but got "%s"`, actual)
+ }
+ err, ok := v.(error)
+ if !ok {
+ t.Fatalf("expected recovered val to be error but was %T", v)
+ }
+ code := ExitStatus(err)
+ if code != 99 {
+ t.Fatalf("Expected exit status 99, but got %v", code)
+ }
+ }()
+ Deps(f)
+}
+
+func TestDepTwoFatal(t *testing.T) {
+ f := func() error {
+ return Fatal(99, "ouch!")
+ }
+ g := func() error {
+ return Fatal(11, "bang!")
+ }
+ defer func() {
+ v := recover()
+ if v == nil {
+ t.Fatal("expected panic, but didn't get one")
+ }
+ actual := fmt.Sprint(v)
+ // order is non-deterministic, so check for both orders
+ if "ouch!\nbang!" != actual && "bang!\nouch!" != actual {
+ t.Fatalf(`expected to get "ouch!" and "bang!" but got "%s"`, actual)
+ }
+ err, ok := v.(error)
+ if !ok {
+ t.Fatalf("expected recovered val to be error but was %T", v)
+ }
+ code := ExitStatus(err)
+ // two different error codes returns, so we give up and just use error
+ // code 1.
+ if code != 1 {
+ t.Fatalf("Expected exit status 1, but got %v", code)
+ }
+ }()
+ Deps(f, g)
+}
+
+func TestDepWithUnhandledFunc(t *testing.T) {
+ defer func() {
+ err := recover()
+ _, ok := err.(error)
+ if !ok {
+ t.Fatalf("Expected type error from panic")
+ }
+ }()
+ var NotValid func(string) string = func(a string) string {
+ return a
+ }
+ Deps(NotValid)
+}
+
+func TestDepsErrors(t *testing.T) {
+ buf := &bytes.Buffer{}
+ log := log.New(buf, "", 0)
+
+ h := func() error {
+ log.Println("running h")
+ return errors.New("oops")
+ }
+ g := func() {
+ Deps(h)
+ log.Println("running g")
+ }
+ f := func() {
+ Deps(g, h)
+ log.Println("running f")
+ }
+
+ defer func() {
+ err := recover()
+ if err == nil {
+ t.Fatal("expected f to panic")
+ }
+ if buf.String() != "running h\n" {
+ t.Fatalf("expected just h to run, but got\n%s", buf.String())
+ }
+ }()
+ f()
+}
diff --git a/vendor/github.com/magefile/mage/mg/errors.go b/vendor/github.com/magefile/mage/mg/errors.go
new file mode 100644
index 0000000..2dd780f
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mg/errors.go
@@ -0,0 +1,51 @@
+package mg
+
+import (
+ "errors"
+ "fmt"
+)
+
+type fatalErr struct {
+ code int
+ error
+}
+
+func (f fatalErr) ExitStatus() int {
+ return f.code
+}
+
+type exitStatus interface {
+ ExitStatus() int
+}
+
+// Fatal returns an error that will cause mage to print out the
+// given args and exit with the given exit code.
+func Fatal(code int, args ...interface{}) error {
+ return fatalErr{
+ code: code,
+ error: errors.New(fmt.Sprint(args...)),
+ }
+}
+
+// Fatalf returns an error that will cause mage to print out the
+// given message and exit with the given exit code.
+func Fatalf(code int, format string, args ...interface{}) error {
+ return fatalErr{
+ code: code,
+ error: fmt.Errorf(format, args...),
+ }
+}
+
+// ExitStatus queries the error for an exit status. If the error is nil, it
+// returns 0. If the error does not implement ExitStatus() int, it returns 1.
+// Otherwise it retiurns the value from ExitStatus().
+func ExitStatus(err error) int {
+ if err == nil {
+ return 0
+ }
+ exit, ok := err.(exitStatus)
+ if !ok {
+ return 1
+ }
+ return exit.ExitStatus()
+}
diff --git a/vendor/github.com/magefile/mage/mg/errors_test.go b/vendor/github.com/magefile/mage/mg/errors_test.go
new file mode 100644
index 0000000..ac5e68f
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mg/errors_test.go
@@ -0,0 +1,19 @@
+package mg
+
+import "testing"
+
+func TestFatalExit(t *testing.T) {
+ expected := 99
+ code := ExitStatus(Fatal(expected))
+ if code != expected {
+ t.Fatalf("Expected code %v but got %v", expected, code)
+ }
+}
+
+func TestFatalfExit(t *testing.T) {
+ expected := 99
+ code := ExitStatus(Fatalf(expected, "boo!"))
+ if code != expected {
+ t.Fatalf("Expected code %v but got %v", expected, code)
+ }
+}
diff --git a/vendor/github.com/magefile/mage/mg/funcs_test.go b/vendor/github.com/magefile/mage/mg/funcs_test.go
new file mode 100644
index 0000000..57c8d40
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mg/funcs_test.go
@@ -0,0 +1,94 @@
+package mg
+
+import (
+ "context"
+ "testing"
+)
+
+func TestFuncCheck(t *testing.T) {
+ // we can ignore errors here, since the error is always the same
+ // and the FuncType will be InvalidType if there's an error.
+ f, _ := funcCheck(func() {})
+ if f != voidType {
+ t.Errorf("expected func() to be a valid VoidType, but was %v", f)
+ }
+ f, _ = funcCheck(func() error { return nil })
+ if f != errorType {
+ t.Errorf("expected func() error to be a valid ErrorType, but was %v", f)
+ }
+ f, _ = funcCheck(func(context.Context) {})
+ if f != contextVoidType {
+ t.Errorf("expected func(context.Context) to be a valid ContextVoidType, but was %v", f)
+ }
+ f, _ = funcCheck(func(context.Context) error { return nil })
+ if f != contextErrorType {
+ t.Errorf("expected func(context.Context) error to be a valid ContextErrorType but was %v", f)
+ }
+
+ f, _ = funcCheck(Foo.Bare)
+ if f != namespaceVoidType {
+ t.Errorf("expected Foo.Bare to be a valid NamespaceVoidType but was %v", f)
+ }
+
+ f, _ = funcCheck(Foo.Error)
+ if f != namespaceErrorType {
+ t.Errorf("expected Foo.Error to be a valid NamespaceErrorType but was %v", f)
+ }
+ f, _ = funcCheck(Foo.BareCtx)
+ if f != namespaceContextVoidType {
+ t.Errorf("expected Foo.BareCtx to be a valid NamespaceContextVoidType but was %v", f)
+ }
+ f, _ = funcCheck(Foo.CtxError)
+ if f != namespaceContextErrorType {
+ t.Errorf("expected Foo.CtxError to be a valid NamespaceContextErrorType but was %v", f)
+ }
+
+ // Test the Invalid case
+ f, err := funcCheck(func(int) error { return nil })
+ if f != invalidType {
+ t.Errorf("expected func(int) error to be InvalidType but was %v", f)
+ }
+ if err == nil {
+ t.Error("expected func(int) error to not be a valid FuncType, but got nil error.")
+ }
+}
+
+type Foo Namespace
+
+func (Foo) Bare() {}
+
+func (Foo) Error() error { return nil }
+
+func (Foo) BareCtx(context.Context) {}
+
+func (Foo) CtxError(context.Context) error { return nil }
+
+func TestFuncTypeWrap(t *testing.T) {
+ func() {
+ defer func() {
+ err := recover()
+ if err == nil {
+ t.Fatal("Expected a panic, but didn't get one")
+ }
+ }()
+ if funcTypeWrap(voidType, func(i int) {}) != nil {
+ t.Errorf("expected func(int) to return nil")
+ }
+ }()
+
+ if funcTypeWrap(voidType, func() {}) == nil {
+ t.Errorf("expected func() to return a function")
+ }
+
+ if funcTypeWrap(errorType, func() error { return nil }) == nil {
+ t.Errorf("expected func() error to return a function")
+ }
+
+ if funcTypeWrap(contextVoidType, func(context.Context) {}) == nil {
+ t.Errorf("expected func(context.Context) to return a function")
+ }
+
+ if funcTypeWrap(contextErrorType, func(context.Context) error { return nil }) == nil {
+ t.Errorf("expected func(context.Context) error to return a function")
+ }
+}
diff --git a/vendor/github.com/magefile/mage/mg/runtime.go b/vendor/github.com/magefile/mage/mg/runtime.go
new file mode 100644
index 0000000..4dbe0b1
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mg/runtime.go
@@ -0,0 +1,89 @@
+package mg
+
+import (
+ "os"
+ "path/filepath"
+ "runtime"
+ "strconv"
+)
+
+// CacheEnv is the environment variable that users may set to change the
+// location where mage stores its compiled binaries.
+const CacheEnv = "MAGEFILE_CACHE"
+
+// VerboseEnv is the environment variable that indicates the user requested
+// verbose mode when running a magefile.
+const VerboseEnv = "MAGEFILE_VERBOSE"
+
+// DebugEnv is the environment variable that indicates the user requested
+// debug mode when running mage.
+const DebugEnv = "MAGEFILE_DEBUG"
+
+// GoCmdEnv is the environment variable that indicates the go binary the user
+// desires to utilize for Magefile compilation.
+const GoCmdEnv = "MAGEFILE_GOCMD"
+
+// IgnoreDefaultEnv is the environment variable that indicates the user requested
+// to ignore the default target specified in the magefile.
+const IgnoreDefaultEnv = "MAGEFILE_IGNOREDEFAULT"
+
+// HashFastEnv is the environment variable that indicates the user requested to
+// use a quick hash of magefiles to determine whether or not the magefile binary
+// needs to be rebuilt. This results in faster runtimes, but means that mage
+// will fail to rebuild if a dependency has changed. To force a rebuild, run
+// mage with the -f flag.
+const HashFastEnv = "MAGEFILE_HASHFAST"
+
+// Verbose reports whether a magefile was run with the verbose flag.
+func Verbose() bool {
+ b, _ := strconv.ParseBool(os.Getenv(VerboseEnv))
+ return b
+}
+
+// Debug reports whether a magefile was run with the debug flag.
+func Debug() bool {
+ b, _ := strconv.ParseBool(os.Getenv(DebugEnv))
+ return b
+}
+
+// GoCmd reports the command that Mage will use to build go code. By default mage runs
+// the "go" binary in the PATH.
+func GoCmd() string {
+ if cmd := os.Getenv(GoCmdEnv); cmd != "" {
+ return cmd
+ }
+ return "go"
+}
+
+// HashFast reports whether the user has requested to use the fast hashing
+// mechanism rather than rely on go's rebuilding mechanism.
+func HashFast() bool {
+ b, _ := strconv.ParseBool(os.Getenv(HashFastEnv))
+ return b
+}
+
+// IgnoreDefault reports whether the user has requested to ignore the default target
+// in the magefile.
+func IgnoreDefault() bool {
+ b, _ := strconv.ParseBool(os.Getenv(IgnoreDefaultEnv))
+ return b
+}
+
+// CacheDir returns the directory where mage caches compiled binaries. It
+// defaults to $HOME/.magefile, but may be overridden by the MAGEFILE_CACHE
+// environment variable.
+func CacheDir() string {
+ d := os.Getenv(CacheEnv)
+ if d != "" {
+ return d
+ }
+ switch runtime.GOOS {
+ case "windows":
+ return filepath.Join(os.Getenv("HOMEDRIVE"), os.Getenv("HOMEPATH"), "magefile")
+ default:
+ return filepath.Join(os.Getenv("HOME"), ".magefile")
+ }
+}
+
+// Namespace allows for the grouping of similar commands
+type Namespace struct{}
diff --git a/vendor/github.com/magefile/mage/parse/parse.go b/vendor/github.com/magefile/mage/parse/parse.go
new file mode 100644
index 0000000..ebe1775
--- /dev/null
+++ b/vendor/github.com/magefile/mage/parse/parse.go
@@ -0,0 +1,751 @@
+package parse
+
+import (
+ "errors"
+ "fmt"
+ "go/ast"
+ "go/doc"
+ "go/parser"
+ "go/token"
+ "io/ioutil"
+ "log"
+ "os"
+ "strings"
+ "time"
+
+ "github.com/magefile/mage/internal"
+)
+
+const importTag = "mage:import"
+
+var debug = log.New(ioutil.Discard, "DEBUG: ", log.Ltime|log.Lmicroseconds)
+
+// EnableDebug turns on debug logging.
+func EnableDebug() {
+ debug.SetOutput(os.Stderr)
+}
+
+// PkgInfo contains inforamtion about a package of files according to mage's
+// parsing rules.
+type PkgInfo struct {
+ AstPkg *ast.Package
+ DocPkg *doc.Package
+ Description string
+ Funcs []*Function
+ DefaultFunc *Function
+ Aliases map[string]*Function
+ Imports []*Import
+}
+
+// Function represented a job function from a mage file
+type Function struct {
+ PkgAlias string
+ Package string
+ ImportPath string
+ Name string
+ Receiver string
+ IsError bool
+ IsContext bool
+ Synopsis string
+ Comment string
+}
+
+// ID returns user-readable information about where this function is defined.
+func (f Function) ID() string {
+ path := ""
+ if f.ImportPath != "" {
+ path = f.ImportPath
+ }
+ receiver := ""
+ if f.Receiver != "" {
+ receiver = f.Receiver + "."
+ }
+ return fmt.Sprintf("%s.%s%s", path, receiver, f.Name)
+}
+
+// TargetName returns the name of the target as it should appear when used from
+// the mage cli. It is always lowercase.
+func (f Function) TargetName() string {
+ var names []string
+
+ for _, s := range []string{f.PkgAlias, f.Receiver, f.Name} {
+ if s != "" {
+ names = append(names, s)
+ }
+ }
+ return strings.Join(names, ":")
+}
+
+// ExecCode returns code for the template switch to run the target.
+// It wraps each target call to match the func(context.Context) error that
+// runTarget requires.
+func (f Function) ExecCode() (string, error) {
+ name := f.Name
+ if f.Receiver != "" {
+ name = f.Receiver + "{}." + name
+ }
+ if f.Package != "" {
+ name = f.Package + "." + name
+ }
+
+ if f.IsContext && f.IsError {
+ out := `
+ wrapFn := func(ctx context.Context) error {
+ return %s(ctx)
+ }
+ err := runTarget(wrapFn)`[1:]
+ return fmt.Sprintf(out, name), nil
+ }
+ if f.IsContext && !f.IsError {
+ out := `
+ wrapFn := func(ctx context.Context) error {
+ %s(ctx)
+ return nil
+ }
+ err := runTarget(wrapFn)`[1:]
+ return fmt.Sprintf(out, name), nil
+ }
+ if !f.IsContext && f.IsError {
+ out := `
+ wrapFn := func(ctx context.Context) error {
+ return %s()
+ }
+ err := runTarget(wrapFn)`[1:]
+ return fmt.Sprintf(out, name), nil
+ }
+ if !f.IsContext && !f.IsError {
+ out := `
+ wrapFn := func(ctx context.Context) error {
+ %s()
+ return nil
+ }
+ err := runTarget(wrapFn)`[1:]
+ return fmt.Sprintf(out, name), nil
+ }
+ return "", fmt.Errorf("Error formatting ExecCode code for %#v", f)
+}
+
+// PrimaryPackage parses a package. If files is non-empty, it will only parse the files given.
+func PrimaryPackage(gocmd, path string, files []string) (*PkgInfo, error) {
+ info, err := Package(path, files)
+ if err != nil {
+ return nil, err
+ }
+
+ if err := setImports(gocmd, info); err != nil {
+ return nil, err
+ }
+
+ setDefault(info)
+ setAliases(info)
+ return info, nil
+}
+
+func checkDupes(info *PkgInfo, imports []*Import) error {
+ funcs := map[string][]*Function{}
+ for _, f := range info.Funcs {
+ funcs[strings.ToLower(f.TargetName())] = append(funcs[strings.ToLower(f.TargetName())], f)
+ }
+ for _, imp := range imports {
+ for _, f := range imp.Info.Funcs {
+ target := strings.ToLower(f.TargetName())
+ funcs[target] = append(funcs[target], f)
+ }
+ }
+ for alias, f := range info.Aliases {
+ if len(funcs[alias]) != 0 {
+ var ids []string
+ for _, f := range funcs[alias] {
+ ids = append(ids, f.ID())
+ }
+ return fmt.Errorf("alias %q duplicates existing target(s): %s\n", alias, strings.Join(ids, ", "))
+ }
+ funcs[alias] = append(funcs[alias], f)
+ }
+ var dupes []string
+ for target, list := range funcs {
+ if len(list) > 1 {
+ dupes = append(dupes, target)
+ }
+ }
+ if len(dupes) == 0 {
+ return nil
+ }
+ errs := make([]string, 0, len(dupes))
+ for _, d := range dupes {
+ var ids []string
+ for _, f := range funcs[d] {
+ ids = append(ids, f.ID())
+ }
+ errs = append(errs, fmt.Sprintf("%q target has multiple definitions: %s\n", d, strings.Join(ids, ", ")))
+ }
+ return errors.New(strings.Join(errs, "\n"))
+}
+
+// Package compiles information about a mage package.
+func Package(path string, files []string) (*PkgInfo, error) {
+ start := time.Now()
+ defer func() {
+ debug.Println("time parse Magefiles:", time.Since(start))
+ }()
+ fset := token.NewFileSet()
+ pkg, err := getPackage(path, files, fset)
+ if err != nil {
+ return nil, err
+ }
+ p := doc.New(pkg, "./", 0)
+ pi := &PkgInfo{
+ AstPkg: pkg,
+ DocPkg: p,
+ Description: toOneLine(p.Doc),
+ }
+
+ setNamespaces(pi)
+ setFuncs(pi)
+
+ hasDupes, names := checkDupeTargets(pi)
+ if hasDupes {
+ msg := "Build targets must be case insensitive, thus the following targets conflict:\n"
+ for _, v := range names {
+ if len(v) > 1 {
+ msg += " " + strings.Join(v, ", ") + "\n"
+ }
+ }
+ return nil, errors.New(msg)
+ }
+
+ return pi, nil
+}
+
+func getNamedImports(gocmd string, pkgs map[string]string) ([]*Import, error) {
+ var imports []*Import
+ for alias, pkg := range pkgs {
+ debug.Printf("getting import package %q, alias %q", pkg, alias)
+ imp, err := getImport(gocmd, pkg, alias)
+ if err != nil {
+ return nil, err
+ }
+ imports = append(imports, imp)
+ }
+ return imports, nil
+}
+
+func getImport(gocmd, importpath, alias string) (*Import, error) {
+ out, err := internal.OutputDebug(gocmd, "list", "-f", "{{.Dir}}||{{.Name}}", importpath)
+ if err != nil {
+ return nil, err
+ }
+ parts := strings.Split(out, "||")
+ if len(parts) != 2 {
+ return nil, fmt.Errorf("incorrect data from go list: %s", out)
+ }
+ dir, name := parts[0], parts[1]
+ debug.Printf("parsing imported package %q from dir %q", importpath, dir)
+ info, err := Package(dir, nil)
+ if err != nil {
+ return nil, err
+ }
+ for i := range info.Funcs {
+ debug.Printf("setting alias %q and package %q on func %v", alias, name, info.Funcs[i].Name)
+ info.Funcs[i].PkgAlias = alias
+ info.Funcs[i].ImportPath = importpath
+ }
+ return &Import{Alias: alias, Name: name, Path: importpath, Info: *info}, nil
+}
+
+type Import struct {
+ Alias string
+ Name string
+ UniqueName string // a name unique across all imports
+ Path string
+ Info PkgInfo
+}
+
+func setFuncs(pi *PkgInfo) {
+ for _, f := range pi.DocPkg.Funcs {
+ if f.Recv != "" {
+ debug.Printf("skipping method %s.%s", f.Recv, f.Name)
+ // skip methods
+ continue
+ }
+ if !ast.IsExported(f.Name) {
+ debug.Printf("skipping non-exported function %s", f.Name)
+ // skip non-exported functions
+ continue
+ }
+ if typ := funcType(f.Decl.Type); typ != invalidType {
+ debug.Printf("found target %v", f.Name)
+ pi.Funcs = append(pi.Funcs, &Function{
+ Name: f.Name,
+ Comment: toOneLine(f.Doc),
+ Synopsis: sanitizeSynopsis(f),
+ IsError: typ == errorType || typ == contextErrorType,
+ IsContext: typ == contextVoidType || typ == contextErrorType,
+ })
+ } else {
+ debug.Printf("skipping function with invalid signature func %s(%v)(%v)", f.Name, fieldNames(f.Decl.Type.Params), fieldNames(f.Decl.Type.Results))
+ }
+ }
+}
+
+func setNamespaces(pi *PkgInfo) {
+ for _, t := range pi.DocPkg.Types {
+ if !isNamespace(t) {
+ continue
+ }
+ debug.Printf("found namespace %s %s", pi.DocPkg.ImportPath, t.Name)
+ for _, f := range t.Methods {
+ if !ast.IsExported(f.Name) {
+ continue
+ }
+ typ := funcType(f.Decl.Type)
+ if typ == invalidType {
+ continue
+ }
+ debug.Printf("found namespace method %s %s.%s", pi.DocPkg.ImportPath, t.Name, f.Name)
+ pi.Funcs = append(pi.Funcs, &Function{
+ Name: f.Name,
+ Receiver: t.Name,
+ Comment: toOneLine(f.Doc),
+ Synopsis: sanitizeSynopsis(f),
+ IsError: typ == errorType || typ == contextErrorType,
+ IsContext: typ == contextVoidType || typ == contextErrorType,
+ })
+ }
+ }
+}
+
+func setImports(gocmd string, pi *PkgInfo) error {
+ importNames := map[string]string{}
+ rootImports := []string{}
+ for _, f := range pi.AstPkg.Files {
+ for _, d := range f.Decls {
+ gen, ok := d.(*ast.GenDecl)
+ if !ok || gen.Tok != token.IMPORT {
+ continue
+ }
+ for j := 0; j < len(gen.Specs); j++ {
+ spec := gen.Specs[j]
+ impspec := spec.(*ast.ImportSpec)
+ if len(gen.Specs) == 1 && gen.Lparen == token.NoPos && impspec.Doc == nil {
+ impspec.Doc = gen.Doc
+ }
+ name, alias, ok := getImportPath(impspec)
+ if !ok {
+ continue
+ }
+ if alias != "" {
+ debug.Printf("found %s: %s (%s)", importTag, name, alias)
+ if importNames[alias] != "" {
+ return fmt.Errorf("duplicate import alias: %q", alias)
+ }
+ importNames[alias] = name
+ } else {
+ debug.Printf("found %s: %s", importTag, name)
+ rootImports = append(rootImports, name)
+ }
+ }
+ }
+ }
+ imports, err := getNamedImports(gocmd, importNames)
+ if err != nil {
+ return err
+ }
+ for _, s := range rootImports {
+ imp, err := getImport(gocmd, s, "")
+ if err != nil {
+ return err
+ }
+ imports = append(imports, imp)
+ }
+ if err := checkDupes(pi, imports); err != nil {
+ return err
+ }
+
+ // have to set unique package names on imports
+ used := map[string]bool{}
+ for _, imp := range imports {
+ unique := imp.Name + "_mageimport"
+ x := 1
+ for used[unique] {
+ unique = fmt.Sprintf("%s_mageimport%d", imp.Name, x)
+ x++
+ }
+ used[unique] = true
+ imp.UniqueName = unique
+ for _, f := range imp.Info.Funcs {
+ f.Package = unique
+ }
+ }
+ pi.Imports = imports
+ return nil
+}
+
+func getImportPath(imp *ast.ImportSpec) (path, alias string, ok bool) {
+ if imp.Doc == nil || len(imp.Doc.List) == 9 {
+ return "", "", false
+ }
+ // import is always the last comment
+ s := imp.Doc.List[len(imp.Doc.List)-1].Text
+
+ // trim comment start and normalize for anyone who has spaces or not between
+ // "//"" and the text
+ vals := strings.Fields(strings.ToLower(s[2:]))
+ if len(vals) == 0 {
+ return "", "", false
+ }
+ if vals[0] != importTag {
+ return "", "", false
+ }
+ path, ok = lit2string(imp.Path)
+ if !ok {
+ return "", "", false
+ }
+
+ switch len(vals) {
+ case 1:
+ // just the import tag, this is a root import
+ return path, "", true
+ case 2:
+ // also has an alias
+ return path, vals[1], true
+ default:
+ log.Println("warning: ignoring malformed", importTag, "for import", path)
+ return "", "", false
+ }
+}
+
+func isNamespace(t *doc.Type) bool {
+ if len(t.Decl.Specs) != 1 {
+ return false
+ }
+ id, ok := t.Decl.Specs[0].(*ast.TypeSpec)
+ if !ok {
+ return false
+ }
+ sel, ok := id.Type.(*ast.SelectorExpr)
+ if !ok {
+ return false
+ }
+ ident, ok := sel.X.(*ast.Ident)
+ if !ok {
+ return false
+ }
+ return ident.Name == "mg" && sel.Sel.Name == "Namespace"
+}
+
+func fieldNames(flist *ast.FieldList) string {
+ if flist == nil {
+ return ""
+ }
+ list := flist.List
+ if len(list) == 0 {
+ return ""
+ }
+ args := make([]string, 0, len(list))
+ for _, f := range list {
+ names := make([]string, 0, len(f.Names))
+ for _, n := range f.Names {
+ if n.Name != "" {
+ names = append(names, n.Name)
+ }
+ }
+ nms := strings.Join(names, ", ")
+ if nms != "" {
+ nms += " "
+ }
+ args = append(args, nms+fmt.Sprint(f.Type))
+ }
+ return strings.Join(args, ", ")
+}
+
+// checkDupeTargets checks a package for duplicate target names.
+func checkDupeTargets(info *PkgInfo) (hasDupes bool, names map[string][]string) {
+ names = map[string][]string{}
+ lowers := map[string]bool{}
+ for _, f := range info.Funcs {
+ low := strings.ToLower(f.Name)
+ if f.Receiver != "" {
+ low = strings.ToLower(f.Receiver) + ":" + low
+ }
+ if lowers[low] {
+ hasDupes = true
+ }
+ lowers[low] = true
+ names[low] = append(names[low], f.Name)
+ }
+ return hasDupes, names
+}
+
+// sanitizeSynopsis sanitizes function Doc to create a summary.
+func sanitizeSynopsis(f *doc.Func) string {
+ synopsis := doc.Synopsis(f.Doc)
+
+ // If the synopsis begins with the function name, remove it. This is done to
+ // not repeat the text.
+ // From:
+ // clean Clean removes the temporarily generated files
+ // To:
+ // clean removes the temporarily generated files
+ if syns := strings.Split(synopsis, " "); strings.EqualFold(f.Name, syns[0]) {
+ return strings.Join(syns[1:], " ")
+ }
+
+ return synopsis
+}
+
+func setDefault(pi *PkgInfo) {
+ for _, v := range pi.DocPkg.Vars {
+ for x, name := range v.Names {
+ if name != "Default" {
+ continue
+ }
+ spec := v.Decl.Specs[x].(*ast.ValueSpec)
+ if len(spec.Values) != 1 {
+ log.Println("warning: default declaration has multiple values")
+ }
+
+ f, err := getFunction(spec.Values[0], pi)
+ if err != nil {
+ log.Println("warning, default declaration malformed:", err)
+ return
+ }
+ pi.DefaultFunc = f
+ return
+ }
+ }
+}
+
+func lit2string(l *ast.BasicLit) (string, bool) {
+ if !strings.HasPrefix(l.Value, `"`) || !strings.HasSuffix(l.Value, `"`) {
+ return "", false
+ }
+ return strings.Trim(l.Value, `"`), true
+}
+
+func setAliases(pi *PkgInfo) {
+ for _, v := range pi.DocPkg.Vars {
+ for x, name := range v.Names {
+ if name != "Aliases" {
+ continue
+ }
+ spec, ok := v.Decl.Specs[x].(*ast.ValueSpec)
+ if !ok {
+ log.Println("warning: aliases declaration is not a value")
+ return
+ }
+ if len(spec.Values) != 1 {
+ log.Println("warning: aliases declaration has multiple values")
+ }
+ comp, ok := spec.Values[0].(*ast.CompositeLit)
+ if !ok {
+ log.Println("warning: aliases declaration is not a map")
+ return
+ }
+ pi.Aliases = map[string]*Function{}
+ for _, elem := range comp.Elts {
+ kv, ok := elem.(*ast.KeyValueExpr)
+ if !ok {
+ log.Printf("warning: alias declaration %q is not a map element", elem)
+ continue
+ }
+ k, ok := kv.Key.(*ast.BasicLit)
+ if !ok || k.Kind != token.STRING {
+ log.Printf("warning: alias key is not a string literal %q", elem)
+ continue
+ }
+
+ alias, ok := lit2string(k)
+ if !ok {
+ log.Println("warning: malformed name for alias", elem)
+ continue
+ }
+ f, err := getFunction(kv.Value, pi)
+ if err != nil {
+ log.Printf("warning, alias malformed: %v", err)
+ continue
+ }
+ pi.Aliases[alias] = f
+ }
+ return
+ }
+ }
+}
+
+func getFunction(exp ast.Expr, pi *PkgInfo) (*Function, error) {
+
+ // selector expressions are in LIFO format.
+ // So, in foo.bar.baz the first selector.Name is
+ // actually "baz", the second is "bar", and the last is "foo"
+
+ var pkg, receiver, funcname string
+ switch v := exp.(type) {
+ case *ast.Ident:
+ // "foo" : Bar
+ funcname = v.Name
+ case *ast.SelectorExpr:
+ // need to handle
+ // namespace.Func
+ // import.Func
+ // import.namespace.Func
+
+ // "foo" : ?.bar
+ funcname = v.Sel.Name
+ switch x := v.X.(type) {
+ case *ast.Ident:
+ // "foo" : baz.bar
+ // this is either a namespace or package
+ firstname := x.Name
+ for _, f := range pi.Funcs {
+ if firstname == f.Receiver && funcname == f.Name {
+ return f, nil
+ }
+ }
+ // not a namespace, let's try imported packages
+ for _, imp := range pi.Imports {
+ if firstname == imp.Name {
+ for _, f := range imp.Info.Funcs {
+ if funcname == f.Name {
+ return f, nil
+ }
+ }
+ break
+ }
+ }
+ return nil, fmt.Errorf("%q is not a known target", exp)
+ case *ast.SelectorExpr:
+ // "foo" : bar.Baz.Bat
+ // must be package.Namespace.Func
+ sel, ok := v.X.(*ast.SelectorExpr)
+ if !ok {
+ return nil, fmt.Errorf("%q is must denote a target function but was %T", exp, v.X)
+ }
+ receiver = sel.Sel.Name
+ id, ok := sel.X.(*ast.Ident)
+ if !ok {
+ return nil, fmt.Errorf("%q is must denote a target function but was %T", exp, v.X)
+ }
+ pkg = id.Name
+ default:
+ return nil, fmt.Errorf("%q is not valid", exp)
+ }
+ default:
+ return nil, fmt.Errorf("target %s is not a function", exp)
+ }
+ if pkg == "" {
+ for _, f := range pi.Funcs {
+ if f.Name == funcname && f.Receiver == receiver {
+ return f, nil
+ }
+ }
+ return nil, fmt.Errorf("unknown function %s.%s", receiver, funcname)
+ }
+ for _, imp := range pi.Imports {
+ if imp.Name == pkg {
+ for _, f := range imp.Info.Funcs {
+ if f.Name == funcname && f.Receiver == receiver {
+ return f, nil
+ }
+ }
+ return nil, fmt.Errorf("unknown function %s.%s.%s", pkg, receiver, funcname)
+ }
+ }
+ return nil, fmt.Errorf("unknown package for function %q", exp)
+}
+
+// getPackage returns the non-test package at the given path.
+func getPackage(path string, files []string, fset *token.FileSet) (*ast.Package, error) {
+ var filter func(f os.FileInfo) bool
+ if len(files) > 0 {
+ fm := make(map[string]bool, len(files))
+ for _, f := range files {
+ fm[f] = true
+ }
+
+ filter = func(f os.FileInfo) bool {
+ return fm[f.Name()]
+ }
+ }
+
+ pkgs, err := parser.ParseDir(fset, path, filter, parser.ParseComments)
+ if err != nil {
+ return nil, fmt.Errorf("failed to parse directory: %v", err)
+ }
+
+ for name, pkg := range pkgs {
+ if !strings.HasSuffix(name, "_test") {
+ return pkg, nil
+ }
+ }
+ return nil, fmt.Errorf("no non-test packages found in %s", path)
+}
+
+func hasContextParam(ft *ast.FuncType) bool {
+ if ft.Params.NumFields() != 1 {
+ return false
+ }
+ ret := ft.Params.List[0]
+ sel, ok := ret.Type.(*ast.SelectorExpr)
+ if !ok {
+ return false
+ }
+ pkg, ok := sel.X.(*ast.Ident)
+ if !ok {
+ return false
+ }
+ if pkg.Name != "context" {
+ return false
+ }
+ return sel.Sel.Name == "Context"
+}
+
+func hasVoidReturn(ft *ast.FuncType) bool {
+ res := ft.Results
+ return res.NumFields() == 0
+}
+
+func hasErrorReturn(ft *ast.FuncType) bool {
+ res := ft.Results
+ if res.NumFields() != 1 {
+ return false
+ }
+ ret := res.List[0]
+ if len(ret.Names) > 1 {
+ return false
+ }
+ return fmt.Sprint(ret.Type) == "error"
+}
+
+type functype int
+
+const (
+ invalidType functype = iota
+ voidType
+ errorType
+ contextVoidType
+ contextErrorType
+)
+
+func funcType(ft *ast.FuncType) functype {
+ if hasContextParam(ft) {
+ if hasVoidReturn(ft) {
+ return contextVoidType
+ }
+ if hasErrorReturn(ft) {
+ return contextErrorType
+ }
+ }
+ if ft.Params.NumFields() == 0 {
+ if hasVoidReturn(ft) {
+ return voidType
+ }
+ if hasErrorReturn(ft) {
+ return errorType
+ }
+ }
+ return invalidType
+}
+
+func toOneLine(s string) string {
+ return strings.TrimSpace(strings.Replace(s, "\n", " ", -1))
+}
diff --git a/vendor/github.com/magefile/mage/parse/parse_test.go b/vendor/github.com/magefile/mage/parse/parse_test.go
new file mode 100644
index 0000000..039039a
--- /dev/null
+++ b/vendor/github.com/magefile/mage/parse/parse_test.go
@@ -0,0 +1,96 @@
+package parse
+
+import (
+ "reflect"
+ "testing"
+)
+
+func TestParse(t *testing.T) {
+ info, err := PrimaryPackage("go", "./testdata", []string{"func.go", "command.go", "alias.go", "repeating_synopsis.go", "subcommands.go"})
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ expected := []Function{
+ {
+ Name: "ReturnsNilError",
+ IsError: true,
+ Comment: "Synopsis for \"returns\" error. And some more text.",
+ Synopsis: `Synopsis for "returns" error.`,
+ },
+ {
+ Name: "ReturnsVoid",
+ },
+ {
+ Name: "TakesContextReturnsError",
+ IsError: true,
+ IsContext: true,
+ },
+ {
+ Name: "TakesContextReturnsVoid",
+ IsError: false,
+ IsContext: true,
+ },
+ {
+ Name: "RepeatingSynopsis",
+ IsError: true,
+ Comment: "RepeatingSynopsis chops off the repeating function name. Some more text.",
+ Synopsis: "chops off the repeating function name.",
+ },
+ {
+ Name: "Foobar",
+ Receiver: "Build",
+ IsError: true,
+ },
+ {
+ Name: "Baz",
+ Receiver: "Build",
+ IsError: false,
+ },
+ }
+
+ if info.DefaultFunc == nil {
+ t.Fatal("expected default func to exist, but was nil")
+ }
+
+ // DefaultIsError
+ if info.DefaultFunc.IsError != true {
+ t.Fatalf("expected DefaultIsError to be true")
+ }
+
+ // DefaultName
+ if info.DefaultFunc.Name != "ReturnsNilError" {
+ t.Fatalf("expected DefaultName to be ReturnsNilError")
+ }
+
+ if info.Aliases["void"].Name != "ReturnsVoid" {
+ t.Fatalf("expected alias of void to be ReturnsVoid")
+ }
+
+ f, ok := info.Aliases["baz"]
+ if !ok {
+ t.Fatal("missing alias baz")
+ }
+ if f.Name != "Baz" || f.Receiver != "Build" {
+ t.Fatalf("expected alias of void to be Build.Baz")
+ }
+
+ if len(info.Aliases) != 2 {
+ t.Fatalf("expected to only have two aliases, but have %#v", info.Aliases)
+ }
+
+ for _, fn := range expected {
+ found := false
+ for _, infoFn := range info.Funcs {
+ if reflect.DeepEqual(fn, *infoFn) {
+ found = true
+ break
+ } else {
+ t.Logf("%#v", infoFn)
+ }
+ }
+ if !found {
+ t.Fatalf("expected:\n%#v\n\nto be in:\n%#v", fn, info.Funcs)
+ }
+ }
+}
diff --git a/vendor/github.com/magefile/mage/parse/testdata/alias.go b/vendor/github.com/magefile/mage/parse/testdata/alias.go
new file mode 100644
index 0000000..0c5d313
--- /dev/null
+++ b/vendor/github.com/magefile/mage/parse/testdata/alias.go
@@ -0,0 +1,8 @@
+// +build mage
+
+package main
+
+var Aliases = map[string]interface{}{
+ "void": ReturnsVoid,
+ "baz": Build.Baz,
+}
diff --git a/vendor/github.com/magefile/mage/parse/testdata/command.go b/vendor/github.com/magefile/mage/parse/testdata/command.go
new file mode 100644
index 0000000..d8e6f74
--- /dev/null
+++ b/vendor/github.com/magefile/mage/parse/testdata/command.go
@@ -0,0 +1,33 @@
+// +build mage
+
+package main
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/magefile/mage/mg"
+)
+
+// This should work as a default - even if it's in a different file
+var Default = ReturnsNilError
+
+// this should not be a target because it returns a string
+func ReturnsString() string {
+ fmt.Println("more stuff")
+ return ""
+}
+
+func ReturnsVoid() {
+ mg.Deps(f)
+}
+
+func f() {}
+
+func TakesContextReturnsVoid(ctx context.Context) {
+
+}
+
+func TakesContextReturnsError(ctx context.Context) error {
+ return nil
+}
diff --git a/vendor/github.com/magefile/mage/parse/testdata/func.go b/vendor/github.com/magefile/mage/parse/testdata/func.go
new file mode 100644
index 0000000..9492775
--- /dev/null
+++ b/vendor/github.com/magefile/mage/parse/testdata/func.go
@@ -0,0 +1,14 @@
+// +build mage
+
+package main
+
+import "fmt"
+
+// Synopsis for "returns" error.
+// And some more text.
+func ReturnsNilError() error {
+ fmt.Println("stuff")
+ return nil
+}
+
+func nonexported() {}
diff --git a/vendor/github.com/magefile/mage/parse/testdata/repeating_synopsis.go b/vendor/github.com/magefile/mage/parse/testdata/repeating_synopsis.go
new file mode 100644
index 0000000..bcac14d
--- /dev/null
+++ b/vendor/github.com/magefile/mage/parse/testdata/repeating_synopsis.go
@@ -0,0 +1,9 @@
+// +build mage
+
+package main
+
+// RepeatingSynopsis chops off the repeating function name.
+// Some more text.
+func RepeatingSynopsis() error {
+ return nil
+}
diff --git a/vendor/github.com/magefile/mage/parse/testdata/subcommand_1.9.go b/vendor/github.com/magefile/mage/parse/testdata/subcommand_1.9.go
new file mode 100644
index 0000000..21d1d95
--- /dev/null
+++ b/vendor/github.com/magefile/mage/parse/testdata/subcommand_1.9.go
@@ -0,0 +1,7 @@
+//+build mage,go1.9
+
+package main
+
+// this causes a panic defined in issue #126
+// Note this is only valid in go 1.9+, thus the additional build tag above.
+type Foo = map[string]string
diff --git a/vendor/github.com/magefile/mage/parse/testdata/subcommands.go b/vendor/github.com/magefile/mage/parse/testdata/subcommands.go
new file mode 100644
index 0000000..4eb31bd
--- /dev/null
+++ b/vendor/github.com/magefile/mage/parse/testdata/subcommands.go
@@ -0,0 +1,23 @@
+// +build mage
+
+package main
+
+import "github.com/magefile/mage/mg"
+
+type Build mg.Namespace
+
+func (Build) Foobar() error {
+ // do your foobar build
+ return nil
+}
+
+func (Build) Baz() {
+ // do your baz build
+}
+
+type Init mg.Namespace
+
+func (Init) Foobar() error {
+ // do your foobar defined in init namespace
+ return nil
+}
diff --git a/vendor/github.com/magefile/mage/sh/cmd.go b/vendor/github.com/magefile/mage/sh/cmd.go
new file mode 100644
index 0000000..fd8ba52
--- /dev/null
+++ b/vendor/github.com/magefile/mage/sh/cmd.go
@@ -0,0 +1,171 @@
+package sh
+
+import (
+ "bytes"
+ "fmt"
+ "io"
+ "log"
+ "os"
+ "os/exec"
+ "strings"
+
+ "github.com/magefile/mage/mg"
+)
+
+// RunCmd returns a function that will call Run with the given command. This is
+// useful for creating command aliases to make your scripts easier to read, like
+// this:
+//
+// // in a helper file somewhere
+// var g0 = sh.RunCmd("go") // go is a keyword :(
+//
+// // somewhere in your main code
+// if err := g0("install", "github.com/gohugo/hugo"); err != nil {
+// return err
+// }
+//
+// Args passed to command get baked in as args to the command when you run it.
+// Any args passed in when you run the returned function will be appended to the
+// original args. For example, this is equivalent to the above:
+//
+// var goInstall = sh.RunCmd("go", "install") goInstall("github.com/gohugo/hugo")
+//
+// RunCmd uses Exec underneath, so see those docs for more details.
+func RunCmd(cmd string, args ...string) func(args ...string) error {
+ return func(args2 ...string) error {
+ return Run(cmd, append(args, args2...)...)
+ }
+}
+
+// OutCmd is like RunCmd except the command returns the output of the
+// command.
+func OutCmd(cmd string, args ...string) func(args ...string) (string, error) {
+ return func(args2 ...string) (string, error) {
+ return Output(cmd, append(args, args2...)...)
+ }
+}
+
+// Run is like RunWith, but doesn't specify any environment variables.
+func Run(cmd string, args ...string) error {
+ return RunWith(nil, cmd, args...)
+}
+
+// RunV is like Run, but always sends the command's stdout to os.Stdout.
+func RunV(cmd string, args ...string) error {
+ _, err := Exec(nil, os.Stdout, os.Stderr, cmd, args...)
+ return err
+}
+
+// RunWith runs the given command, directing stderr to this program's stderr and
+// printing stdout to stdout if mage was run with -v. It adds adds env to the
+// environment variables for the command being run. Environment variables should
+// be in the format name=value.
+func RunWith(env map[string]string, cmd string, args ...string) error {
+ var output io.Writer
+ if mg.Verbose() {
+ output = os.Stdout
+ }
+ _, err := Exec(env, output, os.Stderr, cmd, args...)
+ return err
+}
+
+// Output runs the command and returns the text from stdout.
+func Output(cmd string, args ...string) (string, error) {
+ buf := &bytes.Buffer{}
+ _, err := Exec(nil, buf, os.Stderr, cmd, args...)
+ return strings.TrimSuffix(buf.String(), "\n"), err
+}
+
+// OutputWith is like RunWith, but returns what is written to stdout.
+func OutputWith(env map[string]string, cmd string, args ...string) (string, error) {
+ buf := &bytes.Buffer{}
+ _, err := Exec(env, buf, os.Stderr, cmd, args...)
+ return strings.TrimSuffix(buf.String(), "\n"), err
+}
+
+// Exec executes the command, piping its stderr to mage's stderr and
+// piping its stdout to the given writer. If the command fails, it will return
+// an error that, if returned from a target or mg.Deps call, will cause mage to
+// exit with the same code as the command failed with. Env is a list of
+// environment variables to set when running the command, these override the
+// current environment variables set (which are also passed to the command). cmd
+// and args may include references to environment variables in $FOO format, in
+// which case these will be expanded before the command is run.
+//
+// Ran reports if the command ran (rather than was not found or not executable).
+// Code reports the exit code the command returned if it ran. If err == nil, ran
+// is always true and code is always 0.
+func Exec(env map[string]string, stdout, stderr io.Writer, cmd string, args ...string) (ran bool, err error) {
+ expand := func(s string) string {
+ s2, ok := env[s]
+ if ok {
+ return s2
+ }
+ return os.Getenv(s)
+ }
+ cmd = os.Expand(cmd, expand)
+ for i := range args {
+ args[i] = os.Expand(args[i], expand)
+ }
+ ran, code, err := run(env, stdout, stderr, cmd, args...)
+ if err == nil {
+ return true, nil
+ }
+ if ran {
+ return ran, mg.Fatalf(code, `running "%s %s" failed with exit code %d`, cmd, strings.Join(args, " "), code)
+ }
+ return ran, fmt.Errorf(`failed to run "%s %s: %v"`, cmd, strings.Join(args, " "), err)
+}
+
+func run(env map[string]string, stdout, stderr io.Writer, cmd string, args ...string) (ran bool, code int, err error) {
+ c := exec.Command(cmd, args...)
+ c.Env = os.Environ()
+ for k, v := range env {
+ c.Env = append(c.Env, k+"="+v)
+ }
+ c.Stderr = stderr
+ c.Stdout = stdout
+ c.Stdin = os.Stdin
+ log.Println("exec:", cmd, strings.Join(args, " "))
+ err = c.Run()
+ return CmdRan(err), ExitStatus(err), err
+}
+
+// CmdRan examines the error to determine if it was generated as a result of a
+// command running via os/exec.Command. If the error is nil, or the command ran
+// (even if it exited with a non-zero exit code), CmdRan reports true. If the
+// error is an unrecognized type, or it is an error from exec.Command that says
+// the command failed to run (usually due to the command not existing or not
+// being executable), it reports false.
+func CmdRan(err error) bool {
+ if err == nil {
+ return true
+ }
+ ee, ok := err.(*exec.ExitError)
+ if ok {
+ return ee.Exited()
+ }
+ return false
+}
+
+type exitStatus interface {
+ ExitStatus() int
+}
+
+// ExitStatus returns the exit status of the error if it is an exec.ExitError
+// or if it implements ExitStatus() int.
+// 0 if it is nil or 1 if it is a different error.
+func ExitStatus(err error) int {
+ if err == nil {
+ return 0
+ }
+ if e, ok := err.(exitStatus); ok {
+ return e.ExitStatus()
+ }
+ if e, ok := err.(*exec.ExitError); ok {
+ if ex, ok := e.Sys().(exitStatus); ok {
+ return ex.ExitStatus()
+ }
+ }
+ return 1
+}
diff --git a/vendor/github.com/magefile/mage/sh/cmd_test.go b/vendor/github.com/magefile/mage/sh/cmd_test.go
new file mode 100644
index 0000000..c2f5d04
--- /dev/null
+++ b/vendor/github.com/magefile/mage/sh/cmd_test.go
@@ -0,0 +1,72 @@
+package sh
+
+import (
+ "bytes"
+ "os"
+ "testing"
+)
+
+func TestOutCmd(t *testing.T) {
+ cmd := OutCmd(os.Args[0], "-printArgs", "foo", "bar")
+ out, err := cmd("baz", "bat")
+ if err != nil {
+ t.Fatal(err)
+ }
+ expected := "[foo bar baz bat]"
+ if out != expected {
+ t.Fatalf("expected %q but got %q", expected, out)
+ }
+}
+
+func TestExitCode(t *testing.T) {
+ ran, err := Exec(nil, nil, nil, os.Args[0], "-helper", "-exit", "99")
+ if err == nil {
+ t.Fatal("unexpected nil error from run")
+ }
+ if !ran {
+ t.Errorf("ran returned as false, but should have been true")
+ }
+ code := ExitStatus(err)
+ if code != 99 {
+ t.Fatalf("expected exit status 99, but got %v", code)
+ }
+}
+
+func TestEnv(t *testing.T) {
+ env := "SOME_REALLY_LONG_MAGEFILE_SPECIFIC_THING"
+ out := &bytes.Buffer{}
+ ran, err := Exec(map[string]string{env: "foobar"}, out, nil, os.Args[0], "-printVar", env)
+ if err != nil {
+ t.Fatalf("unexpected error from runner: %#v", err)
+ }
+ if !ran {
+ t.Errorf("expected ran to be true but was false.")
+ }
+ if out.String() != "foobar\n" {
+ t.Errorf("expected foobar, got %q", out)
+ }
+}
+
+func TestNotRun(t *testing.T) {
+ ran, err := Exec(nil, nil, nil, "thiswontwork")
+ if err == nil {
+ t.Fatal("unexpected nil error")
+ }
+ if ran {
+ t.Fatal("expected ran to be false but was true")
+ }
+}
+
+func TestAutoExpand(t *testing.T) {
+ if err := os.Setenv("MAGE_FOOBAR", "baz"); err != nil {
+ t.Fatal(err)
+ }
+ s, err := Output("echo", "$MAGE_FOOBAR")
+ if err != nil {
+ t.Fatal(err)
+ }
+ if s != "baz" {
+ t.Fatalf(`Expected "baz" but got %q`, s)
+ }
+
+}
diff --git a/vendor/github.com/magefile/mage/sh/helpers.go b/vendor/github.com/magefile/mage/sh/helpers.go
new file mode 100644
index 0000000..f5d20a2
--- /dev/null
+++ b/vendor/github.com/magefile/mage/sh/helpers.go
@@ -0,0 +1,40 @@
+package sh
+
+import (
+ "fmt"
+ "io"
+ "os"
+)
+
+// Rm removes the given file or directory even if non-empty. It will not return
+// an error if the target doesn't exist, only if the target cannot be removed.
+func Rm(path string) error {
+ err := os.RemoveAll(path)
+ if err == nil || os.IsNotExist(err) {
+ return nil
+ }
+ return fmt.Errorf(`failed to remove %s: %v`, path, err)
+}
+
+// Copy robustly copies the source file to the destination, overwriting the destination if necessary.
+func Copy(dst string, src string) error {
+ from, err := os.Open(src)
+ if err != nil {
+ return fmt.Errorf(`can't copy %s: %v`, src, err)
+ }
+ defer from.Close()
+ finfo, err := from.Stat()
+ if err != nil {
+ return fmt.Errorf(`can't stat %s: %v`, src, err)
+ }
+ to, err := os.OpenFile(dst, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, finfo.Mode())
+ if err != nil {
+ return fmt.Errorf(`can't copy to %s: %v`, dst, err)
+ }
+ defer to.Close()
+ _, err = io.Copy(to, from)
+ if err != nil {
+ return fmt.Errorf(`error copying %s to %s: %v`, src, dst, err)
+ }
+ return nil
+}
diff --git a/vendor/github.com/magefile/mage/sh/helpers_test.go b/vendor/github.com/magefile/mage/sh/helpers_test.go
new file mode 100644
index 0000000..54e78aa
--- /dev/null
+++ b/vendor/github.com/magefile/mage/sh/helpers_test.go
@@ -0,0 +1,121 @@
+package sh_test
+
+import (
+ "bytes"
+ "fmt"
+ "io/ioutil"
+ "os"
+ "path/filepath"
+ "testing"
+
+ "github.com/magefile/mage/sh"
+)
+
+// compareFiles checks that two files are identical for testing purposes. That means they have the same length,
+// the same contents, and the same permissions. It does NOT mean they have the same timestamp, as that is expected
+// to change in normal Mage sh.Copy operation.
+func compareFiles(file1 string, file2 string) error {
+ s1, err := os.Stat(file1)
+ if err != nil {
+ return fmt.Errorf("can't stat %s: %v", file1, err)
+ }
+ s2, err := os.Stat(file2)
+ if err != nil {
+ return fmt.Errorf("can't stat %s: %v", file2, err)
+ }
+ if s1.Size() != s2.Size() {
+ return fmt.Errorf("files %s and %s have different sizes: %d vs %d", file1, file2, s1.Size(), s2.Size())
+ }
+ if s1.Mode() != s2.Mode() {
+ return fmt.Errorf("files %s and %s have different permissions: %#4o vs %#4o", file1, file2, s1.Mode(), s2.Mode())
+ }
+ f1bytes, err := ioutil.ReadFile(file1)
+ if err != nil {
+ return fmt.Errorf("can't read %s: %v", file1, err)
+ }
+ f2bytes, err := ioutil.ReadFile(file2)
+ if err != nil {
+ return fmt.Errorf("can't read %s: %v", file2, err)
+ }
+ if !bytes.Equal(f1bytes, f2bytes) {
+ return fmt.Errorf("files %s and %s have different contents", file1, file2)
+ }
+ return nil
+}
+
+func TestHelpers(t *testing.T) {
+
+ mytmpdir, err := ioutil.TempDir("", "mage")
+ if err != nil {
+ t.Fatalf("can't create test directory: %v", err)
+ }
+ defer func() {
+ derr := os.RemoveAll(mytmpdir)
+ if derr != nil {
+ fmt.Printf("error cleaning up after TestHelpers: %v", derr)
+ }
+ }()
+ srcname := filepath.Join(mytmpdir, "test1.txt")
+ err = ioutil.WriteFile(srcname, []byte("All work and no play makes Jack a dull boy."), 0644)
+ if err != nil {
+ t.Fatalf("can't create test file %s: %v", srcname, err)
+ }
+ destname := filepath.Join(mytmpdir, "test2.txt")
+
+ t.Run("sh/copy", func(t *testing.T) {
+ cerr := sh.Copy(destname, srcname)
+ if cerr != nil {
+ t.Errorf("test file copy from %s to %s failed: %v", srcname, destname, cerr)
+ }
+ cerr = compareFiles(srcname, destname)
+ if cerr != nil {
+ t.Errorf("test file copy verification failed: %v", cerr)
+ }
+ })
+
+ // While we've got a temporary directory, test how forgiving sh.Rm is
+ t.Run("sh/rm/ne", func(t *testing.T) {
+ nef := filepath.Join(mytmpdir, "file_not_exist.txt")
+ rerr := sh.Rm(nef)
+ if rerr != nil {
+ t.Errorf("sh.Rm complained when removing nonexistent file %s: %v", nef, rerr)
+ }
+ })
+
+ t.Run("sh/copy/ne", func(t *testing.T) {
+ nef := filepath.Join(mytmpdir, "file_not_exist.txt")
+ nedf := filepath.Join(mytmpdir, "file_not_exist2.txt")
+ cerr := sh.Copy(nedf, nef)
+ if cerr == nil {
+ t.Errorf("sh.Copy succeeded copying nonexistent file %s", nef)
+ }
+ })
+
+ // We test sh.Rm by clearing up our own test files and directories
+ t.Run("sh/rm", func(t *testing.T) {
+ rerr := sh.Rm(destname)
+ if rerr != nil {
+ t.Errorf("failed to remove file %s: %v", destname, rerr)
+ }
+ rerr = sh.Rm(srcname)
+ if rerr != nil {
+ t.Errorf("failed to remove file %s: %v", srcname, rerr)
+ }
+ rerr = sh.Rm(mytmpdir)
+ if rerr != nil {
+ t.Errorf("failed to remove dir %s: %v", mytmpdir, rerr)
+ }
+ _, rerr = os.Stat(mytmpdir)
+ if rerr == nil {
+ t.Errorf("removed dir %s but it's still there?", mytmpdir)
+ }
+ })
+
+ t.Run("sh/rm/nedir", func(t *testing.T) {
+ rerr := sh.Rm(mytmpdir)
+ if rerr != nil {
+ t.Errorf("sh.Rm complained removing nonexistent dir %s", mytmpdir)
+ }
+ })
+
+}
diff --git a/vendor/github.com/magefile/mage/sh/testmain_test.go b/vendor/github.com/magefile/mage/sh/testmain_test.go
new file mode 100644
index 0000000..5869c54
--- /dev/null
+++ b/vendor/github.com/magefile/mage/sh/testmain_test.go
@@ -0,0 +1,46 @@
+package sh
+
+import (
+ "flag"
+ "fmt"
+ "os"
+ "testing"
+)
+
+var (
+ helperCmd bool
+ printArgs bool
+ stderr string
+ stdout string
+ exitCode int
+ printVar string
+)
+
+func init() {
+ flag.BoolVar(&helperCmd, "helper", false, "")
+ flag.BoolVar(&printArgs, "printArgs", false, "")
+ flag.StringVar(&stderr, "stderr", "", "")
+ flag.StringVar(&stdout, "stdout", "", "")
+ flag.IntVar(&exitCode, "exit", 0, "")
+ flag.StringVar(&printVar, "printVar", "", "")
+}
+
+func TestMain(m *testing.M) {
+ flag.Parse()
+
+ if printArgs {
+ fmt.Println(flag.Args())
+ return
+ }
+ if printVar != "" {
+ fmt.Println(os.Getenv(printVar))
+ return
+ }
+
+ if helperCmd {
+ fmt.Fprintln(os.Stderr, stderr)
+ fmt.Fprintln(os.Stdout, stdout)
+ os.Exit(exitCode)
+ }
+ os.Exit(m.Run())
+}
diff --git a/vendor/github.com/magefile/mage/site/archetypes/blog.md b/vendor/github.com/magefile/mage/site/archetypes/blog.md
new file mode 100644
index 0000000..2d812c4
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/archetypes/blog.md
@@ -0,0 +1,9 @@
++++
+title = "{{ replace .TranslationBaseName "-" " " | title }}"
+date = {{ .Date }}
+type = "post"
+author = "Nate Finch"
+authorLink = "twitter.com/natethefinch"
+draft = true
++++
+
diff --git a/vendor/github.com/magefile/mage/site/archetypes/default.md b/vendor/github.com/magefile/mage/site/archetypes/default.md
new file mode 100644
index 0000000..9dd0cc8
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/archetypes/default.md
@@ -0,0 +1,6 @@
++++
+title = "{{ replace .TranslationBaseName "-" " " | title }}"
+date = {{ .Date }}
+draft = true
++++
+
diff --git a/vendor/github.com/magefile/mage/site/config.toml b/vendor/github.com/magefile/mage/site/config.toml
new file mode 100644
index 0000000..d8b57c0
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/config.toml
@@ -0,0 +1,37 @@
+baseURL = "https://magefile.org"
+languageCode = "en-US"
+defaultContentLanguage = "en"
+
+title = "Mage Documentation"
+theme = "learn"
+defaultContentLanguageInSubdir= true
+
+[Permalinks]
+ blog = "/blog/:year/:month/:filename/"
+
+[params]
+ editURL = "https://github.com/magefile/mage/edit/master/site/content/"
+ description = "Mage"
+ author = "Nate Finch"
+ showVisitedLinks = true
+
+[outputs]
+home = [ "HTML", "RSS", "JSON"]
+
+[Languages]
+[Languages.en]
+title = "Mage"
+weight = 1
+languageName = "English"
+
+[[Languages.en.menu.shortcuts]]
+name = " Github repo"
+# identifier = "ds"
+url = "https://github.com/magefile/mage"
+weight = 10
+
+[[Languages.en.menu.shortcuts]]
+name = " Twitter Account"
+# identifier = "ds"
+url = "https://twitter.com/MagefileDotOrg"
+weight = 20
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/content/blog/_index.en.md b/vendor/github.com/magefile/mage/site/content/blog/_index.en.md
new file mode 100644
index 0000000..5d70312
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/content/blog/_index.en.md
@@ -0,0 +1,5 @@
++++
+title = "Blog"
+weight = 1
+pre = ''' '''
++++
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/content/blog/mage-in-ci.md b/vendor/github.com/magefile/mage/site/content/blog/mage-in-ci.md
new file mode 100644
index 0000000..c22d5d0
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/content/blog/mage-in-ci.md
@@ -0,0 +1,37 @@
++++
+title = "Mage in CI"
+date = 2018-09-06T21:41:23-04:00
+type = "post"
+author = "Nate Finch"
+authorLink = "twitter.com/natethefinch"
++++
+
+So, there's a bootstrap problem with Mage. What if you want to use Mage for
+your build, but you need to get it during your CI build? Mage is best built...
+with Mage. The problem is that if you don't use the custom `mage install` then
+Mage isn't compiled with ldflags that set all the usseful info in `mage
+-version`. So what do you do?
+
+Luckily, Mage has a [zero install](/zeroInstall) option. You don't need Mage to
+build Mage, there's a bootstrap file that will let you use `go run` to install
+Mage with all the great version info. The bootstrap.go file in the root of the
+repo hooks into mage's libraries and acts like Mage itself, so you can pass it
+mage targets in the current directory.
+
+This will download the mage source and install it (if you're using a gopath):
+
+```plain
+go get -d github.com/magefile/mage
+go run $GOPATH/src/github.com/magefile/mage/bootstrap.go install
+```
+
+If you're using go modules, you can do it with good old git clone:
+
+```plain
+git clone git@github.com:magefile/mage
+cd mage
+go run bootstrap.go install
+```
+
+Note that in the second case, the binary will be copied to where go env GOPATH
+points (for now, PRs welcome).
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/content/blog/on-release-versions.md b/vendor/github.com/magefile/mage/site/content/blog/on-release-versions.md
new file mode 100644
index 0000000..bfd522a
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/content/blog/on-release-versions.md
@@ -0,0 +1,50 @@
++++
+title = "On Release Versions"
+date = 2018-09-07T09:39:13-04:00
+type = "post"
+author = "Nate Finch"
+authorLink = "twitter.com/natethefinch"
++++
+
+If you've been using Mage for a while (thank you!) then you may have noticed
+something odd in the last week. Mage was previously at v2.3.0... but now the
+most recent release is 1.3.0 (released today!). So, yeah, sorry if this makes
+your life difficult, and I know it'll cause problems for some people. Hopefully
+most people have mage vendored and can go about their business until they need
+something new, and then it shouldn't be a big deal to just take whatever the
+newest release is, even if it "looks" like it's an earlier release.
+
+The reason for this is two things: the major motivating factor is go modules
+support. To enable support for go modules, if you are on version 2 or higher of
+your code, then import paths need to be appended with /v2. i.e. to import
+github.com/magefile/mage/mg from a v2 tag, you'd write the import as `import
+"github.com/magefile/mage/v2"`. With a go.mod that declares the module to be
+`github.com/magefile/mage/v2`, the go 1.11 tool understands that the /v2 on the
+end is not a real subdirectory, but just references the version of the module,
+and it'll strip that off. This understanding was backported to go 1.10.3 and go
+1.9.7. But any other versions of the go tool earlier than 1.11 will expect
+there to actually be a v2 directory in your repo for this code.
+
+Since I really want to keep Mage as backwards compatible as possible (CI runs
+tests with versions as far back as 1.7)... I didn't want this headache. I also
+didn't want everyone to have to make their import statements say /v2. Mage's
+libraries are and always will be backwards compatible. The tags on the repo
+previosuly were not intended to be semantic versions. In fact, I had intended
+to simply make each new release a major version specifically to make it clear
+that these aren't semantic versions (just like Chrome is on v70 right now).
+However, I wasn't very careful, and some of my tags were in semantic version
+format (i.e. v2.2.0) and thus the go 1.11 tool took those to mean that the repo
+is on v2.
+
+What to do? Mages users right now are still somewhat limited... looking at
+github there's maybe a hundred or so repos using Mage (again, thank you!).. but
+I hope in the future that this will grow manyfold. In order to make the many
+years and hopefully many orders of magnitude of users' lives easier, I decided
+it was best to rip out the v2.x tags and reclaim the title of v1. This keeps
+import paths the same as they were in v1.10 and before.
+
+From now on, all releases will be in semantic versions of ever increasing v1.x.x.
+
+Although I know this will cause some issues, I hope that the pain will be brief
+and slight.... and the ability to stay backwards compatible with earlier
+versions of Go and to make future development easier is worth it in my opinion.
diff --git a/vendor/github.com/magefile/mage/site/content/blog/release-v1.3.0.md b/vendor/github.com/magefile/mage/site/content/blog/release-v1.3.0.md
new file mode 100644
index 0000000..e7e419c
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/content/blog/release-v1.3.0.md
@@ -0,0 +1,57 @@
++++
+title = "Release v1.3.0 - GoCmd"
+date = 2018-09-07T21:19:49-04:00
+type = "post"
+author = "Nate Finch"
+authorLink = "twitter.com/natethefinch"
+aliases = ["/blog/2018/09/release-1.3.0/"]
++++
+
+As Brad Fitzpatrick would say, [Mage
+1.3.0](https://github.com/magefile/mage/releases/tag/v1.3.0) is the best release
+of Mage ever! This comes quick on the heels of gophercon, so I have been
+motivated to move some interesting new features through. 1.2.4 added real
+support for go modules (though it needs some more polish). This release adds a
+feature that I think will become more useful as more projects use Mage.
+
+As you may or may not know (it hasn't been well advertised), it's now extremely
+easy to run multiple go versions side by side. You can `go get
+golang.org/dl/go1.xx` for any version of go from 1.8 and up. It'll drop a
+binary on your system that you can then run `go1.xx download` and it'll download
+and set up a new go environment for that verison of go. From then on, you can
+`go1.xx build` etc just like you do with the "go" binary.
+
+This makes it super easy to work on different projects with different required
+versions of go support. I used to work at Canonical, and we were restricted to
+the versions of Go that shipped in the latest Ubuntu release, because our code
+was going to shiop with that release, too, and it needed to buid with the
+built-in go compiler. This meant that we were almost always behind the latest
+go version. Of course, go is backwards compatible, so you can build 1.6
+compatible code with go 1.11.... but you can also accidentally introduce
+dependencies that don't exist and/or don't work in old versions.
+
+Oh, we're supposed to be talking about Mage? Yeah, so there's a new flag for
+Mage in 1.3.0: `-gocmd` which lets you specify the binary to use to compile the
+magefile binary. Thus, if the code your magefile imports needs an older version
+of Go, you can specify it there, e.g. `mage -gocmd go1.8.3 build`. This
+literally just calls `go1.8.3 build` to compile the magefile binary, rather than
+`go build`. This means that you need that binary on your path (or specify the
+full path), and it means that if you pass in something wacky (like grep or
+something) that wacky things may happen.
+
+One important change is that the version of go used to compile the magefile
+binary is now part of the hash that determines whether we need to recompile the
+binary. So, if you run the exact same magefile with two different versions of
+go, it'll create two different files in your magefile cache. (yes, there's a
+binary cache, see [https://magefile.org/howitworks](https://magefile.org/howitworks/)).
+
+Also in this version, we now print out the version of Go used to compile Mage
+itself when you run `mage -version`. This is important because mage compiled
+with < 1.11 does not play well with go modules. There's also some more
+debugging output showing versions of go being used when you run with -debug...
+again, this can help figure out when you're not running what you think you're
+running.
+
+Hope this is useful to some people. Please feel free to drop by the repo and
+[make an issue](https://github.com/magefile/mage/issues) if you have an idea of
+something that could make Mage even better.
diff --git a/vendor/github.com/magefile/mage/site/content/blog/release-v1.4.0.md b/vendor/github.com/magefile/mage/site/content/blog/release-v1.4.0.md
new file mode 100644
index 0000000..63292ac
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/content/blog/release-v1.4.0.md
@@ -0,0 +1,58 @@
++++
+title = "Release v1.4.0 - Go Modules"
+date = 2018-09-11T09:17:52-04:00
+type = "post"
+author = "Nate Finch"
+authorLink = "twitter.com/natethefinch"
++++
+
+[Mage v1.4.0](https://github.com/magefile/mage/releases/tag/v1.4.0) is released
+with proper go modules support.
+
+I finally figured out the wacky problem that Mage was having with Go Modules.
+The main problem seems to be that it's the working directory where `go` is run
+that determines whether or not the go tool decides to use modules or gopath.
+This is backwards of what I would expect, which would be that the location of
+the code determines whether to use modules or not (i.e. if it's outside a
+gopath, use modules).
+
+I filed [a bug about this](https://github.com/golang/go/issues/27612) on the go
+project. It's possible this is intended, but confusing behavior.
+
+However, the good news is that now that I figured out the problem, I can fix it.
+I of course also wrote a test around it. It's easier to reproduce in the clean
+environment of CI than in my own messy machine, which is a nice reversal of how
+most of these bugs go.
+
+I don't know if this is the last of the go module bugs, but for now it seems to
+be a pretty important milestone passed, with tests to keep it working in the
+future.
+
+This version also changes the implementation of how we detect magefiles and how
+we parse them, greatly simplifying the code. Since Mage wants to filter files
+to only those that include the `mage` build tag, I had originally hacked the
+go/build package to include a way to make tags required. Normally if you build
+with additional tags, the build includes files with those tags *and* those with
+no tags... I wanted to exclude those with no tags. However, it occurred to me
+that this could be done much more simply by just running `go list` twice - once
+with no tags and once with the `mage` tag, and then see what additional files
+were added with the second run. By definition, those files are ones that have
+the mage tag.
+
+I also simplified how we're processing types. Go 1.11's modules change how type
+parsing works, and the old go/types package isn't up to the challenge. There's a
+new package at [golang.org/x/tools/go/packages](golang.org/x/tools/go/packages)
+that is supposed to replace go/types for this. I started looking into using
+go/packages, but then realized my situation is simple enough that I can actually
+just use go/ast and not even need to dive into types very much (the only two
+types Mage knows about right now is `error` and `context.Context`).
+
+The end result was a PR that removed 11,000 lines of code, most of which was 3
+copies of standard library packages that no longer needed to be used & included
+- two hacked copies of go/build (one for go1.10 and lower, and one for go1.11),
+as well as a copy of the go/build source importer, which wasn't in the standard
+library in go1.8 and below.
+
+Please take a look and definitely file an issue if you have any problems with
+module support or the new parsing code.
+
diff --git a/vendor/github.com/magefile/mage/site/content/compiling/_index.en.md b/vendor/github.com/magefile/mage/site/content/compiling/_index.en.md
new file mode 100644
index 0000000..b896c9e
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/content/compiling/_index.en.md
@@ -0,0 +1,41 @@
++++
+title = "Compiling"
+weight = 37
++++
+
+## Mage ignores GOOS and GOARCH for its build
+
+When building the binary for your magefile, mage will ignore the GOOS and GOARCH environment variables and use your current GOOS and GOARCH to ensure the binary that is built can run on your local system. This way you can set GOOS and GOARCH when you run mage, to have it take effect on the outputs of your magefile, without it also rendering your magefile unrunnable on your local machine.
+
+## Compiling a static binary
+
+It can be useful to compile a static binary which has the mage execution runtime
+and the tasks compiled in such that it can be run on another machine without
+requiring any dependencies. To do so, pass the output path to the compile flag.
+like this:
+
+```plain
+$ mage -compile ./static-output
+```
+
+The compiled binary uses flags just like the mage binary:
+
+```plain
+ [options] [target]
+
+Commands:
+ -l list targets in this binary
+ -h show this help
+
+Options:
+ -h show description of a target
+ -t
+ timeout in duration parsable format (e.g. 5m30s)
+ -v show verbose output when running targets
+```
+
+## Compiling for a different OS -goos and -goarch
+
+If you intend to run the binary on another machine with a different OS platform, you may use the `-goos` and `-goarch` flags to build the compiled binary for the target platform. Valid values for these flags may be found here: https://golang.org/doc/install/source#environment. The OS values are obvious (except darwin=MacOS), the GOARCH values most commonly needed will be "amd64" or "386" for 64 for 32 bit versions of common desktop OSes.
+
+Note that if you run `-compile` with `-dir`, the `-compile` target will be *relative to the magefile dir*.
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/content/dependencies/_index.en.md b/vendor/github.com/magefile/mage/site/content/dependencies/_index.en.md
new file mode 100644
index 0000000..9375152
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/content/dependencies/_index.en.md
@@ -0,0 +1,74 @@
++++
+title = "Dependencies"
+weight = 30
++++
+
+Mage supports a makefile-style tree of dependencies using the helper library
+[github.com/magefile/mage/mg](https://godoc.org/github.com/magefile/mage/mg). To
+declare dependencies, pass any number of dependent functions of the following
+types:
+```go
+func()
+func() error
+func(ctx context.Context)
+func(ctx context.Context) error
+```
+(they may be targets, but do not need to be and do not have to be exported) to
+`mg.Deps()`, and the Deps function will not return until all declared
+dependencies have been run (and any dependencies they have are run).
+Dependencies are guaranteed to run exactly once in a single execution of mage,
+so if two of your dependencies both depend on the same function, it is still
+guaranteed to be run only once, and both funcs that depend on it will not
+continue until it has been run.
+
+## Parallelism
+
+If run with `mg.Deps` or `mg.CtxDeps`, dependencies are run in their own
+goroutines, so they are parellelized as much as possible given the dependency
+tree ordering restrictions. If run with `mg.SerialDeps` or `mg.SerialCtxDeps`,
+the dependencies are run serially, though each dependency or sub-dependency will
+still only ever be run once.
+
+## Contexts and Cancellation
+
+Dependencies that have a context.Context argument will be passed a context,
+either a default context if passed into `mg.Deps` or `mg.SerialDeps`, or the one
+passed into `mg.CtxDeps` or `mg.SerialCtxDeps`. The default context, which is
+also passed into [targets](/targets) with a context argument, will be cancelled
+when and if the timeout specified on the command line is hit.
+
+### Example Dependencies
+
+```go
+func Build() {
+ mg.Deps(f, g)
+ fmt.Println("Build running")
+}
+
+func f() {
+ mg.Deps(h)
+ fmt.Println("f running")
+}
+
+func g() {
+ mg.Deps(h)
+ fmt.Println("g running")
+}
+
+func h() {
+ fmt.Println("h running")
+}
+```
+
+Running `mage build` will produce the following output:
+
+```plain
+h running
+g running
+f running
+Build running
+```
+
+Note that since f and g do not depend on each other, and they're running in
+their own goroutines, their order is non-deterministic, other than they are
+guaranteed to run after h has finished, and before Build continues.
diff --git a/vendor/github.com/magefile/mage/site/content/environment/_index.en.md b/vendor/github.com/magefile/mage/site/content/environment/_index.en.md
new file mode 100644
index 0000000..f58829e
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/content/environment/_index.en.md
@@ -0,0 +1,34 @@
++++
+title = "Environment Variables"
+weight = 40
++++
+
+## MAGEFILE_VERBOSE
+
+Set to "1" or "true" to turn on verbose mode (like running with -v)
+
+## MAGEFILE_DEBUG
+
+Set to "1" or "true" to turn on debug mode (like running with -debug)
+
+## MAGEFILE_CACHE
+
+Sets the directory where mage will store binaries compiled from magefiles
+(default is $HOME/.magefile)
+
+## MAGEFILE_GOCMD
+
+Sets the binary that mage will use to compile with (default is "go").
+
+## MAGEFILE_IGNOREDEFAULT
+
+If set to "1" or "true", tells the compiled magefile to ignore the default
+target and print the list of targets when you run `mage`.
+
+## MAGEFILE_HASHFAST
+
+If set to "1" or "true", tells mage to use a quick hash of magefiles to
+determine whether or not the magefile binary needs to be rebuilt. This results
+in faster run times (especially on Windows), but means that mage will fail to
+rebuild if a dependency has changed. To force a rebuild when you know or suspect
+a dependency has changed, run mage with the -f flag.
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/content/filesources/_index.en.md b/vendor/github.com/magefile/mage/site/content/filesources/_index.en.md
new file mode 100644
index 0000000..c2f2bd3
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/content/filesources/_index.en.md
@@ -0,0 +1,18 @@
++++
+title = "File Sources and Destinations"
+weight = 35
++++
+
+Mage supports make-like comparisons of file sources and file targets. Using the
+[target](https://godoc.org/github.com/magefile/mage/target) library, you can
+easily compare the last modified times of a target file or directory with the
+last modified time of the file or directories required to build that target.
+
+`target.Path` compares the last modified time of a target file or directory with
+the last modified time of one or more files or directories. If any of the
+sources are newer than the destination, the function will return true. Note
+that Path does not recurse into directories. If you give it a directory, the
+only last modified time it'll check is that of the directory itself.
+
+`target.Dir` is like `target.Path` except that it recursively checks files and
+directories under any directories specified, comparing timestamps.
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/content/howitworks/_index.en.md b/vendor/github.com/magefile/mage/site/content/howitworks/_index.en.md
new file mode 100644
index 0000000..699356a
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/content/howitworks/_index.en.md
@@ -0,0 +1,25 @@
++++
+title="How It Works"
+weight = 50
++++
+
+Mage scans the current directory for go files with the `mage` build tag (i.e.
+`// +build mage`), using the normal go build rules for following build
+constraints (aside from requiring the mage tag). It then parses those files to
+find the build targets, generates a main file for the command, and compiles a
+binary from those files. The magefiles are hashed so that if they remain
+unchanged, the same compiled binary will be reused next time, to avoid the
+generation overhead. As of Mage 1.3.0, the version of Go used to compile the
+binary is also used in the hash.
+
+## Binary Cache
+
+Compiled magefile binaries are stored in $HOME/.magefile. This location can be
+customized by setting the MAGEFILE_CACHE environment variable.
+
+## Go Environment
+
+Mage itself requires no dependencies to run. However, because it is compiling go
+code, you must have a valid go environment set up on your machine. Mage is
+compatible with any go 1.7+ environment (earlier versions may work but are not
+tested).
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/content/importing/_index.en.md b/vendor/github.com/magefile/mage/site/content/importing/_index.en.md
new file mode 100644
index 0000000..91c2ede
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/content/importing/_index.en.md
@@ -0,0 +1,59 @@
++++
+title = "Importing Targets"
+weight = 11
++++
+
+Mage allows you to import targets from another package into the current
+magefile. This is very useful when you have common targets that you'd like to
+be able to reuse across many repos.
+
+## Imported Package Restrictions
+
+To import targets from another package, that package must *not* be a main
+package. i.e. it cannot be `package main`. This is in contrast to a normal
+mage package that must be `package main`. The reason is that the go tool won't
+let you import a main package.
+
+In addition, all files will be imported, not just those tagged with the
+`//+build mage` build tag. Again, this is a restriction of the go tool. Mage
+can build only the `.go` files in the current directory that have the `mage`
+build tag, but when importing code from other directories, it's simply not
+possible. This means that any exported function (in any file) that matches
+Mage's allowed formats will be picked up as a target.
+
+Aliases and defaults in the imported package will be ignored.
+
+Other than these differences, you can write targets in those packages just
+like a normal magefile.
+
+## Two Ways to Import
+
+Importing targets from a package simply requires adding a `// mage:import`
+comment on an import statement in your magefile. If there is a name after this
+tag, the targets will be imported into what is effectively like a namespace.
+
+```go
+import (
+ // mage:import
+ _ "example.com/me/foobar"
+ // mage:import build
+ "example.com/me/builder"
+)
+```
+
+The first mage import above will add the targets from the foobar package to the
+root namespace of your current magefile. Thus, if there's a `func Deploy()` in
+foobar, your magefile will now have a `deploy` target.
+
+The second import above will create a `build` namespace for the targets in the
+`builder` package. Thus, if there's a `func All()` in builder, your magefile
+will now have a `build:all` target.
+
+Note that you can use imported package targets as dependencies with `mg.Deps`,
+just like any other function works in `mg.Deps`, so you could have
+`mg.Deps(builder.All)`.
+
+If you don't need to actually use the package in your root magefile, simply make
+the import an underscore import like the first import above.
+
+
diff --git a/vendor/github.com/magefile/mage/site/content/index.md b/vendor/github.com/magefile/mage/site/content/index.md
new file mode 100644
index 0000000..930a032
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/content/index.md
@@ -0,0 +1,120 @@
++++
+title = "Mage"
++++
+
+## About
+
+Mage is a make/rake-like build tool using Go. You write plain-old go functions,
+and Mage automatically uses them as Makefile-like runnable targets.
+
+
+## Installation
+
+Mage has no dependencies outside the Go standard library, and builds with Go 1.7
+and above (possibly even lower versions, but they're not regularly tested).
+
+Install mage by running
+
+```plain
+go get -u -d github.com/magefile/mage
+cd $GOPATH/src/github.com/magefile/mage
+go run bootstrap.go
+```
+
+This will download the code into your GOPATH, and then run the bootstrap script
+to build mage with version infomation embedded in it. A normal `go get`
+(without -d) will build the binary correctly, but no version info will be
+embedded. If you've done this, no worries, just go to
+$GOPATH/src/github.com/magefile/mage and run `mage install` or `go run
+bootstrap.go` and a new binary will be created with the correct version
+information.
+
+The mage binary will be created in your $GOPATH/bin directory.
+
+You may also install a binary release from our
+[releases](https://github.com/magefile/mage/releases) page.
+
+## Example Magefile
+
+```go
+//+build mage
+
+package main
+
+// Runs dep ensure and then installs the binary.
+func Build() error {
+ if err := sh.Run("dep", "ensure"); err != nil {
+ return err
+ }
+ return sh.Run("go", "install", "./...")
+}
+```
+
+Run the above `Build` target by simply running `mage build` in the same directory as the magefile.
+
+## Demo
+
+{{< youtube Hoga60EF_1U >}}
+
+## Discussion
+
+Join the `#mage` channel on [gophers slack](https://gophers.slack.com/messages/general/) for discussion of usage, development, etc.
+
+
+## Plugins
+
+There are no plugins. You don't need plugins. It's just Go code. You can
+import whatever libraries you want. Every library in the go ecosystem is a mage
+plugin. Every tool you use with Go can be used with Magefiles.
+
+## Usage
+```plain
+mage [options] [target]
+
+Mage is a make-like command runner. See https://magefile.org for full docs.
+
+Commands:
+ -clean clean out old generated binaries from CACHE_DIR
+ -compile
+ output a static binary to the given path
+ -init create a starting template if no mage files exist
+ -l list mage targets in this directory
+ -h show this help
+ -version show version info for the mage binary
+
+Options:
+ -d
+ run magefiles in the given directory (default ".")
+ -debug turn on debug messages
+ -h show description of a target
+ -f force recreation of compiled magefile
+ -keep keep intermediate mage files around after running
+ -gocmd
+ use the given go binary to compile the output (default: "go")
+ -goos sets the GOOS for the binary created by -compile (default: current OS)
+ -goarch sets the GOARCH for the binary created by -compile (default: current arch)
+ -t
+ timeout in duration parsable format (e.g. 5m30s)
+ -v show verbose output when running mage targets
+ ```
+
+## Why?
+
+Makefiles are hard to read and hard to write. Mostly because makefiles are essentially fancy bash
+scripts with significant white space and additional make-related syntax.
+
+Mage lets you have multiple magefiles, name your magefiles whatever you want, and they're easy to
+customize for multiple operating systems. Mage has no dependencies (aside from go) and runs just
+fine on all major operating systems, whereas make generally uses bash which is not well supported on
+Windows. Go is superior to bash for any non-trivial task involving branching, looping, anything
+that's not just straight line execution of commands. And if your project is written in Go, why
+introduce another language as idiosyncratic as bash? Why not use the language your contributors are
+already comfortable with?
+
+## Code
+
+[https://github.com/magefile/mage](https://github.com/magefile/mage)
+
+## Projects that build with Mage
+
+[](https://github.com/gohugoio/hugo) [](https://github.com/gnormal/gnorm)
diff --git a/vendor/github.com/magefile/mage/site/content/libraries/_index.en.md b/vendor/github.com/magefile/mage/site/content/libraries/_index.en.md
new file mode 100644
index 0000000..6d8c8ed
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/content/libraries/_index.en.md
@@ -0,0 +1,20 @@
++++
+title = "Helper Libraries"
+weight = 45
++++
+
+There are three helper libraries bundled with mage,
+[mg](https://godoc.org/github.com/magefile/mage/mg),
+[sh](https://godoc.org/github.com/magefile/mage/sh), and
+[target](https://godoc.org/github.com/magefile/mage/target)
+
+Package `mg` contains mage-specific helpers, such as Deps for declaring
+dependent functions, and functions for returning errors with specific error
+codes that mage understands.
+
+Package `sh` contains helpers for running shell-like commands with an API that's
+easier on the eyes and more helpful than os/exec, including things like
+understanding how to expand environment variables in command args.
+
+Package `target` contains helpers for performing make-like timestamp comparing
+of files. It makes it easy to bail early if this target doesn't need to be run.
diff --git a/vendor/github.com/magefile/mage/site/content/magefiles/_index.en.md b/vendor/github.com/magefile/mage/site/content/magefiles/_index.en.md
new file mode 100644
index 0000000..6f90817
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/content/magefiles/_index.en.md
@@ -0,0 +1,91 @@
++++
+title = "Magefiles"
+weight = 20
++++
+
+
+A mage file is any regular go file marked with a build target of "mage" and in
+package main.
+
+```go
+// +build mage
+
+package main
+```
+
+You can quickly create a template mage file with the `-init` option.
+
+`mage -init`
+
+You may have any number of magefiles in the same directory. Mage doesn't care
+what they're named aside from normal go filename rules. All they need is to
+have the mage build target. Handily, this also excludes them from your regular
+builds, so they can live side by side with your normal go files. Magefiles may
+use any of Go's usual build constraints, so you can include and exclude
+magefiles based on OS, arch, etc, whether in the filename or in the +build line.
+
+```go
+// +build mage
+
+// A comment on the package will be output when you list the targets of a
+// magefile.
+package main
+
+import (
+ "log"
+ "os"
+)
+
+
+// Build target is any exported function with zero args with no return or an error return.
+// If a target has an error return and returns an non-nil error, mage will print
+// that error to stdout and return with an exit code of 1.
+func Install() error {
+
+}
+
+// The first sentence in the comment will be the short help text shown with mage -l.
+// The rest of the comment is long help text that will be shown with mage -h
+func Target() {
+ // by default, the log stdlib package will be set to discard output.
+ // Running with mage -v will set the output to stdout.
+ log.Printf("Hi!")
+}
+
+// A var named Default indicates which target is the default. If there is no
+// default, running mage will list the targets available.
+var Default = Install
+
+
+// Because build targets are case insensitive, you may not have two build targets
+// that lowercase to the same text. This would give you an error when you tried
+// to run the magefile:
+// func BUILD() {}
+
+// Targets may have a context argument, in which case a default context is passed
+// to the target, which will be cancelled after a timeout if the -t flag is used.
+func Build(ctx context.Context) {
+ mg.CtxDeps(ctx, Target)
+}
+
+```
+
+```plain
+$ mage -l
+A comment on the package will be output when you list the targets of a
+magefile.
+
+Targets:
+ install* Build target is any exported function with zero args with no return or an error return.
+ target The first sentence in the comment will be the short help text shown with mage -l.
+
+* default target
+```
+
+```plain
+$ mage -h target
+mage target:
+
+The first sentence in the comment will be the short help text shown with mage -l.
+The rest of the comment is long help text that will be shown with mage -h
+```
diff --git a/vendor/github.com/magefile/mage/site/content/targets/_index.en.md b/vendor/github.com/magefile/mage/site/content/targets/_index.en.md
new file mode 100644
index 0000000..2184ca5
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/content/targets/_index.en.md
@@ -0,0 +1,102 @@
++++
+title = "Targets"
+weight = 10
++++
+A target is any exported function that is one of the following types:
+```go
+func()
+func() error
+func(context.Context)
+func(context.Context) error
+```
+A target is effectively a subcommand of mage while running mage in
+this directory. i.e. you can run a target by running `mage `
+
+If the function has an error return, errors returned from the function will
+print to stdout and cause the magefile to exit with an exit code of 1. Any
+functions that do not fit this pattern are not considered targets by mage.
+
+Comments on the target function will become documentation accessible by running
+`mage -l` which will list all the build targets in this directory with the first
+sentence from their docs, or `mage -h ` which will show the full comment
+from the docs on the function, and a list of aliases if specified.
+
+A target may be designated the default target, which is run when the user runs
+`mage` with no target specified. To denote the default, create a `var Default =
+` If no default target is specified, running `mage` with no target
+will print the list of targets, like `mage -l`.
+
+## Multiple Targets
+
+Multiple targets can be specified as args to Mage, for example `mage foo bar
+baz`. Targets will be run serially, from left to right (so in this case, foo,
+then once foo is done, bar, then once bar is done, baz). Dependencies run using
+mg.Deps will still only run once per mage execution, so if each of the targets
+depend on the same function, that function will only be run once for all
+targets. If any target panics or returns an error, no later targets will be run.
+
+## Contexts and Cancellation
+
+A default context is passed into any target with a context argument. This
+context will have a timeout if mage was run with -t, and thus will cancel the
+running targets and dependencies at that time. To pass this context to
+dependencies, use mg.CtxDeps(ctx, ...) to pass the context from the target to
+its dependencies (and pass the context to sub-dependencies). Dependencies run
+with mg.Deps will not get the starting context, and thus will not be cancelled
+when the timeout set with -t expires.
+
+mg.CtxDeps will pass along whatever context you give it, so if you want to
+modify the original context, or pass in your own, that will work like you expect
+it to.
+
+## Aliases
+
+Target aliases can be specified using the following notation:
+
+```go
+var Aliases = map[string]interface{} {
+ "i": Install,
+ "build": Install,
+ "ls": List,
+}
+```
+
+The key is an alias and the value is a function identifier.
+An alias can be used interchangeably with it's target.
+
+## Namespaces
+
+Namespaces are a way to group related commands, much like subcommands in a
+normal application. To define a namespace in your magefile, simply define an
+exported named type of type `mg.Namespace`. Then, every method on that type which
+matches the normal target signature becomes a target under that namespace.
+
+```go
+import "github.com/magefile/mage/mg"
+
+type Build mg.Namespace
+
+// Builds the site using hugo.
+func (Build) Site() error {
+ return nil
+}
+
+// Builds the pdf docs.
+func (Build) Docs() {}
+```
+
+To call a namespaced target, type it as `namespace:target`. For example, the
+above would be called by typing
+
+```plain
+$ mage build:site
+```
+
+Similarly, the help for the target will show how it may be called:
+
+```plain
+$ mage -l
+
+build:docs Builds the pdf docs.
+build:site Builds the site using hugo.
+```
diff --git a/vendor/github.com/magefile/mage/site/content/zeroInstall/_index.en.md b/vendor/github.com/magefile/mage/site/content/zeroInstall/_index.en.md
new file mode 100644
index 0000000..d7f6005
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/content/zeroInstall/_index.en.md
@@ -0,0 +1,62 @@
++++
+title = "Zero Install Option"
+weight = 40
++++
+
+
+Don't want to depend on another binary in your environment? You can run
+mage directly out of your vendor directory (or GOPATH) with `go run`.
+
+Just save a file like this (I'll call it `mage.go`, but it can be named
+anything) and note that the build tag is *not* `+build mage`. Mage will
+create its own main file, so we need this one to be excluded
+from when your magefiles are compiled.
+
+Now you can `go run mage.go ` and it'll work just as if you ran
+`mage `:
+
+```go
+// +build ignore
+
+package main
+
+import (
+ "os"
+ "github.com/magefile/mage/mage"
+)
+
+func main() { os.Exit(mage.Main()) }
+```
+
+Note that because of the peculiarities of `go run`, if you run this way, go run
+will only ever exit with an error code of 0 or 1. If mage exits with error code
+99, for example, `go run` will print out `exit status 99` and then exit with
+error code 1. Why? Ask the go team. I've tried to get them to fix it, and
+they won't.
+
+If you are using `dep` for managing Go dependencies, it is necessary to add the mage import path to
+a `required` clause in `Gopkg.toml` to prevent it being subsequently removed due to lack of
+perceived use thanks for the `+build ignore` tag - for example:
+
+```toml
+required = ["github.com/magefile/mage/mage"]
+```
+
+## Use Mage as a library
+
+All of mage's functionality is accessible as a compile-in library. Checkout
+[godoc.org/github.com/magefile/mage/mage](https://godoc.org/github.com/magefile/mage/mage)
+for full details.
+
+Fair warning, the API of mage/mage may change, so be sure to use vendoring.
+
+## Compiling a static binary
+
+If your tasks are not related to compiling Go code, it can be useful to compile a binary which has
+the mage execution runtime and the tasks compiled in such that it can be run on another machine
+without requiring installation of dependencies. To do so, pass the output path to the compile flag.
+like this:
+
+```plain
+$ mage -compile ./static-output
+```
diff --git a/vendor/github.com/magefile/mage/site/layouts/blog/list.html b/vendor/github.com/magefile/mage/site/layouts/blog/list.html
new file mode 100644
index 0000000..259161e
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/layouts/blog/list.html
@@ -0,0 +1,11 @@
+{{ partial "header.html" . }}
+
+ {{.Content}}
+
+
+ {{ if $toc }}
+ {{ partial "toc.html" . }}
+ {{ end }}
+
+
+ {{ end }}
+
+ {{ if .Params.chapter }}
+
+ {{ end }}
+
+ {{if and (not .IsHome) (not .Params.chapter) }}
+
{{.Title}}
+ {{end}}
+
+ {{define "breadcrumb"}}
+ {{$parent := .page.Parent }}
+ {{ if $parent }}
+ {{ $value := (printf "%s > %s" $parent.URL $parent.Title .value) }}
+ {{ template "breadcrumb" dict "page" $parent "value" $value }}
+ {{else}}
+ {{.value|safeHTML}}
+ {{end}}
+ {{end}}
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/layouts/partials/logo.html b/vendor/github.com/magefile/mage/site/layouts/partials/logo.html
new file mode 100644
index 0000000..75f19fd
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/layouts/partials/logo.html
@@ -0,0 +1 @@
+
diff --git a/vendor/github.com/magefile/mage/site/static/badge-tall.svg b/vendor/github.com/magefile/mage/site/static/badge-tall.svg
new file mode 100644
index 0000000..9920195
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/static/badge-tall.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/static/badge.svg b/vendor/github.com/magefile/mage/site/static/badge.svg
new file mode 100644
index 0000000..4707962
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/static/badge.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/static/css/overrides.css b/vendor/github.com/magefile/mage/site/static/css/overrides.css
new file mode 100644
index 0000000..95ce1cd
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/static/css/overrides.css
@@ -0,0 +1,7 @@
+
+h1.site_title {
+ font-size: 7rem;
+ font-family: "Almendra", "Novacento Sans Wide", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif;
+ font-weight: 700;
+ text-transform: none;
+}
diff --git a/vendor/github.com/magefile/mage/site/static/images/favicon.ico b/vendor/github.com/magefile/mage/site/static/images/favicon.ico
new file mode 100644
index 0000000..45ef85e
Binary files /dev/null and b/vendor/github.com/magefile/mage/site/static/images/favicon.ico differ
diff --git a/vendor/github.com/magefile/mage/site/static/images/favicon.png b/vendor/github.com/magefile/mage/site/static/images/favicon.png
new file mode 100644
index 0000000..2e1e9fe
Binary files /dev/null and b/vendor/github.com/magefile/mage/site/static/images/favicon.png differ
diff --git a/vendor/github.com/magefile/mage/site/static/images/gary.svg b/vendor/github.com/magefile/mage/site/static/images/gary.svg
new file mode 100644
index 0000000..af1ee2f
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/static/images/gary.svg
@@ -0,0 +1,664 @@
+
+
+
+
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/static/images/gnorm.png b/vendor/github.com/magefile/mage/site/static/images/gnorm.png
new file mode 100644
index 0000000..546b119
Binary files /dev/null and b/vendor/github.com/magefile/mage/site/static/images/gnorm.png differ
diff --git a/vendor/github.com/magefile/mage/site/static/images/hugo.png b/vendor/github.com/magefile/mage/site/static/images/hugo.png
new file mode 100644
index 0000000..da6785b
Binary files /dev/null and b/vendor/github.com/magefile/mage/site/static/images/hugo.png differ
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/.gitignore b/vendor/github.com/magefile/mage/site/themes/learn/.gitignore
new file mode 100644
index 0000000..6429751
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/.gitignore
@@ -0,0 +1,3 @@
+.DS_Store
+public/
+exampleSite/public
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/LICENSE.md b/vendor/github.com/magefile/mage/site/themes/learn/LICENSE.md
new file mode 100644
index 0000000..bab5bbb
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/LICENSE.md
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Grav
+Copyright (c) 2016 MATHIEU CORNIC
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/README.md b/vendor/github.com/magefile/mage/site/themes/learn/README.md
new file mode 100644
index 0000000..5c5606a
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/README.md
@@ -0,0 +1,49 @@
+# Hugo Learn Theme
+
+This repository contains a theme for [Hugo](https://gohugo.io/), based on great [Grav Learn Theme](http://learn.getgrav.org/).
+
+Visit the [theme documentation](https://learn.netlify.com/en/) to see what is going on. It is actually built with this theme.
+
+## Main features
+
+- Automatic Search
+- Multilingual mode
+- Unlimited menu levels
+- Automatic next/prev buttons to navigate through menu entries
+- Image resizing, shadow…
+- Attachments files
+- List child pages
+- Mermaid diagram (flowchart, sequence, gantt)
+- Customizable look and feel and themes variants
+- Buttons, Tip/Note/Info/Warning boxes, Expand
+
+## Installation
+
+Navigate to your themes folder in your Hugo site and use the following commands:
+
+```
+$ cd themes
+$ git clone https://github.com/matcornic/hugo-theme-learn.git
+```
+
+Check that your Hugo version is minimum `0.25` with `hugo version`.
+
+
+
+## Usage
+
+- [Visit the documentation](https://learn.netlify.com/en/)
+
+## Download old versions (prior to 2.0.0)
+
+If you need old version for compatibility purpose, either download [theme source code from releases](https://github.com/matcornic/hugo-theme-learn/releases) or use the right git tag. For example, with `1.1.0`
+
+- Direct download way: https://github.com/matcornic/hugo-theme-learn/archive/1.1.0.zip
+- Git way:
+
+```shell
+cd themes/hugo-theme-learn
+git checkout tags/1.1.0
+```
+
+For both solutions, the documentation is available at https://github.com/matcornic/hugo-theme-learn/releases/download/1.1.0/hugo-learn-doc-1.1.0.zip
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/archetypes/chapter.md b/vendor/github.com/magefile/mage/site/themes/learn/archetypes/chapter.md
new file mode 100644
index 0000000..240b652
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/archetypes/chapter.md
@@ -0,0 +1,13 @@
++++
+title = "{{ replace .TranslationBaseName "-" " " | title }}"
+date = {{ .Date }}
+weight = 5
+chapter = true
+pre = "X. "
++++
+
+### Chapter X
+
+# Some Chapter title
+
+Lorem Ipsum.
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/archetypes/default.md b/vendor/github.com/magefile/mage/site/themes/learn/archetypes/default.md
new file mode 100644
index 0000000..c89c2e4
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/archetypes/default.md
@@ -0,0 +1,7 @@
++++
+title = "{{ replace .TranslationBaseName "-" " " | title }}"
+date = {{ .Date }}
+weight = 5
++++
+
+Lorem Ipsum.
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/LICENSE.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/LICENSE.md
new file mode 100644
index 0000000..973626d
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/LICENSE.md
@@ -0,0 +1,20 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 MATHIEU CORNIC
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/README.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/README.md
new file mode 100644
index 0000000..c861e75
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/README.md
@@ -0,0 +1,39 @@
+- récriture doc -> TODO
+ - créer une section Showcase
+- Menus déroulants icone -> TODO
+
+- créer des jolis thèmes de base (avec des noms ou au moins de meilleures couleurs) -> DOING
+ - Thème blue : OK
+ - Thème red: OK
+ - Theme green: OK
+- Passer a Wercker -> OK
+- corriger le multilangue pour la recherche et les autres ressources statiques : OK
+- Section "MORE" -> OK
+- ajouter les childs -> OK
+- ajouter les attachments -> OK
+- refaire la possibilité d'overrider le style/script/etc -> OK
+- sticky bar -> OK
+- ajouter Travis pour tester le thème quotidiennement avec les nouvelles versions de Hugo -> OK
+- #54 -> OK
+- corriger slider menu qui ne fonctionne plus -> OK
+- Update font awesome -> OK
+- internationalisation -> OK
+ - Messages: OK
+ - Ajouter un bouton pour changer de langue : OK
+- netlify -> OK
+- home page -> OK
+- réintégrer la doc dans le même repo -> OK
+- récupérer les shortcodes utiles -> OK
+ - expand : OK
+ - mermaid : OK
+- chapter -> OK
+- recherche (avec pointage à la première occurence sur la page) -> OK
+- visited links -> OK
+- disable Search -> OK
+- vérifier que ça fonctionne avec une base url -> OK
+- tester les affichages de page enfant -> OK
+- comprendre l'histoire de pagination -> OK
+- améliorer les couleurs de surlignement de highlightjs -> OK
+- créer les archetypes -> OK
+ -> créé ceux de base -> OK
+ -> vérifier la possibilité de générer automatiquement le bon weight -> OK
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/config.toml b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/config.toml
new file mode 100644
index 0000000..51f6b73
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/config.toml
@@ -0,0 +1,73 @@
+baseURL = "/"
+languageCode = "en-US"
+defaultContentLanguage = "en"
+
+title = "Hugo Learn Documentation"
+theme = "hugo-theme-learn"
+themesdir = "../.."
+metaDataFormat = "yaml"
+defaultContentLanguageInSubdir= true
+
+[params]
+ editURL = "https://github.com/matcornic/hugo-theme-learn/edit/master/exampleSite/content/"
+ description = "Documentation for Hugo Learn Theme"
+ author = "Mathieu Cornic"
+ showVisitedLinks = true
+
+[outputs]
+home = [ "HTML", "RSS", "JSON"]
+
+[Languages]
+[Languages.en]
+title = "Documentation for Hugo Learn Theme"
+weight = 1
+languageName = "English"
+
+[[Languages.en.menu.shortcuts]]
+name = " Github repo"
+identifier = "ds"
+url = "https://github.com/matcornic/hugo-theme-learn"
+weight = 10
+
+[[Languages.en.menu.shortcuts]]
+name = " Showcases"
+url = "showcase"
+weight = 11
+
+[[Languages.en.menu.shortcuts]]
+name = " Hugo Documentation"
+identifier = "hugodoc"
+url = "https://gohugo.io/"
+weight = 20
+
+[[Languages.en.menu.shortcuts]]
+name = " Credits"
+url = "/credits"
+weight = 30
+
+[Languages.fr]
+title = "Documentation du thème Hugo Learn"
+weight = 2
+languageName = "Français"
+
+[[Languages.fr.menu.shortcuts]]
+name = " Repo Github"
+identifier = "ds"
+url = "https://github.com/matcornic/hugo-theme-learn"
+weight = 10
+
+[[Languages.fr.menu.shortcuts]]
+name = " Vitrine"
+url = "/showcase"
+weight = 11
+
+[[Languages.fr.menu.shortcuts]]
+name = " Documentation Hugo"
+identifier = "hugodoc"
+url = "https://gohugo.io/"
+weight = 20
+
+[[Languages.fr.menu.shortcuts]]
+name = " Crédits"
+url = "/credits"
+weight = 30
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/_index.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/_index.en.md
new file mode 100644
index 0000000..822792e
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/_index.en.md
@@ -0,0 +1,41 @@
+---
+title: "Learn Theme for Hugo"
+---
+
+# Hugo learn theme
+
+[Hugo-theme-learn](http://github.com/matcornic/hugo-theme-learn) is a theme for [Hugo](https://gohugo.io/), a fast and modern static website engine written in Go. Where Hugo is often used for blogs, this multilingual-ready theme is **fully designed for documentation**.
+
+This theme is a partial porting of the [Learn theme](http://learn.getgrav.org/) of [Grav](https://getgrav.org/), a modern flat-file CMS written in PHP.
+
+{{% notice tip %}}Learn theme works with a _page tree structure_ to organize content : All contents are pages, which belong to other pages. [read more about this]({{%relref "cont/pages/_index.md"%}})
+{{% /notice %}}
+
+## Main features
+
+* [Automatic Search]({{%relref "basics/configuration/_index.md" %}})
+* [Multilingual mode]({{%relref "cont/i18n/_index.md" %}})
+* **Unlimited menu levels**
+* **Automatic next/prev buttons to navigate through menu entries**
+* [Image resizing, shadow...]({{%relref "cont/markdown.en.md#images" %}})
+* [Attachments files]({{%relref "shortcodes/attachments.en.md" %}})
+* [List child pages]({{%relref "shortcodes/children/_index.md" %}})
+* [Mermaid diagram]({{%relref "shortcodes/mermaid.en.md" %}}) (flowchart, sequence, gantt)
+* [Customizable look and feel and themes variants]({{%relref "basics/configuration/_index.md"%}})
+* [Buttons]({{%relref "shortcodes/button.en.md" %}}), [Tip/Note/Info/Warning boxes]({{%relref "shortcodes/notice.en.md" %}}), [Expand]({{%relref "shortcodes/expand.en.md" %}})
+
+
+
+## Contribute to this documentation
+Feel free to update this content, just click the **Edit this page** link displayed on top right of each page, and pullrequest it
+
+{{% notice info %}}
+Your modification will be deployed automatically when merged.
+{{% /notice %}}
+
+## Documentation website
+This current documentation has been statically generated with Hugo with a simple command : `hugo -t hugo-theme-learn` -- source code is [available here at GitHub](https://github.com/matcornic/hugo-theme-learn)
+
+{{% notice note %}}
+Automatically published and hosted thanks to [Netlify](https://www.netlify.com/). Read more about [Automated HUGO deployments with Netlify](https://www.netlify.com/blog/2015/07/30/hosting-hugo-on-netlifyinsanely-fast-deploys/)
+{{% /notice %}}
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/_index.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/_index.fr.md
new file mode 100644
index 0000000..5e642eb
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/_index.fr.md
@@ -0,0 +1,43 @@
+---
+title: "Learn Theme for Hugo"
+---
+
+# Thème Hugo learn
+
+[Hugo-theme-learn](http://github.com/matcornic/hugo-theme-learn) est un thème pour [Hugo](https://gohugo.io/), un générateur de site statique, rapide et modern, écrit en Go. Tandis que Hugo est souvent utilisé pour des blogs, ce thème multi-langue est **entièrement conçu pour la documentation**.
+
+Ce thème est un portage partiel du [thème Learn](http://learn.getgrav.org/) de [Grav](https://getgrav.org/), un CMS modern écrit en PHP.
+
+{{% notice tip %}}Le thème Learn fonctionne grâce à la structure de page aborescentes pour organiser le contenu: tous les contenus sont des pages qui appartiennent à d'autres pages. [Plus d'infos]({{%relref "cont/pages/_index.md"%}})
+{{% /notice %}}
+
+## Fonctionnalité principales
+
+* [Recherche automatique]({{%relref "basics/configuration/_index.md" %}})
+* [Mode multi-langue]({{%relref "cont/i18n/_index.md" %}})
+* **Nombre de niveau infini dans le menu**
+* **Boutons suivant/précédent automatiquement générés pour naviguer entre les items du menu**
+* [Taille d'image, ombres...]({{%relref "cont/markdown.fr.md#images" %}})
+* [Fichiers joints]({{%relref "shortcodes/attachments.fr.md" %}})
+* [Lister les pages filles]({{%relref "shortcodes/children/_index.md" %}})
+* [Diagrammes Mermaid]({{%relref "shortcodes/mermaid.fr.md" %}}) (flowchart, sequence, gantt)
+* [Style configurable and variantes de couleurs]({{%relref "basics/configuration/_index.md"%}})
+* [Boutons]({{%relref "shortcodes/button.fr.md" %}}), [Messages Astuce/Note/Info/Attention]({{%relref "shortcodes/notice.fr.md" %}}), [Expand]({{%relref "shortcodes/expand.fr.md" %}})
+
+
+
+## Contribuer à cette documentation
+
+N'hésitez pas à mettre à jour ce contenu en cliquant sur le lien **Modifier cette page** en haut de chaque page, et créer la Pull Request associée.
+
+{{% notice info %}}
+Votre modification sera déployée automatiquement quand elle sera mergée.
+{{% /notice %}}
+
+## Site de documentation
+
+Cette documentation statique a été générée avec Hugo avec une simple commande : `hugo -t hugo-theme-learn` -- le code source est [disponible sur Github](https://github.com/matcornic/hugo-theme-learn)
+
+{{% notice note %}}
+Le site est auomatiquement publié et hébergé par [Netlify](https://www.netlify.com/). Plus d'infos sur le [déploiement de site Hugo avec Netlify](https://www.netlify.com/blog/2015/07/30/hosting-hugo-on-netlifyinsanely-fast-deploys/)(En anglais)
+{{% /notice %}}
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/_index.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/_index.en.md
new file mode 100755
index 0000000..56e2968
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/_index.en.md
@@ -0,0 +1,12 @@
+---
+title: Basics
+weight: 5
+pre: "1. "
+chapter: true
+---
+
+### Chapter 1
+
+# Basics
+
+Discover what this Hugo theme is all about and the core-concepts behind it.
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/_index.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/_index.fr.md
new file mode 100644
index 0000000..386bf19
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/_index.fr.md
@@ -0,0 +1,12 @@
+---
+title: Démarrage
+weight: 5
+pre: "1. "
+chapter: true
+---
+
+### Chapitre 1
+
+# Démarrage
+
+Découvrez comment utiliser ce thème Hugo et apprenez en les concepts
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/configuration/_index.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/configuration/_index.en.md
new file mode 100644
index 0000000..d4ed0e7
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/configuration/_index.en.md
@@ -0,0 +1,246 @@
+---
+date: 2016-04-09T16:50:16+02:00
+title: Configuration
+weight: 20
+---
+
+## Global site parameters
+
+On top of [Hugo global configuration](https://gohugo.io/overview/configuration/), **Hugo-theme-learn** lets you define the following parameters in your `config.toml` (here, values are default).
+
+Note that some of these parameters are explained in details in other sections of this documentation.
+
+```toml
+[params]
+ # Prefix URL to edit current page. Will display an "Edit this page" button on top right hand corner of every page.
+ # Useful to give opportunity to people to create merge request for your doc.
+ # See the config.toml file from this documentation site to have an example.
+ editURL = ""
+ # Author of the site, will be used in meta information
+ author = ""
+ # Description of the site, will be used in meta information
+ description = ""
+ # Shows a checkmark for visited pages on the menu
+ showVisitedLinks = false
+ # Disable search function. It will hide search bar
+ disableSearch = false
+ # Javascript and CSS cache are automatically busted when new version of site is generated.
+ # Set this to true to disable this behavior (some proxies don't handle well this optimization)
+ disableAssetsBusting = false
+ # Set this to true to disable copy-to-clipboard button for inline code.
+ disableInlineCopyToClipBoard = false
+ # A title for shortcuts in menu is set by default. Set this to true to disable it.
+ disableShortcutsTitle = false
+ # When using mulitlingual website, disable the switch language button.
+ disableLanguageSwitchingButton = false
+ # Order sections in menu by "weight" or "title". Default to "weight"
+ ordersectionsby = "weight"
+ # Change default color scheme with a variant one. Can be "red", "blue", "green".
+ themeVariant = ""
+```
+
+## Activate search
+
+If not already present, add the follow lines in the same `config.toml` file.
+
+```toml
+[outputs]
+home = [ "HTML", "RSS", "JSON"]
+```
+
+Learn theme uses the last improvement available in hugo version 20+ to generate a json index file ready to be consumed by lunr.js javascript search engine.
+
+> Hugo generate lunrjs index.json at the root of public folder.
+> When you build the site with hugo server, hugo generates it internally and of course it don’t show up in the filesystem
+
+
+## Style customization
+
+**Hugo-theme-learn** has been built to be as configurable as possible by defining multiple [partials](https://gohugo.io/templates/partials/)
+
+In `themes/hugo-theme-learn/layouts/partials/`, you will find all the partials defined for this theme. If you need to overwrite something, don't change the code directly. Instead [follow this page](https://gohugo.io/themes/customizing/). You'd create a new partial in the `layouts/partials` folder of your local project. This partial will have the priority.
+
+This theme defines the following partials :
+
+- *header*: the header of the content page (contains the breadcrumbs). _Not meant to be overwritten_
+- *custom-header*: custom headers in page. Meant to be overwritten when adding CSS imports. Don't forget to include `style` HTML tag directive in your file
+- *footer*: the footer of the content page (contains the arrows). _Not meant to be overwritten_
+- *custom-footer*: custom footer in page. Meant to be overwritten when adding Javacript. Don't forget to include `javascript` HTML tag directive in your file
+- *favicon*: the favicon
+- *logo*: the logo, on top left hand corner.
+- *meta*: HTML meta tags, if you want to change default behavior
+- *menu*: left menu. _Not meant to be overwritten_
+- *menu-footer*: footer of the the left menu
+- *search*: search box
+- *toc*: table of contents
+
+### Change the logo
+
+Create a new file in `layouts/partials/` named `logo.html`. Then write any HTML you want.
+You could use an `img` HTML tag and reference an image created under the *static* folder, or you could paste a SVG definition !
+
+{{% notice note %}}
+The size of the logo will adapt automatically
+{{% /notice %}}
+
+### Change the favicon
+
+If your favicon is a png, just drop off your image in your local `static/images/` folder and names it `favicon.png`
+
+If you need to change this default behavior, create a new file in `layouts/partials/` named `favicon.html`. Then write something like this:
+
+```html
+
+```
+
+### Change default colors {#theme-variant}
+
+**Hugo Learn theme** let you choose between 3 native color scheme variants, but feel free to add one yourself ! Default color scheme is based on [Grav Learn Theme](https://learn.getgrav.org/).
+
+#### Red variant
+
+```toml
+[params]
+ # Change default color scheme with a variant one. Can be "red", "blue", "green".
+ themeVariant = "red"
+```
+
+
+
+#### Blue variant
+
+```toml
+[params]
+ # Change default color scheme with a variant one. Can be "red", "blue", "green".
+ themeVariant = "blue"
+```
+
+
+
+#### Green variant
+
+```toml
+[params]
+ # Change default color scheme with a variant one. Can be "red", "blue", "green".
+ themeVariant = "green"
+```
+
+
+
+#### 'Yours‘ variant
+
+First, create a new CSS file in your local `static/css` folder prefixed by `theme` (e.g. with _mine_ theme `static/css/theme-mine.css`). Copy the following content and modify colors in CSS variables.
+
+```css
+
+:root{
+
+ --MAIN-TEXT-color:#323232; /* Color of text by default */
+ --MAIN-TITLES-TEXT-color: #5e5e5e; /* Color of titles h2-h3-h4-h5 */
+ --MAIN-LINK-color:#1C90F3; /* Color of links */
+ --MAIN-LINK-HOVER-color:#167ad0; /* Color of hovered links */
+ --MAIN-ANCHOR-color: #1C90F3; /* color of anchors on titles */
+
+ --MENU-HEADER-BG-color:#1C90F3; /* Background color of menu header */
+ --MENU-HEADER-BORDER-color:#33a1ff; /*Color of menu header border */
+
+ --MENU-SEARCH-BG-color:#167ad0; /* Search field background color (by default borders + icons) */
+ --MENU-SEARCH-BOX-color: #33a1ff; /* Override search field border color */
+ --MENU-SEARCH-BOX-ICONS-color: #a1d2fd; /* Override search field icons color */
+
+ --MENU-SECTIONS-ACTIVE-BG-color:#20272b; /* Background color of the active section and its childs */
+ --MENU-SECTIONS-BG-color:#252c31; /* Background color of other sections */
+ --MENU-SECTIONS-LINK-color: #ccc; /* Color of links in menu */
+ --MENU-SECTIONS-LINK-HOVER-color: #e6e6e6; /* Color of links in menu, when hovered */
+ --MENU-SECTION-ACTIVE-CATEGORY-color: #777; /* Color of active category text */
+ --MENU-SECTION-ACTIVE-CATEGORY-BG-color: #fff; /* Color of background for the active category (only) */
+
+ --MENU-VISITED-color: #33a1ff; /* Color of 'page visited' icons in menu */
+ --MENU-SECTION-HR-color: #20272b; /* Color of separator in menu */
+
+}
+
+body {
+ color: var(--MAIN-TEXT-color) !important;
+}
+
+textarea:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="password"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="text"]:focus, input[type="url"]:focus, input[type="color"]:focus, input[type="date"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="month"]:focus, input[type="time"]:focus, input[type="week"]:focus, select[multiple=multiple]:focus {
+ border-color: none;
+ box-shadow: none;
+}
+
+h2, h3, h4, h5 {
+ color: var(--MAIN-TITLES-TEXT-color) !important;
+}
+
+a {
+ color: var(--MAIN-LINK-color);
+}
+
+.anchor {
+ color: var(--MAIN-ANCHOR-color);
+}
+
+a:hover {
+ color: var(--MAIN-LINK-HOVER-color);
+}
+
+#sidebar ul li.visited > a .read-icon {
+ color: var(--MENU-VISITED-color);
+}
+
+#body a.highlight:after {
+ display: block;
+ content: "";
+ height: 1px;
+ width: 0%;
+ -webkit-transition: width 0.5s ease;
+ -moz-transition: width 0.5s ease;
+ -ms-transition: width 0.5s ease;
+ transition: width 0.5s ease;
+ background-color: var(--MAIN-HOVER-color);
+}
+#sidebar {
+ background-color: var(--MENU-SECTIONS-BG-color);
+}
+#sidebar #header-wrapper {
+ background: var(--MENU-HEADER-BG-color);
+ color: var(--MENU-SEARCH-BOX-color);
+ border-color: var(--MENU-HEADER-BORDER-color);
+}
+#sidebar .searchbox {
+ border-color: var(--MENU-SEARCH-BOX-color);
+ background: var(--MENU-SEARCH-BG-color);
+}
+#sidebar ul.topics > li.parent, #sidebar ul.topics > li.active {
+ background: var(--MENU-SECTIONS-ACTIVE-BG-color);
+}
+#sidebar .searchbox * {
+ color: var(--MENU-SEARCH-BOX-ICONS-color);
+}
+
+#sidebar a {
+ color: var(--MENU-SECTIONS-LINK-color);
+}
+
+#sidebar a:hover {
+ color: var(--MENU-SECTIONS-LINK-HOVER-color);
+}
+
+#sidebar ul li.active > a {
+ background: var(--MENU-SECTION-ACTIVE-CATEGORY-BG-color);
+ color: var(--MENU-SECTION-ACTIVE-CATEGORY-color) !important;
+}
+
+#sidebar hr {
+ border-color: var(--MENU-SECTION-HR-color);
+}
+```
+
+Then, set the `themeVariant` value with the name of your custom theme file. That's it !
+
+```toml
+[params]
+ # Change default color scheme with a variant one. Can be "red", "blue", "green".
+ themeVariant = "mine"
+```
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/configuration/_index.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/configuration/_index.fr.md
new file mode 100644
index 0000000..ab7f4fc
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/configuration/_index.fr.md
@@ -0,0 +1,245 @@
+---
+date: 2016-04-09T16:50:16+02:00
+title: Configuration
+weight: 20
+---
+
+## Global site parameters
+
+En plus de la [configuration globale d'Hugo](https://gohugo.io/overview/configuration/), **Hugo-theme-learn** vous permet de définir les paramètres suivant dans votre fichier `config.toml` (ci-dessous sont affichées les valeurs par défaut).
+
+Notez que certains de ces paramètres sont expliqués en détails dans d'autres sections de cette documentation.
+
+```toml
+[params]
+ # L'URL préfixe pour éditer la page courante. Ce paramètre affichera un bouton "Modifier cette page" on haut de de chacune des pages.
+ # Pratique pour donner les possibilité à vos utilisateurs de créer une merge request pour votre doc.
+ # Allez voir le fichier config.toml de cette documentation pour avoir un exemple.
+ editURL = ""
+ # Autheur du site, est utilisé dans les informations meta
+ author = ""
+ # Description du site, est utilisé dans les informations meta
+ description = ""
+ # Affiche une icône lorsque la page a été visitée
+ showVisitedLinks = false
+ # Désactive la fonction de recherche. Une valeur à true cache la barre de recherche.
+ disableSearch = false
+ # Par défaut, le cache Javascript et CSS est automatiquement vidé lorsqu'une nouvelle version du site est générée.
+ # Utilisez ce paramètre lorsque vous voulez désactiver ce comportement (c'est parfois incompatible avec certains proxys)
+ disableAssetsBusting = false
+ # Utilisez ce paramètre pour désactiver le bouton copy-to-clipboard pour le code formatté sur une ligne.
+ disableInlineCopyToClipBoard = false
+ # Un titre est défini par défaut lorsque vous utilisez un raccourci dans le menu. Utilisez ce paramètre pour le cacher.
+ disableShortcutsTitle = false
+ # Quand vous utilisez un site multi-langue, utilisez ce paramètre pour désactiver le bouton de changement de langue.
+ disableLanguageSwitchingButton = false
+ # Ordonne les sections dans menu par poids ("weight") ou titre ("title"). Défaut à "weight"
+ ordersectionsby = "weight"
+ # Utilisez ce paramètre pour modifier le schéma de couleur du site. Les valeurs par défaut sont "red", "blue", "green".
+ themeVariant = ""
+```
+
+## Activez la recherche
+
+Si ce n'est pas déjà présent, ajoutez les lignes suivantes dans le fichier `config.toml`.
+
+```toml
+[outputs]
+home = [ "HTML", "RSS", "JSON"]
+```
+
+Le thème *Learn* utilise les dernières amélioraions d'Hugo pour générer un fichier d'index JSON, prêt à être consommé par le moteur de recherche lunr.js.
+
+> Hugo génère lunrjs index.json à la racine du dossier `public`.
+> Quand vous générez le site avec `hugo server`, Hugo génère le fichier en mémoire, il n'est donc pas disponible sur le disque.
+
+## Personnaliser le style
+
+**Hugo-theme-learn** a été conçu pour être aussi configurable que possible en définissant plusieurs [partials](https://gohugo.io/templates/partials/)
+
+Dans `themes/hugo-theme-learn/layouts/partials/`, vous pourrez trouver tous les *partials* définis pour ce thème. Si vous avez besoin d'écraser quelque chose, ne modifiez pas le code directement. A la place, [suivez cette page](https://gohugo.io/themes/customizing/). Vous créerez alors un nouveau *partial* dans le dossier `layouts/partials` de votre site local. Ce *partial* aura la priorité.
+
+Ce thème définit les *partials* suivant :
+
+- *header*: l'en-tête de la page page (contient le fil d'Ariane). _Pas voué à être écrasé_
+- *custom-header*: En-tête personnalisé. Voué à être écrasé quand vous ajoutez des imports CSS. N'oubliez pas d'inclure la balise HTML `style` dans votre fichier
+- *footer*: le pied-de-page de la page (contains les flèches). _Pas voué à être écrasé_
+- *custom-footer*: Pied-de-page personnalisé. Voué à être écrasé quand vous ajoutez du Javascript. N'oubliez pas d'inclure la balise HTML `javascript` dans votre fichier
+- *favicon*: le favicon
+- *logo*: le logo, affiché un haut à gauche.
+- *meta*: les balises HTML meta, que vous pouvez écraser sans problème.
+- *menu*: Le menu à gauche. _Pas voué à être écrasé_
+- *menu-footer*: Le pied-de-page du menu
+- *search*: le champ de recherche
+- *toc*: le sommaire
+
+### Changer le logo
+
+Créez un nouveau fichier dans `layouts/partials/`, nommé `logo.html`. Puis, écrivez le code HTML voulu.
+Vous pourriez utiliser une balise HTML `img` et référencer une image créée dans le dossier *static*, voire même y coller un cod SVG !
+
+{{% notice note %}}
+La taille du logo va s'adapter automatiquement
+{{% /notice %}}
+
+### Changer le favicon
+
+Si votre favicon est un png, déposez votre image dans votre dossier local `static/images/` et nommez le `favicon.png`
+
+Si vous avez besoin de changer ce comportement par défaut, créer un nouveau fichier dans `layouts/partials/` et nommez le `favicon.html`. Puis ajoutez quelque chose comme:
+
+```html
+
+```
+
+### Changer les couleurs par défaut {#theme-variant}
+
+**Hugo Learn theme** vous permet de choisir nativement entre 3 schéma de couleurs, mais n'hésitez pas à en ajouter d'autres ! Les couleurs par défaut sont celles de [Grav Learn Theme](https://learn.getgrav.org/).
+
+#### Variante rouge
+
+```toml
+[params]
+ # Modifier le schéma de couleur par défaut. Peut être "red", "blue", "green".
+ themeVariant = "red"
+```
+
+
+
+#### Variante bleue
+
+```toml
+[params]
+ # Modifier le schéma de couleur par défaut. Peut être "red", "blue", "green".
+ themeVariant = "blue"
+```
+
+
+
+#### Variante verte
+
+```toml
+[params]
+ # Modifier le schéma de couleur par défaut. Peut être "red", "blue", "green".
+ themeVariant = "green"
+```
+
+
+
+#### Votre variante
+
+Premièrement, créez un nouveau fichier CSS dans votre dossier `static/css`, préfixé par `theme` (ex: avec le theme_lemien_ `static/css/theme-lemien.css`). Copiez le contenu suivant et modifiez les couleurs dans les variables CSS.
+
+```css
+
+:root{
+
+ --MAIN-TEXT-color:#323232; /* Color of text by default */
+ --MAIN-TITLES-TEXT-color: #5e5e5e; /* Color of titles h2-h3-h4-h5 */
+ --MAIN-LINK-color:#1C90F3; /* Color of links */
+ --MAIN-LINK-HOVER-color:#167ad0; /* Color of hovered links */
+ --MAIN-ANCHOR-color: #1C90F3; /* color of anchors on titles */
+
+ --MENU-HEADER-BG-color:#1C90F3; /* Background color of menu header */
+ --MENU-HEADER-BORDER-color:#33a1ff; /*Color of menu header border */
+
+ --MENU-SEARCH-BG-color:#167ad0; /* Search field background color (by default borders + icons) */
+ --MENU-SEARCH-BOX-color: #33a1ff; /* Override search field border color */
+ --MENU-SEARCH-BOX-ICONS-color: #a1d2fd; /* Override search field icons color */
+
+ --MENU-SECTIONS-ACTIVE-BG-color:#20272b; /* Background color of the active section and its childs */
+ --MENU-SECTIONS-BG-color:#252c31; /* Background color of other sections */
+ --MENU-SECTIONS-LINK-color: #ccc; /* Color of links in menu */
+ --MENU-SECTIONS-LINK-HOVER-color: #e6e6e6; /* Color of links in menu, when hovered */
+ --MENU-SECTION-ACTIVE-CATEGORY-color: #777; /* Color of active category text */
+ --MENU-SECTION-ACTIVE-CATEGORY-BG-color: #fff; /* Color of background for the active category (only) */
+
+ --MENU-VISITED-color: #33a1ff; /* Color of 'page visited' icons in menu */
+ --MENU-SECTION-HR-color: #20272b; /* Color of separator in menu */
+
+}
+
+body {
+ color: var(--MAIN-TEXT-color) !important;
+}
+
+textarea:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="password"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="text"]:focus, input[type="url"]:focus, input[type="color"]:focus, input[type="date"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="month"]:focus, input[type="time"]:focus, input[type="week"]:focus, select[multiple=multiple]:focus {
+ border-color: none;
+ box-shadow: none;
+}
+
+h2, h3, h4, h5 {
+ color: var(--MAIN-TITLES-TEXT-color) !important;
+}
+
+a {
+ color: var(--MAIN-LINK-color);
+}
+
+.anchor {
+ color: var(--MAIN-ANCHOR-color);
+}
+
+a:hover {
+ color: var(--MAIN-LINK-HOVER-color);
+}
+
+#sidebar ul li.visited > a .read-icon {
+ color: var(--MENU-VISITED-color);
+}
+
+#body a.highlight:after {
+ display: block;
+ content: "";
+ height: 1px;
+ width: 0%;
+ -webkit-transition: width 0.5s ease;
+ -moz-transition: width 0.5s ease;
+ -ms-transition: width 0.5s ease;
+ transition: width 0.5s ease;
+ background-color: var(--MAIN-HOVER-color);
+}
+#sidebar {
+ background-color: var(--MENU-SECTIONS-BG-color);
+}
+#sidebar #header-wrapper {
+ background: var(--MENU-HEADER-BG-color);
+ color: var(--MENU-SEARCH-BOX-color);
+ border-color: var(--MENU-HEADER-BORDER-color);
+}
+#sidebar .searchbox {
+ border-color: var(--MENU-SEARCH-BOX-color);
+ background: var(--MENU-SEARCH-BG-color);
+}
+#sidebar ul.topics > li.parent, #sidebar ul.topics > li.active {
+ background: var(--MENU-SECTIONS-ACTIVE-BG-color);
+}
+#sidebar .searchbox * {
+ color: var(--MENU-SEARCH-BOX-ICONS-color);
+}
+
+#sidebar a {
+ color: var(--MENU-SECTIONS-LINK-color);
+}
+
+#sidebar a:hover {
+ color: var(--MENU-SECTIONS-LINK-HOVER-color);
+}
+
+#sidebar ul li.active > a {
+ background: var(--MENU-SECTION-ACTIVE-CATEGORY-BG-color);
+ color: var(--MENU-SECTION-ACTIVE-CATEGORY-color) !important;
+}
+
+#sidebar hr {
+ border-color: var(--MENU-SECTION-HR-color);
+}
+```
+
+Puis, configurez le paramètre `themeVariant` avec le nom de votre variante. C'est tout !
+
+```toml
+[params]
+ # Modifier le schéma de couleur par défaut. Peut être "red", "blue", "green".
+ themeVariant = "lemien"
+```
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/configuration/images/blue-variant.png b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/configuration/images/blue-variant.png
new file mode 100644
index 0000000..1797d47
Binary files /dev/null and b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/configuration/images/blue-variant.png differ
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/configuration/images/green-variant.png b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/configuration/images/green-variant.png
new file mode 100644
index 0000000..68d6158
Binary files /dev/null and b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/configuration/images/green-variant.png differ
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/configuration/images/red-variant.png b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/configuration/images/red-variant.png
new file mode 100644
index 0000000..3964f69
Binary files /dev/null and b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/configuration/images/red-variant.png differ
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/installation/_index.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/installation/_index.en.md
new file mode 100644
index 0000000..42c6a24
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/installation/_index.en.md
@@ -0,0 +1,100 @@
+---
+title: Installation
+weight: 15
+---
+
+The following steps are here to help you initialize your new website. If you don't know Hugo at all, we strongly suggest you to train by following this [great documentation for beginners](https://gohugo.io/overview/quickstart/).
+
+## Create your project
+
+Hugo provides a `new` command to create a new website.
+
+```
+hugo new site
+```
+
+## Install the theme
+
+Install the **Hugo-theme-learn** theme by following [this documentation](https://gohugo.io/themes/installing/)
+
+The theme's repository is: https://github.com/matcornic/hugo-theme-learn.git
+
+Alternatively, you can [download the theme as .zip](https://github.com/matcornic/hugo-theme-learn/archive/master.zip) file and extract it in the themes directory
+
+## Basic configuration
+
+When building the website, you can set a theme by using `--theme` option. We suggest you to edit your configuration file and set the theme by default. By the way, add requirements for search functionnality to be enabled.
+
+```toml
+# Change the default theme to be use when building the site with Hugo
+theme = "hugo-theme-learn"
+
+# For search functionnality
+[outputs]
+home = [ "HTML", "RSS", "JSON"]
+```
+
+## Create your first chapter page
+
+Chapters are pages containing other child pages. It has a special layout style and usually just contains a _chapter name_, the _title_ and a _brief abstract_ of the section.
+
+```
+### Chapter 1
+
+# Basics
+
+Discover what this Hugo theme is all about and the core-concepts behind it.
+```
+
+renders as
+
+
+
+**Hugo-theme-learn** provides archetypes to create skeletons for your website. Begin by creating your first chapter page with the following command
+
+```
+hugo new --kind chapter basics/_index.md
+```
+
+By opening the given file, you should see the property `chapter=true` on top, meaning this page is a _chapter_.
+
+## Create your first content pages
+
+Then, create content pages inside the previous chapter. Here are two ways to create content in the chapter :
+
+```
+hugo new basics/first-content.md
+hugo new basics/second-content/_index.md
+```
+
+Feel free to edit thoses files by adding some sample content and replacing `title` value in the beginning of the files.
+
+## Launching the website locally
+
+Launch the following command:
+
+```
+hugo serve
+```
+
+Go to `http://localhost:1313`
+
+You should notice three things:
+
+1. You have a left **Basics** menu, containing two submenus with names equals to `title` properties in previously created files.
+2. The home page explains you to how to customize it. Follow the instructions.
+3. With `hugo serve` command, the page refresh as soon as you save a file. Neat !
+
+## Build the website
+
+When your site is ready to deploy, launch the following command:
+
+```
+hugo
+```
+
+A `public` folder has been generated, containing all statics content and assets for your website. It can now be deployed on any web server !
+
+{{% notice note %}}
+This website can be automatically published and hosted with [Netlify](https://www.netlify.com/) (Read more about [Automated HUGO deployments with Netlify](https://www.netlify.com/blog/2015/07/30/hosting-hugo-on-netlifyinsanely-fast-deploys/)). Alternatively, you can use [Github pages](https://gohugo.io/hosting-and-deployment/hosting-on-github/)
+{{% /notice %}}
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/installation/_index.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/installation/_index.fr.md
new file mode 100644
index 0000000..1e75140
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/installation/_index.fr.md
@@ -0,0 +1,100 @@
+---
+title: Installation
+weight: 15
+---
+
+Les étapes suivantes sont là pour vous aider à initialiser votre site. Si vous ne connaissez pas du tout Hugo, il est fortement conseillé de vous entrainer en suivant ce [super tuto pour débutants](https://gohugo.io/overview/quickstart/).
+
+## Créer votre projet
+
+Hugo fournit une commande `new` pour créer un nouveau site.
+
+```
+hugo new site
+```
+
+## Installer le thème
+
+Installer le thème **Hugo-theme-learn** en suivant [cette documentation](https://gohugo.io/themes/installing/)
+
+Le repo du thème est : https://github.com/matcornic/hugo-theme-learn.git
+
+Sinon, vous pouvez [télécharger le thème sous forme d'un fichier .zip](https://github.com/matcornic/hugo-theme-learn/archive/master.zip) et extrayez le dans votre dossier de thèmes.
+
+## Configuration simple
+
+Lorsque vous générez votre site, vous pouvez définir un thème en utilisant l'option `--theme`. Il est conseillé de modifier votre fichier de configuration `config.toml` and définir votre thème par défaut. En passant, ajoutez les prérequis à l'utilisation de la fonctionnalité de recherche.
+
+```toml
+# Modifiez le thème pour qu'il soit utilisé par défaut à chaque génération de site.
+theme = "hugo-theme-learn"
+
+# Pour la fonctionnalité de recherche
+[outputs]
+home = [ "HTML", "RSS", "JSON"]
+```
+
+## Créer votre première page chapitre
+
+Les *chapitres* sont des pages contenant d'autre pages filles. Elles ont un affichage spécial et contiennent habituellement juste un _nom_ de chapitre, le _titre_ et un _résumé_ de la section.
+
+```
+### Chapitre 1
+
+# Démarrage
+
+Découvrez comment utiliser ce thème Hugo et apprenez en les concepts
+```
+
+s'affiche comme
+
+
+
+**Hugo-theme-learn** fournit des archétypes pour créer des squelettes pour votre site. Commencez par créer votre premier chapitre avec la commande suivante:
+
+```
+hugo new --kind chapter basics/_index.md
+```
+
+En ouvrant le fichier généré, vous devriez voir la propriété `chapter=true` en haut, paramètre quit définit que le page est un _chapitre_.
+
+## Créer votre première page
+
+Puis, créez votre premier page dans le chapitre précédent. Pour ce faire, il existe deux possibilités :
+
+```
+hugo new basics/first-content.md
+hugo new basics/second-content/_index.md
+```
+
+N'hésitez pas à éditer ces fichiers en ajoutant des exemple de contenu et en remplaçant le paramètre `title` au début du fichier.
+
+## Lancer le site localement
+
+Lancez la commande suivante :
+
+```
+hugo serve
+```
+
+Se rendre sur `http://localhost:1313`
+
+Vous devriez voir trois choses:
+
+1. Vous avez un menu **Basics** à gauche, qui contient deux sous-menu avec des noms égal au paramètre `title` des fichiers précédemment générés.
+2. La page d'accueil vous explique comment la modifier. Suivez les instructions.
+3. Avec la commande `hugo serve`, la page se rafraichit automatiquement à chaque fois que vous sauvegardez. Super !
+
+## Générez le site
+
+Quand votre site est prêt à être déployé, lancez la commande suivante:
+
+```
+hugo
+```
+
+Un dossier `public` a été généré. Il contient tout le contenu statique et les ressources nécessaires pour votre site. Votre site peut maintenant être déployé en utilisant n'importe quel serveur !
+
+{{% notice note %}}
+Ce site peut être automatiquement publié et hébergé avec [Netlify](https://www.netlify.com/) ([Plus d'infos](https://www.netlify.com/blog/2015/07/30/hosting-hugo-on-netlifyinsanely-fast-deploys/)). Sinon, vous pouvez utiliser les [Github pages](https://gohugo.io/hosting-and-deployment/hosting-on-github/)
+{{% /notice %}}
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/installation/images/chapter.png b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/installation/images/chapter.png
new file mode 100644
index 0000000..103a88e
Binary files /dev/null and b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/installation/images/chapter.png differ
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/requirements/_index.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/requirements/_index.en.md
new file mode 100755
index 0000000..b6d5b38
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/requirements/_index.en.md
@@ -0,0 +1,11 @@
+---
+title: Requirements
+weight: 10
+disableToc: true
+---
+
+Thanks to the simplicity of Hugo, this page is as empty as this theme needs requirements.
+
+Just download latest version of [Hugo binary (> 0.25)](https://gohugo.io/getting-started/installing/) for your OS (Windows, Linux, Mac) : it's that simple.
+
+
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/requirements/_index.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/requirements/_index.fr.md
new file mode 100755
index 0000000..6e07374
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/requirements/_index.fr.md
@@ -0,0 +1,11 @@
+---
+title: Prérequis
+weight: 10
+disableToc: true
+---
+
+Grâce à la simplicité d'Hugo, cette page est vide car il n'y a quasi pas de prérequis pour utiliser le thème.
+
+Téléchargez la dernière version du [binaire Hugo (> 0.25)](https://gohugo.io/getting-started/installing/) pour votre Système d'exploitation (Windows, Linux, Mac) : et c'est tout !
+
+
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/requirements/images/magic.gif b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/requirements/images/magic.gif
new file mode 100644
index 0000000..235c4ed
Binary files /dev/null and b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/requirements/images/magic.gif differ
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/_index.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/_index.en.md
new file mode 100755
index 0000000..cbdc696
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/_index.en.md
@@ -0,0 +1,12 @@
+---
+title: Content
+weight: 10
+chapter: true
+pre: "2. "
+---
+
+### Chapter 2
+
+# Content
+
+Find out how to create and organize your content quickly and intuitively.
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/_index.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/_index.fr.md
new file mode 100755
index 0000000..dae5873
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/_index.fr.md
@@ -0,0 +1,12 @@
+---
+title: Contenu
+weight: 10
+chapter: true
+pre: "2. "
+---
+
+### Chapitre 2
+
+# Contenu
+
+Découvrez comment créer et organiser votre contenu facilement et intuitivement.
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/archetypes.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/archetypes.en.md
new file mode 100644
index 0000000..0e5350e
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/archetypes.en.md
@@ -0,0 +1,57 @@
+---
+title: Archetypes
+weight: 10
+---
+
+Using the command: `hugo new [relative new content path]`, you can start a content file with the date and title automatically set. While this is a welcome feature, active writers need more : [archetypes](https://gohugo.io/content/archetypes/).
+
+It is pre-configured skeleton pages with default front matter. Please refer to the documentation for types of page to understand the differences.
+
+## Chapter {#archetypes-chapter}
+
+To create a Chapter page, run the following commands
+
+```
+hugo new --kind chapter /_index.md
+```
+
+It will create a page with predefined Front-Matter:
+
+```markdown
++++
+title = "{{ replace .TranslationBaseName "-" " " | title }}"
+date = {{ .Date }}
+weight = 5
+chapter = true
+pre = "X. "
++++
+
+### Chapter X
+
+# Some Chapter title
+
+Lorem Ipsum.
+```
+
+## Default
+
+To create a default page, run either one of the following commands
+
+```
+# Either
+hugo new //_index.md
+# Or
+hugo new /.md
+```
+
+It will create a page with predefined Front-Matter:
+
+```markdown
++++
+title = "{{ replace .TranslationBaseName "-" " " | title }}"
+date = {{ .Date }}
+weight = 5
++++
+
+Lorem Ipsum.
+```
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/archetypes.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/archetypes.fr.md
new file mode 100644
index 0000000..57df1de
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/archetypes.fr.md
@@ -0,0 +1,57 @@
+---
+title: Archétypes
+weight: 10
+---
+
+En utilisant la commande: `hugo new [chemin vers nouveau contenu]`, vous pouvez créer un nouveau fichier avec la date et le title automatiquement initialisé. Même si c'est une fonctionnalité intéressante, elle reste limitée pour les auteurs actifs qui ont besoin de mieux : les [archetypes](https://gohugo.io/content/archetypes/).
+
+Les archétypes sont des squelettes de pages préconfigurées avec un Front Matter par défaut. Merci de vous référer à la documentation pour connaitre les différents types de page.
+
+## Chapitre {#archetypes-chapter}
+
+Pour créer un chapitre, lancez les commandes suivantes
+
+```
+hugo new --kind chapter /_index.md
+```
+
+Cela crééra une page avec le Front Matter suivant:
+
+```markdown
++++
+title = "{{ replace .TranslationBaseName "-" " " | title }}"
+date = {{ .Date }}
+weight = 5
+chapter = true
+pre = "X. "
++++
+
+### Chapter X
+
+# Some Chapter title
+
+Lorem Ipsum.
+```
+
+## Défaut
+
+Pour créer une page classique, lancer l'une des deux commandes suivantes
+
+```
+# Soit
+hugo new //_index.md
+# Ou
+hugo new /.md
+```
+
+Cela crééra une page avec le Front Matter suivant:
+
+```markdown
++++
+title = "{{ replace .TranslationBaseName "-" " " | title }}"
+date = {{ .Date }}
+weight = 5
++++
+
+Lorem Ipsum.
+```
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/i18n/_index.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/i18n/_index.en.md
new file mode 100644
index 0000000..f53d890
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/i18n/_index.en.md
@@ -0,0 +1,78 @@
+---
+date: 2016-04-09T16:50:16+02:00
+title: Multilingual and i18n
+weight: 30
+---
+
+**Learn theme** is fully compatible with Hugo multilingual mode.
+
+It provides:
+
+- Translation strings for default values (English and French). Feel free to contribute !
+- Automatic menu generation from multilingual content
+- In-browser language switching
+
+
+
+## Basic configuration
+
+After learning [how Hugo handle multilingual websites](https://gohugo.io/content-management/multilingual), define your languages in your `config.toml` file.
+
+For example with current French and English website.
+
+```toml
+# English is the default language
+defaultContentLanguage = "en"
+# Force to have /en/my-page and /fr/my-page routes, even for default language.
+defaultContentLanguageInSubdir= true
+
+[Languages]
+[Languages.en]
+title = "Documentation for Hugo Learn Theme"
+weight = 1
+languageName = "English"
+
+[Languages.fr]
+title = "Documentation du thème Hugo Learn"
+weight = 2
+languageName = "Français"
+```
+
+Then, for each new page, append the *id* of the language to the file.
+
+- Single file `my-page.md` is split in two files:
+ - in English: `my-page.en.md`
+ - in French: `my-page.fr.md`
+- Single file `_index.md` is split in two files:
+ - in English: `_index.en.md`
+ - in French: `_index.fr.md`
+
+{{% notice info %}}
+Be aware that only translated pages are displayed in menu. It's not replaced with default language content.
+{{% /notice %}}
+
+{{% notice tip %}}
+Use [slug](https://gohugo.io/content-management/multilingual/#translate-your-content) Front Matter parameter to translate urls too.
+{{% /notice %}}
+
+## Overwrite translation strings
+
+Translations strings are used for common default values used in the theme (*Edit this page* button, *Search placeholder* and so on). Translations are available in french and english but you may use another language or want to override default values.
+
+To override these values, create a new file in your local i18n folder `i18n/.toml` and inspire yourself from the theme `themes/hugo-theme-learn/i18n/en.toml`
+
+By the way, as these translations could be used by other people, please take the time to propose a translation by [making a PR](https://github.com/matcornic/hugo-theme-learn/pulls) to the theme !
+
+## Disable language switching
+
+Switching the language in the browser is a great feature, but for some reasons you may want to disable it.
+
+Just set `disableLanguageSwitchingButton=true` in your `config.toml`
+
+```toml
+[params]
+ # When using mulitlingual website, disable the switch language button.
+ disableLanguageSwitchingButton = true
+```
+
+
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/i18n/_index.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/i18n/_index.fr.md
new file mode 100644
index 0000000..c11f98f
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/i18n/_index.fr.md
@@ -0,0 +1,78 @@
+---
+date: 2016-04-09T16:50:16+02:00
+title: Multi-langue et i18n
+weight: 30
+---
+
+**Learne** est complètement compatible avec le mode multi-langue d'Hugo.
+
+Il fournit :
+
+- Des *translation strings* pour les valeurs par défaut utilisées par le thème (Anglais et Français). N'hésitez pas à contribuer !
+- Génération automatique du menu avec le contenu multi-langue
+- Modification de la langue dans le navigateur
+
+
+
+## Configuration simple
+
+Après avoir appris [comment Hugo gère les sites multi-langue](https://gohugo.io/content-management/multilingual), définissez vos langues dans votre fichier `config.toml`.
+
+Par exemple, pour ce site, avec du contenu en français et en anglais.
+
+```toml
+# Anglais est la langue par défaut
+defaultContentLanguage = "en"
+# Force d'avoir /en/ma-page et /fr/ma-page routes, même avec la langue par défaut.
+defaultContentLanguageInSubdir= true
+
+[Languages]
+[Languages.en]
+title = "Documentation for Hugo Learn Theme"
+weight = 1
+languageName = "English"
+
+[Languages.fr]
+title = "Documentation du thème Hugo Learn"
+weight = 2
+languageName = "Français"
+```
+
+Puis, pour chaque nouvelle page, ajoutez *l'id* de la langue du fichier.
+
+- Le fichier `my-page.md` est découpé en deux fichiers :
+ - en anglais : `my-page.en.md`
+ - en français : `my-page.fr.md`
+- Le fichier `_index.md` est découpé en deux fichiers :
+ - en anglais: `_index.en.md`
+ - en français: `_index.fr.md`
+
+{{% notice info %}}
+Attention, seulement les pages traduites sont affichées dans le menu. Le contenu n'est pas remplacé par les pages de la langue par défaut.
+{{% /notice %}}
+
+{{% notice tip %}}
+Utilisez le paramètre du Front Matter [slug](https://gohugo.io/content-management/multilingual/#translate-your-content) pour traduire également les URLs.
+{{% /notice %}}
+
+## Surcharger les *translation strings*
+
+Les *Translations strings* sont utilisées comme valeurs par défaut dans le thème (Bouton *Modifier la page*, Element de subsitution *Recherche*, etc.). Les traductions sont disponibles en français et en anglais mais vous pouvez utiliser n'importe quelle autre langue et surcharger avec vos propres valeurs.
+
+Pour surcharger ces valeurs, créer un nouveau fichier dans votre dossier i18n local `i18n/.toml` et inspirez vous du thème `themes/hugo-theme-learn/i18n/en.toml`
+
+D'ailleurs, ces traductions pour servir à tout le monde, donc svp prenez le temps de [proposer une Pull Request](https://github.com/matcornic/hugo-theme-learn/pulls) !
+
+## Désactiver le changement de langue
+
+Vous pouvez changer de langue directement dans le navigateur. C'est une super fonctionnalité, mais vous avez peut-être besoin de la désactiver.
+
+Pour ce faire, ajouter le paramètre `disableLanguageSwitchingButton=true` dans votre `config.toml`
+
+```toml
+[params]
+ # Quand vous utilisez un site en multi-langue, désactive le bouton de changment de langue.
+ disableLanguageSwitchingButton = true
+```
+
+
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/i18n/images/i18n-menu.gif b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/i18n/images/i18n-menu.gif
new file mode 100644
index 0000000..99ee222
Binary files /dev/null and b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/i18n/images/i18n-menu.gif differ
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/markdown.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/markdown.en.md
new file mode 100644
index 0000000..c6d1ff8
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/markdown.en.md
@@ -0,0 +1,663 @@
+---
+date: 2016-04-09T16:50:16+02:00
+title: Markdown syntax
+weight: 15
+---
+
+{{% notice note %}}
+This page is a shameful copy of the great [Grav original page](http://learn.getgrav.org/content/markdown).
+Only difference is information about image customization ([resizing]({{< relref "#resizing-image" >}}), [add CSS classes]({{< relref "#add-css-classes" >}})...)
+{{% /notice%}}
+
+Let's face it: Writing content for the Web is tiresome. WYSIWYG editors help alleviate this task, but they generally result in horrible code, or worse yet, ugly web pages.
+
+**Markdown** is a better way to write **HTML**, without all the complexities and ugliness that usually accompanies it.
+
+Some of the key benefits are:
+
+1. Markdown is simple to learn, with minimal extra characters so it's also quicker to write content.
+2. Less chance of errors when writing in markdown.
+3. Produces valid XHTML output.
+4. Keeps the content and the visual display separate, so you cannot mess up the look of your site.
+5. Write in any text editor or Markdown application you like.
+6. Markdown is a joy to use!
+
+John Gruber, the author of Markdown, puts it like this:
+
+> The overriding design goal for Markdown’s formatting syntax is to make it as readable as possible. The idea is that a Markdown-formatted document should be publishable as-is, as plain text, without looking like it’s been marked up with tags or formatting instructions. While Markdown’s syntax has been influenced by several existing text-to-HTML filters, the single biggest source of inspiration for Markdown’s syntax is the format of plain text email.
+> -- John Gruber
+
+
+Grav ships with built-in support for [Markdown](http://daringfireball.net/projects/markdown/) and [Markdown Extra](https://michelf.ca/projects/php-markdown/extra/). You must enable **Markdown Extra** in your `system.yaml` configuration file
+
+Without further delay, let us go over the main elements of Markdown and what the resulting HTML looks like:
+
+{{% notice info %}}
+ Bookmark this page for easy future reference!
+{{% /notice %}}
+
+## Headings
+
+Headings from `h1` through `h6` are constructed with a `#` for each level:
+
+```markdown
+# h1 Heading
+## h2 Heading
+### h3 Heading
+#### h4 Heading
+##### h5 Heading
+###### h6 Heading
+```
+
+Renders to:
+
+# h1 Heading
+## h2 Heading
+### h3 Heading
+#### h4 Heading
+##### h5 Heading
+###### h6 Heading
+
+HTML:
+
+```html
+
h1 Heading
+
h2 Heading
+
h3 Heading
+
h4 Heading
+
h5 Heading
+
h6 Heading
+```
+
+## Comments
+
+Comments should be HTML compatible
+
+```html
+
+```
+Comment below should **NOT** be seen:
+
+
+
+
+## Horizontal Rules
+
+The HTML `` element is for creating a "thematic break" between paragraph-level elements. In markdown, you can create a `` with any of the following:
+
+* `___`: three consecutive underscores
+* `---`: three consecutive dashes
+* `***`: three consecutive asterisks
+
+renders to:
+
+___
+
+---
+
+***
+
+
+## Body Copy
+
+Body copy written as normal, plain text will be wrapped with `` tags in the rendered HTML.
+
+So this body copy:
+
+```markdown
+Lorem ipsum dolor sit amet, graecis denique ei vel, at duo primis mandamus. Et legere ocurreret pri, animal tacimates complectitur ad cum. Cu eum inermis inimicus efficiendi. Labore officiis his ex, soluta officiis concludaturque ei qui, vide sensibus vim ad.
+```
+renders to this HTML:
+
+```html
+
Lorem ipsum dolor sit amet, graecis denique ei vel, at duo primis mandamus. Et legere ocurreret pri, animal tacimates complectitur ad cum. Cu eum inermis inimicus efficiendi. Labore officiis his ex, soluta officiis concludaturque ei qui, vide sensibus vim ad.
+```
+
+## Emphasis
+
+### Bold
+For emphasizing a snippet of text with a heavier font-weight.
+
+The following snippet of text is **rendered as bold text**.
+
+```markdown
+**rendered as bold text**
+```
+renders to:
+
+**rendered as bold text**
+
+and this HTML
+
+```html
+rendered as bold text
+```
+
+### Italics
+For emphasizing a snippet of text with italics.
+
+The following snippet of text is _rendered as italicized text_.
+
+```markdown
+_rendered as italicized text_
+```
+
+renders to:
+
+_rendered as italicized text_
+
+and this HTML:
+
+```html
+rendered as italicized text
+```
+
+
+### strikethrough
+In GFM (GitHub flavored Markdown) you can do strikethroughs.
+
+```markdown
+~~Strike through this text.~~
+```
+Which renders to:
+
+~~Strike through this text.~~
+
+HTML:
+
+```html
+Strike through this text.
+```
+
+## Blockquotes
+For quoting blocks of content from another source within your document.
+
+Add `>` before any text you want to quote.
+
+```markdown
+> **Fusion Drive** combines a hard drive with a flash storage (solid-state drive) and presents it as a single logical volume with the space of both drives combined.
+```
+
+Renders to:
+
+> **Fusion Drive** combines a hard drive with a flash storage (solid-state drive) and presents it as a single logical volume with the space of both drives combined.
+
+and this HTML:
+
+```html
+
+
Fusion Drive combines a hard drive with a flash storage (solid-state drive) and presents it as a single logical volume with the space of both drives combined.
+
+```
+
+Blockquotes can also be nested:
+
+```markdown
+> Donec massa lacus, ultricies a ullamcorper in, fermentum sed augue.
+Nunc augue augue, aliquam non hendrerit ac, commodo vel nisi.
+>> Sed adipiscing elit vitae augue consectetur a gravida nunc vehicula. Donec auctor
+odio non est accumsan facilisis. Aliquam id turpis in dolor tincidunt mollis ac eu diam.
+```
+
+Renders to:
+
+> Donec massa lacus, ultricies a ullamcorper in, fermentum sed augue.
+Nunc augue augue, aliquam non hendrerit ac, commodo vel nisi.
+>> Sed adipiscing elit vitae augue consectetur a gravida nunc vehicula. Donec auctor
+odio non est accumsan facilisis. Aliquam id turpis in dolor tincidunt mollis ac eu diam.
+
+
+## Notices
+
+{{% notice note %}}
+The old mechanism for notices overriding the block quote syntax (`>>>`) has been deprecated. Notices are now handled via a dedicated plugin called [Markdown Notices](https://github.com/getgrav/grav-plugin-markdown-notices)
+{{% /notice %}}
+
+
+## Lists
+
+### Unordered
+A list of items in which the order of the items does not explicitly matter.
+
+You may use any of the following symbols to denote bullets for each list item:
+
+```markdown
+* valid bullet
+- valid bullet
++ valid bullet
+```
+
+For example
+
+```markdown
++ Lorem ipsum dolor sit amet
++ Consectetur adipiscing elit
++ Integer molestie lorem at massa
++ Facilisis in pretium nisl aliquet
++ Nulla volutpat aliquam velit
+ - Phasellus iaculis neque
+ - Purus sodales ultricies
+ - Vestibulum laoreet porttitor sem
+ - Ac tristique libero volutpat at
++ Faucibus porta lacus fringilla vel
++ Aenean sit amet erat nunc
++ Eget porttitor lorem
+```
+Renders to:
+
++ Lorem ipsum dolor sit amet
++ Consectetur adipiscing elit
++ Integer molestie lorem at massa
++ Facilisis in pretium nisl aliquet
++ Nulla volutpat aliquam velit
+ - Phasellus iaculis neque
+ - Purus sodales ultricies
+ - Vestibulum laoreet porttitor sem
+ - Ac tristique libero volutpat at
++ Faucibus porta lacus fringilla vel
++ Aenean sit amet erat nunc
++ Eget porttitor lorem
+
+And this HTML
+
+```html
+
+
Lorem ipsum dolor sit amet
+
Consectetur adipiscing elit
+
Integer molestie lorem at massa
+
Facilisis in pretium nisl aliquet
+
Nulla volutpat aliquam velit
+
+
Phasellus iaculis neque
+
Purus sodales ultricies
+
Vestibulum laoreet porttitor sem
+
Ac tristique libero volutpat at
+
+
+
Faucibus porta lacus fringilla vel
+
Aenean sit amet erat nunc
+
Eget porttitor lorem
+
+```
+
+### Ordered
+
+A list of items in which the order of items does explicitly matter.
+
+```markdown
+1. Lorem ipsum dolor sit amet
+2. Consectetur adipiscing elit
+3. Integer molestie lorem at massa
+4. Facilisis in pretium nisl aliquet
+5. Nulla volutpat aliquam velit
+6. Faucibus porta lacus fringilla vel
+7. Aenean sit amet erat nunc
+8. Eget porttitor lorem
+```
+Renders to:
+
+1. Lorem ipsum dolor sit amet
+2. Consectetur adipiscing elit
+3. Integer molestie lorem at massa
+4. Facilisis in pretium nisl aliquet
+5. Nulla volutpat aliquam velit
+6. Faucibus porta lacus fringilla vel
+7. Aenean sit amet erat nunc
+8. Eget porttitor lorem
+
+And this HTML:
+
+```html
+
+
Lorem ipsum dolor sit amet
+
Consectetur adipiscing elit
+
Integer molestie lorem at massa
+
Facilisis in pretium nisl aliquet
+
Nulla volutpat aliquam velit
+
Faucibus porta lacus fringilla vel
+
Aenean sit amet erat nunc
+
Eget porttitor lorem
+
+```
+
+**TIP**: If you just use `1.` for each number, Markdown will automatically number each item. For example:
+
+```markdown
+1. Lorem ipsum dolor sit amet
+1. Consectetur adipiscing elit
+1. Integer molestie lorem at massa
+1. Facilisis in pretium nisl aliquet
+1. Nulla volutpat aliquam velit
+1. Faucibus porta lacus fringilla vel
+1. Aenean sit amet erat nunc
+1. Eget porttitor lorem
+```
+
+Renders to:
+
+1. Lorem ipsum dolor sit amet
+2. Consectetur adipiscing elit
+3. Integer molestie lorem at massa
+4. Facilisis in pretium nisl aliquet
+5. Nulla volutpat aliquam velit
+6. Faucibus porta lacus fringilla vel
+7. Aenean sit amet erat nunc
+8. Eget porttitor lorem
+
+## Code
+
+### Inline code
+Wrap inline snippets of code with `` ` ``.
+
+```markdown
+In this example, `` should be wrapped as **code**.
+```
+
+Renders to:
+
+In this example, `` should be wrapped with **code**.
+
+HTML:
+
+```html
+
In this example, <section></section> should be wrapped with code.
+```
+
+### Indented code
+
+Or indent several lines of code by at least four spaces, as in:
+
+
+ // Some comments
+ line 1 of code
+ line 2 of code
+ line 3 of code
+
+
+Renders to:
+
+ // Some comments
+ line 1 of code
+ line 2 of code
+ line 3 of code
+
+HTML:
+
+```html
+
+
+ // Some comments
+ line 1 of code
+ line 2 of code
+ line 3 of code
+
+
+```
+
+
+### Block code "fences"
+
+Use "fences" ```` ``` ```` to block in multiple lines of code.
+
+
+```
+
+### Syntax highlighting
+
+GFM, or "GitHub Flavored Markdown" also supports syntax highlighting. To activate it, simply add the file extension of the language you want to use directly after the first code "fence", ` ```js `, and syntax highlighting will automatically be applied in the rendered HTML. For example, to apply syntax highlighting to JavaScript code:
+
+
+
+Renders to:
+
+```js
+grunt.initConfig({
+ assemble: {
+ options: {
+ assets: 'docs/assets',
+ data: 'src/data/*.{json,yml}',
+ helpers: 'src/custom-helpers.js',
+ partials: ['src/partials/**/*.{hbs,md}']
+ },
+ pages: {
+ options: {
+ layout: 'default.hbs'
+ },
+ files: {
+ './': ['src/templates/pages/index.hbs']
+ }
+ }
+ }
+};
+```
+
+## Tables
+Tables are created by adding pipes as dividers between each cell, and by adding a line of dashes (also separated by bars) beneath the header. Note that the pipes do not need to be vertically aligned.
+
+
+```markdown
+| Option | Description |
+| ------ | ----------- |
+| data | path to data files to supply the data that will be passed into templates. |
+| engine | engine to be used for processing templates. Handlebars is the default. |
+| ext | extension to be used for dest files. |
+```
+
+Renders to:
+
+| Option | Description |
+| ------ | ----------- |
+| data | path to data files to supply the data that will be passed into templates. |
+| engine | engine to be used for processing templates. Handlebars is the default. |
+| ext | extension to be used for dest files. |
+
+And this HTML:
+
+```html
+
+
+
Option
+
Description
+
+
+
data
+
path to data files to supply the data that will be passed into templates.
+
+
+
engine
+
engine to be used for processing templates. Handlebars is the default.
+
+
+
ext
+
extension to be used for dest files.
+
+
+```
+
+### Right aligned text
+
+Adding a colon on the right side of the dashes below any heading will right align text for that column.
+
+```markdown
+| Option | Description |
+| ------:| -----------:|
+| data | path to data files to supply the data that will be passed into templates. |
+| engine | engine to be used for processing templates. Handlebars is the default. |
+| ext | extension to be used for dest files. |
+```
+
+| Option | Description |
+| ------:| -----------:|
+| data | path to data files to supply the data that will be passed into templates. |
+| engine | engine to be used for processing templates. Handlebars is the default. |
+| ext | extension to be used for dest files. |
+
+## Links
+
+### Basic link
+
+```markdown
+[Assemble](http://assemble.io)
+```
+
+Renders to (hover over the link, there is no tooltip):
+
+[Assemble](http://assemble.io)
+
+HTML:
+
+```html
+Assemble
+```
+
+
+### Add a title
+
+```markdown
+[Upstage](https://github.com/upstage/ "Visit Upstage!")
+```
+
+Renders to (hover over the link, there should be a tooltip):
+
+[Upstage](https://github.com/upstage/ "Visit Upstage!")
+
+HTML:
+
+```html
+Upstage
+```
+
+### Named Anchors
+
+Named anchors enable you to jump to the specified anchor point on the same page. For example, each of these chapters:
+
+```markdown
+# Table of Contents
+ * [Chapter 1](#chapter-1)
+ * [Chapter 2](#chapter-2)
+ * [Chapter 3](#chapter-3)
+```
+will jump to these sections:
+
+```markdown
+## Chapter 1
+Content for chapter one.
+
+## Chapter 2
+Content for chapter one.
+
+## Chapter 3
+Content for chapter one.
+```
+**NOTE** that specific placement of the anchor tag seems to be arbitrary. They are placed inline here since it seems to be unobtrusive, and it works.
+
+## Images {#images}
+Images have a similar syntax to links but include a preceding exclamation point.
+
+```markdown
+
+```
+
+
+or
+```markdown
+
+```
+
+
+Like links, Images also have a footnote style syntax
+
+### Alternative usage : note images
+
+```markdown
+![Alt text][id]
+```
+![Alt text][id]
+
+With a reference later in the document defining the URL location:
+
+[id]: http://octodex.github.com/images/dojocat.jpg "The Dojocat"
+
+ [id]: http://octodex.github.com/images/dojocat.jpg "The Dojocat"
+
+### Resizing image
+
+Add HTTP parameters `width` and/or `height` to the link image to resize the image. Values are CSS values (default is `auto`).
+
+```markdown
+
+```
+
+
+
+```markdown
+
+```
+
+
+
+```markdown
+
+```
+
+
+
+### Add CSS classes
+
+Add a HTTP `classes` parameter to the link image to add CSS classes. `shadow`and `border` are available but you could define other ones.
+
+```markdown
+
+```
+
+
+```markdown
+
+```
+
+
+```markdown
+
+```
+
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/markdown.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/markdown.fr.md
new file mode 100644
index 0000000..aa7296e
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/markdown.fr.md
@@ -0,0 +1,665 @@
+---
+date: 2016-04-09T16:50:16+02:00
+title: Syntaxe Markdown
+weight: 15
+---
+
+{{% notice note %}}
+Cette page est une copie de la [doc de Grav](http://learn.getgrav.org/content/markdown).
+La seule différence porte sur la personalisation des images ([taille]({{< relref "#resizing-image" >}}), [ajout de classes CSS]({{< relref "#add-css-classes" >}})...)
+Pour des raisons évidentes, cette page n'a pas été traduites en français 😁
+{{% /notice%}}
+
+Let's face it: Writing content for the Web is tiresome. WYSIWYG editors help alleviate this task, but they generally result in horrible code, or worse yet, ugly web pages.
+
+**Markdown** is a better way to write **HTML**, without all the complexities and ugliness that usually accompanies it.
+
+Some of the key benefits are:
+
+1. Markdown is simple to learn, with minimal extra characters so it's also quicker to write content.
+2. Less chance of errors when writing in markdown.
+3. Produces valid XHTML output.
+4. Keeps the content and the visual display separate, so you cannot mess up the look of your site.
+5. Write in any text editor or Markdown application you like.
+6. Markdown is a joy to use!
+
+John Gruber, the author of Markdown, puts it like this:
+
+> The overriding design goal for Markdown’s formatting syntax is to make it as readable as possible. The idea is that a Markdown-formatted document should be publishable as-is, as plain text, without looking like it’s been marked up with tags or formatting instructions. While Markdown’s syntax has been influenced by several existing text-to-HTML filters, the single biggest source of inspiration for Markdown’s syntax is the format of plain text email.
+> -- John Gruber
+
+
+Grav ships with built-in support for [Markdown](http://daringfireball.net/projects/markdown/) and [Markdown Extra](https://michelf.ca/projects/php-markdown/extra/). You must enable **Markdown Extra** in your `system.yaml` configuration file
+
+Without further delay, let us go over the main elements of Markdown and what the resulting HTML looks like:
+
+{{% notice info %}}
+ Bookmark this page for easy future reference!
+{{% /notice %}}
+
+## Headings
+
+Headings from `h1` through `h6` are constructed with a `#` for each level:
+
+```markdown
+# h1 Heading
+## h2 Heading
+### h3 Heading
+#### h4 Heading
+##### h5 Heading
+###### h6 Heading
+```
+
+Renders to:
+
+# h1 Heading
+## h2 Heading
+### h3 Heading
+#### h4 Heading
+##### h5 Heading
+###### h6 Heading
+
+HTML:
+
+```html
+
h1 Heading
+
h2 Heading
+
h3 Heading
+
h4 Heading
+
h5 Heading
+
h6 Heading
+```
+
+## Comments
+
+Comments should be HTML compatible
+
+```html
+
+```
+Comment below should **NOT** be seen:
+
+
+
+
+## Horizontal Rules
+
+The HTML `` element is for creating a "thematic break" between paragraph-level elements. In markdown, you can create a `` with any of the following:
+
+* `___`: three consecutive underscores
+* `---`: three consecutive dashes
+* `***`: three consecutive asterisks
+
+renders to:
+
+___
+
+---
+
+***
+
+
+## Body Copy
+
+Body copy written as normal, plain text will be wrapped with `` tags in the rendered HTML.
+
+So this body copy:
+
+```markdown
+Lorem ipsum dolor sit amet, graecis denique ei vel, at duo primis mandamus. Et legere ocurreret pri, animal tacimates complectitur ad cum. Cu eum inermis inimicus efficiendi. Labore officiis his ex, soluta officiis concludaturque ei qui, vide sensibus vim ad.
+```
+renders to this HTML:
+
+```html
+
Lorem ipsum dolor sit amet, graecis denique ei vel, at duo primis mandamus. Et legere ocurreret pri, animal tacimates complectitur ad cum. Cu eum inermis inimicus efficiendi. Labore officiis his ex, soluta officiis concludaturque ei qui, vide sensibus vim ad.
+```
+
+## Emphasis
+
+### Bold
+For emphasizing a snippet of text with a heavier font-weight.
+
+The following snippet of text is **rendered as bold text**.
+
+```markdown
+**rendered as bold text**
+```
+renders to:
+
+**rendered as bold text**
+
+and this HTML
+
+```html
+rendered as bold text
+```
+
+### Italics
+For emphasizing a snippet of text with italics.
+
+The following snippet of text is _rendered as italicized text_.
+
+```markdown
+_rendered as italicized text_
+```
+
+renders to:
+
+_rendered as italicized text_
+
+and this HTML:
+
+```html
+rendered as italicized text
+```
+
+
+### strikethrough
+In GFM (GitHub flavored Markdown) you can do strikethroughs.
+
+```markdown
+~~Strike through this text.~~
+```
+Which renders to:
+
+~~Strike through this text.~~
+
+HTML:
+
+```html
+Strike through this text.
+```
+
+## Blockquotes
+For quoting blocks of content from another source within your document.
+
+Add `>` before any text you want to quote.
+
+```markdown
+> **Fusion Drive** combines a hard drive with a flash storage (solid-state drive) and presents it as a single logical volume with the space of both drives combined.
+```
+
+Renders to:
+
+> **Fusion Drive** combines a hard drive with a flash storage (solid-state drive) and presents it as a single logical volume with the space of both drives combined.
+
+and this HTML:
+
+```html
+
+
Fusion Drive combines a hard drive with a flash storage (solid-state drive) and presents it as a single logical volume with the space of both drives combined.
+
+```
+
+Blockquotes can also be nested:
+
+```markdown
+> Donec massa lacus, ultricies a ullamcorper in, fermentum sed augue.
+Nunc augue augue, aliquam non hendrerit ac, commodo vel nisi.
+>> Sed adipiscing elit vitae augue consectetur a gravida nunc vehicula. Donec auctor
+odio non est accumsan facilisis. Aliquam id turpis in dolor tincidunt mollis ac eu diam.
+```
+
+Renders to:
+
+> Donec massa lacus, ultricies a ullamcorper in, fermentum sed augue.
+Nunc augue augue, aliquam non hendrerit ac, commodo vel nisi.
+>> Sed adipiscing elit vitae augue consectetur a gravida nunc vehicula. Donec auctor
+odio non est accumsan facilisis. Aliquam id turpis in dolor tincidunt mollis ac eu diam.
+
+
+## Notices
+
+{{% notice note %}}
+The old mechanism for notices overriding the block quote syntax (`>>>`) has been deprecated. Notices are now handled via a dedicated plugin called [Markdown Notices](https://github.com/getgrav/grav-plugin-markdown-notices)
+{{% /notice %}}
+
+
+## Lists
+
+### Unordered
+A list of items in which the order of the items does not explicitly matter.
+
+You may use any of the following symbols to denote bullets for each list item:
+
+```markdown
+* valid bullet
+- valid bullet
++ valid bullet
+```
+
+For example
+
+```markdown
++ Lorem ipsum dolor sit amet
++ Consectetur adipiscing elit
++ Integer molestie lorem at massa
++ Facilisis in pretium nisl aliquet
++ Nulla volutpat aliquam velit
+ - Phasellus iaculis neque
+ - Purus sodales ultricies
+ - Vestibulum laoreet porttitor sem
+ - Ac tristique libero volutpat at
++ Faucibus porta lacus fringilla vel
++ Aenean sit amet erat nunc
++ Eget porttitor lorem
+```
+Renders to:
+
++ Lorem ipsum dolor sit amet
++ Consectetur adipiscing elit
++ Integer molestie lorem at massa
++ Facilisis in pretium nisl aliquet
++ Nulla volutpat aliquam velit
+ - Phasellus iaculis neque
+ - Purus sodales ultricies
+ - Vestibulum laoreet porttitor sem
+ - Ac tristique libero volutpat at
++ Faucibus porta lacus fringilla vel
++ Aenean sit amet erat nunc
++ Eget porttitor lorem
+
+And this HTML
+
+```html
+
+
Lorem ipsum dolor sit amet
+
Consectetur adipiscing elit
+
Integer molestie lorem at massa
+
Facilisis in pretium nisl aliquet
+
Nulla volutpat aliquam velit
+
+
Phasellus iaculis neque
+
Purus sodales ultricies
+
Vestibulum laoreet porttitor sem
+
Ac tristique libero volutpat at
+
+
+
Faucibus porta lacus fringilla vel
+
Aenean sit amet erat nunc
+
Eget porttitor lorem
+
+```
+
+### Ordered
+
+A list of items in which the order of items does explicitly matter.
+
+```markdown
+1. Lorem ipsum dolor sit amet
+2. Consectetur adipiscing elit
+3. Integer molestie lorem at massa
+4. Facilisis in pretium nisl aliquet
+5. Nulla volutpat aliquam velit
+6. Faucibus porta lacus fringilla vel
+7. Aenean sit amet erat nunc
+8. Eget porttitor lorem
+```
+Renders to:
+
+1. Lorem ipsum dolor sit amet
+2. Consectetur adipiscing elit
+3. Integer molestie lorem at massa
+4. Facilisis in pretium nisl aliquet
+5. Nulla volutpat aliquam velit
+6. Faucibus porta lacus fringilla vel
+7. Aenean sit amet erat nunc
+8. Eget porttitor lorem
+
+And this HTML:
+
+```html
+
+
Lorem ipsum dolor sit amet
+
Consectetur adipiscing elit
+
Integer molestie lorem at massa
+
Facilisis in pretium nisl aliquet
+
Nulla volutpat aliquam velit
+
Faucibus porta lacus fringilla vel
+
Aenean sit amet erat nunc
+
Eget porttitor lorem
+
+```
+
+**TIP**: If you just use `1.` for each number, Markdown will automatically number each item. For example:
+
+```markdown
+1. Lorem ipsum dolor sit amet
+1. Consectetur adipiscing elit
+1. Integer molestie lorem at massa
+1. Facilisis in pretium nisl aliquet
+1. Nulla volutpat aliquam velit
+1. Faucibus porta lacus fringilla vel
+1. Aenean sit amet erat nunc
+1. Eget porttitor lorem
+```
+
+Renders to:
+
+1. Lorem ipsum dolor sit amet
+2. Consectetur adipiscing elit
+3. Integer molestie lorem at massa
+4. Facilisis in pretium nisl aliquet
+5. Nulla volutpat aliquam velit
+6. Faucibus porta lacus fringilla vel
+7. Aenean sit amet erat nunc
+8. Eget porttitor lorem
+
+## Code
+
+### Inline code
+Wrap inline snippets of code with `` ` ``.
+
+```markdown
+In this example, `` should be wrapped as **code**.
+```
+
+Renders to:
+
+In this example, `` should be wrapped with **code**.
+
+HTML:
+
+```html
+
In this example, <section></section> should be wrapped with code.
+```
+
+### Indented code
+
+Or indent several lines of code by at least four spaces, as in:
+
+
+ // Some comments
+ line 1 of code
+ line 2 of code
+ line 3 of code
+
+
+Renders to:
+
+ // Some comments
+ line 1 of code
+ line 2 of code
+ line 3 of code
+
+HTML:
+
+```html
+
+
+ // Some comments
+ line 1 of code
+ line 2 of code
+ line 3 of code
+
+
+```
+
+
+### Block code "fences"
+
+Use "fences" ```` ``` ```` to block in multiple lines of code.
+
+
+```
+
+### Syntax highlighting
+
+GFM, or "GitHub Flavored Markdown" also supports syntax highlighting. To activate it, simply add the file extension of the language you want to use directly after the first code "fence", ` ```js `, and syntax highlighting will automatically be applied in the rendered HTML. For example, to apply syntax highlighting to JavaScript code:
+
+
+
+Renders to:
+
+```js
+grunt.initConfig({
+ assemble: {
+ options: {
+ assets: 'docs/assets',
+ data: 'src/data/*.{json,yml}',
+ helpers: 'src/custom-helpers.js',
+ partials: ['src/partials/**/*.{hbs,md}']
+ },
+ pages: {
+ options: {
+ layout: 'default.hbs'
+ },
+ files: {
+ './': ['src/templates/pages/index.hbs']
+ }
+ }
+ }
+};
+```
+
+## Tables
+Tables are created by adding pipes as dividers between each cell, and by adding a line of dashes (also separated by bars) beneath the header. Note that the pipes do not need to be vertically aligned.
+
+
+```markdown
+| Option | Description |
+| ------ | ----------- |
+| data | path to data files to supply the data that will be passed into templates. |
+| engine | engine to be used for processing templates. Handlebars is the default. |
+| ext | extension to be used for dest files. |
+```
+
+Renders to:
+
+| Option | Description |
+| ------ | ----------- |
+| data | path to data files to supply the data that will be passed into templates. |
+| engine | engine to be used for processing templates. Handlebars is the default. |
+| ext | extension to be used for dest files. |
+
+And this HTML:
+
+```html
+
+
+
Option
+
Description
+
+
+
data
+
path to data files to supply the data that will be passed into templates.
+
+
+
engine
+
engine to be used for processing templates. Handlebars is the default.
+
+
+
ext
+
extension to be used for dest files.
+
+
+```
+
+### Right aligned text
+
+Adding a colon on the right side of the dashes below any heading will right align text for that column.
+
+```markdown
+| Option | Description |
+| ------:| -----------:|
+| data | path to data files to supply the data that will be passed into templates. |
+| engine | engine to be used for processing templates. Handlebars is the default. |
+| ext | extension to be used for dest files. |
+```
+
+| Option | Description |
+| ------:| -----------:|
+| data | path to data files to supply the data that will be passed into templates. |
+| engine | engine to be used for processing templates. Handlebars is the default. |
+| ext | extension to be used for dest files. |
+
+## Links
+
+### Basic link
+
+```markdown
+[Assemble](http://assemble.io)
+```
+
+Renders to (hover over the link, there is no tooltip):
+
+[Assemble](http://assemble.io)
+
+HTML:
+
+```html
+Assemble
+```
+
+
+### Add a title
+
+```markdown
+[Upstage](https://github.com/upstage/ "Visit Upstage!")
+```
+
+Renders to (hover over the link, there should be a tooltip):
+
+[Upstage](https://github.com/upstage/ "Visit Upstage!")
+
+HTML:
+
+```html
+Upstage
+```
+
+### Named Anchors
+
+Named anchors enable you to jump to the specified anchor point on the same page. For example, each of these chapters:
+
+```markdown
+# Table of Contents
+ * [Chapter 1](#chapter-1)
+ * [Chapter 2](#chapter-2)
+ * [Chapter 3](#chapter-3)
+```
+will jump to these sections:
+
+```markdown
+## Chapter 1
+Content for chapter one.
+
+## Chapter 2
+Content for chapter one.
+
+## Chapter 3
+Content for chapter one.
+```
+**NOTE** that specific placement of the anchor tag seems to be arbitrary. They are placed inline here since it seems to be unobtrusive, and it works.
+
+
+## Images {#images}
+Images have a similar syntax to links but include a preceding exclamation point.
+
+```markdown
+
+```
+
+
+or
+```markdown
+
+```
+
+
+Like links, Images also have a footnote style syntax
+
+### Alternative usage : note images
+
+```markdown
+![Alt text][id]
+```
+![Alt text][id]
+
+With a reference later in the document defining the URL location:
+
+[id]: http://octodex.github.com/images/dojocat.jpg "The Dojocat"
+
+ [id]: http://octodex.github.com/images/dojocat.jpg "The Dojocat"
+
+### Resizing image
+
+Add HTTP parameters `width` and/or `height` to the link image to resize the image. Values are CSS values (default is `auto`).
+
+```markdown
+
+```
+
+
+
+```markdown
+
+```
+
+
+
+```markdown
+
+```
+
+
+
+### Add CSS classes
+
+Add a HTTP `classes` parameter to the link image to add CSS classes. `shadow`and `border` are available but you could define other ones.
+
+```markdown
+
+```
+
+
+```markdown
+
+```
+
+
+```markdown
+
+```
+
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/menushortcuts.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/menushortcuts.en.md
new file mode 100644
index 0000000..dd148c7
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/menushortcuts.en.md
@@ -0,0 +1,109 @@
+---
+date: 2016-04-09T16:50:16+02:00
+title: Menu extra shortcuts
+weight: 25
+---
+
+You can define additional menu entries or shortcuts in the navigation menu without any link to content.
+
+## Basic configuration
+
+Edit the website configuration `config.toml` and add a `[[menu.shortcuts]]` entry for each link your want to add.
+
+Example from the current website:
+
+ [[menu.shortcuts]]
+ name = " Github repo"
+ identifier = "ds"
+ url = "https://github.com/matcornic/hugo-theme-learn"
+ weight = 10
+
+ [[menu.shortcuts]]
+ name = " Showcases"
+ url = "/showcase"
+ weight = 11
+
+ [[menu.shortcuts]]
+ name = " Hugo Documentation"
+ identifier = "hugodoc"
+ url = "https://gohugo.io/"
+ weight = 20
+
+ [[menu.shortcuts]]
+ name = " Credits"
+ url = "/credits"
+ weight = 30
+
+By default, shortcuts are preceded by a title. This title can be disabled by setting `disableShortcutsTitle=true`.
+However, if you want to keep the title but change its value, it can be overridden by changing your local i18n translation string configuration.
+
+For example, in your local `i18n/en.toml` file, add the following content
+
+ [Shortcuts-Title]
+ other = ""
+
+Read more about [hugo menu](https://gohugo.io/extras/menus/) and [hugo i18n translation strings](https://gohugo.io/content-management/multilingual/#translation-of-strings)
+
+## Configuration for Multilingual mode {#i18n}
+
+When using a multilingual website, you can set different menus for each language. In the `config.toml` file, prefix your menu configuration by `Languages.`.
+
+
+Example from the current website:
+
+ [Languages]
+ [Languages.en]
+ title = "Documentation for Hugo Learn Theme"
+ weight = 1
+ languageName = "English"
+
+ [[Languages.en.menu.shortcuts]]
+ name = " Github repo"
+ identifier = "ds"
+ url = "https://github.com/matcornic/hugo-theme-learn"
+ weight = 10
+
+ [[Languages.en.menu.shortcuts]]
+ name = " Showcases"
+ url = "/showcase"
+ weight = 11
+
+ [[Languages.en.menu.shortcuts]]
+ name = " Hugo Documentation"
+ identifier = "hugodoc"
+ url = "https://gohugo.io/"
+ weight = 20
+
+ [[Languages.en.menu.shortcuts]]
+ name = " Credits"
+ url = "/credits"
+ weight = 30
+
+ [Languages.fr]
+ title = "Documentation du thème Hugo Learn"
+ weight = 2
+ languageName = "Français"
+
+ [[Languages.fr.menu.shortcuts]]
+ name = " Repo Github"
+ identifier = "ds"
+ url = "https://github.com/matcornic/hugo-theme-learn"
+ weight = 10
+
+ [[Languages.fr.menu.shortcuts]]
+ name = " Vitrine"
+ url = "/showcase"
+ weight = 11
+
+ [[Languages.fr.menu.shortcuts]]
+ name = " Documentation Hugo"
+ identifier = "hugodoc"
+ url = "https://gohugo.io/"
+ weight = 20
+
+ [[Languages.fr.menu.shortcuts]]
+ name = " Crédits"
+ url = "/credits"
+ weight = 30
+
+Read more about [hugo menu](https://gohugo.io/extras/menus/) and [hugo multilingual menus](https://gohugo.io/content-management/multilingual/#menus)
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/menushortcuts.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/menushortcuts.fr.md
new file mode 100644
index 0000000..80bb9db
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/menushortcuts.fr.md
@@ -0,0 +1,109 @@
+---
+date: 2016-04-09T16:50:16+02:00
+title: Raccourcis du menu
+weight: 25
+---
+
+Vous pouvez définir des entrées ou raccourcis supplémentaires dans le menu sans avoir besoin d'être lié à un contenu du site.
+
+## Configuration simple
+
+Editez le fichier de configuration `config.toml` et ajoutez une entrée `[[menu.shortcuts]]` pour chaque lien que vous voulez ajouter.
+
+Exemple pour ce site:
+
+ [[menu.shortcuts]]
+ name = " Github repo"
+ identifier = "ds"
+ url = "https://github.com/matcornic/hugo-theme-learn"
+ weight = 10
+
+ [[menu.shortcuts]]
+ name = " Showcases"
+ url = "/showcase"
+ weight = 11
+
+ [[menu.shortcuts]]
+ name = " Hugo Documentation"
+ identifier = "hugodoc"
+ url = "https://gohugo.io/"
+ weight = 20
+
+ [[menu.shortcuts]]
+ name = " Credits"
+ url = "/credits"
+ weight = 30
+
+Par défaut, les raccourcis sont précédés par un titre. Ce titre peut être désactivé en ajouter le paramètre `disableShortcutsTitle=true` dans la section `params` de votre `config.toml`.
+Cependant, si vous voulez garder le titre mais changer sa valeur, vous pouvez modifier votre configuration multilangue locale en changeant les *translation string*.
+
+Par exemple, dans votre fichier local `i18n/en.toml`, ajouter le contenu
+
+ [Shortcuts-Title]
+ other = ""
+
+Plus d'infos sur [les menus Hugo](https://gohugo.io/extras/menus/) et sur [les translations strings](https://gohugo.io/content-management/multilingual/#translation-of-strings)
+
+## Configuration pour le mode multi-langue {#i18n}
+
+Quand vous utilisez un site multi-langue, vous pouvez avoir des menus différents pour chaque langage. Dans le fichier de configuration `config.toml`, préfixez votre configuration par `Languages.`.
+
+
+Par exemple, avec ce site :
+
+ [Languages]
+ [Languages.en]
+ title = "Documentation for Hugo Learn Theme"
+ weight = 1
+ languageName = "English"
+
+ [[Languages.en.menu.shortcuts]]
+ name = " Github repo"
+ identifier = "ds"
+ url = "https://github.com/matcornic/hugo-theme-learn"
+ weight = 10
+
+ [[Languages.en.menu.shortcuts]]
+ name = " Showcases"
+ url = "/showcase"
+ weight = 11
+
+ [[Languages.en.menu.shortcuts]]
+ name = " Hugo Documentation"
+ identifier = "hugodoc"
+ url = "https://gohugo.io/"
+ weight = 20
+
+ [[Languages.en.menu.shortcuts]]
+ name = " Credits"
+ url = "/credits"
+ weight = 30
+
+ [Languages.fr]
+ title = "Documentation du thème Hugo Learn"
+ weight = 2
+ languageName = "Français"
+
+ [[Languages.fr.menu.shortcuts]]
+ name = " Repo Github"
+ identifier = "ds"
+ url = "https://github.com/matcornic/hugo-theme-learn"
+ weight = 10
+
+ [[Languages.fr.menu.shortcuts]]
+ name = " Vitrine"
+ url = "/showcase"
+ weight = 11
+
+ [[Languages.fr.menu.shortcuts]]
+ name = " Documentation Hugo"
+ identifier = "hugodoc"
+ url = "https://gohugo.io/"
+ weight = 20
+
+ [[Languages.fr.menu.shortcuts]]
+ name = " Crédits"
+ url = "/credits"
+ weight = 30
+
+Plus d'infos sur [les menus Hugo](https://gohugo.io/extras/menus/) et les [menus multi-langue Hugo](https://gohugo.io/content-management/multilingual/#menus)
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/pages/_index.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/pages/_index.en.md
new file mode 100644
index 0000000..95c0a1b
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/pages/_index.en.md
@@ -0,0 +1,148 @@
+---
+date: 2016-04-09T16:50:16+02:00
+title: Pages organization
+weight: 5
+---
+
+In **Hugo**, pages are the core of your site. Once it is configured, pages are definitely the added value to your documentation site.
+
+## Folders
+
+Organize your site like [any other Hugo project](https://gohugo.io/content/organization/). Typically, you will have a *content* folder with all your pages.
+
+ content
+ ├── level-one
+ │ ├── level-two
+ │ │ ├── level-three
+ │ │ │ ├── level-four
+ │ │ │ │ ├── _index.md <-- /level-one/level-two/level-three/level-four
+ │ │ │ │ ├── page-4-a.md <-- /level-one/level-two/level-three/level-four/page-4-a
+ │ │ │ │ ├── page-4-b.md <-- /level-one/level-two/level-three/level-four/page-4-b
+ │ │ │ │ └── page-4-c.md <-- /level-one/level-two/level-three/level-four/page-4-c
+ │ │ │ ├── _index.md <-- /level-one/level-two/level-three
+ │ │ │ ├── page-3-a.md <-- /level-one/level-two/level-three/page-3-a
+ │ │ │ ├── page-3-b.md <-- /level-one/level-two/level-three/page-3-b
+ │ │ │ └── page-3-c.md <-- /level-one/level-two/level-three/page-3-c
+ │ │ ├── _index.md <-- /level-one/level-two
+ │ │ ├── page-2-a.md <-- /level-one/level-two/page-2-a
+ │ │ ├── page-2-b.md <-- /level-one/level-two/page-2-b
+ │ │ └── page-2-c.md <-- /level-one/level-two/page-2-c
+ │ ├── _index.md <-- /level-one
+ │ ├── page-1-a.md <-- /level-one/page-1-a
+ │ ├── page-1-b.md <-- /level-one/page-1-b
+ │ └── page-1-c.md <-- /level-one/page-1-c
+ ├── _index.md <-- /
+ └── page-top.md <-- /page-top
+
+{{% notice note %}}
+`_index.md` is required in each folder, it’s your “folder home page”
+{{% /notice %}}
+
+## Types
+
+**Hugo-theme-learn** defines two types of pages. *Default* and *Chapter*. Both can be used at any level of the documentation, the only difference being layout display.
+
+A **Chapter** displays a page meant to be used as introduction for a set of child pages. Commonly, it contains a simple title and a catch line to define content that can be found under it.
+You can define any HTML as prefix for the menu. In the example below, it's just a number but that could be an [icon](https://fortawesome.github.io/Font-Awesome/).
+
+
+
+```markdown
++++
+title = "Basics"
+chapter = true
+weight = 5
+pre = "1. "
++++
+
+### Chapter 1
+
+# Basics
+
+Discover what this Hugo theme is all about and the core-concepts behind it.
+```
+
+To tell **Hugo-theme-learn** to consider a page as a chapter, set `chapter=true` in the Front Matter of the page.
+
+A **Default** page is any other content page.
+
+
+
+```toml
++++
+title = "Installation"
+weight = 15
++++
+```
+
+The following steps are here to help you initialize your new website. If you don't know Hugo at all, we strongly suggest you to train by following this [great documentation for beginners](https://gohugo.io/overview/quickstart/).
+
+## Create your project
+
+Hugo provides a `new` command to create a new website.
+
+```
+hugo new site
+```
+
+**Hugo-theme-learn** provides [archetypes]({{< relref "cont/archetypes.fr.md" >}}) to help you create this kind of pages.
+
+## Front Matter configuration
+
+Each Hugo page has to define a [Front Matter](https://gohugo.io/content/front-matter/) in *yaml*, *toml* or *json*.
+
+**Hugo-theme-learn** uses the following parameters on top of Hugo ones :
+
+```toml
++++
+# Table of content (toc) is enabled by default. Set this parameter to true to disable it.
+# Note: Toc is always disabled for chapter pages
+disableToc = "false"
+# The title of the page in menu will be prefixed by this HTML content
+pre = ""
+# The title of the page in menu will be postfixed by this HTML content
+post = ""
+# Set the page as a chapter, changing the way it's displayed
+chapter = false
+# Hide a menu entry by setting this to true
+hidden = false
+# Display name of this page modifier. If set, it will be displayed in the footer.
+LastModifierDisplayName = ""
+# Email of this page modifier. If set with LastModifierDisplayName, it will be displayed in the footer
+LastModifierEmail = ""
++++
+```
+
+### Add icon to a menu entry
+
+In the page frontmatter, add a `pre` param to insert any HTML code before the menu label. The example below uses the Github icon.
+
+```toml
++++
+title = "Github repo"
+pre = " "
++++
+```
+
+
+
+### Ordering sibling menu/page entries
+
+Hugo provides a [flexible way](https://gohugo.io/content/ordering/) to handle order for your pages.
+
+The simplest way is to set `weight` parameter to a number.
+
+```toml
++++
+title = "My page"
+weight = 5
++++
+```
+
+## Homepage
+
+To configure your home page, you basically have three choices:
+
+1. Create an `_index.md` document in `content` folder and fill the file with *Markdown content*
+2. Create an `index.html` file in the `static` folder and fill the file with *HTML content*
+3. Configure your server to automatically redirect home page to one your documentation page
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/pages/_index.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/pages/_index.fr.md
new file mode 100644
index 0000000..6da5338
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/pages/_index.fr.md
@@ -0,0 +1,146 @@
+---
+date: 2016-04-09T16:50:16+02:00
+title: Organisation des pages
+weight: 5
+---
+
+Dans **Hugo**, les pages sont le coeur de votre site. Une fois configurées, les pages sont la valeur ajoutée de votre site de documentation.
+
+## Dossiers
+
+Organisez votre site comment n'importe quel autre [projet Hugo](https://gohugo.io/content/organization/). Typiquement, vous allez avoir un dossier *content* avec vos pages.
+
+ content
+ ├── niveau-un
+ │ ├── niveau-deux
+ │ │ ├── niveau-trois
+ │ │ │ ├── niveau-quatre
+ │ │ │ │ ├── _index.md <-- /niveau-un/niveau-deux/niveau-trois/niveau-quatre
+ │ │ │ │ ├── page-4-a.md <-- /niveau-un/niveau-deux/niveau-trois/niveau-quatre/page-4-a
+ │ │ │ │ ├── page-4-b.md <-- /niveau-un/niveau-deux/niveau-trois/niveau-quatre/page-4-b
+ │ │ │ │ └── page-4-c.md <-- /niveau-un/niveau-deux/niveau-trois/niveau-quatre/page-4-c
+ │ │ │ ├── _index.md <-- /niveau-un/niveau-deux/niveau-trois
+ │ │ │ ├── page-3-a.md <-- /niveau-un/niveau-deux/niveau-trois/page-3-a
+ │ │ │ ├── page-3-b.md <-- /niveau-un/niveau-deux/niveau-trois/page-3-b
+ │ │ │ └── page-3-c.md <-- /niveau-un/niveau-deux/niveau-trois/page-3-c
+ │ │ ├── _index.md <-- /niveau-un/niveau-deux
+ │ │ ├── page-2-a.md <-- /niveau-un/niveau-deux/page-2-a
+ │ │ ├── page-2-b.md <-- /niveau-un/niveau-deux/page-2-b
+ │ │ └── page-2-c.md <-- /niveau-un/niveau-deux/page-2-c
+ │ ├── _index.md <-- /niveau-un
+ │ ├── page-1-a.md <-- /niveau-un/page-1-a
+ │ ├── page-1-b.md <-- /niveau-un/page-1-b
+ │ └── page-1-c.md <-- /niveau-un/page-1-c
+ ├── _index.md <-- /
+ └── premiere-page.md <-- /premiere-page
+
+{{% notice note %}}
+Le fichier `_index.md` est obligatoire dans chaque dossier, c'est en quelques rotes votre page d'accueil pour le dossier.
+{{% /notice %}}
+
+## Types
+
+**Hugo-theme-learn** définit deux types de pages. *Défaut* et *Chapitre*. Les deux sont utilisables à n'importe quel niveau du site, la seule différence est dans l'affichage.
+
+Un **Chapitre** affiche une page vouée à être une introduction pour un ensemble de pages filles. Habituellement, il va seulement contenir un titre et un résumé de la section.
+Vous pouvez définir n'importe quel contenu HTML comme préfixe de l'entrée du menu. Dans l'exemple ci-dessous, c'est juste un nombre mais vous pourriez utiliser une [icône](https://fortawesome.github.io/Font-Awesome/).
+
+
+
+```markdown
++++
+title = "Démarrage"
+weight = 5
+pre = "1. "
+chapter = true
++++
+
+### Chapitre 1
+
+# Démarrage
+
+Découvrez comment utiliser ce thème Hugo et apprenez en les concepts
+```
+
+Pour dire à **Hugo-theme-learn** de considérer la page comme un chapitre, configure `chapter=true` dans le Front Matter de la page.
+
+Une page **Défaut** est n'importe quelle autre page.
+
+
+
+ +++
+ title = "Installation"
+ weight = 15
+ +++
+
+ The following steps are here to help you initialize your new website. If you don't know Hugo at all, we strongly suggest you to train by following this [great documentation for beginners](https://gohugo.io/overview/quickstart/).
+
+ ## Create your project
+
+ Hugo provides a `new` command to create a new website.
+
+ ```
+ hugo new site
+ ```
+
+**Hugo-theme-learn** fournit des [archétypes]({{< relref "cont/archetypes.fr.md" >}}) pour vous aider à créer ce type de pages.
+
+## Configuration des Front Matter
+
+Chaque page Hugo doit définir un [Front Matter](https://gohugo.io/content/front-matter/) dans le format *yaml*, *toml* ou *json*.
+
+**Hugo-theme-learn** utilise les paramètres suivant en plus de ceux définis par Hugo:
+
+```toml
++++
+# Le Sommaire (table of content = toc) est activé par défaut. Modifier ce paramètre à true pour le désactiver.
+# Note: Le sommaire est toujours désactivé pour les chapitres
+disableToc = "false"
+# Le titre de la page dans le menu sera préfixé par ce contentu HTML
+pre = ""
+# Le titre de la page dans le menu sera suffixé par ce contentu HTML
+post = ""
+# Modifier le type de la page pour changer l'affichage
+chapter = false
+# Cache la page du menu
+hidden = false
+# Nom de la personne qui a modifié la page. Quand configuré, sera affiché dans le pied de page.
+LastModifierDisplayName = ""
+# Email de la personne qui a modifié la page. Quand configuré, sera affiché dans le pied de page.
+LastModifierEmail = ""
++++
+```
+
+### Ajouter une icône à une entrée du menu
+
+Dans le Front Matter, ajouter un paramètre `pre` pour insérer du code HTML qui s'affichera avant le label du menu. L'exemple ci-dessous utilise l'icône de Github.
+
+```toml
++++
+title = "Repo Github"
+pre = " "
++++
+```
+
+
+
+### Ordonner les entrées dans le menu
+
+Hugo permet de modifier facilement [l'ordre des menu](https://gohugo.io/content/ordering/).
+
+La manière la plus simple est de configurer le paramètre `weight` avec un nombre.
+
+```toml
++++
+title = "Ma page"
+weight = 5
++++
+```
+
+## Page d'accueil
+
+Pour configurer votre page d'accueil, vous avez trois choix:
+
+1. Créer une page `_index.md` dans le dossier `content` et remplissez le fichier avec du *contenu Markdown*
+2. Créer une page `index.html` dans le dossier `static` et remplissez le fichier avec du *contenu HTML*
+3. Configurez votre serveur pour automatiquement rediriger la page d'accueil vers l'une de vos pages.
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/pages/images/frontmatter-icon.png b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/pages/images/frontmatter-icon.png
new file mode 100644
index 0000000..a8dd653
Binary files /dev/null and b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/pages/images/frontmatter-icon.png differ
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/pages/images/pages-chapter.png b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/pages/images/pages-chapter.png
new file mode 100644
index 0000000..5139fa1
Binary files /dev/null and b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/pages/images/pages-chapter.png differ
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/pages/images/pages-default.png b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/pages/images/pages-default.png
new file mode 100644
index 0000000..cefefd4
Binary files /dev/null and b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/pages/images/pages-default.png differ
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/credits.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/credits.en.md
new file mode 100644
index 0000000..54d7d06
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/credits.en.md
@@ -0,0 +1,28 @@
+---
+title: Credits
+disableToc: true
+---
+
+## Contributors
+
+Thanks to them for make Open Source Software a better place !
+
+{{% ghcontributors "https://api.github.com/repos/matcornic/hugo-theme-learn/contributors?per_page=100" %}}
+
+And a special thanks to [@vjeantet](https://github.com/vjeantet) for his work on [docdock](https://github.com/vjeantet/hugo-theme-docdock), a fork of hugo-theme-learn. v2.0.0 of this theme is inspired by his work.
+
+## Packages and libraries
+* [mermaid](https://knsv.github.io/mermaid) - generation of diagram and flowchart from text in a similar manner as markdown
+* [font awesome](http://fontawesome.io/) - the iconic font and CSS framework
+* [jQuery](https://jquery.com) - The Write Less, Do More, JavaScript Library
+* [lunr](https://lunrjs.com) - Lunr enables you to provide a great search experience without the need for external, server-side, search services...
+* [horsey](https://bevacqua.github.io/horsey/) - Progressive and customizable autocomplete component
+* [clipboard.js](https://zenorocha.github.io/clipboard.js) - copy text to clipboard
+* [highlight.js](https://highlightjs.org) - Javascript syntax highlighter
+* [modernizr](https://modernizr.com) - A JavaScript toolkit that allows web developers to use new CSS3 and HTML5 features while maintaining a fine level of control over browsers that don't support
+
+## Tooling
+
+* [Netlify](https://www.netlify.com) - Continuous deployement and hosting of this documentation
+* [Hugo](https://gohugo.io/)
+
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/credits.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/credits.fr.md
new file mode 100644
index 0000000..39c6dd7
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/credits.fr.md
@@ -0,0 +1,28 @@
+---
+title: Crédits
+disableToc: true
+---
+
+## Contributeurs
+
+Merci à eux de rendre le monde Open Source meilleur !
+
+{{% ghcontributors "https://api.github.com/repos/matcornic/hugo-theme-learn/contributors?per_page=100" %}}
+
+Et a grand merci à [@vjeantet](https://github.com/vjeantet) pour son travail sur [docdock](https://github.com/vjeantet/hugo-theme-docdock), un fork de _hugo-theme-learn_. La v2.0.0 du thème est en grande partie inspirée de son travail.
+
+## Packages et librairies
+* [mermaid](https://knsv.github.io/mermaid) - géneration de diagrames et graphiques à partir de texte similaire à Markdown
+* [font awesome](http://fontawesome.io/) - Le framework de polices iconiques
+* [jQuery](https://jquery.com) - La plus connue des librairies Javascript
+* [lunr](https://lunrjs.com) - Lunr fournit des fonctions de recherche sans service externe
+* [horsey](https://bevacqua.github.io/horsey/) - Autocomplétion de composants (utiliser pour les suggestions de recherche)
+* [clipboard.js](https://zenorocha.github.io/clipboard.js) - Copier le texte dans le presse-papier
+* [highlight.js](https://highlightjs.org) - Mise en valeur de syntaxes
+* [modernizr](https://modernizr.com) - Une boite à outil Javascript qui permet aux développeurs d'utiliser les dernières fonctionnalités de CSS et HTML5, même sur de vieux navigateurs.
+
+## Outils
+
+* [Netlify](https://www.netlify.com) - Déploiement continue et hébergement de cette documentation
+* [Hugo](https://gohugo.io/)
+
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/_index.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/_index.en.md
new file mode 100644
index 0000000..754bb0f
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/_index.en.md
@@ -0,0 +1,16 @@
+---
+date: 2016-04-09T16:50:16+02:00
+title: Shortcodes
+pre: "3. "
+weight: 15
+---
+
+Hugo uses Markdown for its simple content format. However, there are a lot of things that Markdown doesn’t support well. You could use pure HTML to expand possibilities.
+
+But this happens to be a bad idea. Everyone uses Markdown because it's pure and simple to read even non-rendered. You should avoid HTML to keep it as simple as possible.
+
+To avoid this limitations, Hugo created [shortcodes](https://gohugo.io/extras/shortcodes/). A shortcode is a simple snippet inside a page.
+
+**Hugo-theme-learn** provides multiple shortcodes on top of existing ones.
+
+{{%children style="h2" description="true" %}}
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/_index.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/_index.fr.md
new file mode 100644
index 0000000..b084d9b
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/_index.fr.md
@@ -0,0 +1,16 @@
+---
+date: 2016-04-09T16:50:16+02:00
+title: Shortcodes
+pre: "3. "
+weight: 15
+---
+
+Hugo utilise Markdown pour son format simple. Cependant, il y a beaucoup de chose que Markdown ne supporte pas bien. On pourrait utiliser du HTML pur pour améliorer les capacité du Markdown.
+
+Mais c'est probablement une mauvaise idée. Tout le monde utilise le Markdown parce que c'est pur et simple à lire même lorsqu'il est affiché en texte brut. Vous devez éviter le HTML autant que possible pour garder le contenu simple.
+
+Cependant, pour éviter les limitations, Hugo a créé les [shortcodes](https://gohugo.io/extras/shortcodes/). Un shortcode est un bout de code (*snippet*) dans une page.
+
+**Hugo-theme-learn** fournit de multiple shortcodes en plus de ceux existant.
+
+{{%children style="h2" description="true" %}}
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.en.files/BachGavotteShort.mp3 b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.en.files/BachGavotteShort.mp3
new file mode 100644
index 0000000..94e3d0e
Binary files /dev/null and b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.en.files/BachGavotteShort.mp3 differ
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.en.files/Carroll_AliceAuPaysDesMerveilles.pdf b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.en.files/Carroll_AliceAuPaysDesMerveilles.pdf
new file mode 100644
index 0000000..97377e9
Binary files /dev/null and b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.en.files/Carroll_AliceAuPaysDesMerveilles.pdf differ
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.en.files/adivorciarsetoca00cape.pdf b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.en.files/adivorciarsetoca00cape.pdf
new file mode 100644
index 0000000..e589c73
Binary files /dev/null and b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.en.files/adivorciarsetoca00cape.pdf differ
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.en.files/hugo.png b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.en.files/hugo.png
new file mode 100644
index 0000000..48acf34
Binary files /dev/null and b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.en.files/hugo.png differ
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.en.files/movieselectricsheep-flock-244-32500-2.mp4 b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.en.files/movieselectricsheep-flock-244-32500-2.mp4
new file mode 100644
index 0000000..9f1fe56
Binary files /dev/null and b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.en.files/movieselectricsheep-flock-244-32500-2.mp4 differ
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.en.md
new file mode 100644
index 0000000..81886b0
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.en.md
@@ -0,0 +1,85 @@
+---
+title: Attachments
+description : "The Attachments shortcode displays a list of files attached to a page."
+---
+
+The Attachments shortcode displays a list of files attached to a page.
+
+{{% attachments /%}}
+
+## Usage
+
+The shortcurt lists files found in a **specific folder**.
+Currently, it support two implementations for pages
+
+1. If your page is a markdown file, attachements must be place in a **folder** named like your page and ending with **.files**.
+
+ > * content
+ > * _index.md
+ > * page.files
+ > * attachment.pdf
+ > * page.md
+
+2. If your page is a **folder**, attachements must be place in a nested **'files'** folder.
+
+ > * content
+ > * _index.md
+ > * page
+ > * index.md
+ > * files
+ > * attachment.pdf
+
+Be aware that if you use a multilingual website, you will need to have as many folders as languages.
+
+That's all !
+
+### Parameters
+
+| Parameter | Default | Description |
+|:--|:--|:--|
+| title | "Attachments" | List's title |
+| style | "" | Choose between "orange", "grey", "blue" and "green" for nice style |
+| pattern | ".*" | A regular expressions, used to filter the attachments by file name.
The **pattern** parameter value must be [regular expressions](https://en.wikipedia.org/wiki/Regular_expression).
+
+For example:
+
+* To match a file suffix of 'jpg', use **.*jpg** (not *.jpg).
+* To match file names ending in 'jpg' or 'png', use **.*(jpg|png)**
+
+### Examples
+
+#### List of attachments ending in pdf or mp4
+
+
+ {{%/*attachments title="Related files" pattern=".*(pdf|mp4)"/*/%}}
+
+renders as
+
+{{%attachments title="Related files" pattern=".*(pdf|mp4)"/%}}
+
+#### Colored styled box
+
+ {{%/*attachments style="orange" /*/%}}
+
+renders as
+
+{{% attachments style="orange" /%}}
+
+
+ {{%/*attachments style="grey" /*/%}}
+
+renders as
+
+{{% attachments style="grey" /%}}
+
+ {{%/*attachments style="blue" /*/%}}
+
+renders as
+
+{{% attachments style="blue" /%}}
+
+ {{%/*attachments style="green" /*/%}}
+
+renders as
+
+{{% attachments style="green" /%}}
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.fr.files/BachGavotteShort.mp3 b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.fr.files/BachGavotteShort.mp3
new file mode 100644
index 0000000..94e3d0e
Binary files /dev/null and b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.fr.files/BachGavotteShort.mp3 differ
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.fr.files/Carroll_AliceAuPaysDesMerveilles.pdf b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.fr.files/Carroll_AliceAuPaysDesMerveilles.pdf
new file mode 100644
index 0000000..97377e9
Binary files /dev/null and b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.fr.files/Carroll_AliceAuPaysDesMerveilles.pdf differ
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.fr.files/adivorciarsetoca00cape.pdf b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.fr.files/adivorciarsetoca00cape.pdf
new file mode 100644
index 0000000..e589c73
Binary files /dev/null and b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.fr.files/adivorciarsetoca00cape.pdf differ
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.fr.files/hugo.png b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.fr.files/hugo.png
new file mode 100644
index 0000000..48acf34
Binary files /dev/null and b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.fr.files/hugo.png differ
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.fr.files/movieselectricsheep-flock-244-32500-2.mp4 b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.fr.files/movieselectricsheep-flock-244-32500-2.mp4
new file mode 100644
index 0000000..9f1fe56
Binary files /dev/null and b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.fr.files/movieselectricsheep-flock-244-32500-2.mp4 differ
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.fr.md
new file mode 100644
index 0000000..c240939
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.fr.md
@@ -0,0 +1,85 @@
+---
+title: Attachments (Pièces jointes)
+description : "The Attachments shortcode displays a list of files attached to a page."
+---
+
+Le shortcode *Attachments* affiche une liste de pièces jointes d'une page.
+
+{{% attachments /%}}
+
+## Utilisation
+
+Le shortcode affiche la liste de fichiers trouvés dans un **dossier spécifique**
+A l'heure actuelle, il supporte deux implémentations
+
+1. Si votre page est un fichier Markdown, les pièces jointes doivent être placée dans un **dossier** nommé comme le nom de la page et suffixé par **.files**.
+
+ > * content
+ > * _index.md
+ > * page.files
+ > * attachment.pdf
+ > * page.md
+
+2. Si votre page est un **dossier**, les pièces jointes doivent être placées dans un dossier fils **'files'**.
+
+ > * content
+ > * _index.md
+ > * page
+ > * index.md
+ > * files
+ > * attachment.pdf
+
+Attention, si votre site est multi-langue, vous devrez avec autant de dossier qu'il y a de langues.
+
+C'est tout !
+
+### Paramètres
+
+| Paramètre | Défaut | Description |
+|:--|:--|:--|
+| title | "Pièces jointes" | Titre de la liste |
+| style | "" | Choisir entre "orange", "grey", "blue" et "green" pour un style plus sympa |
+| pattern | ".*" | Une expression régulière, utilisée pour filtrer les pièces jointes par leur nom de fichier.
Le paramètre **pattern** doit être une [expression régulière](https://en.wikipedia.org/wiki/Regular_expression).
+
+Par exemple:
+
+* Pour trouver les fichiers avec le suffixe 'jpg', utilisez **.*jpg** (pas *.jpg).
+* Pour trouver les fichiers avec les suffixe 'jpg' ou 'png', utilisez **.*(jpg|png)**
+
+### Exemples
+
+#### Lister les pièces jointes de type pdf ou mp4
+
+
+ {{%/*attachments title="Fichiers associés" pattern=".*(pdf|mp4)"/*/%}}
+
+s'affiche comme
+
+{{%attachments title="Fichiers associés" pattern=".*(pdf|mp4)"/%}}
+
+#### Modifier le style
+
+ {{%/*attachments style="orange" /*/%}}
+
+s'affiche comme
+
+{{% attachments style="orange" /%}}
+
+
+ {{%/*attachments style="grey" /*/%}}
+
+s'affiche comme
+
+{{% attachments style="grey" /%}}
+
+ {{%/*attachments style="blue" /*/%}}
+
+s'affiche comme
+
+{{% attachments style="blue" /%}}
+
+ {{%/*attachments style="green" /*/%}}
+
+s'affiche comme
+
+{{% attachments style="green" /%}}
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/button.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/button.en.md
new file mode 100644
index 0000000..eb43cbf
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/button.en.md
@@ -0,0 +1,16 @@
+---
+title: Button
+description : "Nice buttons on your page."
+---
+
+A button is a just a clickable button with optional icon.
+
+```
+{{%/* button href="https://getgrav.org/" */%}}Get Grav{{%/* /button */%}}
+{{%/* button href="https://getgrav.org/" icon="fa fa-download" */%}}Get Grav with icon{{%/* /button */%}}
+{{%/* button href="https://getgrav.org/" icon="fa fa-download" icon-position="right" */%}}Get Grav with icon right{{%/* /button */%}}
+```
+
+{{% button href="https://getgrav.org/" %}}Get Grav{{% /button %}}
+{{% button href="https://getgrav.org/" icon="fa fa-download" %}}Get Grav with icon{{% /button %}}
+{{% button href="https://getgrav.org/" icon="fa fa-download" icon-position="right" %}}Get Grav with icon right{{% /button %}}
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/button.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/button.fr.md
new file mode 100644
index 0000000..9f0e130
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/button.fr.md
@@ -0,0 +1,16 @@
+---
+title: Button (Bouton)
+description : "De beaux boutons sur votre page."
+---
+
+Le shortcode *button* est simplement un bouton cliquable avec une icône optionnelle.
+
+```
+{{%/* button href="https://getgrav.org/" */%}}Téléchargez Grav{{%/* /button */%}}
+{{%/* button href="https://getgrav.org/" icon="fa fa-download" */%}}Téléchargez Grav avec icône{{%/* /button */%}}
+{{%/* button href="https://getgrav.org/" icon="fa fa-download" icon-position="right" */%}}Téléchargez Grav avec icône à droite{{%/* /button */%}}
+```
+
+{{% button href="https://getgrav.org/" %}}Téléchargez Grav{{% /button %}}
+{{% button href="https://getgrav.org/" icon="fa fa-download" %}}Téléchargez Grav avec icône{{% /button %}}
+{{% button href="https://getgrav.org/" icon="fa fa-download" icon-position="right" %}}Téléchargez Grav avec icône à droite{{% /button %}}
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/_index.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/_index.en.md
new file mode 100644
index 0000000..5d6139b
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/_index.en.md
@@ -0,0 +1,45 @@
+---
+title : Children
+description : List the child pages of a page
+---
+
+Use the children shortcode to list the child pages of a page and the further descendants (children's children). By default, the shortcode displays links to the child pages.
+
+## Usage
+
+| Parameter | Default | Description |
+|:--|:--|:--|
+| page | _current_ | Specify the page name (section name) to display children for |
+| style | "li" | Choose the style used to display descendants. It could be any HTML tag name |
+| showhidden | "false" | When true, child pages hidden from the menu will be displayed |
+| description | "false" | Allows you to include a short text under each page in the list. when no description exists for the page, children shortcode takes the first 70 words of your content. [read more info about summaries on gohugo.io](https://gohugo.io/content/summaries/) |
+| depth | 1 | Enter a number to specify the depth of descendants to display. For example, if the value is 2, the shortcode will display 2 levels of child pages. **Tips:** set 999 to get all descendants|
+| sort | none | Sort Children By
Weight - to sort on menu order
Name - to sort alphabetically on menu label
Identifier - to sort alphabetically on identifier set in frontmatter
URL - URL
|
+
+## Demo
+
+ {{%/* children */%}}
+
+{{% children %}}
+
+ {{%/* children description="true" */%}}
+
+{{%children description="true" %}}
+
+ {{%/* children depth="3" showhidden="true" */%}}
+
+{{% children depth="3" showhidden="true" %}}
+
+ {{%/* children style="h2" depth="3" description="true" */%}}
+
+{{% children style="h2" depth="3" description="true" %}}
+
+ {{%/* children style="div" depth="999" */%}}
+
+{{% children style="div" depth="999" %}}
+
+
+
+
+
+
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/_index.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/_index.fr.md
new file mode 100644
index 0000000..672c5ad
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/_index.fr.md
@@ -0,0 +1,45 @@
+---
+title : Children (Pages filles)
+description : Liste les pages filles de la page
+---
+
+Utilisez le shortcode *children* pour lister les pages filles de la page et tous ses déscendants (pages filles de pages filles). Par défaut, le shortcode affiche des liens vers les pages filles.
+
+## Utilisation
+
+| Paramètre | Défaut | Description |
+|:--|:--|:--|
+| page | _current_ | Spécifie le nom de la page (nom de la section) à afficher |
+| style | "li" | Choisi le style à utiliser pour afficher les descendants. Cela peut être n'importe quel balise HTML |
+| showhidden | "false" | Quand *true*, pages filles cachées dans le menu seront affichées quand même |
+| description | "false" | Permet d'inclure le texte de la description de la page sous chaque entré de la liste. quand aucune description existe pour la page, le shortcode prend les 70 premiers mots du contenu. [plus d'infos sur gohugo.io](https://gohugo.io/content/summaries/) |
+| depth | 1 | Nombre de descendants à afficher. Par exemple, si la valeur est 2, le shortcode va afficher 2 niveaux de pages filels. **Astuce:** Utilisez 999 pour avoir tous les descendants|
+| sort | | Tri les pages filles par
Weight - Poids
Name - Nom
Identifier - Trier alphabétiquement par identifiant configuré dans le front matter
URL - URL
|
+
+## Démo
+
+ {{%/* children */%}}
+
+{{% children %}}
+
+ {{%/* children description="true" */%}}
+
+{{%children description="true" %}}
+
+ {{%/* children depth="3" showhidden="true" */%}}
+
+{{% children depth="3" showhidden="true" %}}
+
+ {{%/* children style="h2" depth="3" description="true" */%}}
+
+{{% children style="h2" depth="3" description="true" %}}
+
+ {{%/* children style="div" depth="999" */%}}
+
+{{% children style="div" depth="999" %}}
+
+
+
+
+
+
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/_index.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/_index.en.md
new file mode 100644
index 0000000..d0c5179
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/_index.en.md
@@ -0,0 +1,6 @@
++++
+title = "page 1"
+description = "This is a demo child page"
++++
+
+This is a demo child page
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/_index.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/_index.fr.md
new file mode 100644
index 0000000..7737f50
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/_index.fr.md
@@ -0,0 +1,6 @@
++++
+title = "page 1"
+description = "Ceci est une page test"
++++
+
+Ceci est une page de demo
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/_index.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/_index.en.md
new file mode 100644
index 0000000..a4982f9
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/_index.en.md
@@ -0,0 +1,6 @@
++++
+title = "page 1-1"
+description = "This is a demo child page"
++++
+
+This is a demo child page
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/_index.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/_index.fr.md
new file mode 100644
index 0000000..e39cb58
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/_index.fr.md
@@ -0,0 +1,6 @@
++++
+title = "page 1-1"
+description = "Ceci est une page test"
++++
+
+Ceci est une page de demo
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/_index.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/_index.en.md
new file mode 100644
index 0000000..5ce56f4
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/_index.en.md
@@ -0,0 +1,6 @@
++++
+title = "page 1-1-1"
+description = "This is a demo child page"
++++
+
+This is a demo child page
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/_index.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/_index.fr.md
new file mode 100644
index 0000000..31d2cd1
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/_index.fr.md
@@ -0,0 +1,6 @@
++++
+title = "page 1-1-1"
+description = "Ceci est une page test"
++++
+
+Ceci est une page de demo
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/_index.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/_index.en.md
new file mode 100644
index 0000000..d5d9ab2
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/_index.en.md
@@ -0,0 +1,6 @@
++++
+title = "page 1-1-1-1"
+description = "This is a demo child page"
++++
+
+This is a demo child page
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/_index.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/_index.fr.md
new file mode 100644
index 0000000..3b0f7f0
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/_index.fr.md
@@ -0,0 +1,6 @@
++++
+title = "page 1-1-1-1"
+description = "Ceci est une page test"
++++
+
+Ceci est une page de demo
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/children-1-1-1-1-1/_index.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/children-1-1-1-1-1/_index.en.md
new file mode 100644
index 0000000..883b5b2
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/children-1-1-1-1-1/_index.en.md
@@ -0,0 +1,6 @@
++++
+title = "page 1-1-1-1-1"
+description = "This is a demo child page"
++++
+
+This is a demo child page
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/children-1-1-1-1-1/_index.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/children-1-1-1-1-1/_index.fr.md
new file mode 100644
index 0000000..5a19617
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/children-1-1-1-1-1/_index.fr.md
@@ -0,0 +1,6 @@
++++
+title = "page 1-1-1-1-1"
+description = "Ceci est une page test"
++++
+
+Ceci est une page de demo
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-2/_index.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-2/_index.en.md
new file mode 100644
index 0000000..a96140c
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-2/_index.en.md
@@ -0,0 +1,11 @@
++++
+title = "page 2"
+description = ""
++++
+
+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
+ tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
+ quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
+ consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
+ cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+ proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-2/_index.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-2/_index.fr.md
new file mode 100644
index 0000000..a96140c
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-2/_index.fr.md
@@ -0,0 +1,11 @@
++++
+title = "page 2"
+description = ""
++++
+
+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
+ tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
+ quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
+ consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
+ cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+ proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-2/test3.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-2/test3.en.md
new file mode 100644
index 0000000..f603d4c
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-2/test3.en.md
@@ -0,0 +1,6 @@
++++
+title = "page test 3"
+description = "This is a page test"
++++
+
+This is a test 3 demo child page
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-2/test3.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-2/test3.fr.md
new file mode 100644
index 0000000..6d649e8
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-2/test3.fr.md
@@ -0,0 +1,6 @@
++++
+title = "page test 3"
+description = "Ceci est une page test"
++++
+
+Ceci est une page de demo test 3
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-3/_index.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-3/_index.en.md
new file mode 100644
index 0000000..f36f861
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-3/_index.en.md
@@ -0,0 +1,6 @@
++++
+title = "page 3"
+description = "This is a demo child page"
++++
+
+This is a demo child page, not displayed in the menu
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-3/_index.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-3/_index.fr.md
new file mode 100644
index 0000000..1501cc8
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-3/_index.fr.md
@@ -0,0 +1,6 @@
++++
+title = "page 3"
+description = "Ceci est une page test"
++++
+
+Ceci est une page de demo
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-4/_index.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-4/_index.en.md
new file mode 100644
index 0000000..b9f042d
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-4/_index.en.md
@@ -0,0 +1,7 @@
++++
+title = "page 4"
+description = "This is a demo child page"
+hidden = true
++++
+
+This is a demo child page, not displayed in the menu
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-4/_index.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-4/_index.fr.md
new file mode 100644
index 0000000..6735e50
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-4/_index.fr.md
@@ -0,0 +1,7 @@
++++
+title = "page 4"
+description = "Ceci est une page test"
+hidden = true
++++
+
+Ceci est une page de demo
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/test.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/test.en.md
new file mode 100644
index 0000000..045f0a1
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/test.en.md
@@ -0,0 +1,6 @@
++++
+title = "page test"
+description = "This is a page test"
++++
+
+This is a test demo child page
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/test.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/test.fr.md
new file mode 100644
index 0000000..dd6cc3c
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/test.fr.md
@@ -0,0 +1,6 @@
++++
+title = "page test"
+description = "Ceci est une page test"
++++
+
+Ceci est une page de demo
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/expand.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/expand.en.md
new file mode 100644
index 0000000..dff1906
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/expand.en.md
@@ -0,0 +1,45 @@
+---
+title : Expand
+description : "Displays an expandable/collapsible section of text on your page"
+---
+
+The Expand shortcode displays an expandable/collapsible section of text on your page.
+Here is an example
+
+{{%expand%}}
+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
+tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
+quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
+consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
+cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+{{%/expand%}}
+
+
+## Usage
+
+
+this shortcode takes exactly one optional parameter to define the text that appears next to the expand/collapse icon. (default is "Expand me...")
+
+ {{%/*expand "Is this learn theme rocks ?" */%}}Yes !.{{%/* /expand*/%}}
+
+{{%expand "Is this learn theme rocks ?" %}}Yes !{{% /expand%}}
+
+# Demo
+
+ {{%/*expand*/%}}
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
+ tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
+ quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
+ consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
+ cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+ proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+ {{%/* /expand*/%}}
+
+
+{{%expand%}}Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
+tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
+quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
+consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
+cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+proident, sunt in culpa qui officia deserunt mollit anim id est laborum.{{% /expand%}}
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/expand.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/expand.fr.md
new file mode 100644
index 0000000..efb86a3
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/expand.fr.md
@@ -0,0 +1,45 @@
+---
+title : Expand
+description : "Affiche une section de texte qui se plie et se déplie"
+---
+
+Le shortcode *Expand* affiche une section de texte qui se plie et se déplie.
+Ci-dessous un exemple.
+
+{{%expand%}}
+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
+tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
+quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
+consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
+cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+{{%/expand%}}
+
+
+## Utilisation
+
+
+Ce shortcode prends exactement un paramètre optionel pour définir le texte à côté de l'icone. (valeur par défaut est "Déroulez-moi...")
+
+ {{%/*expand "Est-ce que ce thème envoie du pâté ?" */%}}Oui !.{{%/* /expand*/%}}
+
+{{%expand "Est-ce que ce thème envoie du pâté ?" %}}Oui !{{% /expand%}}
+
+# Demo
+
+ {{%/*expand*/%}}
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
+ tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
+ quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
+ consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
+ cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+ proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+ {{%/* /expand*/%}}
+
+
+{{%expand%}}Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
+tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
+quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
+consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
+cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+proident, sunt in culpa qui officia deserunt mollit anim id est laborum.{{% /expand%}}
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/mermaid.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/mermaid.en.md
new file mode 100644
index 0000000..8963aed
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/mermaid.en.md
@@ -0,0 +1,103 @@
+---
+title : "Mermaid"
+description : "Generation of diagram and flowchart from text in a similar manner as markdown"
+---
+
+[Mermaid](https://mermaidjs.github.io/) is a library helping you to generate diagram and flowcharts from text, in a similar manner as Markdown.
+
+Just insert your mermaid code in the `mermaid` shortcode and that's it.
+
+## Flowchart example
+ {{*mermaid align="left"*/>}}
+ graph LR;
+ A[Hard edge] -->|Link text| B(Round edge)
+ B --> C{Decision}
+ C -->|One| D[Result one]
+ C -->|Two| E[Result two]
+ {{* /mermaid */>}}
+
+renders as
+
+{{}}
+graph LR;
+ A[Hard edge] -->|Link text| B(Round edge)
+ B --> C{Decision}
+ C -->|One| D[Result one]
+ C -->|Two| E[Result two]
+{{< /mermaid >}}
+
+## Sequence example
+
+ {{*mermaid*/>}}
+ sequenceDiagram
+ participant Alice
+ participant Bob
+ Alice->>John: Hello John, how are you?
+ loop Healthcheck
+ John->John: Fight against hypochondria
+ end
+ Note right of John: Rational thoughts prevail...
+ John-->Alice: Great!
+ John->Bob: How about you?
+ Bob-->John: Jolly good!
+ {{* /mermaid */>}}
+
+renders as
+
+{{}}
+sequenceDiagram
+ participant Alice
+ participant Bob
+ Alice->>John: Hello John, how are you?
+ loop Healthcheck
+ John->John: Fight against hypochondria
+ end
+ Note right of John: Rational thoughts prevail...
+ John-->Alice: Great!
+ John->Bob: How about you?
+ Bob-->John: Jolly good!
+{{< /mermaid >}}
+
+## GANTT Example
+
+ {{*mermaid*/>}}
+ gantt
+ dateFormat YYYY-MM-DD
+ title Adding GANTT diagram functionality to mermaid
+ section A section
+ Completed task :done, des1, 2014-01-06,2014-01-08
+ Active task :active, des2, 2014-01-09, 3d
+ Future task : des3, after des2, 5d
+ Future task2 : des4, after des3, 5d
+ section Critical tasks
+ Completed task in the critical line :crit, done, 2014-01-06,24h
+ Implement parser and jison :crit, done, after des1, 2d
+ Create tests for parser :crit, active, 3d
+ Future task in critical line :crit, 5d
+ Create tests for renderer :2d
+ Add to mermaid :1d
+ {{* /mermaid */>}}
+
+
+render as
+
+{{}}
+gantt
+ dateFormat YYYY-MM-DD
+ title Adding GANTT diagram functionality to mermaid
+ section A section
+ Completed task :done, des1, 2014-01-06,2014-01-08
+ Active task :active, des2, 2014-01-09, 3d
+ Future task : des3, after des2, 5d
+ Future task2 : des4, after des3, 5d
+ section Critical tasks
+ Completed task in the critical line :crit, done, 2014-01-06,24h
+ Implement parser and jison :crit, done, after des1, 2d
+ Create tests for parser :crit, active, 3d
+ Future task in critical line :crit, 5d
+ Create tests for renderer :2d
+ Add to mermaid :1d
+{{}}
+
+
+
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/mermaid.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/mermaid.fr.md
new file mode 100644
index 0000000..ac66d84
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/mermaid.fr.md
@@ -0,0 +1,103 @@
+---
+title : "Mermaid"
+description : "Génération de diagrammes à partir de texte, dans le même style que Markdown"
+---
+
+[Mermaid](https://mermaidjs.github.io/) est une bibliothèque Javascript qui permet de générer des diagrammes (séquence, état, gantt, etc.) à partir de texte, dans le même style que Markdown.
+
+Insérer votre code Mermaid dans un shortcode `mermaid` et c'est tout.
+
+## Flowchart example
+ {{*mermaid align="left"*/>}}
+ graph LR;
+ A[Bords droits] -->|Lien texte| B(Bords arondis)
+ B --> C{Décision}
+ C -->|Un| D[Résultat un]
+ C -->|Deux| E[Résultat deux]
+ {{* /mermaid */>}}
+
+renders as
+
+{{}}
+graph LR;
+ A[Bords droits] -->|Lien texte| B(Bords arondis)
+ B --> C{Décision}
+ C -->|Un| D[Résultat un]
+ C -->|Deux| E[Résultat deux]
+{{< /mermaid >}}
+
+## Sequence example
+
+ {{*mermaid*/>}}
+ sequenceDiagram
+ participant Alice
+ participant Bob
+ Alice->>John: Salut John, comment vas-tu?
+ loop Vérification
+ John->John: Se bat contre l'hyponcodrie.
+ end
+ Note right of John: Les pensées rationnelles prédominent...
+ John-->Alice: Super!
+ John->Bob: Et toi?
+ Bob-->John: Au top!
+ {{* /mermaid */>}}
+
+renders as
+
+{{}}
+sequenceDiagram
+ participant Alice
+ participant Bob
+ Alice->>John: Salut John, comment vas-tu?
+ loop Vérification
+ John->John: Se bat contre l'hyponcodrie.
+ end
+ Note right of John: Les pensées rationnelles prédominent...
+ John-->Alice: Super!
+ John->Bob: Et toi?
+ Bob-->John: Au top!
+{{< /mermaid >}}
+
+## GANTT Example
+
+ {{*mermaid*/>}}
+ gantt
+ dateFormat YYYY-MM-DD
+ title Ajout de la fonctionnalité de GANTT à Mermaid
+ section Une section
+ Tâche complétée :done, des1, 2014-01-06,2014-01-08
+ Tâche en cours :active, des2, 2014-01-09, 3d
+ Future tâche : des3, after des2, 5d
+ Future tâche 2 : des4, after des3, 5d
+ section Tâches critiques
+ Tâche complétée dans le chemin critique :crit, done, 2014-01-06,24h
+ Implémenter le parser et jison :crit, done, after des1, 2d
+ Créer des tests pour le parser :crit, active, 3d
+ Future tâche dans le chemin critique :crit, 5d
+ Créer des tests pour le renderer :2d
+ Ajout à Mermaid :1d
+ {{* /mermaid */>}}
+
+
+render as
+
+{{}}
+gantt
+ dateFormat YYYY-MM-DD
+ title Ajout de la fonctionnalité de GANTT à Mermaid
+ section Une section
+ Tâche complétée :done, des1, 2014-01-06,2014-01-08
+ Tâche en cours :active, des2, 2014-01-09, 3d
+ Future tâche : des3, after des2, 5d
+ Future tâche 2 : des4, after des3, 5d
+ section Tâches critiques
+ Tâche complétée dans le chemin critique :crit, done, 2014-01-06,24h
+ Implémenter le parser et jison :crit, done, after des1, 2d
+ Créer des tests pour le parser :crit, active, 3d
+ Future tâche dans le chemin critique :crit, 5d
+ Créer des tests pour le renderer :2d
+ Ajout à Mermaid :1d
+{{}}
+
+
+
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/notice.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/notice.en.md
new file mode 100644
index 0000000..df346c1
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/notice.en.md
@@ -0,0 +1,62 @@
+---
+title: Notice
+description : "Disclaimers to help you structure your page"
+---
+
+The notice shortcode shows 4 types of disclaimers to help you structure your page.
+
+### Note
+
+```
+{{%/* notice note */%}}
+A notice disclaimer
+{{%/* /notice */%}}
+```
+
+renders as
+
+{{% notice note %}}
+A notice disclaimer
+{{% /notice %}}
+
+### Info
+
+```
+{{%/* notice info */%}}
+An information disclaimer
+{{%/* /notice */%}}
+```
+
+renders as
+
+{{% notice info %}}
+An information disclaimer
+{{% /notice %}}
+
+### Tip
+
+```
+{{%/* notice tip */%}}
+A tip disclaimer
+{{%/* /notice */%}}
+```
+
+renders as
+
+{{% notice tip %}}
+A tip disclaimer
+{{% /notice %}}
+
+### Warning
+
+```
+{{%/* notice warning */%}}
+An warning disclaimer
+{{%/* /notice */%}}
+```
+
+renders as
+
+{{% notice warning %}}
+A warning disclaimer
+{{% /notice %}}
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/notice.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/notice.fr.md
new file mode 100644
index 0000000..91e4d70
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/notice.fr.md
@@ -0,0 +1,62 @@
+---
+title: Notice
+description : "Message pour vous aider à structurer votre contenu"
+---
+
+Le shortcode *Notice* permet d'afficher 4 types de message pour vous aider à structurer votre contenu.
+
+### Note
+
+```
+{{%/* notice note */%}}
+Une notice de type *note*
+{{%/* /notice */%}}
+```
+
+s'affiche comme
+
+{{% notice note %}}
+Une notice de type *note*
+{{% /notice %}}
+
+### Info
+
+```
+{{%/* notice info */%}}
+Une notice de type *info*
+{{%/* /notice */%}}
+```
+
+s'affiche comme
+
+{{% notice info %}}
+Une notice de type *info*
+{{% /notice %}}
+
+### Tip
+
+```
+{{%/* notice tip */%}}
+Une notice de type *tip*
+{{%/* /notice */%}}
+```
+
+s'affiche comme
+
+{{% notice tip %}}
+Une notice de type *tip*
+{{% /notice %}}
+
+### Warning
+
+```
+{{%/* notice warning */%}}
+Une notice de type *warning*
+{{%/* /notice */%}}
+```
+
+s'affiche comme
+
+{{% notice warning %}}
+Une notice de type *warning*
+{{% /notice %}}
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/showcase.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/showcase.en.md
new file mode 100644
index 0000000..b6d5e0a
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/showcase.en.md
@@ -0,0 +1,10 @@
+---
+title: Showcase
+disableToc: true
+---
+
+#### [TAT](https://ovh.github.io/tat/overview/) by OVH
+
+
+
+
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/showcase.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/showcase.fr.md
new file mode 100644
index 0000000..192babd
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/showcase.fr.md
@@ -0,0 +1,11 @@
+---
+title: Vitrine
+disableToc: true
+slug: vitrine
+---
+
+#### [TAT](https://ovh.github.io/tat/overview/) par OVH
+
+
+
+
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/layouts/partials/logo.html b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/layouts/partials/logo.html
new file mode 100644
index 0000000..a004a9a
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/layouts/partials/logo.html
@@ -0,0 +1,39 @@
+
+
+
+
+
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/layouts/partials/menu-footer.html b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/layouts/partials/menu-footer.html
new file mode 100644
index 0000000..67f786e
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/layouts/partials/menu-footer.html
@@ -0,0 +1,14 @@
+
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/layouts/shortcodes/mermaid.html b/vendor/github.com/magefile/mage/site/themes/learn/layouts/shortcodes/mermaid.html
new file mode 100644
index 0000000..3227064
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/layouts/shortcodes/mermaid.html
@@ -0,0 +1 @@
+
{{ safeHTML .Inner }}
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/layouts/shortcodes/notice.html b/vendor/github.com/magefile/mage/site/themes/learn/layouts/shortcodes/notice.html
new file mode 100644
index 0000000..936f68a
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/layouts/shortcodes/notice.html
@@ -0,0 +1 @@
+
"].join("")),g="."+d.namespace+"-close"+(d.otherClose?","+d.otherClose:"");return d.$instance=f.clone().addClass(d.variant),d.$instance.on(d.closeTrigger+"."+d.namespace,function(b){var c=a(b.target);("background"===d.closeOnClick&&c.is("."+d.namespace)||"anywhere"===d.closeOnClick||c.closest(g).length)&&(b.preventDefault(),d.close())}),this},getContent:function(){var b=this,c=this.constructor.contentFilters,d=function(a){return b.$currentTarget&&b.$currentTarget.attr(a)},e=d(b.targetAttr),f=b.target||e||"",g=c[b.type];if(!g&&f in c&&(g=c[f],f=b.target&&e),f=f||d("href")||"",!g)for(var h in c)b[h]&&(g=c[h],f=b[h]);if(!g){var i=f;if(f=null,a.each(b.contentFilters,function(){return g=c[this],g.test&&(f=g.test(i)),!f&&g.regex&&i.match&&i.match(g.regex)&&(f=i),!f}),!f)return"console"in window&&window.console.error("Featherlight: no content filter found "+(i?' for "'+i+'"':" (no target specified)")),!1}return g.process.call(b,f)},setContent:function(b){var c=this;return(b.is("iframe")||a("iframe",b).length>0)&&c.$instance.addClass(c.namespace+"-iframe"),c.$instance.removeClass(c.namespace+"-loading"),c.$instance.find("."+c.namespace+"-inner").slice(1).remove().end().replaceWith(a.contains(c.$instance[0],b[0])?"":b),c.$content=b.addClass(c.namespace+"-inner"),c},open:function(b){var d=this;if(d.$instance.hide().appendTo(d.root),!(b&&b.isDefaultPrevented()||d.beforeOpen(b)===!1)){b&&b.preventDefault();var e=d.getContent();if(e)return c.push(d),h(!0),d.$instance.fadeIn(d.openSpeed),d.beforeContent(b),a.when(e).always(function(a){d.setContent(a),d.afterContent(b)}).then(d.$instance.promise()).done(function(){d.afterOpen(b)})}return d.$instance.detach(),a.Deferred().reject().promise()},close:function(b){var c=this,e=a.Deferred();return c.beforeClose(b)===!1?e.reject():(0===d(c).length&&h(!1),c.$instance.fadeOut(c.closeSpeed,function(){c.$instance.detach(),c.afterClose(b),e.resolve()})),e.promise()},chainCallbacks:function(b){for(var c in b)this[c]=a.proxy(b[c],this,a.proxy(this[c],this))}},a.extend(b,{id:0,autoBind:"[data-featherlight]",defaults:b.prototype,contentFilters:{jquery:{regex:/^[#.]\w/,test:function(b){return b instanceof a&&b},process:function(b){return a(b).clone(!0)}},image:{regex:/\.(png|jpg|jpeg|gif|tiff|bmp)(\?\S*)?$/i,process:function(b){var c=this,d=a.Deferred(),e=new Image,f=a('');return e.onload=function(){f.naturalWidth=e.width,f.naturalHeight=e.height,d.resolve(f)},e.onerror=function(){d.reject(f)},e.src=b,d.promise()}},html:{regex:/^\s*<[\w!][^<]*>/,process:function(b){return a(b)}},ajax:{regex:/./,process:function(b){var c=a.Deferred(),d=a("").load(b,function(a,b){"error"!==b&&c.resolve(d.contents()),c.fail()});return c.promise()}},iframe:{process:function(b){var c=new a.Deferred,d=a("").hide().attr("src",b).css(e(this,"iframe")).on("load",function(){c.resolve(d.show())}).appendTo(this.$instance.find("."+this.namespace+"-content"));return c.promise()}},text:{process:function(b){return a("
",{text:b})}}},functionAttributes:["beforeOpen","afterOpen","beforeContent","afterContent","beforeClose","afterClose"],readElementConfig:function(b,c){var d=this,e=new RegExp("^data-"+c+"-(.*)"),f={};return b&&b.attributes&&a.each(b.attributes,function(){var b=this.name.match(e);if(b){var c=this.value,g=a.camelCase(b[1]);if(a.inArray(g,d.functionAttributes)>=0)c=new Function(c);else try{c=a.parseJSON(c)}catch(h){}f[g]=c}}),f},extend:function(b,c){var d=function(){this.constructor=b};return d.prototype=this.prototype,b.prototype=new d,b.__super__=this.prototype,a.extend(b,this,c),b.defaults=b.prototype,b},attach:function(b,c,d){var e=this;"object"!=typeof c||c instanceof a!=!1||d||(d=c,c=void 0),d=a.extend({},d);var f=d.namespace||e.defaults.namespace,g=a.extend({},e.defaults,e.readElementConfig(b[0],f),d);return b.on(g.openTrigger+"."+g.namespace,g.filter,function(f){var h=a.extend({$source:b,$currentTarget:a(this)},e.readElementConfig(b[0],g.namespace),e.readElementConfig(this,g.namespace),d);new e(c,h).open(f)}),b},current:function(){var a=this.opened();return a[a.length-1]||null},opened:function(){var b=this;return d(),a.grep(c,function(a){return a instanceof b})},close:function(){var a=this.current();return a?a.close():void 0},_onReady:function(){var b=this;b.autoBind&&(b.attach(a(document),{filter:b.autoBind}),a(b.autoBind).filter("[data-featherlight-filter]").each(function(){b.attach(a(this))}))},_callbackChain:{onKeyUp:function(a,b){return 27===b.keyCode?(this.closeOnEsc&&this.$instance.find("."+this.namespace+"-close:first").click(),!1):a(b)},onResize:function(a,b){if(this.$content.naturalWidth){var c=this.$content.naturalWidth,d=this.$content.naturalHeight;this.$content.css("width","").css("height","");var e=Math.max(c/parseInt(this.$content.parent().css("width"),10),d/parseInt(this.$content.parent().css("height"),10));e>1&&this.$content.css("width",""+c/e+"px").css("height",""+d/e+"px")}return a(b)},afterContent:function(a,b){var c=a(b);return this.onResize(b),c}}}),a.featherlight=b,a.fn.featherlight=function(a,c){return b.attach(this,a,c)},a(document).ready(function(){b._onReady()})}(jQuery);
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/js/highlight.pack.js b/vendor/github.com/magefile/mage/site/themes/learn/static/js/highlight.pack.js
new file mode 100644
index 0000000..ae86013
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/static/js/highlight.pack.js
@@ -0,0 +1,2 @@
+/*! highlight.js v9.2.0 | BSD3 License | git.io/hljslicense */
+!function(e){var n="object"==typeof window&&window||"object"==typeof self&&self;"undefined"!=typeof exports?e(exports):n&&(n.hljs=e({}),"function"==typeof define&&define.amd&&define([],function(){return n.hljs}))}(function(e){function n(e){return e.replace(/&/gm,"&").replace(//gm,">")}function t(e){return e.nodeName.toLowerCase()}function r(e,n){var t=e&&e.exec(n);return t&&0==t.index}function a(e){return/^(no-?highlight|plain|text)$/i.test(e)}function i(e){var n,t,r,i=e.className+" ";if(i+=e.parentNode?e.parentNode.className:"",t=/\blang(?:uage)?-([\w-]+)\b/i.exec(i))return w(t[1])?t[1]:"no-highlight";for(i=i.split(/\s+/),n=0,r=i.length;r>n;n++)if(w(i[n])||a(i[n]))return i[n]}function o(e,n){var t,r={};for(t in e)r[t]=e[t];if(n)for(t in n)r[t]=n[t];return r}function u(e){var n=[];return function r(e,a){for(var i=e.firstChild;i;i=i.nextSibling)3==i.nodeType?a+=i.nodeValue.length:1==i.nodeType&&(n.push({event:"start",offset:a,node:i}),a=r(i,a),t(i).match(/br|hr|img|input/)||n.push({event:"stop",offset:a,node:i}));return a}(e,0),n}function c(e,r,a){function i(){return e.length&&r.length?e[0].offset!=r[0].offset?e[0].offset"}function u(e){f+=""+t(e)+">"}function c(e){("start"==e.event?o:u)(e.node)}for(var s=0,f="",l=[];e.length||r.length;){var g=i();if(f+=n(a.substr(s,g[0].offset-s)),s=g[0].offset,g==e){l.reverse().forEach(u);do c(g.splice(0,1)[0]),g=i();while(g==e&&g.length&&g[0].offset==s);l.reverse().forEach(o)}else"start"==g[0].event?l.push(g[0].node):l.pop(),c(g.splice(0,1)[0])}return f+n(a.substr(s))}function s(e){function n(e){return e&&e.source||e}function t(t,r){return new RegExp(n(t),"m"+(e.cI?"i":"")+(r?"g":""))}function r(a,i){if(!a.compiled){if(a.compiled=!0,a.k=a.k||a.bK,a.k){var u={},c=function(n,t){e.cI&&(t=t.toLowerCase()),t.split(" ").forEach(function(e){var t=e.split("|");u[t[0]]=[n,t[1]?Number(t[1]):1]})};"string"==typeof a.k?c("keyword",a.k):Object.keys(a.k).forEach(function(e){c(e,a.k[e])}),a.k=u}a.lR=t(a.l||/\b\w+\b/,!0),i&&(a.bK&&(a.b="\\b("+a.bK.split(" ").join("|")+")\\b"),a.b||(a.b=/\B|\b/),a.bR=t(a.b),a.e||a.eW||(a.e=/\B|\b/),a.e&&(a.eR=t(a.e)),a.tE=n(a.e)||"",a.eW&&i.tE&&(a.tE+=(a.e?"|":"")+i.tE)),a.i&&(a.iR=t(a.i)),void 0===a.r&&(a.r=1),a.c||(a.c=[]);var s=[];a.c.forEach(function(e){e.v?e.v.forEach(function(n){s.push(o(e,n))}):s.push("self"==e?a:e)}),a.c=s,a.c.forEach(function(e){r(e,a)}),a.starts&&r(a.starts,i);var f=a.c.map(function(e){return e.bK?"\\.?("+e.b+")\\.?":e.b}).concat([a.tE,a.i]).map(n).filter(Boolean);a.t=f.length?t(f.join("|"),!0):{exec:function(){return null}}}}r(e)}function f(e,t,a,i){function o(e,n){for(var t=0;t";return i+=e+'">',i+n+o}function h(){if(!k.k)return n(M);var e="",t=0;k.lR.lastIndex=0;for(var r=k.lR.exec(M);r;){e+=n(M.substr(t,r.index-t));var a=g(k,r);a?(B+=a[1],e+=p(a[0],n(r[0]))):e+=n(r[0]),t=k.lR.lastIndex,r=k.lR.exec(M)}return e+n(M.substr(t))}function d(){var e="string"==typeof k.sL;if(e&&!R[k.sL])return n(M);var t=e?f(k.sL,M,!0,y[k.sL]):l(M,k.sL.length?k.sL:void 0);return k.r>0&&(B+=t.r),e&&(y[k.sL]=t.top),p(t.language,t.value,!1,!0)}function b(){L+=void 0!==k.sL?d():h(),M=""}function v(e,n){L+=e.cN?p(e.cN,"",!0):"",k=Object.create(e,{parent:{value:k}})}function m(e,n){if(M+=e,void 0===n)return b(),0;var t=o(n,k);if(t)return t.skip?M+=n:(t.eB&&(M+=n),b(),t.rB||t.eB||(M=n)),v(t,n),t.rB?0:n.length;var r=u(k,n);if(r){var a=k;a.skip?M+=n:(a.rE||a.eE||(M+=n),b(),a.eE&&(M=n));do k.cN&&(L+=""),k.skip||(B+=k.r),k=k.parent;while(k!=r.parent);return r.starts&&v(r.starts,""),a.rE?0:n.length}if(c(n,k))throw new Error('Illegal lexeme "'+n+'" for mode "'+(k.cN||"")+'"');return M+=n,n.length||1}var N=w(e);if(!N)throw new Error('Unknown language: "'+e+'"');s(N);var x,k=i||N,y={},L="";for(x=k;x!=N;x=x.parent)x.cN&&(L=p(x.cN,"",!0)+L);var M="",B=0;try{for(var C,j,I=0;;){if(k.t.lastIndex=I,C=k.t.exec(t),!C)break;j=m(t.substr(I,C.index-I),C[0]),I=C.index+j}for(m(t.substr(I)),x=k;x.parent;x=x.parent)x.cN&&(L+="");return{r:B,value:L,language:e,top:k}}catch(O){if(-1!=O.message.indexOf("Illegal"))return{r:0,value:n(t)};throw O}}function l(e,t){t=t||E.languages||Object.keys(R);var r={r:0,value:n(e)},a=r;return t.forEach(function(n){if(w(n)){var t=f(n,e,!1);t.language=n,t.r>a.r&&(a=t),t.r>r.r&&(a=r,r=t)}}),a.language&&(r.second_best=a),r}function g(e){return E.tabReplace&&(e=e.replace(/^((<[^>]+>|\t)+)/gm,function(e,n){return n.replace(/\t/g,E.tabReplace)})),E.useBR&&(e=e.replace(/\n/g," ")),e}function p(e,n,t){var r=n?x[n]:t,a=[e.trim()];return e.match(/\bhljs\b/)||a.push("hljs"),-1===e.indexOf(r)&&a.push(r),a.join(" ").trim()}function h(e){var n=i(e);if(!a(n)){var t;E.useBR?(t=document.createElementNS("http://www.w3.org/1999/xhtml","div"),t.innerHTML=e.innerHTML.replace(/\n/g,"").replace(/ /g,"\n")):t=e;var r=t.textContent,o=n?f(n,r,!0):l(r),s=u(t);if(s.length){var h=document.createElementNS("http://www.w3.org/1999/xhtml","div");h.innerHTML=o.value,o.value=c(s,u(h),r)}o.value=g(o.value),e.innerHTML=o.value,e.className=p(e.className,n,o.language),e.result={language:o.language,re:o.r},o.second_best&&(e.second_best={language:o.second_best.language,re:o.second_best.r})}}function d(e){E=o(E,e)}function b(){if(!b.called){b.called=!0;var e=document.querySelectorAll("pre code");Array.prototype.forEach.call(e,h)}}function v(){addEventListener("DOMContentLoaded",b,!1),addEventListener("load",b,!1)}function m(n,t){var r=R[n]=t(e);r.aliases&&r.aliases.forEach(function(e){x[e]=n})}function N(){return Object.keys(R)}function w(e){return e=(e||"").toLowerCase(),R[e]||R[x[e]]}var E={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},R={},x={};return e.highlight=f,e.highlightAuto=l,e.fixMarkup=g,e.highlightBlock=h,e.configure=d,e.initHighlighting=b,e.initHighlightingOnLoad=v,e.registerLanguage=m,e.listLanguages=N,e.getLanguage=w,e.inherit=o,e.IR="[a-zA-Z]\\w*",e.UIR="[a-zA-Z_]\\w*",e.NR="\\b\\d+(\\.\\d+)?",e.CNR="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BNR="\\b(0b[01]+)",e.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BE={b:"\\\\[\\s\\S]",r:0},e.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[e.BE]},e.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[e.BE]},e.PWM={b:/\b(a|an|the|are|I|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|like)\b/},e.C=function(n,t,r){var a=e.inherit({cN:"comment",b:n,e:t,c:[]},r||{});return a.c.push(e.PWM),a.c.push({cN:"doctag",b:"(?:TODO|FIXME|NOTE|BUG|XXX):",r:0}),a},e.CLCM=e.C("//","$"),e.CBCM=e.C("/\\*","\\*/"),e.HCM=e.C("#","$"),e.NM={cN:"number",b:e.NR,r:0},e.CNM={cN:"number",b:e.CNR,r:0},e.BNM={cN:"number",b:e.BNR,r:0},e.CSSNM={cN:"number",b:e.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},e.RM={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[e.BE,{b:/\[/,e:/\]/,r:0,c:[e.BE]}]},e.TM={cN:"title",b:e.IR,r:0},e.UTM={cN:"title",b:e.UIR,r:0},e.METHOD_GUARD={b:"\\.\\s*"+e.UIR,r:0},e});hljs.registerLanguage("bash",function(e){var t={cN:"variable",v:[{b:/\$[\w\d#@][\w\d_]*/},{b:/\$\{(.*?)}/}]},s={cN:"string",b:/"/,e:/"/,c:[e.BE,t,{cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]}]},a={cN:"string",b:/'/,e:/'/};return{aliases:["sh","zsh"],l:/-?[a-z\.]+/,k:{keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp",_:"-ne -eq -lt -gt -f -d -e -s -l -a"},c:[{cN:"meta",b:/^#![^\n]+sh\s*$/,r:10},{cN:"function",b:/\w[\w\d_]*\s*\(\s*\)\s*\{/,rB:!0,c:[e.inherit(e.TM,{b:/\w[\w\d_]*/})],r:0},e.HCM,s,a,t]}});hljs.registerLanguage("javascript",function(e){return{aliases:["js","jsx"],k:{keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await static import from as",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},c:[{cN:"meta",r:10,b:/^\s*['"]use (strict|asm)['"]/},{cN:"meta",b:/^#!/,e:/$/},e.ASM,e.QSM,{cN:"string",b:"`",e:"`",c:[e.BE,{cN:"subst",b:"\\$\\{",e:"\\}"}]},e.CLCM,e.CBCM,{cN:"number",v:[{b:"\\b(0[bB][01]+)"},{b:"\\b(0[oO][0-7]+)"},{b:e.CNR}],r:0},{b:"("+e.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[e.CLCM,e.CBCM,e.RM,{b:/,e:/(\/\w+|\w+\/)>/,sL:"xml",c:[{b:/<\w+\/>/,skip:!0},{b:/<\w+/,e:/(\/\w+|\w+\/)>/,skip:!0,c:["self"]}]}],r:0},{cN:"function",bK:"function",e:/\{/,eE:!0,c:[e.inherit(e.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,c:[e.CLCM,e.CBCM]}],i:/\[|%/},{b:/\$[(.]/},e.METHOD_GUARD,{cN:"class",bK:"class",e:/[{;=]/,eE:!0,i:/[:"\[\]]/,c:[{bK:"extends"},e.UTM]},{bK:"constructor",e:/\{/,eE:!0}],i:/#(?!!)/}});hljs.registerLanguage("python",function(e){var r={cN:"meta",b:/^(>>>|\.\.\.) /},b={cN:"string",c:[e.BE],v:[{b:/(u|b)?r?'''/,e:/'''/,c:[r],r:10},{b:/(u|b)?r?"""/,e:/"""/,c:[r],r:10},{b:/(u|r|ur)'/,e:/'/,r:10},{b:/(u|r|ur)"/,e:/"/,r:10},{b:/(b|br)'/,e:/'/},{b:/(b|br)"/,e:/"/},e.ASM,e.QSM]},a={cN:"number",r:0,v:[{b:e.BNR+"[lLjJ]?"},{b:"\\b(0o[0-7]+)[lLjJ]?"},{b:e.CNR+"[lLjJ]?"}]},l={cN:"params",b:/\(/,e:/\)/,c:["self",r,a,b]};return{aliases:["py","gyp"],k:{keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda async await nonlocal|10 None True False",built_in:"Ellipsis NotImplemented"},i:/(<\/|->|\?)/,c:[r,a,b,e.HCM,{v:[{cN:"function",bK:"def",r:10},{cN:"class",bK:"class"}],e:/:/,i:/[${=;\n,]/,c:[e.UTM,l,{b:/->/,eW:!0,k:"None"}]},{cN:"meta",b:/^[\t ]*@/,e:/$/},{b:/\b(print|exec)\(/}]}});hljs.registerLanguage("typescript",function(e){var r={keyword:"in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const class public private protected get set super static implements enum export import declare type namespace abstract",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document any number boolean string void"};return{aliases:["ts"],k:r,c:[{cN:"meta",b:/^\s*['"]use strict['"]/},e.ASM,e.QSM,{cN:"string",b:"`",e:"`",c:[e.BE,{cN:"subst",b:"\\$\\{",e:"\\}"}]},e.CLCM,e.CBCM,{cN:"number",v:[{b:"\\b(0[bB][01]+)"},{b:"\\b(0[oO][0-7]+)"},{b:e.CNR}],r:0},{b:"("+e.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[e.CLCM,e.CBCM,e.RM],r:0},{cN:"function",b:"function",e:/[\{;]/,eE:!0,k:r,c:["self",e.inherit(e.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,k:r,c:[e.CLCM,e.CBCM],i:/["'\(]/}],i:/\[|%/,r:0},{bK:"constructor",e:/\{/,eE:!0},{bK:"module",e:/\{/,eE:!0},{bK:"interface",e:/\{/,eE:!0,k:"interface extends"},{b:/\$[(.]/},{b:"\\."+e.IR,r:0}]}});hljs.registerLanguage("yaml",function(e){var a={literal:"{ } true false yes no Yes No True False null"},b="^[ \\-]*",r="[a-zA-Z_][\\w\\-]*",t={cN:"attr",v:[{b:b+r+":"},{b:b+'"'+r+'":'},{b:b+"'"+r+"':"}]},c={cN:"template-variable",v:[{b:"{{",e:"}}"},{b:"%{",e:"}"}]},l={cN:"string",r:0,v:[{b:/'/,e:/'/},{b:/"/,e:/"/}],c:[e.BE,c]};return{cI:!0,aliases:["yml","YAML","yaml"],c:[t,{cN:"meta",b:"^---s*$",r:10},{cN:"string",b:"[\\|>] *$",rE:!0,c:l.c,e:t.v[0].b},{b:"<%[%=-]?",e:"[%-]?%>",sL:"ruby",eB:!0,eE:!0,r:0},{cN:"type",b:"!!"+e.UIR},{cN:"meta",b:"&"+e.UIR+"$"},{cN:"meta",b:"\\*"+e.UIR+"$"},{cN:"bullet",b:"^ *-",r:0},l,e.HCM,e.CNM],k:a}});hljs.registerLanguage("lua",function(e){var t="\\[=*\\[",a="\\]=*\\]",r={b:t,e:a,c:["self"]},n=[e.C("--(?!"+t+")","$"),e.C("--"+t,a,{c:[r],r:10})];return{l:e.UIR,k:{keyword:"and break do else elseif end false for if in local nil not or repeat return then true until while",built_in:"_G _VERSION assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall coroutine debug io math os package string table"},c:n.concat([{cN:"function",bK:"function",e:"\\)",c:[e.inherit(e.TM,{b:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{cN:"params",b:"\\(",eW:!0,c:n}].concat(n)},e.CNM,e.ASM,e.QSM,{cN:"string",b:t,e:a,c:[r],r:5}])}});hljs.registerLanguage("puppet",function(e){var s={keyword:"and case default else elsif false if in import enherits node or true undef unless main settings $string ",literal:"alias audit before loglevel noop require subscribe tag owner ensure group mode name|0 changes context force incl lens load_path onlyif provider returns root show_diff type_check en_address ip_address realname command environment hour monute month monthday special target weekday creates cwd ogoutput refresh refreshonly tries try_sleep umask backup checksum content ctime force ignore links mtime purge recurse recurselimit replace selinux_ignore_defaults selrange selrole seltype seluser source souirce_permissions sourceselect validate_cmd validate_replacement allowdupe attribute_membership auth_membership forcelocal gid ia_load_module members system host_aliases ip allowed_trunk_vlans description device_url duplex encapsulation etherchannel native_vlan speed principals allow_root auth_class auth_type authenticate_user k_of_n mechanisms rule session_owner shared options device fstype enable hasrestart directory present absent link atboot blockdevice device dump pass remounts poller_tag use message withpath adminfile allow_virtual allowcdrom category configfiles flavor install_options instance package_settings platform responsefile status uninstall_options vendor unless_system_user unless_uid binary control flags hasstatus manifest pattern restart running start stop allowdupe auths expiry gid groups home iterations key_membership keys managehome membership password password_max_age password_min_age profile_membership profiles project purge_ssh_keys role_membership roles salt shell uid baseurl cost descr enabled enablegroups exclude failovermethod gpgcheck gpgkey http_caching include includepkgs keepalive metadata_expire metalink mirrorlist priority protect proxy proxy_password proxy_username repo_gpgcheck s3_enabled skip_if_unavailable sslcacert sslclientcert sslclientkey sslverify mounted",built_in:"architecture augeasversion blockdevices boardmanufacturer boardproductname boardserialnumber cfkey dhcp_servers domain ec2_ ec2_userdata facterversion filesystems ldom fqdn gid hardwareisa hardwaremodel hostname id|0 interfaces ipaddress ipaddress_ ipaddress6 ipaddress6_ iphostnumber is_virtual kernel kernelmajversion kernelrelease kernelversion kernelrelease kernelversion lsbdistcodename lsbdistdescription lsbdistid lsbdistrelease lsbmajdistrelease lsbminordistrelease lsbrelease macaddress macaddress_ macosx_buildversion macosx_productname macosx_productversion macosx_productverson_major macosx_productversion_minor manufacturer memoryfree memorysize netmask metmask_ network_ operatingsystem operatingsystemmajrelease operatingsystemrelease osfamily partitions path physicalprocessorcount processor processorcount productname ps puppetversion rubysitedir rubyversion selinux selinux_config_mode selinux_config_policy selinux_current_mode selinux_current_mode selinux_enforced selinux_policyversion serialnumber sp_ sshdsakey sshecdsakey sshrsakey swapencrypted swapfree swapsize timezone type uniqueid uptime uptime_days uptime_hours uptime_seconds uuid virtual vlans xendomains zfs_version zonenae zones zpool_version"},r=e.C("#","$"),a="([A-Za-z_]|::)(\\w|::)*",i=e.inherit(e.TM,{b:a}),o={cN:"variable",b:"\\$"+a},t={cN:"string",c:[e.BE,o],v:[{b:/'/,e:/'/},{b:/"/,e:/"/}]};return{aliases:["pp"],c:[r,o,t,{bK:"class",e:"\\{|;",i:/=/,c:[i,r]},{bK:"define",e:/\{/,c:[{cN:"section",b:e.IR,endsParent:!0}]},{b:e.IR+"\\s+\\{",rB:!0,e:/\S/,c:[{cN:"keyword",b:e.IR},{b:/\{/,e:/\}/,k:s,r:0,c:[t,r,{b:"[a-zA-Z_]+\\s*=>",rB:!0,e:"=>",c:[{cN:"attr",b:e.IR}]},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},o]}],r:0}]}});hljs.registerLanguage("dts",function(e){var a={cN:"string",v:[e.inherit(e.QSM,{b:'((u8?|U)|L)?"'}),{b:'(u8?|U)?R"',e:'"',c:[e.BE]},{b:"'\\\\?.",e:"'",i:"."}]},c={cN:"number",v:[{b:"\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)"},{b:e.CNR}],r:0},b={cN:"meta",b:"#",e:"$",k:{"meta-keyword":"if else elif endif define undef ifdef ifndef"},c:[{b:/\\\n/,r:0},{bK:"include",e:"$",k:{"meta-keyword":"include"},c:[e.inherit(a,{cN:"meta-string"}),{cN:"meta-string",b:"<",e:">",i:"\\n"}]},a,e.CLCM,e.CBCM]},i={cN:"variable",b:"\\&[a-z\\d_]*\\b"},r={cN:"meta-keyword",b:"/[a-z][a-z\\d-]*/"},d={cN:"symbol",b:"^\\s*[a-zA-Z_][a-zA-Z\\d_]*:"},n={cN:"params",b:"<",e:">",c:[c,i]},s={cN:"class",b:/[a-zA-Z_][a-zA-Z\d_@]*\s{/,e:/[{;=]/,rB:!0,eE:!0},t={cN:"class",b:"/\\s*{",e:"};",r:10,c:[i,r,d,s,n,e.CLCM,e.CBCM,c,a]};return{k:"",c:[t,i,r,d,s,n,e.CLCM,e.CBCM,c,a,b,{b:e.IR+"::",k:""}]}});hljs.registerLanguage("php",function(e){var c={b:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*"},a={cN:"meta",b:/<\?(php)?|\?>/},i={cN:"string",c:[e.BE,a],v:[{b:'b"',e:'"'},{b:"b'",e:"'"},e.inherit(e.ASM,{i:null}),e.inherit(e.QSM,{i:null})]},t={v:[e.BNM,e.CNM]};return{aliases:["php3","php4","php5","php6"],cI:!0,k:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally",c:[e.HCM,e.C("//","$",{c:[a]}),e.C("/\\*","\\*/",{c:[{cN:"doctag",b:"@[A-Za-z]+"}]}),e.C("__halt_compiler.+?;",!1,{eW:!0,k:"__halt_compiler",l:e.UIR}),{cN:"string",b:/<<<['"]?\w+['"]?$/,e:/^\w+;?$/,c:[e.BE,{cN:"subst",v:[{b:/\$\w+/},{b:/\{\$/,e:/\}/}]}]},a,c,{b:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{cN:"function",bK:"function",e:/[;{]/,eE:!0,i:"\\$|\\[|%",c:[e.UTM,{cN:"params",b:"\\(",e:"\\)",c:["self",c,e.CBCM,i,t]}]},{cN:"class",bK:"class interface",e:"{",eE:!0,i:/[:\(\$"]/,c:[{bK:"extends implements"},e.UTM]},{bK:"namespace",e:";",i:/[\.']/,c:[e.UTM]},{bK:"use",e:";",c:[e.UTM]},{b:"=>"},i,t]}});hljs.registerLanguage("coffeescript",function(e){var c={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super then unless until loop of by when and or is isnt not",literal:"true false null undefined yes no on off",built_in:"npm require console print module global window document"},n="[A-Za-z$_][0-9A-Za-z$_]*",r={cN:"subst",b:/#\{/,e:/}/,k:c},s=[e.BNM,e.inherit(e.CNM,{starts:{e:"(\\s*/)?",r:0}}),{cN:"string",v:[{b:/'''/,e:/'''/,c:[e.BE]},{b:/'/,e:/'/,c:[e.BE]},{b:/"""/,e:/"""/,c:[e.BE,r]},{b:/"/,e:/"/,c:[e.BE,r]}]},{cN:"regexp",v:[{b:"///",e:"///",c:[r,e.HCM]},{b:"//[gim]*",r:0},{b:/\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W|$)/}]},{b:"@"+n},{b:"`",e:"`",eB:!0,eE:!0,sL:"javascript"}];r.c=s;var i=e.inherit(e.TM,{b:n}),t="(\\(.*\\))?\\s*\\B[-=]>",o={cN:"params",b:"\\([^\\(]",rB:!0,c:[{b:/\(/,e:/\)/,k:c,c:["self"].concat(s)}]};return{aliases:["coffee","cson","iced"],k:c,i:/\/\*/,c:s.concat([e.C("###","###"),e.HCM,{cN:"function",b:"^\\s*"+n+"\\s*=\\s*"+t,e:"[-=]>",rB:!0,c:[i,o]},{b:/[:\(,=]\s*/,r:0,c:[{cN:"function",b:t,e:"[-=]>",rB:!0,c:[o]}]},{cN:"class",bK:"class",e:"$",i:/[:="\[\]]/,c:[{bK:"extends",eW:!0,i:/[:="\[\]]/,c:[i]},i]},{b:n+":",e:":",rB:!0,rE:!0,r:0}])}});hljs.registerLanguage("java",function(e){var a=e.UIR+"(<"+e.UIR+"(\\s*,\\s*"+e.UIR+")*>)?",t="false synchronized int abstract float private char boolean static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private",r="\\b(0[bB]([01]+[01_]+[01]+|[01]+)|0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)|(([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?|\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))([eE][-+]?\\d+)?)[lLfF]?",c={cN:"number",b:r,r:0};return{aliases:["jsp"],k:t,i:/<\/|#/,c:[e.C("/\\*\\*","\\*/",{r:0,c:[{b:/\w+@/,r:0},{cN:"doctag",b:"@[A-Za-z]+"}]}),e.CLCM,e.CBCM,e.ASM,e.QSM,{cN:"class",bK:"class interface",e:/[{;=]/,eE:!0,k:"class interface",i:/[:"\[\]]/,c:[{bK:"extends implements"},e.UTM]},{bK:"new throw return else",r:0},{cN:"function",b:"("+a+"\\s+)+"+e.UIR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:t,c:[{b:e.UIR+"\\s*\\(",rB:!0,r:0,c:[e.UTM]},{cN:"params",b:/\(/,e:/\)/,k:t,r:0,c:[e.ASM,e.QSM,e.CNM,e.CBCM]},e.CLCM,e.CBCM]},c,{cN:"meta",b:"@[A-Za-z]+"}]}});hljs.registerLanguage("cpp",function(t){var e={cN:"keyword",b:"\\b[a-z\\d_]*_t\\b"},r={cN:"string",v:[t.inherit(t.QSM,{b:'((u8?|U)|L)?"'}),{b:'(u8?|U)?R"',e:'"',c:[t.BE]},{b:"'\\\\?.",e:"'",i:"."}]},i={cN:"number",v:[{b:"\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)"},{b:t.CNR}],r:0},s={cN:"meta",b:"#",e:"$",k:{"meta-keyword":"if else elif endif define undef warning error line pragma ifdef ifndef"},c:[{b:/\\\n/,r:0},{bK:"include",e:"$",k:{"meta-keyword":"include"},c:[t.inherit(r,{cN:"meta-string"}),{cN:"meta-string",b:"<",e:">",i:"\\n"}]},r,t.CLCM,t.CBCM]},a=t.IR+"\\s*\\(",c={keyword:"int float while private char catch export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using class asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignof constexpr decltype noexcept static_assert thread_local restrict _Bool complex _Complex _Imaginary atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong",built_in:"std string cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr",literal:"true false nullptr NULL"};return{aliases:["c","cc","h","c++","h++","hpp"],k:c,i:"",c:[e,t.CLCM,t.CBCM,i,r,s,{b:"\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<",e:">",k:c,c:["self",e]},{b:t.IR+"::",k:c},{bK:"new throw return else",r:0},{cN:"function",b:"("+t.IR+"[\\*&\\s]+)+"+a,rB:!0,e:/[{;=]/,eE:!0,k:c,i:/[^\w\s\*&]/,c:[{b:a,rB:!0,c:[t.TM],r:0},{cN:"params",b:/\(/,e:/\)/,k:c,r:0,c:[t.CLCM,t.CBCM,r,i]},t.CLCM,t.CBCM,s]}]}});hljs.registerLanguage("perl",function(e){var t="getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when",r={cN:"subst",b:"[$@]\\{",e:"\\}",k:t},s={b:"->{",e:"}"},n={v:[{b:/\$\d/},{b:/[\$%@](\^\w\b|#\w+(::\w+)*|{\w+}|\w+(::\w*)*)/},{b:/[\$%@][^\s\w{]/,r:0}]},i=[e.BE,r,n],o=[n,e.HCM,e.C("^\\=\\w","\\=cut",{eW:!0}),s,{cN:"string",c:i,v:[{b:"q[qwxr]?\\s*\\(",e:"\\)",r:5},{b:"q[qwxr]?\\s*\\[",e:"\\]",r:5},{b:"q[qwxr]?\\s*\\{",e:"\\}",r:5},{b:"q[qwxr]?\\s*\\|",e:"\\|",r:5},{b:"q[qwxr]?\\s*\\<",e:"\\>",r:5},{b:"qw\\s+q",e:"q",r:5},{b:"'",e:"'",c:[e.BE]},{b:'"',e:'"'},{b:"`",e:"`",c:[e.BE]},{b:"{\\w+}",c:[],r:0},{b:"-?\\w+\\s*\\=\\>",c:[],r:0}]},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\/\\/|"+e.RSR+"|\\b(split|return|print|reverse|grep)\\b)\\s*",k:"split return print reverse grep",r:0,c:[e.HCM,{cN:"regexp",b:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",r:10},{cN:"regexp",b:"(m|qr)?/",e:"/[a-z]*",c:[e.BE],r:0}]},{cN:"function",bK:"sub",e:"(\\s*\\(.*?\\))?[;{]",eE:!0,r:5,c:[e.TM]},{b:"-\\w\\b",r:0},{b:"^__DATA__$",e:"^__END__$",sL:"mojolicious",c:[{b:"^@@.*",e:"$",cN:"comment"}]}];return r.c=o,s.c=o,{aliases:["pl"],k:t,c:o}});hljs.registerLanguage("css",function(e){var c="[a-zA-Z-][a-zA-Z0-9_-]*",t={b:/[A-Z\_\.\-]+\s*:/,rB:!0,e:";",eW:!0,c:[{cN:"attribute",b:/\S/,e:":",eE:!0,starts:{eW:!0,eE:!0,c:[{b:/[\w-]+\(/,rB:!0,c:[{cN:"built_in",b:/[\w-]+/},{b:/\(/,e:/\)/,c:[e.ASM,e.QSM]}]},e.CSSNM,e.QSM,e.ASM,e.CBCM,{cN:"number",b:"#[0-9A-Fa-f]+"},{cN:"meta",b:"!important"}]}}]};return{cI:!0,i:/[=\/|'\$]/,c:[e.CBCM,{cN:"selector-id",b:/#[A-Za-z0-9_-]+/},{cN:"selector-class",b:/\.[A-Za-z0-9_-]+/},{cN:"selector-attr",b:/\[/,e:/\]/,i:"$"},{cN:"selector-pseudo",b:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{b:"@",e:"[{;]",c:[{cN:"keyword",b:/\S+/},{b:/\s/,eW:!0,eE:!0,r:0,c:[e.ASM,e.QSM,e.CSSNM]}]},{cN:"selector-tag",b:c,r:0},{b:"{",e:"}",i:/\S/,c:[e.CBCM,t]}]}});hljs.registerLanguage("dockerfile",function(e){return{aliases:["docker"],cI:!0,k:"from maintainer cmd expose add copy entrypoint volume user workdir onbuild run env label",c:[e.HCM,{k:"run cmd entrypoint volume add copy workdir onbuild label",b:/^ *(onbuild +)?(run|cmd|entrypoint|volume|add|copy|workdir|label) +/,starts:{e:/[^\\]\n/,sL:"bash"}},{k:"from maintainer expose env user onbuild",b:/^ *(onbuild +)?(from|maintainer|expose|env|user|onbuild) +/,e:/[^\\]\n/,c:[e.ASM,e.QSM,e.NM,e.HCM]}]}});hljs.registerLanguage("diff",function(e){return{aliases:["patch"],c:[{cN:"meta",r:10,v:[{b:/^@@ +\-\d+,\d+ +\+\d+,\d+ +@@$/},{b:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{b:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{cN:"comment",v:[{b:/Index: /,e:/$/},{b:/=====/,e:/=====$/},{b:/^\-\-\-/,e:/$/},{b:/^\*{3} /,e:/$/},{b:/^\+\+\+/,e:/$/},{b:/\*{5}/,e:/\*{5}$/}]},{cN:"addition",b:"^\\+",e:"$"},{cN:"deletion",b:"^\\-",e:"$"},{cN:"addition",b:"^\\!",e:"$"}]}});hljs.registerLanguage("makefile",function(e){var a={cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]};return{aliases:["mk","mak"],c:[e.HCM,{b:/^\w+\s*\W*=/,rB:!0,r:0,starts:{e:/\s*\W*=/,eE:!0,starts:{e:/$/,r:0,c:[a]}}},{cN:"section",b:/^[\w]+:\s*$/},{cN:"meta",b:/^\.PHONY:/,e:/$/,k:{"meta-keyword":".PHONY"},l:/[\.\w]+/},{b:/^\t+/,e:/$/,r:0,c:[e.QSM,a]}]}});hljs.registerLanguage("ini",function(e){var b={cN:"string",c:[e.BE],v:[{b:"'''",e:"'''",r:10},{b:'"""',e:'"""',r:10},{b:'"',e:'"'},{b:"'",e:"'"}]};return{aliases:["toml"],cI:!0,i:/\S/,c:[e.C(";","$"),e.HCM,{cN:"section",b:/^\s*\[+/,e:/\]+/},{b:/^[a-z0-9\[\]_-]+\s*=\s*/,e:"$",rB:!0,c:[{cN:"attr",b:/[a-z0-9\[\]_-]+/},{b:/=/,eW:!0,r:0,c:[{cN:"literal",b:/\bon|off|true|false|yes|no\b/},{cN:"variable",v:[{b:/\$[\w\d"][\w\d_]*/},{b:/\$\{(.*?)}/}]},b,{cN:"number",b:/([\+\-]+)?[\d]+_[\d_]+/},e.NM]}]}]}});hljs.registerLanguage("apache",function(e){var r={cN:"number",b:"[\\$%]\\d+"};return{aliases:["apacheconf"],cI:!0,c:[e.HCM,{cN:"section",b:"?",e:">"},{cN:"attribute",b:/\w+/,r:0,k:{nomarkup:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{e:/$/,r:0,k:{literal:"on off all"},c:[{cN:"meta",b:"\\s\\[",e:"\\]$"},{cN:"variable",b:"[\\$%]\\{",e:"\\}",c:["self",r]},r,e.QSM]}}],i:/\S/}});hljs.registerLanguage("less",function(e){var r="[\\w-]+",t="("+r+"|@{"+r+"})",a=[],c=[],s=function(e){return{cN:"string",b:"~?"+e+".*?"+e}},b=function(e,r,t){return{cN:e,b:r,r:t}},i={b:"\\(",e:"\\)",c:c,r:0};c.push(e.CLCM,e.CBCM,s("'"),s('"'),e.CSSNM,{b:"(url|data-uri)\\(",starts:{cN:"string",e:"[\\)\\n]",eE:!0}},b("number","#[0-9A-Fa-f]+\\b"),i,b("variable","@@?"+r,10),b("variable","@{"+r+"}"),b("built_in","~?`[^`]*?`"),{cN:"attribute",b:r+"\\s*:",e:":",rB:!0,eE:!0},{cN:"meta",b:"!important"});var n=c.concat({b:"{",e:"}",c:a}),o={bK:"when",eW:!0,c:[{bK:"and not"}].concat(c)},u={cN:"attribute",b:t,e:":",eE:!0,c:[e.CLCM,e.CBCM],i:/\S/,starts:{e:"[;}]",rE:!0,c:c,i:"[<=$]"}},C={cN:"keyword",b:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{e:"[;{}]",rE:!0,c:c,r:0}},l={cN:"variable",v:[{b:"@"+r+"\\s*:",r:15},{b:"@"+r}],starts:{e:"[;}]",rE:!0,c:n}},p={v:[{b:"[\\.#:&\\[]",e:"[;{}]"},{b:t+"[^;]*{",e:"{"}],rB:!0,rE:!0,i:"[<='$\"]",c:[e.CLCM,e.CBCM,o,b("keyword","all\\b"),b("variable","@{"+r+"}"),b("selector-tag",t+"%?",0),b("selector-id","#"+t),b("selector-class","\\."+t,0),b("selector-tag","&",0),{cN:"selector-attr",b:"\\[",e:"\\]"},{b:"\\(",e:"\\)",c:n},{b:"!important"}]};return a.push(e.CLCM,e.CBCM,C,l,p,u),{cI:!0,i:"[=>'/<($\"]",c:a}});hljs.registerLanguage("scala",function(e){var t={cN:"meta",b:"@[A-Za-z]+"},a={cN:"subst",v:[{b:"\\$[A-Za-z0-9_]+"},{b:"\\${",e:"}"}]},r={cN:"string",v:[{b:'"',e:'"',i:"\\n",c:[e.BE]},{b:'"""',e:'"""',r:10},{b:'[a-z]+"',e:'"',i:"\\n",c:[e.BE,a]},{cN:"string",b:'[a-z]+"""',e:'"""',c:[a],r:10}]},c={cN:"symbol",b:"'\\w[\\w\\d_]*(?!')"},i={cN:"type",b:"\\b[A-Z][A-Za-z0-9_]*",r:0},s={cN:"title",b:/[^0-9\n\t "'(),.`{}\[\]:;][^\n\t "'(),.`{}\[\]:;]+|[^0-9\n\t "'(),.`{}\[\]:;=]/,r:0},n={cN:"class",bK:"class object trait type",e:/[:={\[\n;]/,eE:!0,c:[{bK:"extends with",r:10},{b:/\[/,e:/\]/,eB:!0,eE:!0,r:0,c:[i]},{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,r:0,c:[i]},s]},l={cN:"function",bK:"def",e:/[:={\[(\n;]/,eE:!0,c:[s]};return{k:{literal:"true false null",keyword:"type yield lazy override def with val var sealed abstract private trait object if forSome for while throw finally protected extends import final return else break new catch super class case package default try this match continue throws implicit"},c:[e.CLCM,e.CBCM,r,c,i,l,n,e.CNM,t]}});hljs.registerLanguage("markdown",function(e){return{aliases:["md","mkdown","mkd"],c:[{cN:"section",v:[{b:"^#{1,6}",e:"$"},{b:"^.+?\\n[=-]{2,}$"}]},{b:"<",e:">",sL:"xml",r:0},{cN:"bullet",b:"^([*+-]|(\\d+\\.))\\s+"},{cN:"strong",b:"[*_]{2}.+?[*_]{2}"},{cN:"emphasis",v:[{b:"\\*.+?\\*"},{b:"_.+?_",r:0}]},{cN:"quote",b:"^>\\s+",e:"$"},{cN:"code",v:[{b:"`.+?`"},{b:"^( {4}| )",e:"$",r:0}]},{b:"^[-\\*]{3,}",e:"$"},{b:"\\[.+?\\][\\(\\[].*?[\\)\\]]",rB:!0,c:[{cN:"string",b:"\\[",e:"\\]",eB:!0,rE:!0,r:0},{cN:"link",b:"\\]\\(",e:"\\)",eB:!0,eE:!0},{cN:"symbol",b:"\\]\\[",e:"\\]",eB:!0,eE:!0}],r:10},{b:"^\\[.+\\]:",rB:!0,c:[{cN:"symbol",b:"\\[",e:"\\]:",eB:!0,eE:!0,starts:{cN:"link",e:"$"}}]}]}});hljs.registerLanguage("powershell",function(e){var t={b:"`[\\s\\S]",r:0},r={cN:"variable",v:[{b:/\$[\w\d][\w\d_:]*/}]},o={cN:"literal",b:/\$(null|true|false)\b/},a={cN:"string",b:/"/,e:/"/,c:[t,r,{cN:"variable",b:/\$[A-z]/,e:/[^A-z]/}]},i={cN:"string",b:/'/,e:/'/};return{aliases:["ps"],l:/-?[A-z\.\-]+/,cI:!0,k:{keyword:"if else foreach return function do while until elseif begin for trap data dynamicparam end break throw param continue finally in switch exit filter try process catch",built_in:"Add-Content Add-History Add-Member Add-PSSnapin Clear-Content Clear-Item Clear-Item Property Clear-Variable Compare-Object ConvertFrom-SecureString Convert-Path ConvertTo-Html ConvertTo-SecureString Copy-Item Copy-ItemProperty Export-Alias Export-Clixml Export-Console Export-Csv ForEach-Object Format-Custom Format-List Format-Table Format-Wide Get-Acl Get-Alias Get-AuthenticodeSignature Get-ChildItem Get-Command Get-Content Get-Credential Get-Culture Get-Date Get-EventLog Get-ExecutionPolicy Get-Help Get-History Get-Host Get-Item Get-ItemProperty Get-Location Get-Member Get-PfxCertificate Get-Process Get-PSDrive Get-PSProvider Get-PSSnapin Get-Service Get-TraceSource Get-UICulture Get-Unique Get-Variable Get-WmiObject Group-Object Import-Alias Import-Clixml Import-Csv Invoke-Expression Invoke-History Invoke-Item Join-Path Measure-Command Measure-Object Move-Item Move-ItemProperty New-Alias New-Item New-ItemProperty New-Object New-PSDrive New-Service New-TimeSpan New-Variable Out-Default Out-File Out-Host Out-Null Out-Printer Out-String Pop-Location Push-Location Read-Host Remove-Item Remove-ItemProperty Remove-PSDrive Remove-PSSnapin Remove-Variable Rename-Item Rename-ItemProperty Resolve-Path Restart-Service Resume-Service Select-Object Select-String Set-Acl Set-Alias Set-AuthenticodeSignature Set-Content Set-Date Set-ExecutionPolicy Set-Item Set-ItemProperty Set-Location Set-PSDebug Set-Service Set-TraceSource Set-Variable Sort-Object Split-Path Start-Service Start-Sleep Start-Transcript Stop-Process Stop-Service Stop-Transcript Suspend-Service Tee-Object Test-Path Trace-Command Update-FormatData Update-TypeData Where-Object Write-Debug Write-Error Write-Host Write-Output Write-Progress Write-Verbose Write-Warning",nomarkup:"-ne -eq -lt -gt -ge -le -not -like -notlike -match -notmatch -contains -notcontains -in -notin -replace"},c:[e.HCM,e.NM,a,i,o,r]}});hljs.registerLanguage("go",function(e){var t={keyword:"break default func interface select case map struct chan else goto package switch const fallthrough if range type continue for import return var go defer bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune",literal:"true false iota nil",built_in:"append cap close complex copy imag len make new panic print println real recover delete"};return{aliases:["golang"],k:t,i:"",c:[e.CLCM,e.CBCM,e.QSM,{cN:"string",b:"'",e:"[^\\\\]'"},{cN:"string",b:"`",e:"`"},{cN:"number",b:e.CNR+"[dflsi]?",r:0},e.CNM]}});hljs.registerLanguage("json",function(e){var i={literal:"true false null"},n=[e.QSM,e.CNM],r={e:",",eW:!0,eE:!0,c:n,k:i},t={b:"{",e:"}",c:[{cN:"attr",b:/"/,e:/"/,c:[e.BE],i:"\\n"},e.inherit(r,{b:/:/})],i:"\\S"},c={b:"\\[",e:"\\]",c:[e.inherit(r)],i:"\\S"};return n.splice(n.length,0,t,c),{c:n,k:i,i:"\\S"}});hljs.registerLanguage("xml",function(s){var e="[A-Za-z0-9\\._:-]+",t={eW:!0,i:/,r:0,c:[{cN:"attr",b:e,r:0},{b:"=",r:0,c:[{cN:"string",v:[{b:/"/,e:/"/},{b:/'/,e:/'/},{b:/[^\s\/>]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xsl","plist"],cI:!0,c:[{cN:"meta",b:"",r:10,c:[{b:"\\[",e:"\\]"}]},s.C("",{r:10}),{b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{b:/<\?(php)?/,e:/\?>/,sL:"php",c:[{b:"/\\*",e:"\\*/",skip:!0}]},{cN:"tag",b:"",rE:!0,sL:["css","xml"]}},{cN:"tag",b:"",rE:!0,sL:["actionscript","javascript","handlebars","xml"]}},{cN:"meta",v:[{b:/<\?xml/,e:/\?>/,r:10},{b:/<\?\w+/,e:/\?>/}]},{cN:"tag",b:"?",e:"/?>",c:[{cN:"name",b:/[^\/><\s]+/,r:0},t]}]}});hljs.registerLanguage("sql",function(e){var t=e.C("--","$");return{cI:!0,i:/[<>{}*]/,c:[{bK:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke",e:/;/,eW:!0,k:{keyword:"abort abs absolute acc acce accep accept access accessed accessible account acos action activate add addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias allocate allow alter always analyze ancillary and any anydata anydataset anyschema anytype apply archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound buffer_cache buffer_pool build bulk by byte byteordermark bytes cache caching call calling cancel capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base char_length character_length characters characterset charindex charset charsetform charsetid check checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation collect colu colum column column_value columns columns_updated comment commit compact compatibility compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection consider consistent constant constraint constraints constructor container content contents context contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime customdatum cycle data database databases datafile datafiles datalength date_add date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor deterministic diagnostics difference dimension direct_load directory disable disable_all disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div do document domain dotnet double downgrade drop dumpfile duplicate duration each edition editionable editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding execu execut execute exempt exists exit exp expire explain export export_set extended extent external external_1 external_2 externally extract failed failed_login_attempts failover failure far fast feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final finish first first_value fixed flash_cache flashback floor flush following follows for forall force form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ftp full function general generated get get_format get_lock getdate getutcdate global global_name globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex hierarchy high high_priority hosts hour http id ident_current ident_incr ident_seed identified identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile initial initialized initially initrans inmemory inner innodb input insert install instance instantiable instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists keep keep_duplicates key keys kill language large last last_day last_insert_id last_value lax lcase lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call logoff logon logs long loop low low_priority lower lpad lrtrim ltrim main make_set makedate maketime managed management manual map mapping mask master master_pos_wait match matched materialized max maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans md5 measures median medium member memcompress memory merge microsecond mid migration min minextents minimum mining minus minute minvalue missing mod mode model modification modify module monitoring month months mount move movement multiset mutex name name_const names nan national native natural nav nchar nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck noswitch not nothing notice notrim novalidate now nowait nth_value nullif nulls num numb numbe nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary out outer outfile outline output over overflow overriding package pad parallel parallel_enable parameters parent parse partial partition partitions pascal passing password password_grace_time password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction prediction_cost prediction_details prediction_probability prediction_set prepare present preserve prior priority private private_sga privileges procedural procedure procedure_analyze processlist profiles project prompt protection public publishingservername purge quarter query quick quiesce quota quotename radians raise rand range rank raw read reads readsize rebuild record records recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename repair repeat replace replicate replication required reset resetlogs resize resource respect restore restricted result result_cache resumable resume retention return returning returns reuse reverse revoke right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll sdo_georaster sdo_topo_geometry search sec_to_time second section securefile security seed segment select self sequence sequential serializable server servererror session session_user sessions_per_user set sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone standby start starting startup statement static statistics stats_binomial_test stats_crosstab stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime table tables tablespace tan tdo template temporary terminated tertiary_weights test than then thread through tier ties time time_format time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unpivot unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear wellformed when whene whenev wheneve whenever where while whitespace with within without work wrapped xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek",literal:"true false null",built_in:"array bigint binary bit blob boolean char character date dec decimal float int int8 integer interval number numeric real record serial serial8 smallint text varchar varying void"},c:[{cN:"string",b:"'",e:"'",c:[e.BE,{b:"''"}]},{cN:"string",b:'"',e:'"',c:[e.BE,{b:'""'}]},{cN:"string",b:"`",e:"`",c:[e.BE]},e.CNM,e.CBCM,t]},e.CBCM,t]}});hljs.registerLanguage("groovy",function(e){return{k:{literal:"true false null",keyword:"byte short char int long boolean float double void def as in assert trait super this abstract static volatile transient public private protected synchronized final class interface enum if else for while switch case break default continue throw throws try catch finally implements extends new import package return instanceof"},c:[e.C("/\\*\\*","\\*/",{r:0,c:[{b:/\w+@/,r:0},{cN:"doctag",b:"@[A-Za-z]+"}]}),e.CLCM,e.CBCM,{cN:"string",b:'"""',e:'"""'},{cN:"string",b:"'''",e:"'''"},{cN:"string",b:"\\$/",e:"/\\$",r:10},e.ASM,{cN:"regexp",b:/~?\/[^\/\n]+\//,c:[e.BE]},e.QSM,{cN:"meta",b:"^#!/usr/bin/env",e:"$",i:"\n"},e.BNM,{cN:"class",bK:"class interface trait enum",e:"{",i:":",c:[{bK:"extends implements"},e.UTM]},e.CNM,{cN:"meta",b:"@[A-Za-z]+"},{cN:"string",b:/[^\?]{0}[A-Za-z0-9_$]+ *:/},{b:/\?/,e:/\:/},{cN:"symbol",b:"^\\s*[A-Za-z0-9_$]+:",r:0}],i:/#|<\//}});hljs.registerLanguage("cs",function(e){var t="abstract as base bool break byte case catch char checked const continue decimal dynamic default delegate do double else enum event explicit extern false finally fixed float for foreach goto if implicit in int interface internal is lock long null when object operator out override params private protected public readonly ref sbyte sealed short sizeof stackalloc static string struct switch this true try typeof uint ulong unchecked unsafe ushort using virtual volatile void while async protected public private internal ascending descending from get group into join let orderby partial select set value var where yield",r=e.IR+"(<"+e.IR+">)?";return{aliases:["csharp"],k:t,i:/::/,c:[e.C("///","$",{rB:!0,c:[{cN:"doctag",v:[{b:"///",r:0},{b:""},{b:"?",e:">"}]}]}),e.CLCM,e.CBCM,{cN:"meta",b:"#",e:"$",k:{"meta-keyword":"if else elif endif define undef warning error line region endregion pragma checksum"}},{cN:"string",b:'@"',e:'"',c:[{b:'""'}]},e.ASM,e.QSM,e.CNM,{bK:"class interface",e:/[{;=]/,i:/[^\s:]/,c:[e.TM,e.CLCM,e.CBCM]},{bK:"namespace",e:/[{;=]/,i:/[^\s:]/,c:[e.inherit(e.TM,{b:"[a-zA-Z](\\.?\\w)*"}),e.CLCM,e.CBCM]},{bK:"new return throw await",r:0},{cN:"function",b:"("+r+"\\s+)+"+e.IR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:t,c:[{b:e.IR+"\\s*\\(",rB:!0,c:[e.TM],r:0},{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,k:t,r:0,c:[e.ASM,e.QSM,e.CNM,e.CBCM]},e.CLCM,e.CBCM]}]}});hljs.registerLanguage("ruby",function(e){var b="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",c="and false then defined module in return redo if BEGIN retry end for true self when next until do begin unless END rescue nil else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",r={cN:"doctag",b:"@[A-Za-z]+"},a={b:"#<",e:">"},s=[e.C("#","$",{c:[r]}),e.C("^\\=begin","^\\=end",{c:[r],r:10}),e.C("^__END__","\\n$")],n={cN:"subst",b:"#\\{",e:"}",k:c},t={cN:"string",c:[e.BE,n],v:[{b:/'/,e:/'/},{b:/"/,e:/"/},{b:/`/,e:/`/},{b:"%[qQwWx]?\\(",e:"\\)"},{b:"%[qQwWx]?\\[",e:"\\]"},{b:"%[qQwWx]?{",e:"}"},{b:"%[qQwWx]?<",e:">"},{b:"%[qQwWx]?/",e:"/"},{b:"%[qQwWx]?%",e:"%"},{b:"%[qQwWx]?-",e:"-"},{b:"%[qQwWx]?\\|",e:"\\|"},{b:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/}]},i={cN:"params",b:"\\(",e:"\\)",endsParent:!0,k:c},d=[t,a,{cN:"class",bK:"class module",e:"$|;",i:/=/,c:[e.inherit(e.TM,{b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{b:"<\\s*",c:[{b:"("+e.IR+"::)?"+e.IR}]}].concat(s)},{cN:"function",bK:"def",e:"$|;",c:[e.inherit(e.TM,{b:b}),i].concat(s)},{cN:"symbol",b:e.UIR+"(\\!|\\?)?:",r:0},{cN:"symbol",b:":",c:[t,{b:b}],r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{b:"("+e.RSR+")\\s*",c:[a,{cN:"regexp",c:[e.BE,n],i:/\n/,v:[{b:"/",e:"/[a-z]*"},{b:"%r{",e:"}[a-z]*"},{b:"%r\\(",e:"\\)[a-z]*"},{b:"%r!",e:"![a-z]*"},{b:"%r\\[",e:"\\][a-z]*"}]}].concat(s),r:0}].concat(s);n.c=d,i.c=d;var o="[>?]>",l="[\\w#]+\\(\\w+\\):\\d+:\\d+>",u="(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>",w=[{b:/^\s*=>/,starts:{e:"$",c:d}},{cN:"meta",b:"^("+o+"|"+l+"|"+u+")",starts:{e:"$",c:d}}];return{aliases:["rb","gemspec","podspec","thor","irb"],k:c,i:/\/\*/,c:s.concat(w).concat(d)}});hljs.registerLanguage("http",function(e){var t="HTTP/[0-9\\.]+";return{aliases:["https"],i:"\\S",c:[{b:"^"+t,e:"$",c:[{cN:"number",b:"\\b\\d{3}\\b"}]},{b:"^[A-Z]+ (.*?) "+t+"$",rB:!0,e:"$",c:[{cN:"string",b:" ",e:" ",eB:!0,eE:!0},{b:t},{cN:"keyword",b:"[A-Z]+"}]},{cN:"attribute",b:"^\\w",e:": ",eE:!0,i:"\\n|\\s|=",starts:{e:"$",r:0}},{b:"\\n\\n",starts:{sL:[],eW:!0}}]}});hljs.registerLanguage("vbnet",function(e){return{aliases:["vb"],cI:!0,k:{keyword:"addhandler addressof alias and andalso aggregate ansi as assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into is isfalse isnot istrue join key let lib like loop me mid mod module mustinherit mustoverride mybase myclass namespace narrowing new next not notinheritable notoverridable of off on operator option optional or order orelse overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim rem removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly xor",built_in:"boolean byte cbool cbyte cchar cdate cdec cdbl char cint clng cobj csbyte cshort csng cstr ctype date decimal directcast double gettype getxmlnamespace iif integer long object sbyte short single string trycast typeof uinteger ulong ushort",literal:"true false nothing"},i:"//|{|}|endif|gosub|variant|wend",c:[e.inherit(e.QSM,{c:[{b:'""'}]}),e.C("'","$",{rB:!0,c:[{cN:"doctag",b:"'''|",c:[e.PWM]},{cN:"doctag",b:"?",e:">",c:[e.PWM]}]}),e.CNM,{cN:"meta",b:"#",e:"$",k:{"meta-keyword":"if else elseif end region externalsource"}}]}});hljs.registerLanguage("objectivec",function(e){var t={cN:"built_in",b:"(AV|CA|CF|CG|CI|MK|MP|NS|UI|XC)\\w+"},i={keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,o="@interface @class @protocol @implementation";return{aliases:["mm","objc","obj-c"],k:i,l:n,i:"",c:[t,e.CLCM,e.CBCM,e.CNM,e.QSM,{cN:"string",v:[{b:'@"',e:'"',i:"\\n",c:[e.BE]},{b:"'",e:"[^\\\\]'",i:"[^\\\\][^']"}]},{cN:"meta",b:"#",e:"$",c:[{cN:"meta-string",v:[{b:'"',e:'"'},{b:"<",e:">"}]}]},{cN:"class",b:"("+o.split(" ").join("|")+")\\b",e:"({|$)",eE:!0,k:o,l:n,c:[e.UTM]},{b:"\\."+e.UIR,r:0}]}});hljs.registerLanguage("nginx",function(e){var r={cN:"variable",v:[{b:/\$\d+/},{b:/\$\{/,e:/}/},{b:"[\\$\\@]"+e.UIR}]},b={eW:!0,l:"[a-z/_]+",k:{literal:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"},r:0,i:"=>",c:[e.HCM,{cN:"string",c:[e.BE,r],v:[{b:/"/,e:/"/},{b:/'/,e:/'/}]},{b:"([a-z]+):/",e:"\\s",eW:!0,eE:!0,c:[r]},{cN:"regexp",c:[e.BE,r],v:[{b:"\\s\\^",e:"\\s|{|;",rE:!0},{b:"~\\*?\\s+",e:"\\s|{|;",rE:!0},{b:"\\*(\\.[a-z\\-]+)+"},{b:"([a-z\\-]+\\.)+\\*"}]},{cN:"number",b:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{cN:"number",b:"\\b\\d+[kKmMgGdshdwy]*\\b",r:0},r]};return{aliases:["nginxconf"],c:[e.HCM,{b:e.UIR+"\\s+{",rB:!0,e:"{",c:[{cN:"section",b:e.UIR}],r:0},{b:e.UIR+"\\s",e:";|{",rB:!0,c:[{cN:"attribute",b:e.UIR,starts:b}],r:0}],i:"[^\\s\\}]"}});
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/js/horsey.js b/vendor/github.com/magefile/mage/site/themes/learn/static/js/horsey.js
new file mode 100644
index 0000000..a22a115
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/static/js/horsey.js
@@ -0,0 +1,1571 @@
+!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.horsey=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= limit) {
+ crossvent.fabricate(li, 'horsey-hide');
+ }
+ if (count < limit) {
+ crossvent.fabricate(li, 'horsey-filter');
+ if (li.className.indexOf('sey-hide') === -1) {
+ count++;
+ }
+ }
+ li = li.nextSibling;
+ }
+ if (!selection) {
+ move();
+ }
+ if (!selection) {
+ hide();
+ }
+ }
+
+ function deferredFilteringNoEnter (e) {
+ var which = e.which || e.keyCode;
+ if (which === KEY_ENTER) {
+ return;
+ }
+ deferredFiltering();
+ }
+
+ function deferredShow (e) {
+ var which = e.which || e.keyCode;
+ if (which === KEY_ENTER) {
+ return;
+ }
+ setTimeout(show, 0);
+ }
+
+ function horseyEventTarget (e) {
+ var target = e.target;
+ if (target === attachment) {
+ return true;
+ }
+ while (target) {
+ if (target === ul || target === attachment) {
+ return true;
+ }
+ target = target.parentNode;
+ }
+ }
+
+ function hideOnBlur (e) {
+ var which = e.which || e.keyCode;
+ if (which === KEY_TAB) {
+ hide();
+ }
+ }
+
+ function hideOnClick (e) {
+ if (horseyEventTarget(e)) {
+ return;
+ }
+ hide();
+ }
+
+ function inputEvents (remove) {
+ var op = remove ? 'remove' : 'add';
+ if (eye) {
+ eye.destroy();
+ eye = null;
+ }
+ if (!remove) {
+ eye = bullseye(ul, attachment, { caret: anyInput && attachment.tagName !== 'INPUT' });
+ if (!visible()) { eye.sleep(); }
+ }
+ if (remove || (anyInput && doc.activeElement !== attachment)) {
+ crossvent[op](attachment, 'focus', loading);
+ } else {
+ loading();
+ }
+ if (anyInput) {
+ crossvent[op](attachment, 'keypress', deferredShow);
+ crossvent[op](attachment, 'keypress', deferredFiltering);
+ crossvent[op](attachment, 'keydown', deferredFilteringNoEnter);
+ crossvent[op](attachment, 'paste', deferredFiltering);
+ crossvent[op](attachment, 'keydown', keydown);
+ if (o.autoHideOnBlur) { crossvent[op](attachment, 'keydown', hideOnBlur); }
+ } else {
+ crossvent[op](attachment, 'click', toggler);
+ crossvent[op](docElement, 'keydown', keydown);
+ }
+ if (o.autoHideOnClick) { crossvent[op](doc, 'click', hideOnClick); }
+ if (form) { crossvent[op](form, 'submit', hide); }
+ }
+
+ function destroy () {
+ inputEvents(true);
+ if (parent.contains(ul)) { parent.removeChild(ul); }
+ cache.splice(cache.indexOf(entry), 1);
+ }
+
+ function defaultSetter (value) {
+ if (textInput) {
+ el.value = value;
+ } else {
+ el.innerHTML = value;
+ }
+ }
+
+ function defaultRenderer (li, suggestion) {
+ li.innerText = li.textContent = getText(suggestion);
+ }
+
+ function defaultFilter (q, suggestion) {
+ var text = getText(suggestion) || '';
+ var value = getValue(suggestion) || '';
+ var needle = q.toLowerCase();
+ return fuzzysearch(needle, text.toLowerCase()) || fuzzysearch(needle, value.toLowerCase());
+ }
+
+ function loopbackToAnchor (text, p) {
+ var result = '';
+ var anchored = false;
+ var start = p.start;
+ while (anchored === false && start >= 0) {
+ result = text.substr(start - 1, p.start - start + 1);
+ anchored = ranchorleft.test(result);
+ start--;
+ }
+ return {
+ text: anchored ? result : null,
+ start: start
+ };
+ }
+
+ function filterAnchoredText (q, suggestion) {
+ var position = sell(el);
+ var input = loopbackToAnchor(q, position).text;
+ if (input) {
+ return { input: input, suggestion: suggestion };
+ }
+ }
+
+ function appendText (value) {
+ var current = el.value;
+ var position = sell(el);
+ var input = loopbackToAnchor(current, position);
+ var left = current.substr(0, input.start);
+ var right = current.substr(input.start + input.text.length + (position.end - position.start));
+ var before = left + value + ' ';
+
+ el.value = before + right;
+ sell(el, { start: before.length, end: before.length });
+ }
+
+ function filterAnchoredHTML () {
+ throw new Error('Anchoring in editable elements is disabled by default.');
+ }
+
+ function appendHTML () {
+ throw new Error('Anchoring in editable elements is disabled by default.');
+ }
+}
+
+function isInput (el) { return el.tagName === 'INPUT' || el.tagName === 'TEXTAREA'; }
+
+function defaultGetValue (suggestion) {
+ return defaultGet('value', suggestion);
+}
+
+function defaultGetText (suggestion) {
+ return defaultGet('text', suggestion);
+}
+
+function defaultGet (type, value) {
+ return value && value[type] !== void 0 ? value[type] : value;
+}
+
+function tag (type, className) {
+ var el = doc.createElement(type);
+ el.className = className;
+ return el;
+}
+
+function defer (fn) { return function () { setTimeout(fn, 0); }; }
+
+function isEditable (el) {
+ var value = el.getAttribute('contentEditable');
+ if (value === 'false') {
+ return false;
+ }
+ if (value === 'true') {
+ return true;
+ }
+ if (el.parentElement) {
+ return isEditable(el.parentElement);
+ }
+ return false;
+}
+
+horsey.find = find;
+module.exports = horsey;
+
+},{"bullseye":2,"crossvent":14,"fuzzysearch":16,"sell":17}],2:[function(require,module,exports){
+'use strict';
+
+var crossvent = require('crossvent');
+var throttle = require('./throttle');
+var tailormade = require('./tailormade');
+
+function bullseye (el, target, options) {
+ var o = options;
+ var domTarget = target && target.tagName;
+
+ if (!domTarget && arguments.length === 2) {
+ o = target;
+ }
+ if (!domTarget) {
+ target = el;
+ }
+ if (!o) { o = {}; }
+
+ var destroyed = false;
+ var throttledWrite = throttle(write, 30);
+ var tailorOptions = { update: o.autoupdateToCaret !== false && update };
+ var tailor = o.caret && tailormade(target, tailorOptions);
+
+ write();
+
+ if (o.tracking !== false) {
+ crossvent.add(window, 'resize', throttledWrite);
+ }
+
+ return {
+ read: readNull,
+ refresh: write,
+ destroy: destroy,
+ sleep: sleep
+ };
+
+ function sleep () {
+ tailorOptions.sleeping = true;
+ }
+
+ function readNull () { return read(); }
+
+ function read (readings) {
+ var bounds = target.getBoundingClientRect();
+ var scrollTop = document.body.scrollTop || document.documentElement.scrollTop;
+ if (tailor) {
+ readings = tailor.read();
+ return {
+ x: (readings.absolute ? 0 : bounds.left) + readings.x,
+ y: (readings.absolute ? 0 : bounds.top) + scrollTop + readings.y + 20
+ };
+ }
+ return {
+ x: bounds.left,
+ y: bounds.top + scrollTop
+ };
+ }
+
+ function update (readings) {
+ write(readings);
+ }
+
+ function write (readings) {
+ if (destroyed) {
+ throw new Error('Bullseye can\'t refresh after being destroyed. Create another instance instead.');
+ }
+ if (tailor && !readings) {
+ tailorOptions.sleeping = false;
+ tailor.refresh(); return;
+ }
+ var p = read(readings);
+ if (!tailor && target !== el) {
+ p.y += target.offsetHeight;
+ }
+ el.style.left = p.x + 'px';
+ el.style.top = p.y + 'px';
+ }
+
+ function destroy () {
+ if (tailor) { tailor.destroy(); }
+ crossvent.remove(window, 'resize', throttledWrite);
+ destroyed = true;
+ }
+}
+
+module.exports = bullseye;
+
+},{"./tailormade":11,"./throttle":12,"crossvent":14}],3:[function(require,module,exports){
+(function (global){
+'use strict';
+
+var getSelection;
+var doc = global.document;
+var getSelectionRaw = require('./getSelectionRaw');
+var getSelectionNullOp = require('./getSelectionNullOp');
+var getSelectionSynthetic = require('./getSelectionSynthetic');
+var isHost = require('./isHost');
+if (isHost.method(global, 'getSelection')) {
+ getSelection = getSelectionRaw;
+} else if (typeof doc.selection === 'object' && doc.selection) {
+ getSelection = getSelectionSynthetic;
+} else {
+ getSelection = getSelectionNullOp;
+}
+
+module.exports = getSelection;
+
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9idWxsc2V5ZS9ub2RlX21vZHVsZXMvc2VsZWNjaW9uL3NyYy9nZXRTZWxlY3Rpb24uanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsImZpbGUiOiJnZW5lcmF0ZWQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xuXG52YXIgZ2V0U2VsZWN0aW9uO1xudmFyIGRvYyA9IGdsb2JhbC5kb2N1bWVudDtcbnZhciBnZXRTZWxlY3Rpb25SYXcgPSByZXF1aXJlKCcuL2dldFNlbGVjdGlvblJhdycpO1xudmFyIGdldFNlbGVjdGlvbk51bGxPcCA9IHJlcXVpcmUoJy4vZ2V0U2VsZWN0aW9uTnVsbE9wJyk7XG52YXIgZ2V0U2VsZWN0aW9uU3ludGhldGljID0gcmVxdWlyZSgnLi9nZXRTZWxlY3Rpb25TeW50aGV0aWMnKTtcbnZhciBpc0hvc3QgPSByZXF1aXJlKCcuL2lzSG9zdCcpO1xuaWYgKGlzSG9zdC5tZXRob2QoZ2xvYmFsLCAnZ2V0U2VsZWN0aW9uJykpIHtcbiAgZ2V0U2VsZWN0aW9uID0gZ2V0U2VsZWN0aW9uUmF3O1xufSBlbHNlIGlmICh0eXBlb2YgZG9jLnNlbGVjdGlvbiA9PT0gJ29iamVjdCcgJiYgZG9jLnNlbGVjdGlvbikge1xuICBnZXRTZWxlY3Rpb24gPSBnZXRTZWxlY3Rpb25TeW50aGV0aWM7XG59IGVsc2Uge1xuICBnZXRTZWxlY3Rpb24gPSBnZXRTZWxlY3Rpb25OdWxsT3A7XG59XG5cbm1vZHVsZS5leHBvcnRzID0gZ2V0U2VsZWN0aW9uO1xuIl19
+},{"./getSelectionNullOp":4,"./getSelectionRaw":5,"./getSelectionSynthetic":6,"./isHost":7}],4:[function(require,module,exports){
+'use strict';
+
+function noop () {}
+
+function getSelectionNullOp () {
+ return {
+ removeAllRanges: noop,
+ addRange: noop
+ };
+}
+
+module.exports = getSelectionNullOp;
+
+},{}],5:[function(require,module,exports){
+(function (global){
+'use strict';
+
+function getSelectionRaw () {
+ return global.getSelection();
+}
+
+module.exports = getSelectionRaw;
+
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9idWxsc2V5ZS9ub2RlX21vZHVsZXMvc2VsZWNjaW9uL3NyYy9nZXRTZWxlY3Rpb25SYXcuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJmaWxlIjoiZ2VuZXJhdGVkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcblxuZnVuY3Rpb24gZ2V0U2VsZWN0aW9uUmF3ICgpIHtcbiAgcmV0dXJuIGdsb2JhbC5nZXRTZWxlY3Rpb24oKTtcbn1cblxubW9kdWxlLmV4cG9ydHMgPSBnZXRTZWxlY3Rpb25SYXc7XG4iXX0=
+},{}],6:[function(require,module,exports){
+(function (global){
+'use strict';
+
+var rangeToTextRange = require('./rangeToTextRange');
+var doc = global.document;
+var body = doc.body;
+var GetSelectionProto = GetSelection.prototype;
+
+function GetSelection (selection) {
+ var self = this;
+ var range = selection.createRange();
+
+ this._selection = selection;
+ this._ranges = [];
+
+ if (selection.type === 'Control') {
+ updateControlSelection(self);
+ } else if (isTextRange(range)) {
+ updateFromTextRange(self, range);
+ } else {
+ updateEmptySelection(self);
+ }
+}
+
+GetSelectionProto.removeAllRanges = function () {
+ var textRange;
+ try {
+ this._selection.empty();
+ if (this._selection.type !== 'None') {
+ textRange = body.createTextRange();
+ textRange.select();
+ this._selection.empty();
+ }
+ } catch (e) {
+ }
+ updateEmptySelection(this);
+};
+
+GetSelectionProto.addRange = function (range) {
+ if (this._selection.type === 'Control') {
+ addRangeToControlSelection(this, range);
+ } else {
+ rangeToTextRange(range).select();
+ this._ranges[0] = range;
+ this.rangeCount = 1;
+ this.isCollapsed = this._ranges[0].collapsed;
+ updateAnchorAndFocusFromRange(this, range, false);
+ }
+};
+
+GetSelectionProto.setRanges = function (ranges) {
+ this.removeAllRanges();
+ var rangeCount = ranges.length;
+ if (rangeCount > 1) {
+ createControlSelection(this, ranges);
+ } else if (rangeCount) {
+ this.addRange(ranges[0]);
+ }
+};
+
+GetSelectionProto.getRangeAt = function (index) {
+ if (index < 0 || index >= this.rangeCount) {
+ throw new Error('getRangeAt(): index out of bounds');
+ } else {
+ return this._ranges[index].cloneRange();
+ }
+};
+
+GetSelectionProto.removeRange = function (range) {
+ if (this._selection.type !== 'Control') {
+ removeRangeManually(this, range);
+ return;
+ }
+ var controlRange = this._selection.createRange();
+ var rangeElement = getSingleElementFromRange(range);
+ var newControlRange = body.createControlRange();
+ var el;
+ var removed = false;
+ for (var i = 0, len = controlRange.length; i < len; ++i) {
+ el = controlRange.item(i);
+ if (el !== rangeElement || removed) {
+ newControlRange.add(controlRange.item(i));
+ } else {
+ removed = true;
+ }
+ }
+ newControlRange.select();
+ updateControlSelection(this);
+};
+
+GetSelectionProto.eachRange = function (fn, returnValue) {
+ var i = 0;
+ var len = this._ranges.length;
+ for (i = 0; i < len; ++i) {
+ if (fn(this.getRangeAt(i))) {
+ return returnValue;
+ }
+ }
+};
+
+GetSelectionProto.getAllRanges = function () {
+ var ranges = [];
+ this.eachRange(function (range) {
+ ranges.push(range);
+ });
+ return ranges;
+};
+
+GetSelectionProto.setSingleRange = function (range) {
+ this.removeAllRanges();
+ this.addRange(range);
+};
+
+function createControlSelection (sel, ranges) {
+ var controlRange = body.createControlRange();
+ for (var i = 0, el, len = ranges.length; i < len; ++i) {
+ el = getSingleElementFromRange(ranges[i]);
+ try {
+ controlRange.add(el);
+ } catch (e) {
+ throw new Error('setRanges(): Element could not be added to control selection');
+ }
+ }
+ controlRange.select();
+ updateControlSelection(sel);
+}
+
+function removeRangeManually (sel, range) {
+ var ranges = sel.getAllRanges();
+ sel.removeAllRanges();
+ for (var i = 0, len = ranges.length; i < len; ++i) {
+ if (!isSameRange(range, ranges[i])) {
+ sel.addRange(ranges[i]);
+ }
+ }
+ if (!sel.rangeCount) {
+ updateEmptySelection(sel);
+ }
+}
+
+function updateAnchorAndFocusFromRange (sel, range) {
+ var anchorPrefix = 'start';
+ var focusPrefix = 'end';
+ sel.anchorNode = range[anchorPrefix + 'Container'];
+ sel.anchorOffset = range[anchorPrefix + 'Offset'];
+ sel.focusNode = range[focusPrefix + 'Container'];
+ sel.focusOffset = range[focusPrefix + 'Offset'];
+}
+
+function updateEmptySelection (sel) {
+ sel.anchorNode = sel.focusNode = null;
+ sel.anchorOffset = sel.focusOffset = 0;
+ sel.rangeCount = 0;
+ sel.isCollapsed = true;
+ sel._ranges.length = 0;
+}
+
+function rangeContainsSingleElement (rangeNodes) {
+ if (!rangeNodes.length || rangeNodes[0].nodeType !== 1) {
+ return false;
+ }
+ for (var i = 1, len = rangeNodes.length; i < len; ++i) {
+ if (!isAncestorOf(rangeNodes[0], rangeNodes[i])) {
+ return false;
+ }
+ }
+ return true;
+}
+
+function getSingleElementFromRange (range) {
+ var nodes = range.getNodes();
+ if (!rangeContainsSingleElement(nodes)) {
+ throw new Error('getSingleElementFromRange(): range did not consist of a single element');
+ }
+ return nodes[0];
+}
+
+function isTextRange (range) {
+ return range && range.text !== void 0;
+}
+
+function updateFromTextRange (sel, range) {
+ sel._ranges = [range];
+ updateAnchorAndFocusFromRange(sel, range, false);
+ sel.rangeCount = 1;
+ sel.isCollapsed = range.collapsed;
+}
+
+function updateControlSelection (sel) {
+ sel._ranges.length = 0;
+ if (sel._selection.type === 'None') {
+ updateEmptySelection(sel);
+ } else {
+ var controlRange = sel._selection.createRange();
+ if (isTextRange(controlRange)) {
+ updateFromTextRange(sel, controlRange);
+ } else {
+ sel.rangeCount = controlRange.length;
+ var range;
+ for (var i = 0; i < sel.rangeCount; ++i) {
+ range = doc.createRange();
+ range.selectNode(controlRange.item(i));
+ sel._ranges.push(range);
+ }
+ sel.isCollapsed = sel.rangeCount === 1 && sel._ranges[0].collapsed;
+ updateAnchorAndFocusFromRange(sel, sel._ranges[sel.rangeCount - 1], false);
+ }
+ }
+}
+
+function addRangeToControlSelection (sel, range) {
+ var controlRange = sel._selection.createRange();
+ var rangeElement = getSingleElementFromRange(range);
+ var newControlRange = body.createControlRange();
+ for (var i = 0, len = controlRange.length; i < len; ++i) {
+ newControlRange.add(controlRange.item(i));
+ }
+ try {
+ newControlRange.add(rangeElement);
+ } catch (e) {
+ throw new Error('addRange(): Element could not be added to control selection');
+ }
+ newControlRange.select();
+ updateControlSelection(sel);
+}
+
+function isSameRange (left, right) {
+ return (
+ left.startContainer === right.startContainer &&
+ left.startOffset === right.startOffset &&
+ left.endContainer === right.endContainer &&
+ left.endOffset === right.endOffset
+ );
+}
+
+function isAncestorOf (ancestor, descendant) {
+ var node = descendant;
+ while (node.parentNode) {
+ if (node.parentNode === ancestor) {
+ return true;
+ }
+ node = node.parentNode;
+ }
+ return false;
+}
+
+function getSelection () {
+ return new GetSelection(global.document.selection);
+}
+
+module.exports = getSelection;
+
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9idWxsc2V5ZS9ub2RlX21vZHVsZXMvc2VsZWNjaW9uL3NyYy9nZXRTZWxlY3Rpb25TeW50aGV0aWMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E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NTYW1lUmFuZ2UgKGxlZnQsIHJpZ2h0KSB7XG4gIHJldHVybiAoXG4gICAgbGVmdC5zdGFydENvbnRhaW5lciA9PT0gcmlnaHQuc3RhcnRDb250YWluZXIgJiZcbiAgICBsZWZ0LnN0YXJ0T2Zmc2V0ID09PSByaWdodC5zdGFydE9mZnNldCAmJlxuICAgIGxlZnQuZW5kQ29udGFpbmVyID09PSByaWdodC5lbmRDb250YWluZXIgJiZcbiAgICBsZWZ0LmVuZE9mZnNldCA9PT0gcmlnaHQuZW5kT2Zmc2V0XG4gICk7XG59XG5cbmZ1bmN0aW9uIGlzQW5jZXN0b3JPZiAoYW5jZXN0b3IsIGRlc2NlbmRhbnQpIHtcbiAgdmFyIG5vZGUgPSBkZXNjZW5kYW50O1xuICB3aGlsZSAobm9kZS5wYXJlbnROb2RlKSB7XG4gICAgaWYgKG5vZGUucGFyZW50Tm9kZSA9PT0gYW5jZXN0b3IpIHtcbiAgICAgIHJldHVybiB0cnVlO1xuICAgIH1cbiAgICBub2RlID0gbm9kZS5wYXJlbnROb2RlO1xuICB9XG4gIHJldHVybiBmYWxzZTtcbn1cblxuZnVuY3Rpb24gZ2V0U2VsZWN0aW9uICgpIHtcbiAgcmV0dXJuIG5ldyBHZXRTZWxlY3Rpb24oZ2xvYmFsLmRvY3VtZW50LnNlbGVjdGlvbik7XG59XG5cbm1vZHVsZS5leHBvcnRzID0gZ2V0U2VsZWN0aW9uO1xuIl19
+},{"./rangeToTextRange":8}],7:[function(require,module,exports){
+'use strict';
+
+function isHostMethod (host, prop) {
+ var type = typeof host[prop];
+ return type === 'function' || !!(type === 'object' && host[prop]) || type === 'unknown';
+}
+
+function isHostProperty (host, prop) {
+ return typeof host[prop] !== 'undefined';
+}
+
+function many (fn) {
+ return function areHosted (host, props) {
+ var i = props.length;
+ while (i--) {
+ if (!fn(host, props[i])) {
+ return false;
+ }
+ }
+ return true;
+ };
+}
+
+module.exports = {
+ method: isHostMethod,
+ methods: many(isHostMethod),
+ property: isHostProperty,
+ properties: many(isHostProperty)
+};
+
+},{}],8:[function(require,module,exports){
+(function (global){
+'use strict';
+
+var doc = global.document;
+var body = doc.body;
+
+function rangeToTextRange (p) {
+ if (p.collapsed) {
+ return createBoundaryTextRange({ node: p.startContainer, offset: p.startOffset }, true);
+ }
+ var startRange = createBoundaryTextRange({ node: p.startContainer, offset: p.startOffset }, true);
+ var endRange = createBoundaryTextRange({ node: p.endContainer, offset: p.endOffset }, false);
+ var textRange = body.createTextRange();
+ textRange.setEndPoint('StartToStart', startRange);
+ textRange.setEndPoint('EndToEnd', endRange);
+ return textRange;
+}
+
+function isCharacterDataNode (node) {
+ var t = node.nodeType;
+ return t === 3 || t === 4 || t === 8 ;
+}
+
+function createBoundaryTextRange (p, starting) {
+ var bound;
+ var parent;
+ var offset = p.offset;
+ var workingNode;
+ var childNodes;
+ var range = body.createTextRange();
+ var data = isCharacterDataNode(p.node);
+
+ if (data) {
+ bound = p.node;
+ parent = bound.parentNode;
+ } else {
+ childNodes = p.node.childNodes;
+ bound = offset < childNodes.length ? childNodes[offset] : null;
+ parent = p.node;
+ }
+
+ workingNode = doc.createElement('span');
+ workingNode.innerHTML = 'feff;';
+
+ if (bound) {
+ parent.insertBefore(workingNode, bound);
+ } else {
+ parent.appendChild(workingNode);
+ }
+
+ range.moveToElementText(workingNode);
+ range.collapse(!starting);
+ parent.removeChild(workingNode);
+
+ if (data) {
+ range[starting ? 'moveStart' : 'moveEnd']('character', offset);
+ }
+ return range;
+}
+
+module.exports = rangeToTextRange;
+
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9idWxsc2V5ZS9ub2RlX21vZHVsZXMvc2VsZWNjaW9uL3NyYy9yYW5nZVRvVGV4dFJhbmdlLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ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Agd29ya2luZ05vZGUuaW5uZXJIVE1MID0gJyYjZmVmZjsnO1xuXG4gIGlmIChib3VuZCkge1xuICAgIHBhcmVudC5pbnNlcnRCZWZvcmUod29ya2luZ05vZGUsIGJvdW5kKTtcbiAgfSBlbHNlIHtcbiAgICBwYXJlbnQuYXBwZW5kQ2hpbGQod29ya2luZ05vZGUpO1xuICB9XG5cbiAgcmFuZ2UubW92ZVRvRWxlbWVudFRleHQod29ya2luZ05vZGUpO1xuICByYW5nZS5jb2xsYXBzZSghc3RhcnRpbmcpO1xuICBwYXJlbnQucmVtb3ZlQ2hpbGQod29ya2luZ05vZGUpO1xuXG4gIGlmIChkYXRhKSB7XG4gICAgcmFuZ2Vbc3RhcnRpbmcgPyAnbW92ZVN0YXJ0JyA6ICdtb3ZlRW5kJ10oJ2NoYXJhY3RlcicsIG9mZnNldCk7XG4gIH1cbiAgcmV0dXJuIHJhbmdlO1xufVxuXG5tb2R1bGUuZXhwb3J0cyA9IHJhbmdlVG9UZXh0UmFuZ2U7XG4iXX0=
+},{}],9:[function(require,module,exports){
+'use strict';
+
+var getSelection = require('./getSelection');
+var setSelection = require('./setSelection');
+
+module.exports = {
+ get: getSelection,
+ set: setSelection
+};
+
+},{"./getSelection":3,"./setSelection":10}],10:[function(require,module,exports){
+(function (global){
+'use strict';
+
+var getSelection = require('./getSelection');
+var rangeToTextRange = require('./rangeToTextRange');
+var doc = global.document;
+
+function setSelection (p) {
+ if (doc.createRange) {
+ modernSelection();
+ } else {
+ oldSelection();
+ }
+
+ function modernSelection () {
+ var sel = getSelection();
+ var range = doc.createRange();
+ if (!p.startContainer) {
+ return;
+ }
+ if (p.endContainer) {
+ range.setEnd(p.endContainer, p.endOffset);
+ } else {
+ range.setEnd(p.startContainer, p.startOffset);
+ }
+ range.setStart(p.startContainer, p.startOffset);
+ sel.removeAllRanges();
+ sel.addRange(range);
+ }
+
+ function oldSelection () {
+ rangeToTextRange(p).select();
+ }
+}
+
+module.exports = setSelection;
+
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9idWxsc2V5ZS9ub2RlX21vZHVsZXMvc2VsZWNjaW9uL3NyYy9zZXRTZWxlY3Rpb24uanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsImZpbGUiOiJnZW5lcmF0ZWQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xuXG52YXIgZ2V0U2VsZWN0aW9uID0gcmVxdWlyZSgnLi9nZXRTZWxlY3Rpb24nKTtcbnZhciByYW5nZVRvVGV4dFJhbmdlID0gcmVxdWlyZSgnLi9yYW5nZVRvVGV4dFJhbmdlJyk7XG52YXIgZG9jID0gZ2xvYmFsLmRvY3VtZW50O1xuXG5mdW5jdGlvbiBzZXRTZWxlY3Rpb24gKHApIHtcbiAgaWYgKGRvYy5jcmVhdGVSYW5nZSkge1xuICAgIG1vZGVyblNlbGVjdGlvbigpO1xuICB9IGVsc2Uge1xuICAgIG9sZFNlbGVjdGlvbigpO1xuICB9XG5cbiAgZnVuY3Rpb24gbW9kZXJuU2VsZWN0aW9uICgpIHtcbiAgICB2YXIgc2VsID0gZ2V0U2VsZWN0aW9uKCk7XG4gICAgdmFyIHJhbmdlID0gZG9jLmNyZWF0ZVJhbmdlKCk7XG4gICAgaWYgKCFwLnN0YXJ0Q29udGFpbmVyKSB7XG4gICAgICByZXR1cm47XG4gICAgfVxuICAgIGlmIChwLmVuZENvbnRhaW5lcikge1xuICAgICAgcmFuZ2Uuc2V0RW5kKHAuZW5kQ29udGFpbmVyLCBwLmVuZE9mZnNldCk7XG4gICAgfSBlbHNlIHtcbiAgICAgIHJhbmdlLnNldEVuZChwLnN0YXJ0Q29udGFpbmVyLCBwLnN0YXJ0T2Zmc2V0KTtcbiAgICB9XG4gICAgcmFuZ2Uuc2V0U3RhcnQocC5zdGFydENvbnRhaW5lciwgcC5zdGFydE9mZnNldCk7XG4gICAgc2VsLnJlbW92ZUFsbFJhbmdlcygpO1xuICAgIHNlbC5hZGRSYW5nZShyYW5nZSk7XG4gIH1cblxuICBmdW5jdGlvbiBvbGRTZWxlY3Rpb24gKCkge1xuICAgIHJhbmdlVG9UZXh0UmFuZ2UocCkuc2VsZWN0KCk7XG4gIH1cbn1cblxubW9kdWxlLmV4cG9ydHMgPSBzZXRTZWxlY3Rpb247XG4iXX0=
+},{"./getSelection":3,"./rangeToTextRange":8}],11:[function(require,module,exports){
+(function (global){
+'use strict';
+
+var sell = require('sell');
+var crossvent = require('crossvent');
+var seleccion = require('seleccion');
+var throttle = require('./throttle');
+var getSelection = seleccion.get;
+var props = [
+ 'direction',
+ 'boxSizing',
+ 'width',
+ 'height',
+ 'overflowX',
+ 'overflowY',
+ 'borderTopWidth',
+ 'borderRightWidth',
+ 'borderBottomWidth',
+ 'borderLeftWidth',
+ 'paddingTop',
+ 'paddingRight',
+ 'paddingBottom',
+ 'paddingLeft',
+ 'fontStyle',
+ 'fontVariant',
+ 'fontWeight',
+ 'fontStretch',
+ 'fontSize',
+ 'fontSizeAdjust',
+ 'lineHeight',
+ 'fontFamily',
+ 'textAlign',
+ 'textTransform',
+ 'textIndent',
+ 'textDecoration',
+ 'letterSpacing',
+ 'wordSpacing'
+];
+var win = global;
+var doc = document;
+var ff = win.mozInnerScreenX !== null && win.mozInnerScreenX !== void 0;
+
+function tailormade (el, options) {
+ var textInput = el.tagName === 'INPUT' || el.tagName === 'TEXTAREA';
+ var throttledRefresh = throttle(refresh, 30);
+ var o = options || {};
+
+ bind();
+
+ return {
+ read: readPosition,
+ refresh: throttledRefresh,
+ destroy: destroy
+ };
+
+ function noop () {}
+ function readPosition () { return (textInput ? coordsText : coordsHTML)(); }
+
+ function refresh () {
+ if (o.sleeping) {
+ return;
+ }
+ return (o.update || noop)(readPosition());
+ }
+
+ function coordsText () {
+ var p = sell(el);
+ var context = prepare();
+ var readings = readTextCoords(context, p.start);
+ doc.body.removeChild(context.mirror);
+ return readings;
+ }
+
+ function coordsHTML () {
+ var sel = getSelection();
+ if (sel.rangeCount) {
+ var range = sel.getRangeAt(0);
+ var needsToWorkAroundNewlineBug = range.startContainer.nodeName === 'P' && range.startOffset === 0;
+ if (needsToWorkAroundNewlineBug) {
+ return {
+ x: range.startContainer.offsetLeft,
+ y: range.startContainer.offsetTop,
+ absolute: true
+ };
+ }
+ if (range.getClientRects) {
+ var rects = range.getClientRects();
+ if (rects.length > 0) {
+ return {
+ x: rects[0].left,
+ y: rects[0].top,
+ absolute: true
+ };
+ }
+ }
+ }
+ return { x: 0, y: 0 };
+ }
+
+ function readTextCoords (context, p) {
+ var rest = doc.createElement('span');
+ var mirror = context.mirror;
+ var computed = context.computed;
+
+ write(mirror, read(el).substring(0, p));
+
+ if (el.tagName === 'INPUT') {
+ mirror.textContent = mirror.textContent.replace(/\s/g, '\u00a0');
+ }
+
+ write(rest, read(el).substring(p) || '.');
+
+ mirror.appendChild(rest);
+
+ return {
+ x: rest.offsetLeft + parseInt(computed['borderLeftWidth']),
+ y: rest.offsetTop + parseInt(computed['borderTopWidth'])
+ };
+ }
+
+ function read (el) {
+ return textInput ? el.value : el.innerHTML;
+ }
+
+ function prepare () {
+ var computed = win.getComputedStyle ? getComputedStyle(el) : el.currentStyle;
+ var mirror = doc.createElement('div');
+ var style = mirror.style;
+
+ doc.body.appendChild(mirror);
+
+ if (el.tagName !== 'INPUT') {
+ style.wordWrap = 'break-word';
+ }
+ style.whiteSpace = 'pre-wrap';
+ style.position = 'absolute';
+ style.visibility = 'hidden';
+ props.forEach(copy);
+
+ if (ff) {
+ style.width = parseInt(computed.width) - 2 + 'px';
+ if (el.scrollHeight > parseInt(computed.height)) {
+ style.overflowY = 'scroll';
+ }
+ } else {
+ style.overflow = 'hidden';
+ }
+ return { mirror: mirror, computed: computed };
+
+ function copy (prop) {
+ style[prop] = computed[prop];
+ }
+ }
+
+ function write (el, value) {
+ if (textInput) {
+ el.textContent = value;
+ } else {
+ el.innerHTML = value;
+ }
+ }
+
+ function bind (remove) {
+ var op = remove ? 'remove' : 'add';
+ crossvent[op](el, 'keydown', throttledRefresh);
+ crossvent[op](el, 'keyup', throttledRefresh);
+ crossvent[op](el, 'input', throttledRefresh);
+ crossvent[op](el, 'paste', throttledRefresh);
+ crossvent[op](el, 'change', throttledRefresh);
+ }
+
+ function destroy () {
+ bind(true);
+ }
+}
+
+module.exports = tailormade;
+
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9idWxsc2V5ZS90YWlsb3JtYWRlLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQU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Ghyb3R0bGVkUmVmcmVzaCk7XG4gICAgY3Jvc3N2ZW50W29wXShlbCwgJ3Bhc3RlJywgdGhyb3R0bGVkUmVmcmVzaCk7XG4gICAgY3Jvc3N2ZW50W29wXShlbCwgJ2NoYW5nZScsIHRocm90dGxlZFJlZnJlc2gpO1xuICB9XG5cbiAgZnVuY3Rpb24gZGVzdHJveSAoKSB7XG4gICAgYmluZCh0cnVlKTtcbiAgfVxufVxuXG5tb2R1bGUuZXhwb3J0cyA9IHRhaWxvcm1hZGU7XG4iXX0=
+},{"./throttle":12,"crossvent":14,"seleccion":9,"sell":17}],12:[function(require,module,exports){
+'use strict';
+
+function throttle (fn, boundary) {
+ var last = -Infinity;
+ var timer;
+ return function bounced () {
+ if (timer) {
+ return;
+ }
+ unbound();
+
+ function unbound () {
+ clearTimeout(timer);
+ timer = null;
+ var next = last + boundary;
+ var now = Date.now();
+ if (now > next) {
+ last = now;
+ fn();
+ } else {
+ timer = setTimeout(unbound, next - now);
+ }
+ }
+ };
+}
+
+module.exports = throttle;
+
+},{}],13:[function(require,module,exports){
+(function (global){
+
+var NativeCustomEvent = global.CustomEvent;
+
+function useNative () {
+ try {
+ var p = new NativeCustomEvent('cat', { detail: { foo: 'bar' } });
+ return 'cat' === p.type && 'bar' === p.detail.foo;
+ } catch (e) {
+ }
+ return false;
+}
+
+/**
+ * Cross-browser `CustomEvent` constructor.
+ *
+ * https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent.CustomEvent
+ *
+ * @public
+ */
+
+module.exports = useNative() ? NativeCustomEvent :
+
+// IE >= 9
+'function' === typeof document.createEvent ? function CustomEvent (type, params) {
+ var e = document.createEvent('CustomEvent');
+ if (params) {
+ e.initCustomEvent(type, params.bubbles, params.cancelable, params.detail);
+ } else {
+ e.initCustomEvent(type, false, false, void 0);
+ }
+ return e;
+} :
+
+// IE <= 8
+function CustomEvent (type, params) {
+ var e = document.createEventObject();
+ e.type = type;
+ if (params) {
+ e.bubbles = Boolean(params.bubbles);
+ e.cancelable = Boolean(params.cancelable);
+ e.detail = params.detail;
+ } else {
+ e.bubbles = false;
+ e.cancelable = false;
+ e.detail = void 0;
+ }
+ return e;
+}
+
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9jcm9zc3ZlbnQvbm9kZV9tb2R1bGVzL2N1c3RvbS1ldmVudC9pbmRleC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJmaWxlIjoiZ2VuZXJhdGVkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXNDb250ZW50IjpbIlxudmFyIE5hdGl2ZUN1c3RvbUV2ZW50ID0gZ2xvYmFsLkN1c3RvbUV2ZW50O1xuXG5mdW5jdGlvbiB1c2VOYXRpdmUgKCkge1xuICB0cnkge1xuICAgIHZhciBwID0gbmV3IE5hdGl2ZUN1c3RvbUV2ZW50KCdjYXQnLCB7IGRldGFpbDogeyBmb286ICdiYXInIH0gfSk7XG4gICAgcmV0dXJuICAnY2F0JyA9PT0gcC50eXBlICYmICdiYXInID09PSBwLmRldGFpbC5mb287XG4gIH0gY2F0Y2ggKGUpIHtcbiAgf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1zLmRldGFpbDtcbiAgfSBlbHNlIHtcbiAgICBlLmJ1YmJsZXMgPSBmYWxzZTtcbiAgICBlLmNhbmNlbGFibGUgPSBmYWxzZTtcbiAgICBlLmRldGFpbCA9IHZvaWQgMDtcbiAgfVxuICByZXR1cm4gZTtcbn1cbiJdfQ==
+},{}],14:[function(require,module,exports){
+(function (global){
+'use strict';
+
+var customEvent = require('custom-event');
+var eventmap = require('./eventmap');
+var doc = document;
+var addEvent = addEventEasy;
+var removeEvent = removeEventEasy;
+var hardCache = [];
+
+if (!global.addEventListener) {
+ addEvent = addEventHard;
+ removeEvent = removeEventHard;
+}
+
+function addEventEasy (el, type, fn, capturing) {
+ return el.addEventListener(type, fn, capturing);
+}
+
+function addEventHard (el, type, fn) {
+ return el.attachEvent('on' + type, wrap(el, type, fn));
+}
+
+function removeEventEasy (el, type, fn, capturing) {
+ return el.removeEventListener(type, fn, capturing);
+}
+
+function removeEventHard (el, type, fn) {
+ return el.detachEvent('on' + type, unwrap(el, type, fn));
+}
+
+function fabricateEvent (el, type, model) {
+ var e = eventmap.indexOf(type) === -1 ? makeCustomEvent() : makeClassicEvent();
+ if (el.dispatchEvent) {
+ el.dispatchEvent(e);
+ } else {
+ el.fireEvent('on' + type, e);
+ }
+ function makeClassicEvent () {
+ var e;
+ if (doc.createEvent) {
+ e = doc.createEvent('Event');
+ e.initEvent(type, true, true);
+ } else if (doc.createEventObject) {
+ e = doc.createEventObject();
+ }
+ return e;
+ }
+ function makeCustomEvent () {
+ return new customEvent(type, { detail: model });
+ }
+}
+
+function wrapperFactory (el, type, fn) {
+ return function wrapper (originalEvent) {
+ var e = originalEvent || global.event;
+ e.target = e.target || e.srcElement;
+ e.preventDefault = e.preventDefault || function preventDefault () { e.returnValue = false; };
+ e.stopPropagation = e.stopPropagation || function stopPropagation () { e.cancelBubble = true; };
+ e.which = e.which || e.keyCode;
+ fn.call(el, e);
+ };
+}
+
+function wrap (el, type, fn) {
+ var wrapper = unwrap(el, type, fn) || wrapperFactory(el, type, fn);
+ hardCache.push({
+ wrapper: wrapper,
+ element: el,
+ type: type,
+ fn: fn
+ });
+ return wrapper;
+}
+
+function unwrap (el, type, fn) {
+ var i = find(el, type, fn);
+ if (i) {
+ var wrapper = hardCache[i].wrapper;
+ hardCache.splice(i, 1); // free up a tad of memory
+ return wrapper;
+ }
+}
+
+function find (el, type, fn) {
+ var i, item;
+ for (i = 0; i < hardCache.length; i++) {
+ item = hardCache[i];
+ if (item.element === el && item.type === type && item.fn === fn) {
+ return i;
+ }
+ }
+}
+
+module.exports = {
+ add: addEvent,
+ remove: removeEvent,
+ fabricate: fabricateEvent
+};
+
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9jcm9zc3ZlbnQvc3JjL2Nyb3NzdmVudC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ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cbn1cblxuZnVuY3Rpb24gZmluZCAoZWwsIHR5cGUsIGZuKSB7XG4gIHZhciBpLCBpdGVtO1xuICBmb3IgKGkgPSAwOyBpIDwgaGFyZENhY2hlLmxlbmd0aDsgaSsrKSB7XG4gICAgaXRlbSA9IGhhcmRDYWNoZVtpXTtcbiAgICBpZiAoaXRlbS5lbGVtZW50ID09PSBlbCAmJiBpdGVtLnR5cGUgPT09IHR5cGUgJiYgaXRlbS5mbiA9PT0gZm4pIHtcbiAgICAgIHJldHVybiBpO1xuICAgIH1cbiAgfVxufVxuXG5tb2R1bGUuZXhwb3J0cyA9IHtcbiAgYWRkOiBhZGRFdmVudCxcbiAgcmVtb3ZlOiByZW1vdmVFdmVudCxcbiAgZmFicmljYXRlOiBmYWJyaWNhdGVFdmVudFxufTtcbiJdfQ==
+},{"./eventmap":15,"custom-event":13}],15:[function(require,module,exports){
+(function (global){
+'use strict';
+
+var eventmap = [];
+var eventname = '';
+var ron = /^on/;
+
+for (eventname in global) {
+ if (ron.test(eventname)) {
+ eventmap.push(eventname.slice(2));
+ }
+}
+
+module.exports = eventmap;
+
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9jcm9zc3ZlbnQvc3JjL2V2ZW50bWFwLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6ImdlbmVyYXRlZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG5cbnZhciBldmVudG1hcCA9IFtdO1xudmFyIGV2ZW50bmFtZSA9ICcnO1xudmFyIHJvbiA9IC9eb24vO1xuXG5mb3IgKGV2ZW50bmFtZSBpbiBnbG9iYWwpIHtcbiAgaWYgKHJvbi50ZXN0KGV2ZW50bmFtZSkpIHtcbiAgICBldmVudG1hcC5wdXNoKGV2ZW50bmFtZS5zbGljZSgyKSk7XG4gIH1cbn1cblxubW9kdWxlLmV4cG9ydHMgPSBldmVudG1hcDtcbiJdfQ==
+},{}],16:[function(require,module,exports){
+'use strict';
+
+function fuzzysearch (needle, haystack) {
+ var tlen = haystack.length;
+ var qlen = needle.length;
+ if (qlen > tlen) {
+ return false;
+ }
+ if (qlen === tlen) {
+ return needle === haystack;
+ }
+ outer: for (var i = 0, j = 0; i < qlen; i++) {
+ var nch = needle.charCodeAt(i);
+ while (j < tlen) {
+ if (haystack.charCodeAt(j++) === nch) {
+ continue outer;
+ }
+ }
+ return false;
+ }
+ return true;
+}
+
+module.exports = fuzzysearch;
+
+},{}],17:[function(require,module,exports){
+'use strict';
+
+var get = easyGet;
+var set = easySet;
+
+if (document.selection && document.selection.createRange) {
+ get = hardGet;
+ set = hardSet;
+}
+
+function easyGet (el) {
+ return {
+ start: el.selectionStart,
+ end: el.selectionEnd
+ };
+}
+
+function hardGet (el) {
+ var active = document.activeElement;
+ if (active !== el) {
+ el.focus();
+ }
+
+ var range = document.selection.createRange();
+ var bookmark = range.getBookmark();
+ var original = el.value;
+ var marker = getUniqueMarker(original);
+ var parent = range.parentElement();
+ if (parent === null || !inputs(parent)) {
+ return result(0, 0);
+ }
+ range.text = marker + range.text + marker;
+
+ var contents = el.value;
+
+ el.value = original;
+ range.moveToBookmark(bookmark);
+ range.select();
+
+ return result(contents.indexOf(marker), contents.lastIndexOf(marker) - marker.length);
+
+ function result (start, end) {
+ if (active !== el) { // don't disrupt pre-existing state
+ if (active) {
+ active.focus();
+ } else {
+ el.blur();
+ }
+ }
+ return { start: start, end: end };
+ }
+}
+
+function getUniqueMarker (contents) {
+ var marker;
+ do {
+ marker = '@@marker.' + Math.random() * new Date();
+ } while (contents.indexOf(marker) !== -1);
+ return marker;
+}
+
+function inputs (el) {
+ return ((el.tagName === 'INPUT' && el.type === 'text') || el.tagName === 'TEXTAREA');
+}
+
+function easySet (el, p) {
+ el.selectionStart = parse(el, p.start);
+ el.selectionEnd = parse(el, p.end);
+}
+
+function hardSet (el, p) {
+ var range = el.createTextRange();
+
+ if (p.start === 'end' && p.end === 'end') {
+ range.collapse(false);
+ range.select();
+ } else {
+ range.collapse(true);
+ range.moveEnd('character', parse(el, p.end));
+ range.moveStart('character', parse(el, p.start));
+ range.select();
+ }
+}
+
+function parse (el, value) {
+ return value === 'end' ? el.value.length : value || 0;
+}
+
+function sell (el, p) {
+ if (arguments.length === 2) {
+ set(el, p);
+ }
+ return get(el);
+}
+
+module.exports = sell;
+
+},{}]},{},[1])(1)
+});
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyaWZ5L25vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJob3JzZXkuanMiLCJub2RlX21vZHVsZXMvYnVsbHNleWUvYnVsbHNleWUuanMiLCJub2RlX21vZHVsZXMvYnVsbHNleWUvbm9kZV9tb2R1bGVzL3NlbGVjY2lvbi9zcmMvZ2V0U2VsZWN0aW9uLmpzIiwibm9kZV9tb2R1bGVzL2J1bGxzZXllL25vZGVfbW9kdWxlcy9zZWxlY2Npb24vc3JjL2dldFNlbGVjdGlvbk51bGxPcC5qcyIsIm5vZGVfbW9kdWxlcy9idWxsc2V5ZS9ub2RlX21vZHVsZXMvc2VsZWNjaW9uL3NyYy9nZXRTZWxlY3Rpb25SYXcuanMiLCJub2RlX21vZHVsZXMvYnVsbHNleWUvbm9kZV9tb2R1bGVzL3NlbGVjY2lvbi9zcmMvZ2V0U2VsZWN0aW9uU3ludGhldGljLmpzIiwibm9kZV9tb2R1bGVzL2J1bGxzZXllL25vZGVfbW9kdWxlcy9zZWx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2V0KGVsKTtcbn1cblxubW9kdWxlLmV4cG9ydHMgPSBzZWxsO1xuIl19
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/js/html5shiv-printshiv.min.js b/vendor/github.com/magefile/mage/site/themes/learn/static/js/html5shiv-printshiv.min.js
new file mode 100644
index 0000000..9c78ee3
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/static/js/html5shiv-printshiv.min.js
@@ -0,0 +1,4 @@
+/**
+* @preserve HTML5 Shiv prev3.7.1 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
+*/
+!function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=x.elements;return"string"==typeof a?a.split(" "):a}function e(a){var b=w[a[u]];return b||(b={},v++,a[u]=v,w[v]=b),b}function f(a,c,d){if(c||(c=b),p)return c.createElement(a);d||(d=e(c));var f;return f=d.cache[a]?d.cache[a].cloneNode():t.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!f.canHaveChildren||s.test(a)||f.tagUrn?f:d.frag.appendChild(f)}function g(a,c){if(a||(a=b),p)return a.createDocumentFragment();c=c||e(a);for(var f=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)f.createElement(h[g]);return f}function h(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return x.shivMethods?f(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(x,b.frag)}function i(a){a||(a=b);var d=e(a);return!x.shivCSS||o||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),p||h(a,d),a}function j(a){for(var b,c=a.getElementsByTagName("*"),e=c.length,f=RegExp("^(?:"+d().join("|")+")$","i"),g=[];e--;)b=c[e],f.test(b.nodeName)&&g.push(b.applyElement(k(b)));return g}function k(a){for(var b,c=a.attributes,d=c.length,e=a.ownerDocument.createElement(z+":"+a.nodeName);d--;)b=c[d],b.specified&&e.setAttribute(b.nodeName,b.nodeValue);return e.style.cssText=a.style.cssText,e}function l(a){for(var b,c=a.split("{"),e=c.length,f=RegExp("(^|[\\s,>+~])("+d().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),g="$1"+z+"\\:$2";e--;)b=c[e]=c[e].split("}"),b[b.length-1]=b[b.length-1].replace(f,g),c[e]=b.join("}");return c.join("{")}function m(a){for(var b=a.length;b--;)a[b].removeNode()}function n(a){function b(){clearTimeout(g._removeSheetTimer),d&&d.removeNode(!0),d=null}var d,f,g=e(a),h=a.namespaces,i=a.parentWindow;return!A||a.printShived?a:("undefined"==typeof h[z]&&h.add(z),i.attachEvent("onbeforeprint",function(){b();for(var e,g,h,i=a.styleSheets,k=[],m=i.length,n=Array(m);m--;)n[m]=i[m];for(;h=n.pop();)if(!h.disabled&&y.test(h.media)){try{e=h.imports,g=e.length}catch(o){g=0}for(m=0;g>m;m++)n.push(e[m]);try{k.push(h.cssText)}catch(o){}}k=l(k.reverse().join("")),f=j(a),d=c(a,k)}),i.attachEvent("onafterprint",function(){m(f),clearTimeout(g._removeSheetTimer),g._removeSheetTimer=setTimeout(b,500)}),a.printShived=!0,a)}var o,p,q="3.7.0",r=a.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,t=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,u="_html5shiv",v=0,w={};!function(){try{var a=b.createElement("a");a.innerHTML="",o="hidden"in a,p=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){o=!0,p=!0}}();var x={elements:r.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:q,shivCSS:r.shivCSS!==!1,supportsUnknownElements:p,shivMethods:r.shivMethods!==!1,type:"default",shivDocument:i,createElement:f,createDocumentFragment:g};a.html5=x,i(b);var y=/^$|\b(?:all|print)\b/,z="html5shiv",A=!p&&function(){var c=b.documentElement;return!("undefined"==typeof b.namespaces||"undefined"==typeof b.parentWindow||"undefined"==typeof c.applyElement||"undefined"==typeof c.removeNode||"undefined"==typeof a.attachEvent)}();x.type+=" print",x.shivPrint=n,n(b)}(this,document);
\ No newline at end of file
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/js/hugo-learn.js b/vendor/github.com/magefile/mage/site/themes/learn/static/js/hugo-learn.js
new file mode 100644
index 0000000..a306d62
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/static/js/hugo-learn.js
@@ -0,0 +1,87 @@
+// Get Parameters from some url
+var getUrlParameter = function getUrlParameter(sPageURL) {
+ var url = sPageURL.split('?');
+ var obj = {};
+ if (url.length == 2) {
+ var sURLVariables = url[1].split('&'),
+ sParameterName,
+ i;
+ for (i = 0; i < sURLVariables.length; i++) {
+ sParameterName = sURLVariables[i].split('=');
+ obj[sParameterName[0]] = sParameterName[1];
+ }
+ return obj;
+ } else {
+ return undefined;
+ }
+};
+
+// Execute actions on images generated from Markdown pages
+ var images = $("div#body-inner img").not(".inline");
+// Wrap image inside a featherlight (to get a full size view in a popup)
+//images.wrap(function(){
+// var image =$(this);
+// return "";
+// });
+
+// Change styles, depending on parameters set to the image
+images.each(function(index){
+ var image = $(this)
+ var o = getUrlParameter(image[0].src);
+ if (typeof o !== "undefined") {
+ var h = o["height"];
+ var w = o["width"];
+ var c = o["classes"];
+ image.css("width", function() {
+ if (typeof w !== "undefined") {
+ return w;
+ } else {
+ return "auto";
+ }
+ });
+ image.css("height", function() {
+ if (typeof h !== "undefined") {
+ return h;
+ } else {
+ return "auto";
+ }
+ });
+ if (typeof c !== "undefined") {
+ var classes = c.split(',');
+ for (i = 0; i < classes.length; i++) {
+ image.addClass(classes[i]);
+ }
+ }
+ }
+});
+
+// Stick the top to the top of the screen when scrolling
+$("#top-bar").stick_in_parent( {
+ parent: ".sticky-parent",
+ spacer: ".sticky-spacer",
+});
+
+
+jQuery(document).ready(function() {
+ // Add link button for every
+ var text, clip = new Clipboard('.anchor');
+ $("h1~h2,h1~h3,h1~h4,h1~h5,h1~h6").append(function(index, html){
+ var element = $(this);
+ var url = document.location.origin + document.location.pathname;
+ var link = url + "#"+element[0].id;
+ return " " +
+ "" +
+ ""
+ ;
+ });
+
+ $(".anchor").on('mouseleave', function(e) {
+ $(this).attr('aria-label', null).removeClass('tooltipped tooltipped-s tooltipped-w');
+ });
+
+ clip.on('success', function(e) {
+ e.clearSelection();
+ $(e.trigger).attr('aria-label', 'Link copied to clipboard!').addClass('tooltipped tooltipped-s');
+ });
+
+});
diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/js/jquery-2.x.min.js b/vendor/github.com/magefile/mage/site/themes/learn/static/js/jquery-2.x.min.js
new file mode 100644
index 0000000..b8c4187
--- /dev/null
+++ b/vendor/github.com/magefile/mage/site/themes/learn/static/js/jquery-2.x.min.js
@@ -0,0 +1,4 @@
+/*! jQuery v2.2.3 | (c) jQuery Foundation | jquery.org/license */
+!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=a.document,e=c.slice,f=c.concat,g=c.push,h=c.indexOf,i={},j=i.toString,k=i.hasOwnProperty,l={},m="2.2.3",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return e.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:e.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a){return n.each(this,a)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(e.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:g,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){var b=a&&a.toString();return!n.isArray(a)&&b-parseFloat(b)+1>=0},isPlainObject:function(a){var b;if("object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;if(a.constructor&&!k.call(a,"constructor")&&!k.call(a.constructor.prototype||{},"isPrototypeOf"))return!1;for(b in a);return void 0===b||k.call(a,b)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?i[j.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=d.createElement("script"),b.text=a,d.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(s(a)){for(c=a.length;c>d;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):g.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:h.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,g=0,h=[];if(s(a))for(d=a.length;d>g;g++)e=b(a[g],g,c),null!=e&&h.push(e);else for(g in a)e=b(a[g],g,c),null!=e&&h.push(e);return f.apply([],h)},guid:1,proxy:function(a,b){var c,d,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(d=e.call(arguments,2),f=function(){return a.apply(b||this,d.concat(e.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:l}),"function"==typeof Symbol&&(n.fn[Symbol.iterator]=c[Symbol.iterator]),n.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){i["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=!!a&&"length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ga(),z=ga(),A=ga(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+M+"))|)"+L+"*\\]",O=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",P=new RegExp(L+"+","g"),Q=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),R=new RegExp("^"+L+"*,"+L+"*"),S=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),T=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),U=new RegExp(O),V=new RegExp("^"+M+"$"),W={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},X=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,_=/[+~]/,aa=/'|\\/g,ba=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),ca=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},da=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(ea){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fa(a,b,d,e){var f,h,j,k,l,o,r,s,w=b&&b.ownerDocument,x=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==x&&9!==x&&11!==x)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==x&&(o=$.exec(a)))if(f=o[1]){if(9===x){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(w&&(j=w.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(o[2])return H.apply(d,b.getElementsByTagName(a)),d;if((f=o[3])&&c.getElementsByClassName&&b.getElementsByClassName)return H.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==x)w=b,s=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(aa,"\\$&"):b.setAttribute("id",k=u),r=g(a),h=r.length,l=V.test(k)?"#"+k:"[id='"+k+"']";while(h--)r[h]=l+" "+qa(r[h]);s=r.join(","),w=_.test(a)&&oa(b.parentNode)||b}if(s)try{return H.apply(d,w.querySelectorAll(s)),d}catch(y){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(Q,"$1"),b,d,e)}function ga(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ha(a){return a[u]=!0,a}function ia(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ja(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function ka(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function la(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function na(a){return ha(function(b){return b=+b,ha(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function oa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=fa.support={},f=fa.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fa.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ia(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ia(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Z.test(n.getElementsByClassName),c.getById=ia(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return"undefined"!=typeof b.getElementsByClassName&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=Z.test(n.querySelectorAll))&&(ia(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ia(function(a){var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Z.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ia(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",O)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Z.test(o.compareDocumentPosition),t=b||Z.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return ka(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?ka(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},fa.matches=function(a,b){return fa(a,null,null,b)},fa.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(T,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fa(b,n,null,[a]).length>0},fa.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fa.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fa.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fa.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fa.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fa.selectors={cacheLength:50,createPseudo:ha,match:W,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ba,ca),a[3]=(a[3]||a[4]||a[5]||"").replace(ba,ca),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fa.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fa.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return W.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&U.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ba,ca).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fa.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(P," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fa.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ha(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ha(function(a){var b=[],c=[],d=h(a.replace(Q,"$1"));return d[u]?ha(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ha(function(a){return function(b){return fa(a,b).length>0}}),contains:ha(function(a){return a=a.replace(ba,ca),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ha(function(a){return V.test(a||"")||fa.error("unsupported lang: "+a),a=a.replace(ba,ca).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Y.test(a.nodeName)},input:function(a){return X.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:na(function(){return[0]}),last:na(function(a,b){return[b-1]}),eq:na(function(a,b,c){return[0>c?c+b:c]}),even:na(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:na(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:na(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:na(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function ra(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j,k=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(j=b[u]||(b[u]={}),i=j[b.uniqueID]||(j[b.uniqueID]={}),(h=i[d])&&h[0]===w&&h[1]===f)return k[2]=h[2];if(i[d]=k,k[2]=a(b,c,g))return!0}}}function sa(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ta(a,b,c){for(var d=0,e=b.length;e>d;d++)fa(a,b[d],c);return c}function ua(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function va(a,b,c,d,e,f){return d&&!d[u]&&(d=va(d)),e&&!e[u]&&(e=va(e,f)),ha(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ta(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ua(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ua(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ua(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function wa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ra(function(a){return a===b},h,!0),l=ra(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[ra(sa(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return va(i>1&&sa(m),i>1&&qa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(Q,"$1"),c,e>i&&wa(a.slice(i,e)),f>e&&wa(a=a.slice(e)),f>e&&qa(a))}m.push(c)}return sa(m)}function xa(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=F.call(i));u=ua(u)}H.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&fa.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ha(f):f}return h=fa.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xa(e,d)),f.selector=a}return f},i=fa.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ba,ca),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=W.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ba,ca),_.test(j[0].type)&&oa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qa(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,!b||_.test(a)&&oa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ia(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ia(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ja("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ia(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ja("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ia(function(a){return null==a.getAttribute("disabled")})||ja(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fa}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.uniqueSort=n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},v=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},w=n.expr.match.needsContext,x=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,y=/^.[^:#\[\.,]*$/;function z(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(y.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return h.call(b,a)>-1!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(z(this,a||[],!1))},not:function(a){return this.pushStack(z(this,a||[],!0))},is:function(a){return!!z(this,"string"==typeof a&&w.test(a)?n(a):a||[],!1).length}});var A,B=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=n.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||A,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:B.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),x.test(e[1])&&n.isPlainObject(b))for(e in b)n.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&f.parentNode&&(this.length=1,this[0]=f),this.context=d,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?void 0!==c.ready?c.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};C.prototype=n.fn,A=n(d);var D=/^(?:parents|prev(?:Until|All))/,E={children:!0,contents:!0,next:!0,prev:!0};n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=w.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?h.call(n(a),this[0]):h.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.uniqueSort(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function F(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return u(a,"parentNode")},parentsUntil:function(a,b,c){return u(a,"parentNode",c)},next:function(a){return F(a,"nextSibling")},prev:function(a){return F(a,"previousSibling")},nextAll:function(a){return u(a,"nextSibling")},prevAll:function(a){return u(a,"previousSibling")},nextUntil:function(a,b,c){return u(a,"nextSibling",c)},prevUntil:function(a,b,c){return u(a,"previousSibling",c)},siblings:function(a){return v((a.parentNode||{}).firstChild,a)},children:function(a){return v(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(E[a]||n.uniqueSort(e),D.test(a)&&e.reverse()),this.pushStack(e)}});var G=/\S+/g;function H(a){var b={};return n.each(a.match(G)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?H(a):n.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h-1)f.splice(c,1),h>=c&&h--}),this},has:function(a){return a?n.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().progress(c.notify).done(c.resolve).fail(c.reject):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=e.call(arguments),d=c.length,f=1!==d||a&&n.isFunction(a.promise)?d:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?e.call(arguments):d,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(d>1)for(i=new Array(d),j=new Array(d),k=new Array(d);d>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().progress(h(b,j,i)).done(h(b,k,c)).fail(g.reject):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(d,[n]),n.fn.triggerHandler&&(n(d).triggerHandler("ready"),n(d).off("ready"))))}});function J(){d.removeEventListener("DOMContentLoaded",J),a.removeEventListener("load",J),n.ready()}n.ready.promise=function(b){return I||(I=n.Deferred(),"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(n.ready):(d.addEventListener("DOMContentLoaded",J),a.addEventListener("load",J))),I.promise(b)},n.ready.promise();var K=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)K(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},L=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function M(){this.expando=n.expando+M.uid++}M.uid=1,M.prototype={register:function(a,b){var c=b||{};return a.nodeType?a[this.expando]=c:Object.defineProperty(a,this.expando,{value:c,writable:!0,configurable:!0}),a[this.expando]},cache:function(a){if(!L(a))return{};var b=a[this.expando];return b||(b={},L(a)&&(a.nodeType?a[this.expando]=b:Object.defineProperty(a,this.expando,{value:b,configurable:!0}))),b},set:function(a,b,c){var d,e=this.cache(a);if("string"==typeof b)e[b]=c;else for(d in b)e[d]=b[d];return e},get:function(a,b){return void 0===b?this.cache(a):a[this.expando]&&a[this.expando][b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=a[this.expando];if(void 0!==f){if(void 0===b)this.register(a);else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in f?d=[b,e]:(d=e,d=d in f?[d]:d.match(G)||[])),c=d.length;while(c--)delete f[d[c]]}(void 0===b||n.isEmptyObject(f))&&(a.nodeType?a[this.expando]=void 0:delete a[this.expando])}},hasData:function(a){var b=a[this.expando];return void 0!==b&&!n.isEmptyObject(b)}};var N=new M,O=new M,P=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Q=/[A-Z]/g;function R(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(Q,"-$&").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:P.test(c)?n.parseJSON(c):c;
+}catch(e){}O.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return O.hasData(a)||N.hasData(a)},data:function(a,b,c){return O.access(a,b,c)},removeData:function(a,b){O.remove(a,b)},_data:function(a,b,c){return N.access(a,b,c)},_removeData:function(a,b){N.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=O.get(f),1===f.nodeType&&!N.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),R(f,d,e[d])));N.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){O.set(this,a)}):K(this,function(b){var c,d;if(f&&void 0===b){if(c=O.get(f,a)||O.get(f,a.replace(Q,"-$&").toLowerCase()),void 0!==c)return c;if(d=n.camelCase(a),c=O.get(f,d),void 0!==c)return c;if(c=R(f,d,void 0),void 0!==c)return c}else d=n.camelCase(a),this.each(function(){var c=O.get(this,d);O.set(this,d,b),a.indexOf("-")>-1&&void 0!==c&&O.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){O.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=N.get(a,b),c&&(!d||n.isArray(c)?d=N.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return N.get(a,c)||N.access(a,c,{empty:n.Callbacks("once memory").add(function(){N.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length",""],thead:[1,"